Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1266077

Bug#1118055: python3-pysmi: might trigger: AttributeError: module 'importlib' has no attribute 'machinery'

From Cyril Brulebois <cyril@debamax.com>
Newsgroups linux.debian.bugs.dist
Subject Bug#1118055: python3-pysmi: might trigger: AttributeError: module 'importlib' has no attribute 'machinery'
Date 2025-10-14 16:30 +0200
Message-ID <LFOch-59EL-5@gated-at.bofh.it> (permalink)
References <LFMat-58ly-3@gated-at.bofh.it> <LFMat-58ly-3@gated-at.bofh.it>
Organization DEBAMAX

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

Cyril Brulebois <cyril@debamax.com> (2025-10-14):
> It seems something based on the following instead could work more
> reliably:
> 
>     from importlib.machinery import SOURCE_SUFFIXES, BYTECODE_SUFFIXES
> 
> Ditto for the util bit (based on the dir() output above), only found in
> pysmi/searcher/pypackage.py):
> 
>     from importlib.util import MAGIC_NUMBER

Since I'd like to avoid touching the overall build chroot management
logic (i.e. I'd like to avoid injecting a patched package in some way or
another), I've opted for declaring a submodule, patching/unpatching
manually, and with a PYTHONPATH pointing to the pysmi submodule tweaked
with the attached patch, I can build the many-MIBs-package inside the CI
successfully.

That particular codepath only uses a portion of the patched pysmi code
(pysmi/searcher/pyfile.py), so please don't consider the overall patch
battle-tested.


Cheers,
-- 
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1118055: python3-pysmi: might trigger: AttributeError: module 'importlib' has no attribute 'machinery' Cyril Brulebois <cyril@debamax.com> - 2025-10-14 14:20 +0200
  Bug#1118055: python3-pysmi: might trigger: AttributeError: module 'importlib' has no attribute 'machinery' Cyril Brulebois <cyril@debamax.com> - 2025-10-14 16:30 +0200
  Bug#1118055: python3-pysmi: might trigger: AttributeError: module 'importlib' has no attribute 'machinery' Colin Watson <cjwatson@debian.org> - 2025-10-14 23:20 +0200

csiph-web