mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
python312Packages: remove some old backport modules (#355418)
This commit is contained in:
commit
d43eaad626
@ -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
|
||||
|
@ -1,45 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
setuptools-scm,
|
||||
wheel,
|
||||
pytestCheckHook,
|
||||
pytest-mock,
|
||||
pytest-sugar,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "backports-cached-property";
|
||||
version = "1.0.2";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "penguinolog";
|
||||
repo = "backports.cached_property";
|
||||
rev = version;
|
||||
hash = "sha256-rdgKbVQaELilPrN4ve8RbbaLiT14Xex0esy5vUX2ZBc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
|
||||
propagatedBuildInputs = [ wheel ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
pytest-sugar
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "backports.cached_property" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python 3.8 functools.cached_property backport to python 3.6";
|
||||
homepage = "https://github.com/penguinolog/backports.cached_property";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ izorkin ];
|
||||
};
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pytest,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
if !(pythonOlder "3.3") then
|
||||
null
|
||||
else
|
||||
buildPythonPackage {
|
||||
pname = "backports-shutil-get-terminal-size";
|
||||
version = "unstable-2016-02-21";
|
||||
|
||||
# there have been numerous fixes committed since the initial release.
|
||||
# Most notably fixing a problem where the backport would always return
|
||||
# terminal size 0. See https://trac.sagemath.org/ticket/25320#comment:5.
|
||||
# Unfortunately the maintainer seems inactive and has not responded to
|
||||
# a request for a new release since 2016:
|
||||
# https://github.com/chrippa/backports.shutil_get_terminal_size/issues/7
|
||||
src = fetchFromGitHub {
|
||||
owner = "chrippa";
|
||||
repo = "backports.shutil_get_terminal_size";
|
||||
rev = "159e269450dbf37c3a837f6ea7e628d59acbb96a";
|
||||
sha256 = "17sgv8vg0xxfdnca45l1mmwwvj29gich5c8kqznnj51kfccch7sg";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ pytest ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Backport of the get_terminal_size function from Python 3.3’s shutil";
|
||||
homepage = "https://github.com/chrippa/backports.shutil_get_terminal_size";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.sage.members;
|
||||
};
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
fetchPypi,
|
||||
buildPythonPackage,
|
||||
pytest,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "backports-shutil-which";
|
||||
version = "3.5.2";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "backports.shutil_which";
|
||||
inherit version;
|
||||
sha256 = "fe39f567cbe4fad89e8ac4dbeb23f87ef80f7fe8e829669d0221ecdb0437c133";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ pytest ];
|
||||
|
||||
checkPhase = ''
|
||||
py.test test
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Backport of shutil.which from Python 3.3";
|
||||
homepage = "https://github.com/minrk/backports.shutil_which";
|
||||
license = licenses.psfl;
|
||||
maintainers = with maintainers; [ jluttine ];
|
||||
};
|
||||
}
|
@ -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,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
backports-cached-property,
|
||||
blessed,
|
||||
buildPythonPackage,
|
||||
cwcwidth,
|
||||
@ -29,7 +28,7 @@ buildPythonPackage rec {
|
||||
propagatedBuildInputs = [
|
||||
blessed
|
||||
cwcwidth
|
||||
] ++ lib.optionals (pythonOlder "3.8") [ backports-cached-property ];
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pyte
|
||||
|
@ -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
|
||||
|
@ -4,7 +4,6 @@
|
||||
azure-identity,
|
||||
azure-servicebus,
|
||||
azure-storage-queue,
|
||||
backports-zoneinfo,
|
||||
boto3,
|
||||
buildPythonPackage,
|
||||
confluent-kafka,
|
||||
|
@ -13,7 +13,6 @@
|
||||
unidecode,
|
||||
mock,
|
||||
pytestCheckHook,
|
||||
backports-shutil-which,
|
||||
configargparse,
|
||||
python-daemon,
|
||||
pymsgbox,
|
||||
@ -43,9 +42,11 @@ buildPythonPackage rec {
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
# https://github.com/romanz/trezor-agent/pull/481
|
||||
pythonRemoveDeps = [ "backports.shutil-which" ];
|
||||
|
||||
dependencies = [
|
||||
unidecode
|
||||
backports-shutil-which
|
||||
configargparse
|
||||
python-daemon
|
||||
pymsgbox
|
||||
|
@ -14,7 +14,6 @@
|
||||
typogrify,
|
||||
|
||||
# dependencies
|
||||
backports-zoneinfo,
|
||||
blinker,
|
||||
docutils,
|
||||
feedgenerator,
|
||||
|
@ -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
|
||||
];
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 = [
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
];
|
||||
});
|
||||
|
@ -68,6 +68,10 @@ 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-cached-property = throw "backports-cached-property has been removed, since we no longer need to backport to python3.7"; # added 2024-11-12
|
||||
backports-shutil-get-terminal-size = throw "backports-shutil-get-terminal-size has been removed, since we no longer need to backport to python3.2"; # added 2024-11-12
|
||||
backports-shutil-which = throw "backports-shutil-which has been removed, since we no longer need to backport to python3.2"; # added 2024-11-12
|
||||
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
|
||||
|
@ -1436,22 +1436,14 @@ self: super: with self; {
|
||||
|
||||
backoff = callPackage ../development/python-modules/backoff { };
|
||||
|
||||
backports-cached-property = callPackage ../development/python-modules/backports-cached-property { };
|
||||
|
||||
backports-datetime-fromisoformat = callPackage ../development/python-modules/backports-datetime-fromisoformat { };
|
||||
|
||||
backports-entry-points-selectable = callPackage ../development/python-modules/backports-entry-points-selectable { };
|
||||
|
||||
backports-shutil-get-terminal-size = callPackage ../development/python-modules/backports-shutil-get-terminal-size { };
|
||||
|
||||
backports-shutil-which = callPackage ../development/python-modules/backports-shutil-which { };
|
||||
|
||||
backports-strenum = callPackage ../development/python-modules/backports-strenum { };
|
||||
|
||||
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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user