Bug 2246083 - mkosi14 fails to build with Python 3.13: ModuleNotFoundError: No module named 'crypt'
Summary: mkosi14 fails to build with Python 3.13: ModuleNotFoundError: No module named...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: mkosi14
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2023-10-25 10:34 UTC by Karolina Surma
Modified: 2024-04-21 19:48 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-04-21 19:48:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2023-10-25 10:34:23 UTC
mkosi14 fails to build with Python 3.13.0a1.

+ /usr/bin/pytest tests/ -v --ignore=tests/test_config_parser.py -k 'not test_copy_file'
ImportError while loading conftest '/builddir/build/BUILD/mkosi-14/tests/conftest.py'.
tests/conftest.py:5: in <module>
    from tests.test_config_parser import MkosiConfig
tests/test_config_parser.py:14: in <module>
    import mkosi
mkosi/__init__.py:11: in <module>
    import crypt
E   ModuleNotFoundError: No module named 'crypt'

According to https://docs.python.org/3.13/whatsnew/3.13.html:

PEP 594: Remove the crypt module and its private _crypt extension, deprecated in Python 3.11.
The hashlib module is a potential replacement for certain use cases.
Otherwise, the following PyPI projects can be used:
- bcrypt: Modern password hashing for your software and your servers.
- passlib: Comprehensive password hashing framework supporting over 30 schemes.
- argon2-cffi: The secure Argon2 password hashing algorithm.
- legacycrypt: Wrapper to the POSIX crypt library call and associated functionality.
(Contributed by Victor Stinner in gh-104773.)


https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06558025-mkosi14/

For all our attempts to build mkosi14 with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/mkosi14/

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

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Zbigniew Jędrzejewski-Szmek 2023-11-26 11:43:40 UTC
mkosi14 will be retired once f41 is branched.
The main mkosi version switched to cryptography a while ago.

Comment 2 Aoife Moloney 2024-02-15 23:01:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.


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