Package: src:python-pyaml-env
Version: 1.2.1-2
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Severity: important
Hi!
While rebuilding the python related packages against the Python 3.15rc2
version we found that python-pyaml-env fails to build from source [1].
The error is:
E ModuleNotFoundError: No module named 'sre_constants'
This is because sre_constants was deprecated, and Python 3.15 removed it
[2]. To solve it, I've added a patch to replace the use of
src_constants.error with re.error.
I've applied the fix in the sandbox [2] to verify that it builds
successfully, please consider applying the patch to support the upcoming
3.15 version.
Setting the severity to important for now. Once Python 3.15 is released,
it will be added to python3-defaults and this bug will become release
critical.
Happy hacking,
[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4348034/
[2]: https://github.com/python/cpython/issues/105456
[3]: https://debusine.debian.net/debian/r-python-python3.15/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
Description: Replace sre_constants with re.error for Python 3.15 compatibility
--- a/tests/pyaml_env_tests/test_parse_config.py
+++ b/tests/pyaml_env_tests/test_parse_config.py
@@ -1,4 +1,5 @@
import os
+import re
import unittest
import yaml
@@ -210,8 +211,7 @@
data1: !TEST ${ENV_TAG4:default2}
'''
- import sre_constants
- with self.assertRaises(sre_constants.error):
+ with self.assertRaises(re.error):
_ = parse_config(data=test_data, tag='!TEST', default_sep='*')
config = parse_config(data=test_data, tag='!TEST', default_sep='\*')
expected_config = {
@@ -232,8 +232,7 @@
data1: !TEST ${ENV_TAG4:default2}
'''
- import sre_constants
- with self.assertRaises(sre_constants.error):
+ with self.assertRaises(re.error):
_ = parse_config(data=test_data, tag='!TEST', default_sep='*')
config = parse_config(data=test_data, tag='!TEST', default_sep='\*')
expected_config = {