Message 190175 - Python tracker

Message190175

Author orsenthil
Recipients BreamoreBoy, benjamin.peterson, meador.inge, orsenthil
Date 2013-05-28.05:39:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369719594.88.0.332236620798.issue5664@psf.upfronthosting.co.za>
In-reply-to
Content
Not actually, It is still translating to http.cookies.Cookie - which does not exist.

$ ./cpythonvenv/bin/2to3-3.4 bug-fixes/test1.py
RefactoringTool: Refactored bug-fixes/test1.py
--- bug-fixes/test1.py  (original)
+++ bug-fixes/test1.py  (refactored)
@@ -1,2 +1,2 @@
-import Cookie
-c = Cookie.Cookie('abc')
+import http.cookies
+c = http.cookies.Cookie('abc')

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.]
History
Date User Action Args
2013-05-28 05:39:55orsenthilsetrecipients: + orsenthil, benjamin.peterson, meador.inge, BreamoreBoy
2013-05-28 05:39:54orsenthilsetmessageid: <1369719594.88.0.332236620798.issue5664@psf.upfronthosting.co.za>
2013-05-28 05:39:54orsenthillinkissue5664 messages
2013-05-28 05:39:54orsenthilcreate