diff --git a/pkgs/development/python-modules/astral/default.nix b/pkgs/development/python-modules/astral/default.nix index c6831e4473cb..b51cee7083bb 100644 --- a/pkgs/development/python-modules/astral/default.nix +++ b/pkgs/development/python-modules/astral/default.nix @@ -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 diff --git a/pkgs/development/python-modules/backports-cached-property/default.nix b/pkgs/development/python-modules/backports-cached-property/default.nix deleted file mode 100644 index c2a0bc245915..000000000000 --- a/pkgs/development/python-modules/backports-cached-property/default.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/pkgs/development/python-modules/backports-shutil-get-terminal-size/default.nix b/pkgs/development/python-modules/backports-shutil-get-terminal-size/default.nix deleted file mode 100644 index b70f3acaaea9..000000000000 --- a/pkgs/development/python-modules/backports-shutil-get-terminal-size/default.nix +++ /dev/null @@ -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; - }; - } diff --git a/pkgs/development/python-modules/backports-shutil-which/default.nix b/pkgs/development/python-modules/backports-shutil-which/default.nix deleted file mode 100644 index 07335b5bf6b1..000000000000 --- a/pkgs/development/python-modules/backports-shutil-which/default.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/pkgs/development/python-modules/backports-zoneinfo/default.nix b/pkgs/development/python-modules/backports-zoneinfo/default.nix deleted file mode 100644 index 8dbefd22d281..000000000000 --- a/pkgs/development/python-modules/backports-zoneinfo/default.nix +++ /dev/null @@ -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 = [ ]; - }; -} diff --git a/pkgs/development/python-modules/backports-zoneinfo/zoneinfo.patch b/pkgs/development/python-modules/backports-zoneinfo/zoneinfo.patch deleted file mode 100644 index 69dd75030ab2..000000000000 --- a/pkgs/development/python-modules/backports-zoneinfo/zoneinfo.patch +++ /dev/null @@ -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)) - diff --git a/pkgs/development/python-modules/curtsies/default.nix b/pkgs/development/python-modules/curtsies/default.nix index 7be20c559019..b979610a7411 100644 --- a/pkgs/development/python-modules/curtsies/default.nix +++ b/pkgs/development/python-modules/curtsies/default.nix @@ -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 diff --git a/pkgs/development/python-modules/icalendar/default.nix b/pkgs/development/python-modules/icalendar/default.nix index fb88bcfebc84..4c6d6da0e88e 100644 --- a/pkgs/development/python-modules/icalendar/default.nix +++ b/pkgs/development/python-modules/icalendar/default.nix @@ -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 diff --git a/pkgs/development/python-modules/kombu/default.nix b/pkgs/development/python-modules/kombu/default.nix index 1d04da99d071..c0cbb4a981d0 100644 --- a/pkgs/development/python-modules/kombu/default.nix +++ b/pkgs/development/python-modules/kombu/default.nix @@ -4,7 +4,6 @@ azure-identity, azure-servicebus, azure-storage-queue, - backports-zoneinfo, boto3, buildPythonPackage, confluent-kafka, diff --git a/pkgs/development/python-modules/libagent/default.nix b/pkgs/development/python-modules/libagent/default.nix index 3422ae2ced2d..15d3cefb88ca 100644 --- a/pkgs/development/python-modules/libagent/default.nix +++ b/pkgs/development/python-modules/libagent/default.nix @@ -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 diff --git a/pkgs/development/python-modules/pelican/default.nix b/pkgs/development/python-modules/pelican/default.nix index 0472bf106c50..b6b03a7714ea 100644 --- a/pkgs/development/python-modules/pelican/default.nix +++ b/pkgs/development/python-modules/pelican/default.nix @@ -14,7 +14,6 @@ typogrify, # dependencies - backports-zoneinfo, blinker, docutils, feedgenerator, diff --git a/pkgs/development/python-modules/pendulum/default.nix b/pkgs/development/python-modules/pendulum/default.nix index bd74e66c6915..cd49841eecad 100644 --- a/pkgs/development/python-modules/pendulum/default.nix +++ b/pkgs/development/python-modules/pendulum/default.nix @@ -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 ]; diff --git a/pkgs/development/python-modules/psycopg/default.nix b/pkgs/development/python-modules/psycopg/default.nix index 3338ad86ce2e..7cba53cb3ec0 100644 --- a/pkgs/development/python-modules/psycopg/default.nix +++ b/pkgs/development/python-modules/psycopg/default.nix @@ -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" diff --git a/pkgs/development/python-modules/pytz-deprecation-shim/default.nix b/pkgs/development/python-modules/pytz-deprecation-shim/default.nix index ef40519c544a..6725091b76c5 100644 --- a/pkgs/development/python-modules/pytz-deprecation-shim/default.nix +++ b/pkgs/development/python-modules/pytz-deprecation-shim/default.nix @@ -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 = [ diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix index 943bed05fb02..7350e3ffa74e 100644 --- a/pkgs/development/python-modules/urllib3/default.nix +++ b/pkgs/development/python-modules/urllib3/default.nix @@ -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 diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index c754cb34576f..d373e2528b40 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -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 ]; }); diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 8602eeca2980..27a73c44ae36 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -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 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 05eb314e06b1..62f9ae46754d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { };