Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1895315 - Cython generates Python 3.10 incompatible code: undefined symbol: _PyGen_Send [patch exists]
Summary: Cython generates Python 3.10 incompatible code: undefined symbol: _PyGen_Send...
Alias: None
Product: Fedora
Classification: Fedora
Component: Cython
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Tomáš Hrnčiar
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
Reported: 2020-11-06 10:26 UTC by Tomáš Hrnčiar
Modified: 2021-03-04 15:02 UTC (History)
13 users (show)

Fixed In Version: Cython-0.29.22-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-03-04 15:02:19 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github cython cython issues 3876 0 None closed Cannot install Cython on Py3.10a1 2021-02-16 09:24:43 UTC

Description Tomáš Hrnčiar 2020-11-06 10:26:08 UTC
numpy fails to build with Python 3.10.0a2.

Traceback (most recent call last):
  File "/builddir/build/BUILD/numpy-1.19.4/", line 493, in <module>
  File "/builddir/build/BUILD/numpy-1.19.4/", line 283, in main
  File "/builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/", line 151, in <module>
    from . import random
  File "/builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/random/", line 179, in <module>
    from . import _pickle
  File "/builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/random/", line 1, in <module>
    from .mtrand import RandomState
  File "mtrand.pyx", line 1, in init numpy.random.mtrand
  File "bit_generator.pyx", line 1, in init numpy.random.bit_generator
ImportError: /builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/random/ undefined symbol: _PyGen_Send
error: Bad exit status from /var/tmp/rpm-tmp.lDvHNt (%check)

For the build logs, see:

For all our attempts to build numpy with Python 3.10, see:

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.10:

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 2020-11-06 10:28:47 UTC
This seem to be related to

Comment 2 Miro Hrončok 2020-11-09 12:38:31 UTC
With this patch numpy builds fine.

Upstream has decided to solve this differently, but until that happens, we'll use the patch in our Copr.

Comment 3 Petr Viktorin 2021-01-19 10:12:13 UTC
There's a new fix upstream:

Comment 4 Ben Cotton 2021-02-09 16:11:50 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 5 Tomáš Hrnčiar 2021-02-16 09:29:10 UTC
(In reply to Petr Viktorin from comment #3)
> There's a new fix upstream:

The upstream fix seems to be working. We are building Cython in Python 3.10 COPR from this PR:

Comment 6 Miro Hrončok 2021-03-04 15:02:19 UTC
This particular problem been fixed.

We have a new one:

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