diff --git a/.github/workflows/black-formatting.yml b/.github/workflows/python-testing.yml similarity index 50% rename from .github/workflows/black-formatting.yml rename to .github/workflows/python-testing.yml index 25b34f21..1147d288 100644 --- a/.github/workflows/black-formatting.yml +++ b/.github/workflows/python-testing.yml @@ -1,15 +1,20 @@ -name: Black Formatting +--- +name: Python -on: [pull_request] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: - build: + check: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v1 - name: Output env variables run: | + echo "Default branch=${default-branch}" echo "GITHUB_WORKFLOW=${GITHUB_WORKFLOW}" echo "GITHUB_ACTION=$GITHUB_ACTION" echo "GITHUB_ACTIONS=$GITHUB_ACTIONS" @@ -26,18 +31,36 @@ jobs: cat $GITHUB_EVENT_PATH echo "\n" echo "::debug::---end" - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 with: - python-version: 3.7 - + python-version: 3.6 - name: Install dependencies run: | - python -m pip install --upgrade pip black + python3 -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Check + run: | + tox -e checks + + tests: + needs: check + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] - - name: Run black - id: black + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Test with tox run: | - black --check . - echo "::set-output name=rc::$?" + tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 54165f6e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -# config file for automatic testing at travis-ci.org -language: python -cache: pip - -before_install: - sudo apt-get install -y python3-dev - -install: - - pip install --upgrade pip setuptools - - pip install virtualenv tox - -script: tox -v - -matrix: - include: - - python: "2.7" - env: TOXENV=py27 - - - python: "3.4" - env: TOXENV=py34 - - - python: "3.6" - env: TOXENV=checks - - - python: "3.5" - env: TOXENV=py35 - - - python: "3.6" - env: TOXENV=py36 - - - python: "3.7" - dist: xenial - env: TOXENV=py37 - - - python: "pypy" - env: TOXENV=pypy diff --git a/README.rst b/README.rst index 0a1fe664..6f1e7a74 100644 --- a/README.rst +++ b/README.rst @@ -5,25 +5,26 @@ Quickstart A Python module for `semantic versioning`_. Simplifies comparing versions. -|build-status| |python-support| |downloads| |license| |docs| |black| +|GHAction| |python-support| |downloads| |license| |docs| |black| +|openissues| |GHDiscussion| .. teaser-end .. warning:: As anything comes to an end, this project will focus on Python 3.x only. - New features and bugfixes will be integrated into the 3.x.y branch only. + New features and bugfixes will be integrated into semver3 only. Major version 3 of semver will contain some incompatible changes: - * removes support for Python 2.7 and 3.3 + * removes support for Python 2.7, 3.3, 3.4, and 3.5. * removes deprecated functions. - The last version of semver which supports Python 2.7 and 3.4 will be - 2.10.x. However, keep in mind, version 2.10.x is frozen: no new + The last version of semver which supports Python 2.7 and 3.5 will be + 2.x.y. However, keep in mind, this version is frozen: no new features nor backports will be integrated. - We recommend to upgrade your workflow to Python 3.x to gain support, + We recommend to upgrade your workflow to Python >=3.6 to gain support, bugfixes, and new features. The module follows the ``MAJOR.MINOR.PATCH`` style: @@ -113,3 +114,11 @@ There are other functions to discover. Read on! .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: Black Formatter +.. |openissues| image:: http://isitmaintained.com/badge/open/python-semver/python-semver.svg + :target: http://isitmaintained.com/project/python-semver/python-semver + :alt: Percentage of open issues +.. |GHAction| image:: https://github.com/python-semver/python-semver/workflows/Python/badge.svg + :alt: Python +.. |GHDiscussion| image:: https://shields.io/badge/GitHub-%20Discussions-green?logo=github + :target: https://github.com/python-semver/python-semver/discussions + :alt: GitHub Discussion diff --git a/docs/usage.rst b/docs/usage.rst index cda55670..365d6af0 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -455,7 +455,7 @@ To compare two versions depends on your type: >>> v > dict(major=1, unknown=42) Traceback (most recent call last): ... - TypeError: __init__() got an unexpected keyword argument 'unknown' + TypeError: ... got an unexpected keyword argument 'unknown' Other types cannot be compared. @@ -786,4 +786,3 @@ the original class: Traceback (most recent call last): ... ValueError: '1.2.4': not a valid semantic version tag. Must start with 'v' or 'V' - diff --git a/pyproject.toml b/pyproject.toml index eca41891..b19fc61c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,12 @@ +[build-system] +requires = [ + # sync with setup.py until we discard non-pep-517/518 + "setuptools>=40.0", + "setuptools-scm", + "wheel", +] +build-backend = "setuptools.build_meta" + [tool.black] line-length = 88 target-version = ['py37'] diff --git a/setup.py b/setup.py index 746c1436..b8313673 100755 --- a/setup.py +++ b/setup.py @@ -99,6 +99,8 @@ def read_file(filename): "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", ], python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", diff --git a/tox.ini b/tox.ini index 833c9655..aa42d9b9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,23 @@ [tox] envlist = - flake8 - py{27,34,35,36,37} - pypy + checks + py{27,34,35,36,37,38,39} +isolated_build = True + +[gh-actions] +python = + 2.7: py27 + 3.4: py34 + 3.5: py35 + 3.6: py36 + 3.7: py37 + 3.8: py38 + 3.9: py39 + # 3.10: py310 + [testenv] -description = Run test suite +description = Run test suite for {basepython} whitelist_externals = make commands = pytest {posargs:} deps =
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: