Skip to content

Commit

Permalink
feat: add support for Python 3.10 (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver authored Oct 8, 2021
1 parent 1e1de20 commit ddcb099
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.6, 3.7, 3.8 and 3.9 on both UNIX and Windows.
3.6, 3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

- To run a single unit test::

$ nox -s unit-3.9 -- -k <name of test>
$ nox -s unit-3.10 -- -k <name of test>


.. note::
Expand Down Expand Up @@ -235,11 +235,13 @@ We support:
- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_
- `Python 3.10`_

.. _Python 3.6: https://docs.python.org/3.6/
.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/


Supported versions can be found in our ``noxfile.py`` `config`_.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

DEFAULT_PYTHON_VERSION = "3.8"
SYSTEM_TEST_PYTHON_VERSIONS = ["3.7"]
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

Expand Down
1 change: 1 addition & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def update_fixup_scripts(library):
templated_files = common.py_library(
samples=False, # set to True only if there are samples
system_test_python_versions=["3.7"],
unit_test_python_versions=["3.6", "3.7", "3.8", "3.9", "3.10"],
unit_test_external_dependencies=["aiounittest"],
system_test_external_dependencies=["pytest-asyncio"],
microgenerator=True,
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/v1/test_base_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import mock


class TestableBaseWriteBatch(BaseWriteBatch):
class DerivedBaseWriteBatch(BaseWriteBatch):
def __init__(self, client):
super().__init__(client=client)

Expand All @@ -32,7 +32,7 @@ def commit(self):
class TestBaseWriteBatch(unittest.TestCase):
@staticmethod
def _get_target_class():
return TestableBaseWriteBatch
return DerivedBaseWriteBatch

def _make_one(self, *args, **kwargs):
klass = self._get_target_class()
Expand Down

0 comments on commit ddcb099

Please sign in to comment.