From 18590526ce169ecf792d3999966c4466ba6b4b50 Mon Sep 17 00:00:00 2001 From: Jason Chiu Date: Wed, 15 Apr 2026 16:48:25 -0700 Subject: [PATCH] Drop support for python 3.9, switch min version to 3.10 --- .python-version | 2 +- pyproject.toml | 3 +-- scripts/test | 2 +- src/runloop_api_client/_utils/_utils.py | 20 -------------------- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/.python-version b/.python-version index 43077b246..44677e5cc 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.9.18 +3.10.20 diff --git a/pyproject.toml b/pyproject.toml index 64ca9ee03..461401c61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,11 +18,10 @@ dependencies = [ "uuid-utils>=0.11.0", ] -requires-python = ">= 3.9" +requires-python = ">= 3.10" classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/scripts/test b/scripts/test index 5f30115cb..72e862ac3 100755 --- a/scripts/test +++ b/scripts/test @@ -56,7 +56,7 @@ export DEFER_PYDANTIC_BUILD=false # Note that we need to specify the patch version here so that uv # won't use unstable (alpha, beta, rc) releases for the tests -PY_VERSION_MIN=">=3.9.0" +PY_VERSION_MIN=">=3.10.0" PY_VERSION_MAX=">=3.14.0" function run_tests() { diff --git a/src/runloop_api_client/_utils/_utils.py b/src/runloop_api_client/_utils/_utils.py index 63b8cd602..456cdda9e 100644 --- a/src/runloop_api_client/_utils/_utils.py +++ b/src/runloop_api_client/_utils/_utils.py @@ -344,26 +344,6 @@ def maybe_coerce_boolean(val: str | None) -> bool | None: return coerce_boolean(val) -def removeprefix(string: str, prefix: str) -> str: - """Remove a prefix from a string. - - Backport of `str.removeprefix` for Python < 3.9 - """ - if string.startswith(prefix): - return string[len(prefix) :] - return string - - -def removesuffix(string: str, suffix: str) -> str: - """Remove a suffix from a string. - - Backport of `str.removesuffix` for Python < 3.9 - """ - if string.endswith(suffix): - return string[: -len(suffix)] - return string - - def file_from_path(path: str) -> FileTypes: contents = Path(path).read_bytes() file_name = os.path.basename(path)