[SQL-CVS] r3284 - in SQLObject/trunk: . sqlobject sqlobject/versioning/test
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2008-03-03 16:25:25
|
Author: phd Date: 2008-03-03 09:25:18 -0700 (Mon, 03 Mar 2008) New Revision: 3284 Modified: SQLObject/trunk/setup.py SQLObject/trunk/sqlobject/dbconnection.py SQLObject/trunk/sqlobject/events.py SQLObject/trunk/sqlobject/main.py SQLObject/trunk/sqlobject/versioning/test/test_version.py Log: Dropped support for Python 2.3. Modified: SQLObject/trunk/setup.py =================================================================== --- SQLObject/trunk/setup.py 2008-03-03 16:24:15 UTC (rev 3283) +++ SQLObject/trunk/setup.py 2008-03-03 16:25:18 UTC (rev 3284) @@ -13,13 +13,6 @@ 'manager', 'maxdb', 'mysql', 'mssql', 'postgres', 'sqlite', 'sybase', 'util', 'versioning'] -import sys -# patch distutils if it can't cope with the "classifiers" keyword -if sys.version < '2.2.3': - from distutils.dist import DistributionMetadata - DistributionMetadata.classifiers = None - DistributionMetadata.download_url = None - kw = {} if is_setuptools: kw['entry_points'] = """ Modified: SQLObject/trunk/sqlobject/dbconnection.py =================================================================== --- SQLObject/trunk/sqlobject/dbconnection.py 2008-03-03 16:24:15 UTC (rev 3283) +++ SQLObject/trunk/sqlobject/dbconnection.py 2008-03-03 16:25:18 UTC (rev 3284) @@ -115,8 +115,7 @@ else: host, rest = rest.split('/', 1) if host and host.find('@') != -1: - user = host[:host.rfind('@')] # Python 2.3 doesn't have .rsplit() - host = host[host.rfind('@')+1:] # !!! + user, host = host.rsplit('@', 1) if user.find(':') != -1: user, password = user.split(':', 1) else: Modified: SQLObject/trunk/sqlobject/events.py =================================================================== --- SQLObject/trunk/sqlobject/events.py 2008-03-03 16:24:15 UTC (rev 3283) +++ SQLObject/trunk/sqlobject/events.py 2008-03-03 16:25:18 UTC (rev 3284) @@ -288,23 +288,6 @@ else: return repr(v) -try: - sorted -except NameError: - # For Python 2.2 and 2.3: - def sorted(lst, cmp=None, key=None, reverse=False): - if key: - lst = [(key(i), i) for i in lst] - lst = lst[:] - if cmp: - lst.sort(cmp) - else: - lst.sort() - if key: - lst = [i for k, i in lst] - if reverse: - lst.reverse() - return lst __all__ = ['listen', 'send'] for name, value in globals().items(): Modified: SQLObject/trunk/sqlobject/main.py =================================================================== --- SQLObject/trunk/sqlobject/main.py 2008-03-03 16:24:15 UTC (rev 3283) +++ SQLObject/trunk/sqlobject/main.py 2008-03-03 16:25:18 UTC (rev 3284) @@ -657,8 +657,8 @@ if warnings_level is not None and warnings_level <= level: warnings.warn(message, DeprecationWarning, stacklevel=stacklevel) -#if sys.version_info[:3] < (2, 4, 0): -# deprecated("Support for Python 2.3 has been declared obsolete and will be removed in the next release of SQLObject") +if sys.version_info[:3] < (2, 5, 0): + deprecated("Support for Python 2.4 has been declared obsolete and will be removed in the next release of SQLObject") def setDeprecationLevel(warning=1, exception=None): """ Modified: SQLObject/trunk/sqlobject/versioning/test/test_version.py =================================================================== --- SQLObject/trunk/sqlobject/versioning/test/test_version.py 2008-03-03 16:24:15 UTC (rev 3283) +++ SQLObject/trunk/sqlobject/versioning/test/test_version.py 2008-03-03 16:25:18 UTC (rev 3284) @@ -1,9 +1,3 @@ -try: - sorted -except NameError: - # For Python 2.3: - from sqlobject.events import sorted - from py.test import raises from sqlobject import * from sqlobject.inheritance import InheritableSQLObject |