Bug 1788506 - Cython fails to build with Python 3.9 with tests enabled, classmethods are severely broken
Summary: Cython fails to build with Python 3.9 with tests enabled, classmethods are se...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Cython
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Petr Viktorin (pviktori)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39 1792990 1793612 1813076
TreeView+ depends on / blocked
 
Reported: 2020-01-07 11:30 UTC by Miro Hrončok
Modified: 2020-09-26 12:42 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-26 12:42:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github cython cython issues 3349 0 None closed Python 3.9 test failures on 0.29.x 2021-01-08 16:05:55 UTC
Github cython cython pull 3304 0 None closed 0.29.x: Fix deprecated threading API usage in test runner. 2021-01-08 16:05:55 UTC

Description Miro Hrončok 2020-01-07 11:30:58 UTC
Cython fails to build with Python 3.9.0a2:

Traceback (most recent call last):
  File "/builddir/build/BUILD/cython-0.29.14/runtests.py", line 1269, in run
    check_thread_termination()
  File "/builddir/build/BUILD/cython-0.29.14/runtests.py", line 1919, in check_thread_termination
    if not t.isAlive() or t == current or t.name == 'time_stamper':
AttributeError: '_MainThread' object has no attribute 'isAlive'


isAlive got removed, it was deprecated for a long time, should be is_alive now.


FAIL: classmethod ()
Doctest: classmethod
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for classmethod
  File "/builddir/build/BUILD/cython-0.29.14/TEST_TMP/0/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 1, in classmethod

----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.14/TEST_TMP/0/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 9, in classmethod
Failed example:
    class1.bview()
Expected:
    class1
Got:
    type

...


There are more failures.


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01139602-Cython/

For all our attempts to build Cython with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/Cython/

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

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 1 Miro Hrončok 2020-01-07 11:32:35 UTC
I ahve already backported one commit prior to this. Let's wait for the next version (0.29.14) and report what is remaining.

Comment 2 Miro Hrončok 2020-02-08 21:33:24 UTC
Cython 0.29.15 test failures reported at https://github.com/cython/cython/issues/3349

Comment 3 Ben Cotton 2020-02-11 16:35:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 4 Miro Hrončok 2020-03-16 18:30:19 UTC
Setting the severity to high.

This package is part of the initial bootstrap sequence. Without it, we cannot proceed with the bootstrap in a Koji side tag.

https://fedoraproject.org/wiki/Changes/Python3.9#Important_dates_and_plan

The current plan is to follow the "ideal point when we can start rebuilding in Koji" -- that is we need to get this bug fixed approximately in 2 months.

That includes potential uncovered bugs in packages that depend on this one.

Please knowledge that you have read this message and that you can dedicate time to fix it. If you know already that you won't be able to fix it by the deadline, please let us know ASAP, so we can allocate resources to do that. Thank You.

(This comment is posted to multiple Bugzillas, please forgive me if it's not 100% accurate.)

Comment 5 Marcel Plch 2020-03-24 12:46:48 UTC
Yes, I'll do my best to get this moving.
There doesn't seem to be much of a response from upstream.

I'll try and follow the logic of the tests, minimize it into a reproducer and see if I can find the root of the issue.

If I get stuck and won't be able to move with it till the end of the week I'll ask for help.

Thank you for this reminder.

Comment 6 Miro Hrončok 2020-03-24 12:55:55 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1792990#c4 for a (at least a partial) reproducer.

Comment 7 Miro Hrončok 2020-03-26 15:17:42 UTC
JFYI the 0.29.16 failure build logs are now available in https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/Cython/ (I haven't read them)

Comment 8 david08741 2020-04-29 11:26:42 UTC
JFYI the 0.29.17 failure build logs are here:
https://copr.fedorainfracloud.org/coprs/davidsch/python3.9/build/1354672/

3.0a3 (still running)
https://copr.fedorainfracloud.org/coprs/davidsch/python3.9/build/1354698/

Comment 10 david08741 2020-04-29 21:31:29 UTC
Great, I was worried this was stalling.

Thanks for working on this 👍

Comment 11 Petr Viktorin (pviktori) 2020-05-13 15:27:54 UTC
Note to self: Here's a Python change that might have exposed the classmethod bug: https://bugs.python.org/issue19072

Comment 12 Ben Cotton 2020-08-11 15:19:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.


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