Requests: support idna 2.6

Created on 8 Aug 2017  路  8Comments  路  Source: psf/requests

idna 2.6 has been released, so the constraint in setup.py is now blowing up:

pkg_resources.ContextualVersionConflict: (idna 2.6 (.../ve/lib/python2.7/site-packages), Requirement.parse('idna<2.6,>=2.5'), set(['requests']))

Most helpful comment

The same is starting to happen with idna 2.7 because cryptography requires idna 2.7
I still don't know why pip is resolving idna 2.7, cryptography is not requiring 2.7

All 8 comments

Hang on, why is that constraint exploding? 2.5 should satisfy the requirement.

My guess something is installing it earlier in the build chain, and pip isn't clever enough to downgrade to 2.5 once 2.6 is installed.

Is there a problem with 2.6 that makes it backwards incompatible?

We don't know at this time: we began with very tight pins because we only unvendored the package a few months ago and so didn't want to run the risk of accidental breakage. We need to get a feel for what the actual compatibility structure is here.

In the short term, you can resolve your problem by using requirements.txt or similar to pin the idna version. In the longer term, we can aim to get a Requests patch that widens the pin.

Thanks for the quick turnaround!

Is there any plan for releasing a new version with this fix? That would be really helpful.

Yes, next week.

The same is starting to happen with idna 2.7 because cryptography requires idna 2.7
I still don't know why pip is resolving idna 2.7, cryptography is not requiring 2.7

I have a similar issue but with version 2.10:

error: idna 2.10 is installed but idna<2.9,>=2.5 is required by {'requests'}
Was this page helpful?
0 / 5 - 0 ratings