From 653612e2e92eaf6033ed014b33fd3a92d33443cc Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 6 Jun 2026 23:39:07 -0400 Subject: [PATCH 1/2] pyproject: support Python 3.15 Fedora 45 is already starting to build with it. --- .github/workflows/ci.yml | 2 +- pyproject.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10a3ca516..86bc6bb81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15.0-beta.2"] tox-test: ["default"] steps: diff --git a/pyproject.toml b/pyproject.toml index 67a1c3e14..de33cb412 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,10 +20,11 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Topic :: Communications", "Topic :: Utilities", ] -requires-python = ">=3.10,<3.15" +requires-python = ">=3.10,<3.16" dependencies = [ "click>=3.2", "click_log>=0.2.0", From bc181c736c191883dae8646f10bb176e2820bb5f Mon Sep 17 00:00:00 2001 From: Filipe Rosset Date: Tue, 9 Jun 2026 07:53:49 -0400 Subject: [PATCH 2/2] strptime: monkey patch for day-without-year behavior change --- khal/__init__.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/khal/__init__.py b/khal/__init__.py index 36b60842b..e02c37c48 100644 --- a/khal/__init__.py +++ b/khal/__init__.py @@ -39,3 +39,23 @@ __description__ = "A standards based terminal calendar" __license__ = "Expat/MIT, see COPYING" __homepage__ = "https://lostpackets.de/khal/" + + +# Monkeypatch _strptime to support Python 3.15+ where parsing day of month (%d or %e) +# without a year directive raises a ValueError. +try: + import _strptime +except ImportError: + pass +else: + _orig_strptime = _strptime._strptime + + def _custom_strptime(data_string, format_string): + has_year = "%y" in format_string or "%Y" in format_string + has_day = "%d" in format_string or "%e" in format_string + if has_day and not has_year: + data_string = f"{data_string} 2024" + format_string = f"{format_string} %Y" + return _orig_strptime(data_string, format_string) + + _strptime._strptime = _custom_strptime