-
Notifications
You must be signed in to change notification settings - Fork 270
Remove Python 2 support #458
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
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
0684a4d
Remove Python 2/3 specific code.
groutr b052943
Remove compatibility import.
groutr cf9979a
Drop python 2 support.
groutr c12d2d7
Drop Python 2 compatibility.
groutr 5f5ca40
Remove Python 2 compatibility.
groutr bd3f3fe
Remove Python 2 compatibility.
groutr 3560b2b
Remove Python 2 compatibility.
groutr d567665
Remove errant if statement.
groutr 85326bd
Remove Python 2 compatibility.
groutr 80ae197
Fix missed items call.
groutr 50287b5
Update tests.
groutr 22ba48f
Fix Python specific tests.
groutr 2ddfd0e
Add map and filter to toolz namespace.
groutr eab69e6
Remove Python 2.7 from test travis.yml.
groutr 9f4ab2f
Fix sandbox tests.
groutr b281dde
Add missing reduce import.
groutr aa6d33e
Remove Python 3.4 support.
groutr e4416e0
"Hardcode" Python 3 support.
groutr 03becaa
Add PyPy3.
groutr 72cf975
Make pycodestyle happy.
groutr 373f620
Address another pycodestyle complaint.
groutr 268501d
Merge branch 'master' into python3
groutr 91edafa
Remove ending line.
groutr 66527cf
Update documentation.
groutr 8c64cca
Add pypy 7.2 to TravisCI.
groutr 1f52206
Pypy3.6 try 2.
groutr b1aad68
Add Python 3.8 to TravisCI.
groutr 6bfbe7b
Add Python 3.8 try 2.
groutr 62a2470
Revert "Add Python 3.8 try 2."
groutr 72f7972
Merge branch 'master' into python3
groutr 30b5e8e
Fix mapping import for Python 3.
groutr 3b5afe9
Revert "Remove Python 2/3 specific code."
groutr 4dea638
Fix DeprecationWarning.
groutr dce0edf
Add deprecation warning to compatibility module.
groutr 1517506
Remove compatibility tests
groutr cb345f7
Support Python >=3.5
groutr b05665d
Pycodestyle changes.
groutr cbfc621
Fix formatting of deprecation warning.
groutr bcddd8b
Update travis.yml
groutr 1e1842d
Update travis ci (pypy)
groutr aa658ed
Add Python 3.9-dev
groutr 81aafd6
Test with latest versions of pypy for Python 3.5/3.6
groutr f0aa082
Revert "Test with latest versions of pypy for Python 3.5/3.6"
groutr f44567d
Update readme for Python support.
groutr fa0887e
Remove python version specific no cover pragma.
groutr 85579a3
Import filterfalse and zip_longest into global namespace.
groutr b584395
Clean up __init__
groutr 996ec0c
Revert "Clean up __init__"
groutr 918918a
Fix pragma checks.
groutr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,4 +7,3 @@ omit = | |
| [report] | ||
| exclude_lines = | ||
| pragma: no cover | ||
| pragma: py$MAJOR_PYTHON_VERSION no cover | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,30 @@ | ||
| import warnings | ||
| warnings.warn("The toolz.compatibility module is no longer " | ||
| "needed in Python 3 and has been deprecated. Please " | ||
| "import these utilities directly from the standard library. " | ||
| "This module will be removed in a future release.", | ||
| category=DeprecationWarning) | ||
|
|
||
| import operator | ||
| import sys | ||
|
|
||
| PY3 = sys.version_info[0] > 2 | ||
| PY34 = sys.version_info[0] == 3 and sys.version_info[1] == 4 | ||
| PYPY = hasattr(sys, 'pypy_version_info') | ||
| PYPY = hasattr(sys, 'pypy_version_info') and PY3 | ||
|
|
||
| __all__ = ('map', 'filter', 'range', 'zip', 'reduce', 'zip_longest', | ||
| 'iteritems', 'iterkeys', 'itervalues', 'filterfalse', | ||
| 'PY3', 'PY34', 'PYPY') | ||
|
|
||
| if PY3: | ||
| map = map | ||
| filter = filter | ||
| range = range | ||
| zip = zip | ||
| from functools import reduce | ||
| from itertools import zip_longest | ||
| from itertools import filterfalse | ||
| iteritems = operator.methodcaller('items') | ||
| iterkeys = operator.methodcaller('keys') | ||
| itervalues = operator.methodcaller('values') | ||
| from collections.abc import Sequence, Mapping | ||
| else: | ||
| range = xrange | ||
| reduce = reduce | ||
| from itertools import imap as map | ||
| from itertools import ifilter as filter | ||
| from itertools import ifilterfalse as filterfalse | ||
| from itertools import izip as zip | ||
| from itertools import izip_longest as zip_longest | ||
| iteritems = operator.methodcaller('iteritems') | ||
| iterkeys = operator.methodcaller('iterkeys') | ||
| itervalues = operator.methodcaller('itervalues') | ||
| from collections import Sequence, Mapping | ||
|
|
||
| map = map | ||
| filter = filter | ||
| range = range | ||
| zip = zip | ||
| from functools import reduce | ||
| from itertools import zip_longest | ||
| from itertools import filterfalse | ||
| iteritems = operator.methodcaller('items') | ||
| iterkeys = operator.methodcaller('keys') | ||
| itervalues = operator.methodcaller('values') | ||
| from collections.abc import Sequence | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 keep all of these definitions instead of deleting them? Other packages may refer to
toolz.compatibility. Note that we don't need to use these intoolz, so no need to revert other modules that you've changed.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.
Good point. I'll restore them. Maybe a deprecation warning should be added to the module.