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 1789643 - python-scandir fails to build with Python 3.9
Summary: python-scandir fails to build with Python 3.9
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python-scandir
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Avram Lubkin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-10 00:27 UTC by Charalampos Stratakis
Modified: 2020-02-28 10:00 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-28 10:00:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Charalampos Stratakis 2020-01-10 00:27:37 UTC
python-scandir fails to build with Python 3.9.0a2.

_scandir.c:663:7: error: conflicting type qualifiers for ‘PyStructSequence_UnnamedField’
  663 | char *PyStructSequence_UnnamedField = "unnamed field";
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.9/Python.h:125,
                 from _scandir.c:14:
/usr/include/python3.9/structseq.h:22:27: note: previous declaration of ‘PyStructSequence_UnnamedField’ was here
   22 | extern const char * const PyStructSequence_UnnamedField;
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01142513-python-scandir/

For all our attempts to build python-scandir with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-scandir/

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

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 1 Charalampos Stratakis 2020-01-10 00:28:44 UTC
This is due to PyStructSequence_UnnamedField being now a constant in Python 3.9. This should be easily fixable by changing the type.

https://github.com/python/cpython/pull/17005/files

Comment 2 Petr Viktorin 2020-01-10 08:36:21 UTC
scandir is a backport of os.scandir and os.walk from Python 3.5+ standard library. How hard would it be to switch everything that needs scandir to the stdlib, and retire python-scandir?
scandir's README says to do:

# Use the built-in version of scandir/walk if possible, otherwise
# use the scandir module version
try:
    from os import scandir, walk
except ImportError:
    from scandir import scandir, walk

Comment 3 Victor Stinner 2020-01-16 14:37:38 UTC
> scandir is a backport of os.scandir and os.walk from Python 3.5+ standard library.
> How hard would it be to switch everything that needs scandir to the stdlib, and retire python-scandir?

It's a drop-in replacement. I don't think that it makes sense to use the backport on Python 3.5 and newer.

The documentation says:

"This scandir module is intended to work on Python 2.7+ and Python 3.4+ (and it has been tested on those versions)."

Does another package depend on this 3rd party scandir package?

Comment 4 Miro Hrončok 2020-01-16 14:45:17 UTC
Nothing in Fedora seems to require this. It indeed shall be retired, if my repoquery is right.

We need to adapt our bootstrap sequence not to list this package.

Comment 5 Avram Lubkin 2020-01-16 21:17:48 UTC
I had the same result and went ahead and retired it in master. Will live on in EPEL 6 and 7.

Comment 6 Ben Cotton 2020-02-11 17:34:11 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 7 Miro Hrončok 2020-02-28 10:00:23 UTC
The package was retired.


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