Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 10 additions & 3 deletions packages/bigquery-magics/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
DEFAULT_PYTHON_VERSION = "3.14"

UNIT_TEST_PYTHON_VERSIONS: List[str] = [
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
# Not supported, but included so that we can explicitly skip the session
# from here. Keep unsupported versions last so that they don't conflict with
# the prerelease_deps session.
"3.9",
]
Comment on lines 38 to 47
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Instead of keeping Python 3.9 in the list and manually skipping it in every session, it is cleaner to remove it from UNIT_TEST_PYTHON_VERSIONS entirely. Note that dropping support for Python 3.9 is a breaking change; per repository rules, this should be handled with a minor version bump rather than a patch to allow for continued support of the previous environment. Additionally, Python 3.14 should be included in the versions list as it is a valid version for this repository.

    "3.10",
    "3.11",
    "3.12",
    "3.13",
    "3.14",
]
References
  1. When a release introduces breaking changes in environment requirements, such as dropping support for specific Python versions, prefer a minor version bump over a patch version bump.
  2. Python 3.14 is a valid Python version and should be supported.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can't do until the global github actions config is updated.


UNIT_TEST_STANDARD_DEPENDENCIES = [
Expand All @@ -62,8 +65,6 @@
],
"3.10": [
"bqstorage",
"bigframes",
"geopandas",
],
Comment on lines 66 to 68
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The dependencies bigframes and geopandas were removed from the Python 3.10 test session. Since 3.10 is now the minimum supported version, these extras should continue to be tested to ensure compatibility. If they were moved elsewhere, please clarify; otherwise, they should be restored to maintain test coverage.

    "3.10": [
        "bqstorage",
        "bigframes",
        "geopandas",
    ],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is intentional. We need a minimimal set of extras so that the minimum versions of dependencies can be properly tested.

"3.11": [],
"3.12": [
Expand Down Expand Up @@ -223,6 +224,9 @@ def install_unittest_dependencies(session, *constraints):

@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
def unit(session):
if session.python == "3.9":
session.skip("Python 3.9 is not supported.")
Comment on lines +227 to +228
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This skip block is unnecessary if Python 3.9 is removed from the UNIT_TEST_PYTHON_VERSIONS list.


# Install all test dependencies, then install this package in-place.

constraints_path = str(
Expand Down Expand Up @@ -277,6 +281,9 @@ def install_systemtest_dependencies(session, with_extras, *constraints):
@nox.parametrize("with_extras", [True, False])
def system(session, with_extras):
"""Run the system test suite."""
if session.python == "3.9":
session.skip("Python 3.9 is not supported.")
Comment on lines +284 to +285
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This skip block is unnecessary if Python 3.9 is removed from the UNIT_TEST_PYTHON_VERSIONS list.


constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
Expand Down
10 changes: 5 additions & 5 deletions packages/bigquery-magics/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@
# 'Development Status :: 5 - Production/Stable'``
release_status = "Development Status :: 4 - Beta"
dependencies = [
"db-dtypes>=0.3.0,<2.0.0",
"db-dtypes>=1.1.1,<2.0.0",
"google-cloud-bigquery >= 3.13.0, <4.0.0",
"ipywidgets>=7.7.1",
"ipython>=7.23.1",
"ipykernel>=5.5.6",
"packaging >= 20.0.0",
"pandas>=1.2.0",
"pyarrow >= 3.0.0",
"pandas>=1.5.3",
"pyarrow >= 12.0.0",
"pydata-google-auth >=1.5.0",
"tqdm >= 4.7.4, <5.0.0",
"pyopenssl >= 23.3.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Adding pyopenssl as a mandatory dependency is a significant change, as it requires C extensions and is generally not needed for Python 3.10+. Could you explain why this is now required for all users? If it's only needed for specific edge cases, consider making it an optional extra.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Several unit tests fail without this change. Note that it is a required dependency in later versions of google-auth, anyway.

]
extras = {
# bqstorage had a period where it was a required dependency, and has been
Expand Down Expand Up @@ -106,7 +107,6 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -119,7 +119,7 @@
packages=packages,
install_requires=dependencies,
extras_require=extras,
python_requires=">=3.9",
python_requires=">=3.10",
include_package_data=True,
zip_safe=False,
)
27 changes: 21 additions & 6 deletions packages/bigquery-magics/testing/constraints-3.10.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# IMPORTANT: When Python 3.9 support is dropped, update these to
# match the minimums in setup.py.
# This is the last pandas 2.0.x release.
pandas==2.0.3
bigframes==1.17.0
geopandas==1.0.1
# This constraints file is used to check that lower bounds
# are correct in setup.py
# List *all* library dependencies and extras in this file.
# Pin the version to the lower bound.
#
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
# Then this file should have foo==1.14.0
db-dtypes==1.1.1
geopandas==1.0.1
google-cloud-bigquery==3.13.0
google-cloud-bigquery-storage==2.6.0
ipywidgets==7.7.1
ipython==7.23.1
ipykernel==5.5.6
numpy==1.26.4
packaging==20.0.0
pandas==1.5.3
pyarrow==12.0.0
pydata-google-auth==1.5.0
pyopenssl==23.3.0
tqdm==4.7.4
Comment on lines +1 to +21
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

bigframes was removed from the constraints file. If it remains a supported extra for this package, it should be included here at its minimum supported version to ensure that lower-bound compatibility is verified in CI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bigframes requires a newer version of the client library than I would like to upgrade to at this time.

18 changes: 0 additions & 18 deletions packages/bigquery-magics/testing/constraints-3.9.txt

This file was deleted.

Loading