Bug 2019014 - python-contextlib2 fails to build with Python 3.11: Tests expect AttributeError but Python 3.11 returns TypeError
Summary: python-contextlib2 fails to build with Python 3.11: Tests expect AttributeErr...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-contextlib2
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ali Erdinc Koroglu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2101244 (view as bug list)
Depends On:
Blocks: F36FTBFS PYTHON3.11 F37FTBFS F37FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2021-11-01 13:45 UTC by Tomáš Hrnčiar
Modified: 2022-07-08 11:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-08 11:27:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github jazzband contextlib2 issues 43 0 None open backport contextlib from python 3.11 2022-04-25 06:28:10 UTC

Description Tomáš Hrnčiar 2021-11-01 13:45:56 UTC
python-contextlib2 fails to build with Python 3.11.0a1.

======================================================================
ERROR: test_typo_enter (__main__.TestContextDecorator)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/contextlib2-0.6.0.post1/test_contextlib2.py", line 364, in test_typo_enter
    with mycontext():
    ^^^^^^^^^^^^^^^^^
TypeError: 'mycontext' object does not support the context manager protocol

======================================================================
ERROR: test_typo_exit (__main__.TestContextDecorator)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/contextlib2-0.6.0.post1/test_contextlib2.py", line 376, in test_typo_exit
    with mycontext():
    ^^^^^^^^^^^^^^^^^
TypeError: 'mycontext' object does not support the context manager protocol (missed __exit__ method)

----------------------------------------------------------------------

A TypeError is now raised instead of an AttributeError in contextlib.ExitStack.enter_context() and contextlib.AsyncExitStack.enter_async_context() for objects which do not support the context manager or asynchronous context manager protocols correspondingly. (Contributed by Serhiy Storchaka in bpo-44471.)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/02909881-python-contextlib2/

For all our attempts to build python-contextlib2 with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-contextlib2/

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

Let us know here if you have any questions.

Python 3.11 is already included in Fedora 35. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Ben Cotton 2022-02-08 21:36:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Tomáš Hrnčiar 2022-04-21 14:14:03 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 37.
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 2021-12-27).

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

[1] https://docs.fedoraproject.org/en-US/fesco/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-38/f-38-key-tasks.html

Comment 3 Tomáš Hrnčiar 2022-05-18 06:51:56 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 37.
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 2021-12-28).

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

[1] https://docs.fedoraproject.org/en-US/fesco/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-38/f-38-key-tasks.html

Comment 4 Miro Hrončok 2022-06-23 11:59:15 UTC
There is https://src.fedoraproject.org/rpms/python-contextlib2/pull-request/4 which might help.

Comment 5 Miro Hrončok 2022-06-23 12:11:42 UTC
It does not.

Comment 6 Miro Hrončok 2022-06-23 15:28:31 UTC
Nothign else seems to require python-contextlib2 in Rawhide.

Comment 7 Miro Hrončok 2022-06-27 07:56:20 UTC
*** Bug 2101244 has been marked as a duplicate of this bug. ***

Comment 8 Miro Hrončok 2022-06-27 07:58:23 UTC
Please, Ali, consider retiring this package instead of fixing it.

Comment 9 Miro Hrončok 2022-07-04 09:20:15 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 10 Ali Erdinc Koroglu 2022-07-05 05:55:29 UTC
Hi, what are we gonna do about it ?

https://src.fedoraproject.org/rpms/python-contextlib2/pull-request/4#comment-108838

Comment 11 Miro Hrončok 2022-07-05 08:27:40 UTC
Consider retiring this package instead of fixing it. Why have you unorphaned it?

Comment 12 Ali Erdinc Koroglu 2022-07-05 10:51:45 UTC
Hi Miro, I just missed it you're right let me retire the package.

Comment 14 Miro Hrončok 2022-07-08 11:27:18 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 37.

Thanks for taking care of it!


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