This project is archived and is in readonly mode.
psycopg2/extensions.py changes the dictionary it iterates through
-
Daniele Varrazzo
- State changed from new to invalid
You are somehow using psycopg on python 3 that has not been passed through 2to3.
2to3 correctly converts the line to an idiom non replacing inplace, specifically I get on Python 3.2:
@@ -154,10 +154,10 @@ # When the encoding is set its name is cleaned up from - and _ and turned # uppercase, so an encoding not respecting these rules wouldn't be found in the # encodings keys and would raise an exception with the unicode typecaster -for k, v in encodings.items(): +for k, v in list(encodings.items()): k = k.replace('_', '').replace('-', '').upper() encodings[k] = v del k, vplease see the Makefile to know how to convert psycopg from Python 2 to 3. Also note that Jason's package at http://www.stickpeople.com/projects/python/win-psycopg/ doesn't have this problem.