Bug#1031026: ycmd broken on current default python3 (3.11): "cannot import name 'getargspec' from 'inspect'"
Package: python3-bottle Followup-For: Bug #1031026 X-Debbugs-Cc: a...@dwimlabs.net, da...@kalnischkies.de Control: tags -1 fixed-upstream Control: forwarded -1 https://github.com/bottlepy/bottle/issues/1387 Control: close -1 0.12.23-1 Thanks Anton, David - based on your report and comments, I think all is well with this bug and that it can be closed. Upstream (bottlepy) resolved this bug in version 0.12.23 of bottle, by adding some code[1] that provides a polyfill for the 'inspect.getargspec' method that was removed from version 3.11 of Python. And the maintainer of this package subsequently uploaded version 0.12.23-1 of the Debian python3-bottle package, including the fix. To make sure, I configured and ran 'ycmd' locally and was able to start the server. [1] - https://github.com/bottlepy/bottle/commit/69fd3f6202caecda2e2f915e67c81a2bb099e998
Bug#1031026: ycmd broken on current default python3 (3.11): "cannot import name 'getargspec' from 'inspect'"
10.02.2023 20:34, David Kalnischkies пишет: Not sure why you have a mixture of packages from Debian sid (e.g. libc6) and Debian stable (e.g. python3-bottle) installed. Ah, that's probably the issue here. I had an apt pin that was making packages from stable-security have a slightly higher priority than packages from testing. Undid that and python3-bottle 0.12.23-1 works fine with python3.11. Sorry for the confusion.
Bug#1031026: ycmd broken on current default python3 (3.11): "cannot import name 'getargspec' from 'inspect'"
Control: reassign -1 python3-bottle On Fri, Feb 10, 2023 at 07:39:19PM +0400, Anton Shestakov wrote: > Currently in Debian testing python3 refers to python3.11, but that version has > removed getargspec function from inspect module. So when you try to run ycmd, > it errors out: > > Traceback (most recent call last): > File "/usr/bin/ycmd", line 37, in > from ycmd.hmac_plugin import HmacPlugin > File "/usr/lib/ycmd/ycmd/hmac_plugin.py", line 19, in > from bottle import request, abort, response > File "/usr/lib/python3/dist-packages/bottle.py", line 44, in > from inspect import getargspec > ImportError: cannot import name 'getargspec' from 'inspect' > (/usr/lib/python3.11/inspect.py) > > Running manually with `python3.10 /usr/bin/ycmd` shows usage information from > ycmd, meaning the command is not completely broken on python3.10. But > `python3.11 /usr/bin/ycmd` shows the error shown above, so this issue > definitely was exposed by python3.11 becoming the new default. > > > Versions of packages ycmd depends on: > ii libabsl20220623 20220623.1-1 > ii libc6 2.36-8 > ii libclang1-141:14.0.6-10+b1 > ii libgcc-s1 12.2.0-14 > ii libpython3.11 3.11.1-2 > ii libstdc++6 12.2.0-14 > ii python3 3.11.1-3 > ii python3-bottle 0.12.19-1+deb11u1 > ii python3-frozendict 1.2-3 > ii python3-future 0.18.2-6 > ii python3-jedi0.18.2-1 > ii python3-watchdog2.2.1-1 As the python trace shows the import is done inside python3-bottle, and indeed, not a single mention of getargspec in ycmd source, so reassigning there. I have to note that I can't reproduce this locally on a Debian sid machine which has already autoremoved python3.10 and is so 3.11 only. Neither can the autopkgtests of ycmd or vim-youcompleteme which would flare up in bright red if ycmd is fundamentally broken (I would hope). That might very likely be due to me/CI using python3-bottle 0.12.23-1, which if I read the code right uses getargspec only in a python2 path, so this bugreport might very well be already fixed. Not sure why you have a mixture of packages from Debian sid (e.g. libc6) and Debian stable (e.g. python3-bottle) installed. While I guess I could raise a versioned dependency on python3-bottle from ycmd to ensure you have it installed but that isn't very elegant. In an optimal world libpython3.11-minimal (which ships inspect.py) would break old versions of python3-bottle, I guess, so that this is 'fixed' for all bottle users. I will leave that up to folks who actually know python better than me through. Best regards David Kalnischkies signature.asc Description: PGP signature
Bug#1031026: ycmd broken on current default python3 (3.11): "cannot import name 'getargspec' from 'inspect'"
Package: ycmd Version: 0+20230103+gitf53e7ac+ds-1 Severity: normal X-Debbugs-Cc: a...@dwimlabs.net Dear Maintainer, Currently in Debian testing python3 refers to python3.11, but that version has removed getargspec function from inspect module. So when you try to run ycmd, it errors out: Traceback (most recent call last): File "/usr/bin/ycmd", line 37, in from ycmd.hmac_plugin import HmacPlugin File "/usr/lib/ycmd/ycmd/hmac_plugin.py", line 19, in from bottle import request, abort, response File "/usr/lib/python3/dist-packages/bottle.py", line 44, in from inspect import getargspec ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib/python3.11/inspect.py) Running manually with `python3.10 /usr/bin/ycmd` shows usage information from ycmd, meaning the command is not completely broken on python3.10. But `python3.11 /usr/bin/ycmd` shows the error shown above, so this issue definitely was exposed by python3.11 becoming the new default. Versions of packages ycmd depends on: ii libabsl20220623 20220623.1-1 ii libc6 2.36-8 ii libclang1-141:14.0.6-10+b1 ii libgcc-s1 12.2.0-14 ii libpython3.11 3.11.1-2 ii libstdc++6 12.2.0-14 ii python3 3.11.1-3 ii python3-bottle 0.12.19-1+deb11u1 ii python3-frozendict 1.2-3 ii python3-future 0.18.2-6 ii python3-jedi0.18.2-1 ii python3-watchdog2.2.1-1 Versions of packages ycmd recommends: pn libclang-common-14-dev ii vim-youcompleteme 0+20230109+git7620d87+ds-2 Versions of packages ycmd suggests: pn ccls pn clangd pn fortran-language-server pn gopls pn node-typescript -- no debconf information