[issue5664] 2to3 wont convert Cookie.Cookie properly

Benjamin Peterson report at bugs.python.org
Thu Apr 2 22:31:31 CEST 2009


Benjamin Peterson <benjamin at python.org> added the comment:

2009/4/1 Senthil <report at bugs.python.org>:
>
> New submission from Senthil <orsenthil at gmail.com>:
>
> 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.

That's unfortunate. I suppose a new custom fixer will have to be
written for Cookie now.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5664>
_______________________________________


More information about the Python-bugs-list mailing list