[Python-Dev] Virtualenv not portable from Python 2.7.2 to 2.7.3 (os.urandom missing)

Carl Meyer carl at oddbird.net
Thu Mar 29 20:26:27 CEST 2012


On 03/29/2012 11:39 AM, David Malcolm wrote:
>> jaraco at vdm-dev:~$ env/bin/python -c "import os; os.urandom()"
>> Traceback (most recent call last):
>>   File "<string>", line 1, in <module>
>> AttributeError: 'module' object has no attribute 'urandom'
> 
> It looks like this a symptom of the move of urandom to os.py to
> posximodule et al.
> 
> At first glance, it looks like this specific hunk should be reverted:
> http://hg.python.org/cpython/rev/a0f43f4481e0#l7.1
> so that if you're running with the new stdlib but an old python binary
> the combination can still have a usable os.urandom

Indeed, I've just tested and verified that this does fix the problem.

> Should this be tracked in bugs.python.org?

I've added this option as a comment on bug 14444. The title of that bug
is worded such that it could be reasonably resolved either with the
backwards-compatibility fix or the release notes addition, the release
managers can decide what seems appropriate to them.

Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120329/60a220e8/attachment.pgp>


More information about the Python-Dev mailing list