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

Eliminate dependency on requests #325

Open
graingert opened this issue Feb 12, 2021 · 2 comments · May be fixed by #401
Open

Eliminate dependency on requests #325

graingert opened this issue Feb 12, 2021 · 2 comments · May be fixed by #401
Labels
Milestone

Comments

@graingert
Copy link
Member

graingert commented Feb 12, 2021

The treq dependency on requests seems to be causing issues for Klein and other packages that depend on idna

https://twistedmatrix.com/pipermail/twisted-python/2021-February/065444.html

@wsanchez wsanchez added the bug label Feb 18, 2021
@wsanchez
Copy link
Member

Here is the error, in case the above expires:

ERROR: Cannot install hyperlink==21.0.0, idna==3.1 and treq because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested idna==3.1
    hyperlink 21.0.0 depends on idna>=2.5
    requests 2.25.1 depends on idna<3 and >=2.5

@twm twm changed the title vendor requests.cookies Eliminate dependency on requests Feb 27, 2021
@twm twm modified the milestones: Treq 2021.5.0, Treq NEXT May 12, 2021
twm added a commit that referenced this issue May 1, 2024
Add `treq.cookies` helper module

A bunch of cookie-related stuff, incrementally stepping towards addressing #325:

- Add tests that cover the (suprising!) way that cookiejars get updated.
- Extract a scoped_cookie() helper for creating Cookie objects.
- Add a search() function for searching a cookiejar.
- Fix a CookieAgent MyPy failure.
- Improve the typing of treq.response._Response (including its cookie() method).

Fixes #384.
@glyph
Copy link
Member

glyph commented Jun 27, 2024

Sadly #266 has made the situation a little bit worse, as it uses requests.utils.parse_dict_header but that seems like a pretty light level of string-mashing logic (which maybe should be in Twisted? I'm a little surprised we don't have any use for this in any of Twisted's own HTTP code)

@glyph glyph linked a pull request Sep 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants