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

feat: support Python 3.10 #51

Merged
merged 3 commits into from
Dec 3, 2021
Merged

Conversation

tswast
Copy link
Collaborator

@tswast tswast commented Dec 2, 2021

  • Add constraints files to check minimum versions.
  • Syncs noxfile with Google templates.

setup.py Outdated
"setuptools",
"google-auth >=1.25.0, <2.0dev; python_version<'3.0'",
"google-auth; python_version>='3.6'",
"google-auth-oauthlib <0.4.2dev; python_version<'3.0'",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

0.4.1 was the last version to support Python 2.7 from what I can tell. A bit odd that 0.4.2 was a patch release. googleapis/google-auth-library-python-oauthlib#93

@tswast tswast marked this pull request as ready for review December 3, 2021 17:11
@tswast
Copy link
Collaborator Author

tswast commented Dec 3, 2021

Tests pass locally:

(dev-3.10) ➜  pydata-google-auth git:(issue50-core-upgrade) ✗ nox -r
nox > Running session unit-2.7
nox > Re-using existing virtual environment at .nox/unit-2-7.
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > py.test --quiet --junitxml=unit_2.7_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                               [100%]Coverage.py warning: Couldn't parse Python file '/Users/swast/src/github.com/pydata/pydata-google-auth/pydata_google_auth/__main__.py' (couldnt-parse)

--------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_2.7_sponge_log.xml ---------


15 passed in 0.83 seconds
nox > Session unit-2.7 was successful.
nox > Running session unit-3.6
nox > Re-using existing virtual environment at .nox/unit-3-6.
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.6.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.6.txt
nox > py.test --quiet --junitxml=unit_3.6_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                               [100%]
--------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.6_sponge_log.xml ---------


15 passed in 0.69s
nox > Session unit-3.6 was successful.
nox > Running session unit-3.7
nox > Re-using existing virtual environment at .nox/unit-3-7.
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.7.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.7.txt
nox > py.test --quiet --junitxml=unit_3.7_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                               [100%]
--------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.7_sponge_log.xml ---------


15 passed in 0.64s
nox > Session unit-3.7 was successful.
nox > Running session unit-3.8
nox > Re-using existing virtual environment at .nox/unit-3-8.
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > py.test --quiet --junitxml=unit_3.8_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                               [100%]
--------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.8_sponge_log.xml ---------


15 passed in 0.62s
nox > Session unit-3.8 was successful.
nox > Running session unit-3.9
nox > Re-using existing virtual environment at .nox/unit-3-9.
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.9.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.9.txt
nox > py.test --quiet --junitxml=unit_3.9_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                               [100%]
--------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.9_sponge_log.xml ---------


15 passed in 0.70s
nox > Session unit-3.9 was successful.
nox > Running session unit-3.10
nox > Re-using existing virtual environment at .nox/unit-3-10.
nox > python -m pip install mock pyfakefs pytest pytest-cov -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.10.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.10.txt
nox > py.test --quiet --junitxml=unit_3.10_sponge_log.xml --cov=pydata_google_auth --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
...............                                                                                               [100%]
-------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/unit_3.10_sponge_log.xml ---------


15 passed in 0.71s
nox > Session unit-3.10 was successful.
nox > Running session system-2.7
nox > Re-using existing virtual environment at .nox/system-2-7.
nox > python -m pip install --pre grpcio
nox > python -m pip install mock pyfakefs pytest pytest-cov google-cloud-testutils -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-2.7.txt
nox > py.test --quiet --junitxml=system_2.7_sponge_log.xml --cov=pydata_google_auth --cov=tests/system --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/system
.....                                                                                                         [100%]Coverage.py warning: Couldn't parse Python file '/Users/swast/src/github.com/pydata/pydata-google-auth/pydata_google_auth/__main__.py' (couldnt-parse)

-------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/system_2.7_sponge_log.xml --------


5 passed in 134.29 seconds
nox > Session system-2.7 was successful.
nox > Running session system-3.8
nox > Re-using existing virtual environment at .nox/system-3-8.
nox > python -m pip install --pre grpcio
nox > python -m pip install mock pyfakefs pytest pytest-cov google-cloud-testutils -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > python -m pip install -e . -c /Users/swast/src/github.com/pydata/pydata-google-auth/testing/constraints-3.8.txt
nox > py.test --quiet --junitxml=system_3.8_sponge_log.xml --cov=pydata_google_auth --cov=tests/system --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/system
.....                                                                                                         [100%]
-------- generated xml file: /Users/swast/src/github.com/pydata/pydata-google-auth/system_3.8_sponge_log.xml --------


5 passed in 9.81s
nox > Session system-3.8 was successful.
nox > Running session cover
nox > Re-using existing virtual environment at .nox/cover.
nox > python -m pip install coverage pytest-cov
nox > coverage report --show-missing --fail-under=68
Name                               Stmts   Miss  Cover   Missing
----------------------------------------------------------------
pydata_google_auth/__init__.py        10      0   100%
pydata_google_auth/__main__.py        35     35     0%   3-103
pydata_google_auth/_version.py       279    152    46%   87-98, 103-106, 117-138, 148-167, 174, 187, 189-223, 242, 246-248, 267, 271, 296-297, 302-309, 320-322, 336, 358-360, 370-377, 390-404, 415-426, 437-446, 458-466, 472, 481, 485-496, 529-530, 541-550
pydata_google_auth/_webserver.py      26      0   100%
pydata_google_auth/auth.py            73     13    82%   96, 113, 149-154, 234, 266-268, 275-276, 354-361, 404
pydata_google_auth/cache.py           91     15    84%   55-57, 103-106, 123-124, 145-151, 231
pydata_google_auth/exceptions.py       2      0   100%
tests/system/__init__.py               0      0   100%
tests/system/test_auth.py             29      0   100%
tests/unit/__init__.py                 0      0   100%
tests/unit/test_auth.py               51      0   100%
tests/unit/test_cache.py              43      1    98%   27
tests/unit/test_webserver.py          43      0   100%
----------------------------------------------------------------
TOTAL                                682    216    68%
nox > coverage erase
nox > Session cover was successful.
nox > Running session lint
nox > Re-using existing virtual environment at .nox/lint.
nox > python -m pip install flake8 black==19.10b0
nox > black --check docs pydata_google_auth tests noxfile.py setup.py
All done! ✨ 🍰 ✨
17 files would be left unchanged.
nox > flake8 pydata_google_auth tests
nox > Session lint was successful.
nox > Running session lint_setup_py
nox > Re-using existing virtual environment at .nox/lint_setup_py.
nox > python -m pip install docutils pygments
nox > python setup.py check --restructuredtext --strict
running check
nox > Session lint_setup_py was successful.
nox > Running session blacken
nox > Re-using existing virtual environment at .nox/blacken.
nox > python -m pip install black==19.10b0
nox > black docs pydata_google_auth tests noxfile.py setup.py
All done! ✨ 🍰 ✨
17 files left unchanged.
nox > Session blacken was successful.
nox > Running session docs
nox > Re-using existing virtual environment at .nox/docs.
nox > python -m pip install sphinx sphinx_rtd_theme ipython
nox > python -m pip install -e .
nox > sphinx-build -W -T -N -b html -d docs/source/_build/doctrees/ docs/source/ docs/source/_build/html/
Running Sphinx v4.0.1
making output directory... done
[autosummary] generating autosummary for: api.rst, changelog.rst, cli.rst, contributing.rst, index.rst, install.rst, intro.rst, privacy.rst
loading intersphinx inventory from https://docs.python.org/objects.inv...
loading intersphinx inventory from https://google-auth.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://google-auth-oauthlib.readthedocs.io/en/latest/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 8 source files that are out of date
updating environment: [new config] 8 added, 0 changed, 0 removed
reading sources... [ 12%] api
reading sources... [ 25%] changelog
reading sources... [ 37%] cli
reading sources... [ 50%] contributing
reading sources... [ 62%] index
reading sources... [ 75%] install
reading sources... [ 87%] intro
reading sources... [100%] privacy

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 12%] api
writing output... [ 25%] changelog
writing output... [ 37%] cli
writing output... [ 50%] contributing
writing output... [ 62%] index
writing output... [ 75%] install
writing output... [ 87%] intro
writing output... [100%] privacy

generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in docs/source/_build/html.
nox > Session docs was successful.
nox > Ran multiple sessions:
nox > * unit-2.7: success
nox > * unit-3.6: success
nox > * unit-3.7: success
nox > * unit-3.8: success
nox > * unit-3.9: success
nox > * unit-3.10: success
nox > * system-2.7: success
nox > * system-3.8: success
nox > * cover: success
nox > * lint: success
nox > * lint_setup_py: success
nox > * blacken: success
nox > * docs: success

@tswast
Copy link
Collaborator Author

tswast commented Dec 3, 2021

3.10 failure is because image needs an update. Mailed TheKevJames/tools#315

@tswast tswast merged commit 294ed4f into pydata:master Dec 3, 2021
@tswast tswast deleted the issue50-core-upgrade branch December 3, 2021 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant