From bd4d927a99b794d6f4127ee09c2397426307b8db Mon Sep 17 00:00:00 2001 From: Damien Baty Date: Thu, 23 Apr 2026 17:45:59 +0200 Subject: [PATCH] Drop support of Python 3.9 Python 3.9 has reached its end of life 6 months ago (2025-10-31). See https://devguide.python.org/versions/ --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- README.rst | 1 + changelog.rst | 1 + pgcli/main.py | 5 ++--- pyproject.toml | 3 +-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6a41a6eb..ef79e43d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] services: postgres: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c02a9337b..318622b8d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] services: postgres: diff --git a/README.rst b/README.rst index 6dc4f9e8a..fed74596e 100644 --- a/README.rst +++ b/README.rst @@ -341,6 +341,7 @@ Pgcli dropped support for: * Python<3.8 as of 4.0.0. * Python<3.9 as of 4.2.0. +* Python<10 as of 4.5.0. Thanks: ------- diff --git a/changelog.rst b/changelog.rst index a6469b973..c1f1b8a2d 100644 --- a/changelog.rst +++ b/changelog.rst @@ -8,6 +8,7 @@ Features: reflects the current editing mode: beam in INSERT, block in NORMAL, underline in REPLACE. Uses prompt_toolkit's ``ModalCursorShapeConfig``. * Add support of Python 3.14. +* Drop support of Python 3.9. Bug fixes: ---------- diff --git a/pgcli/main.py b/pgcli/main.py index 1d6ca1a9d..b9bfd65ae 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -17,7 +17,6 @@ import pathlib import platform from time import time, sleep -from typing import Optional from cli_helpers.tabular_output import TabularOutputFormatter from cli_helpers.tabular_output.preprocessors import ( @@ -184,8 +183,8 @@ def __init__( prompt_dsn=None, auto_vertical_output=False, warn=None, - ssh_tunnel_url: Optional[str] = None, - log_file: Optional[str] = None, + ssh_tunnel_url: str | None = None, + log_file: str | None = None, ): self.force_passwd_prompt = force_passwd_prompt self.never_passwd_prompt = never_passwd_prompt diff --git a/pyproject.toml b/pyproject.toml index 3b7d85741..224043f03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,6 @@ classifiers = [ "Operating System :: Unix", "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", @@ -22,7 +21,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] urls = { Homepage = "https://pgcli.com" } -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "pgspecial>=2.0.0", # Click 8.1.8 through 8.3.0 have broken pager invocation for multi-argument PAGER values, which causes behave test failures.