discontinue Python 2 support

32 views
Skip to first unread message

Oliver Beckstein

unread,
Jul 18, 2019, 7:39:22 PM7/18/19
to MDAnalysis Developers

Devs,

Python 2 reaches end of life on 1 January, 2020, according to PEP 373 and python/devguide#344 based on https://mail.python.org/pipermail/python-dev/2018-March/152348.html.

Many of our dependencies (notably numpy, see Plan for dropping Python 2.7 support) have ceased Python 2.7 support in new releases or will also drop Python 2.7 in 2020.

I know that science is rolling slowly and surely some scientific projects will continue with Python 2.7 beyond 2020. MDAnalysis has been supporting Python 2 and Python 3 now for a while. However, given how precious developer time is, I think we also need to decide that we will stop caring for 2.7 after the official Python 2.7 drop date. However, feel free to voice a different opinion! (Users are also welcome to chime in!!)

I opened https://github.com/MDAnalysis/mdanalysis/issues/2303 so that we can come up with a plan for how to do this. I’ll start a discussion on the list and then we can summarize our plan in the issue.


If we decide on ditching 2.7 support, then at a minimum we need
- come up with a time line
- educate users
- make one last release that is useable with 2.7 and 3 (maybe 1.0 and then hit 2.0 with dropped Python 2?)
- slowly remove 2/3 compatibility code and tests
- use more modern 3 code where we can

Oliver



Tyler Reddy

unread,
Jul 23, 2019, 10:50:55 PM7/23/19
to mdnalys...@googlegroups.com
Mirroring the NumPy / SciPy approaches of a 2.7 support branch that is maintained until 2020 but not after seems reasonable to me.

If there is a release marked for that purpose soon then we'd probably want to be slow in removing compatibility code to facilitate backports if needed, obviously, until 2020.


--
You received this message because you are subscribed to the Google Groups "MDnalysis-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-devel/1EA17980-4252-4FFF-9899-B6581F29ACB7%40gmail.com.

Tyler Reddy

unread,
Jul 24, 2019, 2:54:34 PM7/24/19
to mdnalys...@googlegroups.com
One more thing is the recent (last day or two) NEP for standardizing the process of dropping Python support in the community: https://github.com/numpy/numpy/pull/14086

You may find that interesting.

Oliver Beckstein

unread,
Aug 7, 2019, 2:35:35 PM8/7/19
to MDnalysis-devel
Hi all,

What do you think about the following plan for the next few releases and end-of-life for Python 2:

- release 0.20.0 within the next month or so
- release 1.0.0 by the end of 2019;
  - 1.0 will be the last version of MDAnalysis that fully supports Python 2.7
  - 1.0 will be similar to 0.20 (i.e., we wouldn't include major annoying API breaks, there are lot of clean-up and deprecations that we would still want to do, see Milestone 1.0)
  - development on 1.x will cease; we will consider PRs that backport fixes but we will not officially support it after the release of 2.0
- release 2.0.0 soon after 1.0. This release will officially drop Python 2.7 support. We will slowly clean up the code. 2.0 can also include larger changes/deprecations.

Presumably the main issue for users will be the decision to start projects with 1.0 or wait for 2.0. In order to make the decision easier, we would really need to release 2.0 within a few days of 1.0. That would mean to already have a 2.0 branch waiting that contains any real API breaks so we would need to have a good idea which if any breaks we want. It might just be the case that there's nothing major. Anything listed under Milestone 1.0 looks like stuff that should really go into 1.0.

Comments, please?

Oliver







Tyler Reddy

unread,
Aug 21, 2019, 4:22:24 PM8/21/19
to mdnalys...@googlegroups.com
Sounds good I think. Obviously once we start using more recent Python 3.x relase-exclusive features like f-strings and so on backports become more & more annoying.

--
You received this message because you are subscribed to the Google Groups "MDnalysis-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-dev...@googlegroups.com.

Oliver Beckstein

unread,
Sep 9, 2019, 5:53:56 PM9/9/19
to MDnalysis-devel
Hi Devs,

There haven't been any real objections to my original plan of sun-setting Python 2.7 support, so I am proposing the following for final comments:


Deprecating Python 2.7 support

- released 0.20.x (possibly do a 0.21.0 for features that didn't make it into 0.20.x in time)

- release 1.0.0 by the end of 2019;
  - 1.0 will be the last version of MDAnalysis that fully supports Python 2.7
  - 1.0 will be similar to 0.20 (or 0.21) (i.e., we wouldn't include major annoying API breaks, there are lot of clean-up and deprecations that we would still want to do, see Milestone 1.0)

  - development on 1.x will cease; we will consider PRs that backport fixes but we will not officially support it after the release of 2.0
- release 2.0.0 soon after 1.0. This release will officially drop Python 2.7 support. We will slowly clean up the code. 2.0 can also include larger changes/deprecations.

Presumably the main issue for users will be the decision to start projects with 1.0 or wait for 2.0. In order to make the decision easier, we would really need to release 2.0 within a few days of 1.0. That would mean to already have a 2.0 branch waiting that contains any real API breaks so we would need to have a good idea which if any breaks we want. It might just be the case that there's nothing major. Anything listed under Milestone 1.0 looks like stuff that should really go into 1.0.

TODO

- [ ] Create a list of API breaks that we want to introduce in 2.0.0.
- [ ] Start a 2.0 branch.
- [ ] Write a blog post with the Python 2.7 sunsetting road map & publicize

Reply all
Reply to author
Forward
0 new messages