diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 692ec5b6..130dd1fe 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -11,7 +11,6 @@ branchProtectionRules: - 'OwlBot Post Processor' - 'docs' - 'lint' - - 'unit (3.8)' - 'unit (3.9)' - 'unit (3.10)' - 'unit (3.11)' @@ -20,7 +19,6 @@ branchProtectionRules: - 'cover' - 'Kokoro' - 'Samples - Lint' - - 'Samples - Python 3.8' - 'Samples - Python 3.9' - 'Samples - Python 3.10' - 'Samples - Python 3.11' diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 4a4c5d93..7137d0ad 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.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout uses: actions/checkout@v4 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 15b14528..be5a8124 100644 --- a/.kokoro/presubmit/system-3.8.cfg +++ b/.kokoro/presubmit/system-3.9.cfg @@ -3,5 +3,5 @@ # Only run the following session(s) env_vars: { key: "NOX_SESSION" - value: "system-3.8" -} \ No newline at end of file + value: "system-3.9" +} diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 28f54669..2e8e9860 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows. + 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -148,7 +148,7 @@ Running System Tests .. note:: - System tests are only configured to run under Python 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13. + System tests are only configured to run under Python 3.9, 3.10, 3.11, 3.12 and 3.13. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local @@ -221,14 +221,12 @@ Supported Python Versions We support: -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ -.. _Python 3.8: https://docs.python.org/3.8/ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ .. _Python 3.11: https://docs.python.org/3.11/ @@ -241,7 +239,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-bigquery-pandas/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.8. +We also explicitly decided to support Python 3 beginning with version 3.9. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/noxfile.py b/noxfile.py index 52bdcde1..e246b05d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -35,7 +35,7 @@ DEFAULT_PYTHON_VERSION = "3.10" -UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -57,7 +57,7 @@ "3.9": [], } -SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", diff --git a/owlbot.py b/owlbot.py index 35e19fcf..1d5d912f 100644 --- a/owlbot.py +++ b/owlbot.py @@ -35,8 +35,8 @@ extras = ["tqdm", "geopandas"] templated_files = common.py_library( default_python_version="3.10", - unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"], - system_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"], + unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"], + system_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"], cov_level=96, unit_test_external_dependencies=["freezegun"], unit_test_extras=extras, @@ -57,8 +57,9 @@ "docs/multiprocessing.rst", "noxfile.py", "README.rst", - # exclude this file as we have an alternate prerelease.cfg ".github/workflows/docs.yml", + ".github/sync-repo-settings.yaml", + # exclude this file as we have an alternate prerelease.cfg ".kokoro/presubmit/prerelease-deps.cfg", ".kokoro/presubmit/presubmit.cfg", ], diff --git a/pandas_gbq/__init__.py b/pandas_gbq/__init__.py index 184f8c44..a842c81f 100644 --- a/pandas_gbq/__init__.py +++ b/pandas_gbq/__init__.py @@ -11,14 +11,14 @@ from .gbq import read_gbq, to_gbq # noqa sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version() -if sys_major == 3 and sys_minor in (7, 8): +if sys_major == 3 and sys_minor < 9: warnings.warn( - "The python-bigquery library will stop supporting Python 3.7 " - "and Python 3.8 in a future major release expected in Q4 2024. " - f"Your Python version is {sys_major}.{sys_minor}.{sys_micro}. We " - "recommend that you update soon to ensure ongoing support. For " - "more details, see: [Google Cloud Client Libraries Supported Python Versions policy](https://cloud.google.com/python/docs/supported-python-versions)", - PendingDeprecationWarning, + "pandas-gbq no longer supports Python versions older than 3.9. " + "Your Python version is " + f"{sys_major}.{sys_minor}.{sys_micro}. Please update " + "to Python 3.9 or newer to ensure ongoing support. For more details, " + "see: https://cloud.google.com/python/docs/supported-python-versions", + FutureWarning, ) __version__ = pandas_gbq_version.__version__ diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index a451f10a..ca1e1d0c 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,6 +1,5 @@ google-cloud-bigquery-storage==2.29.1 google-cloud-bigquery==3.30.0 pandas-gbq==0.28.0 -pandas===2.0.3; python_version == '3.8' -pandas==2.2.3; python_version >= '3.9' -pyarrow==19.0.1; python_version >= '3.9' +pandas==2.2.3 +pyarrow==19.0.1 diff --git a/setup.py b/setup.py index 681a80aa..893d801b 100644 --- a/setup.py +++ b/setup.py @@ -85,7 +85,6 @@ "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -99,7 +98,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.8", + python_requires=">=3.9", include_package_data=True, zip_safe=False, ) diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt deleted file mode 100644 index 8d6ef4f4..00000000 --- a/testing/constraints-3.8.txt +++ /dev/null @@ -1,22 +0,0 @@ -# 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 -# protobuf==3.19.5 -db-dtypes==1.0.4 -geopandas==0.9.0 -google-api-core==2.10.2 -google-auth==2.13.0 -google-auth-oauthlib==0.7.0 -google-cloud-bigquery==3.4.2 -google-cloud-bigquery-storage==2.16.2 -numpy==1.18.1 -pandas==1.1.4 -pyarrow==4.0.0 -pydata-google-auth==1.5.0 -Shapely==1.8.4 -tqdm==4.23.0 -packaging==22.0.0 diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index 76864a66..db8a499a 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -1,2 +1,22 @@ +# 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.0.4 numpy==1.19.4 pandas==1.1.4 +pyarrow==4.0.0 +pydata-google-auth==1.5.0 +google-api-core==2.10.2 +google-auth==2.13.0 +google-auth-oauthlib==0.7.0 +google-cloud-bigquery==3.4.2 +packaging==22.0.0 +# Extras +google-cloud-bigquery-storage==2.16.2 +tqdm==4.23.0 +geopandas==0.9.0 +Shapely==1.8.4