fabioz / PyDev.Debugger

Sources for the debugger used in PyDev, PyCharm and VSCode Python
Eclipse Public License 1.0
434 stars 122 forks source link

Update bytecode to 0.13.0 and simplify patch #225

Open juliangilbey opened 2 years ago

juliangilbey commented 2 years ago

Hi Fabio,

In my attempts to package pydevd for Debian, I have packaged bytecode separately. (Debian is quite against having vendored copies of software in other packages wherever it can be avoided.) In the process of doing so, I discovered that the patched version of bytecode in pydevd fails some of the bytecode package tests because of a subtle issue: having stream=sys.stdout as a default argument in dump_bytecode means that contextlib.redirect_stdout() fails to actually redirect stdout.

This PR does several different things:

This reduces the entire patch size to about 11 changed lines (depending on how you count!).

All of the pydevd tests still pass with both Python 3.9 and 3.10 (except for the two mentioned in #222).