Skip to content

Commit

Permalink
feat: remove python 2.7 from setup.py and nox tests (#1301)
Browse files Browse the repository at this point in the history
* feat: remove python 2.7 from setup.py and nox tests. Originally done in #892
  • Loading branch information
clundin25 committed May 25, 2023
1 parent 75878c8 commit 8437490
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
19 changes: 0 additions & 19 deletions noxfile.py
Expand Up @@ -104,25 +104,6 @@ def unit(session):
)


@nox.session(python=["2.7"])
def unit_prev_versions(session):
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
session.install("-r", "testing/requirements.txt", "-c", constraints_path)
session.install("-e", ".", "-c", constraints_path)
session.run(
"pytest",
f"--junitxml=unit_{session.python}_sponge_log.xml",
"--cov=google.auth",
"--cov=google.oauth2",
"--cov=tests",
"--ignore=tests/test_pluggable.py", # Pluggable auth only support 3.6+ for now.
"tests",
"--ignore=tests/transport/test__custom_tls_signer.py", # enterprise cert is for python 3.6+
)


@nox.session(python="3.8")
def cover(session):
session.install("-r", "testing/requirements.txt")
Expand Down
11 changes: 3 additions & 8 deletions setup.py
Expand Up @@ -24,19 +24,14 @@
"pyasn1-modules>=0.2.1",
# rsa==4.5 is the last version to support 2.7
# https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233
'rsa<4.6; python_version < "3.6"',
'rsa>=3.1.4,<5; python_version >= "3.6"',
"rsa>=3.1.4,<5",
# install enum34 to support 2.7. enum34 only works up to python version 3.3.
'enum34>=1.1.10; python_version < "3.4"',
"six>=1.9.0",
"urllib3<2.0",
)

extras = {
"aiohttp": [
"aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'",
"requests >= 2.20.0, < 3.0.0dev",
],
"aiohttp": ["aiohttp >= 3.6.2, < 4.0.0dev", "requests >= 2.20.0, < 3.0.0dev"],
"pyopenssl": ["pyopenssl>=20.0.0", "cryptography>=38.0.3"],
"requests": "requests >= 2.20.0, < 3.0.0dev",
"reauth": "pyu2f>=0.1.5",
Expand Down Expand Up @@ -67,7 +62,7 @@
namespace_packages=("google",),
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",
license="Apache 2.0",
keywords="google auth oauth client",
classifiers=[
Expand Down

0 comments on commit 8437490

Please sign in to comment.