Bug 2040186 - python-greenlet fails to build with Python 3.11: error: PyThreadState {aka struct _ts} has no member named recursion_depth
Summary: python-greenlet fails to build with Python 3.11: error: PyThreadState {aka st...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-greenlet
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-01-13 08:39 UTC by Tomáš Hrnčiar
Modified: 2022-06-09 10:38 UTC (History)
8 users (show)

Fixed In Version: python-greenlet-1.1.2-3.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-09 10:38:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github python-greenlet greenlet pull 280 0 None open Restore compatibility with Python 3.11 2022-01-18 12:38:09 UTC

Description Tomáš Hrnčiar 2022-01-13 08:39:02 UTC
python-greenlet fails to build with Python 3.11.0a3.

src/greenlet/greenlet.c:528:44: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
  528 |         current->recursion_depth = tstate->recursion_depth;
      |                                            ^~~~~~~~~~~~~~~
      |                                            recursion_limit
src/greenlet/greenlet.c:529:38: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
  529 |         current->top_frame = tstate->frame;
      |                                      ^~~~~
      |                                      cframe
src/greenlet/greenlet.c:577:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
  577 |         tstate->recursion_depth = target->recursion_depth;
      |                 ^~~~~~~~~~~~~~~
      |                 recursion_limit
src/greenlet/greenlet.c:578:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
  578 |         tstate->frame = target->top_frame;
      |                 ^~~~~
      |                 cframe
src/greenlet/greenlet.c: In function ‘g_initialstub’:
src/greenlet/greenlet.c:878:50: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘recursion_depth’; did you mean ‘recursion_limit’?
  878 |     self->recursion_depth = PyThreadState_GET()->recursion_depth;
      |                                                  ^~~~~~~~~~~~~~~
      |                                                  recursion_limit

== PyThreadState changes ==

* frame: removed, use PyThreadState_GetFrame(), warning: it returns a strong reference (Py_DECREF is needed)
* recursion_depth: removed, use (tstate->recursion_limit - tstate->recursion_remaining) instead
* stackcheck_counter: removed
* tracing: changed, use PyThreadState_EnterTracing() and PyThreadState_LeaveTracing(), added by bpo-43760

https://bugs.python.org/issue46355
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/03159552-python-greenlet/

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

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 planned to be included in Fedora 37. 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:10:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 3 Fedora Update System 2022-06-09 10:36:09 UTC
FEDORA-2022-75aa907ff6 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-75aa907ff6

Comment 4 Fedora Update System 2022-06-09 10:38:46 UTC
FEDORA-2022-75aa907ff6 has been pushed to the Fedora 37 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.