-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix aiohttp redirect #126
fix aiohttp redirect #126
Conversation
for more information, see https://pre-commit.ci
Codecov ReportBase: 89.87% // Head: 89.87% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #126 +/- ##
=======================================
Coverage 89.87% 89.87%
=======================================
Files 5 5
Lines 622 622
=======================================
Hits 559 559
Misses 63 63
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
for more information, see https://pre-commit.ci
making the Optional explicit will also allow to auto-merge this: #118 |
@@ -35,7 +35,7 @@ def _default_aiohttp_session(config: "SessionConfig") -> aiohttp.ClientSession: | |||
`aiohttp.ClientSession` expects to be instantiated in a asyncio context | |||
where it can get a running loop. | |||
""" | |||
return aiohttp.ClientSession(headers=config.headers) | |||
return aiohttp.ClientSession(headers=config.headers, requote_redirect_url=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a minimum version of aiohttp just to be safe (tbh we should already have one and I don't know if this is actually the thing that constrains us).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but you do not have any versioning of dependencies in this project, yet. So for this PR I'd suggest to continue without. And in parallel, what do you think about migrating this project to poetry? It's pretty straightforward, and I am happy to help with a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather stick to setuptools for now, although I would be happy to move all the config into pyproject.toml
.
filename: Optional[ | ||
Union[str, Callable[[str, Optional[aiohttp.ClientResponse]], os.PathLike]] | ||
] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes I think type hints have gone too far 😛
Closes #125