| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| "tests", | ||
| ] | ||
| UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = { | ||
| "3.8": [ |
There was a problem hiding this comment.
Do we want to change this to 3.9 instead?
Sorry, something went wrong.
There was a problem hiding this comment.
Broadly, the unit & system test extras are not handled well in this (and likely all our noxfiles). As I will show below, we do fully test this library during unit tests, but I think it could be cleaned up (determine which extras need to be done with which Python versions, why, provide comments to clarify the why, and ensure that the logic across the setup.py, owlbot.py, noxfile.py are all in sync, etc.). I recommend that the clean up be a separate Issue as out of scope for the focus of this PR.
For unit tests, our noxfile currently overrides the effect of the variable
UNIT_TEST_EXTRAS_BY_PYTHON. UNIT_TEST_EXTRAS_BY_PYTHON is used in the function install_unittest_dependencies().
In the unit session there is another snippet that also selects extras to be installed. As can be seen below, for any Python version from 3.11-3.13 we test against alembic. But we see that for any Python version outside of 3.11-3.13 we test against all extras, which by definition in setup.py includes alembic.
if install_extras and session.python in ["3.11", "3.12", "3.13"]:
install_target = ".[geography,alembic,tests,bqstorage]"
elif install_extras:
install_target = ".[all]"
else:
install_target = "."
session.install("-e", install_target, "-c", constraints_path)
The truthfulness of this can be see in the Kokoro CI/CD results which show:
nox > Running session unit-3.9(protobuf_implementation='cpp') ... nox > python -m pip install -e '.[all]' -c /tmpfs/src/github/python-bigquery-sqlalchemy/testing/constraints-3.9.txt ... nox > python -m pip freeze alembic==1.16.4 asyncmock==0.4.2 ... tests/unit/test__types.py ........... [ 9%] tests/unit/test_alembic.py .. [ 10%] tests/unit/test_catalog_functions.py ................................... [ 21%]
nox > Running session unit-3.13(protobuf_implementation='upb') ... nox > python -m pip install -e '.[geography,alembic,tests,bqstorage]' -c /tmpfs/src/github/python-bigquery-sqlalchemy/testing/constraints-3.13.txt nox > python -m pip freeze alembic==1.16.4 asyncmock==0.4.2 ... tests/unit/test_alembic.py .. [ 10%] tests/unit/test_catalog_functions.py ................................... [ 21%]
Sorry, something went wrong.
| .. note:: | ||
|
|
||
| System tests are only configured to run under Python 3.8, 3.12, and 3.13. | ||
| System tests are only configured to run under Python 3.12, and 3.13. |
There was a problem hiding this comment.
Need to add 3.9 here
Sorry, something went wrong.
There was a problem hiding this comment.
Good catch, thanks! Fixed.
Sorry, something went wrong.
| constraints_path, | ||
| ) | ||
| if session.python == "3.8": | ||
| extras = "[tests,alembic]" |
There was a problem hiding this comment.
I wonder if we still need coverage for alembic?
Sorry, something went wrong.
There was a problem hiding this comment.
The compliance session selects extras slightly differently than the unit session.
I added alembic to this list of extras to account for that difference. DONE.
I assert that as part of the cleanup task discussed in another comment, all our noxfiles need to be checked to see when/why we choose to do some tests and not others. I suspect there was a historical reason that may OR may not apply.
Sorry, something went wrong.
| # ---------------------------------------------------------------------------- | ||
| extras = ["tests"] | ||
| extras_by_python = { | ||
| "3.8": ["tests", "alembic", "bqstorage"], |
There was a problem hiding this comment.
It feels like we need to change this into 3.9 too?
Sorry, something went wrong.
There was a problem hiding this comment.
I added 3.9 with alembic as a system test.
NOTE: there appear to be issues with how owlbot and noxfile, etc are interacting, much like described above for the unit tests. That should be looked into as part of a separate cleanup task.
Sorry, something went wrong.
| CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() | ||
|
|
||
|
|
||
| def _calculate_duration(func): |
There was a problem hiding this comment.
If this is not necessary to the 3.8 removal and is a "would be nice", please split into a second PR - I'm happy to be a reviewer for it!
Sorry, something went wrong.
There was a problem hiding this comment.
I removed this code.
Sorry, something went wrong.
| "grpcio >= 1.47.0, < 2.0.0", | ||
| "grpcio >= 1.49.1, < 2.0.0; python_version>='3.11'", | ||
| "pyarrow >= 3.0.0", | ||
| "pyarrow >= 5.0.0", |
There was a problem hiding this comment.
Confirming - tests would fail if there were consequences to this +2 major version jump, right?
Sorry, something went wrong.
There was a problem hiding this comment.
Tests will fail.
For context: the current version of pyarrow is 20.0
Why version 5.0?:
Sorry, something went wrong.
🤖 I have created a release *beep* *boop* --- ## [1.16.0](v1.15.0...v1.16.0) (2025-11-05) ### Features * Add support for Python 3.14 ([#1278](#1278)) ([c09a009](c09a009)) * Remove python 3.8 support ([#1215](#1215)) ([632d6ef](632d6ef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.16.0](googleapis/python-bigquery-sqlalchemy@v1.15.0...v1.16.0) (2025-11-05) ### Features * Add support for Python 3.14 ([#1278](googleapis/python-bigquery-sqlalchemy#1278)) ([c09a009](googleapis/python-bigquery-sqlalchemy@c09a009)) * Remove python 3.8 support ([#1215](googleapis/python-bigquery-sqlalchemy#1215)) ([632d6ef](googleapis/python-bigquery-sqlalchemy@632d6ef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Also adds several minor tweaks that were useful for debugging some of the mods to this PR (and are useful in general for all future debugging efforts), such as:
* UPDATE: removed upon request: @calculate_duration decorator to confirm the total time to execute a nox session.