-
Notifications
You must be signed in to change notification settings - Fork 39
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
Drop Python 2.7 support #186
Comments
I have considered this but I would prefer not to do it for now. The pros are much lower than the cons (you can use pyfields if you need dataclass in python 2, even though I agree that type hinting class attributes without type comments is a bit less convenient :) ) Even if PSF dropped support, for the month of december 2020 only 73.6% of the total pytest-cases downloads were on python 3... So python 2 is clearly still around. |
I suggest keeping this issue open and marking it as blocked. I'm pretty sure that one day we would want to drop Python 2.7 and 3.5 support. This issue can help us track it. |
Good point |
Hey @smarie . I'm bumping this issue again. I think that a year later, it's about time to drop python 2.7 support. Keeping 2.7 makes the code a lot harder to read than it should be. I truly believe that people should have moved to python 3 by now. Would love to hear your opinion about this. |
Thanks @saroad2 for coming back at this point ! Indeed this could be something doable, if you are motivated. Knowing the details inside pytest-cases, I am just afraid that by far the largest complexity by far is not due to python 2 support, but to working around the pytest engine with tweaks that are more or less ugly (creation of fixtures behind the users' back in particular, and manipulating the callspecs). This is why I thought that the first refactoring to happen would be #170 and not #186 Maybe doing #186 first is a way to reduce the amount of code and increase readability , before doing the #170. |
As of January 2020, Python 2.7 (and Python 2 in general) is not supported by the Python Software Foundation (PSF). The same implies to Python 3.5 as from December 2020.
I think it's about time that
pytest-cases
will do the same. This will allow us to use f-strings, type hints (not as comments), data classes, and many more abilities which are currently out of reach.What do you think?
The text was updated successfully, but these errors were encountered: