Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893538 - dev-python/ply-3.11-r2 - ImportError: cannot import name LegacyVersion from packaging.version (/usr/lib/python3.10/site-packages/p
Summary: dev-python/ply-3.11-r2 - ImportError: cannot import name LegacyVersion from p...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-07 20:15 UTC by Toralf Förster
Modified: 2023-02-09 18:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.83 KB, text/plain)
2023-02-07 20:15 UTC, Toralf Förster
Details
dev-python:ply-3.11-r2:20230207-182012.log (dev-python:ply-3.11-r2:20230207-182012.log,5.75 KB, text/plain)
2023-02-07 20:15 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,11.92 KB, text/plain)
2023-02-07 20:15 UTC, Toralf Förster
Details
environment (environment,133.80 KB, text/plain)
2023-02-07 20:15 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,15.60 KB, application/x-bzip)
2023-02-07 20:15 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,30.32 KB, application/x-bzip)
2023-02-07 20:16 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-02-07 20:15:54 UTC
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/setuptools/msvc.py", line 24, in <module>
    from packaging.version import LegacyVersion
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/usr/lib/python3.10/site-packages/packaging/version.py)
 * ERROR: dev-python/ply-3.11-r2::gentoo failed (compile phase):
 *   Wheel build failed

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-j4-20230207-150031

  -------------------------------------------------------------------

GNUMAKEFLAGS="$GNUMAKEFLAGS --jobserver-style=pipe"
GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle"
gcc-config -l:
 [1] x86_64-gentoo-linux-musl-12 *
clang/llvm (if any):
Python 3.10.9
Available Rust versions:
  [1]   rust-1.67.0 *
php cli (if any):

  HEAD of ::gentoo
commit c92c5d0ffe87591d8533e5484bcce523b51c3172
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Feb 7 14:31:59 2023 +0000

    2023-02-07 14:31:58 UTC

emerge -qpvO dev-python/ply
[ebuild  N    ] dev-python/ply-3.11-r2  USE="-examples" PYTHON_TARGETS="python3_10 -pypy3 -python3_9 -python3_11"
Comment 1 Toralf Förster gentoo-dev 2023-02-07 20:15:55 UTC
Created attachment 850096 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-02-07 20:15:56 UTC
Created attachment 850098 [details]
dev-python:ply-3.11-r2:20230207-182012.log
Comment 3 Toralf Förster gentoo-dev 2023-02-07 20:15:56 UTC
Created attachment 850100 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2023-02-07 20:15:58 UTC
Created attachment 850102 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-02-07 20:15:59 UTC
Created attachment 850104 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2023-02-07 20:16:00 UTC
Created attachment 850106 [details]
temp.tar.bz2
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-09 03:38:47 UTC
If you're hitting this, please run: emerge -v1 dev-python/setuptools.

This was/is caused by some now-removed versions of setuptools in ~arch. Current stable and ~arch versions are OK. There's no easy way to force ~arch users to get the right version, as we can't just simply add a >= dep in the eclass, as we haven't stabled a new enough version yet, but stable users were also never affected by the bad versions.

We may add a || ( ... ) dep in the eclass for now given this is such a pain.
Comment 8 Larry the Git Cow gentoo-dev 2023-02-09 18:22:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50546c3db84904399e5624eb8f163e3d2be284e3

commit 50546c3db84904399e5624eb8f163e3d2be284e3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-09 18:19:38 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-09 18:22:36 +0000

    distutils-r1.eclass: adjust setuptools dep to avoid known-bad versions
    
    79071eb9f6f4a5725c1a89700bcfd7f120101179 tried to mitigate this but
    blockers don't affect dependency resolution (ordering), so let's add
    a || ( <dev-python/setuptools-... >=dev-python/setuptools-...) dep
    in the eclass to ensure that the bad in-between versions (which were
    in ~arch, not stable, for a period, and are no longer in tree) aren't
    considered good enough to install any distutils-r1 PEP517 packages.
    
    We can clean this up once newer setuptools is stable & then simplify
    (and tighten) the dep.
    
    (Worth keeping in mind that Portage (rightly) doesn't aggressively
    update things listed in RDEPEND in that order simply because they're
    in RDEPEND. It might update something listed in RDEPEND after the
    package listing it provided there's no >= or otherwise dep.)
    
    Bug: https://bugs.gentoo.org/892529
    Bug: https://bugs.gentoo.org/892525
    Bug: https://bugs.gentoo.org/893538
    Bug: https://bugs.gentoo.org/893632
    Bug: https://bugs.gentoo.org/893630
    Bug: https://bugs.gentoo.org/893634
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/distutils-r1.eclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)