[Debian-med-packaging] Bug#1121966: FTBFS with Python 3.14: ValueError: Cannot use capturing groups in re.Scanner

Andrey Rakhmatullin wrar at debian.org
Fri Dec 5 10:15:31 GMT 2025


Source: patsy
Version: 1.0.2-1
Severity: serious
Tags: ftbfs
User: debian-python at lists.debian.org
Usertags: python3.14
Control: affects -1 src:statsmodels

    def test_DesignInfo_linear_constraint():
        di = DesignInfo(["a1", "a2", "a3", "b"])
>       con = di.linear_constraint(["2 * a1 = b + 1", "a3"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

patsy/design_info.py:1035:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
patsy/design_info.py:555: in linear_constraint
    return linear_constraint(constraint_likes, self.column_names)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
patsy/constraint.py:424: in linear_constraint
    tree = parse_constraint(code, variable_names)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
patsy/constraint.py:258: in parse_constraint
    return infix_parse(_tokenize_constraint(string, variable_names), _ops,
_atomic)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
patsy/constraint.py:206: in _tokenize_constraint
    scanner = re.Scanner(lexicon)
              ^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <re.Scanner object at 0x7fccc37b7490>
lexicon = [('\\(', <function _token_maker.<locals>.make_token at
0x7fccc39928d0>), ('\\)', <function
_token_maker.<locals>.make_...+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?', <function
_token_maker.<locals>.make_token at 0x7fccc3992ae0>), ('\\s+', None)]
flags = 0

    def __init__(self, lexicon, flags=0):
        from ._constants import BRANCH, SUBPATTERN
        if isinstance(flags, RegexFlag):
            flags = flags.value
        self.lexicon = lexicon
        # combine phrases into a compound pattern
        p = []
        s = _parser.State()
        s.flags = flags
        for phrase, action in lexicon:
            sub_pattern = _parser.parse(phrase, flags)
            if sub_pattern.state.groups != 1:
>               raise ValueError("Cannot use capturing groups in re.Scanner")
E               ValueError: Cannot use capturing groups in re.Scanner

/usr/lib/python3.14/re/__init__.py:404: ValueError


-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.17.7+deb14+1-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the Debian-med-packaging mailing list