python3Packages.wrapt: fix pytest 9 compat
Instead of upgrading, because the opentelemetry packages don't support wrapt 2.0.
This commit is contained in:
@@ -20,6 +20,8 @@ buildPythonPackage rec {
|
||||
hash = "sha256-QduT5bncXi4LeI034h5Pqtwybru0QcQIYI7cMchLy7c=";
|
||||
};
|
||||
|
||||
patches = [ ./pytest9-compat.patch ];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||
index 318d226..0a79281 100644
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -18,28 +18,29 @@ def construct_dummy(path, parent):
|
||||
else:
|
||||
return DummyCollector(path, parent=parent)
|
||||
|
||||
-def pytest_pycollect_makemodule(path, parent):
|
||||
- if '_py33' in path.basename and version < (3, 3):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py34' in path.basename and version < (3, 4):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py35' in path.basename and version < (3, 5):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py36' in path.basename and version < (3, 6):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py37' in path.basename and version < (3, 7):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py38' in path.basename and version < (3, 8):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py39' in path.basename and version < (3, 9):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py310' in path.basename and version < (3, 10):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py311' in path.basename and version < (3, 11):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py312' in path.basename and version < (3, 12):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py3' in path.basename and version < (3, 0):
|
||||
- return construct_dummy(path, parent)
|
||||
- if '_py2' in path.basename and version >= (3, 0):
|
||||
- return construct_dummy(path, parent)
|
||||
+def pytest_pycollect_makemodule(module_path, parent):
|
||||
+ name = module_path.name
|
||||
+ if '_py33' in name and version < (3, 3):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py34' in name and version < (3, 4):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py35' in name and version < (3, 5):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py36' in name and version < (3, 6):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py37' in name and version < (3, 7):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py38' in name and version < (3, 8):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py39' in name and version < (3, 9):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py310' in name and version < (3, 10):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py311' in name and version < (3, 11):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py312' in name and version < (3, 12):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py3' in name and version < (3, 0):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
+ if '_py2' in name and version >= (3, 0):
|
||||
+ return construct_dummy(module_path, parent)
|
||||
Reference in New Issue
Block a user