bottle icon indicating copy to clipboard operation
bottle copied to clipboard

Removing Python 2 support from 0.13

Open defnull opened this issue 4 years ago • 12 comments

This is the integration branch for python 2 removal. Please submit pull requests against this branch and discuss the entire process here.

defnull avatar Jan 01 '20 16:01 defnull

Since Bottle-0.12 will be the last release supporting Python 2 (2.5+ actually) and very old versions of Python 3 (3.2+), it will become an LTS release and will be maintained (security patches only) for a bit longer than usual. This allows us to drop support for old python versions without hurting existing users too much.

I'm thinking about skipping 0.13 and move forward to 0.14 in a single step to make it more clear that there are breaking changes this time. Spamming all 0.12/Py2 users with a deprecation warning is a bit too much I think. Some people can't update, even if they want to.

defnull avatar Jan 01 '20 17:01 defnull

@defnull this is very welcome. According to your own roadmap the aren't many blocking issues for 0.13. but it's been so long since the first map was written I'm not sure it's even relevant. It's a good sign for people to get a new release out. Please go ahead and do this ASAP.

oz123 avatar Jan 01 '20 18:01 oz123

@defnull also, please remove the classification from setup.py https://github.com/bottlepy/bottle/blob/8561ffbc2ed2b16b4f7f90520d148e37e251d107/setup.py#L34.

You should also drop python 3.4. it's no longer maintained.

oz123 avatar Jan 01 '20 18:01 oz123

Also remember to remove unsupported targets from the root Makefile. Edit: Or maybe keeping those if the plan is to have 2.7 in an LTS state.

stigok avatar Jan 03 '20 11:01 stigok

The release-0.12 branch has its own Makefile and test suite. We can remove any trace of 2.7 or 3.4 support from the master branch.

defnull avatar Jan 03 '20 13:01 defnull

It has been a year... Conflicts.

cclauss avatar Dec 31 '20 18:12 cclauss

Yes, it probably wasn't the best idea to start with this before 2.7 is actually EOL and expect that there are no conflicts.

defnull avatar Jan 01 '21 15:01 defnull

All declarations like

class A(object):

may be reduced to

class A:

SergBobrovsky avatar Jan 01 '21 16:01 SergBobrovsky

@SergBobrovsky That is an optional change but can be automated via tools like https://github.com/asottile/pyupgrade

cclauss avatar Jan 01 '21 16:01 cclauss

remove

from __future__ import print_function

SergBobrovsky avatar Jan 01 '21 17:01 SergBobrovsky

Also automated by pyupgrade. Give it a try to see the changes that it would make.

cclauss avatar Jan 01 '21 18:01 cclauss

Hey @defnull what's the status on this work? I'm happy to contribute but I saw your comment elsewhere stating you'd prefer this be done in smaller pieces?

clavedeluna avatar Sep 07 '22 19:09 clavedeluna