Bug 1897263 - pygame fails to build with Python 3.10: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer() and PyObject_AsWriteBuffer()
Summary: pygame fails to build with Python 3.10: Avoid using PyObject_AsCharBuffer(), ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pygame
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-12 16:18 UTC by Tomáš Hrnčiar
Modified: 2020-11-12 19:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-12 19:22:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-11-12 16:18:17 UTC
pygame fails to build with Python 3.10.0a2.

Traceback (most recent call last):
  File "/builddir/build/BUILD/pygame-1.9.6/test/image_test.py", line 10, in <module>
    import pygame, pygame.image, pygame.pkgdata
ImportError: /builddir/build/BUILDROOT/pygame-1.9.6-9.fc34.x86_64/usr/lib64/python3.10/site-packages/pygame/image.cpython-310-x86_64-linux-gnu.so: undefined symbol: PyObject_AsCharBuffer

https://docs.python.org/3.10/whatsnew/changelog.html#id16

bpo-41103: PyObject_AsCharBuffer(), PyObject_AsReadBuffer(), PyObject_CheckReadBuffer(), and PyObject_AsWriteBuffer() are removed. Please migrate to new buffer protocol; PyObject_GetBuffer() and PyBuffer_Release().

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01757242-pygame/

For all our attempts to build pygame with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/pygame/

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


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