Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 941872

Summary: sys-apps/dstat-0.7.4-r3: Python 3.12 incompatibility - No module named imp
Product: Gentoo Linux Reporter: Zoltan Puskas <zoltan>
Component: Current packagesAssignee: Paul Healy <lmiphay>
Status: UNCONFIRMED ---    
Severity: normal CC: flow, proxy-maint, zoltan
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=929807
https://github.com/gentoo/gentoo/pull/39059
Whiteboard:
Package list:
Runtime testing required: ---

Description Zoltan Puskas 2024-10-20 00:39:40 UTC
imp module has been deprecated in Python 3.12 and going forward[1], which means any code using it will fail some way or another. dstat has not migrated over to importlib, which means currently some functionality does not work in an environment with Python 3.12 or later.

[1] https://docs.python.org/3.11/library/imp.html


Reproducible: Always

Steps to Reproduce:
Run command with --top-io option and see it fail to load module and print relevant information.

Actual Results:  
>>> dstat -tdD /dev/sda1 --top-io
Module dstat_top_io failed to load. (No module named 'imp')
----system---- --dsk/sda1-
     time     | read  writ
19-10 17:31:09|1728k   99k
19-10 17:31:10|   0     0
19-10 17:31:11|   0     0


Expected Results:  
Command should print processes generating the IO on the disk.

>>> emerge --info
Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-14, glibc-2.40-r5, 6.11.3-gentoo x86_64)
=================================================================
System uname: Linux-6.11.3-gentoo-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.40
KiB Mem:   131843104 total, 101410304 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Sat, 12 Oct 2024 18:15:00 +0000
Head commit of repository gentoo: e0294f7e92b6c07542a4d90c2bd5598d4d012845
Timestamp of repository guru: Sat, 12 Oct 2024 19:03:18 +0000
Head commit of repository guru: 1f886be9aea2af89690bc6393746a943af97012f

Timestamp of repository science: Thu, 10 Oct 2024 18:19:11 +0000
Head commit of repository science: 325d4b8ee78e56c1aefbcb42c118e56b11e41c91

Timestamp of repository sinustrom: Sat, 12 Oct 2024 23:48:20 +0000
Head commit of repository sinustrom: 6306f9e8125dfef311e15f70725ea322df53f141

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p2) 2.43.1
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.30.5::gentoo
dev-build/libtool:         2.5.3::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust-bin:         1.81.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-apps/systemd:          256.7::gentoo
sys-devel/binutils:        2.43-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo, 19.1.1::gentoo
sys-devel/gcc:             13.3.1_p20240920::gentoo, 14.2.1_p20240921::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo
sys-devel/llvm:            18.1.8-r4::gentoo, 19.1.1::gentoo
sys-kernel/linux-headers:  6.11::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://barbican.sinustrom.net/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

science
    location: /var/db/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/science.git
    masters: gentoo
    volatile: False

sinustrom
    location: /var/db/repos/sinustrom
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/sinustrom.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64_hardened

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ftree-vectorize"
DISTDIR="/var/cache/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-march=native -O2 -pipe -ftree-vectorize"
GENTOO_MIRRORS="rsync://barbican.sinustrom.net/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j32"
PKGDIR="/var/cache/portage/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/zsh"
USE="7zip X a52 aac acl acpi activities alsa amd64 avif bash-completion branding bzip2 cairo cdda cdr cet crypt cuda cups dbus declarative dri dts dvd dvdr encode exif flac gdbm gif gphoto2 gpm gtk gui hardened heif iconv icu ipv6 jpeg jpeg2k jpegxl kde kf6compat kwallet lcms libnotify libtirpc lm_sensors lto lzma mad mng modules-sign mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opencl opengl openmp opus pam pango pcre pdf pipewire plasma png policykit posix ppds pulseaudio qml qt6 readline screencast sdl seccomp secureboot smp sound spell ssl startup-notification svg systemd test-rust threads tiff truetype udev udisks unicode upower usb uxa vdpau verify-sig vim-syntax vorbis vulkan wayland webp widgets wxwidgets x264 xattr xcb xft xml xpm xv xvid zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gcc_12" ALSA_CARDS="hda-intel usb-audio" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput wacom synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="x86 BPF NVPTX" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="i386 x86_64 arm aarch64" QEMU_USER_TARGETS="i386 x86_64 arm aarch64" RUBY_TARGETS="ruby32" SANE_BACKENDS="plustek genesys pixma" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Zoltan Puskas 2024-10-20 00:46:07 UTC
It seems upstream is dead since four years ago, so this is unlikely to be fixed there. There is a fork though that carries the torch: https://github.com/scottchiefbaker/dool/
Comment 2 Florian Schmaus gentoo-dev 2024-10-20 08:08:18 UTC
(In reply to Zoltan Puskas from comment #1)
> It seems upstream is dead since four years ago, so this is unlikely to be
> fixed there. There is a fork though that carries the torch:
> https://github.com/scottchiefbaker/dool/

Note that sys-apps/dool is in ::guru