From c7e226a9c6e016b3045e0c06b1e75e6308dacd95 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Tue, 7 Apr 2026 14:06:18 +0200 Subject: [PATCH 1/3] python3Packages.requests-cache: 1.2.1 -> 1.3.1 Changelog: https://github.com/requests-cache/requests-cache/blob/v1.3.1/HISTORY.md --- .../python-modules/requests-cache/default.nix | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/requests-cache/default.nix b/pkgs/development/python-modules/requests-cache/default.nix index 329d359480a0..d3308e715747 100644 --- a/pkgs/development/python-modules/requests-cache/default.nix +++ b/pkgs/development/python-modules/requests-cache/default.nix @@ -2,14 +2,13 @@ lib, attrs, buildPythonPackage, - bson, + hatchling, boto3, botocore, cattrs, fetchFromGitHub, itsdangerous, platformdirs, - poetry-core, psutil, pymongo, pytestCheckHook, @@ -23,27 +22,27 @@ rich, tenacity, time-machine, - timeout-decorator, ujson, + orjson, urllib3, url-normalize, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "requests-cache"; - version = "1.2.1"; + version = "1.3.1"; pyproject = true; src = fetchFromGitHub { owner = "requests-cache"; repo = "requests-cache"; - tag = "v${version}"; - hash = "sha256-juRCcBUr+Ko6kVPpUapwRbUGqWLKaRiCqppOc3S5FMU="; + tag = "v${finalAttrs.version}"; + hash = "sha256-t9SJ+enZHHYPRXaSrPop2hVOagE4oMnuXExO2DeNttc="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ attrs cattrs platformdirs @@ -57,12 +56,15 @@ buildPythonPackage rec { boto3 botocore ]; - mongodbo = [ pymongo ]; + mongodb = [ pymongo ]; redis = [ redis ]; - bson = [ bson ]; - json = [ ujson ]; security = [ itsdangerous ]; yaml = [ pyyaml ]; + all = [ + orjson + ujson + ] + ++ (with finalAttrs.optional-dependencies; dynamodb ++ mongodb ++ redis ++ security ++ yaml); }; nativeCheckInputs = [ @@ -75,10 +77,7 @@ buildPythonPackage rec { rich tenacity time-machine - timeout-decorator - ] - ++ optional-dependencies.json - ++ optional-dependencies.security; + ]; preCheck = '' export HOME=$(mktemp -d); @@ -90,11 +89,8 @@ buildPythonPackage rec { ]; disabledTests = [ - # Tests are flaky in the sandbox - "test_remove_expired_responses" - # Tests that broke with urllib 2.0.5 + # Flaky "test_request_only_if_cached__stale_if_error__expired" - "test_stale_if_error__error_code" ]; pythonImportsCheck = [ "requests_cache" ]; @@ -102,8 +98,8 @@ buildPythonPackage rec { meta = { description = "Persistent cache for requests library"; homepage = "https://github.com/reclosedev/requests-cache"; - changelog = "https://github.com/requests-cache/requests-cache/blob/v${version}/HISTORY.md"; + changelog = "https://github.com/requests-cache/requests-cache/blob/$v{finalAttrs.version}/HISTORY.md"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ fab ]; }; -} +}) From 7c577fa670dc9e612907218e84f07c08aef23e16 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Tue, 7 Apr 2026 16:05:27 +0200 Subject: [PATCH 2/3] mnamer: fix build for requests-cache 1.3.1 --- .../fix-requests-cache-version-check.patch | 33 +++++++++++++++++++ pkgs/by-name/mn/mnamer/package.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/by-name/mn/mnamer/fix-requests-cache-version-check.patch diff --git a/pkgs/by-name/mn/mnamer/fix-requests-cache-version-check.patch b/pkgs/by-name/mn/mnamer/fix-requests-cache-version-check.patch new file mode 100644 index 000000000000..2a29976187d0 --- /dev/null +++ b/pkgs/by-name/mn/mnamer/fix-requests-cache-version-check.patch @@ -0,0 +1,33 @@ +From 634d56361e967adcd81c3cb839458d3aea99e5db Mon Sep 17 00:00:00 2001 +From: Skid <26208369+skid9000@users.noreply.github.com> +Date: Sun, 22 Feb 2026 20:28:03 +0100 +Subject: [PATCH] Fix requests_cache version check for 1.3.0 + +Using the same method provided here : https://github.com/requests-cache/requests-cache/commit/61fae61e07222777eb26a6fb670c4ee6a9cdddb7 +--- + mnamer/const.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/mnamer/const.py b/mnamer/const.py +index 66510ebf..bf321f41 100644 +--- a/mnamer/const.py ++++ b/mnamer/const.py +@@ -4,6 +4,7 @@ + from pathlib import Path + from platform import platform, python_version + from sys import argv, gettrace, version_info ++from importlib.metadata import version as pkg_version, PackageNotFoundError + + VERSION: str + +@@ -37,8 +38,8 @@ + requests_version = "N/A" + + try: +- from requests_cache import __version__ as requests_cache_version +-except ModuleNotFoundError: ++ requests_cache_version = pkg_version('requests_cache') ++except PackageNotFoundError: + requests_cache_version = "N/A" + + try: diff --git a/pkgs/by-name/mn/mnamer/package.nix b/pkgs/by-name/mn/mnamer/package.nix index d80ae16df58e..e4196ee96fbb 100644 --- a/pkgs/by-name/mn/mnamer/package.nix +++ b/pkgs/by-name/mn/mnamer/package.nix @@ -35,6 +35,8 @@ python3Packages.buildPythonApplication (finalAttrs: { patches = [ # https://github.com/jkwill87/mnamer/pull/291 ./cached_session_error.patch + # https://github.com/jkwill87/mnamer/pull/333 + ./fix-requests-cache-version-check.patch ]; nativeCheckInputs = [ python3Packages.pytestCheckHook ]; From d6244a71293353e87b7f0bec371b9e2bad5e018c Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Wed, 9 Jul 2025 13:29:59 +0200 Subject: [PATCH 3/3] open-web-calendar: 1.49 -> 1.51 Changelog: https://open-web-calendar.quelltext.eu/changelog/#v151 --- pkgs/by-name/op/open-web-calendar/package.nix | 11 +++++++---- .../python-modules/requests-cache/default.nix | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/op/open-web-calendar/package.nix b/pkgs/by-name/op/open-web-calendar/package.nix index 7ea2c1781495..b63ad48acbd2 100644 --- a/pkgs/by-name/op/open-web-calendar/package.nix +++ b/pkgs/by-name/op/open-web-calendar/package.nix @@ -12,13 +12,13 @@ let in python.pkgs.buildPythonApplication (finalAttrs: { pname = "open-web-calendar"; - version = "1.49"; + version = "1.51"; pyproject = true; src = fetchPypi { inherit (finalAttrs) version; pname = "open_web_calendar"; - hash = "sha256-vtmIqiF85zn8CiMUWsCKJUzfiiK/j+xlZIyuIMGxR4I="; + hash = "sha256-r+7ZKdNOhjnjE1MBNAkni4Rrpx4DMRhUaP1Mmk5wzOo="; }; # The Pypi tarball doesn't contain open_web_calendars/features @@ -39,7 +39,6 @@ python.pkgs.buildPythonApplication (finalAttrs: { dependencies = with python.pkgs; [ - flask-caching flask-allowed-hosts flask icalendar @@ -48,6 +47,7 @@ python.pkgs.buildPythonApplication (finalAttrs: { bcrypt caldav requests + requests-cache pyyaml recurring-ical-events gunicorn @@ -59,7 +59,10 @@ python.pkgs.buildPythonApplication (finalAttrs: { ] ++ requests.optional-dependencies.socks; - nativeCheckInputs = with python.pkgs; [ pytestCheckHook ]; + nativeCheckInputs = with python.pkgs; [ + pytestCheckHook + pytest-responses + ]; enabledTestPaths = [ "open_web_calendar/test" ]; diff --git a/pkgs/development/python-modules/requests-cache/default.nix b/pkgs/development/python-modules/requests-cache/default.nix index d3308e715747..92d46c37db03 100644 --- a/pkgs/development/python-modules/requests-cache/default.nix +++ b/pkgs/development/python-modules/requests-cache/default.nix @@ -64,7 +64,7 @@ buildPythonPackage (finalAttrs: { orjson ujson ] - ++ (with finalAttrs.optional-dependencies; dynamodb ++ mongodb ++ redis ++ security ++ yaml); + ++ lib.concatAttrValues (lib.removeAttrs finalAttrs.optional-dependencies [ "all" ]); }; nativeCheckInputs = [