[Python-ideas] pdb to support running modules

Nick Coghlan ncoghlan at gmail.com
Tue Jan 9 21:27:40 EST 2018

On 10 January 2018 at 05:18, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> On Thu, Jan 4, 2018 at 8:15 PM, Guido van Rossum <guido at python.org> wrote:
>> Sounds uncontroversial, this can just be done via bugs.python.org.
> .. and it has been proposed there over 7 years ago:
> <https://bugs.python.org/issue9325>.

Aye, I linked Mario's patch up to that as a higher level tracking
issue - the `pdb -m` support is available in 3.7.0a4 :)

He's also now submitted comparable patches for a couple of other
modules which I'll aim to get to before 3.7.0b1


P.S. For anyone curious as to what the delay has been, the problem is
that the *public* runpy API isn't quite flexible enough to support the
way some of these other modules want to run code, and even if we had
added such an API, they likely would have required refactoring in
order to use it.

Mario's patches have instead been taking advantage of the fact that
these are stdlib modules we're updating, and hence we can get away
with using *private* runpy APIs for now, and then based on these
conversions, we can look at what features the public runpy API would
need in order for us to migrate them away from using those private

Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list