Bug 2177652

Summary: HepMC3 fails to build with Python 3.12: AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: HepMC3Assignee: Mattias Ellert <mattias.ellert>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mattias.ellert, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: HepMC3-3.2.5-7.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-21 06:24:08 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: 2135404    

Description Tomáš Hrnčiar 2023-03-13 08:58:27 UTC
HepMC3 fails to build with Python 3.12.0a6.

AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_IO1.py", line 7, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 59: python3.12.0_test_Boost
58/70 Test #59: python3.12.0_test_Boost ......................***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Boost.py", line 8, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 60: python3.12.0_test_Print
59/70 Test #60: python3.12.0_test_Print ......................***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Print.py", line 8, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 61: python3.12.0_test_Polarization
60/70 Test #61: python3.12.0_test_Polarization ...............***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Polarization.py", line 13, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 62: python3.12.0_test_Pythonization_docs
61/70 Test #62: python3.12.0_test_Pythonization_docs .........***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Pythonization_docs.py", line 7, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 63: python3.12.0_test_Pythonization_FourVector
62/70 Test #63: python3.12.0_test_Pythonization_FourVector ...***Failed    0.02 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Pythonization_FourVector.py", line 7, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 64: python3.12.0_test_Pythonization_GenEvent
63/70 Test #64: python3.12.0_test_Pythonization_GenEvent .....***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Pythonization_GenEvent.py", line 7, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 65: python3.12.0_test_Pythonization_GenRunInfo
64/70 Test #65: python3.12.0_test_Pythonization_GenRunInfo ...***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Pythonization_GenRunInfo.py", line 7, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 66: python3.12.0_test_Units
65/70 Test #66: python3.12.0_test_Units ......................***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Units.py", line 7, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 67: python3.12.0_test_Attribute
66/70 Test #67: python3.12.0_test_Attribute ..................***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Attribute.py", line 12, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 68: python3.12.0_test_HEPEVT
67/70 Test #68: python3.12.0_test_HEPEVT .....................***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_HEPEVT.py", line 10, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 69: python3.12.0_test_IO2
68/70 Test #69: python3.12.0_test_IO2 ........................***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_IO2.py", line 8, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

      Start 70: python3.12.0_test_Pythonization_Search
69/70 Test #70: python3.12.0_test_Pythonization_Search .......***Failed    0.03 sec
3.12.0
AttributeError: 'pybind11_static_property' object attribute '__doc__' is read-only

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/test/test_Pythonization_Search.py", line 7, in <module>
    from pyHepMC3 import HepMC3 as hm
  File "/builddir/build/BUILD/HepMC3-3.2.5/redhat-linux-build/python/3.12.0/pyHepMC3/__init__.py", line 1, in <module>
    from .pyHepMC3 import *
ImportError: initialization failed

70/70 Test #56: memcheck_testThreads1 ........................   Passed   93.85 sec

81% tests passed, 13 tests failed out of 70

Total Test time (real) = 112.40 sec

The following tests FAILED:
	 58 - python3.12.0_test_IO1 (Failed)
	 59 - python3.12.0_test_Boost (Failed)
	 60 - python3.12.0_test_Print (Failed)
	 61 - python3.12.0_test_Polarization (Failed)
	 62 - python3.12.0_test_Pythonization_docs (Failed)
	 63 - python3.12.0_test_Pythonization_FourVector (Failed)
	 64 - python3.12.0_test_Pythonization_GenEvent (Failed)
	 65 - python3.12.0_test_Pythonization_GenRunInfo (Failed)
	 66 - python3.12.0_test_Units (Failed)
	 67 - python3.12.0_test_Attribute (Failed)
	 68 - python3.12.0_test_HEPEVT (Failed)
	 69 - python3.12.0_test_IO2 (Failed)
	 70 - python3.12.0_test_Pythonization_Search (Failed)
Errors while running CTest

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05623226-HepMC3/

For all our attempts to build HepMC3 with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/HepMC3/

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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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 Mattias Ellert 2023-03-13 22:50:55 UTC
Upstream merge request:
https://gitlab.cern.ch/hepmc/HepMC3/-/merge_requests/237