From 162e9e4d84a4b6f2c8320347f2390a9e18af1b29 Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Tue, 25 Sep 2012 19:56:49 -0400 Subject: General cleanups --- .gitignore | 11 ++ MySQLdb/.cvsignore | 6 - MySQLdb/GPL-2.0 | 339 +++++++++++++++++++++++++++++++++++++++++++++ MySQLdb/MANIFEST.in | 26 ++-- MySQLdb/MySQLdb/.cvsignore | 1 - MySQLdb/doc/.cvsignore | 2 - MySQLdb/metadata.cfg | 4 +- MySQLdb/site.cfg | 2 +- README.rst | 47 +++++++ 9 files changed, 412 insertions(+), 26 deletions(-) create mode 100644 .gitignore delete mode 100644 MySQLdb/.cvsignore create mode 100644 MySQLdb/GPL-2.0 delete mode 100644 MySQLdb/MySQLdb/.cvsignore delete mode 100644 MySQLdb/doc/.cvsignore create mode 100644 README.rst diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..77d358c --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*.pyc +*.pyo +*.o +*.so +*.pyd +*.gz +*.zip +*.egg +*.egg-info/ +build/ +dist/ diff --git a/MySQLdb/.cvsignore b/MySQLdb/.cvsignore deleted file mode 100644 index d562f69..0000000 --- a/MySQLdb/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -dist -build -regress.py -test.py -PKG-INFO -*.pyc diff --git a/MySQLdb/GPL-2.0 b/MySQLdb/GPL-2.0 new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/MySQLdb/GPL-2.0 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. 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. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE 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. + + 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 +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 2 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, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision 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, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This 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. diff --git a/MySQLdb/MANIFEST.in b/MySQLdb/MANIFEST.in index 24165bc..4e9fa05 100644 --- a/MySQLdb/MANIFEST.in +++ b/MySQLdb/MANIFEST.in @@ -1,14 +1,12 @@ -recursive-include doc *.txt -recursive-include tests *.py -include MANIFEST.in -include MANIFEST -include ChangeLog -include HISTORY -include GPL -include pymemcompat.h -include metadata.cfg -include site.cfg -include distribute_setup.py -include setup_common.py -include setup_posix.py -include setup_windows.py +recursive-include doc *.txt +recursive-include tests *.py +include MANIFEST.in +include HISTORY +include GPL-2.0 +include pymemcompat.h +include metadata.cfg +include site.cfg +include distribute_setup.py +include setup_common.py +include setup_posix.py +include setup_windows.py diff --git a/MySQLdb/MySQLdb/.cvsignore b/MySQLdb/MySQLdb/.cvsignore deleted file mode 100644 index 0d20b64..0000000 --- a/MySQLdb/MySQLdb/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.pyc diff --git a/MySQLdb/doc/.cvsignore b/MySQLdb/doc/.cvsignore deleted file mode 100644 index 5367f6a..0000000 --- a/MySQLdb/doc/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.tex -*.html diff --git a/MySQLdb/metadata.cfg b/MySQLdb/metadata.cfg index 469b478..a8dd2e0 100644 --- a/MySQLdb/metadata.cfg +++ b/MySQLdb/metadata.cfg @@ -1,6 +1,6 @@ [metadata] -version: 1.2.3 -version_info: (1,2,3,'final',0) +version: 1.2.4b1 +version_info: (1,2,4,'beta',1) description: Python interface to MySQL long_description: ========================= diff --git a/MySQLdb/site.cfg b/MySQLdb/site.cfg index 2bceb2b..369c87e 100644 --- a/MySQLdb/site.cfg +++ b/MySQLdb/site.cfg @@ -14,4 +14,4 @@ static = False # http://stackoverflow.com/questions/1972259/mysql-python-install-problem-using-virtualenv-windows-pip # Windows connector libs for MySQL. You need a 32-bit connector for your 32-bit Python build. -connector = C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2 \ No newline at end of file +connector = C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2 diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..188c583 --- /dev/null +++ b/README.rst @@ -0,0 +1,47 @@ +This is the legacy (1.x) version of MySQLdb. While it is still being +maintained, there will not be a lot of new feature development. + +TODO +==== + +* A bugfix 1.2.4 release +* A 1.3.0 release that will support Python 2.7-3.3 + +The 2.0 version is being renamed moist and lives at +https://github.com/farcepest/moist + +Repository list +=============== + +MySQLdb-svn + This is the old Subversion repository located on SourceForge at + https://svn.code.sf.net/p/mysql-python/svn + (https://sourceforge.net/p/mysql-python/svn/) + It has all the early historical development of MySQLdb through 1.2.3, + and also is the working repository for ZMySQLDA. The trunk on this + repository was forked to create the MySQLdb2 repository. +MySQLdb1 + This is the new (active) git repository, located on: + + * SourceForge: git://git.code.sf.net/p/mysql-python/code + (https://sourceforge.net/p/mysql-python/code) + * GitHub: git://github.com/farcepest/MySQLdb1.git + (https://github.com/farcepest/MySQLdb1) + + I intend to keep these two in sync. + Only updates to the 1.x series will happen here. +MySQLdb2 + This is the now obsolete Mercurial repository for MySQLdb-2.0 + located on SourceForge at + http://hg.code.sf.net/p/mysql-python/mysqldb-2 + (https://sourceforge.net/p/mysql-python/mysqldb-2/) + SourceForge currently shows this as an "Empty Repository", but + it is looking for a default branch that doesn't exist. The only + working branch is MySQLdb. This repository is migrating to the + moist repository. +moist + This is a git repository located on github at + https://github.com/farcepest/moist It's actually empty as of + this writing, but it will soon contain the contents of the + MySQLdb2 repository. + -- cgit v1.2.1 From 048b70d90157d9526b89013b51b80afd70883292 Mon Sep 17 00:00:00 2001 From: farcepest Date: Wed, 26 Sep 2012 16:02:05 -0400 Subject: Fix MySQLdb1-1 Exception format incompatible with previous versions Unfortunately, when I broke this, I broke the test at the same time. That should have been a red flag. --- MySQLdb/MySQLdb/connections.py | 2 +- MySQLdb/tests/test_MySQLdb_capabilities.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index d281cbd..1d6fa82 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -33,7 +33,7 @@ def defaulterrorhandler(connection, cursor, errorclass, errorvalue): connection.messages.append(error) del cursor del connection - raise errorclass(errorvalue) + raise errorclass, errorvalue re_numeric_part = re.compile(r"^(\d+)") diff --git a/MySQLdb/tests/test_MySQLdb_capabilities.py b/MySQLdb/tests/test_MySQLdb_capabilities.py index 98a2371..a510468 100644 --- a/MySQLdb/tests/test_MySQLdb_capabilities.py +++ b/MySQLdb/tests/test_MySQLdb_capabilities.py @@ -77,8 +77,8 @@ class test_MySQLdb(capabilities.DatabaseTest): from MySQLdb.constants import ER try: self.cursor.execute("describe some_non_existent_table"); - except self.connection.ProgrammingError as msg: - self.assertTrue(msg.args[0].args[0] == ER.NO_SUCH_TABLE) + except self.connection.ProgrammingError, msg: + self.assertTrue(msg[0] == ER.NO_SUCH_TABLE) def test_bug_3514287(self): c = self.cursor -- cgit v1.2.1 From 5fda4c2579be93cafe571d27527815fbb17945c4 Mon Sep 17 00:00:00 2001 From: farcepest Date: Thu, 27 Sep 2012 12:06:58 -0400 Subject: Revert raise exc as value statements to raise exc, value since it breaks Python < 2.6. --- MySQLdb/MySQLdb/cursors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MySQLdb/MySQLdb/cursors.py b/MySQLdb/MySQLdb/cursors.py index 53960ae..50614f9 100644 --- a/MySQLdb/MySQLdb/cursors.py +++ b/MySQLdb/MySQLdb/cursors.py @@ -166,7 +166,7 @@ class BaseCursor(object): try: r = None r = self._query(query) - except TypeError as m: + except TypeError, m: if m.args[0] in ("not enough arguments for format string", "not all arguments converted"): self.messages.append((ProgrammingError, m.args[0])) @@ -217,7 +217,7 @@ class BaseCursor(object): qv = m.group(1) try: q = [ qv % db.literal(a) for a in args ] - except TypeError as msg: + except TypeError, msg: if msg.args[0] in ("not enough arguments for format string", "not all arguments converted"): self.errorhandler(self, ProgrammingError, msg.args[0]) -- cgit v1.2.1 From 235d8466ddd65b3b61f30d51d0bef0a7d13a10fe Mon Sep 17 00:00:00 2001 From: farcepest Date: Thu, 27 Sep 2012 12:18:07 -0400 Subject: History updates for 1.2.4b2 --- MySQLdb/HISTORY | 36 ++++++++++++++++++++++++++++++++++++ MySQLdb/metadata.cfg | 10 ++++------ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/MySQLdb/HISTORY b/MySQLdb/HISTORY index 4ca7e5a..eebac4a 100644 --- a/MySQLdb/HISTORY +++ b/MySQLdb/HISTORY @@ -1,3 +1,39 @@ +===================== + What's new in 1.2.4 +===================== + +beta 2 +====== + +Reverted an accidental change in the exception format. (issue #1) + +Reverted some raise statements so that they will continue to work with Python < 2.6 + + +beta 1 +====== + +A lot of work has been done towards Python 3 compatibility, and avoiding warnings with Python 2.7. +This includes import changes, converting dict.has_kay(k) to k in dict, updating some test suite methods, etc. + +Due to the difficulties of supporting Python 3 and Python < 2.7, 1.2.4 will support Python 2.4 though 2.7. +1.3.0 will support Python 3 and Python 2.7 and 2.6. + +MySQLdb-2.0 is instead going to become moist-1.0. See https://github.com/farcepest/moist + +The Windows build has been simplified, and I plan to correct pre-built i386 packages built +against the python.org Python-2.7 package and MySQL Connector/C-6.0. Contact me if you +need ia64 packages. + +The connection's cursorclass (if not default) was being lost on reconnect. + +Newer versions of MySQL don't use OpenSSL and therefore don't have HAVE_SSL defined, but they do have +a different SSL library. Fixed this so SSL support would be enabled in this case. + +The regex that looked for SQL INSERT statement and VALUES in cursor.executemany() was made case-insensitive +again. + + ===================== What's new in 1.2.3 ===================== diff --git a/MySQLdb/metadata.cfg b/MySQLdb/metadata.cfg index a8dd2e0..d36e69b 100644 --- a/MySQLdb/metadata.cfg +++ b/MySQLdb/metadata.cfg @@ -1,6 +1,6 @@ [metadata] -version: 1.2.4b1 -version_info: (1,2,4,'beta',1) +version: 1.2.4b2 +version_info: (1,2,4,'beta',2) description: Python interface to MySQL long_description: ========================= @@ -11,12 +11,10 @@ long_description: Python. The design goals are: \n - Compliance with Python database API version 2.0 [PEP-0249]_ - \n - Thread-safety - \n - Thread-friendliness (threads will not block each other) \n - MySQL-3.23 through 5.0 and Python-2.3 through 2.6 are currently + MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently supported. Python-3.0 will be supported in a future release. \n MySQLdb is `Free Software`_. @@ -25,7 +23,7 @@ long_description: .. _`Free Software`: http://www.gnu.org/ .. [PEP-0249] http://www.python.org/peps/pep-0249.html author: Andy Dustman -author_email: adustman@users.sourceforge.net +author_email: farcepest@gmail.com license: GPL platforms: ALL url: http://sourceforge.net/projects/mysql-python -- cgit v1.2.1 From d551f8a8d9c13b03f5ff3255804a5f20a97d93c7 Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Mon, 1 Oct 2012 13:05:25 -0400 Subject: Initial Travis setup --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2fc25ce --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: python +Python: + - "2.4" + - "2.5" + - "2.6" + - "2.7" +script: nosetests +before_script: + - mysql -e 'CREATE DATABASE test;' -- cgit v1.2.1 From 1936b93cf05497450a3d99819dab7a645c157299 Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Mon, 1 Oct 2012 13:14:38 -0400 Subject: Test connection tweaks for Travis --- .travis.yml | 2 -- MySQLdb/tests/test_MySQLdb_capabilities.py | 2 +- MySQLdb/tests/test_MySQLdb_dbapi20.py | 2 +- MySQLdb/tests/test_MySQLdb_nonstandard.py | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2fc25ce..fa36a94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,3 @@ Python: - "2.6" - "2.7" script: nosetests -before_script: - - mysql -e 'CREATE DATABASE test;' diff --git a/MySQLdb/tests/test_MySQLdb_capabilities.py b/MySQLdb/tests/test_MySQLdb_capabilities.py index a510468..c4b3a73 100644 --- a/MySQLdb/tests/test_MySQLdb_capabilities.py +++ b/MySQLdb/tests/test_MySQLdb_capabilities.py @@ -10,7 +10,7 @@ class test_MySQLdb(capabilities.DatabaseTest): db_module = MySQLdb connect_args = () - connect_kwargs = dict(db='test', host="127.0.0.1", user="test", #read_default_file='~/.my.cnf', + connect_kwargs = dict(db='test', host="127.0.0.1", user="root", charset='utf8', sql_mode="ANSI,STRICT_TRANS_TABLES,TRADITIONAL") create_table_extra = "ENGINE=INNODB CHARACTER SET UTF8" leak_test = False diff --git a/MySQLdb/tests/test_MySQLdb_dbapi20.py b/MySQLdb/tests/test_MySQLdb_dbapi20.py index 4f4527a..a8441bd 100644 --- a/MySQLdb/tests/test_MySQLdb_dbapi20.py +++ b/MySQLdb/tests/test_MySQLdb_dbapi20.py @@ -8,7 +8,7 @@ class test_MySQLdb(dbapi20.DatabaseAPI20Test): connect_args = () connect_kw_args = dict(db='test', host="127.0.0.1", - user="test", #read_default_file='~/.my.cnf', + user="root", charset='utf8', sql_mode="ANSI,STRICT_TRANS_TABLES,TRADITIONAL") diff --git a/MySQLdb/tests/test_MySQLdb_nonstandard.py b/MySQLdb/tests/test_MySQLdb_nonstandard.py index 150d013..b9b127e 100644 --- a/MySQLdb/tests/test_MySQLdb_nonstandard.py +++ b/MySQLdb/tests/test_MySQLdb_nonstandard.py @@ -44,7 +44,7 @@ class CoreAPI(unittest.TestCase): """Test _mysql interaction internals.""" def setUp(self): - self.conn = _mysql.connect(db='test', host='127.0.0.1', user='test') #read_default_file="~/.my.cnf") + self.conn = _mysql.connect(db='test', host='127.0.0.1', user='root') def tearDown(self): self.conn.close() -- cgit v1.2.1 From 8f593def7bf237126aec2b0b85685f271de911e9 Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Mon, 1 Oct 2012 13:19:39 -0400 Subject: Fix test script due to source being down one level. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fa36a94..31dd7c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,4 @@ Python: - "2.5" - "2.6" - "2.7" -script: nosetests +script: nosetests MySQLdb -- cgit v1.2.1 From 899c3342b221031c7fa174a506fbb0f71b68d6c0 Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Mon, 1 Oct 2012 13:28:14 -0400 Subject: More Travis fixes --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 31dd7c2..b6f0b85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: python -Python: +python: - "2.4" - "2.5" - "2.6" - "2.7" +install: pip install ./MySQLdb script: nosetests MySQLdb -- cgit v1.2.1 From 2f661f09913a2261203ca03720286828680235b1 Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Mon, 1 Oct 2012 13:31:40 -0400 Subject: OK, this should hopefully fix the build process for Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b6f0b85..c396533 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,5 @@ python: - "2.5" - "2.6" - "2.7" -install: pip install ./MySQLdb +install: cd MySQLdb && python setup.py install script: nosetests MySQLdb -- cgit v1.2.1 From fb346e1d40ec1861c7b9169d99e787ff4dc8b25f Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Mon, 1 Oct 2012 13:35:50 -0400 Subject: Travis can't build for Python 2.4 it seems, and the test still weren't all running --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c396533..45b7b55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: python python: - - "2.4" - "2.5" - "2.6" - "2.7" install: cd MySQLdb && python setup.py install -script: nosetests MySQLdb +script: cd MySQLdb && nosetests -- cgit v1.2.1 From f42c369300c856c2bbcc440cd68286bca7a93be8 Mon Sep 17 00:00:00 2001 From: Andy Dustman Date: Mon, 1 Oct 2012 13:43:00 -0400 Subject: Maybe a subshell will do the trick? --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45b7b55..d35257b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,5 @@ python: - "2.5" - "2.6" - "2.7" -install: cd MySQLdb && python setup.py install -script: cd MySQLdb && nosetests +install: (cd MySQLdb && python setup.py install) +script: (cd MySQLdb && nosetests) -- cgit v1.2.1