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 nlopes
Recipients amaury.forgeotdarc, inducer, nlopes
Date 2009-06-22.22:12:43
SpamBayes Score 0.00019470988
Marked as misclassified No
Message-id <1245708764.75.0.258021729544.issue6323@psf.upfronthosting.co.za>
In-reply-to
Content
That fixes it.
It seems to be introduced when committing a fix for issue #1038.

-bash-3.2$ svn diff -r 58126:58127 Lib/pdb.py
Index: Lib/pdb.py
===================================================================
--- Lib/pdb.py  (revision 58126)
+++ Lib/pdb.py  (revision 58127)
@@ -1166,12 +1166,8 @@
         self._wait_for_mainpyfile = 1
         self.mainpyfile = self.canonic(filename)
         self._user_requested_quit = 0
-        fp = open(filename)
-        try:
-            script = fp.read()
-        finally:
-            fp.close()
-        statement = 'exec("%s")' % script
+        with open(filename) as fp:
+            statement = fp.read()
         self.run(statement)

 # Simplified interface
History
Date User Action Args
2009-06-22 22:12:44nlopessetrecipients: + nlopes, amaury.forgeotdarc, inducer
2009-06-22 22:12:44nlopessetmessageid: <1245708764.75.0.258021729544.issue6323@psf.upfronthosting.co.za>
2009-06-22 22:12:43nlopeslinkissue6323 messages
2009-06-22 22:12:43nlopescreate