[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1079175: python3-pkg-resources: pkg_resources cannot be imported: No module named 'packaging'



On Tue Aug 20, 2024 at 11:45 PM CEST, Cyril Brulebois wrote:
> Emanuele Rocca <ema@debian.org> (2024-08-20):
> > Package: python3-pkg-resources
> > Version: 72.2.0-1
> > Severity: serious
> >
> > Importing pkg_resources fails with the following error:
> >
> >   (sid-amd64-sbuild)ema@ariel:~$ python3
> >   Python 3.12.5 (main, Aug  7 2024, 13:49:14) [GCC 14.2.0] on linux
> >   Type "help", "copyright", "credits" or "license" for more information.
> >   >>> import pkg_resources
> >   Traceback (most recent call last):
> >     File "<stdin>", line 1, in <module>
> >     File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 95, in <module>
> >       import packaging.specifiers
> >   ModuleNotFoundError: No module named 'packaging'
> >
> > This is a regression in version 72.2.0-1, whereas 70.3.0-2 worked fine.
> >
> > For an example of d-i build failure caused by this problem, see:
> > https://salsa.debian.org/installer-team/debian-installer/-/jobs/6155545
> >
> > It seems that installing python3-packaging, python3-jaraco.text, and
> > python3-platformdirs fixes it.
>
> I couldn't replicate the FTBFS within a devel sid chroot that has tons of
> extra packages, including python3-packaging, and python3-platformdirs, but
> not python3-jaraco.text.

I'm not sure if this is related or will be helpful, but I just got an
error related to 'jaraco' in a CI pipeline in reprotest, while the build
itself succeeded:

```sh
$ su salsa-ci -c "timeout ${SALSA_CI_BUILD_TIMEOUT_ARGS} reprotest \
  --min-cpus $(nproc --all) \
  --store-dir ${WORKING_DIR}/reprotest \
  --verbosity=2  \
  --vary=-time \
  --vary=user_group.available+=salsa-ci,domain_host.use_sudo=1 \
  ${SALSA_CI_DPKG_BUILDPACKAGE_ARGS:+--append-build-command=${SALSA_CI_DPKG_BUILDPACKAGE_ARGS}} \
  ${SALSA_CI_REPROTEST_ARGS} \
  ${WORKING_DIR}/*.dsc -- null" |& OUTPUT_FILENAME=reprotest.log filter-output
Traceback (most recent call last):
  File "/usr/bin/reprotest", line 33, in <module>
    sys.exit(load_entry_point('reprotest==0.7.27', 'console_scripts', 'reprotest')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/reprotest", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 20, in <module>
    import pkg_resources
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 96, in <module>
    from jaraco.text import (
ModuleNotFoundError: No module named 'jaraco'
```

src: https://salsa.debian.org/diederik/simplescreenrecorder/-/jobs/6158157

HTH,
  Diederik

Attachment: signature.asc
Description: PGP signature


Reply to: