<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/rexec.py, branch 2.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/rexec.py?h=2.3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/rexec.py?h=2.3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2003-02-27T20:14:51Z</updated>
<entry>
<title>Get rid of many apply() calls.</title>
<updated>2003-02-27T20:14:51Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2003-02-27T20:14:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=68468eba635570400f607e140425a222018e56f9'/>
<id>urn:sha1:68468eba635570400f607e140425a222018e56f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Sabotage rexec.py.  It is not safe since the new-style classes.</title>
<updated>2003-01-06T15:43:34Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2003-01-06T15:43:34Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=34a2e0858662fc314fe5d27048654eb74cee3148'/>
<id>urn:sha1:34a2e0858662fc314fe5d27048654eb74cee3148</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Applying patch</title>
<updated>2002-12-16T13:11:57Z</updated>
<author>
<name>Gustavo Niemeyer</name>
<email>gustavo@niemeyer.net</email>
</author>
<published>2002-12-16T13:11:57Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d5ae01a8037d5cba917aef531a3281760e82ed77'/>
<id>urn:sha1:d5ae01a8037d5cba917aef531a3281760e82ed77</id>
<content type='text'>
[#636769] Fix for major rexec bugs

* Lib/rexec.py
  (FileBase): Added 'xreadlines' and '__iter__' to allowed file methods.
  (FileWrapper.__init__): Removed unnecessary self.f variable, which gave
  direct access to the file object.
  (RExec): Added 'xreadlines' and '_weakref' to allowed modules.
  (RExec.r_open): Convert string subclasses to a real string classes
  before doing comparisons with mode parameter.

* Lib/ihooks.py
  (BasicModuleImporter.import_module/reload/unload): Convert the module
  name to a real string before working with it.
  (ModuleImporter.import_module/import_it/reload): Convert the module
  name to a real strings before working with it.

* Misc/NEWS
  Document the change.
</content>
</entry>
<entry>
<title>Allow restricted code to get byteorder, getdefaultencoding(),</title>
<updated>2002-10-11T16:20:45Z</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2002-10-11T16:20:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a0f453b2b14df707532a584c27fcfc158f233d4b'/>
<id>urn:sha1:a0f453b2b14df707532a584c27fcfc158f233d4b</id>
<content type='text'>
getrefcount(), maxunicode, and version_info.
</content>
</entry>
<entry>
<title>Trying alphabet again</title>
<updated>2002-10-11T16:05:07Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2002-10-11T16:05:07Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=83d0fd2fd186ff494b80e02e4cf40d330af81b2e'/>
<id>urn:sha1:83d0fd2fd186ff494b80e02e4cf40d330af81b2e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Sort names alphabetically.</title>
<updated>2002-10-11T15:55:17Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2002-10-11T15:55:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a325c42b2dfa38a9ecd2151d497d3ffc660ad07a'/>
<id>urn:sha1:a325c42b2dfa38a9ecd2151d497d3ffc660ad07a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add hexversion to list of safe sys names (SF bug 621447).</title>
<updated>2002-10-11T15:51:29Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2002-10-11T15:51:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=69dc0c5bf5aff342afb4fa35c44dc726e2cd772f'/>
<id>urn:sha1:69dc0c5bf5aff342afb4fa35c44dc726e2cd772f</id>
<content type='text'>
Bug fix candidate.
</content>
</entry>
<entry>
<title>Address SF bug #577530: del __builtins__ breaks out of rexec</title>
<updated>2002-09-15T06:00:43Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-09-15T06:00:43Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7f7c3d0a9c401d7bc9a9d86ec7181cf09c4b3bab'/>
<id>urn:sha1:7f7c3d0a9c401d7bc9a9d86ec7181cf09c4b3bab</id>
<content type='text'>
Using the suggestion there: add_module() forces __builtin__ back; this
fixes r_exec, r_eval, r_execfile.  The interactive console had to be
fixed separately, because it doesn't use r_exec, but relies on the
'locals' dict having the right __builtins__.  Fixed this by
subclassing InteractiveConsole and overriding runcode(), which does
the exec.  This changes the banner output slightly: instead of
starting with *** RESTRICTED ***, a subtler (RestrictedConsole) is
printed before the first &gt;&gt;&gt; prompt.

Also import readline (if it exists) when the interactive console is
used, for more convenient input editing and history.

This does not mean that rexec is now considered safe!  But for those
willing to take the risk, it's safer than before.  (Note that a safety
analysis of the code module would be wise if you plan to use the
interactive console for real -- I've only ever used it to play with
restricted mode.)

This should be backported to 2.2 and 2.1.
</content>
</entry>
<entry>
<title>Use code.interact(), which is even simpler, *and* imports readline</title>
<updated>2002-06-14T13:54:26Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-06-14T13:54:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=da07ea72826b6b3b9249d664d1c22a10eefe5460'/>
<id>urn:sha1:da07ea72826b6b3b9249d664d1c22a10eefe5460</id>
<content type='text'>
when it can.
</content>
</entry>
<entry>
<title>Don't poorly emulate the interactive interpreter, use</title>
<updated>2002-06-14T13:48:25Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-06-14T13:48:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2aabac8276751c6a1a9758a410b8b837354967b8'/>
<id>urn:sha1:2aabac8276751c6a1a9758a410b8b837354967b8</id>
<content type='text'>
code.InteractiveConsole to do a much better job.
</content>
</entry>
</feed>
