From: Billy G. A. <bal...@us...> - 2001-11-04 05:04:00
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv30682 Modified Files: Announce ChangeLog MANIFEST Log Message: 03NOV2001 bga In preperation for release 1.7. Index: Announce =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/Announce,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Announce 2001/10/01 01:42:41 1.13 --- Announce 2001/11/04 05:03:57 1.14 *************** *** 2,13 **** =========================================================================== ! pyPgSQL v1.6 has been released. It is primarily a bug fix release to ver- ! sion 1.5.1, but also include some enhancements. ! NOTE: This release drops support for PostgreSQL 6.5.x and Python 1.5.x. ! If you are still using those versions, you are badly in need of an ! upgrade. ! It is available at http://sourceforge.net/projects/pypgsql. pyPgSQL is a package of two (2) modules that provide a Python DB-API 2.0 --- 2,15 ---- =========================================================================== ! pyPgSQL v1.7 has been released. It is a bug fix release to version 1.6, ! but also include some enhancements. With this release, pyPgSQL is now a ! "real" package. This was done to facilitate the implementation of pickling ! of the supplied PostgreSQL support objects, PgBoolean, PgInt2, PgInt8, and ! PgLargeObject. ! NOTE: This change will require the used of "from pyPgSQL import PgSQL" and ! "from pyPgSQL import libpq" to import the PgSQL and libpq modules. ! It is available at http://pypgsql.sourceforge.net. pyPgSQL is a package of two (2) modules that provide a Python DB-API 2.0 *************** *** 44,226 **** =========================================================================== ! Changes since pyPgSQL Version 1.5.1 ! =================================== ! The following regression test cases have been added. Each regression test ! is designed to rigorously test a specific part of pyPgSQL: ! pgresult.py - Test cases for the libpq.PgResult object. ! pgversion.py - Test cases for the libpq.PgVersion object. ! pgconnection.py - Test cases for the libpq.PgConnection object. Changes to PgSQL.py ------------------- - * Added support for the PostgreSQL BYTEA type. This will allow binary - values to be stored in the database without the use of Large Objects. - - * [Bug #455514, #464213] Changed how strings are escaped/quoted for use as - parameter in queries. Modified code so that array elements are quoted - differently from regular attributes. The repr function is no longer used. ! * Changed code so that libpq notices are only converted to Warning exceptions ! in certain specific cases. This will prevent Warning exceptions from ! occuring when tables with serial fields are created, etc. When Python 2.2 ! is released, it's Warning framework will be used for libpq notices. ! ! * Cleaned up the logic in hadleArray(). ! * Updated the PgSQL.__doc__ string. ! * [Feature Request #462588] Cursor.close() no longer ends (rollback) the ! open transaction when the last cursor is closed. ! * On Connection.close(), reset all the attributes to a sane state (i.e. ! None or 0, as appropriate). ! * [Bug #462589] In a fit of optimization, I had introduced a bug that ! caused comparisons of PgResultSets to anything to fail. This bug has ! been squashed. ! * Fixed several cases of references to non-existing globals in PgMoney. ! * Previously, I was not building up the description attribute if no rows ! were returned. The description attribute is now built on the first ! successful select or cursor fetch. Changes to libpqmodule.c ------------------------ ! * [Bug #455514, #464213] Added a new function to escape/quote strings. This ! function will escape/quote values used as array elements differently from ! regular fields. ! * Added a new functions to escape/un-escape strings used as input/output ! to/from bytea fields. These function will escape/quote values used as ! array elements differently from regular fields. ! * Removed code related to PostgreSQL 6.5.x. We now only support ! PostgreSQL 7.0 and later. ! * Changed 'long long' to 'LONG_LONG'. That way there is no assumption of ! how a 64bit integer is declared. Changes to pgboolean.c ---------------------- ! * Fix bug in PgBoolean_FromString; also improve and simplify the string ! stripping in this method. Changes to pgconnection.c ------------------------- ! * Removed the pgFixEsc() function. It is no longer needed since repr() is ! not used to escape/quote strings. ! * Changed code so that a PgConnection object's members are set to None if ! the finish() method is called. ! * Corrected bugs found while developing a set of regression tests for ! pgconnection.c. ! * Re-ordered the items in PgConnection_members so that the attributes ! handled directly by PgConnection_getattr are grouped together and ! commented appropriately. ! * Removed code related to PostgreSQL 6.5.x. We now only support ! PostgreSQL 7.0 and later. ! * Use PyObject_Del() instead of PyMem_Free() in dealloc() to delete the ! object. Changes to pgint2object.c ------------------------- ! * Use PyObject_Del() instead of PyMem_Free() in dealloc() to delete the ! object. Changes to pgint8object.c ------------------------- ! * Modified code for 64bit (long long) support in the MS Windows ! environment with MS Visual C++. ! ! * Made changes to avoid use of long long constants. This was done to ! assist in the use of MS Visual C++, which uses something other than LL ! to specify long long constants. (It's ugly, I know. Thanks MS.) ! * Use PyObject_Del() instead of PyMem_Free() in dealloc() to delete the ! object. Changes to pglargeobject.c -------------------------- ! * Removed an un-used variable. ! * Use PyObject_Del() instead of PyMem_Free() in dealloc() to delete the ! object. ! Changes to pgnotify.c ! --------------------- ! * Clarified an embedded assignment within an if test. ! * Use PyObject_Del() instead of PyMem_Free() in dealloc() to delete the ! object. Changes to pgresult.c --------------------- ! * Removed code related to PostgreSQL 6.5.x. We now only support ! PostgreSQL 7.0 and later. ! ! * Fixed a gcc reported int format <-> long int argument mis-match. ! ! * Added check to make sure that the result was from a DQL (Data Query ! Language) statement in methods that only make sense for DQL statement ! results (fname(), etc.). ! ! * Methods that take field and/or tuple indices will now raise an ! exception if those indices are out of range. The previous behavior ! was to return the error code from the underlying PostgreSQL C-API ! function. ! ! * The fnumber() method will now raise an exception if it is passed a ! string that is not a valid column name. The previous behavior was to ! return the error code from the PostgreSQL C-API PQfnumber function. ! ! * Correct some incorrect comments. ! ! * Use PyObject_Del() instead of PyMem_Free() in dealloc() to delete the ! object. ! ! * Added a cache (implemented with a Python Dictionary) for OIDs to hold ! the result of the check to see if the OID is a large object. This ! should reduce the number queries sent to the database for this ! purpose. ! ! * Add code to not check OIDs whose value is less than or equal to 1700 ! (PG_NUMERIC). These OIDs are not large objects. ! ! Changes to pgversion.c ! ---------------------- ! * Removed variables that are no longer needed/referenced. ! ! * Fixed code so that coercion generates an exception if the other object ! could not be converted to a PgVersion object. ! ! * Fixed problem where a variable in PgVersion_New() could be used before ! it was initialized. ! ! * Improved detection of erroneous input strings. ! ! * Various minor bug fixes and code cleanup. ! ! * Made constructed version string more closely mimic the actual format of ! the PostgreSQL version string. ! * Having a __dict__ attribute and calling PyMember_Get() in the ! PyVersion_getattr function causes dir() to do strange things (like list ! members twice). I've removed the __dict__ attribute and added methods ! to emulate a mapping object to PgVersion. A PgVersion object will now ! act like a dictionary, so use version[key] instead of ! version.__dict__[key]. ! * Make PgVersion_New safe for arbitrary input strings. ! * Make the repr method really return the version string. ! * Initialize a variable (value) in ver_coerce() to quite an erroneous gcc ! warning message. --- 46,184 ---- =========================================================================== ! Changes since pyPgSQL Version 1.6 ! ================================= ! pyPgSQL is now a 'real' python package (i.e. there is a directory named ! pyPgSQL that contains a file named __init__.py). PgSQL and libpq are now ! modules contained in the pyPgSQL package. ! =-=-=-=-=-=-=-=-=-=-=-=-=- ** IMPORTANT NOTE ** =-=-=-=-=-=-=-=-=-=-=-=-=-= ! NOTE: This change requires the use of 'from pyPgSQL import PgSQL' to import ! the PgSQL module, and 'from pyPgSQL import libpq' to import the libpq ! module. ! -=-=-=-=-=-=-=-=-=-=-=-=-= ** IMPORTANT NOTE ** -=-=-=-=-=-=-=-=-=-=-=-=-=- Changes to PgSQL.py ------------------- ! * It appears that under certain circumstances, PostgreSQL will not ! return a precision/scale value for a numeric column when no result rows ! are returned [Bug #477792]. The problem is fixed by using a precision ! and scale of (30,6) when this condition occurs. ! * Change the import of DateTime to avoid conflicts with ZOPE's builtin ! DateTime module. ! * Added code to ensure that creation of a binary object via the binary() ! method always occurs within the context of a transaction. ! * Change code so that the escaping/quoting is different if the result is ! to be used to build PostgreSQL arrays. ! * Modified all the Object._quote methods so that they now accept an ! option argument, forArray, which if set to 1 will cause escaping / ! quoting for PostgreSQL array use. ! * Re-organized the code use to build PostgreSQL arrays. ! ! * Added additional PostgreSQL types to BINARY, ROWID, etc. ! * Fixed problems associated with type casting. Changes to libpqmodule.c ------------------------ ! * Added support for the pickling of libpq objects. In particular, for ! PgVersion and PgConnection objects. ! * Added a cntructor method for PgVersion objects. ! * Changed all new style comments to original style. ! * Change PgQuoteString and PgQuoteByta so that unsigned char pointers are ! used instead of signed char pointers. ! ! * Added different quoting/escaping if the result is to be used as part of ! a PostgreSQL array. + * Change the quoting/escaping helper routines so that they also escape + the double quote character. + + * Added a PgLargeObject constructor. + Changes to pgboolean.c ---------------------- ! * Change the constructors so that they return PyObject * instead of ! PgBooleanObject *. Changes to pgconnection.c ------------------------- ! * Fixed a possible memory leak. ! * Added the lo_export() method. It was overlooked in the original code. ! * Added support for the pickling of PgConnection objects. In particular, ! a hidden method was added to return the connection information string ! used to create the connection. ! * Changed all new style comments to original style. ! * Added some brakets to clarify ambiguous else clauses. ! * Fixed numerous bugs found during the development of the regression test ! cases for pgconnection.c. + * The PgConnection's attributes are now set to a value of None when + finish() is called. + Changes to pgint2object.c ------------------------- ! * Changed all new style comments to original style. ! ! * Change the constructors so that they return PyObject * instead of ! PgInt2Object *. Changes to pgint8object.c ------------------------- ! * Changed all new style comments to original style. ! * Change the constructors so that they return PyObject * instead of ! PgInt8Object *. Changes to pglargeobject.c -------------------------- ! * Closed some memory leaks. This leaks had only a small probability of ! occuring. ! * Added support for the pickling of large objects. In particular, a ! method was added to retrieve the info needed to recreate the large ! object. Also, the open() and close() methods were changed to create ! and end transaction in the un-pickled large objects in order to create ! the context in which large object must be used. ! * Added a _quote() funtion. ! * Ensure that INV_BIN is not in the mode variable when lo_open is ! called. + * Removed static declaration from validmodes[]. It's now used by + lo_create in pgconnection.c also. + Changes to pgresult.c --------------------- ! * [Bug #474771] Found and plugged a memory leak in the PgResult_New() ! function. An object for the value of PGcmdStatus was being created ! twice, leaving an extra copy around to consume memory. ! * Added support for the pickling of pyPgSQL objects. ! * Change error message returned by PgResult_ntuple_check if no tuples ! were returned in the result. The returned error message now makes ! sense. ! * Added support for the PostgreSQL BYTEA type. ! * I have removed resultErrorMessage as an attribute. It doesn't make ! sense to leave it since it will always be None. Why? Because any ! query that generates an error will raise an exception, not return a ! PgResult. Index: ChangeLog =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/ChangeLog,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ChangeLog 2001/10/01 01:42:41 1.13 --- ChangeLog 2001/11/04 05:03:57 1.14 *************** *** 1,4 **** --- 1,141 ---- #ident "$Id$" + Changes since pyPgSQL Version 1.6 + ================================= + + pyPgSQL is now a 'real' python package (i.e. there is a directory named + pyPgSQL that contains a file named __init__.py). PgSQL and libpq are now + modules contained in the pyPgSQL package. + + =-=-=-=-=-=-=-=-=-=-=-=-=- ** IMPORTANT NOTE ** =-=-=-=-=-=-=-=-=-=-=-=-=-= + NOTE: This change requires the use of 'from pyPgSQL import PgSQL' to import + the PgSQL module, and 'from pyPgSQL import libpq' to import the libpq + module. + -=-=-=-=-=-=-=-=-=-=-=-=-= ** IMPORTANT NOTE ** -=-=-=-=-=-=-=-=-=-=-=-=-=- + + Changes to PgSQL.py + ------------------- + + * It appears that under certain circumstances, PostgreSQL will not + return a precision/scale value for a numeric column when no result rows + are returned [Bug #477792]. The problem is fixed by using a precision + and scale of (30,6) when this condition occurs. + + * Change the import of DateTime to avoid conflicts with ZOPE's builtin + DateTime module. + + * Added code to ensure that creation of a binary object via the binary() + method always occurs within the context of a transaction. + + * Change code so that the escaping/quoting is different if the result is + to be used to build PostgreSQL arrays. + + * Modified all the Object._quote methods so that they now accept an + option argument, forArray, which if set to 1 will cause escaping / + quoting for PostgreSQL array use. + + * Re-organized the code use to build PostgreSQL arrays. + + * Added additional PostgreSQL types to BINARY, ROWID, etc. + + * Fixed problems associated with type casting. + + Changes to libpqmodule.c + ------------------------ + * Added support for the pickling of libpq objects. In particular, for + PgVersion and PgConnection objects. + + * Added a cntructor method for PgVersion objects. + + * Changed all new style comments to original style. + + * Change PgQuoteString and PgQuoteByta so that unsigned char pointers are + used instead of signed char pointers. + + * Added different quoting/escaping if the result is to be used as part of + a PostgreSQL array. + + * Change the quoting/escaping helper routines so that they also escape + the double quote character. + + * Added a PgLargeObject constructor. + + Changes to pgboolean.c + ---------------------- + * Change the constructors so that they return PyObject * instead of + PgBooleanObject *. + + Changes to pgconnection.c + ------------------------- + * Fixed a possible memory leak. + + * Added the lo_export() method. It was overlooked in the original code. + + * Added support for the pickling of PgConnection objects. In particular, + a hidden method was added to return the connection information string + used to create the connection. + + * Changed all new style comments to original style. + + * Added some brakets to clarify ambiguous else clauses. + + * Fixed numerous bugs found during the development of the regression test + cases for pgconnection.c. + + * The PgConnection's attributes are now set to a value of None when + finish() is called. + + Changes to pgint2object.c + ------------------------- + * Changed all new style comments to original style. + + * Change the constructors so that they return PyObject * instead of + PgInt2Object *. + + Changes to pgint8object.c + ------------------------- + * Changed all new style comments to original style. + + * Change the constructors so that they return PyObject * instead of + PgInt8Object *. + + Changes to pglargeobject.c + -------------------------- + * Closed some memory leaks. This leaks had only a small probability of + occuring. + + * Added support for the pickling of large objects. In particular, a + method was added to retrieve the info needed to recreate the large + object. Also, the open() and close() methods were changed to create + and end transaction in the un-pickled large objects in order to create + the context in which large object must be used. + + * Added a _quote() funtion. + + * Ensure that INV_BIN is not in the mode variable when lo_open is + called. + + * Removed static declaration from validmodes[]. It's now used by + lo_create in pgconnection.c also. + + Changes to pgresult.c + --------------------- + * [Bug #474771] Found and plugged a memory leak in the PgResult_New() + function. An object for the value of PGcmdStatus was being created + twice, leaving an extra copy around to consume memory. + + * Added support for the pickling of pyPgSQL objects. + + * Change error message returned by PgResult_ntuple_check if no tuples + were returned in the result. The returned error message now makes + sense. + + * Added support for the PostgreSQL BYTEA type. + + * I have removed resultErrorMessage as an attribute. It doesn't make + sense to leave it since it will always be None. Why? Because any + query that generates an error will raise an exception, not return a + PgResult. + Changes since pyPgSQL Version 1.5.1 =================================== Index: MANIFEST =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/MANIFEST,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MANIFEST 2001/10/01 01:42:41 1.7 --- MANIFEST 2001/11/04 05:03:57 1.8 *************** *** 1,5 **** Announce ChangeLog - PgSQL.py README libpqmodule.c --- 1,4 ---- *************** *** 29,32 **** --- 28,34 ---- examples/demo2a.py examples/demo2b.py + pyPgSQL/PgSQL.py + pyPgSQL/__init__.py + pyPgSQL/libpq/__init__.py test/PgSQLTestCases.py test/regression/pgconnection.py |