Bug 2075460
| Summary: | bind fails to build with Python 3.11: Invalid regular expression for rule 't_DATESUFFIX'. global flags not at the start of the expression at position 17 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tomáš Hrnčiar <thrnciar> |
| Component: | bind | Assignee: | Petr Menšík <pemensik> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | aegorenk, anon.amish, dns-sig, mhroncok, mruprich, pemensik, thrnciar, vonsch, zdohnal |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | bind-9.16.29-1.fc37 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-06-04 20:34:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2087920 | ||
| Bug Blocks: | 2016048 | ||
|
Description
Tomáš Hrnčiar
2022-04-14 09:41:09 UTC
Python 3.11 does not like r'(?i)' on start of token matching functions. It worked fine on previous versions. Not sure if change in re or ply is responsible.
It switches on case insensitive compare on selected types. ply.lex() function has parameter reflags, which enabled re.VERBOSE by default. It might be possible to use it to pass aklso re.IGNORECASE. It seems to me all remaining patterns do not use letters, which might be affected. There should not be any change in accepted tokens.
Anyway, python tests do not pass to me even on F34. I have made candidate change, but it seems tests get stuck. But they provide some help with warnings at least:
tests/dnskey_test.py::DnskeyTest::test_fmttime
tests/dnskey_test.py::DnskeyTest::test_metdata
/home/pemensik/fedora/bind/bind-9.16.28/build/bin/python/isc/dnskey.py:93: DeprecationWarning: 'U' mode is deprecated
pfp = open(private_file, "rU")
tests/policy_test.py::PolicyTest::test_combined_pre_post
/usr/lib/python3.9/site-packages/ply/lex.py:760: DeprecationWarning: Flags not at the start of the expression '(?P<t_DATESUFFIX>(?i' (truncated) but at position 17
c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags)
tests/policy_test.py::PolicyTest::test_combined_pre_post
/usr/lib/python3.9/site-packages/ply/lex.py:760: DeprecationWarning: Flags not at the start of the expression '(?P<t_KEYTYPE>(?i)\\b' (truncated) but at position 14
c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags)
tests/policy_test.py::PolicyTest::test_combined_pre_post
/usr/lib/python3.9/site-packages/ply/lex.py:760: DeprecationWarning: Flags not at the start of the expression '(?P<t_ALGNAME>(?i)\\b' (truncated) but at position 14
c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags)
tests/policy_test.py::PolicyTest::test_combined_pre_post
/usr/lib/python3.9/site-packages/ply/lex.py:498: DeprecationWarning: Flags not at the start of the expression '(?P<t_newline>\\n+)|(' (truncated) but at position 66
lexre = re.compile(regex, reflags)
tests/policy_test.py::PolicyTest::test_combined_pre_post
/usr/lib/python3.9/site-packages/ply/lex.py:498: DeprecationWarning: Flags not at the start of the expression '(?P<t_newline>\\n+)|(' (truncated) but at position 258
lexre = re.compile(regex, reflags)
tests/policy_test.py::PolicyTest::test_combined_pre_post
/usr/lib/python3.9/site-packages/ply/lex.py:498: DeprecationWarning: Flags not at the start of the expression '(?P<t_newline>\\n+)|(' (truncated) but at position 291
lexre = re.compile(regex, reflags)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/usr/lib/python3.9/site-packages/ply/yacc.py:1094: KeyboardInterrupt
Fixed by a rebase to version with a merged fix. |