Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
# commands and is appended to __doc__ after the class has been defined.

import os
import io
import re
import sys
import cmd
Expand Down Expand Up @@ -1565,7 +1566,7 @@ def _runscript(self, filename):
self._wait_for_mainpyfile = True
self.mainpyfile = self.canonic(filename)
self._user_requested_quit = False
with open(filename, "rb") as fp:
with io.open_code(filename) as fp:
statement = "exec(compile(%r, %r, 'exec'))" % \
(fp.read(), self.mainpyfile)
self.run(statement)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:mod:`pdb` now uses :meth:`io.open_code` to trigger auditing events.