File: python3.12.patch

package info (click to toggle)
python-py 1.11.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,512 kB
  • sloc: python: 11,660; makefile: 119; sh: 7
file content (23 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Replace distutils by packaging
Bug-Debian: https://bugs.debian.org/1056494
Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 15 Jan 2024 20:39:51 +0100

--- a/testing/log/test_warning.py
+++ b/testing/log/test_warning.py
@@ -1,5 +1,5 @@
 import sys
-from distutils.version import LooseVersion
+import packaging.version
 
 import pytest
 
@@ -8,7 +8,7 @@ import py
 mypath = py.path.local(__file__).new(ext=".py")
 
 
-pytestmark = pytest.mark.skipif(LooseVersion(pytest.__version__) >= LooseVersion('3.1'),
+pytestmark = pytest.mark.skipif(packaging.version.Version(pytest.__version__) >= packaging.version.Version('3.1'),
                                 reason='apiwarn is not compatible with pytest >= 3.1 (#162)')