Merge pull request #180103 from mweinelt/unittest2
This commit is contained in:
commit
83809375c5
@ -0,0 +1,19 @@
|
||||
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.
|
||||
|
@ -15,6 +15,10 @@ buildPythonPackage rec {
|
||||
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
|
||||
@ -34,7 +38,5 @@ buildPythonPackage rec {
|
||||
description = "A backport of the new features added to the unittest testing framework";
|
||||
homepage = "https://pypi.org/project/unittest2/";
|
||||
license = licenses.bsd0;
|
||||
# AttributeError: module 'collections' has no attribute 'MutableMapping'
|
||||
broken = pythonAtLeast "3.10";
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, pythonPackages, stdenv, targetPlatform
|
||||
{ cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, python3Packages, stdenv, targetPlatform
|
||||
, enableCfp ? true
|
||||
, enableCuda ? false
|
||||
, enableExamples ? true
|
||||
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = lib.optional enableCuda cudatoolkit
|
||||
++ lib.optional enableFortran gfortran
|
||||
++ lib.optional enableOpenMP llvmPackages.openmp
|
||||
++ lib.optionals enablePython [ pythonPackages.cython pythonPackages.numpy pythonPackages.python ];
|
||||
++ lib.optionals enablePython (with python3Packages; [ cython numpy python ]);
|
||||
|
||||
cmakeFlags = [
|
||||
# More tests not enabled by default
|
||||
|
Loading…
Reference in New Issue
Block a user