Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1927146 - borgbackup fails to build with Python 3.10: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer() and PyObject_AsWriteBuffer()
Summary: borgbackup fails to build with Python 3.10: Avoid using PyObject_AsCharBuffer...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: borgbackup
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Schwarz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2021-02-10 08:13 UTC by Tomáš Hrnčiar
Modified: 2021-02-11 09:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-11 09:55:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github borgbackup borg issues 5683 0 None open borgbackup fails to build with Python 3.10: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer() and PyObject_As... 2021-02-10 09:58:05 UTC

Description Tomáš Hrnčiar 2021-02-10 08:13:35 UTC
borgbackup fails to build with Python 3.10.0a5.

src/borg/algorithms/msgpack/_unpacker.cpp:2332:17: error: ‘PyObject_AsReadBuffer’ was not declared in this scope; did you mean ‘PyObject_GetBuffer’?
 2332 |     __pyx_t_2 = PyObject_AsReadBuffer(__pyx_v_obj, ((void const **)__pyx_v_buf), __pyx_v_buffer_len); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 152, __pyx_L1_error)
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 PyObject_GetBuffer
error: command '/usr/bin/gcc' failed with exit code 1

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/01951890-borgbackup/

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

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.

Comment 1 Felix Schwarz 2021-02-10 10:00:16 UTC
notified upstream about the problem, hopefully they can fix it without our help.

Comment 2 Felix Schwarz 2021-02-10 22:18:48 UTC
I added a patch for the vendored msgpack and I hope everything works now...

Comment 3 Miro Hrončok 2021-02-10 22:48:49 UTC
Weirdly, Copr did not build the commit automatically. I've submitted it manually.

Comment 4 Miro Hrončok 2021-02-10 22:51:05 UTC
Got a Segmentation fault, those often happen due to a4/a5 mishmash in our Copr :/

Comment 5 Felix Schwarz 2021-02-11 07:53:53 UTC
Anything I can do or should we just wait a few days if the problem goes away?

Comment 6 Miro Hrončok 2021-02-11 08:54:02 UTC
Let's wait a few days please, sorry.

Comment 7 Felix Schwarz 2021-02-11 08:55:33 UTC
no problem, thank you for all your efforts.

Comment 8 Miro Hrončok 2021-02-11 09:55:59 UTC
(In reply to Felix Schwarz from comment #2)
> I added a patch for the vendored msgpack and I hope everything works now...

It does!


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