IMHO, although I've tested only sqlite, I think in python3 we can use
the same drivers (psycopg2 for python3) and they behave mostly the
same as in python2

About the "new" wsgi spec, I don't see major changes, they are
"cosmetic" regarding str/byte/unicode (in fact, pep-333 wsgi is
version 1.0, pep-3333 for py3k is wsgi 1.0.1)

Indeed, to get rid of unicode, I've done something similar to whet
wsgi pep suggest
http://www.python.org/dev/peps/pep-3333/#a-note-on-string-types

2to3 solved a lot of automatic issues (new syntaxis, moved libraries,
etc.) but some manual work must be done, it would be great to backport
that changes so the same web2py codebase could be used in py2 and py3k
(after using 2to3).
Rocket, cherrypy and bootle already are following that approach (see
"if PY3K:" blocks in rocket or bootle)

Best regards

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com



On Mon, Oct 24, 2011 at 11:48 AM, Massimo Di Pierro
<massimo.dipie...@gmail.com> wrote:
> Most of web2py was written with python 3 in mind. The one thing that
> needs extensive testing is how forms and database drivers cope with
> unicode. I am skeptical 2to3 will get that right because the wsgi
> specs have changed and because python 3 will force us to use different
> drivers.
>
> On Oct 24, 9:09 am, Mariano Reingart <reing...@gmail.com> wrote:
>> Ovidio/Gour:
>>
>> For web2py-py3k, the changes were made against the latest stable
>> release, changeset 2455:80b2c74561c0  tagged as R-1.99.2
>>
>> The repo is at googlecode, reingart-web2py clone, py3k branch:
>>
>> http://code.google.com/r/reingart-web2py/source/list?name=py3k
>>
>> This is the diff:
>>
>> http://code.google.com/r/reingart-web2py/source/detail?r=fab104bec898...
>>
>> Manual changes (not made by 2to3) were very few, I count 46 lines
>> (this is less than 0.5% of web2py source code):
>>
>>  * some unicode vs str/byte adaptations
>>  * hasattr and raising AttributeError from __getitem__
>>  * removed auth.__next__
>>  * relative imports (from . import saraza) and moved modules (email, http, 
>> etc.)
>>  * contrib.simplejson replaced by json
>>  * replaced has_key by key in {}
>>  * sort cmp function changed by key=
>>  * hash: hmac, md5, uuid fixes (needs bytes)
>>
>> web2py apps where modified a little, I count 23 changes to admin,
>> welcome (appadmin), mostly exception handling (as keyword) and
>> deprecated features (sort, reduce, etc.).
>> Most changes could be done automatically by an adapted 2to3 for web2py.
>>
>> I'd posted the full change list, diff and rationale in the
>> web2py-developers mailing list:
>>
>> http://groups.google.com/group/web2py-developers/browse_thread/thread...
>>
>> Best regards,
>>
>> Mariano Reingarthttp://www.sistemasagiles.com.arhttp://reingart.blogspot.com
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Oct 24, 2011 at 9:42 AM, Ovidio Marinho <ovidio...@gmail.com> wrote:
>> > Mariano, what are necessary adjustments for this to happen, or run 2 to 3?.
>> > where you made adjustments? and what were they? i'm curious to know this.
>> > thanks.
>> >        Ovidio Marinho Falcao Neto
>> >                 Web Developer
>> >              ovidio...@gmail.com
>> >                  ITJP - itjp.net.br
>> >                83   8826 9088 - Oi
>> >                83   9334 0266 - Claro
>> >                         Brasil
>>
>> > 2011/10/23 Mariano Reingart <reing...@gmail.com>
>>
>> >> Ovidio:
>>
>> >> I'm working in a python 3 upgrade (web2py-py3k), you can take a look at:
>>
>> >>http://code.google.com/r/reingart-web2py/source/browse/?name=py3k
>>
>> >> Some screenshots:
>>
>> >> web2py-py3k: welcome app running python 3!http://pic.twitter.com/BR5PqAJ8
>>
>> >> web2py-py3k: after 2to3 and 1 hour of minor fixes, web2py runs in
>> >> python 3.2!http://pic.twitter.com/7Ff85G1r
>>
>> >> My idea is to run most web2py applications unchanged in py3k (not even
>> >> needing to use 2to3 manually).
>>
>> >> The proof-of-concept code is working (dal, forms, registration, etc.)
>> >> but has some minor issues right now.
>> >> I didn't have time to work on it but I expect for December to have a
>> >> full version of web2py seamless working on py3k.
>>
>> >> Best regards
>>
>> >> Mariano Reingart
>> >>http://www.sistemasagiles.com.ar
>> >>http://reingart.blogspot.com
>>
>> >> On Sun, Oct 23, 2011 at 6:02 PM, Ovidio Marinho <ovidio...@gmail.com>
>> >> wrote:
>>
>> >> >       Massimo , this means that one version may be next Web3py ?
>> >> >        Ovidio Marinho Falcao Neto
>> >> >                 Web Developer
>> >> >              ovidio...@gmail.com
>> >> >                  ITJP - itjp.net.br
>> >> >                83   8826 9088 - Oi
>> >> >                83   9334 0266 - Claro
>> >> >                         Brasil
>>
>> >> > 2011/10/23 Massimo Di Pierro <massimo.dipie...@gmail.com>
>>
>> >> >> We do not have a web2py roadmap but you can assume the basic logic
>> >> >> will stay the same. Dal and templates will stay the same.
>> >> >> helpers will stay the same. Forms and form handling we do not know.
>> >> >> Bottom line: very relevant.
>>
>> >> >> On Oct 23, 1:50 am, Gour <g...@atmarama.net> wrote:
>> >> >> > There is some talk that web3py will probably become 'new' product and
>> >> >> > not just python-3 upgrade.
>>
>> >> >> > Otoh, I'm considering to buy paperback versions of Web2py's 4th ed as
>> >> >> > well as
>> >> >> > the upcoming Packt book, but wonder how much would the skills
>> >> >> > acquired
>> >> >> > by
>> >> >> > learning web2py be relevant for web3py, iow, what is the estimated
>> >> >> > lifetime for
>> >> >> > web2py before some important work on web3py is underwent?
>>
>> >> >> > Sincerely,
>> >> >> > Gour
>>
>> >> >> > --
>> >> >> > In the material world, one who is unaffected by whatever good
>> >> >> > or evil he may obtain, neither praising it nor despising it,
>> >> >> > is firmly fixed in perfect knowledge.
>>
>> >> >> >http://atmarama.net|Hlapicina (Croatia) | GPG: 52B5C810
>>
>> >> >> >  signature.asc
>> >> >> > < 1KViewDownload

Reply via email to