This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Keith Prussing
Recipients Keith Prussing, eric.snow, iritkatriel, ncoghlan
Date 2021-06-15.02:16:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623723377.82.0.476980977893.issue25682@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-06-15 02:16:17Keith Prussingsetrecipients: + Keith Prussing, ncoghlan, eric.snow, iritkatriel
2021-06-15 02:16:17Keith Prussingsetmessageid: <1623723377.82.0.476980977893.issue25682@roundup.psfhosted.org>
2021-06-15 02:16:17Keith Prussinglinkissue25682 messages
2021-06-15 02:16:17Keith Prussingcreate