Closed Freed-Wu closed 1 year ago
When you say, "cannot enter the REPL", what's the symptom?
It probably depends on the REPL being used. IPython seems to work OK for me, but it does break other repls. This could perhaps be considered a bug in the specific repls, although I'm unclear why you would clear sys.argv
like this. I would expect that in general that messing around with sys
globals is going to break things.
but it does break other repls
I use ptpython.
what's the symptom
Press !
can not enter the ptpyhon's REPL.
I'm unclear why you would clear sys.argv like this
Some code do it and I just test and found this bug. :smile:
IPython seems to work OK for me, but it does break other repls
I have tested and found it seems that only ptpython has this problem. So I guess it is the bug of upstream.
Describe the bug When sys.argv be changed, pudb3 cannot enter REPL
To Reproduce test.py
pudb3 test.py
, whensys.argv
is[]
, press!
cannot enter REPL. whensys.argv
recovery, press!
can enter REPL.Expected behavior press
!
can enter REPL.Additional context Can we backup
sys.argv
when the program start, And when we press!
recoversys.argv
temporarily to avoid this bug?Complete:
if some module of
sys.modules
(e.g, argparse) be changed, the same phenomenon will also happen.