Bug 1787753 - python-fixtures fails to build with Python 3.9: test_monkeypatch failures
Summary: python-fixtures fails to build with Python 3.9: test_monkeypatch failures
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-fixtures
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alan Pevec (Fedora)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39 F33FTBFS
TreeView+ depends on / blocked
 
Reported: 2020-01-05 01:42 UTC by Miro Hrončok
Modified: 2020-10-05 16:34 UTC (History)
8 users (show)

Fixed In Version: python-fixtures-3.0.0-21.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-05 16:34:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-05 01:42:53 UTC
python-fixtures fails to build with Python 3.9.0a2.

+ /usr/bin/python3 -m testtools.run fixtures.test_suite
Tests running...
======================================================================
ERROR: fixtures.tests._fixtures.test_monkeypatch.TestMonkeyPatch.test_patch_classmethod_with_boundmethod
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/fixtures-3.0.0/fixtures/tests/_fixtures/test_monkeypatch.py", line 223, in test_patch_classmethod_with_boundmethod
    slf, cls = C.foo_cls()
TypeError: bar_two_args() missing 1 required positional argument: 'arg'
======================================================================
ERROR: fixtures.tests._fixtures.test_monkeypatch.TestMonkeyPatch.test_patch_classmethod_with_classmethod
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/fixtures-3.0.0/fixtures/tests/_fixtures/test_monkeypatch.py", line 191, in test_patch_classmethod_with_classmethod
    cls, target_class = C.foo_cls()
ValueError: not enough values to unpack (expected 2, got 1)


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

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

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-02-10 14:27:39 UTC
Could you please have a look?

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

Comment 3 Alan Pevec 2020-02-29 01:23:03 UTC
I've no idea why those tests work in python < 3.9 and don't see anything related to class methods in 3.9 changelog...

Upstream seems to be abandoned, last release almost 4 years ago and only few minor commits on master after 3.0.0 tag.

Comment 4 Miro Hrončok 2020-02-29 08:53:37 UTC
> Upstream seems to be abandoned.

Right. However oslo seem to use it heavily:

$ repoquery --repo=rawhide{,-source} --whatrequires python3-fixtures
dlrn-0:0.9.1-5.fc32.src
python-bashate-0:0.5.1-14.fc32.src
python-congressclient-0:1.13.0-2.fc32.src
python-debtcollector-0:1.22.0-3.fc32.src
python-gear-0:0.14.0-6.fc32.src
python-jenkins-job-builder-1:3.2.0-1.fc32.src
python-keystoneauth1-0:3.17.1-2.fc32.src
python-keystoneclient-1:3.21.0-3.fc32.src
python-linecache2-0:1.0.0-26.fc32.src
python-magnumclient-0:2.15.0-2.fc32.src
python-mox3-0:0.28.0-3.fc32.src
python-openstackclient-0:4.0.0-2.fc32.src
python-os-client-config-0:1.33.0-3.fc32.src
python-osc-lib-0:1.14.1-3.fc32.src
python-oslo-concurrency-0:3.30.0-3.fc32.src
python-oslo-config-2:6.11.1-3.fc32.src
python-oslo-context-0:2.23.0-3.fc32.src
python-oslo-db-0:5.0.2-3.fc32.src
python-oslo-i18n-0:3.24.0-3.fc32.src
python-oslo-utils-0:3.41.1-3.fc32.src
python-pyvmomi-0:6.7.3-4.fc32.src
python-requests-mock-0:1.7.0-2.fc32.src
python-sphinxcontrib-spelling-0:4.3.0-4.fc32.src
python-stestr-0:2.6.0-5.fc32~bootstrap.src
python-subunit2sql-0:1.9.0-3.fc30.src
python-tackerclient-0:0.16.1-2.fc32.src
python-testrepository-0:0.0.20-21.fc32.src
python-testresources-0:1.0.0-15.fc32.src
python-testscenarios-0:0.5.0-18.fc32.src
python-tosca-parser-0:1.4.0-5.fc32.src
python3-congressclient-tests-0:1.13.0-2.fc32.noarch
python3-keystoneclient-tests-1:3.21.0-3.fc32.noarch
python3-magnumclient-tests-0:2.15.0-2.fc32.noarch
python3-mox3-0:0.28.0-3.fc32.noarch
python3-octaviaclient-tests-0:1.10.0-2.fc32.noarch
python3-osc-lib-tests-0:1.14.1-3.fc32.noarch
python3-oslo-concurrency-tests-0:3.30.0-3.fc32.noarch
python3-oslo-db-tests-0:5.0.2-3.fc32.noarch
python3-oslo-utils-tests-0:3.41.1-3.fc32.noarch
python3-oslotest-0:3.8.1-3.fc32.noarch
python3-pifpaf-0:2.2.2-7.fc32.noarch
python3-stestr-0:2.6.0-5.fc32~bootstrap.noarch
python3-tackerclient-tests-unit-0:0.16.1-2.fc32.noarch
python3-testrepository-0:0.0.20-21.fc32.noarch
python3-testtools-0:2.3.0-18.fc33.noarch
subunit-0:1.3.0-17.fc32.src

Comment 5 Miro Hrončok 2020-03-16 18:30:16 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 6 Javier Peña 2020-05-21 09:47:14 UTC
Could this be related to https://bugzilla.redhat.com/show_bug.cgi?id=1788506 ? I've been having a quick look at the two failing unit tests, and both are related to monkey patching of a classmethod [1].

[1] https://github.com/testing-cabal/fixtures/blob/master/fixtures/tests/_fixtures/test_monkeypatch.py#L30-L31

Comment 7 Miro Hrončok 2020-05-21 09:57:42 UTC
I don't think Cython is in play here at all. However the reason why fixtures broke might have been the same as in Cython, yes.

Comment 8 Miro Hrončok 2020-05-25 13:01:08 UTC
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask.


The Python 3.9 rebuild is in progress in a Koji side tag.

If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with:

    $ fedpkg build --target=f33-python

The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you.

You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together.

If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Comment 9 Miro Hrončok 2020-05-29 07:11:15 UTC
Python 3.9 update: The f33-python side tag is currently being merged.

New builds in f33-python are no longer possible, but python3 is not yet updated to Python 3.9 in rawhide. You can check when Python is Python 3.9 with:

    $ koji wait-repo f33-build --build python3.9-3.9.0~b1-3.fc3

And build the packages normally after that.

Comment 10 Miro Hrončok 2020-08-04 23:28:49 UTC
The following builds were made after this report was opened: python-fixtures-3.0.0-18.fc33

Comment 11 Miro Hrončok 2020-08-26 21:37:42 UTC
Oh, it only builds with tests disabled thou.

Comment 12 Fedora Release Engineering 2020-09-30 18:40:47 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 33.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2020-03-01).

A week before the mass branching of Fedora 34 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 32 will be
retired regardless of the status of this bug.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-34/f-34-key-tasks.html

Comment 13 Fedora Update System 2020-10-01 09:21:48 UTC
FEDORA-2020-123e231b97 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-123e231b97

Comment 14 Javier Peña 2020-10-01 09:23:06 UTC
The bug has been notified upstream with https://github.com/testing-cabal/fixtures/issues/44.

Since there has been no response yet, I have disabled the two affected unit tests via a patch, so they are not executed in Python 3.9.

Comment 15 Fedora Update System 2020-10-02 01:46:46 UTC
FEDORA-2020-123e231b97 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-123e231b97`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-123e231b97

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2020-10-05 16:34:07 UTC
FEDORA-2020-123e231b97 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


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