Github workflows errors when installing pytest from

I’m having trouble with this very simple repository :

I am trying to setup some CI, but the action fails when trying to install dependencies through the file on python 2.7 (python 3.5, 3.6, 3.7 work fine), as you can see here :

I really don’t know how to get this to work as this is the most simple project I could think of, and it is still failing ^^’.

Any help would be greatly appreciated!

The errors look like incompatibilities with Python 2, and the correct solution is right there in the log:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. […]

That’s basically polite phrasing for “Stop using Python 2, it’s way outdated and no-one cares if it gives you trouble!” So, just remove Python 2.7 from your build matrix. :wink:

However, I already know about python 2.7 deprecation, and unfortunately this is not an option as I am developing for 3rd party applications, some of which (the major part of them actually) still use python 2.7.

This means I will still have to support it for at least the next 2 to 3 years (which hopefully should be enough time for all the versions still under 2.7 to stop being used).

That’s pretty horrifying, really.

In that case the one practical solution I can think of would be to require older versions of your dependencies, from before they dropped Python 2 support. Of course that also means you get any associated bugs.

Technically you could also try to fork those dependencies and maintain Python 2 support yourself, but looking at the sheer number of error messages in the log that’s probably only realistic if you have a team that gets paid for it.

Yes, it is very annoying, unfortunately, I have to deal with it for the time being.

I think I was having some slight success with defining specific versions for all the packages in my own, but that means I would need to specify versions for most of the dependencies of the packages I’m depending on, even though I am not directly depending on said packages, which is very far from ideal, since I will most likely need to define lots and lots of versions (I guess I will have to keep a separate list of my actual dependencies to replace this one once I can finally drop support for python 2). Which is still a better solution than maintaining myself new versions for a whole lot of packages ^^.

I was however hoping that someone might have a better solution than this one. I will wait a bit longer see if anyone has any better solution than mine.

1 Like