_uuid C extension module missing from libpython3.12-stdlib on Ubuntu 24.04 (Noble)

Bug #2147343 reported by Christiaan Rademan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.12 (Ubuntu)
New
Undecided
Unassigned
python3.14 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The _uuid C extension module is not included in the libpython3.12-stdlib
package (3.12.3-1ubuntu0.12) on Ubuntu 24.04 amd64.

Impact not on earlier versions using earlier versions of Ubuntu LTS, such as 22.04.

This module is built by CPython's when uuid-dev (libuuid headers) is available at compile time. It provides the generate_time_safe() function, which wraps libuuid's uuid_generate_time_safe(), enabling uuid.uuid1() to return SafeUUID.safe when the uuidd daemon is running.

Without _uuid.cpython-312-x86_64-linux-gnu.so in lib-dynload/, Python's uuid module falls back to pure-Python UUID generation, which always returns SafeUUID.unknown, even when uuidd is installed and running. This makes it impossible for applications to verify the UUID uniqueness safety.

Steps to reproduce:
  1. Fresh Ubuntu 24.04 install with python3.12 (default)
  2. apt install uuid-runtime
  3. systemctl start uuidd
  4. python3 -c "import uuid; print(uuid.uuid1().is_safe)"

Expected: SafeUUID.safe
Actual: SafeUUID.unknown

Cause: _uuid.cpython-312-x86_64-linux-gnu.so is not present in /usr/lib/python3.12/lib-dynload/. Confirmed by checking the official package file list at: https://packages.ubuntu.com/noble/amd64/libpython3.12-stdlib/filelist

It is a critical feature for services that spawn multiple processes and need to create unique incremental UUIDs, such as UUID1 in this case. UUID4 does not solve the incremental part.

Revision history for this message
Matthias Klose (doko) wrote :

looks like uuid-dev is only an implicit build dependency. in 3.14, it's pulled in from tk-dev -> fontconfig-dev. Having that build dependency explicit, should fix it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.14 - 3.14.4-1

---------------
python3.14 (3.14.4-1) unstable; urgency=medium

  * Python 3.14.4 release.
  * Also post-process the _sysconfig_vars_*.json files, like done for the
    _sysconfigdata_*.py files.
  * Fix the base_interpreter path in the build-details_*.json files.
  * Don't ship the build-details_*.json file for the debug interpreter,
    because it is installed under the same name as the one for the normal
    build. Still has different contents. PEP 739 deficiency ...
  * Explicitly build-depend on uuid-dev. LP: #2147343.
  * Update VCS attributes

 -- Matthias Klose <email address hidden> Wed, 08 Apr 2026 06:02:31 +0200

Changed in python3.14 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.