web frameworks that support Python 3

Discussion in 'Python' started by David Prager Branner, Aug 23, 2009.

  1. I use Chinese and therefore Unicode very heavily, and so Python 3 is
    an unavoidable choice for me. But I'm frustrated by the fact that
    Django, Pylons, and TurboGears do not support Python 3 yet and
    (according to their development websites) will not for a very long
    time to come.

    So I am asking for recommendations for web frameworks that support
    Python 3. I am running Ubuntu 9.04 (Jaunty).

    Thanks!
     
    David Prager Branner, Aug 23, 2009
    #1
    1. Advertising

  2. On Sun, 2009-08-23 at 13:13 -0700, David Prager Branner wrote:
    > I use Chinese and therefore Unicode very heavily, and so Python 3 is
    > an unavoidable choice for me. But I'm frustrated by the fact that
    > Django, Pylons, and TurboGears do not support Python 3 yet and
    > (according to their development websites) will not for a very long
    > time to come.
    >
    > So I am asking for recommendations for web frameworks that support
    > Python 3. I am running Ubuntu 9.04 (Jaunty).


    Python 2.x has Unicode. In fact Django and the like use unicode
    heavily.

    What's different about Python 3 is that there is only unicode strings,
    whereas Python 2 has a string type and a unicode type.

    So it's not true that Python 3 is an unavoidable choice for using
    unicode.
     
    Albert Hopkins, Aug 23, 2009
    #2
    1. Advertising

  3. At Sunday 23 August 2009 22:13:16 you wrote:
    > I use Chinese and therefore Unicode very heavily, and so Python 3 is
    > an unavoidable choice for me.

    Python 2.x supports Unicode just as well as Python 3. Every common web
    framework works perfectly with unicode.

    In any case, there is bottle [1], which provides a *very minimal* framework
    for WSGI web development. Don't expect too much, it is really small, and
    doesn't do much more than routing and minimal templating.

    However, it is the only Python-3-compatible web framework I know of.

    [1] http://bottle.paws.de/page/start

    --
    Freedom is always the freedom of dissenters.
    (Rosa Luxemburg)

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.12 (GNU/Linux)

    iEYEABECAAYFAkqRp/EACgkQGV4vxEMMOxeGJACeM6Gb37XUOuHeES63orhSzHmr
    7ScAn0+LkKDGifoCrQOPX4B2RIMpq6Vd
    =vsNE
    -----END PGP SIGNATURE-----
     
    Sebastian Wiesner, Aug 23, 2009
    #3
  4. David Prager Branner wrote:
    > I use Chinese and therefore Unicode very heavily, and so Python 3 is
    > an unavoidable choice for me.


    As others noted before, this statement is not true by itself.


    > But I'm frustrated by the fact that
    > Django, Pylons, and TurboGears do not support Python 3 yet and
    > (according to their development websites) will not for a very long
    > time to come.


    http://wiki.python.org/moin/PortingDjangoTo3k

    Stefan
     
    Stefan Behnel, Aug 23, 2009
    #4
  5. On Aug 24, 6:34 am, Sebastian Wiesner <> wrote:
    > At Sunday 23 August 2009 22:13:16 you wrote:> I use Chinese and therefore Unicode very heavily, and so Python 3 is
    > > an unavoidable choice for me.

    >
    > Python 2.x supports Unicode just as well as Python 3.  Every common web
    > framework works perfectly with unicode.
    >
    > In any case, there is bottle [1], which provides a *very minimal* framework
    > for WSGI web development.  Don't expect too much, it is really small, and
    > doesn't do much more than routing and minimal templating.
    >
    > However, it is the only Python-3-compatible web framework I know of.
    >
    > [1]http://bottle.paws.de/page/start


    There is one big flaw with your claim. That is the there is no WSGI
    specification for Python 3.0 as yet. Anything that claims to work with
    WSGI and Python 3.0 is just a big guess as far as how WSGI for Python
    3.0 may work.

    I would therefore be a bit cautious with your claim.

    Graham
     
    Graham Dumpleton, Aug 24, 2009
    #5
  6. David Prager Branner

    Nobody Guest

    On Sun, 23 Aug 2009 16:32:09 -0400, Albert Hopkins wrote:

    > What's different about Python 3 is that there is only unicode strings,
    > whereas Python 2 has a string type and a unicode type.


    Python 2 has "str" (char) and "unicode" (wchar) types.

    Python 3 has "bytes" (char) and "str" (wchar) types.

    The main difference is that Python 3 uses unicode "by default", i.e.
    string literals are unicode rather than byte strings, variables
    such as sys.argv and os.environ contain unicode strings, etc.

    There are other differences, e.g.:

    + Passing a "bytes" object where "str" is expected will raise an exception
    rather than using an automatic conversion
    + Subscripting a "bytes" object returns an integer between 0 and 255
    + upper(), isalpha(), etc assume ASCII rather than the system encoding
     
    Nobody, Aug 25, 2009
    #6
  7. David Prager Branner

    Aahz Guest

    In article <>,
    Graham Dumpleton <> wrote:
    >On Aug 24, 6:34=A0am, Sebastian Wiesner <> wrote:
    >>
    >> In any case, there is bottle [1], which provides a *very minimal* framewo=

    >rk
    >> for WSGI web development. =A0Don't expect too much, it is really small, a=

    >nd
    >> doesn't do much more than routing and minimal templating.
    >>
    >> However, it is the only Python-3-compatible web framework I know of.
    >>
    >> [1]http://bottle.paws.de/page/start

    >
    >There is one big flaw with your claim. That is the there is no WSGI
    >specification for Python 3.0 as yet. Anything that claims to work with
    >WSGI and Python 3.0 is just a big guess as far as how WSGI for Python
    >3.0 may work.


    Perhaps you meant "library" instead of "specification"? I don't
    understand how a language can be missing a specification.
    --
    Aahz () <*> http://www.pythoncraft.com/

    "I support family values -- Addams family values" --www.nancybuttons.com
     
    Aahz, Aug 26, 2009
    #7
  8. David Prager Branner

    Guest

    On 01:41 am, wrote:
    >In article
    ><>,
    >Graham Dumpleton <> wrote:
    >>On Aug 24, 6:34=A0am, Sebastian Wiesner <> wrote:
    >>>
    >>>In any case, there is bottle [1], which provides a *very minimal*
    >>>framewo=

    >>rk
    >>>for WSGI web development. =A0Don't expect too much, it is really
    >>>small, a=

    >>nd
    >>>doesn't do much more than routing and minimal templating.
    >>>
    >>>However, it is the only Python-3-compatible web framework I know of.
    >>>
    >>>[1]http://bottle.paws.de/page/start

    >>
    >>There is one big flaw with your claim. That is the there is no WSGI
    >>specification for Python 3.0 as yet. Anything that claims to work with
    >>WSGI and Python 3.0 is just a big guess as far as how WSGI for Python
    >>3.0 may work.

    >
    >Perhaps you meant "library" instead of "specification"?


    He meant specification.

    Python 3.x is different enough from any Python 2.x release that PEP 333
    no longer completely makes sense. It needs to be modified to be
    applicable to Python 3.x.

    So, in the sense that there is no written down, generally agreed upon
    specification for what WSGI on Python 3.x means, there is no...
    specification.

    There is, however, apparently, a library. ;)

    Jean-Paul
     
    , Aug 26, 2009
    #8
  9. On Aug 26, 12:19 pm, wrote:
    > On 01:41 am, wrote:
    >
    >
    >
    >
    >
    > >In article
    > ><>,
    > >Graham Dumpleton  <> wrote:
    > >>On Aug 24, 6:34=A0am, Sebastian Wiesner <> wrote:

    >
    > >>>In any case, there is bottle [1], which provides a *very minimal*
    > >>>framewo=
    > >>rk
    > >>>for WSGI web development. =A0Don't expect too much, it is really
    > >>>small, a=
    > >>nd
    > >>>doesn't do much more than routing and minimal templating.

    >
    > >>>However, it is the only Python-3-compatible web framework I know of.

    >
    > >>>[1]http://bottle.paws.de/page/start

    >
    > >>There is one big flaw with your claim. That is the there is no WSGI
    > >>specification for Python 3.0 as yet. Anything that claims to work with
    > >>WSGI and Python 3.0 is just a big guess as far as how WSGI for Python
    > >>3.0 may work.

    >
    > >Perhaps you meant "library" instead of "specification"?

    >
    > He meant specification.
    >
    > Python 3.x is different enough from any Python 2.x release that PEP 333
    > no longer completely makes sense.  It needs to be modified to be
    > applicable to Python 3.x.
    >
    > So, in the sense that there is no written down, generally agreed upon
    > specification for what WSGI on Python 3.x means, there is no...
    > specification.
    >
    > There is, however, apparently, a library. ;)


    If you are talking about wsgiref then that was somewhat broken in
    Python 3.0. In Python 3.1 it works for some definition of works. The
    problem again being that since WSGI specification hasn't been updated
    for Python 3.X, that how it works will likely not match what the
    specification may eventually say. This will become more and more of a
    problem if WSGI specification isn't updated. At the moment the
    discussion is going around in circles, although, if I put my
    optimistic face on, I would say it is a slow inward spiral. Not quite
    a death spiral at least.

    Graham
     
    Graham Dumpleton, Aug 26, 2009
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kanchy kang
    Replies:
    2
    Views:
    399
    Magnus Lycka
    Feb 24, 2006
  2. kanchy kang
    Replies:
    1
    Views:
    369
    Scott David Daniels
    Feb 24, 2006
  3. GinTon
    Replies:
    1
    Views:
    236
    GinTon
    Oct 20, 2006
  4. Shortash

    Python Web Frameworks

    Shortash, Jan 17, 2007, in forum: Python
    Replies:
    4
    Views:
    303
    Ximo Nadal
    Jan 18, 2007
  5. Roedy Green
    Replies:
    0
    Views:
    496
    Roedy Green
    Sep 24, 2009
Loading...

Share This Page