diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 0eec6ed..0000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:4db568eb8ccb6b40f355a1c971876c072b3b160ebade5d913bd29e7976ff7191 -# created: 2025-03-05 diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml deleted file mode 100644 index 1d3c03c..0000000 --- a/.github/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - -begin-after-commit-hash: 1afeb53252641dc35a421fa5acc59e2f3229ad6d diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 24c0ca9..2adbf6b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,8 +5,8 @@ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax # Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json. -# @googleapis/yoshi-python @googleapis/api-bigquery @googleapis/api-bigquery-dataframe are the default owners for changes in this repo -* @googleapis/yoshi-python @googleapis/api-bigquery @googleapis/api-bigquery-dataframe +# @googleapis/yoshi-python @googleapis/python-core-client-libraries @googleapis/api-bigquery-dataframe are the default owners for changes in this repo +* @googleapis/yoshi-python @googleapis/python-core-client-libraries @googleapis/api-bigquery-dataframe -# @googleapis/python-samples-reviewers @googleapis/api-bigquery @googleapis/api-bigquery-dataframe are the default owners for samples changes -/samples/ @googleapis/python-samples-reviewers @googleapis/api-bigquery @googleapis/api-bigquery-dataframe +# @googleapis/python-samples-reviewers @googleapis/python-core-client-libraries @googleapis/api-bigquery-dataframe are the default owners for samples changes +/samples/ @googleapis/python-samples-reviewers @googleapis/python-core-client-libraries @googleapis/api-bigquery-dataframe diff --git a/.github/auto-approve.yml b/.github/auto-approve.yml deleted file mode 100644 index 311ebbb..0000000 --- a/.github/auto-approve.yml +++ /dev/null @@ -1,3 +0,0 @@ -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve -processes: - - "OwlBotTemplateChanges" diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 6677a65..1aff524 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -4,7 +4,7 @@ # Note: This file is autogenerated. To make changes to the assignee # team, please update `codeowner_team` in `.repo-metadata.json`. assign_issues: - - googleapis/api-bigquery + - googleapis/python-core-client-libraries - googleapis/api-bigquery-dataframe assign_issues_by: @@ -12,9 +12,9 @@ assign_issues_by: - "samples" to: - googleapis/python-samples-reviewers - - googleapis/api-bigquery + - googleapis/python-core-client-libraries - googleapis/api-bigquery-dataframe assign_prs: - - googleapis/api-bigquery + - googleapis/python-core-client-libraries - googleapis/api-bigquery-dataframe diff --git a/.github/release-please.yml b/.github/release-please.yml deleted file mode 100644 index 466597e..0000000 --- a/.github/release-please.yml +++ /dev/null @@ -1,2 +0,0 @@ -releaseType: python -handleGHRelease: true diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml deleted file mode 100644 index e5234d0..0000000 --- a/.github/release-trigger.yml +++ /dev/null @@ -1,2 +0,0 @@ -enabled: true -multiScmName: python-bigquery-magics diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index 53c7479..0000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings -# Rules for main branch protection -branchProtectionRules: -# Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `main` -- pattern: main - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true - requiredStatusCheckContexts: - - 'cla/google' - - 'OwlBot Post Processor' - - 'lint' - - 'Kokoro system-3.9' - - 'Kokoro system-3.11 (noextras)' - - 'Kokoro system-3.13' - - 'docs' - - 'unit (3.9)' - - 'unit (3.12)' - - 'unit (3.13)' - - 'cover' - - 'Samples - Lint' - - 'Samples - Python 3.9' - - 'Samples - Python 3.11' - - 'Samples - Python 3.12' -permissionRules: - - team: actools-python - permission: admin - - team: actools - permission: admin - - team: api-bigquery - permission: push - - team: api-bigquery-dataframe - permission: push - - team: yoshi-python - permission: push - - team: python-samples-owners - permission: push - - team: python-samples-reviewers - permission: push diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 2ff94d3..4f06fe6 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: ['3.9', '3.11', '3.12', '3.13'] + python: ['3.9', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.kokoro/presubmit/prerelease-deps-3.8.cfg b/.kokoro/presubmit/prerelease-deps-3.10.cfg similarity index 78% rename from .kokoro/presubmit/prerelease-deps-3.8.cfg rename to .kokoro/presubmit/prerelease-deps-3.10.cfg index fabe3e3..0c6c446 100644 --- a/.kokoro/presubmit/prerelease-deps-3.8.cfg +++ b/.kokoro/presubmit/prerelease-deps-3.10.cfg @@ -3,5 +3,5 @@ # Only run this nox session. env_vars: { key: "NOX_SESSION" - value: "prerelease_deps-3.8" +value: "prerelease_deps-3.10" } diff --git a/.kokoro/presubmit/prerelease-deps-3.14.cfg b/.kokoro/presubmit/prerelease-deps-3.14.cfg new file mode 100644 index 0000000..bf3534b --- /dev/null +++ b/.kokoro/presubmit/prerelease-deps-3.14.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "prerelease_deps-3.14" +} diff --git a/.kokoro/presubmit/prerelease-deps-3.9.cfg b/.kokoro/presubmit/prerelease-deps-3.9.cfg new file mode 100644 index 0000000..48d07dd --- /dev/null +++ b/.kokoro/presubmit/prerelease-deps-3.9.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" +value: "prerelease_deps-3.9" +} diff --git a/.kokoro/presubmit/system-3.10.cfg b/.kokoro/presubmit/system-3.10.cfg new file mode 100644 index 0000000..f1c7c56 --- /dev/null +++ b/.kokoro/presubmit/system-3.10.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "system-3.10" +} \ No newline at end of file diff --git a/.kokoro/presubmit/system-3.14.cfg b/.kokoro/presubmit/system-3.14.cfg new file mode 100644 index 0000000..7390414 --- /dev/null +++ b/.kokoro/presubmit/system-3.14.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "system-3.14" +} diff --git a/.kokoro/presubmit/system-3.8.cfg b/.kokoro/presubmit/system-3.9.cfg similarity index 83% rename from .kokoro/presubmit/system-3.8.cfg rename to .kokoro/presubmit/system-3.9.cfg index f4bcee3..b8ae66b 100644 --- a/.kokoro/presubmit/system-3.8.cfg +++ b/.kokoro/presubmit/system-3.9.cfg @@ -3,5 +3,5 @@ # Only run this nox session. env_vars: { key: "NOX_SESSION" - value: "system-3.8" + value: "system-3.9" } \ No newline at end of file diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg new file mode 100644 index 0000000..418e1e7 --- /dev/null +++ b/.kokoro/samples/python3.14/common.cfg @@ -0,0 +1,40 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.14" +} + +# Declare build specific Cloud project. +env_vars: { + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" + value: "python-docs-samples-tests-314" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-bigquery-magics/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-bigquery-magics/.kokoro/trampoline_v2.sh" diff --git a/.kokoro/samples/python3.14/continuous.cfg b/.kokoro/samples/python3.14/continuous.cfg new file mode 100644 index 0000000..a1c8d97 --- /dev/null +++ b/.kokoro/samples/python3.14/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.14/periodic-head.cfg b/.kokoro/samples/python3.14/periodic-head.cfg new file mode 100644 index 0000000..47e8ef9 --- /dev/null +++ b/.kokoro/samples/python3.14/periodic-head.cfg @@ -0,0 +1,11 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-bigquery-magics/.kokoro/test-samples-against-head.sh" +} diff --git a/.kokoro/samples/python3.14/periodic.cfg b/.kokoro/samples/python3.14/periodic.cfg new file mode 100644 index 0000000..71cd1e5 --- /dev/null +++ b/.kokoro/samples/python3.14/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} diff --git a/.kokoro/samples/python3.14/presubmit.cfg b/.kokoro/samples/python3.14/presubmit.cfg new file mode 100644 index 0000000..a1c8d97 --- /dev/null +++ b/.kokoro/samples/python3.14/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.librarian/state.yaml b/.librarian/state.yaml new file mode 100644 index 0000000..8fca3e2 --- /dev/null +++ b/.librarian/state.yaml @@ -0,0 +1,11 @@ +image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 +libraries: + - id: bigquery-magics + version: 0.11.0 + last_generated_commit: "" + apis: [] + source_roots: + - . + preserve_regex: [] + remove_regex: [] + tag_format: v{version} diff --git a/.repo-metadata.json b/.repo-metadata.json index 55ee426..ad6c940 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -12,5 +12,5 @@ "api_id": "bigquery.googleapis.com", "requires_billing": false, "default_version": "", - "codeowner_team": "@googleapis/api-bigquery @googleapis/api-bigquery-dataframe" + "codeowner_team": "@googleapis/python-core-client-libraries @googleapis/api-bigquery-dataframe" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 49ae72d..70030f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +[PyPI History][1] + +[1]: https://pypi.org/project/bigquery-magics/#history + +## [0.11.0](https://github.com/googleapis/google-cloud-python/compare/bigquery-magics-v0.10.3...bigquery-magics-v0.11.0) (2025-12-16) + + +### Features + +* support python 3.14 (#165) ([8ee73ecf20636eed124b80f76a364ca990acd5fe](https://github.com/googleapis/google-cloud-python/commit/8ee73ecf20636eed124b80f76a364ca990acd5fe)) + ## [0.10.3](https://github.com/googleapis/python-bigquery-magics/compare/v0.10.2...v0.10.3) (2025-08-21) @@ -130,9 +141,3 @@ * Clean up docs and let the nox pass ([#24](https://github.com/googleapis/python-bigquery-magics/issues/24)) ([275712f](https://github.com/googleapis/python-bigquery-magics/commit/275712f4e4b647cda2d253e1f6b7a2fa093ee7c1)) * Reset the changelog for the new package ([#22](https://github.com/googleapis/python-bigquery-magics/issues/22)) ([f7d9c14](https://github.com/googleapis/python-bigquery-magics/commit/f7d9c1445feac32e468a3e06ca55c9474a1ae548)) - -## Changelog - -[PyPI History][1] - -[1]: https://pypi.org/project/bigquery-magics/#history diff --git a/bigquery_magics/version.py b/bigquery_magics/version.py index 5ac5aa4..5c53183 100644 --- a/bigquery_magics/version.py +++ b/bigquery_magics/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.10.3" +__version__ = "0.11.0" diff --git a/noxfile.py b/noxfile.py index 133f37f..6a400a3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -34,7 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.10" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13", "3.14"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -67,13 +67,19 @@ "bigframes", "geopandas", ], + "3.14": [ + "bqstorage", + "bigframes", + "geopandas", + ], } -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13", "3.14"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", "google-cloud-testutils", + "psutil", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = [] @@ -98,6 +104,11 @@ "bigframes", "geopandas", ], + "3.14": [ + "bqstorage", + "bigframes", + "geopandas", + ], } CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -207,7 +218,12 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -482,7 +498,7 @@ def prerelease_deps(session, protobuf_implementation): # TODO(https://github.com/googleapis/python-bigquery-magics/pull/126): Install this again when we relax the pin. # "https://github.com/cloudspannerecosystem/spanner-graph-notebook/archive/refs/heads/main.zip", "https://github.com/googleapis/python-bigquery/archive/main.zip", - "https://github.com/googleapis/python-bigquery-storage/archive/main.zip", + "https://github.com/googleapis/google-cloud-python/archive/main.zip#egg=google-cloud-bigquery-storage&subdirectory=packages/google-cloud-bigquery-storage", ) # Print out prerelease package versions session.run("pip", "freeze") diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index 54aa282..0000000 --- a/owlbot.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""This script is used to synthesize generated parts of this library.""" - -import pathlib - -import synthtool as s -from synthtool import gcp -from synthtool.languages import python - -REPO_ROOT = pathlib.Path(__file__).parent.absolute() - -common = gcp.CommonTemplates() - -# ---------------------------------------------------------------------------- -# Add templated files -# ---------------------------------------------------------------------------- - -extras_storage = ["bqstorage"] -extras_bf = ["bqstorage", "bigframes", "geopandas"] -extras_spanner = ["spanner-graph-notebook"] -extras_by_python = { - "3.9": extras_storage, - "3.10": extras_bf, - # Use a middle version of Python to test when no extras are installed. - "3.11": [], - "3.12": extras_storage + extras_spanner, - "3.13": extras_bf, -} -templated_files = common.py_library( - unit_test_python_versions=["3.9", "3.11", "3.12", "3.13"], - system_test_python_versions=["3.9", "3.11", "3.12", "3.13"], - cov_level=100, - unit_test_extras_by_python=extras_by_python, - unit_test_external_dependencies=["google-cloud-testutils"], - system_test_extras_by_python=extras_by_python, - intersphinx_dependencies={ - "pandas": "https://pandas.pydata.org/pandas-docs/stable/", - "pydata-google-auth": "https://pydata-google-auth.readthedocs.io/en/latest/", - }, - default_python_version="3.10", -) -s.move( - templated_files, - excludes=[ - # Multi-processing note isn't relevant, as bigquery-magics is responsible for - # creating clients, not the end user. - "docs/multiprocessing.rst", - "noxfile.py", - "README.rst", - ], -) - -# ---------------------------------------------------------------------------- -# Fixup files -# ---------------------------------------------------------------------------- - -s.replace( - ["noxfile.py"], - r"[\"']google[\"']", - '"bigquery_magics"', -) - - -s.replace( - ["noxfile.py"], - "--cov=google", - "--cov=bigquery_magics", -) - - -# Workaround for https://github.com/googleapis/synthtool/issues/1317 -s.replace( - ["noxfile.py"], - r'extras = "\[\]"', - 'extras = ""', -) - -# ---------------------------------------------------------------------------- -# Samples templates -# ---------------------------------------------------------------------------- - -python.py_samples(skip_readmes=True) - -# ---------------------------------------------------------------------------- -# Final cleanup -# ---------------------------------------------------------------------------- - -s.shell.run(["nox", "-s", "format"], hide_output=False) -for noxfile in REPO_ROOT.glob("samples/**/noxfile.py"): - s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False) diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index c9a3d1e..c326375 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/setup.py b/setup.py index 5fb9599..4bd317a 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,8 @@ # grpc.Channel.close() method isn't added until 1.32.0. # https://github.com/grpc/grpc/pull/15254 "grpcio >= 1.47.0, < 2.0.0", - "grpcio >= 1.49.1, < 2.0.0; python_version>='3.11'", + "grpcio >= 1.49.1, < 2.0.0; python_version >= '3.11' and python_version < '3.14'", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", ], "bigframes": ["bigframes >= 1.17.0"], "geopandas": ["geopandas >= 1.0.1"], @@ -110,6 +111,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/testing/constraints-3.14.txt b/testing/constraints-3.14.txt new file mode 100644 index 0000000..e69de29