Description
The attached Python script throws a segmentation fault in the following way:
- First, QtCore is imported from the PySide2
- The script has a definition of a class called Foo, decorated with @dataclass.
- After the Foo is defined, a delayer() function is called which performs some arbitrary work involving programmatic addition of methods to the definition of the class Buzz. Class Buzz is unimportant for this issue, but it is necessary for the delayer() function to perform some work in order for the issue to show.
- After the delayer() function, when the class Foo is referenced, Python throws a segmentation fault.
Issue shows with:
- Python version: 3.6.6
- Dataclasses version: 0.6
Issue does not show when either:
- PySide2 is not imported in the script
- Foo is not decorated with @dataclass
- The delayer() function is called with the smaller delay number
- PySide2 is imported after class Foo has been declared
- Python 3.7 is used
- PySide2 5.12.0 is used