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
Date 2015-11-20.16:02:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448035339.32.0.969832659097.issue25682@psf.upfronthosting.co.za>
In-reply-to
Content
When a module is run under pdb in Python 3, __package__ is set to the empty string instead of None.  The attached minimum working example depicts this behavior.  The results are summarized in the following table.

=============== ====== ======
    Command      Py 2   Py 3
=============== ====== ======
 python          None   None
 python -m        ''     ''
 python -m pdb   None    ''
 pdb             None    ''
=============== ====== ======

The behavior I expected was for the Python executable to treat the input file as a script and not a module.  My rationale is that pdb is loaded as the executing module that accepts a script as its argument.  Per the help, only one -m option is allowed when launching python.
History
Date User Action Args
2015-11-20 16:02:19Keith Prussingsetrecipients: + Keith Prussing
2015-11-20 16:02:19Keith Prussingsetmessageid: <1448035339.32.0.969832659097.issue25682@psf.upfronthosting.co.za>
2015-11-20 16:02:19Keith Prussinglinkissue25682 messages
2015-11-20 16:02:19Keith Prussingcreate