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 EOL Python 3.5 and 2.7 #1243

Merged
merged 9 commits into from Dec 31, 2020
Merged

Remove support for EOL Python 3.5 and 2.7 #1243

merged 9 commits into from Dec 31, 2020

Commits on Dec 30, 2020

  1. Run pyupgrade for minor code cleanup

    https://github.com/asottile/pyupgrade
    
    Cleanups:
    
    - set comprehension
    - drop default open() argument
    jdufresne committed Dec 30, 2020
    Copy the full SHA
    f12de9a View commit details
    Browse the repository at this point in the history
  2. Remove testing for EOL Python 3.5

    Python 3.5 went EOL 2020-09-30.
    
    For a list of supported Python versions, see:
    https://devguide.python.org/#status-of-python-branches
    
    For a list of EOL Python versions and their dates, see:
    https://devguide.python.org/devcycle/#end-of-life-branches
    jdufresne committed Dec 30, 2020
    Copy the full SHA
    de00f69 View commit details
    Browse the repository at this point in the history
  3. Remove support for EOL Python 2.7

    Python 2.7 went EOL 2020-01-01.
    
    For a list of supported Python versions, see:
    https://devguide.python.org/#status-of-python-branches
    
    For a list of EOL Python versions and their dates, see:
    https://devguide.python.org/devcycle/#end-of-life-branches
    
    Removing support reduces compatibility code, CI resources, and other
    maintenance concerns. As well, can begin to take advantage of newer
    Python features and patterns.
    
    Cleanups:
    
    - Use f-strings
    - Drop __future__ imports
    - Drop file encoding cookies "# coding: utf-8"
    - Drop uses of six
    - Use stdlib TemporaryDirectory and unittest.mock
    - Use newer metaclass syntax
    - Drop now unnecessary fs_str() function
    - Drop inheritance from "object", all Python 3 classes are new-style
      classes
    - Remove unnecessary coerce to string/bytes calls
    - Use updated subprocess APIs
    jdufresne committed Dec 30, 2020
    Copy the full SHA
    78ae8fb View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    921bbfd View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    b81f222 View commit details
    Browse the repository at this point in the history
  6. Simplify tests using standard pytest tooling

    - Monkey patch sys.stdin using io.StringIO(). This avoids the need to
      use yet-another-tool rather than the tools providing by the test
      library.
    
    - This reduces indentation to slightly improve readability.
    
    - Allows for more accurate assertion of stdout and stderr.
    jdufresne committed Dec 30, 2020
    Copy the full SHA
    eac81c5 View commit details
    Browse the repository at this point in the history
  7. Prefer capsys instead of capfd

    capfd was used to workaround a compatibility issue between Python 2,
    Windows and Click. With Python 2 gone, can use capsys.
    jdufresne committed Dec 30, 2020
    Copy the full SHA
    d9ade3c View commit details
    Browse the repository at this point in the history
  8. Use more specific JSONDecodeError

    Introduced in Python 3.5
    jdufresne committed Dec 30, 2020
    Copy the full SHA
    a9575ef View commit details
    Browse the repository at this point in the history
  9. Add pathlib support

    jdufresne committed Dec 30, 2020
    Copy the full SHA
    f63953e View commit details
    Browse the repository at this point in the history