Keith Prussing <kprussin...@gmail.com> added the comment:

Caveat: It's been a few years so I'm trying to recall what I was doing at the 
time and what my original problem was.

I understand and expect pdb to populate __package__ and __main__ to be what it 
expects when run as a module with -m.  However, I believe my expectation was 
for it to not alter the relevant __package__ or __main__ with respect to the 
script being debugged.  This was the behavior in Python 2.7 which changed 
(unexpectedly to me) in Python 3.4 (or earlier.  I obviously didn't look too 
hard).  I must have been trying to debug a script that expected to run using 
the -m option but could be run as a script too.

A few things have changed since the original report:

1.  I have forgotten which script/tool I was working on so I wouldn't be able 
to find it if I tried.
2.  I was trying to support Python 2.7 and Python 3 (which I have 0 interest in 
doing ever again),
3.  This small gotcha apparently hasn't tripped up anyone else.

At this point, I suspect this has been overcome by events and can be closed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue25682>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to