Normalize debugger temp file paths on Windows#838
Conversation
blink1073
left a comment
There was a problem hiding this comment.
Rather than adding a dependency, we could use a ctypes version of this function call: https://mail.python.org/pipermail/python-win32/2008-January/006642.html
|
@blink1073 thanks for the review! Updated to use ctypes and remove the direct dependency on pywin32. The ctypes code is loosely based on the similar handling in debugpy here. |
| return filename | ||
|
|
||
| # test that it works | ||
| _convert_to_long_pathname(__file__) |
There was a problem hiding this comment.
Can you please add this as a test in test_debugger.py instead of inline here?
There was a problem hiding this comment.
I can add it there to test as well. The intent with adding it here is to catch any errors with e.g. DLL references early so we can fail just once up front and fallback to not normalizing, rather than failing every time we get the path below.
There was a problem hiding this comment.
Added a test, and clarified the inline comment. Note that debugpy (or rather pydevd) does a similar runtime check here.
blink1073
left a comment
There was a problem hiding this comment.
Looks good, thank you!
Fixes #784