You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BTW, Cookie.Cookie is a deprecated interface so there is a possibility that only small portion of the real world code which has not updated their Python stdlib idioms since (Python 2.2/Python2.4?) would see this bug manifested.
[Note: Long-time users of Cookie.py will remember using
Cookie.Cookie() to create an Cookie object. Although deprecated, it
is still supported by the code. See the Backward Compatibility notes
for more information.]
Activity
orsenthil commentedon Apr 2, 2009
In 2.7 code have:
import Cookie
c = Cookie.Cookie('abc')
2to3 would do:
c = http.cookies.Cookie('abc')
This is wrong as there is no class as Cookie in http.cookies. It should
translated to be http.cookies.SimpleCookie.
benjaminp commentedon Apr 2, 2009
2009/4/1 Senthil <report@bugs.python.org>:
That's unfortunate. I suppose a new custom fixer will have to be
written for Cookie now.
meadori commentedon Jan 31, 2010
There is already a fixer for this in 'Lib/lib2to3/fixes/fix_imports.py'. It was merged to the trunk in r64286.
BreamoreBoy commentedon May 26, 2013
I'm assuming msg98615 is correct so this can be closed.
orsenthil commentedon May 28, 2013
Not actually, It is still translating to http.cookies.Cookie - which does not exist.
BTW, Cookie.Cookie is a deprecated interface so there is a possibility that only small portion of the real world code which has not updated their Python stdlib idioms since (Python 2.2/Python2.4?) would see this bug manifested.
[Note: Long-time users of Cookie.py will remember using
Cookie.Cookie() to create an Cookie object. Although deprecated, it
is still supported by the code. See the Backward Compatibility notes
for more information.]