Bug 1734777 - libcomps fails to build with Python 3.8: SystemError: bad call flags
Summary: libcomps fails to build with Python 3.8: SystemError: bad call flags
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libcomps
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-07-31 12:14 UTC by Miro Hrončok
Modified: 2019-08-01 06:07 UTC (History)
8 users (show)

Fixed In Version: libcomps-0.1.11-3.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-01 06:07:16 UTC


Attachments (Terms of Use)

Description Miro Hrončok 2019-07-31 12:14:12 UTC
libcomps fails to build with Python 3.8.0b3:


Traceback (most recent call last):
  ...
  File "/builddir/build/BUILD/libcomps-libcomps-0.1.11/build-doc/src/python/src/python3/libcomps/__init__.py", line 1, in <module>
    from ._libpycomps import *
SystemError: bad call flags


This also manifests when building dnf, dnf-plugins-core, dnf-plugins-extras and pungi. Hence setting the severity to urgent - we want to start the 3.8 rebuild in Koji right after branching (i.e. 2019-08-13) and if we have nonworking dnf, we cannot ship Python 3.8 at all.

I have no idea how to debug this properly :(


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.8/fedora-rawhide-x86_64/00989682-libcomps/

For all our attempts to build libcomps with Python 3.8, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/libcomps/

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

Let us know here if you have any questions.

Comment 1 Victor Stinner 2019-07-31 13:06:47 UTC
It's a bug in the Python binding of libcomps. I proposed a fix upstream:
https://github.com/rpm-software-management/libcomps/pull/50

Extract:

> In Python 3.7, import didn't check descriptor flags (METH_KEYWORDS): these flags were only checked when the methods were called.
>
> In Python 3.8, the flags are checked at soon as the module is imported, which prevents the module to be imported.

Comment 3 Victor Stinner 2019-07-31 13:20:09 UTC
> In Python 3.8, the flags are checked at soon as the module is imported, which prevents the module to be imported.

To be exact, it's the change https://github.com/python/cpython/commit/bf8e82f976b37856c7d35cdf88a238cb6f57fe65 which has been added to Python 3.8 beta 3.

> https://github.com/rpm-software-management/libcomps/pull/50

Good news! It has already been merged!


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