Skip to content

Commit

Permalink
Added py37/38, dropped py34, Travis, requirements
Browse files Browse the repository at this point in the history
Details:

* Added support for Python 3.7+3.8 in setup.py classifiers and python_requires.

* Dropped support for Python 3.4 in setup.py classifiers and python_requires.

* Removed old circumventions for Travis issues.

* Added blank lines between job envs in Travis file.

* Enabled the typical Travis job envs.

* Merged the minimum versions defined in cookiecutter-python, for the subset
  of packages used here.

Signed-off-by: Andreas Maier <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed May 4, 2020
1 parent 0bc9a39 commit 09fb730
Show file tree
Hide file tree
Showing 6 changed files with 392 additions and 271 deletions.
136 changes: 65 additions & 71 deletions .travis.yml
Expand Up @@ -5,126 +5,135 @@
notifications:
email: false

sudo: required

# We define the job matrix explicitly, in order to minimize the
# combinations.
# For OS-X, using an explicit matrix is required, because Travis at
# this point only has half-baked support for Python on OS-X that does
# not work. Also, on OS-X, it needs to be invoked with language=generic
# and an empty 'python' variable in order to prevent that Travis attempts
# to install Python.
# TODO: Figure out how specific versions of Python 3.x can be used with OS-X

# When defining the job matrix explicitly, there are Travis environments
# that produce an additional default job. See these Travis issues:
# https://github.com/travis-ci/travis-ci/issues/1228
# https://github.com/travis-ci/travis-ci/issues/4681
# https://github.com/travis-ci/travis-ci/issues/9843
# The public Travis does not seem to have this issue anymore,
# but Travis@IBM does have this issue (as of 9/2018). The workaround for
# this issue is to define variables globally and to exclude this same
# variable value in the matrix definition. Experiments have shown that
# not all variable combinations work. Using a combination of 'language'
# and 'os' set to the default values works.

# See note about explicit job matrix, above.
language: ruby
os: linux

matrix:

# See note about explicit job matrix, above.
exclude:
- language: ruby
- os: linux
# We define the job matrix explicitly, in order to have a minimum number of
# useful combinations. The disabled combinations will be enabled in a specific
# branch that does not run for every change.
jobs:

include:
# - os: linux
# language: python
# python: "2.7"
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip

- os: linux
language: python
python: "2.7"
env:
- PACKAGE_LEVEL=latest
- PACKAGE_LEVEL=minimum
cache: pip

- os: linux
language: python
python: "3.5"
python: "2.7"
env:
- PACKAGE_LEVEL=minimum
- PACKAGE_LEVEL=latest
cache: pip

# - os: linux
# language: python
# python: "3.5"
# env:
# - PACKAGE_LEVEL=latest
# - PACKAGE_LEVEL=minimum
# cache: pip

- os: linux
language: python
python: "3.5"
env:
- PACKAGE_LEVEL=latest
cache: pip

# - os: linux
# language: python
# python: "3.6"
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip

# - os: linux
# language: python
# python: "3.6"
# env:
# - PACKAGE_LEVEL=latest
# cache: pip

# - os: linux
# dist: xenial
# sudo: required
# language: python
# python: "3.7"
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip

# - os: linux
# dist: xenial
# language: python
# python: "3.7"
# env:
# - PACKAGE_LEVEL=latest
# cache: pip

- os: linux
dist: xenial
sudo: required
language: python
python: "3.7"
python: "3.8"
env:
- PACKAGE_LEVEL=minimum
cache: pip

- os: linux
dist: xenial
language: python
python: "3.8"
env:
- PACKAGE_LEVEL=latest
cache: pip

# - os: linux
# language: python
# python: "pypy-5.3.1" # Python 2.7.10
# python: "pypy" # currently Python 2.7.13, PyPy 7.1.1
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip

# - os: linux
# language: python
# python: "pypy" # currently Python 2.7.13, PyPy 7.1.1
# env:
# - PACKAGE_LEVEL=latest

# - os: linux
# language: python
# python: "pypy3" # currently Python 3.6.1, PyPy 7.1.1-beta0
# env:
# - PACKAGE_LEVEL=minimum

# - os: linux
# language: python
# python: "pypy-5.3.1" # Python 2.7.10
# python: "pypy3" # currently Python 3.6.1, PyPy 7.1.1-beta0
# env:
# - PACKAGE_LEVEL=latest

# - os: osx
# language: generic
# python:
# env:
# - PACKAGE_LEVEL=minimum
# - PYTHON=2
# cache: pip
- os: osx
language: generic
python:
env:
- PACKAGE_LEVEL=minimum
- PYTHON=2
cache: pip

