python312Packages.backports-zoneinfo: remove

backports-zoneinfo has been removed, since we no longer need to backport
to python3.8
This commit is contained in:
natsukium 2024-11-12 21:36:01 +09:00
parent b76273df40
commit cb61b38f6a
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53
14 changed files with 12 additions and 130 deletions

View File

@ -7,9 +7,6 @@
# build
poetry-core,
# runtime
backports-zoneinfo,
# tests
pytestCheckHook,
freezegun,
@ -29,8 +26,6 @@ buildPythonPackage rec {
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
nativeCheckInputs = [
freezegun
pytestCheckHook

View File

@ -1,80 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonAtLeast,
pythonOlder,
python,
substituteAll,
importlib-resources,
tzdata,
hypothesis,
pytestCheckHook,
fetchpatch,
}:
buildPythonPackage rec {
pname = "backports-zoneinfo";
version = "0.2.1";
format = "setuptools";
disabled = pythonAtLeast "3.9";
src = fetchFromGitHub {
owner = "pganssle";
repo = "zoneinfo";
rev = version;
hash = "sha256-00xdDOVdDanfsjQTd3yjMN2RFGel4cWRrAA3CvSnl24=";
};
# Make sure test data update patch applies
prePatch = ''
substituteInPlace tests/data/zoneinfo_data.json --replace \"2020a\" \"2021a\"
'';
patches = [
# Update test suite's test data to zoneinfo 2022a
# https://github.com/pganssle/zoneinfo/pull/115
(fetchpatch {
name = "backports-zoneinfo-2022a-update-test-data1.patch";
url = "https://github.com/pganssle/zoneinfo/pull/115/commits/837e2a0f9f1a1332e4233f83e3648fa564a9ec9e.patch";
sha256 = "196knwa212mr0b7zsh8papzr3f5mii87gcjjjx1r9zzvmk3g3ri0";
})
(fetchpatch {
name = "backports-zoneinfo-2022a-update-test-data2.patch";
url = "https://github.com/pganssle/zoneinfo/pull/115/commits/9fd330265b177916d6182249439bb40d5691eb58.patch";
sha256 = "1zxa5bkwi8hbnh4c0qv72wv6vdp5jlxqizfjsc05ymzvwa99cf75";
})
(substituteAll {
name = "zoneinfo-path";
src = ./zoneinfo.patch;
zoneinfo = "${tzdata}/${python.sitePackages}/tzdata/zoneinfo";
})
];
propagatedBuildInputs = [ tzdata ] ++ lib.optionals (pythonOlder "3.7") [ importlib-resources ];
pythonImportsCheck = [ "backports.zoneinfo" ];
nativeCheckInputs = [
hypothesis
pytestCheckHook
];
disabledTests = [
# AssertionError: 'AEDT' != 'AEST'
"test_folds_and_gaps"
# AssertionError: 0 != 1 : (datetime.datetime(1917, 3, 25, 2, 0, 1, tzinfo=backports.zoneinfo.ZoneInfo(key='Australia/Sydney')), datetime.datetime(1917, 3, 24, 15, 0, tzinfo=datetime.timezone.utc))
"test_folds_from_utc"
# backports.zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Eurasia/Badzone'
"test_bad_keys"
];
meta = with lib; {
description = "Backport of the standard library module zoneinfo";
homepage = "https://github.com/pganssle/zoneinfo";
license = licenses.asl20;
maintainers = [ ];
};
}

View File

@ -1,17 +0,0 @@
diff --git a/src/backports/zoneinfo/_tzpath.py b/src/backports/zoneinfo/_tzpath.py
index 9baaf6b..3f842af 100644
--- a/src/backports/zoneinfo/_tzpath.py
+++ b/src/backports/zoneinfo/_tzpath.py
@@ -24,10 +24,7 @@ def reset_tzpath(to=None):
base_tzpath = _parse_python_tzpath(env_var)
elif sys.platform != "win32":
base_tzpath = [
- "/usr/share/zoneinfo",
- "/usr/lib/zoneinfo",
- "/usr/share/lib/zoneinfo",
- "/etc/zoneinfo",
+ "@zoneinfo@"
]
base_tzpath.sort(key=lambda x: not os.path.exists(x))

View File

@ -1,6 +1,5 @@
{
lib,
backports-zoneinfo,
buildPythonPackage,
cached-property,
defusedxml,
@ -59,7 +58,7 @@ buildPythonPackage rec {
requests-kerberos
tzdata
tzlocal
] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
];
optional-dependencies = {
complete = [

View File

@ -3,10 +3,8 @@
buildPythonPackage,
fetchFromGitHub,
replaceVars,
pythonOlder,
hatch-vcs,
hatchling,
backports-zoneinfo,
python-dateutil,
tzdata,
hypothesis,
@ -39,7 +37,7 @@ buildPythonPackage rec {
dependencies = [
python-dateutil
tzdata
] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
];
nativeCheckInputs = [
hypothesis

View File

@ -4,7 +4,6 @@
azure-identity,
azure-servicebus,
azure-storage-queue,
backports-zoneinfo,
boto3,
buildPythonPackage,
confluent-kafka,

View File

@ -14,7 +14,6 @@
typogrify,
# dependencies
backports-zoneinfo,
blinker,
docutils,
feedgenerator,

View File

@ -14,7 +14,6 @@
iconv,
# dependencies
backports-zoneinfo,
importlib-resources,
python-dateutil,
time-machine,
@ -69,7 +68,6 @@ buildPythonPackage rec {
]
++ lib.optional (!isPyPy) [ time-machine ]
++ lib.optionals (pythonOlder "3.9") [
backports-zoneinfo
importlib-resources
];

View File

@ -12,7 +12,6 @@
setuptools,
# propagates
backports-zoneinfo,
typing-extensions,
# psycopg-c
@ -153,7 +152,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
psycopg-c
typing-extensions
] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
];
pythonImportsCheck = [
"psycopg"

View File

@ -4,7 +4,6 @@
fetchPypi,
pythonAtLeast,
pythonOlder,
backports-zoneinfo,
python-dateutil,
setuptools,
tzdata,
@ -28,8 +27,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs =
(lib.optionals (pythonAtLeast "3.6" && pythonOlder "3.9") [ backports-zoneinfo ])
++ (lib.optionals (pythonOlder "3.6") [ python-dateutil ])
(lib.optionals (pythonOlder "3.6") [ python-dateutil ])
++ (lib.optionals (pythonAtLeast "3.6") [ tzdata ]);
nativeCheckInputs = [

View File

@ -14,10 +14,8 @@
pysocks,
# tests
backports-zoneinfo,
pytestCheckHook,
pytest-timeout,
pythonOlder,
tornado,
trustme,
}:
@ -43,15 +41,12 @@ let
socks = [ pysocks ];
};
nativeCheckInputs =
[
pytest-timeout
pytestCheckHook
tornado
trustme
]
++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ]
++ lib.flatten (builtins.attrValues optional-dependencies);
nativeCheckInputs = [
pytest-timeout
pytestCheckHook
tornado
trustme
] ++ lib.flatten (builtins.attrValues optional-dependencies);
# Tests in urllib3 are mostly timeout-based instead of event-based and
# are therefore inherently flaky. On your own machine, the tests will

View File

@ -95,7 +95,7 @@ let
--replace-fail "poetry>=1.0.0b1" "poetry-core" \
--replace-fail "poetry.masonry" "poetry.core.masonry"
'';
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [
propagatedBuildInputs = (oldAttrs.propagatedBuildInputs or []) ++ [
self.pytz
];
});

View File

@ -68,6 +68,7 @@ mapAliases ({
awkward0 = throw "awkward0 has been removed, use awkward instead"; # added 2022-12-13
azure-functions-devops-build = throw "azure-functions-devops-build has been removed, because it is abandoned"; # added 2024-10-04
Babel = babel; # added 2022-05-06
backports-zoneinfo = throw "backports-zoneinfo has been removed, since we no longer need to backport to python3.8"; # added 2024-11-12
backports_csv = throw "backports_csv has been removed, since we no longer need to backport to python2"; # added 2023-07-28
backports_functools_lru_cache = throw "backports_functools_lru_cache has been removed, since we no longer need to backport to python3.2"; # added 2023-07-28
backports_shutil_get_terminal_size = backports-shutil-get-terminal-size; # added 2024-04-21

View File

@ -1446,8 +1446,6 @@ self: super: with self; {
backports-tarfile = callPackage ../development/python-modules/backports-tarfile { };
backports-zoneinfo = callPackage ../development/python-modules/backports-zoneinfo { };
bacpypes = callPackage ../development/python-modules/bacpypes { };
bagit = callPackage ../development/python-modules/bagit { };