On Jan 4, 5:29 pm, "Michael Bayer" <mike...@zzzcomputing.com> wrote: .. > > * Could you change the dialect name from 'myconnpy' to > > 'mysqlconnector' or something like that. 'MySQL' should be first in > > the name, as this is most 'official' thing the MySQL Team has done for > > Python. Would be great. 'myconnpy' is just the short tag on LaunchPad. > > renamed to "mysqlconnector" in r6613.
Thanks so much for this! I think that name will make it more clear what it is. There was additional myconnpy import in __init__.py, which I corrected in the patch below. > > * Checking the current trunk of SQLAlchemy, it's using a quite old > > version of MySQL Connector/Python. We've done some development > > releases lately, and there will be more. The bug mentioned, was fixed > > though! > > There were two bugs that were being worked around, and for some reason the > hyperlink in the source code were all for just one bug; additionally I > can't seem to find any of those bugs on the launchpad site which doesn't > seem to have any way to show "resolved" bugs, or they were removed, not > really sure. Anyway I've removed both workarounds in r6613 - using > cursor.lastrowid now, using dbapi.paramstyle as is without forcing to > positional. Feel free to try out trunk and run the unit tests, > specifying uri=mysql+mysqlconnector://user:n...@host/db ! Bugs should be kept on Launchpad, but lets see how we can make it work with the development release of MySQL Connector/Python. One change I did was _get_server_version_info(), see in patch below. I ran the tests, not sure how normal the number of errors is :) (Using MySQL Connector/Python 0.1.2-dev) shell> nosetests --dburi=mysql+mysqlconnector://root:@localhost/ sqlalchemy .. ---------------------------------------------------------------------- Ran 784 tests in 49.766s FAILED (errors=499, failures=2) Looking into a few. -Geert Index: lib/sqlalchemy/dialects/mysql/__init__.py =================================================================== --- lib/sqlalchemy/dialects/mysql/__init__.py (revision 6614) +++ lib/sqlalchemy/dialects/mysql/__init__.py (working copy) @@ -1,4 +1,4 @@ -from sqlalchemy.dialects.mysql import base, mysqldb, oursql, pyodbc, zxjdbc, myconnpy +from sqlalchemy.dialects.mysql import base, mysqldb, oursql, pyodbc, zxjdbc, mysqlconnector # default dialect base.dialect = mysqldb.dialect Index: lib/sqlalchemy/dialects/mysql/mysqlconnector.py =================================================================== --- lib/sqlalchemy/dialects/mysql/mysqlconnector.py (revision 6614) +++ lib/sqlalchemy/dialects/mysql/mysqlconnector.py (working copy) @@ -57,13 +57,7 @@ def _get_server_version_info(self, connection): dbapi_con = connection.connection - version = [] - r = re.compile('[.\-]') - for n in r.split(dbapi_con.get_server_version()): - try: - version.append(int(n)) - except ValueError: - version.append(n) + version = dbapi_con.get_server_version() return tuple(version) def _detect_charset(self, connection): -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.