From de0f03b56d15ac17959bc1ee4cf8496db339cd01 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 1 Dec 2022 11:09:23 -0800 Subject: [PATCH] python{27,310}Packages.unittest2: move to python2-modules --- .../python-modules/testtools/default.nix | 1 - .../unittest2/collections-compat.patch | 19 ------------------- .../unittest2/default.nix | 7 +------ pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- pkgs/top-level/python2-packages.nix | 2 ++ 6 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 pkgs/development/python-modules/unittest2/collections-compat.patch rename pkgs/development/{python-modules => python2-modules}/unittest2/default.nix (84%) diff --git a/pkgs/development/python-modules/testtools/default.nix b/pkgs/development/python-modules/testtools/default.nix index 430d0374ef20..e20bd74a6aa0 100644 --- a/pkgs/development/python-modules/testtools/default.nix +++ b/pkgs/development/python-modules/testtools/default.nix @@ -5,7 +5,6 @@ , pbr , python-mimeparse , extras -, unittest2 , traceback2 , testscenarios }: diff --git a/pkgs/development/python-modules/unittest2/collections-compat.patch b/pkgs/development/python-modules/unittest2/collections-compat.patch deleted file mode 100644 index 350c9d716783..000000000000 --- a/pkgs/development/python-modules/unittest2/collections-compat.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/unittest2/compatibility.py b/unittest2/compatibility.py -index 9e5f1a5..473957c 100644 ---- a/unittest2/compatibility.py -+++ b/unittest2/compatibility.py -@@ -1,4 +1,5 @@ - import collections -+import collections.abc - import os - import sys - -@@ -140,7 +141,7 @@ except ImportError: - ### ChainMap (helper for configparser and string.Template) - ######################################################################## - --class ChainMap(collections.MutableMapping): -+class ChainMap(collections.abc.MutableMapping): - ''' A ChainMap groups multiple dicts (or other mappings) together - to create a single, updateable view. - diff --git a/pkgs/development/python-modules/unittest2/default.nix b/pkgs/development/python2-modules/unittest2/default.nix similarity index 84% rename from pkgs/development/python-modules/unittest2/default.nix rename to pkgs/development/python2-modules/unittest2/default.nix index 786b8996f83b..3eeaeaba1fd2 100644 --- a/pkgs/development/python-modules/unittest2/default.nix +++ b/pkgs/development/python2-modules/unittest2/default.nix @@ -3,7 +3,6 @@ , fetchPypi , six , traceback2 -, pythonAtLeast }: buildPythonPackage rec { @@ -12,13 +11,9 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"; + hash = "sha256-IogqDkGMKE4fcYqCKzsCKUTVPS2QjhaQsxmp0+ssBXk="; }; - patches = lib.optionals (pythonAtLeast "3.7") [ - ./collections-compat.patch - ]; - propagatedBuildInputs = [ six traceback2 ]; # 1.0.0 and up create a circle dependency with traceback2/pbr diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 67baa9c7d5a5..ed90d54f263b 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -216,6 +216,7 @@ mapAliases ({ tvnamer = throw "tvnamer was moved to pkgs.tvnamer"; # added 2021-07-05 types-cryptography = throw "types-cryptography has been removed because it is obsolete since cryptography version 3.4.4."; # added 2022-05-30 types-paramiko = throw "types-paramiko has been removed because it was unused."; # added 2022-05-30 + unittest2 = throw "unittest2 has been removed as it's a backport of unittest that's unmaintained and not needed beyond Python 3.4."; # added 2022-12-01 Wand = wand; # added 2022-11-13 WazeRouteCalculator = wazeroutecalculator; # added 2021-09-29 weakrefmethod = throw "weakrefmethod was removed since it's not needed in Python >= 3.4"; # added 2022-12-01 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c206e2754001..a4d9a8737072 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11589,8 +11589,6 @@ self: super: with self; { units = callPackage ../development/python-modules/units { }; - unittest2 = callPackage ../development/python-modules/unittest2 { }; - unittest-data-provider = callPackage ../development/python-modules/unittest-data-provider { }; unittest-xml-reporting = callPackage ../development/python-modules/unittest-xml-reporting { }; diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index 3d970d8bc4b2..6cc20feb86e4 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -143,6 +143,8 @@ with self; with super; { typing = callPackage ../development/python2-modules/typing { }; + unittest2 = callPackage ../development/python2-modules/unittest2 { }; + zeek = disabled super.zeek; zipp = callPackage ../development/python2-modules/zipp { };