From 99948c387702496274147a71f8bf0e600569f6b5 Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Fri, 19 Oct 2018 16:29:23 -0700 Subject: [PATCH 1/7] Update docs for v0.17.x release --- docs/credits.rst | 40 +++++++++++++++++++++++++++++----------- docs/whatsnew.rst | 27 +++++++++++++++++++++------ 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/docs/credits.rst b/docs/credits.rst index c713d36d..5288a91c 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -30,33 +30,40 @@ The software is distributed under an MIT licence. The text is as follows .. _sponsor: -Sponsor -------- +Sponsors +-------- Python Charmers Pty Ltd, Australia, and Python Charmers Pte Ltd, Singapore. http://pythoncharmers.com +Pinterest https://opensource.pinterest.com/ .. _authors: Authors ------- -Python-Future is written and maintained by Ed Schofield with the help of -various contributors: +Python-Future is written and maintained by Ed Schofield and Jordan Adler +with the help of various contributors: -Development Lead -~~~~~~~~~~~~~~~~ +Development Leads +~~~~~~~~~~~~~~~~~ - Ed Schofield +- Jordan Adler Patches ~~~~~~~ +- Grant Bakker - Jacob Beck +- Nate Bogdanowicz - Denis Cornehl - Nicolas Delaby +- Jon Dufresne - Corey Farwell - Eric Firing +- Maximilian Hils +- Martijn Jacobs - Michael Joseph - Waldemar Kornewald - Alexey Kotlyarov @@ -65,26 +72,37 @@ Patches - Joshua Landau - German Larrain - Chris Lasher +- Calum Lind +- Jon Parise +- Matthew Parnell +- Miga Purg +- Éloi Rivard - Elliott Sales de Andrade +- Yury Selivanov - Tim Shaffer +- Louis Sautier - Daniel Szoska +- Flaviu Tamas - Jeff Tratner - Tim Tröndle - Brad Walker -- Mystic-Mirage (GitHub) -- str4d (GitHub) -- 9seconds (GitHub) -- Varriount (GitHub) +- cclaus (GiHub user) +- lsm (GiHub user) +- Mystic-Mirage (GitHub user) +- str4d (GitHub user) +- 9seconds (GitHub user) +- Varriount (GitHub user) Suggestions and Feedback ~~~~~~~~~~~~~~~~~~~~~~~~ - Chris Adams - Martijn Faassen +- Joe Gordon - Lion Krischer - Danielle Madeley - Val Markovic -- wluebbe (GitHub) +- wluebbe (GitHub user) Other Credits diff --git a/docs/whatsnew.rst b/docs/whatsnew.rst index 46b49bbf..b1ee5826 100644 --- a/docs/whatsnew.rst +++ b/docs/whatsnew.rst @@ -3,14 +3,29 @@ What's New ********** -.. _whats-new-0.16.x: - -What's new in version 0.16.1 (unreleased) +What's new in version 0.17 (2018-10-19) ========================================= -This is a minor bug-fix release: - -- Fix `from collections import ChainMap` after install_aliases() (issue #226) +This is a major bug-fix release, including: + +- Fix ``from collections import ChainMap`` after install_aliases() (issue #226) +- Fix multiple import from ``__future__`` bug in futurize (issue #113) +- Add support for proper %s formatting of newbytes +- Properly implement iterator protocol for newrange object +- Fix ``past.translation`` on read-only file systems +- Fix Tkinter import bug introduced in Python 2.7.4 (issue #262) +- Correct TypeError to ValueError in a specific edge case for newrange +- Support inequality tests betwen newstrs and newbytes +- Add type check to __get__ in newsuper +- Fix fix_divsion_safe to support better conversion of complex expressions, and + skip obvious float division. + +As well as a number of corrections to a variety of documentation, and updates to +test infrastructure. + +In this release, we also drop official support for Py2.6 and Py3.3. They should +still work, but support is no longer guaranteed, and breaking changes will be +introduced in subsequent versions. What's new in version 0.16.0 (2016-10-27) From 76255c41868f2e7726c637851bb75499fa279883 Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Fri, 19 Oct 2018 16:41:20 -0700 Subject: [PATCH 2/7] update --- README.rst | 8 +++++--- docs/credits.rst | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index e6801d90..d5038efc 100644 --- a/README.rst +++ b/README.rst @@ -264,12 +264,14 @@ For more info, see :ref:`translation`. Licensing --------- -:Author: Ed Schofield +:Author: Ed Schofield, Jordan M. Adler, et al :Copyright: 2013-2016 Python Charmers Pty Ltd, Australia. -:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte - Ltd, Singapore. http://pythoncharmers.com +:Sponsors: Python Charmers Pty Ltd, Australia, and Python Charmers Pte + Ltd, Singapore. http://pythoncharmers.com + + Pinterest https://opensource.pinterest.com/ :Licence: MIT. See ``LICENSE.txt`` or `here `_. diff --git a/docs/credits.rst b/docs/credits.rst index 5288a91c..28b220ff 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -42,14 +42,14 @@ Pinterest https://opensource.pinterest.com/ Authors ------- -Python-Future is written and maintained by Ed Schofield and Jordan Adler +Python-Future is written and maintained by Ed Schofield and Jordan M. Adler with the help of various contributors: Development Leads ~~~~~~~~~~~~~~~~~ - Ed Schofield -- Jordan Adler +- Jordan M. Adler Patches ~~~~~~~ From bce91cef408fca83f7078cdbdf0eb9810b7657c3 Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Tue, 23 Oct 2018 16:20:32 -0700 Subject: [PATCH 3/7] Update copyright notices to 2018; Re-add Py2.6 and Py3.3 support; Update credits --- .travis.yml | 4 ++++ LICENSE.txt | 2 +- README.rst | 2 +- docs/compatible_idioms.rst | 2 +- docs/conf.py | 2 +- docs/credits.rst | 19 ++++++------------- .../Writing Python 2-3 compatible code.ipynb | 2 +- docs/whatsnew.rst | 5 ----- futurize.py | 2 +- pasteurize.py | 2 +- setup.py | 4 +++- src/future/__init__.py | 4 ++-- src/past/__init__.py | 2 +- tox.ini | 2 +- 14 files changed, 24 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 684ac64a..13dd540d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,12 @@ cache: pip matrix: include: + - python: 2.6 + env: TOXENV=py26 - python: 2.7 env: TOXENV=py27 + - python: 3.3 + env: TOXENV=py33 - python: 3.4 env: TOXENV=py34 - python: 3.5 diff --git a/LICENSE.txt b/LICENSE.txt index c4dfd4b0..d41c85d1 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2013-2016 Python Charmers Pty Ltd, Australia +Copyright (c) 2013-2018 Python Charmers Pty Ltd, Australia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.rst b/README.rst index d5038efc..807ea2a0 100644 --- a/README.rst +++ b/README.rst @@ -266,7 +266,7 @@ Licensing :Author: Ed Schofield, Jordan M. Adler, et al -:Copyright: 2013-2016 Python Charmers Pty Ltd, Australia. +:Copyright: 2013-2018 Python Charmers Pty Ltd, Australia. :Sponsors: Python Charmers Pty Ltd, Australia, and Python Charmers Pte Ltd, Singapore. http://pythoncharmers.com diff --git a/docs/compatible_idioms.rst b/docs/compatible_idioms.rst index 9fa0a19e..52a6a8b0 100644 --- a/docs/compatible_idioms.rst +++ b/docs/compatible_idioms.rst @@ -3,7 +3,7 @@ Cheat Sheet: Writing Python 2-3 compatible code =============================================== -- **Copyright (c):** 2013-2016 Python Charmers Pty Ltd, Australia. +- **Copyright (c):** 2013-2018 Python Charmers Pty Ltd, Australia. - **Author:** Ed Schofield. - **Licence:** Creative Commons Attribution. diff --git a/docs/conf.py b/docs/conf.py index cce52ff6..72911405 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,7 +51,7 @@ # General information about the project. project = u'Python-Future' -copyright = u'2013-2016, Python Charmers Pty Ltd, Australia' +copyright = u'2013-2018, Python Charmers Pty Ltd, Australia' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/docs/credits.rst b/docs/credits.rst index 28b220ff..3cf1c9c8 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -8,7 +8,7 @@ Licence The software is distributed under an MIT licence. The text is as follows (from ``LICENSE.txt``):: - Copyright (c) 2013-2016 Python Charmers Pty Ltd, Australia + Copyright (c) 2013-2018 Python Charmers Pty Ltd, Australia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -39,20 +39,13 @@ Pinterest https://opensource.pinterest.com/ .. _authors: +Maintainer +---------- +Python-Future is currently maintained by Jordan M. Adler . + Authors ------- - -Python-Future is written and maintained by Ed Schofield and Jordan M. Adler -with the help of various contributors: - -Development Leads -~~~~~~~~~~~~~~~~~ - -- Ed Schofield -- Jordan M. Adler - -Patches -~~~~~~~ +Python-Future is largely written by Ed Schofield with the help of various contributors: - Grant Bakker - Jacob Beck diff --git a/docs/notebooks/Writing Python 2-3 compatible code.ipynb b/docs/notebooks/Writing Python 2-3 compatible code.ipynb index 8ac0bd80..a3e5e156 100644 --- a/docs/notebooks/Writing Python 2-3 compatible code.ipynb +++ b/docs/notebooks/Writing Python 2-3 compatible code.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "- **Copyright (c):** 2013-2016 Python Charmers Pty Ltd, Australia.\n", + "- **Copyright (c):** 2013-2018 Python Charmers Pty Ltd, Australia.\n", "- **Author:** Ed Schofield.\n", "- **Licence:** Creative Commons Attribution.\n", "\n", diff --git a/docs/whatsnew.rst b/docs/whatsnew.rst index b1ee5826..1cde2a44 100644 --- a/docs/whatsnew.rst +++ b/docs/whatsnew.rst @@ -23,11 +23,6 @@ This is a major bug-fix release, including: As well as a number of corrections to a variety of documentation, and updates to test infrastructure. -In this release, we also drop official support for Py2.6 and Py3.3. They should -still work, but support is no longer guaranteed, and breaking changes will be -introduced in subsequent versions. - - What's new in version 0.16.0 (2016-10-27) ========================================== diff --git a/futurize.py b/futurize.py index 5f1a7732..41080cf0 100755 --- a/futurize.py +++ b/futurize.py @@ -13,7 +13,7 @@ Licensing --------- -Copyright 2013-2016 Python Charmers Pty Ltd, Australia. +Copyright 2013-2018 Python Charmers Pty Ltd, Australia. The software is distributed under an MIT licence. See LICENSE.txt. """ diff --git a/pasteurize.py b/pasteurize.py index db7931ab..c0bd7e09 100755 --- a/pasteurize.py +++ b/pasteurize.py @@ -12,7 +12,7 @@ Licensing --------- -Copyright 2013-2016 Python Charmers Pty Ltd, Australia. +Copyright 2013-2018 Python Charmers Pty Ltd, Australia. The software is distributed under an MIT licence. See LICENSE.txt. """ diff --git a/setup.py b/setup.py index 05ee3243..2f7b36a3 100755 --- a/setup.py +++ b/setup.py @@ -96,8 +96,10 @@ CLASSIFIERS = [ "Programming Language :: Python", "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", @@ -174,7 +176,7 @@ packages=PACKAGES, package_data=PACKAGE_DATA, include_package_data=True, - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", + python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*", classifiers=CLASSIFIERS, **setup_kwds ) diff --git a/src/future/__init__.py b/src/future/__init__.py index aee268a9..211fb43b 100644 --- a/src/future/__init__.py +++ b/src/future/__init__.py @@ -76,7 +76,7 @@ Licensing --------- -Copyright 2013-2016 Python Charmers Pty Ltd, Australia. +Copyright 2013-2018 Python Charmers Pty Ltd, Australia. The software is distributed under an MIT licence. See LICENSE.txt. """ @@ -84,7 +84,7 @@ __title__ = 'future' __author__ = 'Ed Schofield' __license__ = 'MIT' -__copyright__ = 'Copyright 2013-2016 Python Charmers Pty Ltd' +__copyright__ = 'Copyright 2013-2018 Python Charmers Pty Ltd' __ver_major__ = 0 __ver_minor__ = 17 __ver_patch__ = 0 diff --git a/src/past/__init__.py b/src/past/__init__.py index 06293a89..3b5d9db1 100644 --- a/src/past/__init__.py +++ b/src/past/__init__.py @@ -80,7 +80,7 @@ Licensing --------- -Copyright 2013-2016 Python Charmers Pty Ltd, Australia. +Copyright 2013-2018 Python Charmers Pty Ltd, Australia. The software is distributed under an MIT licence. See LICENSE.txt. """ diff --git a/tox.ini b/tox.ini index 96f949a3..2f0b3499 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py34,py35,py36,py37 +envlist = py26,py27,py33,py34,py35,py36,py37 [testenv] deps = pytest From 3739f92feed3d05663eda367530d1e71c41a6b5d Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Tue, 23 Oct 2018 16:48:15 -0700 Subject: [PATCH 4/7] Peg versions of test tools --- .travis.yml | 5 ++++- tox.ini | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13dd540d..eb28e459 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,10 @@ matrix: sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069) install: - - pip install tox + - pip install tox==2.9.1 + - pip install virtualenv==15.2.0 + - pip install py==1.4.30 + - pip install pluggy==0.5.2 before_script: # Run flake8 tests only on Python 2.7 and 3.7... diff --git a/tox.ini b/tox.ini index 2f0b3499..b18dfdd1 100644 --- a/tox.ini +++ b/tox.ini @@ -2,5 +2,7 @@ envlist = py26,py27,py33,py34,py35,py36,py37 [testenv] -deps = pytest +deps = + pytest + unittest2 commands = pytest {posargs} From d1c72419ed17d84b8126df300051f4ef642e7ef7 Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Tue, 23 Oct 2018 16:55:41 -0700 Subject: [PATCH 5/7] Add importlib as dep for py26 --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index b18dfdd1..94e95948 100644 --- a/tox.ini +++ b/tox.ini @@ -5,4 +5,5 @@ envlist = py26,py27,py33,py34,py35,py36,py37 deps = pytest unittest2 + importlib commands = pytest {posargs} From 0bb7b077b347c3be3b9adf58dd5ea76a416bc1b2 Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Tue, 23 Oct 2018 16:58:34 -0700 Subject: [PATCH 6/7] iterate --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 94e95948..f5c013f8 100644 --- a/tox.ini +++ b/tox.ini @@ -5,5 +5,5 @@ envlist = py26,py27,py33,py34,py35,py36,py37 deps = pytest unittest2 - importlib + py26: importlib commands = pytest {posargs} From dadf17bd43e9b723108c61d02490022b59aecbe6 Mon Sep 17 00:00:00 2001 From: Jordan Adler Date: Thu, 25 Oct 2018 15:21:01 -0700 Subject: [PATCH 7/7] Fix py2.6 compat issues --- src/future/backports/misc.py | 4 ++-- tests/test_future/test_futurize.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/future/backports/misc.py b/src/future/backports/misc.py index e883d335..ef752078 100644 --- a/src/future/backports/misc.py +++ b/src/future/backports/misc.py @@ -817,7 +817,7 @@ def __delitem__(self, key): try: del self.maps[0][key] except KeyError: - raise KeyError('Key not found in the first mapping: {!r}'.format(key)) + raise KeyError('Key not found in the first mapping: {0!r}'.format(key)) def popitem(self): 'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.' @@ -831,7 +831,7 @@ def pop(self, key, *args): try: return self.maps[0].pop(key, *args) except KeyError: - raise KeyError('Key not found in the first mapping: {!r}'.format(key)) + raise KeyError('Key not found in the first mapping: {0!r}'.format(key)) def clear(self): 'Clear maps[0], leaving maps[1:] intact.' diff --git a/tests/test_future/test_futurize.py b/tests/test_future/test_futurize.py index 9ba53ee6..5549a010 100644 --- a/tests/test_future/test_futurize.py +++ b/tests/test_future/test_futurize.py @@ -1194,7 +1194,7 @@ def total_count(self): x = 3 / 2 y = 3. / 2 - foo = range(100) + foo = list(range(100)) assert x == 1 and isinstance(x, int) assert y == 1.5 and isinstance(y, float) a = 1 + foo[len(foo) / 2]