# - os: osx
# language: generic
# python:
# env:
# - PACKAGE_LEVEL=latest
# - PYTHON=2
# cache: pip

# - os: osx
# language: generic
# python:
# env:
# - PACKAGE_LEVEL=minimum
# - PYTHON=3
# cache: pip

# - os: osx
# language: generic
# python:
Expand All @@ -136,21 +145,6 @@ matrix:
before_install:
- env | sort

# The following statement is a workaround to leave an OS-X job
# when running on Linux. That happens on Travis@IBM which does not
# have OS-X support but still runs os=osx on Linux.
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$_system_type" == "Linux" ]]; then
echo "Exiting from OS-X job running on Linux";
exit;
fi

# The following statement is a safety net in case the matrix exclusion
# does not work for some reason.
- if [[ "$TRAVIS_LANGUAGE" == "ruby" ]]; then
echo "Exiting from unwanted default Ruby job";
exit;
fi

- if [[ "$TRAVIS_BRANCH" == "manual-ci-run" ]]; then
export _NEED_REBASE=true;
fi
Expand Down
158 changes: 96 additions & 62 deletions dev-requirements.txt
@@ -1,11 +1,10 @@
# Pip requirements file for Ansible zhmc modules development dependencies.
# Pip requirements file for development.
#
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.

# Make sure that the package versions in minimum-constraints.txt are also
# the minimum versions required in requirements.txt and dev-requirements.txt.
# of appearance.
#
# Make sure that the minimum versions required in this file are consistent with
# the minimum versions specified in minimum-constraints.txt.


# Runtime dependencies:
Expand All @@ -14,68 +13,103 @@

# Direct dependencies:

# Ansible validate-modules (no imports, invoked via validate-modules script)
mock>=2.0.0
voluptuous>=0.10.2

# Unit test (imports into testcases):
pytest>=3.2.0 # MIT

# Unit test (no imports, invoked via py.test script):
# TODO: Remove the pinning of the pytest-cov version again once issue
# https://github.com/z4r/python-coveralls/issues/66
# is resolved.
# Background: pytest-cov 2.6.0 has increased the version
# requirement for the coverage package from >=3.7.1 to
# >=4.4, which is in conflict with the version requirement
# defined by the python-coveralls package for coverage==4.0.3.
pytest-cov>=2.4.0,<2.6 # BSD
packaging>=17.0
funcsigs>=1.0.2; python_version < '3.3'
# pytest 5.0.0 has removed support for Python < 3.5
# pytest 4.3.1 solves an issue on Python 3 with minimum package levels
pytest>=4.3.1,<5.0.0; python_version < '3.5'
pytest>=4.3.1; python_version >= '3.5' and python_version <= '3.6'
pytest>=4.4.0; python_version >= '3.7'
testfixtures>=6.9.0
# colorama 0.4.0 removed support for Python 3.4
colorama>=0.3.9,<0.4.0; python_version <= '3.4'
colorama>=0.4.0; python_version >= '3.5'
# mock>=2.0.0
# requests>=2.20.1
requests-mock>=1.6.0
requests-toolbelt>=0.7.0
importlib-metadata<1,>=0.12; python_version <= '3.7'
pytz>=2016.10

# Unit test (indirect dependencies):
# Pluggy 0.12.0 has a bug causing pytest plugins to fail loading on py38
pluggy>=0.7.1; python_version >= '2.7' and python_version <= '3.6'
pluggy>=0.13.0; python_version >= '3.7'
decorator>=4.0.11

# Coverage reporting (no imports, invoked via coveralls script):
python-coveralls>=2.9.0 # Apache-2.0
# coverage 5.0 has removed support for py34
coverage>=4.5.2,<5.0
# python-coveralls 2.9.2 no longer has requirement coverage==4.0.3.
python-coveralls>=2.9.2
pytest-cov>=2.7.0
# PyYAML is pulled in by python-coveralls and PyYAML 5.3 has removed support for Python 3.4
PyYAML>=5.1; python_version == '2.7'
PyYAML>=5.1,<5.3; python_version == '3.4'
PyYAML>=5.1; python_version > '3.4'

# Safety CI by pyup.io
safety>=1.8.4
# dparse 0.5.0 has an infinite recursion issue on Python 2.7,
# see https://github.com/pyupio/dparse/issues/46
dparse>=0.4.1,<0.5.0; python_version == '2.7'
dparse>=0.4.1; python_version >= '3.4'

# Tox
tox>=2.5.0

# Sphinx (no imports, invoked via sphinx-build script):
Sphinx>=1.7.6 # BSD
# Keep in sync with rtd-requirements.txt
Sphinx>=1.7.6
sphinx-git>=10.1.1
GitPython>=2.1.1
sphinxcontrib-fulltoc>=1.2.0
sphinxcontrib-websupport>=1.1.2
# Pygments 2.4.0 has removed support for Python 3.4
Pygments>=2.1.3; python_version == '2.7'
Pygments>=2.1.3,<2.4.0; python_version == '3.4'
Pygments>=2.1.3; python_version >= '3.5'

