mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
python312Packages.backports-zoneinfo: remove
backports-zoneinfo has been removed, since we no longer need to backport to python3.8
This commit is contained in:
parent
b76273df40
commit
cb61b38f6a
14 changed files with 12 additions and 130 deletions
|
@ -7,9 +7,6 @@
|
||||||
# build
|
# build
|
||||||
poetry-core,
|
poetry-core,
|
||||||
|
|
||||||
# runtime
|
|
||||||
backports-zoneinfo,
|
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
pytestCheckHook,
|
pytestCheckHook,
|
||||||
freezegun,
|
freezegun,
|
||||||
|
@ -29,8 +26,6 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ poetry-core ];
|
nativeBuildInputs = [ poetry-core ];
|
||||||
|
|
||||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
freezegun
|
freezegun
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
|
|
|
@ -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 = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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))
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
backports-zoneinfo,
|
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
cached-property,
|
cached-property,
|
||||||
defusedxml,
|
defusedxml,
|
||||||
|
@ -59,7 +58,7 @@ buildPythonPackage rec {
|
||||||
requests-kerberos
|
requests-kerberos
|
||||||
tzdata
|
tzdata
|
||||||
tzlocal
|
tzlocal
|
||||||
] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
|
];
|
||||||
|
|
||||||
optional-dependencies = {
|
optional-dependencies = {
|
||||||
complete = [
|
complete = [
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
replaceVars,
|
replaceVars,
|
||||||
pythonOlder,
|
|
||||||
hatch-vcs,
|
hatch-vcs,
|
||||||
hatchling,
|
hatchling,
|
||||||
backports-zoneinfo,
|
|
||||||
python-dateutil,
|
python-dateutil,
|
||||||
tzdata,
|
tzdata,
|
||||||
hypothesis,
|
hypothesis,
|
||||||
|
@ -39,7 +37,7 @@ buildPythonPackage rec {
|
||||||
dependencies = [
|
dependencies = [
|
||||||
python-dateutil
|
python-dateutil
|
||||||
tzdata
|
tzdata
|
||||||
] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
hypothesis
|
hypothesis
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
azure-identity,
|
azure-identity,
|
||||||
azure-servicebus,
|
azure-servicebus,
|
||||||
azure-storage-queue,
|
azure-storage-queue,
|
||||||
backports-zoneinfo,
|
|
||||||
boto3,
|
boto3,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
confluent-kafka,
|
confluent-kafka,
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
typogrify,
|
typogrify,
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
backports-zoneinfo,
|
|
||||||
blinker,
|
blinker,
|
||||||
docutils,
|
docutils,
|
||||||
feedgenerator,
|
feedgenerator,
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
iconv,
|
iconv,
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
backports-zoneinfo,
|
|
||||||
importlib-resources,
|
importlib-resources,
|
||||||
python-dateutil,
|
python-dateutil,
|
||||||
time-machine,
|
time-machine,
|
||||||
|
@ -69,7 +68,6 @@ buildPythonPackage rec {
|
||||||
]
|
]
|
||||||
++ lib.optional (!isPyPy) [ time-machine ]
|
++ lib.optional (!isPyPy) [ time-machine ]
|
||||||
++ lib.optionals (pythonOlder "3.9") [
|
++ lib.optionals (pythonOlder "3.9") [
|
||||||
backports-zoneinfo
|
|
||||||
importlib-resources
|
importlib-resources
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
setuptools,
|
setuptools,
|
||||||
|
|
||||||
# propagates
|
# propagates
|
||||||
backports-zoneinfo,
|
|
||||||
typing-extensions,
|
typing-extensions,
|
||||||
|
|
||||||
# psycopg-c
|
# psycopg-c
|
||||||
|
@ -153,7 +152,7 @@ buildPythonPackage rec {
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
psycopg-c
|
psycopg-c
|
||||||
typing-extensions
|
typing-extensions
|
||||||
] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
"psycopg"
|
"psycopg"
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
fetchPypi,
|
fetchPypi,
|
||||||
pythonAtLeast,
|
pythonAtLeast,
|
||||||
pythonOlder,
|
pythonOlder,
|
||||||
backports-zoneinfo,
|
|
||||||
python-dateutil,
|
python-dateutil,
|
||||||
setuptools,
|
setuptools,
|
||||||
tzdata,
|
tzdata,
|
||||||
|
@ -28,8 +27,7 @@ buildPythonPackage rec {
|
||||||
nativeBuildInputs = [ setuptools ];
|
nativeBuildInputs = [ setuptools ];
|
||||||
|
|
||||||
propagatedBuildInputs =
|
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 ]);
|
++ (lib.optionals (pythonAtLeast "3.6") [ tzdata ]);
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
|
|
@ -14,10 +14,8 @@
|
||||||
pysocks,
|
pysocks,
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
backports-zoneinfo,
|
|
||||||
pytestCheckHook,
|
pytestCheckHook,
|
||||||
pytest-timeout,
|
pytest-timeout,
|
||||||
pythonOlder,
|
|
||||||
tornado,
|
tornado,
|
||||||
trustme,
|
trustme,
|
||||||
}:
|
}:
|
||||||
|
@ -43,15 +41,12 @@ let
|
||||||
socks = [ pysocks ];
|
socks = [ pysocks ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeCheckInputs =
|
nativeCheckInputs = [
|
||||||
[
|
pytest-timeout
|
||||||
pytest-timeout
|
pytestCheckHook
|
||||||
pytestCheckHook
|
tornado
|
||||||
tornado
|
trustme
|
||||||
trustme
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
||||||
]
|
|
||||||
++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ]
|
|
||||||
++ lib.flatten (builtins.attrValues optional-dependencies);
|
|
||||||
|
|
||||||
# Tests in urllib3 are mostly timeout-based instead of event-based and
|
# Tests in urllib3 are mostly timeout-based instead of event-based and
|
||||||
# are therefore inherently flaky. On your own machine, the tests will
|
# are therefore inherently flaky. On your own machine, the tests will
|
||||||
|
|
|
@ -95,7 +95,7 @@ let
|
||||||
--replace-fail "poetry>=1.0.0b1" "poetry-core" \
|
--replace-fail "poetry>=1.0.0b1" "poetry-core" \
|
||||||
--replace-fail "poetry.masonry" "poetry.core.masonry"
|
--replace-fail "poetry.masonry" "poetry.core.masonry"
|
||||||
'';
|
'';
|
||||||
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [
|
propagatedBuildInputs = (oldAttrs.propagatedBuildInputs or []) ++ [
|
||||||
self.pytz
|
self.pytz
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
|
@ -68,6 +68,7 @@ mapAliases ({
|
||||||
awkward0 = throw "awkward0 has been removed, use awkward instead"; # added 2022-12-13
|
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
|
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
|
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_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_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
|
backports_shutil_get_terminal_size = backports-shutil-get-terminal-size; # added 2024-04-21
|
||||||
|
|
|
@ -1446,8 +1446,6 @@ self: super: with self; {
|
||||||
|
|
||||||
backports-tarfile = callPackage ../development/python-modules/backports-tarfile { };
|
backports-tarfile = callPackage ../development/python-modules/backports-tarfile { };
|
||||||
|
|
||||||
backports-zoneinfo = callPackage ../development/python-modules/backports-zoneinfo { };
|
|
||||||
|
|
||||||
bacpypes = callPackage ../development/python-modules/bacpypes { };
|
bacpypes = callPackage ../development/python-modules/bacpypes { };
|
||||||
|
|
||||||
bagit = callPackage ../development/python-modules/bagit { };
|
bagit = callPackage ../development/python-modules/bagit { };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue