Bug 2074540 - python-rstr fails to build with Python 3.11: AttributeError: module 're' has no attribute 'sre_parse'
Summary: python-rstr fails to build with Python 3.11: AttributeError: module 're' has ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rstr
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Frédéric Pierret
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-04-12 12:55 UTC by Tomáš Hrnčiar
Modified: 2022-06-22 11:49 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-22 11:49:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-04-12 12:55:04 UTC
python-rstr fails to build with Python 3.11.0a6.


======================================================================
ERROR: test_backreference (rstr.tests.test_xeger.TestXeger.test_backreference)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 90, in test_backreference
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_carot (rstr.tests.test_xeger.TestXeger.test_carot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 66, in test_carot
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_character_group (rstr.tests.test_xeger.TestXeger.test_character_group)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 62, in test_character_group
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_digit (rstr.tests.test_xeger.TestXeger.test_digit)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 26, in test_digit
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_dollarsign (rstr.tests.test_xeger.TestXeger.test_dollarsign)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 70, in test_dollarsign
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_dot (rstr.tests.test_xeger.TestXeger.test_dot)
Verify that the dot character doesn't produce newlines.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 22, in test_dot
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_literal_with_range_repeat (rstr.tests.test_xeger.TestXeger.test_literal_with_range_repeat)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 38, in test_literal_with_range_repeat
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_literal_with_repeat (rstr.tests.test_xeger.TestXeger.test_literal_with_repeat)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 34, in test_literal_with_repeat
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_literals (rstr.tests.test_xeger.TestXeger.test_literals)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 13, in test_literals
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_lookahead (rstr.tests.test_xeger.TestXeger.test_lookahead)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 82, in test_lookahead
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_lookbehind (rstr.tests.test_xeger.TestXeger.test_lookbehind)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 86, in test_lookbehind
    assert re.search(pattern, self.rs.xeger(pattern))
                              ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_negation_group (rstr.tests.test_xeger.TestXeger.test_negation_group)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 78, in test_negation_group
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_nondigits (rstr.tests.test_xeger.TestXeger.test_nondigits)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 30, in test_nondigits
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_nonword (rstr.tests.test_xeger.TestXeger.test_nonword)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 46, in test_nonword
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_not_literal (rstr.tests.test_xeger.TestXeger.test_not_literal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 74, in test_not_literal
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_or (rstr.tests.test_xeger.TestXeger.test_or)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 50, in test_or
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_or_with_subpattern (rstr.tests.test_xeger.TestXeger.test_or_with_subpattern)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 54, in test_or_with_subpattern
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_range (rstr.tests.test_xeger.TestXeger.test_range)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 58, in test_range
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_word (rstr.tests.test_xeger.TestXeger.test_word)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 42, in test_word
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_zero_or_more_greedy (rstr.tests.test_xeger.TestXeger.test_zero_or_more_greedy)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 94, in test_zero_or_more_greedy
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_zero_or_more_non_greedy (rstr.tests.test_xeger.TestXeger.test_zero_or_more_non_greedy)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_xeger.py", line 98, in test_zero_or_more_non_greedy
    assert re.match(pattern, self.rs.xeger(pattern))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

======================================================================
ERROR: test_xeger (rstr.tests.test_package_level_access.TestPackageLevelFunctions.test_xeger)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/tests/test_package_level_access.py", line 13, in test_xeger
    assert re.match(r'^foo[\d]{10}bar$', rstr.xeger('^foo[\d]{10}bar$'))
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/rstr-2.2.6/rstr/xeger.py", line 63, in xeger
    parsed = re.sre_parse.parse(pattern)
             ^^^^^^^^^^^^
AttributeError: module 're' has no attribute 'sre_parse'

----------------------------------------------------------------------
Ran 51 tests in 0.030s

FAILED (errors=22)

https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/04176375-python-rstr/

For all our attempts to build python-rstr with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-rstr/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Frédéric Pierret 2022-04-25 08:44:28 UTC
I've pushed and built latest version 3.1.0 for Fedora 37. How can I try build with python 3.11? I'm seeing in the build log it still uses python 3.10.

Comment 2 Miro Hrončok 2022-04-25 10:12:51 UTC
For all our attempts to build python-rstr with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-rstr/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/




The package should build eventually in copr automatically, if it does not, we do rebuild everything every week.

Comment 3 Miro Hrončok 2022-06-22 11:49:14 UTC
Closing this in bulk as it built with Python 3.11. If this needs to remain open for a followup, feel free to reopen, I won't close in bulk again.


Note You need to log in before you can comment on or make changes to this bug.