# PyLint (no imports, invoked via pylint script)
# Pylint requires astroid
# Pylint 1.x / astroid 1.x supports py27 and py34/35/36
# Pylint 2.0 / astroid 2.0 removed py27, added py37
# Pylint 2.4 / astroid 2.3 removed py34
pylint>=1.6.4,<2.0.0; python_version == '2.7'
pylint>=2.2.2,<2.4; python_version == '3.4'
pylint>=2.4.4; python_version >= '3.5'
astroid>=1.4.9,<2.0.0; python_version == '2.7'
astroid>=2.1.0,<2.3; python_version == '3.4'
astroid>=2.3.3; python_version >= '3.5'
# Pinning typed-ast to <1.4.0 for Python 3.4 because it started removing
# Python 3.4 support.
# Requiring typed-ast>=1.4.0 for Python 3.8 since it addresses compile errors
# with missing pgenheaders.h and duplicate definition of a struct.
typed-ast>=1.3.0,<1.4.0; python_version == '3.4' and implementation_name == "cpython"
typed-ast>=1.3.0; python_version >= '3.5' and python_version < '3.8' and implementation_name == "cpython"
typed-ast>=1.4.0; python_version >= '3.8' and implementation_name == "cpython"

# Flake8 (no imports, invoked via flake8 script):
flake8>=3.7.0 # MIT
# Note: Flake8 requires pyflakes>=2.1.0 and pycodestyle>=2.5.0, but for reasons
# not understood, the resulting installation has pycodestyle 2.2.0,
# causing issues. Workaround is to specify these dependencies here.
pyflakes>=2.1.0 # MIT
pycodestyle>=2.5.0 # MIT
# Flake8 and dependents (no imports, invoked via flake8 script):
flake8>=3.7.9
mccabe>=0.6.0
pycodestyle>=2.5.0
# flake8 3.7.9 pins pyflakes<2.2.0, and since pyflakes 2.2.0 was released this needs to be repeated here
pyflakes>=2.1.0,<2.2.0
entrypoints>=0.3.0
functools32>=3.2.3.post2; python_version == '2.7' # technically: python_version < '3.2'

# Twine (no imports, invoked via twine script):
twine>=1.8.1 # Apache-2.0
twine>=1.8.1
# readme-renderer 25.0 has removed support for Python 3.4
# readme-renderer 23.0 has made cmarkgfm part of extras (it fails on Cygwin)
readme-renderer>=23.0; python_version == '2.7'
readme-renderer>=23.0,<25.0; python_version == '3.4'
readme-renderer>=23.0; python_version >= '3.5'

# Ansible validate-modules (no imports, invoked via validate-modules script)
mock>=2.0.0 # BSD, from Ansible validate-modules
voluptuous>=0.10.2 # BSD, from Ansible validate-modules


# Indirect dependencies (normally commented out, only listed to document their license):

# alabaster # BSD, from Sphinx
# atomicwrites # MIT, from pytest
# attrs # MIT, from pytest
# Babel # BSD, from Sphinx
# bleach # Apache, from readme-renderer -> twine
# configparser # MIT, from flake8 for py<3.2
# coverage # Apache-2.0, from pytest-cov
# docutils # public domain | Python | 2-Clause BSD | GPL 3, from Sphinx
# funcsigs # Apache, from mock for py<3.3
# imagesize # MIT, from Sphinx
# mccabe # MIT, from flake8
# more-itertools # MIT, from pytest
# packaging # BSD | Apache 2.0, from Sphinx
# pathlib2 # MIT, from pytest for py<3.6
# pkginfo # MIT, from twine
# py # MIT, from pytest
# pycodestyle # MIT, from flake8
# pyflakes # MIT, from flake8
# Pygments # BSD, from Sphinx
# pyparsing # MIT, from Sphinx
# readme-renderer # Apache 2.0, from twine
# requests-toolbelt # Apache 2.0, from twine
# scandir # BSD, from pathlib2 for py<3.5 -> pytest for py<3.6
# snowballstemmer # BSD, from Sphinx
# sphinxcontrib-websupport # BSD, from Sphinx
# tqdm # MPL 2.0, MIT, from twine>=1.9.1
# typing # PSFL, from Sphinx>=1.6.1 for py<3.5
# webencodings # BSD, from bleach -> readme-renderer -> twine

# Indirect dependencies are not specified in this file unless constraints are needed.

0 comments on commit 09fb730

Please sign in to comment.