Re: Resolving the python 2 -> python 3 mess
От
Corey Huinker
Тема
Re: Resolving the python 2 -> python 3 mess
Дата
Msg-id
CADkLM=e94yBB-mET+RjZ9+r=SxFweMxHO-xMWanfsgKcTJnL_Q@mail.gmail.com
Ответ на
Resolving the python 2 -> python 3 mess (Tom Lane)
Список
Дерево обсуждения
Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Marco Atzeri <marco.atzeri@gmail.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Corey Huinker <corey.huinker@gmail.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Corey Huinker <corey.huinker@gmail.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Noah Misch <noah@leadboat.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
Re: Resolving the python 2 -> python 3 mess Jesse Zhang <sbjesse@gmail.com>
Re: Resolving the python 2 -> python 3 mess Tom Lane <tgl@sss.pgh.pa.us>
A possible gotcha in this approach is if there are any python 2/3
incompatibilities that would not manifest as syntax errors or
obvious runtime errors, but would allow old code to execute and
silently do the wrong thing. One would hope that the Python crowd
weren't dumb enough to do that, but I don't know whether it's true.
If there are nasty cases like that, maybe what we have to do is allow
plpythonu/plpython2u functions to be dumped and reloaded into a
python-3-only install, but refuse to execute them until they've
been converted.
Unfortunately, I think there are cases like that. The shift to Unicode as the default string means that some functions that used to return a `str` now return a `bytes` (I know of this in the hashlib and base64 modules, but probably also in URL request data and others), and to use a `bytes` in string manipulation you have to first explicitly convert it to some string encoding. So things like a function that wraps around a python crypto library would be the exact places where those was-str-now-bytes functions would be used.
В списке pgsql-hackers по дате отправления