open-web-calendar: 1.49 -> 1.51 (#507585)
This commit is contained in:
@@ -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:
|
||||
@@ -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 ];
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
|
||||
@@ -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
|
||||
]
|
||||
++ lib.concatAttrValues (lib.removeAttrs finalAttrs.optional-dependencies [ "all" ]);
|
||||
};
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user