elifesciences / elife-tools

Python library for parsing eLife article XML data.
MIT License
15 stars 7 forks source link

Drop support for Python 2.7 #315

Closed gnott closed 4 years ago

gnott commented 5 years ago

This library is currently supported in Python 2.7 and Python 3, tested in both 2.7 and 3.5 in automated tests. Considering the EOF date of Python 2, there are a couple things we can do before the end of 2019 here, including:

I'm not sure if there's any advantage to keep the testing and stated support beyond December 31, 2019. Is there a reason to have some overlap for version support? Any comments @lsh-0, @giorgiosironi, @de-code?

lsh-0 commented 5 years ago

projects that depend on elife-tools:

I'll go through them and check those that support python3

update: looks like it's just elife-article missing python3 support now.

giorgiosironi commented 5 years ago

I agree that the main issue is projects that use this library and should be ported to Python 3. As soon as that happens, would drop Python 2 and enjoy the simplicity of one Python major version.

lsh-0 commented 5 years ago

simplicity of one Python major version

you mean, three, right? 3.4, 3.5, 3.6 with a mix of apps using containers, 16.04 and 18.04.

personally I would err on the language feature set introduced in 3.4 so it's forwards compatible with everything, but python feels more like perl and php to me these days. Let the devs do what they want, we'll accommodate them somehow.

giorgiosironi commented 5 years ago

One major version, three minor versions; at least you don't need six anymore.

giorgiosironi commented 5 years ago

I would err on the language feature set introduced in 3.4

A miminum Python version is welcome. Seems 3.4 is EOL already so should that be 3.5? 3.4 was what we had on 14.04 IIRC, which has now been removed?

/cc @GiancarloFusiello on suggestions for a minimum Python 3.x version.

GiancarloFusiello commented 5 years ago

I would use the latest version of python that the project dependencies support. Python 3.7 latest version is 3.7.4. Lots of new features, optimisations and bug/security fixes https://docs.python.org/3/whatsnew/3.7.html

lsh-0 commented 5 years ago

One major version, three minor versions

Python doesn't use semantic versioning.

I would use the latest version of python that the project dependencies support.

I'm being pedantic, but I would caveat that - you need to understand the operating environment of the application.

gnott commented 5 years ago

Good point to ensure all the dependent libraries are also compatible. elife-article I'm sure that it is compatible but it isn't stated as so. I'm updating that now. We might want a consistent test and stated python version support for each of these identified libraries.

lsh-0 commented 5 years ago

We might want a consistent test and stated python version support for each of these identified libraries.

actually, your work with the environments in tox.ini and setup.py categories is what let me tick those other libraries off so quickly, so we're already 99% of the way there. It's just that one outstanding project that doesn't look like it's been updated yet.

gnott commented 4 years ago

Interesting example on https://pypi.org/project/pytest/ it shows as Python :: 3 :: Only. I'm not planning to add that classifier to the setup.py here, but it might be a good thing to display, causing less confusion after py27 support is dropped.

gnott commented 4 years ago

PR is merged, I think this ticket is completed now so closing!

lsh-0 commented 4 years ago

thanks, @gnott