about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pycodestyle/python-3.11.4-compat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pycodestyle/python-3.11.4-compat.patch')
-rw-r--r--pkgs/development/python-modules/pycodestyle/python-3.11.4-compat.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pycodestyle/python-3.11.4-compat.patch b/pkgs/development/python-modules/pycodestyle/python-3.11.4-compat.patch
new file mode 100644
index 0000000000000..d8a0d7953776d
--- /dev/null
+++ b/pkgs/development/python-modules/pycodestyle/python-3.11.4-compat.patch
@@ -0,0 +1,16 @@
+diff --git a/testsuite/test_api.py b/testsuite/test_api.py
+index 8dde32ff..38e34acf 100644
+--- a/testsuite/test_api.py
++++ b/testsuite/test_api.py
+@@ -329,7 +329,10 @@ def test_check_nullbytes(self):
+         count_errors = pep8style.input_file('stdin', lines=['\x00\n'])
+ 
+         stdout = sys.stdout.getvalue()
+-        expected = "stdin:1:1: E901 ValueError"
++        if sys.version_info < (3, 11, 4):
++            expected = "stdin:1:1: E901 ValueError"
++        else:
++            expected = "stdin:1:1: E901 SyntaxError: source code string cannot contain null bytes"  # noqa: E501
+         self.assertTrue(stdout.startswith(expected),
+                         msg='Output %r does not start with %r' %
+                         (stdout, expected))