Skip to content
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

Merged
merged 17 commits into from
Jan 6, 2018
Merged

Remove support for Python 3.3 #943

merged 17 commits into from
Jan 6, 2018

Conversation

rodrigc
Copy link
Contributor

@rodrigc rodrigc commented Dec 18, 2017

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

@rodrigc rodrigc force-pushed the 9352-rodrigc-no-py33 branch from fb609fa to 8265438 Compare December 18, 2017 00:18
@rodrigc rodrigc closed this Dec 18, 2017
@rodrigc rodrigc reopened this Dec 18, 2017
@rodrigc rodrigc force-pushed the 9352-rodrigc-no-py33 branch from 8265438 to 2db13e9 Compare December 18, 2017 00:33
@rodrigc rodrigc force-pushed the 9352-rodrigc-no-py33 branch from 2db13e9 to 5127203 Compare December 18, 2017 00:45
Copy link
Member

@adiroiban adiroiban left a 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

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
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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.

# See LICENSE for details.

def _checkRequirements():
# Don't allow the user to run a version of Python we don't support.
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link

codecov bot commented Jan 3, 2018

Codecov Report

Merging #943 into trunk will decrease coverage by 0.4%.
The diff coverage is 88.88%.

@@            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

Copy link
Member

@adiroiban adiroiban left a 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.

"""
Fail if we detect a version of Python we don't support.
"""
import sys
Copy link
Member

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

@rodrigc rodrigc closed this Jan 4, 2018
@rodrigc rodrigc reopened this Jan 4, 2018
@rodrigc rodrigc merged commit db5e03e into trunk Jan 6, 2018
@rodrigc rodrigc deleted the 9352-rodrigc-no-py33 branch January 6, 2018 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants