Author: cito
Date: Fri Nov 27 17:40:27 2015
New Revision: 653

Log:
Specify supported Python versions for the 4.x branch

Tests for Python 2.4, 2.5, 2.6., 2.7 are running now, so we can specify these
versions as supported in this branch. The trunk will only support Python >= 2.6.
The test are not compatible with Python 2.3, but the basic functionality still
works in Python 2.3, so old code to support Python < 2.4 has been left in place.

A config file for testing with tox has been added. Unfortunately, tox supports
only Python 2.6 and 2.7. So Python 2.4 and 2.5 need to be tested manually.

Added:
   branches/4.x/module/tox.ini
Modified:
   branches/4.x/docs/announce.txt
   branches/4.x/docs/changelog.txt
   branches/4.x/docs/install.txt
   branches/4.x/module/pg.py
   branches/4.x/module/pgdb.py
   branches/4.x/module/setup.py
   branches/4.x/module/tests/test_classic_functions.py

Modified: branches/4.x/docs/announce.txt
==============================================================================
--- branches/4.x/docs/announce.txt      Fri Nov 27 17:30:33 2015        (r652)
+++ branches/4.x/docs/announce.txt      Fri Nov 27 17:40:27 2015        (r653)
@@ -22,10 +22,11 @@
 This version has been built and unit tested on:
  - NetBSD
  - FreeBSD
- - openSUSE 12.2
+ - openSUSE
+ - Ubuntu
  - Windows 7 with both MinGW and Visual Studio
- - PostgreSQL 8.4, 9.0 and 9.2 32 and 64bit
- - Python 2.5, 2.6 and 2.7 32 and 64bit
+ - PostgreSQL 8.4 and 9.3 64bit
+ - Python 2.4, 2.5, 2.6 and 2.7 32 and 64bit
 
 | D'Arcy J.M. Cain
 | [email protected]

Modified: branches/4.x/docs/changelog.txt
==============================================================================
--- branches/4.x/docs/changelog.txt     Fri Nov 27 17:30:33 2015        (r652)
+++ branches/4.x/docs/changelog.txt     Fri Nov 27 17:40:27 2015        (r653)
@@ -4,11 +4,13 @@
 Version 4.2
 -----------
 - Set a better default for the user option "escaping-funcs".
-- Greatly improve unit testing.
 - Force build to compile with no errors.
 - Fix decimal point handling.
 - Add option to return boolean values as bool objects.
+- Add option to return money values as string.
 - Fix notification handler (Thanks Patrick TJ McPhee).
+- Fix a small issue with large objects.
+- Greatly improve unit testing, tests run with Python 2.4 to 2.7 again.
 
 Version 4.1.1 (2013-01-08)
 --------------------------

Modified: branches/4.x/docs/install.txt
==============================================================================
--- branches/4.x/docs/install.txt       Fri Nov 27 17:30:33 2015        (r652)
+++ branches/4.x/docs/install.txt       Fri Nov 27 17:40:27 2015        (r653)
@@ -11,8 +11,8 @@
 ``PATH`` environment variable.
 
 The current version of PyGreSQL has been tested with Python 2.7 and
-PostGreSQL 9.2. Older version should work as well, but you will need
-at least Python 2.5 and PostgreSQL 8.3.
+PostGreSQL 9.3. Older version should work as well, but you will need
+at least Python 2.4 and PostgreSQL 8.3.
 
 PyGreSQL will be installed as three modules, a dynamic module called
 _pg.pyd, and two pure Python wrapper modules called pg.py and pgdb.py.

Modified: branches/4.x/module/pg.py
==============================================================================
--- branches/4.x/module/pg.py   Fri Nov 27 17:30:33 2015        (r652)
+++ branches/4.x/module/pg.py   Fri Nov 27 17:40:27 2015        (r653)
@@ -34,12 +34,12 @@
 import warnings
 try:
     frozenset
-except NameError:  # Python < 2.4
+except NameError:  # Python < 2.4, unsupported
     from sets import ImmutableSet as frozenset
 try:
     from decimal import Decimal
     set_decimal(Decimal)
-except ImportError:  # Python < 2.4
+except ImportError:  # Python < 2.4, unsupported
     Decimal = float
 try:
     from collections import namedtuple

Modified: branches/4.x/module/pgdb.py
==============================================================================
--- branches/4.x/module/pgdb.py Fri Nov 27 17:30:33 2015        (r652)
+++ branches/4.x/module/pgdb.py Fri Nov 27 17:40:27 2015        (r653)
@@ -66,14 +66,14 @@
 from _pg import *
 try:
     frozenset
-except NameError:  # Python < 2.4
+except NameError:  # Python < 2.4, unsupported
     from sets import ImmutableSet as frozenset
 from datetime import date, time, datetime, timedelta
 from time import localtime
-try:  # use Decimal if available
+try:
     from decimal import Decimal
     set_decimal(Decimal)
-except ImportError:  # otherwise (Python < 2.4)
+except ImportError:  # Python < 2.4, unsupported
     Decimal = float  # use float instead of Decimal
 try:
     from math import isnan, isinf

Modified: branches/4.x/module/setup.py
==============================================================================
--- branches/4.x/module/setup.py        Fri Nov 27 17:30:33 2015        (r652)
+++ branches/4.x/module/setup.py        Fri Nov 27 17:40:27 2015        (r653)
@@ -21,7 +21,7 @@
 * PostgreSQL pg_config tool (usually included in the devel package)
   (the Windows installer has it as part of the database server feature)
 
-The supported versions are Python 2.5-2.7 and PostgreSQL 8.3-9.4.
+The supported versions are Python 2.4-2.7 and PostgreSQL 8.3-9.4.
 
 Use as follows:
 python setup.py build   # to build the module
@@ -40,7 +40,7 @@
 
 import sys
 
-if not (2, 3) <= sys.version_info[:2] < (3, 0):
+if not (2, 4) <= sys.version_info[:2] <= (2, 7):
     raise Exception("Sorry, PyGreSQL %s"
         " does not support this Python version" % version)
 
@@ -185,7 +185,12 @@
         "License :: OSI Approved :: Python Software Foundation License",
         "Operating System :: OS Independent",
         "Programming Language :: C",
-        "Programming Language :: Python",
+        'Programming Language :: Python',
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.4',
+        'Programming Language :: Python :: 2.5',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
         "Programming Language :: SQL",
         "Topic :: Database",
         "Topic :: Database :: Front-Ends",

Modified: branches/4.x/module/tests/test_classic_functions.py
==============================================================================
--- branches/4.x/module/tests/test_classic_functions.py Fri Nov 27 17:30:33 
2015        (r652)
+++ branches/4.x/module/tests/test_classic_functions.py Fri Nov 27 17:40:27 
2015        (r653)
@@ -22,6 +22,10 @@
 import pg  # the module under test
 
 try:
+    from decimal import Decimal
+except ImportError:  # Python < 2.4, unsupported
+    Decimal = None
+try:
     from collections import namedtuple
 except ImportError:  # Python < 2.6
     namedtuple = None
@@ -312,7 +316,7 @@
 
     def testGetDecimal(self):
         r = pg.get_decimal()
-        self.assertIs(r, pg.Decimal)
+        self.assertIs(r, Decimal)
 
     def testSetDecimal(self):
         decimal_class = pg.Decimal

Added: branches/4.x/module/tox.ini
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ branches/4.x/module/tox.ini Fri Nov 27 17:40:27 2015        (r653)
@@ -0,0 +1,12 @@
+# config file for tox 2.0
+# unfortunately py24,py25 are not supported by tox any more
+
+[tox]
+envlist = py26,py27
+
+[testenv]
+deps =
+    py26: unittest2
+commands =
+    py26: unit2 discover []
+    py27: python -m unittest discover []
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to