Skip to content

Commit

Permalink
feat: add support for Python 3.9, drop support for Python 3.5 (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Dec 12, 2020
1 parent c423c7b commit ddf7ce5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 19 deletions.
8 changes: 3 additions & 5 deletions CONTRIBUTING.rst
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions: 2.7,
3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows.
3.6, 3.7 and 3.8 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 @@ -156,7 +156,7 @@ Running System Tests
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
for more details.

- Once you have downloaded your json keys, set the environment variable
- Once you have downloaded your json keys, set the environment variable
``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file::

$ export GOOGLE_APPLICATION_CREDENTIALS="/Users/<your_username>/path/to/app_credentials.json"
Expand Down Expand Up @@ -202,12 +202,10 @@ Supported Python Versions

We support:

- `Python 3.5`_
- `Python 3.6`_
- `Python 3.7`_
- `Python 3.8`_

.. _Python 3.5: https://docs.python.org/3.5/
.. _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/
Expand All @@ -220,7 +218,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020.

We also explicitly decided to support Python 3 beginning with version
3.5. Reasons for this include:
3.6. Reasons for this include:

- Encouraging use of newest versions of Python 3
- Taking the lead of `prominent`_ open-source `projects`_
Expand Down
4 changes: 2 additions & 2 deletions README.rst
@@ -1,7 +1,7 @@
Core Helpers for Google Cloud Python Client Library
===================================================

|pypi| |versions|
|pypi| |versions|

This library is not meant to stand-alone. Instead it defines
common helpers (e.g. base ``Client`` classes) used by all of the
Expand Down Expand Up @@ -32,7 +32,7 @@ to `Python Development Environment Setup Guide`_ for Google Cloud Platform.

Supported Python Versions
-------------------------
Python >= 3.5
Python >= 3.6

Deprecated Python Versions
--------------------------
Expand Down
14 changes: 4 additions & 10 deletions noxfile.py
Expand Up @@ -31,19 +31,12 @@ def default(session):
run the tests.
"""
constraints_path = os.path.join(
CURRENT_DIRECTORY,
"testing",
"constraints-{}.txt".format(session.python)
CURRENT_DIRECTORY, "testing", "constraints-{}.txt".format(session.python)
)

# Install all test dependencies, then install local packages in-place.
session.install(
"mock",
"pytest",
"pytest-cov",
"grpcio >= 1.0.2",
"-c",
constraints_path
"mock", "pytest", "pytest-cov", "grpcio >= 1.0.2", "-c", constraints_path
)
session.install("-e", ".", "-c", constraints_path)

Expand All @@ -62,7 +55,7 @@ def default(session):
)


@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
@nox.session(python=["2.7", "3.6", "3.7", "3.8", "3.9"])
def unit(session):
"""Default unit test session."""
default(session)
Expand Down Expand Up @@ -99,6 +92,7 @@ def cover(session):
session.run("coverage", "report", "--show-missing", "--fail-under=100")
session.run("coverage", "erase")


@nox.session(python=DEFAULT_PYTHON_VERSION)
def docs(session):
"""Build the docs for this library."""
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -43,7 +43,7 @@
version = {}
with open(os.path.join(package_root, "google/cloud/version.py")) as fp:
exec(fp.read(), version)
version = version['__version__']
version = version["__version__"]

readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
Expand Down Expand Up @@ -78,10 +78,10 @@
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"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",
"Operating System :: OS Independent",
"Topic :: Internet",
],
Expand Down
Empty file added testing/constraints-3.9.txt
Empty file.

0 comments on commit ddf7ce5

Please sign in to comment.