DEV Community

Discussion on: For a week the Python world was a bit broken

Collapse
 
rhymes profile image
rhymes

Hi Fabio,

I'm not sure I understood what happened, I'm probably missing something.

idna gets updated to 2.8, requests asks for 2.7 max. PyPI keeps old versions so it should have just matched with idna 2.7, no? Did they delete idna 2.7 from pypi?

Maybe there was another dependency asking for idna > 2.7 that conflicted with requests's requirements? That's usually when I get these problems, when two dependencies asks for incompatible versions of the same lib.

Collapse
 
fabiorosado profile image
Fabio Rosado

Hello, rhymes thank you for your comment, I was a bit puzzled as well even because I thought we weren't using requests on our project (but there was an old requests_mock dependency that was unused).

For some reason Travis kept complaining that requests need idna up to 2.7, this happened as soon as idna got updated to 2.8. Maybe Travis checks the latest version of all dependencies and if there is some discrepancies it complains?

Collapse
 
rhymes profile image
rhymes

For some reason Travis kept complaining that requests need idna up to 2.7, this happened as soon as idna got updated to 2.8. Maybe Travis checks the latest version of all dependencies and if there is some discrepancies it complains?

Weird, especially if you could install the dependencies on your local machine.

It seems you weren't the only one with that problem github.com/home-assistant/home-ass...

🧐

Thread Thread
 
fabiorosado profile image
Fabio Rosado • Edited

Yeah I checked aiohttp to see if things where okay but the badge showed that the build was breaking, when I check Travis it complained about the same thing.

Funny enough it seems that home-assistant seem to have fixed the issue by pinning the old idna version, I haven't thought about it since we weren't using idna directly. I will keep that in mind haha

--EDIT--
Also, it seems that aiohttp fixed the issue by following the same strategy.

Thread Thread
 
rhymes profile image
rhymes

I haven't thought about it since we weren't using idna directly. I will keep that in mind haha

That's a good strategy. You add the indirect dependency to your code, pin it, wait until your direct dependency solves the issue and then remove the indirect one. Until the next time then :D

BTW do you use aiohttp directly?

Thread Thread
 
fabiorosado profile image
Fabio Rosado

Yeah I never thought about doing that, I think I will update my post with this for the future haha

Yeah we use aiohttp directly why?

Thread Thread
 
rhymes profile image
rhymes

Yeah we use aiohttp directly why?

Because it would be great if you wrote an article on using aiohttp day by day :)

Thread Thread
 
fabiorosado profile image
Fabio Rosado

Great idea I will work something out :D