From d73f21fe4a982741f8d8e3029d1e33d3efabfd53 Mon Sep 17 00:00:00 2001 From: graingert-coef <151018808+graingert-coef@users.noreply.github.com> Date: Thu, 3 Sep 2026 10:22:11 +0100 Subject: [PATCH 1/2] feat: drop support for Python 3.9 Bumps requires-python to >=3.10, updates the trove classifiers for 3.10-3.14 and raises the mypy python_version floor to match. per https://github.com/GoogleCloudPlatform/cloud-sql-python-connector/pull/1339 --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 93ed5eaf..c2e2cca6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ name = "cloud-sql-python-connector" authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }] license = "Apache-2.0" license-files = ["LICENSE"] -requires-python = ">=3.9" +requires-python = ">=3.10" readme = "README.md" classifiers = [ # Should be one of: @@ -33,11 +33,11 @@ classifiers = [ "Intended Audience :: Developers", "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", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", ] dependencies = [ @@ -77,7 +77,7 @@ version = { attr = "google.cloud.sql.connector.version.__version__" } include = ["google*"] [tool.mypy] -python_version = "3.9" +python_version = "3.10" namespace_packages = true ignore_missing_imports = true warn_unused_configs = true From b539a42f5956c54db3ed8f72020cda4a316df450 Mon Sep 17 00:00:00 2001 From: kgala2 Date: Mon, 28 Sep 2026 21:38:55 +0000 Subject: [PATCH 2/2] style: import Callable from collections.abc for py310 ruff UP035 --- google/cloud/sql/connector/connector.py | 3 ++- google/cloud/sql/connector/monitored_cache.py | 3 ++- google/cloud/sql/connector/refresh_utils.py | 3 ++- tests/unit/mocks.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/google/cloud/sql/connector/connector.py b/google/cloud/sql/connector/connector.py index 7a9964ca..853f06ef 100644 --- a/google/cloud/sql/connector/connector.py +++ b/google/cloud/sql/connector/connector.py @@ -17,13 +17,14 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from functools import partial import logging import os import socket from threading import Thread from types import TracebackType -from typing import Any, Callable +from typing import Any import google.auth from google.auth.credentials import Credentials diff --git a/google/cloud/sql/connector/monitored_cache.py b/google/cloud/sql/connector/monitored_cache.py index d2ba2290..fe883c52 100644 --- a/google/cloud/sql/connector/monitored_cache.py +++ b/google/cloud/sql/connector/monitored_cache.py @@ -15,9 +15,10 @@ from __future__ import annotations import asyncio +from collections.abc import Callable import logging import ssl -from typing import Any, Callable +from typing import Any import aiohttp diff --git a/google/cloud/sql/connector/refresh_utils.py b/google/cloud/sql/connector/refresh_utils.py index 0edf5c34..4b2c3e2b 100644 --- a/google/cloud/sql/connector/refresh_utils.py +++ b/google/cloud/sql/connector/refresh_utils.py @@ -17,11 +17,12 @@ from __future__ import annotations import asyncio +from collections.abc import Callable import copy import datetime import logging import random -from typing import Any, Callable +from typing import Any import aiohttp from google.auth.credentials import Credentials diff --git a/tests/unit/mocks.py b/tests/unit/mocks.py index bba3a1d7..a694dc5b 100644 --- a/tests/unit/mocks.py +++ b/tests/unit/mocks.py @@ -18,10 +18,11 @@ from __future__ import annotations +from collections.abc import Callable import datetime import json import ssl -from typing import Any, Callable, Literal +from typing import Any, Literal from aiohttp import web from cryptography import x509