Bug#1063491: python3-jedi: unvendoring python3-typeshed breaks other packages

2024-02-15 Thread Daniel Vacek
Package: python3-jedi
Followup-For: Bug #1063491
X-Debbugs-Cc: neel...@gmail.com

The 0.19.1+ds1-1 still depends on python3-typeshed. Is that correct?

--nX


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.6.8-rt-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FORCED_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-jedi depends on:
ii  python33.11.6-1
ii  python3-parso  0.8.3-1

python3-jedi recommends no packages.

python3-jedi suggests no packages.

-- no debconf information



Bug#1063491: python3-jedi: unvendoring python3-typeshed breaks other packages

2024-02-08 Thread Julian Gilbey
Package: python3-jedi
Version: 0.19.1+ds-1
Severity: grave

Unfortunately, just removing the vendored typeshed from this package
causes other packages to break.  I don't fully understand the
mechanism, but jedi looks to load things from the vendored directory,
and if it doesn't find them, things go horribly wrong.  It's broken
the spyder (autopkg)tests, and several others (see tracker.debian.org
for details).  To be sure that python3-jedi was the cause, I built a
local version of python3-jedi 0.19.1 with the vendored typeshed still
present, and the spyder tests work fine with this single change.

A reasonable (short-term?) fix is to reintroduce the vendored version
of typeshed.  This is much better than having a broken package.

A horrible fix is to symlink all of the stubs from the
python3-typeshed to the expected places in jedi/third_party/typeshed,
but that seems like a lot of work.  (One would have to get rid of
typeshed/stdlib/2/ in the process, but I don't know if that will break
things.  Hopefully not!)  Most of the stubs in python3-typeshed are
not imported into jedi/third_party, only a few.  But the directory
layout is very different.

A probably better fix would be to change the code in jedi to not look
for the third_party/typeshed directory and to perhaps look in
/usr/lib/python3/dist-packages/*-stubs instead (as python3-typeshed
stores its stubs in multiple directories).  But that's significantly
more work and will be harder to test.

Best wishes,

   Julian