Crypto/SelfTest/Cipher/common.py misuses __builtins__
Bug #785150 reported by
Jean-Paul Calderone
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
`__builtins__` is an implementation detail of CPython. It takes on inconsistent values at various times. The use in `common.py` happens to work on recent version of CPython, but it doesn't work on PyPy. The only thing you should ever do, when you're doing this sort of thing, is "import __builtin__; __builtin__.foo".
However, line 40 of common.py (in release 2.3):
dict = __builtins_
would be better written simply as:
dict = dict
To post a comment you must log in.
The same thing is done in Crypto/ SelfTest/ Hash/common. py