Bug 2093985

Summary: python-pynetdicom fails to build with Python 3.11: RuntimeError: invalid SRE code
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-pynetdicomAssignee: Alessio <alciregi>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alciregi, mhroncok, neuro-sig, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-08 11:24:55 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:    
Bug Blocks: 2016048, 2045102, 2045109    

Description Tomáš Hrnčiar 2022-06-06 13:53:11 UTC
python-pynetdicom fails to build with Python 3.11.0b3.


Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/sphinx/config.py", line 332, in eval_config_file
    exec(code, namespace)
    ^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pynetdicom-2.0.1/docs/conf.py", line 48, in <module>
    import pynetdicom
    ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/pynetdicom-2.0.1/pynetdicom/__init__.py", line 5, in <module>
    from pydicom.uid import UID
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pydicom/__init__.py", line 32, in <module>
    from pydicom.dataelem import DataElement
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pydicom/dataelem.py", line 30, in <module>
    import pydicom.valuerep  # don't import DS directly as can be changed by config
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pydicom/valuerep.py", line 270, in <module>
    class TM(_DateTimeBase, datetime.time):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pydicom/valuerep.py", line 275, in TM
    _RE_TIME = re.compile(
               ^^^^^^^^^^^
  File "/usr/lib64/python3.11/re/__init__.py", line 227, in compile
    return _compile(pattern, flags)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/re/__init__.py", line 294, in _compile
    p = _compiler.compile(pattern, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/re/_compiler.py", line 777, in compile
    return _sre.compile(
           ^^^^^^^^^^^^^
RuntimeError: invalid SRE code

Undocumented modules sre_compile, sre_constants and sre_parse are now deprecated. (Contributed by Serhiy Storchaka in bpo-47152.)

https://bugs.python.org/issue?@action=redirect&bpo=47152
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/04498090-python-pynetdicom/

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

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 Miro Hrončok 2022-06-20 10:19:37 UTC
*** Bug 2099072 has been marked as a duplicate of this bug. ***

Comment 2 Miro Hrončok 2022-06-27 14:54:05 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 3 Miro Hrončok 2022-07-18 22:26:51 UTC
Hello,

This is the second reminder (step 4 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 4 Alessio 2022-08-05 20:56:33 UTC
Reported upstream
https://github.com/pydicom/pynetdicom/issues/793