-
Notifications
You must be signed in to change notification settings - Fork 813
fix: tab completion broken with Python 3.12 #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
closes cyrus-and#325 The fix comes from gdb upstream @ https://sourceware.org/bugzilla/show_bug.cgi?id=32473
@ChenRuiwei can you confirm this is working for you? |
Yes, although GDB has reached version 16.2, the problem still persists. I had been using using |
I'm still unable to reproduce this issue... it's not clear to me if the culprit is GDB, the Python version embedded by it, or both. I tried with several Debian and Ubuntu versions, with no luck. For example, tab completion works here:
|
It seems everything is fine as long as nobody imports |
This is the current environment I'm working with. I guess that Python needs to be at least version 3.13. I will try to create a Dockerfile to reproduce the issue.
|
Tried with both:
In both cases, tab completion works properly, and in both cases manually importing
|
I'm trying with the following and tab completion works properly. FROM archlinux
RUN pacman --noconfirm -Sy gdb wget
RUN wget -P ~ https://github.com/cyrus-and/gdb-dashboard/raw/master/.gdbinit
|
Try |
Do you have a reproducible way of fetching this combo? E.g., a particular version of Arch or something? |
install |
Things goes weird now. I can no not reproduce this issue in Docker, even though I've tried different versions of GDB and Python...... |
You can modify the official fix to debug if you're importing
|
Good idea! I output the traceback into in a file when the import error raises.
|
So it's, at least, Pygments that requires |
Pygments is installed by pacman.
|
I have reproduced the issue in Docker! After I installed all the python packages I have been installed in my host computer in Docker environment, the issue appears.
|
Can you share the Dockerfile if you have one? |
May be this would be OK, I have'nt tested it yet in one Dockerfile though, the network is quite unstable that I can not build it quickly.
|
After checking the backtrace again, it is
|
Phew, so it seems it's both:
I can automatically reproduce this with: FROM debian:sid
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt --yes install gdb wget python3-pip vim
RUN wget -P ~ https://github.com/cyrus-and/gdb-dashboard/raw/master/.gdbinit
RUN python3 -m pip install --break-system-packages pygments==2.19.1
RUN printf '#include <stdio.h>\nint main() {printf("asd");}' >main.c
RUN gcc -g main.c
RUN apt --yes install ipython3
ENTRYPOINT ["gdb", "-ex", "start", "a.out"] |
Thank you @neurocyte, but I like @ChenRuiwei's solution better. |
please write more comments in https://sourceware.org/bugzilla/show_bug.cgi?id=32473 |
closes #325
The fix comes from gdb upstream @ https://sourceware.org/bugzilla/show_bug.cgi?id=32473