[Bug 2080426] Re: module not available for python versions in universe
Mauricio Faria de Oliveira
2080426 at bugs.launchpad.net
Wed Dec 11 18:38:28 UTC 2024
This request has been rejected.
Some snippets fo the rationale:
- While it is true that packages in universe are supported in Pro,
Python modules are only built for the supported Python versions.
- Python extensions are packaged for use with the default Python interpreter version.
Other Python versions may be provided in universe for use with virtualenv
or similar mechanisms, but do not have access to packaged extensions.
- The new python version was added after the release, to provide a test bed
for developers, using this in a venv, together with pip.
- Changing the /usr/bin/python3 symlink (eg, manually, alternatives, divert)
is not supported. This is not what the release was designed for.
** Changed in: python-apt (Ubuntu)
Status: Opinion => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/2080426
Title:
module not available for python versions in universe
Status in python-apt package in Ubuntu:
Won't Fix
Bug description:
Some Ubuntu releases may provide more than one version of Python;
e.g., Jammy has python3.10 in _main_ and python3.11 in _universe_.
However, the modules are only shipped for the python version in
_main_, and can't be imported by python version(s) in _universe_.
It's understandable that not all python versions are considered
"supported" by `py3versions`, particularly if not in _main_, but...
It turns out Ubuntu Pro provides support for packages in _universe_,
and there are reports of this import error/failure from customers
with some frequency.
Could the build/delivery of the python-apt modules be considered
for all python versions available in a series, independently of
the component (main/universe)?
Thanks!
Details:
---
$ lsb_release -cs
jammy
$ apt-cache search --names-only '^python3\.[0-9]+$'
python3.10 - Interactive high-level object-oriented language (version 3.10)
python3.11 - Interactive high-level object-oriented language (version 3.11)
$ apt show python3.10 python3.11 2>/dev/null | grep -e Package: -e Section:
Package: python3.10
Section: python
Package: python3.11
Section: universe/python
$ sudo apt install --yes python3-apt python3.11 python3.10
$ py3versions --help | grep supported
Usage: [-v] [-h] [-d|--default] [-s|--supported] [-i|--installed]
-s, --supported print the supported python3 versions
-i, --installed print the installed supported python3 versions
$ py3versions --supported
python3.10
$ py3versions --installed # ... AND supported
python3.10
$ dpkg -L python3-apt | grep -F 'apt_pkg.' # ... ONLY 3.10, NOT 3.11
/usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so
$ python3.10 -c 'import apt_pkg'; echo $?
0
$ python3.11 -c 'import apt_pkg'; echo $?
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'apt_pkg'
1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/2080426/+subscriptions
More information about the foundations-bugs
mailing list