diff options
-rw-r--r-- | MANIFEST.in | 10 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | doc/COPYING | 676 | ||||
-rw-r--r-- | doc/ChangeLog-1.x | 1744 | ||||
-rw-r--r-- | lib/extras.py | 14 | ||||
-rw-r--r-- | sandbox/ticket58.py (renamed from scripts/ticket58.py) | 0 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rwxr-xr-x | tests/test_notify.py | 11 |
8 files changed, 18 insertions, 2442 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 760dd06..1aa0ef4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,16 +1,10 @@ recursive-include psycopg *.c *.h *.manifest recursive-include lib *.py recursive-include tests *.py -recursive-include ZPsycopgDA *.py *.gif *.dtml -recursive-include psycopg2da * recursive-include examples *.py somehackers.jpg whereareyou.jpg -recursive-include debian * -recursive-include doc README HACKING SUCCESS COPYING* ChangeLog-1.x pep-0249.txt -recursive-include doc *.txt *.html *.css *.js Makefile +recursive-include doc README HACKING SUCCESS COPYING.LESSER pep-0249.txt recursive-include doc/src *.rst *.py *.css Makefile -recursive-include doc/html * -prune doc/src/_build recursive-include scripts *.py *.sh include scripts/maketypes.sh scripts/buildtypes.py -include AUTHORS README INSTALL LICENSE NEWS ChangeLog +include AUTHORS README INSTALL LICENSE NEWS include PKG-INFO MANIFEST.in MANIFEST setup.py setup.cfg Makefile @@ -11,7 +11,6 @@ # # Create a source package:: # -# make env # required to build the documentation # make sdist # # Run the test:: @@ -113,7 +112,7 @@ $(PACKAGE)/tests/%.py: tests/%.py $(PYTHON) setup.py build_py $(BUILD_OPT) touch $@ -$(SDIST): docs MANIFEST $(SOURCE) +$(SDIST): MANIFEST $(SOURCE) $(PYTHON) setup.py sdist $(SDIST_OPT) MANIFEST: MANIFEST.in $(SOURCE) diff --git a/doc/COPYING b/doc/COPYING deleted file mode 100644 index 4432540..0000000 --- a/doc/COPYING +++ /dev/null @@ -1,676 +0,0 @@ - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. - diff --git a/doc/ChangeLog-1.x b/doc/ChangeLog-1.x deleted file mode 100644 index dadfc1b..0000000 --- a/doc/ChangeLog-1.x +++ /dev/null @@ -1,1744 +0,0 @@ -2003-07-26 Federico Di Gregorio <fog@debian.org> - - * Release 1.1.7. - - * ZPsycopgDA/db.py: added _cursor method that checks for self.db - before returning a new cursor. Should fix problem reported with - Zope 2.7. - -2003-07-23 Federico Di Gregorio <fog@debian.org> - - * cursor.c: applied notify and fileno patch from Vsevolod Lobko. - -2003-07-20 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_mogrify_dict): applied (slightly modofied) patch from - Tobias Sargeant: now .execute() accept not only dictionaries but - every type that has a __getitem__ method. - -2003-07-13 Federico Di Gregorio <fog@debian.org> - - * Release 1.1.6. - - * cursor.c (psyco_curs_scroll): added scroll method, patch from - Jason D.Hildebrand. - - * typemod.c (new_psyco_quotedstringobject): discard NUL characters - (\0) in quoted strings (fix problem reported by Richard Taylor.) - -2003-07-10 Federico Di Gregorio <fog@debian.org> - - * Added python-taylor.txt in doc directory: very nice introduction - to DBAPI programming by Richard Taylor. - -2003-07-09 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_psyco_curs_execute): another MT problem exposed and - fixed by Sebastien Bigaret (self->keeper->status still LOCKED - after a fatal error during PQexec call.) - -2003-06-23 Federico Di Gregorio <fog@debian.org> - - * Release 1.1.5.1. - - * ZPsycopgDA/db.py (DB.query): stupid error making ZPsycopgDA - unusable fixed (else->except). - -2003-06-22 Federico Di Gregorio <fog@debian.org> - - * Release 1.1.5 candidate. - - * cursor.c (psyco_curs_copy_to): now any object with the write - method can be used as a copy_to target. - -2003-06-20 Federico Di Gregorio <fog@debian.org> - - * cursor.c (psyco_curs_copy_from): applied patch to allow copy_to - from any object having a "readline" attribute (patch from Lex - Berezhny.) (psyco_curs_copy_from): another patch from Lex to make - psycopg raise an error on COPY FROM errors. - - * ZPsycopgDA/db.py (DB.query): if a query raise an exception, - first self._abort() is called to rollback current - "sub-transaction". this is a backward-compatible change for - people that think continuing to work in the same zope transaction - after an exception is a Good Thing (TM). - - * finally updated check_types.expected. checked by hand the - conversions work the right way. - - * doc/examples/work.py: fixed example. note that it is a long time - (at least two releases) that psycopg does not END a transaction - initiated explicitly by the user while in autocommit mode. - -2003-06-19 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_mogrify_dict): fixed dictionary mogrification (patch - by Vsevolod Lobko.) (_psyco_curs_execute): fixed keeper status - trashing problem by letting only one thread at time play with - keeper->status (as suggested by Sebastien Bigaret.) - -2003-05-07 Federico Di Gregorio <fog@debian.org> - - * Release 1.1.4. - - * cursor.c: Added "statusmessage" attribute that holds the backend - message (modified lots of functions, look for self->status). - -2003-05-06 Federico Di Gregorio <fog@debian.org> - - * typemod.c (new_psyco_datetimeobject): moved Py_INCREF into - XXX_FromMx functions, to fix memory leak reported by Jim Crumpler. - -2003-04-11 Federico Di Gregorio <fog@debian.org> - - * module.h (PyObject_TypeCheck): fixed leak in python 2.1 - (Guido van Rossum). - -2003-04-08 Federico Di Gregorio <fog@debian.org> - - * buildtypes.py (basic_types): removed LXTEXT (never user, does - not exists anymore.) - -2003-04-07 Federico Di Gregorio <fog@debian.org> - - * setup.py: added very lame setup.py script. - -2003-04-02 Federico Di Gregorio <fog@debian.org> - - * Release 1.3. - - * psycopg.spec: Added (but modified) spec file by William - K. Volkman (again, this change was lost somewhere in time...) - -2003-04-01 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_psyco_curs_execute): psycopg was reporting everything - as IntegrityError; reported and fix suggested by Amin Abdulghani. - -2003-03-21 Federico Di Gregorio <fog@debian.org> - - * cursor.c (psyco_curs_fetchone): debug statements sometimes made - psycopg segfault: fixed by a patch by Ken Simpson. - -2003-03-18 Federico Di Gregorio <fog@debian.org> - - * cursor.c (alloc_keeper): patch from Dieter Maurer to unlock GIL - whaile calling PQconnectdb(). - -2003-03-05 Federico Di Gregorio <fog@debian.org> - - * Release 1.1.2. - - * Applied cygwin patch from Hajime Nakagami. - -2003-02-25 Federico Di Gregorio <fog@debian.org> - - * Release 1.1.2pre1. - - * cursor.c: added .lastrowid attribute to cursors (lastoid is - deprecated and will be removed sometime in the future.) - - * cursor.c (begin_pgconn): implemented various isolation levels - (also, in abort_pgconn, commit_pgconn.) - - * Added keyword parameters to psycopg.connect(): all take strings - (even port): database, host, port, user, password. - - * configure.in: fixed test for postgres version > 7.2. - - * cursor.c (_psyco_curs_execute): removed if on pgerr in default - case (if we enter default pgerr can't be one of the cased ones.) - Also applied slightly modified patch from William K. Volkman. - -2003-02-24 Federico Di Gregorio <fog@debian.org> - - * Merged in changes from 1.0.15.1 (see below for merged - ChangeLog.) - -2003-02-14 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.15.1. - - * cursor.c (_mogrify_fmt): in some cases we where removing one - character too much from the format string, resulting in BIG BAD - BUG. <g> Fixed. - -2003-02-13 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.15. <g> - - * connection.c (_psyco_conn_close): now call dispose_pgconn on all - cursors, to make sure all phisical connections to the db are - closed (problem first reported by Amin Abdulghani.) - - * DBAPI-2.0 fixed mainly due to Stuart Bishop: - - cursor.c (psyco_curs_setinputsizes): removed PARSEARGS, as - this method does nothing. - - cursor.c (psyco_curs_setoutputsize): .setoutputsize was - spelled .setoutputsizes! fixed. Also removed PARSEARGS, as this - method does nothing. - -2003-02-12 Federico Di Gregorio <fog@debian.org> - - * module.h (Dprintf): check on __APPLE__ to avoid variadic macros - on macos x (as reported by Stuart Bishop, btw, why gcc seems to - not support them on macos?) - - * cursor.c (_mogrify_fmt): non-alphabetic characters are dropped - after the closing ")" until a real alphabetic, formatting one is - found. (Fix bug reported by Randall Randall.) - -2003-02-05 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_INTERVAL_cast): patched again to take into - account leading zeroes. - -2003-02-02 Federico Di Gregorio <fog@debian.org> - - * Makefile.pre.in: applied patch from Albert Chin-A-Young to - define BLDSHARED. - - * README: added explicit permission to link with OpenSSL. - -2003-01-30 Federico Di Gregorio <fog@debian.org> - - * config.h.in: applied patch from Albert Chin-A-Young to fix - asprintf prototype. - -2003-01-29 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_mogrify_seq): fixed little refcount leak, as - suggested by Yves Bastide. - -2003-01-24 Federico Di Gregorio <fog@debian.org> - - * Merged-in changes from 1.0.14.2 (emacs diff mode is great..) - - * Release 1.0.14.2. - - * ZPsycopgDA/db.py (DB.query): back to allowing up to 1000 db - errors before trying to reopen the connection by ourselves. - - * ZPsycopgDA/db.py: a false (None preferred, 0 allowed) max_rows - value now means "fetch all results". - -2003-01-22 Federico Di Gregorio <fog@debian.org> - - * cursor.c (psyco_curs_fetchone): fixed little memory leak - reported by Dieter Maurer. - -2003-01-20 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py (DB.tables/columns): added registration with - Zope's transaction machinery. - - * Release 1.0.14.1. - - * ZPsycopgDA/db.py: applied some fixes and cleanups by Dieter - Maurer (serialization problem were no more correctly detected!) - - * Release 1.0.14. - - * Merged in 1.0.14. - - * Import of 1.1.1 done. - - * Moved everything to cvs HEAD. - -2003-01-20 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/connectionAdd.dtml: fixed typo (thanks to Andrew - Veitch.) - - * typeobj.c (psyco_INTERVAL_cast): applied patch from Karl Putland - to fix problems with fractional seconds. - -2002-12-03 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.14-pre2. - - * module.h: added macro for PyObject_TypeCheck if python version <2.2. - - * typeobj.c (psyco_DBAPITypeObject_coerce): added error message to - coercion errors. - -2002-12-02 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.14-pre1. - - * ZPsycopgDA/db.py (DB.sortKey): added sortKey(). - - * ZPsycopgDA/DA.py: applied a patch that was lost on hard disk - (sic), if you sent me a patch names psycopg-1.0.13.diff modifying - DA.py imports and want your name here, send me an email. :) - [btw, the patch fix the ImageFile import, getting it from Globals - as it is right.] - - * typeobj.c (psyco_DBAPITypeObject_coerce): Fixed coerce segfault - by checking explicitly for all the allowed types. - -2002-11-25 Federico Di Gregorio <fog@debian.org> - - * doc/examples/*.py: added .rollback() to all exceptions before - deleteing the old table. - - * cursor.c: Apllied patch from John Goerzen (fix memory leak in - executemany). - -2002-10-25 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.13. - - * connection.c (_psyco_conn_close): remove cursors from the list - starting from last and moving backward (as suggested by Jeremy - Hylton; this is not such a big gain because python lists are - *linked* lists, but not removing the element 0 makes the code a - little bit clear.) - - * cursor.c (_psyco_curs_execute): now IntegrityError is raised - instead of ProgrammingError when adding NULL values to a non-NULL - column (suggested by Edmund Lian) and on referential integrity - violation (as per debian bug #165791.) - - * typeobj.c (psyco_DATE_cast): now we use 999999 instead of - 5867440 for very large (both signs) dates. This allow to re-insert - the DateTime object into postgresql (suggested by Zahid Malik.) - -2002-09-13 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.12. - - * Removed code to support COPY FROM/TO, will be added to new 1.1 - branch to be released next week. - - * cursor.c (_mogrify_seq): Fixed memory leak reported by Menno - Smits (values obtained by calling PySequence_GetItem are *new* - references!) - -2002-09-07 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_psyco_curs_execute): Added skeleton to support COPY - FROM/TO. - -2002-09-06 Federico Di Gregorio <fog@debian.org> - - * configure.in: if libcrypt can't be found we probably are on - MacOS X: check for libcrypto, as suggested by Aparajita Fishman. - -2002-09-03 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py (DB.columns): Applied patch from Dieter Maurer - to allow the DA-browser to work with mixed case table names. - -2002-08-30 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py (cast_DateTime): Applied patch from Yury to fix - timestamps (before they were returned with time always set to 0.) - -2002-08-26 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.11.1 (to fix a %&£$"! bug in ZPsycopgDA not - accepting psycopg 1.0.11 as a valid version. - - * Release 1.0.11. - -2002-08-22 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.11pre2. - - * cursor.c (_psyco_curs_execute): fixed IntegrityError as reported - by Andy Dustman. (psyco_curs_execute): converting TypeError to - ProgrammingError on wrong number of % and/or aeguments. - - * doc/examples/integrity.py: added example and check for - IntegrityError. - -2002-08-08 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.11pre1. - -2002-08-06 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py (cast_DateTime): patched as suggested by Tom - Jenkins; now it shouldwork with time zones too. - -2002-08-01 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py (cast_DateTime): fixed problem with missing - AM/PM, as reported by Tom Jenkins. - -2002-07-23 Federico Di Gregorio <fog@debian.org> - - * Fixed buglets reported by Mike Coleman. - -2002-07-22 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.10. - -2002-07-14 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.10pre2. - - * typeobj.c (psyco_LONGINTEGER_cast): fixed bad segfault by - INCREFfing Py_None when it is the result of a NULL conversion. - -2002-07-04 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.10pre1. - - * buildtypes.py (basic_types): added TIMESTAMPTZ to the types - converted by the DATE builtin. - - * ZPsycopgDA/DA.py (Connection.connect): Added version check. - -2002-07-03 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_XXX_cast): fixed bug reported by multiple users - by appliying Matt patch. - -2002-06-30 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py (Connection.set_type_casts): applied patch from - Tom Jenkins to parse dates with TZ. - -2002-06-20 Federico Di Gregorio <fog@debian.org> - - * Preparing for release 1.0.9. - - * Makefile.pre.in (dist): now we really include psycopg.spec. - -2002-06-17 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py (_finish, _abort): fixed problem with - connection left in invalid state by applying Tom Jenkins patch. - -2002-06-06 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py (DB._abort): fixed exception raising after an - error in execute triggerer deletion of self.db. - -2002-05-16 Federico Di Gregorio <fog@debian.org> - - * cursor.c (psyco_curs_fetchone): None values passed to the - internal typecasters. - - * typeobj.c: added management of None to all the builtin - typecasters. - -2002-04-29 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py (cast_Time): applied 'seconds as a float' patch - from Jelle. - -2002-04-23 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.8. - - * Makefile.pre.in: we now include win32 related files in the - distribution. - - * connection.c (psyco_conn_destroy): fixed segfault reported by - Scott Leerssen (we were double calling _psyco_conn_close().) - - * typemod.c (new_psyco_quotedstringobject): fixed memory stomping - catched by assert(); thanks to Matt Hoskins for reporting this - one. - -2002-04-22 Federico Di Gregorio <fog@debian.org> - - * configure.in: grmpf. we need a VERSION file for windows, we'll - use it for configue and debian/rules too. - - * Integrated win32 changes from Jason Erickson. Moved his - Readme.txt to README.win32, removed VERSION and DATE, patched - source where required. Renamed HISTORY to ChangeLog.win32, hoping - Jason will start adding changes to the real ChangeLog file. - -2002-04-07 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.7.1. - - * configure.in: fixed little bug as reported by ron. - -2002-04-05 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.7? - - * typemod.c (new_psyco_bufferobject): fixed encoding problem (0xff - now encoded as \377 and not \777.) Also encoding *all* chars as - quoted octal values to prevent "Invalid UNICODE character sequence - found" errors. - - * Release 1.0.7. (Real this time.) (Ok, it was a joke....) - -2002-04-03 Federico Di Gregorio <fog@debian.org> - - * configure.in: fixed problem with postgres versions in the format - 7.2.x (sic.) - - * connection.c (psyco_conn_destroy): moved most of the destroy - stuff into its own function (_psyco_conn_close) and added a call - to it from psyco_conn_close. This should fix the "psycopg does not - release postgres connections on .close()" problem. - -2002-03-29 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.7. Delayed. - - * buildtypes.py (basic_types): added TIMESTAMPTZ postgres type to - the list of valid DATETIME types (incredible luck, no changes to - the parse are needed!) - - * typeobj.c (psyco_DATE_cast): fixed wrong managment of sign in - infinity. - -2002-03-27 Federico Di Gregorio <fog@debian.org> - - * configure.in (INSTALLOPTS): added AC_PROG_CPP test, now uses - AC_TRY_CPP to test for _all_ required mx includes. - -2002-03-19 Federico Di Gregorio <fog@debian.org> - - * configure.in: added check for both pg_config.h and config.h to - detect postgres version. - - * cursor.c: now None values are correctly handled when the format - string is not %s but %d, etc. - -2002-03-08 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py: added MessageDialog import suggested by - Guido. - -2002-03-07 Federico Di Gregorio <fog@debian.org> - - * psycopg.spec: added RPM specs by William K. Volkman. - - * Release 1.0.6. - - * configure.in: imported changes to allow postgres 7.2 builds from - unstable branch. - -2002-03-04 Federico Di Gregorio <fog@debian.org> - - * Release 1.0.5. - - * applied table browser patch from Andy Dustman. - -2002-02-26 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_DATE_cast): added management of infinity - values, this can be done in a better way, by accessing the - MaxDateTime and MinDateTime constants of the mx.DateTime module. - -2002-02-20 Federico Di Gregorio <fog@debian.org> - - * configure.in: Release 1.0.4. - -2002-02-12 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py (DB.columns): fixed select to reenable column - expansion in table browsing. - - * ZPsycopgDA/__init__.py: removed code that made psycopg think - double. - -2002-02-11 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_mogrify_dict): removed Py_DECREF of Py_None, - references returned by PyDict_Next() are borrowed (thanks to - Michael Lausch for this one.) - -2002-02-08 Federico Di Gregorio <fog@debian.org> - - * A little bug slipped in ZPsycopgDA, releasing 1.0.3 immediately. - - * Release 1.0.2. - - * tests/check_types.py (TYPES): added check for hundredths of a - second. - -2002-02-07 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_INTERVAL_cast): patched to correct wrong - interpretation of hundredths of a second (patch from - A. R. Beresford, kudos!) - -2002-01-31 Federico Di Gregorio <fog@debian.org> - - * FAQ: added. - -2002-01-16 Federico Di Gregorio <fog@debian.org> - - * Preparing for release 1.0.1. - - * cursor.c (alloc_keeper): removed ALLOW_THREADS wrapper around - PQconnectdb: libpq calls crypt() that is *not* reentrant. - -2001-12-19 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_DBAPITypeObject_cmp): added check to simply - return false when two type objects are compared (type objects are - meaned to be compared to integers!) - - * typeobj.c: fixed the memory leak reported by the guys at - racemi, for real this time. (added about 5 DECREFS and 2 INCREFS, - ouch!) - -2001-12-17 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_DBAPITypeObject_cmp): fixed memory leak by - using PyTuple_GET_ITEM (we are sure the tuple has at least one - element, we built it, after all...) (many thanks to Scott Leerssen - for reporting the *exact line* for this one.) - -2001-12-13 Federico Di Gregorio <fog@debian.org> - - * cursor.c: fixed memory leak due to extra strdup (thanks - to Leonardo Rochael Almeida.) - -2001-11-14 Federico Di Gregorio <fog@debian.org> - - * Release 1.0. - - * doc/README: added explanation about guide work in progess but - examples working. - - * debian/*: lots of changes to release 1.0 in debian too. - -2001-11-12 Federico Di Gregorio <fog@debian.org> - - * RELEASE-1.0: added release file, to celebrate 1.0. - - * tests/zope/typecheck.zexp: regression test on types for zope. - -2001-11-11 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py (cast_Interval): removed typecast of interval - into zope DateTime. intervals are reported as strings when using - zope DateTime and as DateTimeDeltas when using mx. - -2001-11-09 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_INTERVAL_cast): complete rewrite of the - interval parsing code. now we don't use sscanf anymore and all is - done with custom code in a very tight and fast loop. - -2001-11-08 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/DA.py (Connection.set_type_casts): added mx INTERVAL - type restore. - - * ZPsycopgDA/db.py (DB.query): now we return column names even if - there are no rows in the result set. also, cleaned up a little bit - the code. - -2001-11-7 Federico Di Gregorio, <fog@debian.org> - - * Makefile.pre.in: fixed small problem with zcat on True64 - (thank you stefan.) - -2001-11-06 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py (DB.query): added fix for concurrent update - from Chris Kratz. - -2001-11-05 Federico Di Gregorio <fog@debian.org> - - * cursor.c: now we include postgres.h if InvalidOid is still - undefined after all other #includes. - - * README: clarified use of configure args related to python - versions. - - * aclocal.m4: patched to work with symlinks installations (thanks - to Stuart Bishop.) - - * cursor.c (_psyco_curs_execute): now reset the keeper's status to - the old value and not to BEGIN (solve problem with autocommit not - switching back.) - -2001-11-01 Federico Di Gregorio <fog@debian.org> - - * doc/examples/dt.py: added example on how to use the date and - time constructors. - - * Makefile.pre.in (dist-zope): removed dependencies on GNU install - and tar commands. Also a little general cleanup on various targets. - - * ZPsycopgDA/DA.py: fixed mx.DateTime importing. - -2001-10-31 Federico Di Gregorio <fog@debian.org> - - * typemod.c (psyco_xxxFromMx): fixed bug in argument parsing (we - weren't usigng the right type object.) - - * aclocal.m4: now builds OPT and LDFLAGS on the values of the env - variables instead of overwriting them. - - * Makefile.pre.in (CFLAGS): removed -Wall, you can add it back at - compile time with OPT="-Wall" ./configure ... - - * Setup.in (OPT): removed -Wall. - -2001-10-30 Michele Comitini <mcm@initd.net> - - * module.h: ANSI C compatibility patch from Daniel Plagge. - -2001-10-30 Federico Di Gregorio <fog@debian.org> - - * README: added common building problems and solutions. - - * configure.in: removed check for install command, already done by - james's aclocal.m4 for python. removed install-sh. removed -s from - INSTALLOPTS. - -2001-10-29 Federico Di Gregorio <fog@debian.org> - - * Makefile.pre.in (dist): removed examples/ directory from - distribution. - - * merge with cvs head. preparing to fork again on PSYCOPG-1-0 (i - admit BRANCH_1_0 was quite a silly name.) - - * doc/examples/usercast.py: now works. - - * connection.c (curs_rollbackall): fixed little bug (exposed by - the deadlock below) by changing KEEPER_READY to KEEPER_READY. - - * doc/examples/commit.py: deadlock problem solved, was the - example script, _not_ psycopg. pew... :) - - * examples/*: removed the examples moved to doc/examples/. - - * doc/examples/commit.py,dictfetch.py: moved from examples/ and - changed to work for 1.0. unfortunately commit.py locks psycopg!!! - -2001-10-24 Federico Di Gregorio <fog@debian.org> - - * modified all files neede for the 1.0 release. - - * configure.in (MXFLAGS): removed electric fence support. - - * Makefile.pre.in (dist): now we remove CVS working files before - packing the tarball. - - * tests: files in this directory are not coding examples, but - regression tests. we need a sufficient number of tests to follow - every single code path in psycopg at least once. first test is - about datatypes. - - * doc/examples: moved new example code to examples directory, old - tests and code samples will stay in examples/ until the manual will - be finished. - -2001-10-16 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_INTERVAL_cast): completely revised interval - casting code. (psyco_TIME_cast): we use the unix epoch when the - date is undefined. - - * cursor.c (psyco_curs_executemany): modified sanity check to - accept sequences of tuples too and not just dictionaries. - -2001-10-15 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_INTERVAL_cast): fixed bug caused by wrong - parsing on '1 day' (no hours, minutes and seconds.) - -2001-10-15 Michele Comitini <mcm@initd.net> - - * cursor.c (_execute): use the correct cast functions even on - retrival of binary cursors. - -2001-10-12 Federico Di Gregorio <fog@debian.org> - - * typemod.c (new_psyco_bufferobject): space not quoted anymore, - smarter formula to calculate realloc size. - - * cursor.c (psyco_curs_fetchone): removed static tuple (using - static variable in multithreaded code is *crazy*, why did i do it? - who knows...) - - * typeobj.c (psyco_init_types): exports the binary converter (will - be used in cursor.c:_execute.) - - * typeobj.h: added export of psyco_binary_cast object. - -2001-10-05 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_psyco_curs_execute): added missing Py_XDECREF on - casts list. - - * Makefile.pre.in (dist): added install-sh file to the - distribution. - - * replaced PyMem_DEL with PyObject_Del where necessary. - - * connection.c (psyco_conn_destroy): added missing - pthread_mutex_destroy on keeper lock. - -2001-10-01 Michele Comitini <mcm@initd.net> - - * typemod.c(new_psyco_bufferobject()): using unsigned char for - binary objects to avoid too many chars escaped. A quick and - simple formula to avoid memory wasting and too much reallocating - for the converted object. Needs _testing_, but it is faster. - - * cursor.c: #include <postgres.h> - - * module.h: now debugging should be active only when asked by - ./configure --enable-devel - -2001-09-29 Federico Di Gregorio <fog@debian.org> - - * cursor.c (new_psyco_cursobject): added locking of connection, - still unsure if necessary. - -2001-09-26 Federico Di Gregorio <fog@debian.org> - - * configure.in: changed DEBUG into PSYCOTIC_DEBUG, to allow other - includes (postgres.h) to use the former. better compiler checks: - inline, ansi, gcc specific extensions. removed MXMODULE: we don't - need it anymore. - - * general #include cleanup, should compile on MacOS X too. - - * typeobj.c (psyco_DATE_cast): uses sscanf. should be faster too. - (psyco_TIME_cast): dixit. - - * applied patch from Daniel Plagge (SUN cc changes.) - -2001-09-22 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py (DB._finish, DB._begin): fix for the - self.db == None problem. - -2001-09-19 Michele Comitini <mcm@initd.net> - - * typemod.c (new_psyco_bufferobject): better memory managment - (now it allocates only needed space dinamically). - - * typeobj.c (psyco_BINARY_cast): ripped a useless check, now - it assumes that binary streams come out from the db correctly - escaped. Should be a lot faster. - -2001-09-18 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_INTERVAL_cast): fixed interval conversion - (hours were incorrectly converted into seconds.) - -2001-09-17 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_mogrify_seq, _mogrify_dict): added check for None - value and conversion of None -> NULL (fixes bug reported by Hamish - Lawson.) - -2001-09-12 Federico Di Gregorio <fog@debian.org> - - * module.c: added handles to new date and time conversion - functions (see below.) - - * typemod.c (psyco_XXXFromMx): added conversion functions that - simply wrap the mxDateTime objects instead of creating - them. DBAPI-2.0 extension, off-curse. - -2001-09-10 Federico Di Gregorio <fog@debian.org> - - * buildtypes.py: solved hidden bug by changing from dictionary to - list, to maintain ordering of types. sometimes (and just - sometimes) the type definitions were printed unsorted, resulting - is psycopg initializing the type system using the type objects in - the wrong order. you were getting float values from an int4 - column? be happy, this is now fixed... - - * cursor.c (psyco_curs_lastoid): added method to get oid of the - last inserted row (it was sooo easy, it even works...) - -2001-09-08 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_INTERVAL_cast): added casting function for the - postgres INTERVAL and TINTERVAL types (create a DateTimeDelta - object.) - -2001-09-05 Federico Di Gregorio <fog@debian.org> - - * cursor.c: moved all calls to begin_pgconn to a single call in - _psyco_curs_execute, to leave the connection in a not-idle status - after a commit or a rollback. this should free a lot of resources - on the backend side. kudos to the webware-discuss mailing list - members and to Clark C. Evans who suggested a nice solution. - - * connection.c (curs_rollbackall, curs_commitall): removed calls - to begin_pgconn, see above. - - * module.c (initpsycopg): cleaned up mxDateTime importing; we now - use the right function from mxDateTime.h. Is not necessary anymore - to include our own mx headers. This makes psycopg to depend on - mxDateTime >= 2.0.0. - -2001-09-04 Federico Di Gregorio <fog@debian.org> - - * doc/*.tex: added documentation directory and skeleton of the - psycopg guide. - -2001-09-03 Federico Di Gregorio <fog@debian.org> - - * merged in changes from HEAD (mostly mcm fixes to binary - objects.) - - * preparing for release 0.99.6. - -2001-09-03 Michele Comitini <mcm@initd.net> - - * typemod.c: much faster Binary encoding routine. - - * typeobj.c: much faster Binary decoding routine. - -2001-08-28 Michele Comitini <mcm@initd.net> - - * typemod.c: Working binary object to feed data to bytea type - fields. - - * typeobj.c: Added BINARY typecast to extract data from - bytea type fields. - - * cursor.c: Added handling for SQL binary cursors. - -2001-08-3 Michele Comitini <mcm@initd.net> - - * cursor.c: fixed DATESTYLE problem thanx to Steve Drees. - -2001-07-26 Federico Di Gregorio <fog@debian.org> - - * Makefile.pre.in: applied change suggested by Stefan H. Holek to - clobber and distclean targets. - -2001-07-23 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py: fixed little bugs exposed by multiple select - changes, not we correctly import ListType and we don't override - the type() function with a variable. - -2001-07-17 Federico Di Gregorio <fog@debian.org> - - * configure.in: Release 0.99.5. - -2001-07-12 Federico Di Gregorio <fog@debian.org> - - * debian/* fixed some little packaging problems. - -2001-07-11 Federico Di Gregorio <fog@debian.org> - - * cursor.c, typeobj.c: removed some Py_INCREF on PyDict_SetItem - keys and values to avoid memory leaks. - -2001-07-03 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_mogrify_dict): added dictionary mogrification: all - Strings in the dictionary are translated into QuotedStrings. it - even works... (_mogrify_seq): added sequence mogrification and - code to automagically mogrify all strings passed to .execute(). - -2001-07-02 Federico Di Gregorio <fog@debian.org> - - * Release 0.99.4. - - * typemod.c: added QuotedString class and methods. - - * module.c: added QuotedString method to module psycopg. - - * typemod.c: changed Binary objects into something usefull. now - the buffer object quotes the input by translatin every char into - its octal representation. this consumes 4x memory but guarantees - that even binary data containing '\0' can go into the Binary - object. - - * typemod.h: added definition of QuotedString object. - -2001-06-28 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py, ZPsycopgDA/DABase.py: applied patch sent by - yury to fix little buglet. - -2001-06-22 Federico Di Gregorio <fog@debian.org> - - * Release 0.99.3. - - * connection.c (new_psyco_connobject): now we strdup dsn, as a fix - for the problem reported by Jack Moffitt. - - * Ok, this will be the stable branch from now on... - - * Merged in stuff from 0.99.3. About to re-branch with a better - name (BRANCH_1_0) - -2001-06-20 Federico Di Gregorio <fog@debian.org> - - * Release 0.99.3. Showstoppers for 1.0 are: - - documentation - - mxDateTime module loading - - bug reported by Yury. - - * Integrated patches from Michele: - - searching for libcrypt in configure now works - - removed memory leak in asprintf.c - -2001-06-15 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/__init__.py (initialize): applied patch from Jelle to - resolve problem with Zope 2.4.0a1. - -2001-06-14 Federico Di Gregorio <fog@debian.org> - - * configure.in: added code to check for missing functions (only - asprintf at now.) - - * asprintf.c: added compatibility code for oses that does not have - the asprintf() function. - -2001-06-10 Federico Di Gregorio <fog@debian.org> - - * Branched PSYCOPG_0_99_3. Development will continue on the cvs - HEAD, final adjustements and bugfixing should go to this newly - created branch. - -2001-06-08 Michele Comitini <mcm@initd.net> - - * ZPsycopgDA/DA.py: DateTime casts simplified and corrected - as suggested by Yury. - -2001-06-05 Federico Di Gregorio <fog@debian.org> - - * Release 0.99.2. - - * Makefile.pre.in (dist): added typemod.h and typemod.c to - distribution. - - * cursor.c (commit_pgconn, abort_pgconn, begin_pgconn): resolved - segfault reported by Andre by changing PyErr_SetString invokations - into pgconn_set_critical. the problem was that the python - interpreter simply segfaults when we touch its internal data (like - exception message) inside an ALLOW_THREADS wrapper. - - * now that we are 100% DBAPI-2.0 compliant is time for the - one-dot-o release (at last!) Para-pa-pa! This one is tagged - PSYCOPG_0_99_1 but you can call it 1.0pre1, if you better like. - (A very long text just to say 'Release 0.99.1') - - * typemod.[ch]: to reach complete DBAPI-2.0 compliance we - introduce some new objects returned by the constructors Date(), - Time(), Binary(), etc. Those objects are module-to-database only, - the type system still takes care of the database-to-python - conversion. - -2001-06-01 Federico Di Gregorio <fog@debian.org> - - * Release 0.5.5. - - * module.h: better error message when trying to commit on a - cursor derived from serialized connection. - - * ZPsycopgDA/db.py (DB.close): now self.cursor is set to None when - the connection is closed. - - * module.c (initpsycopg): added missing (sic) DBAPI module - parameters (paramstyle, apilevel, threadsafety, etc...) - -2001-05-24 Michele Comitini <mcm@initd.net> - - * ZPsycopgDA: Support for Zope's internal DateTime, option - to leave mxDateTime is available on the management interface so - to switch with little effort :). - - * cursor.c: more aggressive cleanup of postgres results - to avoid the risk of memory leaking. - - * typeobj.c, connection.c: deleted some Py_INCREF which - wasted memory. - -2001-05-18 Federico Di Gregorio <fog@debian.org> - - * Release 0.5.4. - -2001-05-17 Michele Comitini <mcm@initd.net> - - * ZPsycopgDA/db.py: The connection closed by the management - interface of zope now raises error instead of reopening itself. - - * cursor.c (psyco_curs_close): does not try to free the cursor - list, as it caused a segfault on subsequent operations on the same - cursor. - -2001-05-07 Federico Di Gregorio <fog@debian.org> - - * Release 0.5.3. - - * Merged in changes from me and mcm. - -2001-05-06 Michele Comitini <mcm@initd.net> - - * ZPsycopgDA/db.py (DB.close): Fixes a bug report by Andre - Shubert, which was still open since there was a tiny typo in - method definition. - - * ZPsycopgDA/DA.py (Connection.sql_quote__): overriding standard - sql_quote__ method to provide correct quoting (thank to Philip - Mayers and Casey Duncan for this bug report). - -2001-05-04 Federico Di Gregorio <fog@debian.org> - - * ZPsycopgDA/db.py: added .close() method (as suffested by Andre - Schubert.) - -2001-05-04 Michele Comitini <mcm@initd.net> - - * module.h: working on a closed object now raises an - InterfaceError. - - * ZPsycopgDA/db.py: fixed problems with dead connections detection. - - * ZPsycopgDA/__init__.py: corrected SOFTWARE_HOME bug for zope - icon. - -2001-05-04 Federico Di Gregorio <fog@debian.org> - - * examples/thread_test.py: now that the serialization bug is - fixed, it is clear that thread_test.py is bugged! added a commit() - after the creation of the first table to avoid loosing it on the - exception raised by the CREATE of an existing table_b. - -2001-05-03 Federico Di Gregorio <fog@debian.org> - - * connection.c (psyco_conn_cursor): reverted to old locking - policy, the new caused a nasty deadlock. apparently the multiple - connection problem has been solved as a side-effect of the other - fixes... (?!) - - * module.h: removes stdkeeper field from connobject, we don't need - it anymore. - - * cursor.c (dispose_pgconn): now sets self->keeper to NULL to - avoid decrementing the keeper refcnt two times when the cursor is - first closed and then destroyed. - - * connection.c (psyco_conn_cursor): fixed little bug in cursor - creation: now the connection is locked for the entire duration of - the cursor creation, to avoid a new cursor to be created with a - new keeper due to a delay in assigning the stdmanager cursor. - - * cursor.c: added calls to pgconn_set_critical() and to - EXC_IFCRITICAL() where we expect problems. Still segfaults but at - least raise an exception... - - * cursor.c (psyco_curs_autocommit): added exception if the - cursor's keeper is shared between more than 1 cursor. - - * module.h (EXC_IFCRITICAL): added this macro that call - pgconn_resolve_critical) on critical errors. - - * cursor.c (alloc_keeper): added check for pgres == NULL. - - * cursor.c (psyco_curs_destroy): merged psyco_curs_destroy() and - psyco_curs_close(): now both call _psyco_curs_close() and destroy - does only some extra cleanup. - -2001-05-03 Michele Comitini <mcm@initd.net> - - * ZPsycopgDA/db.py: Some cleanup to bring the zope product up to - date with the python module. Some bugs found thanks to Andre - Schubert. Now the ZDA should rely on the new serialized version - of psycopg. - - * cursor.c: while looking for problems in the ZDA some come out - here, with the inability to handle dropping connection correctly. - This leads to segfaults and is not fixed yet for lack of time. - Some problems found in cursors not willing to share the same - connection even if they should. Hopefully it should be fixed - soon. - -2001-04-26 Federico Di Gregorio <fog@debian.org> - - * fixed bug reported by Andre Schubert by adding a new cast - function for long integers (int8 postgresql type.) at now they are - converted to python LongIntegers: not sure f simply convert to - floats. - - * michele applied patch from Ivo van der Wijk to make zpsycopgda - behave better when INSTANCE_HOME != SOFTWARE_HOME. - - * cursor.c (_psyco_curs_execute): also fill the 'columns' field. - - * module.h: added a 'columns' field to cursobject, to better - support the new dictionary fetch functions (dictfetchone(), - dictfetchmany(), dictfetchall().) - - * cursor.c: added the afore-mentioned functions (function names - are not definitive, they will follow decisions on the DBAPI SIG.) - -2001-04-03 Federico Di Gregorio <fog@debian.org> - - * Release 0.5.1. - - * mcm fixed a nasty bug by correcting a typo in module.h. - -2001-03-30 Federico Di Gregorio <fog@debian.org> - - * module.c (psyco_connect): added `serialized' named argument to - the .connect() method (takes 1 or 0 and initialize the connection - to the right serialization state.) - - * Makefile.pre.in (dist): fixed little bug, a missing -f argument - to rm. - - * examples/thread_test.py: removed all extension cruft. - - * examples/thread_test_x.py: this one uses extensions like the - per-cursor commit, autocommit, etc. - - * README (psycopg): added explanation on how .serialize() works. - - * connection.c (psyco_conn_serialize): added cursor serialization - and .serialize() method on the connection object. now we are - definitely DBAPI-2.0 compliant. - -2001-03-20 Federico Di Gregorio <fog@debian.org> - - * cursor.c (_psyco_curs_execute): replaced some fields in - description with None, as suggested on the DB-SIG ML. - - * something like one hundred of little changes to allow cursors - share the same postgres connection. added connkeeper object and - pthread mutexes (both in connobject and connkeeper.) apparently it - works. this one will be 0.5.0, i think. - -2001-03-19 Michele Comitini <mcm@initd.net> - - * cursor.c: added mutexes, they do not interact well with python - threads :(. - -2001-03-16 Michele Comitini <mcm@initd.net> - - * ZPsycopgDA/db.py (ZDA): some fixes in table browsing. - -2001-03-16 Federico Di Gregorio <fog@debian.org> - - * suite/tables.postgresql (TABLE_DESCRIPTIONS): fixed some typos - introduced by copying by hand the type values from pg_type.h. - - * suite/*: added some (badly) structured code to test for - DBAPI-2.0 compliance. - - * cursor.c (pgconn_notice_callback): now the NOTICE processor only - prints NOTICEs when psycopg has been compiled with the - --enable-devel switch. - - * connection.c: removed 'autocommit' attribute, now is a method as - specified in the DBAPI-2.0 document. - -2001-03-15 Federico Di Gregorio <fog@debian.org> - - * connection.c (curs_commitall): splitted for cycle in two to - avoid the "bad snapshot" problem. - -2001-03-14 Federico Di Gregorio <fog@debian.org> - - * Release 0.4.6. - - * cursor.c (_psyco_curs_execute): fixed nasty bug, there was an - free(query) left from before the execute/callproc split. - - * Preparing for 0.4.6. - -2001-03-13 Federico Di Gregorio <fog@debian.org> - - * cursor.c (psyco_curs_execute): fixed some memory leaks in - argument parsing (the query string was not free()ed.) - (psyco_curs_callproc): implemented callproc() method on cursors. - (_psyco_curs_execute): this is the function that does the real - stuff for callproc() and execute(). - (pgconn_notice_*): added translation of notices into python - exceptions (do we really want that?) - - * configure.in: removed some cruft (old comments and strncasecmp() - check) - -2001-03-12 Federico Di Gregorio <fog@debian.org> - - * examples/thread_test.py: added moronic argument parsing: now you - can give the dsn string on the command line... :( - - * Release 0.4.5. - -2001-03-10 Federico Di Gregorio <fog@debian.org> - - * cursor.c (request_pgconn): added code to set datestyle to ISO on - new connections (many thanks to Yury <yura@vpcit.ru> for the code, - i changed it just a little bit to raise an exception on error.) - -2001-03-09 Federico Di Gregorio <fog@debian.org> - - * Release 0.4.4. - - * ZPsycopgDA/db.py: michele fixed a nasty bug here. - -2001-03-08 Federico Di Gregorio <fog@debian.org> - - * Release 0.4.3. - -2001-03-07 Federico Di Gregorio <fog@debian.org> - - * Makefile.pre.in (dist): typeobj_builtins.c included for people - without pg_type.h. if you encounter type-casting problems like - results cast to the wrong type, simply "rm typeobj_builtins.c" and - rebuild. - - * typeobj.c (psyco_*_cast): removed RETURNIFNULL() macro from all - the builtin casting functions. (psyco_STRING_cast) does not create - a new string anymore, simply Py_INCREF its argument and return it. - - * cursor.c (psyco_curs_fetchone): removed strdup() call. added - PQgetisnull() test to differentiate between real NULLs and empty - strings. - - * Removed cursor.py (mcm, put tests in examples) and fixed some - typos in the dtml code. - -2001-03-04 Michele Comitini <mcm@initd.net> - - * examples/commit_test.py: Modifications to test argument passing - and string substitution to cursor functions, nothing more. - - * ZPsycopgDA/db.py: now it exploits some of the good features of - the psycopg driver, such as connection reusage and type - comparison. Code is smaller although it handles (and - reports) errors much better. - - * cursor.c: corrected a bug that left a closed cursor in the - cursor list of the connection. Now cursors are removed from the - lists either when they are close or when they are destroyed. - Better connection (TCP) error reporting and handling. - - -2001-03-02 Federico Di Gregorio <fog@debian.org> - - * examples commit_test.py: added code to test autocommit. - - * examples/thread_test.py (ab_select): modified select thread to - test autocommit mode. - - * Release 0.4.1. - - * module.h, connection.c, cursor.c: added autocommit support. - -2001-02-28 Federico Di Gregorio <fog@debian.org> - - * Release 0.4. - -2001-02-27 Michele Comitini <mcm@initd.net> - - * cursor.py: cut some unuseful code in psyco_curs_fetchmany() and - psyco_curs_fetchall() inserted an assert in case someting goes - wrong. - -2001-02-27 Federico Di Gregorio <fog@debian.org> - - * debian/*: various changes to build both the python module and - the zope db adapter in different packages (respectively - python-psycopg and zope-psycopgda.) - - * examples/type_test.py: better and more modular tests. - - * typeobj.c: added DATE, TIME, DATETIME, BOOLEAN, BINARY and ROWID - types. (RETURNIFNULL) added NULL-test to builtin conversion - functions (using the RETURNIFNULL macro.) - -2001-02-26 Federico Di Gregorio <fog@debian.org> - - * releasing 0.3 (added NEWS file.) - -2001-02-26 Michele Comitini <mcm@initd.net> - - * cursor.c: fetchmany() some cleanup done. - - * ZPsycopgDA/db.py, ZPsycopgDA/__init__.py, : fixes to make the - ZDA work some way. WARNING WARNING WARNING the zda is still - alpha code, but we need some feed back on it so please give it - a try. - -2001-02-26 Federico Di Gregorio <fog@debian.org> - - * typeobj.c (psyco_STRING_cast): fixed bad bad bad bug. we - returned the string without coping it and the type-system was more - than happy to Py_DECREF() it and trash the whole system. fixed at - last! - - * module.h (Dprintf): added pid to every Dprintf() call, to - facilitate multi-threaded debug. - -2001-02-26 Michele Comitini <mcm@initd.net> - - * module.c: added code so that DateTime package need not to be - loaded to have mxDateTime. This should avoid clashing with - DateTime from the zope distribution. - - * cursor.c: setting error message in fetchmany when no more tuples - are left. This has to be fixed in fetch and fetchall to. - -2001-02-26 Federico Di Gregorio <fog@debian.org> - - * configure.in: stepped up version to 0.3, ready to release - tomorrow morning. added check for path to DateTime module. - - * examples/usercast_test.py: generate some random boxes and - points, select the boxes with at least one point inside and print - them converting the PostgeSQL output using a user-specified cast - object. nice. - -2001-02-24 Federico Di Gregorio <fog@debian.org> - - * cursor.c (psyco_curs_fetchone): now an error in the python - callback when typecasting results raise the correct exception. - - * typeobj.c (psyco_DBAPITypeObject_call): removed extra Py_INCREF(). - -2001-02-23 Federico Di Gregorio <fog@debian.org> - - * replaced every single instance of the string 'pgpy' with 'psyco' - (this was part of the general cleanup.) - - * type_test.py: added this little test program to the distribution - (use the new_type() method to create new instances of the type - objects.) - - * typeobj.c: general cleanup. fixed some bugs related to - refcounting (again!) - - * cursor.c: general cleanup. (request_pgconn) simplified by adding - a support function (_extract_pgconn.) - - * connection.c: general cleanup. replaced some ifs with asserts() - in utility functions when errors depend on programming errors and - not on runtime exceptions. (pgpy_conn_destroy) fixed little bug - when deleting available connections from the list. - - * module.h: general cleanup. - - * typeobj.h: general cleanup, better comments, made some function - declarations extern. - - * module.c: general cleanup, double-checked every function for - memory leaks. (pgpy_connect) removed unused variable 'connection'. - -2001-02-22 Federico Di Gregorio <fog@debian.org> - - * typeobj.c: fixed lots of bugs, added NUMBER type object. now the - basic tests in type_test.py work pretty well. - - * cursor.c (pgpy_curs_fetchmany): fixed little bug, fetchmany() - reported one less row than available. - - * fixed lots of bugs in typeobj.c, typeobj.h, cursor.c. apparently - now the type system works. it is time to clean up things a little - bit. - -2001-02-21 Federico Di Gregorio <fog@debian.org> - - * typeobj.c: separated type objects stuff from module.c - - * typeobj.h: separated type objects stuff from module.h - -2001-02-19 Federico Di Gregorio <fog@debian.org> - - * cursor.c (pgpy_curs_fetchmany): now check size and adjust it to - be lesser or equal than the nuber of available rows. - -2001-02-18 Michele Comitini <mcm@initd.net> - - * module.c, module.h: added optional args maxconn and minconn to - connection functions - - * cursor.c: better error checking in request_pgconn. - - * connection.c: changed new_connect_obj to take as optional args - maxconn and minconn. Added the corresponding ro attributes to - connection objects. - - * cursor.py: added some code to stress test cursor reusage. - - * cursor.c: some fixes on closed cursors. - - * connection.c: corrections on some assert calls. - -2001-02-16 Federico Di Gregorio <fog@debian.org> - - * configure.in: added --enable-priofile sqitch. changed VERSION to - 0.2: preparing for a new release. - - * cursor.c: added a couple of asserts. - -2001-02-16 Michele Comitini <mcm@initd.net> - - * cursor.c, connection.c: fixed the assert problem: assert must - take just the value to be tested! no assignemente must be done in - the argument of assert() otherwise is wiped when NDEBUG is set. - - * module.h: some syntax error fixed. Error in allocating a tuple - corrected in macro DBAPITypeObject_NEW(). - - * module.c: pgpy_DBAPITypeObject_init() is not declared static anymore. - - * cursor.c: executemany() now does not create and destroy tuples - for each list item, so it is much faster. - -2001-02-14 Michele Comitini <mcm@initd.net> - - * cursor.c: added again Py_DECREF on the cpcon after disposing - it. assert() with -DNDEBUG makes the driver segfault while it - should not. - - -2001-02-13 Federico Di Gregorio <fog@debian.org> - - * some of the memory leak were memprof errors, bleah. resumed some - old code, fixed segfault, fixed other bugs, improved speed. almost - ready for a new release. - - * connection.c (pgpy_conn_destroy): replaced some impossible ifs - with aseert()s. - - * cursor.c (pgpy_curs_close): added Py_DECREF() to - self->descritpion to prevent a memory leak after an execute(). - - * connection.c (pgpy_conn_destroy): always access first element of - lists inside for cycles because removing items from the list makes - higher indices invalid. - - * cursor.c (dispose_pgconn): fixed memory leak, there was a - missing Py_DECREF() after the addition of the C object wrapping - the postgresql connection to the list of available connections. - - * cursor.c (dispose_pgconn): fixed another memory leak: an - orphaned cursor should call PQfinish() on its postgresql - connection because it has no python connection to give the - postgresql ine back. - - * cursor.c (pgpy_curs_execute): added Py_DECREF() of description - tuple after adding it to self->description. this one fixes the - execute() memory leak. - - * cursor.c (pgpy_curs_fetchall): added missing Py_DECREF() on row - data (obtained from fetchone().) this fixes the last memory leak. - (thread_test.py now runs without leaking memory!) - -2001-02-12 Federico Di Gregorio <fog@debian.org> - - * INSTALL: removed wok cruft from head of this file. - - * debian/rules: debianized the sources. python-psycopg is about to - enter debian. mxDateTime header locally included until the - maintainer of python-mxdatetime includes them in his package - (where they do belong.) - - * autogen.sh: added option --dont-run-configure. - -2001-02-09 Federico Di Gregorio <fog@debian.org> - - * module.c (initpsycopg): changed name of init function to match - new module name (also changed all the exception definitions.) - - * README: updated psycopg description (we have a new name!) - - * Ready for 0.1 release. - -2001-02-07 Michele Comitini <mcm@initd.net> - - * cursor.c: now executemany takes sequences and not just - tuples - -2001-02-07 Federico Di Gregorio <fog@debian.org> - - * Makefile.pre.in: now dist target includes test programs - (thread_test.py) and README and INSTALL files. - - * configure.in: changed --with-devel to --enable-devel. little - cosmetical fixes to the option management. - - * connection.c, module.c, cursor.c, module.h: removed 'postgres/' - from #include directive. it is ./configure task to find the right - directory. - - * thread_test.py: added thread testing program. - -2001-02-07 Michele Comitini <mcm@initd.net> - - * cursor.c: added code to allow threads during PQexec() calls. - - * cursor.c: added begin_pgconn to rollback() and commit() - so that the cursror is not in autocommit mode. - - * cursor.c: added rollback() and commit() methods to cursor - objects. - - -2001-02-07 Federico Di Gregorio <fog@debian.org> - - * connection.c (pgpy_conn_destroy): always delete item at index - 0 and not i (because items shift in the list while deleting and - accessing items at len(list)/2 segfaults.) - -2001-02-07 Michele Comitini <mcm@initd.net> - - * connection.c: added some more checking to avoid - clearing of already cleared pgresults. Calling curs_closall() - in conn_destroy() since cursors have to live even without - their parent connection, otherwise explicit deletion of - object referencing to those cursors can cause arbitrary code - to be executed. - - * cursor.c: some more checking to avoid trying to close - already close pgconnections. - -2001-02-06 Federico Di Gregorio <fog@debian.org> - - * Makefile.pre.in (CFLAGS): added -Wall to catch bad programming - habits. - - * cursor.c, connection.c: lots of fixes to the destroy stuff. now - all the cursor are destroyed *before* the connection goes away. - - * cursor.c (request_pgconn): another idiot error done by not - replacing dsn with owner_conn->dsn. fixed. - (dispose_pgconn): commented if to guarantee that the connection is - returned to the pool of available connections. - - * merged changes done by mcm. - - * cursor.c: general cleanup and better debugging/error - messages. changed xxx_conn into xxx_pgconn where still - missing. some pretty big changes to the way pgconn_request() - allocates new connections. - - * connection.c: removed all 'register' integers. obsolete, gcc - does a much better job optimizing cycles than a programmer - specifying how to use registers. - - * module.h: some general cleanup and better definition of DPrintf - macro. now the DEBUG variable can be specified at configure time by - the --with-devel switch to ./configure. - -2001-02-02 Michele Comitini <mcm@initd.net> - - * cursor.c (Repository): Added functions for managing a connection - pool. Segfaults. - - * configure.in (Repository): removed check for mxdatetime headers. - -2001-01-24 Federico Di Gregorio <fog@debian.org> - - * first checkout from shinning new init.d cvs. - - * autotoolized build system. note that the mx headers are missing - from the cvs, you should get them someplace else (this is the - right way to do it, just require the headers in the configure - script.) - -2001-01-21 Michele Comitini <mcm@initd.net> - - * cursor.c (Repository): commit, abort, begin functions now check - the right exit status of the command. - - * connection.c (Repository): working commit() and rollback() - methods. - -2001-01-20 Michele Comitini <mcm@initd.net> - - * module.h (Repository): added member to cursor struct to handle - queries without output tuples. - - * cursor.c (Repository): new working methods: executemany, - fetchone, fetchmany, fetchall. - -2001-01-18 Michele Comitini <mcm@initd.net> - - * cursor.c (Repository): close working. destroy calling close. - close frees pg structures correctly. - - * connection.c (Repository): close method working. destroy seems - working. - -2001-01-17 Michele Comitini <mcm@initd.net> - - * cursor.c (Repository): now each python cursor has its own - connection. Each cursor works in a transaction block. - - * connection.c (Repository): added cursor list to connection - object - -2001-01-14 Michele Comitini <mcm@initd.net> - - * cursor.c (Repository): Beginning of code to implement cursor - functionalities as specified in DBA API 2.0, through the use of - transactions not cursors. - - * connection.c (Repository): Added some error checking code for pg - connection (will be moved to cursor?). - -2001-01-13 Michele Comitini <mcm@initd.net> - - * connection.c (Repository): Added error checking in connection - code to fail if connection to the db could not be opened. - - * module.h (Repository): New macro to help creating - DBAPITypeObjects. - - * module.c (Repository): DBAPITypeObject __cmp__ function is now - very simplified using recursion. - - * module.h (Repository): "DBAPIObject" changed to - "DBAPITypeObject". - - * module.c (Repository): Fixes for coerce function of DBAPIObjects - by Federico Di Gregorio <fog@initd.net>. - (Repository): Clean up and better naming for DBAPITypeObjects. - -2001-01-08 Michele Comitini <mcm@initd.net> - - * module.c (Repository): Corrected the exception hierarcy - - * connection.c (Repository): Begun to use the connection objects - of libpq - -2001-01-07 Michele Comitini <mcm@initd.net> - - * module.c (Repository): Added the Date/Time functions. - -2001-01-06 Michele Comitini <mcm@initd.net> - - * cursor.c (Repository): Skeleton of cursor interface. All - methods and attributes of cursor objects are now available - in python. They do nothing now. - -2001-01-05 Michele Comitini <mcm@initd.net> - - * module.c (Repository): Test version; module loaded with - exception defined. - -2001-01-05 Michele Comitini <mcm@initd.net> - - * Setup.in (Repository): Setup file. - - * Makefile.pre.in (Repository): from the python source. - -2001-01-05 Michele Comitini <mcm@initd.net> - - * module.c: Written some code for defining exceptions. - - * module.h: Static variable for exceptions. - -2001-01-04 Michele Comitini <mcm@initd.net> - - * Changelog: pre-release just a few prototypes to get started. - - diff --git a/lib/extras.py b/lib/extras.py index 33dd83d..c726626 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -449,13 +449,15 @@ class UUID_adapter(object): def __init__(self, uuid): self._uuid = uuid - def prepare(self, conn): - pass + def __conform__(self, proto): + if proto is _ext.ISQLQuote: + return self def getquoted(self): - return "'"+str(self._uuid)+"'::uuid" + return b("'%s'::uuid" % self._uuid) - __str__ = getquoted + def __str__(self): + return "'%s'::uuid" % self._uuid def register_uuid(oids=None, conn_or_curs=None): """Create the UUID type and an uuid.UUID adapter. @@ -514,8 +516,8 @@ class Inet(object): obj.prepare(self._conn) return obj.getquoted() + b("::inet") - def __conform__(self, foo): - if foo is _ext.ISQLQuote: + def __conform__(self, proto): + if proto is _ext.ISQLQuote: return self def __str__(self): diff --git a/scripts/ticket58.py b/sandbox/ticket58.py index 95520c1..95520c1 100644 --- a/scripts/ticket58.py +++ b/sandbox/ticket58.py @@ -77,7 +77,7 @@ except ImportError: # Take a look at http://www.python.org/dev/peps/pep-0386/ # for a consistent versioning pattern. -PSYCOPG_VERSION = '2.5' +PSYCOPG_VERSION = '2.6.dev0' version_flags = ['dt', 'dec'] diff --git a/tests/test_notify.py b/tests/test_notify.py index d048241..f838389 100755 --- a/tests/test_notify.py +++ b/tests/test_notify.py @@ -57,17 +57,18 @@ class NotifiesTests(ConnectingTestCase): script = ("""\ import time time.sleep(%(sec)s) -import psycopg2 -import psycopg2.extensions +import %(module)s as psycopg2 +import %(module)s.extensions as ext conn = psycopg2.connect(%(dsn)r) -conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) +conn.set_isolation_level(ext.ISOLATION_LEVEL_AUTOCOMMIT) print conn.get_backend_pid() curs = conn.cursor() curs.execute("NOTIFY " %(name)r %(payload)r) curs.close() conn.close() -""" - % { 'dsn': dsn, 'sec': sec, 'name': name, 'payload': payload}) +""" % { + 'module': psycopg2.__name__, + 'dsn': dsn, 'sec': sec, 'name': name, 'payload': payload}) return Popen([sys.executable, '-c', script_to_py3(script)], stdout=PIPE) |