commit python-PyMySQL for openSUSE:Factory
Hello community,
here is the log from the commit of package python-PyMySQL for openSUSE:Factory checked in at 2016-06-07 23:49:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyMySQL (Old)
and /work/SRC/openSUSE:Factory/.python-PyMySQL.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyMySQL"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyMySQL/python-PyMySQL.changes 2016-03-26 18:12:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-PyMySQL.new/python-PyMySQL.changes 2016-06-07 23:49:27.000000000 +0200
@@ -1,0 +2,17 @@
+Fri Jun 3 16:35:20 UTC 2016 - tbechtold@suse.com
+
+- update to 0.7.4:
+ * Fix AttributeError may happen while Connection.__del__ (#463)
+ * Fix SyntaxError in test_cursor. (#464)
+ * frozenset support for query value. (#461)
+ * Start using readthedocs.io
+ * Add read_timeout and write_timeout option.
+ * Support serialization customization by `conv` option.
+ * Unknown type is converted by `str()`, for MySQLdb compatibility.
+ * Support '%%' in `Cursor.executemany()`
+ * Support REPLACE statement in `Cursor.executemany()`
+ * Fix handling incomplete row caused by 'SHOW SLAVE HOSTS'.
+ * Fix decode error when use_unicode=False on PY3
+ * Fix port option in my.cnf file is ignored.
+
+-------------------------------------------------------------------
Old:
----
PyMySQL-0.7.2.tar.gz
New:
----
PyMySQL-0.7.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PyMySQL.spec ++++++
--- /var/tmp/diff_new_pack.EQ1hhO/_old 2016-06-07 23:49:28.000000000 +0200
+++ /var/tmp/diff_new_pack.EQ1hhO/_new 2016-06-07 23:49:28.000000000 +0200
@@ -17,13 +17,13 @@
Name: python-PyMySQL
-Version: 0.7.2
+Version: 0.7.4
Release: 0
Summary: Pure Python MySQL Driver
License: MIT
Group: Development/Languages/Python
Url: http://code.google.com/p/pymysql
-Source: https://pypi.python.org/packages/source/P/PyMySQL/PyMySQL-%{version}.tar.gz
+Source: https://pypi.io/packages/source/P/PyMySQL/PyMySQL-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ PyMySQL-0.7.2.tar.gz -> PyMySQL-0.7.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/CHANGELOG new/PyMySQL-0.7.4/CHANGELOG
--- old/PyMySQL-0.7.2/CHANGELOG 2016-02-24 11:38:43.000000000 +0100
+++ new/PyMySQL-0.7.4/CHANGELOG 2016-05-26 06:13:18.000000000 +0200
@@ -1,5 +1,28 @@
# Changes
+## 0.7.4
+
+Release date: 2016-05-26
+
+* Fix AttributeError may happen while Connection.__del__ (#463)
+* Fix SyntaxError in test_cursor. (#464)
+* frozenset support for query value. (#461)
+* Start using readthedocs.io
+
+## 0.7.3
+
+Release date: 2016-05-19
+
+* Add read_timeout and write_timeout option.
+* Support serialization customization by `conv` option.
+* Unknown type is converted by `str()`, for MySQLdb compatibility.
+* Support '%%' in `Cursor.executemany()`
+* Support REPLACE statement in `Cursor.executemany()`
+* Fix handling incomplete row caused by 'SHOW SLAVE HOSTS'.
+* Fix decode error when use_unicode=False on PY3
+* Fix port option in my.cnf file is ignored.
+
+
## 0.7.2
Release date: 2016-02-24
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/PKG-INFO new/PyMySQL-0.7.4/PKG-INFO
--- old/PyMySQL-0.7.2/PKG-INFO 2016-02-24 11:40:57.000000000 +0100
+++ new/PyMySQL-0.7.4/PKG-INFO 2016-05-26 06:14:55.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: PyMySQL
-Version: 0.7.2
+Version: 0.7.4
Summary: Pure Python MySQL Driver
Home-page: https://github.com/PyMySQL/PyMySQL/
Author: INADA Naoki
@@ -8,15 +8,14 @@
License: MIT
Description: UNKNOWN
Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Database
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/PyMySQL.egg-info/PKG-INFO new/PyMySQL-0.7.4/PyMySQL.egg-info/PKG-INFO
--- old/PyMySQL-0.7.2/PyMySQL.egg-info/PKG-INFO 2016-02-24 11:40:56.000000000 +0100
+++ new/PyMySQL-0.7.4/PyMySQL.egg-info/PKG-INFO 2016-05-26 06:14:54.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: PyMySQL
-Version: 0.7.2
+Version: 0.7.4
Summary: Pure Python MySQL Driver
Home-page: https://github.com/PyMySQL/PyMySQL/
Author: INADA Naoki
@@ -8,15 +8,14 @@
License: MIT
Description: UNKNOWN
Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Database
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/PyMySQL.egg-info/SOURCES.txt new/PyMySQL-0.7.4/PyMySQL.egg-info/SOURCES.txt
--- old/PyMySQL-0.7.2/PyMySQL.egg-info/SOURCES.txt 2016-02-24 11:40:57.000000000 +0100
+++ new/PyMySQL-0.7.4/PyMySQL.egg-info/SOURCES.txt 2016-05-26 06:14:55.000000000 +0200
@@ -10,7 +10,6 @@
PyMySQL.egg-info/PKG-INFO
PyMySQL.egg-info/SOURCES.txt
PyMySQL.egg-info/dependency_links.txt
-PyMySQL.egg-info/pbr.json
PyMySQL.egg-info/top_level.txt
pymysql/__init__.py
pymysql/_compat.py
@@ -39,7 +38,6 @@
pymysql/tests/test_connection.py
pymysql/tests/test_converters.py
pymysql/tests/test_cursor.py
-pymysql/tests/test_example.py
pymysql/tests/test_issues.py
pymysql/tests/test_load_local.py
pymysql/tests/test_nextset.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/PyMySQL.egg-info/pbr.json new/PyMySQL-0.7.4/PyMySQL.egg-info/pbr.json
--- old/PyMySQL-0.7.2/PyMySQL.egg-info/pbr.json 2015-02-25 10:09:23.000000000 +0100
+++ new/PyMySQL-0.7.4/PyMySQL.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-{"is_release": false, "git_version": "08bac52"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/README.rst new/PyMySQL-0.7.4/README.rst
--- old/PyMySQL-0.7.2/README.rst 2016-02-24 11:30:58.000000000 +0100
+++ new/PyMySQL-0.7.4/README.rst 2016-05-26 06:05:45.000000000 +0200
@@ -1,18 +1,30 @@
-=======
-PyMySQL
-=======
+.. image:: https://readthedocs.org/projects/pymysql/badge/?version=latest
+ :target: http://pymysql.readthedocs.io/en/latest/?badge=latest
+ :alt: Documentation Status
.. image:: https://travis-ci.org/PyMySQL/PyMySQL.svg?branch=master
- :target: https://travis-ci.org/PyMySQL/PyMySQL
+ :target: https://travis-ci.org/PyMySQL/PyMySQL
.. image:: https://coveralls.io/repos/PyMySQL/PyMySQL/badge.svg?branch=master&service=github
- :target: https://coveralls.io/github/PyMySQL/PyMySQL?branch=master
+ :target: https://coveralls.io/github/PyMySQL/PyMySQL?branch=master
+
+.. image:: https://img.shields.io/badge/license-MIT-blue.svg
+ :target: https://github.com/PyMySQL/PyMySQL/blob/master/LICENSE
+
+
+PyMySQL
+=======
.. contents::
This package contains a pure-Python MySQL client library. The goal of PyMySQL
is to be a drop-in replacement for MySQLdb and work on CPython, PyPy and IronPython.
+NOTE: PyMySQL doesn't support low level APIs `_mysql` provides like `data_seek`,
+`store_result`, and `use_result`. You should use high level APIs defined in PEP 294.
+But some APIs like `autocommit` and `ping` are supported because PEP 294 doesn't cover
+their usecase.
+
Requirements
-------------
@@ -42,38 +54,14 @@
$ pip install PyMySQL
-Alternatively (e.g. if ``pip`` is not available), a tarball can be downloaded
-from GitHub and installed with Setuptools::
- $ # X.X is the desired PyMySQL version (e.g. 0.5 or 0.6).
- $ curl -L https://github.com/PyMySQL/PyMySQL/tarball/pymysql-X.X | tar xz
- $ cd PyMySQL*
- $ python setup.py install
- $ # The folder PyMySQL* can be safely removed now.
-
-Test Suite
-----------
-
-If you would like to run the test suite, create database for test like this::
-
- mysql -e 'create database test_pymysql DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'
- mysql -e 'create database test_pymysql2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'
-
-Then, copy the file ``.travis.databases.json`` to ``pymysql/tests/databases.json``
-and edit the new file to match your MySQL configuration::
-
- $ cp .travis.databases.json pymysql/tests/databases.json
- $ $EDITOR pymysql/tests/databases.json
-
-To run all the tests, execute the script ``runtests.py``::
-
- $ python runtests.py
-
-A ``tox.ini`` file is also provided for conveniently running tests on multiple
-Python versions::
+Documentation
+-------------
- $ tox
+Documentation is available online: http://pymysql.readthedocs.io/
+For support, please refer to the `StackOverflow
+http://stackoverflow.com/questions/tagged/pymysql`_.
Example
-------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/pymysql/__init__.py new/PyMySQL-0.7.4/pymysql/__init__.py
--- old/PyMySQL-0.7.2/pymysql/__init__.py 2016-02-24 11:39:11.000000000 +0100
+++ new/PyMySQL-0.7.4/pymysql/__init__.py 2016-05-26 06:14:03.000000000 +0200
@@ -33,7 +33,7 @@
DateFromTicks, TimeFromTicks, TimestampFromTicks
-VERSION = (0, 7, 2, None)
+VERSION = (0, 7, 4, None)
threadsafety = 1
apilevel = "2.0"
paramstyle = "pyformat"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyMySQL-0.7.2/pymysql/connections.py new/PyMySQL-0.7.4/pymysql/connections.py
--- old/PyMySQL-0.7.2/pymysql/connections.py 2016-02-24 11:30:58.000000000 +0100
+++ new/PyMySQL-0.7.4/pymysql/connections.py 2016-05-26 06:05:45.000000000 +0200
@@ -18,8 +18,7 @@
from .charset import MBLENGTH, charset_by_name, charset_by_id
from .constants import CLIENT, COMMAND, FIELD_TYPE, SERVER_STATUS
-from .converters import (
- escape_item, encoders, decoders, escape_string, through)
+from .converters import escape_item, escape_string, through, conversions as _conv
from .cursors import Cursor
from .optionfile import Parser
from .util import byte2int, int2byte
@@ -523,19 +522,19 @@
connect().
"""
- socket = None
+ _sock = None
_auth_plugin_name = ''
def __init__(self, host=None, user=None, password="",
- database=None, port=3306, unix_socket=None,
+ database=None, port=0, unix_socket=None,
charset='', sql_mode=None,
- read_default_file=None, conv=decoders, use_unicode=None,
+ read_default_file=None, conv=None, use_unicode=None,
client_flag=0, cursorclass=Cursor, init_command=None,
connect_timeout=None, ssl=None, read_default_group=None,
compress=None, named_pipe=None, no_delay=None,
autocommit=False, db=None, passwd=None, local_infile=False,
max_allowed_packet=16*1024*1024, defer_connect=False,
- auth_plugin_map={}):
+ auth_plugin_map={}, read_timeout=None, write_timeout=None):
"""
Establish a connection to the MySQL database. Accepts several
arguments:
@@ -544,15 +543,16 @@
user: Username to log in as
password: Password to use.
database: Database to use, None to not use a particular one.
- port: MySQL port to use, default is usually OK.
+ port: MySQL port to use, default is usually OK. (default: 3306)
unix_socket: Optionally, you can use a unix socket rather than TCP/IP.
charset: Charset you want to use.
sql_mode: Default SQL_MODE to use.
read_default_file:
Specifies my.cnf file to read these parameters from under the [client] section.
conv:
- Decoders dictionary to use instead of the default one.
- This is used to provide custom marshalling of types. See converters.
+ Conversion dictionary to use instead of the default one.
+ This is used to provide custom marshalling and unmarshaling of types.
+ See converters.
use_unicode:
Whether or not to default to unicode strings.
This option defaults to true for Py3k.
@@ -635,11 +635,17 @@
charset = _config("default-character-set", charset)
self.host = host or "localhost"
- self.port = port
+ self.port = port or 3306
self.user = user or DEFAULT_USER
self.password = password or ""
self.db = database
self.unix_socket = unix_socket
+ if read_timeout is not None and read_timeout <= 0:
+ raise ValueError("read_timeout should be >= 0")
+ self._read_timeout = read_timeout
+ if write_timeout is not None and write_timeout <= 0:
+ raise ValueError("write_timeout should be >= 0")
+ self._write_timeout = write_timeout
if charset:
self.charset = charset
self.use_unicode = True
@@ -667,14 +673,17 @@
#: specified autocommit mode. None means use server default.
self.autocommit_mode = autocommit
- self.encoders = encoders # Need for MySQLdb compatibility.
- self.decoders = conv
+ if conv is None:
+ conv = _conv
+ # Need for MySQLdb compatibility.
+ self.encoders = dict([(k, v) for (k, v) in conv.items() if type(k) is not int])
+ self.decoders = dict([(k, v) for (k, v) in conv.items() if type(k) is int])
self.sql_mode = sql_mode
self.init_command = init_command
self.max_allowed_packet = max_allowed_packet
self._auth_plugin_map = auth_plugin_map
if defer_connect:
- self.socket = None
+ self._sock = None
else:
self.connect()
@@ -697,7 +706,7 @@
def close(self):
"""Send the quit message and close the socket"""
- if self.socket is None:
+ if self._sock is None:
raise err.Error("Already closed")
send_data = struct.pack('
participants (1)
-
root@hilbert.suse.de