Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change between 0.7.7 and 0.7.8 #267

Open
Zippy1999 opened this issue Jan 20, 2025 · 1 comment
Open

Breaking change between 0.7.7 and 0.7.8 #267

Zippy1999 opened this issue Jan 20, 2025 · 1 comment

Comments

@Zippy1999
Copy link

In 0.7.8 some additional code is in play

        if AIOHTTP_VERSION >= Version('3.8.0'):
            # Join url with ClientSession._base_url
            url = orig_self._build_url(url)
            url_origin = str(url)
            # Combine ClientSession headers with passed headers
            if orig_self.headers:
                kwargs["headers"] = orig_self._prepare_headers(kwargs.get("headers"))
        else:
            url_origin = url

The main change is

 url = orig_self._build_url(url)

When the final url is presented, it includes the host AND path. This means our previous tests setup where we were just setting the path are starting to fail

Was this desired behaviour or is this a bug? - I'm checking in here as if it is NOT a bug I will need to set about changing my test assertions.

@agners
Copy link

agners commented Jan 21, 2025

When the final url is presented, it includes the host AND path. This means our previous tests setup where we were just setting the path are starting to fail

Exactly the same here. We used aioresponses in tests with the path only, which was kinda neat. With the 0.7.8 bump a full URL is required for tests to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants