Skip to content

CPython 3.11.11 from uv fails on multiprocessing.Queue().qsize() (aarch64) #977

@gbdjxgp

Description

@gbdjxgp

Summary

When creating a venv with uv and Python 3.11.11 on linux aarch64, calling multiprocessing.Queue().qsize() raises NotImplementedError. The same code works with uv-managed 3.12.12 and system 3.10.12.

Environment

  • OS: Linux (aarch64)
  • uv: 0.10.0
  • Python (uv-managed):
    • 3.11.11NotImplementedError
    • 3.12.12 → works
    • 3.12.14 → works
  • Python (system):
    • 3.10.12 → works

Reproduction (sanitized)

user@host:~$ uv venv --python=3.11.11
Using CPython 3.11.11
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

user@host:~$ source .venv/bin/activate
(venv) user@host:~$ python - <<'PY'
from multiprocessing import Queue
q = Queue()
q.put(1)
q.put(2)
print('uv venv qsize:', q.qsize())
PY
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "/home/<redacted>/.local/share/uv/python/cpython-3.11.11-linux-aarch64-gnu/lib/python3.11/multiprocessing/queues.py", line 126, in qsize
    return self._maxsize - self._sem._semlock._get_value()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NotImplementedError

Expected

qsize() returns 2 (same as 3.12.12 and system 3.10.12).

Comparison

uv Python 3.12.12 (works)

user@host:~$ uv venv --python=3.12
Using CPython 3.12.12
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

user@host:~$ source .venv/bin/activate
(venv) user@host:~$ python - <<'PY'
from multiprocessing import Queue
q = Queue()
q.put(1)
q.put(2)
print('uv venv qsize:', q.qsize())
PY
uv venv qsize: 2

system Python 3.10.12 (works)

user@host:~$ uv venv --python=3.10
Using CPython 3.10.12 interpreter at: /usr/bin/python3.10
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

user@host:~$ source .venv/bin/activate
(venv) user@host:~$ python - <<'PY'
from multiprocessing import Queue
q = Queue()
q.put(1)
q.put(2)
print('uv venv qsize:', q.qsize())
PY
uv venv qsize: 2

Notes

This looks specific to the uv-provided CPython 3.11.11 build on aarch64.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions