Skip to content

Fixing regressing introduced by fix for issue 148 #172

Merged
merged 1 commit into from Aug 6, 2012

3 participants

@dimo414
dimo414 commented Aug 6, 2012

Tried building web.py against Python 2.3 and ran into the following:

$ python23 setup.py build
Traceback (most recent call last):
  File "setup.py", line 6, in ?
    from web import __version__
  File "~/webpy23/web/__init__.py", line 14, in ?
    import utils, db, net, wsgi, http, webapi, httpserver, debugerror
  File "~/webpy23/web/wsgi.py", line 8, in ?
    import http
  File "~/webpy23/web/http.py", line 16, in ?
    import net, utils, webapi as web
  File "~/webpy23/web/webapi.py", line 425
    cookies = dict((k, urllib.unquote(v.value)) for k, v in cookie.iteritems())
                                                  ^
SyntaxError: invalid syntax

Which I found was introduced by c905312

Patch fixes syntax error, and enables the Hello World example on http://webpy.org to run, however almost 1 in 6 unit tests are currently failing:

$ python23 test/alltests.py > /dev/null
Unable to import sqlite3 (ignoring SqliteTest)
Unable to import pysqlite2.dbapi2 (ignoring SqliteTest_pysqlite2)
Unable to import psycopg2 (ignoring PostgresTest)
Unable to import psycopg (ignoring PostgresTest_psycopg)
No module named MySQLdb (ignoring MySQLTest)
Unable to import pgdb (ignoring PostgresTest_pgdb)
No module named DBUtils(ignoring testPooling)
..................................EE.E..EE.E...............................EEE..E........EEEE..............E.........................FE..EEEEEEEE
## Stack Traces Ommitted
----------------------------------------------------------------------
Ran 145 tests in 6.064s

FAILED (failures=1, errors=24)

This many failures suggests to me that web.py would not work very well on Python 2.3, which makes me wonder how important 2.3 compatibility really should be to the project - doesn't seem like people are missing it very much.

@aaronsw
aaronsw commented Aug 6, 2012

I'll save this for @anandology to decide.

@anandology

We officially support python 2.3. So we should fix this.

I'm in favor of dropping support for Python 2.3 when move to 0.4.

@anandology anandology merged commit 35dc18c into webpy:master Aug 6, 2012
@dimo414
dimo414 commented Aug 7, 2012

Out of curiosity, what's the timeline on 0.4? Should I file issue(s) for the failing tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.