diff --git a/.circleci/config.yml b/.circleci/config.yml index 2df0719c..bb0aa10e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,14 +16,6 @@ workflows: ignore: /.*/ tags: only: /^v\d+\.\d+\.\d+.*/ - - unit-3.5: - filters: - tags: - only: /.*/ - - unit-cpp-3.5: - filters: - tags: - only: /.*/ - unit-3.6: filters: tags: @@ -48,20 +40,28 @@ workflows: filters: tags: only: /.*/ + - unit-3.9: + filters: + tags: + only: /.*/ + # - unit-cpp-3.9: + # filters: + # tags: + # only: /.*/ - docs: filters: tags: only: /.*/ - publish: requires: - - unit-3.5 - - unit-cpp-3.5 - unit-3.6 - unit-cpp-3.6 - unit-3.7 - unit-cpp-3.7 - unit-3.8 - unit-cpp-3.8 + - unit-3.9 + # - unit-cpp-3.9 - docs filters: branches: @@ -69,9 +69,9 @@ workflows: tags: only: /^\d+\.\d+\.\d+((a|b|rc)\d+)?$/ jobs: - unit-3.5: + unit-3.6: docker: - - image: python:3.5 + - image: python:3.6 steps: - checkout - run: @@ -81,14 +81,14 @@ jobs: pip install codecov - run: name: Run unit tests. - command: nox -s unit-3.5 + command: nox -s unit-3.6 - run: name: Submit coverage data to codecov. command: codecov when: always - unit-3.6: + unit-3.7: docker: - - image: python:3.6 + - image: python:3.7 steps: - checkout - run: @@ -98,14 +98,14 @@ jobs: pip install codecov - run: name: Run unit tests. - command: nox -s unit-3.6 + command: nox -s unit-3.7 - run: name: Submit coverage data to codecov. command: codecov when: always - unit-3.7: + unit-3.8: docker: - - image: python:3.7 + - image: python:3.8 steps: - checkout - run: @@ -115,14 +115,14 @@ jobs: pip install codecov - run: name: Run unit tests. - command: nox -s unit-3.7 + command: nox -s unit-3.8 - run: name: Submit coverage data to codecov. command: codecov when: always - unit-3.8: + unit-3.9: docker: - - image: python:3.8 + - image: python:3.9 steps: - checkout - run: @@ -132,14 +132,14 @@ jobs: pip install codecov - run: name: Run unit tests. - command: nox -s unit-3.8 + command: nox -s unit-3.9 - run: name: Submit coverage data to codecov. command: codecov when: always - unit-cpp-3.5: + unit-3.10: docker: - - image: python:3.5 + - image: python:3.10-rc steps: - checkout - run: @@ -149,7 +149,7 @@ jobs: pip install codecov - run: name: Run unit tests. - command: nox -s unitcpp-3.5 + command: nox -s unit-3.10 - run: name: Submit coverage data to codecov. command: codecov @@ -205,6 +205,23 @@ jobs: name: Submit coverage data to codecov. command: codecov when: always + # unit-cpp-3.9: + # docker: + # - image: python:3.9 + # steps: + # - checkout + # - run: + # name: Install nox and codecov. + # command: | + # pip install nox + # pip install codecov + # - run: + # name: Run unit tests. + # command: nox -s unitcpp-3.9 + # - run: + # name: Submit coverage data to codecov. + # command: codecov + # when: always docs: docker: - image: python:3.6 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 9d1600c8..fec40052 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -7,11 +7,10 @@ branchProtectionRules: requiredStatusCheckContexts: - 'ci/circleci: docs' - 'ci/circleci: style-check' - - 'ci/circleci: unit-3.5' - 'ci/circleci: unit-3.6' - 'ci/circleci: unit-3.7' - 'ci/circleci: unit-3.8' - - 'ci/circleci: unit-cpp-3.5' + - 'ci/circleci: unit-3.9' - 'ci/circleci: unit-cpp-3.6' - 'ci/circleci: unit-cpp-3.7' - 'ci/circleci: unit-cpp-3.8' diff --git a/noxfile.py b/noxfile.py index 3a2fff28..0ed6caa7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -14,17 +14,25 @@ from __future__ import absolute_import import os +import pathlib import nox -@nox.session(python=["3.5", "3.6", "3.7", "3.8"]) +CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() + + +@nox.session(python=["3.6", "3.7", "3.8", "3.9"]) def unit(session, proto="python"): """Run the unit test suite.""" + constraints_path = str( + CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" + ) + session.env["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = proto session.install("coverage", "pytest", "pytest-cov", "pytz") - session.install("-e", ".[testing]") + session.install("-e", ".[testing]", "-c", constraints_path) session.run( "py.test", @@ -43,7 +51,10 @@ def unit(session, proto="python"): ) -@nox.session(python=["3.5", "3.6", "3.7", "3.8"]) +# Check if protobuf has released wheels for new python versions +# https://pypi.org/project/protobuf/#files +# This list will generally be shorter than 'unit' +@nox.session(python=["3.6", "3.7", "3.8"]) def unitcpp(session): return unit(session, proto="cpp") diff --git a/setup.py b/setup.py index 1d17e85d..83bd76f9 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ include_package_data=True, install_requires=("protobuf >= 3.12.0",), extras_require={"testing": ["google-api-core[grpc] >= 1.22.2",],}, + python_requires=">=3.6", classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Console", @@ -45,10 +46,10 @@ "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Programming Language :: Python :: 3", - "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 :: Code Generators", "Topic :: Software Development :: Libraries :: Python Modules", ], diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt new file mode 100644 index 00000000..e69de29b diff --git a/testing/constraints-3.11.txt b/testing/constraints-3.11.txt new file mode 100644 index 00000000..e69de29b diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt new file mode 100644 index 00000000..f7365f65 --- /dev/null +++ b/testing/constraints-3.6.txt @@ -0,0 +1,9 @@ +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List *all* library dependencies and extras in this file. +# Pin the version to the lower bound. +# +# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +protobuf==3.12.0 +google-api-core==1.22.2 \ No newline at end of file diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt new file mode 100644 index 00000000..e69de29b diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt new file mode 100644 index 00000000..e69de29b diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt new file mode 100644 index 00000000..e69de29b