Merge pull request #203986 from tjni/hide-unittest2

This commit is contained in:
Sandro 2022-12-08 15:11:48 +01:00 committed by GitHub
commit 6d6fbe89fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 3 additions and 68 deletions

View File

@ -5,7 +5,6 @@
, pbr
, python-mimeparse
, extras
, unittest2
, traceback2
, testscenarios
}:

View File

@ -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.

View File

@ -1,42 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, six
, traceback2
, pythonAtLeast
}:
buildPythonPackage rec {
version = "1.1.0";
pname = "unittest2";
src = fetchPypi {
inherit pname version;
sha256 = "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212";
};
patches = lib.optionals (pythonAtLeast "3.7") [
./collections-compat.patch
];
propagatedBuildInputs = [ six traceback2 ];
# 1.0.0 and up create a circle dependency with traceback2/pbr
doCheck = false;
postPatch = ''
# argparse is needed for python < 2.7, which we do not support anymore.
substituteInPlace setup.py --replace "argparse" ""
# fixes a transient error when collecting tests, see https://bugs.launchpad.net/python-neutronclient/+bug/1508547
sed -i '510i\ return None, False' unittest2/loader.py
# https://github.com/pypa/packaging/pull/36
sed -i 's/version=VERSION/version=str(VERSION)/' setup.py
'';
meta = with lib; {
description = "A backport of the new features added to the unittest testing framework";
homepage = "https://pypi.org/project/unittest2/";
license = licenses.bsd0;
};
}

View File

@ -1,7 +1,6 @@
{ lib
, buildPythonPackage
, fetchPypi
, unittest2
}:
buildPythonPackage rec {
@ -13,7 +12,8 @@ buildPythonPackage rec {
sha256 = "01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e";
};
checkInputs = [ unittest2 ];
# requires unittest2, which has been removed
doCheck = false;
meta = {
description = "Backports and enhancements for the contextlib module";

View File

@ -7,7 +7,6 @@
, nose
, coverage
, wheel
, unittest2
, botocore
, futures ? null
}:
@ -32,7 +31,6 @@ buildPythonPackage rec {
nose
coverage
wheel
unittest2
];
checkPhase = ''

View File

@ -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

View File

@ -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 { };