[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: python2.6 update



On 08/03/2014 01:09 PM, Jakub Wilk wrote:
> In the old version of python2.6 the urandom() function was implemented
> directly in os.py. But in the new version, os.py imports it from the
> posix module.
> 
> So this exception could happen when "os" and "posix" modules are out of
> sync: "os" already wants posix's urandom, but "posix" doesn't have it yet.
> 
> So, how could the get out of sync? I'm not sure.
> 
> Google says most often the culprit is using virtualenv.
> I could also reproduce it with the following sequence:
> 
> 1) run "python 2.6 -S" (loads "posix", wich is a built-in module, but
> not "os")
> 2) upgrade python2.6
> 3) import random

This also happens when you ship an own libpython.so, but use the systems
os.py, like I've seen in OMD some years ago.


Reply to: