Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: drop support for Python 2.7 / 3.5 #212

Merged
merged 28 commits into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
21ac69a
fix!: drop support for Python 2.7 and 3.5
tseaver Jun 15, 2021
78caa92
chore: drop 'six' module
tseaver Jun 15, 2021
35c8216
chore: drop 'u"' prefixes for text
tseaver Jun 15, 2021
35ba7d3
chore: remove other Python 2.7 workarounds
tseaver Jun 15, 2021
61490f5
chore: drop use of 'pytz'
tseaver Jun 15, 2021
74c6179
Merge branch 'master' into 210-drop-python-2.7
tseaver Jun 16, 2021
6e21b01
tests: scrub more 2.7 / six constraints
tseaver Jun 16, 2021
fe7d454
docs: add section on unspported Python versions to README
tseaver Jun 16, 2021
d77fbb0
chore: drop workaround for Python 2.7
tseaver Jun 16, 2021
440e571
chore: remove 'general_helpers.wraps'
tseaver Jun 16, 2021
90c1bd1
chore: note URL for follow-up issue
tseaver Jun 16, 2021
026ee31
chore: remove Python 2-specific kwargs hack
tseaver Jun 16, 2021
4165633
chore: drop Python2-specific alias
tseaver Jun 16, 2021
ad7b40b
chore: drop Python2-specific aliases
tseaver Jun 16, 2021
dbc234f
chore: drop Python2-specific aliases
tseaver Jun 16, 2021
4d87012
Merge branch 'master' into 210-drop-python-2.7
tseaver Jun 30, 2021
c480784
Merge branch 'master' into 210-drop-python-2.7
tseaver Jul 7, 2021
72d175b
chore: remove 'packaging' dependency
tseaver Jul 7, 2021
01b49c4
Merge branch 'master' into 210-drop-python-2.7
tseaver Jul 14, 2021
0f6a745
🦉 Updates from OwlBot
gcf-owl-bot[bot] Jul 14, 2021
cff328f
chore: switch to microgenerator to avoid 2.7 reappearing
tseaver Jul 14, 2021
3a66b33
chore: expand range to allow 'google-auth' 2.x versions
tseaver Jul 14, 2021
690a971
Merge branch 'master' into 210-drop-python-2.7
tseaver Jul 23, 2021
dc30a49
Merge branch 'master' into 210-drop-python-2.7
tseaver Jul 27, 2021
9c9a9a5
docs: sync newest version w/ Python 2.7 support
tseaver Jul 27, 2021
01d4c8f
chore: drop comment referring to Python 2.7 / pytypes
tseaver Aug 1, 2021
895d895
chore: remove mentions of Python 2.7 from docs
tseaver Aug 1, 2021
556ff21
🦉 Updates from OwlBot
gcf-owl-bot[bot] Aug 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 2 additions & 30 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.. Generated by synthtool. DO NOT EDIT!
############
Contributing
############
Expand Down Expand Up @@ -69,7 +68,6 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

- To test your changes, run unit tests with ``nox``::

$ nox -s unit-2.7
$ nox -s unit-3.8
$ ...

Expand All @@ -80,8 +78,8 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

.. note::

The unit tests and system tests are described in the
``noxfile.py`` files in each directory.
The unit tests tests are described in the ``noxfile.py`` files
in each directory.

.. nox: https://pypi.org/project/nox/

Expand Down Expand Up @@ -136,32 +134,6 @@ Exceptions to PEP8:
"Function-Under-Test"), which is PEP8-incompliant, but more readable.
Some also use a local variable, ``MUT`` (short for "Module-Under-Test").

********************
Running System Tests
********************

- To run system tests, you can execute::

# Run all system tests
$ nox -s system-3.8
$ nox -s system-2.7

# Run a single system test
$ nox -s system-3.8 -- -k <name of test>


.. note::

System tests are only configured to run under Python 2.7 and
Python 3.8. For expediency, we do not run them in older versions
of Python 3.

This alone will not run the tests. You'll need to change some local
auth settings and change some configuration in your project to
run all the tests.

- System tests will be run against an actual project. You should use local credentials from gcloud when possible. See `Best practices for application authentication <https://cloud.google.com/docs/authentication/best-practices-applications#local_development_and_testing_with_the>`__. Some tests require a service account. For those tests see `Authenticating as a service account <https://cloud.google.com/docs/authentication/production>`__.

*************
Test Coverage
*************
Expand Down
8 changes: 2 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Core Library for Google Client Libraries
========================================

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

This library is not meant to stand-alone. Instead it defines
common helpers used by all Google API clients. For more information, see the
Expand All @@ -16,8 +16,4 @@ common helpers used by all Google API clients. For more information, see the

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

Deprecated Python Versions
--------------------------
Python == 2.7. Python 2.7 support will be removed on January 1, 2020.
tseaver marked this conversation as resolved.
Show resolved Hide resolved
Python >= 3.6
2 changes: 1 addition & 1 deletion google/api_core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.30.0"
__version__ = "2.0.0-b1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a new process, i.e. having a preliminary release instead of immediately switching to 2.0.0? Also, should this be beta or an RC?

FWIW, the approach itself does seem sensible to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a semver-major / breaking change, I thought it was reasonable to do a short beta. I could be persuaded that it should be an RC, but I want folks to consider carefully whether they install it in production until we've gotten feedback that all is OK.

5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

_MINIMAL_ASYNCIO_SUPPORT_PYTHON_VERSION = [3, 6]


def _greater_or_equal_than_36(version_string):
tokens = version_string.split(".")
for i, token in enumerate(tokens):
Expand Down Expand Up @@ -77,13 +78,13 @@ def default(session):
session.run(*pytest_args)


@nox.session(python=["2.7", "3.6", "3.7", "3.8", "3.9"])
@nox.session(python=["3.6", "3.7", "3.8", "3.9"])
def unit(session):
"""Run the unit test suite."""
default(session)


@nox.session(python=["2.7", "3.6", "3.7", "3.8", "3.9"])
@nox.session(python=["3.6", "3.7", "3.8", "3.9"])
def unit_grpc_gcp(session):
"""Run the unit test suite with grpcio-gcp installed."""
constraints_path = str(
Expand Down
11 changes: 8 additions & 3 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

"""This script is used to synthesize generated parts of this library."""

import re

import synthtool as s
from synthtool import gcp

Expand All @@ -24,8 +22,15 @@
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
excludes = [
"noxfile.py", # pytype
"setup.cfg", # pytype
".flake8", # flake8-import-order, layout
".coveragerc", # layout
"CONTRIBUTING.rst", # no systests
parthea marked this conversation as resolved.
Show resolved Hide resolved
]
templated_files = common.py_library(cov_level=100)
s.move(templated_files, excludes=["noxfile.py", ".flake8", ".coveragerc", "setup.cfg"])
s.move(templated_files, excludes=excludes)

# Add pytype support
s.replace(
Expand Down
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"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",
Expand All @@ -102,7 +99,7 @@
namespace_packages=namespaces,
install_requires=dependencies,
extras_require=extras,
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*",
python_requires=">=3.6",
include_package_data=True,
zip_safe=False,
)
Empty file removed testing/constraints-2.7.txt
Empty file.