[pypy-issue] [issue842] reload(sys) should not reset sys.path

Amaury Forgeot d Arc tracker at bugs.pypy.org
Mon Aug 22 23:03:26 CEST 2011


New submission from Amaury Forgeot d Arc <amauryfa at gmail.com>:

The following script fails with pypy.  In CPython, builtin modules save their 
dict, (sys does it 
*before* sys.path has been created) and this saved dict is used to update the 
current module.

import sys
sys.path = ['foo'] + sys.path
reload(sys)
assert sys.path[0] == 'foo'

----------
messages: 3004
nosy: afa, pypy-issue
priority: bug
status: unread
title: reload(sys) should not reset sys.path

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue842>
________________________________________


More information about the pypy-issue mailing list