-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove support for Python 3.3 #943
Conversation
fb609fa
to
8265438
Compare
8265438
to
2db13e9
Compare
2db13e9
to
5127203
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good, but I don't like the fact that we are changing the release notes for older releases.
So this is an abstention
src/twisted/__init__.py
Outdated
elif version >= (3, 0) and version < (3, 3): | ||
raise ImportError("Twisted on Python 3 requires Python 3.3 or later.") | ||
|
||
from twisted._checkrequirements import _checkRequirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this to _setup.py and not call each time we import twisted? ... and then we don't need the extra exec code in setup.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I moved the check into _setup.py
@@ -6,6 +6,9 @@ http://twistedmatrix.com/trac/ticket/<number> | |||
Twisted 17.9.0 (2017-09-23) | |||
=========================== | |||
|
|||
This is the last Twisted release where Python 3.3 is supported, on any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like we are re-writing history here.
I think that we should not touch previous release notes.
So we should just update the release notes for the next (future) release and drop support after that...
but I am not familiar with the process of dropping a python version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Python 2.6 support was dropped, the NEWS.rst file was modified after the fact to update this: http://twistedmatrix.com/trac/ticket/8651
Since that seemed to be OK, I did it here.
Dropping support for a Python release happens so infrequently, that I thought it was OK.
src/twisted/_checkrequirements.py
Outdated
# See LICENSE for details. | ||
|
||
def _checkRequirements(): | ||
# Don't allow the user to run a version of Python we don't support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that this is a copy/paste, but maybe take the oportunity to clean this code a bit and for example convert this comment into a docstring.
And why the local import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I made it a docstring
Codecov Report
@@ Coverage Diff @@
## trunk #943 +/- ##
==========================================
- Coverage 91.91% 91.5% -0.41%
==========================================
Files 841 841
Lines 149154 149149 -5
Branches 13070 13069 -1
==========================================
- Hits 137092 136484 -608
- Misses 9969 10547 +578
- Partials 2093 2118 +25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only minor comments.
Since I am the only one commenting on the release notes I think that is OK to do it this way and hurry up the removal.
I think that this was under review for long enough.
Based on "no news is good news" I guess that nobody is against the change and we should merge it.
Many thanks for working on this.
src/twisted/python/_setup.py
Outdated
""" | ||
Fail if we detect a version of Python we don't support. | ||
""" | ||
import sys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this import can be removed
https://twistedmatrix.com/trac/ticket/9352
Python 3.3 has been marked as EOL on September 29, 2017:
https://www.python.org/dev/peps/pep-0398/#x-end-of-life
I would suggest that Twisted drop support for Python 3.3.
Twisted would now support:
Twisted 2.7, and Twisted 3.4-3.6+
According to this spreadsheet: https://docs.google.com/spreadsheets/d/1JSX8fBmPb84emTmV0Kmyf0_r6R0kZM0h9Wdm91tn7Kg/edit#gid=0
Python 3.3 came with OpenSUSE 13.1.
Python 3.4 is in Debian 8, Ubuntu 14.04, Fedora 21