From 302c679b4cd0294aefeb2335198b66103516cce7 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Sun, 10 Jan 2016 14:38:52 +0900 Subject: [PATCH] bump version --- pymysql/__init__.py | 36 ++++++++++++++++-------------------- pymysql/connections.py | 1 - setup.cfg | 2 +- setup.py | 5 ++--- 4 files changed, 19 insertions(+), 25 deletions(-) diff --git a/pymysql/__init__.py b/pymysql/__init__.py index 1aa8fc7..778be6e 100644 --- a/pymysql/__init__.py +++ b/pymysql/__init__.py @@ -1,7 +1,7 @@ -''' +""" PyMySQL: A pure-Python MySQL client library. -Copyright (c) 2010, 2013 PyMySQL contributors +Copyright (c) 2010-2016 PyMySQL contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,12 +20,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" +import sys -''' - -VERSION = (0, 6, 7, None) - -from ._compat import text_type, JYTHON, IRONPYTHON, PY2 +from ._compat import PY2 from .constants import FIELD_TYPE from .converters import escape_dict, escape_sequence, escape_string from .err import Warning, Error, InterfaceError, DataError, \ @@ -34,16 +32,15 @@ from .err import Warning, Error, InterfaceError, DataError, \ from .times import Date, Time, Timestamp, \ DateFromTicks, TimeFromTicks, TimestampFromTicks -import sys - +VERSION = (0, 7, 0, None) threadsafety = 1 apilevel = "2.0" -paramstyle = "format" +paramstyle = "pyformat" + class DBAPISet(frozenset): - def __ne__(self, other): if isinstance(other, set): return frozenset.__ne__(self, other) @@ -73,15 +70,15 @@ TIMESTAMP = DBAPISet([FIELD_TYPE.TIMESTAMP, FIELD_TYPE.DATETIME]) DATETIME = TIMESTAMP ROWID = DBAPISet() + def Binary(x): """Return x as a binary type.""" - if isinstance(x, text_type) and not (JYTHON or IRONPYTHON): - x = x.encode() if PY2: return bytearray(x) else: return bytes(x) + def Connect(*args, **kwargs): """ Connect to the database; see connections.Connection.__init__() for @@ -92,11 +89,10 @@ def Connect(*args, **kwargs): from pymysql import connections as _orig_conn if _orig_conn.Connection.__init__.__doc__ is not None: - Connect.__doc__ = _orig_conn.Connection.__init__.__doc__ + (""" -See connections.Connection.__init__() for information about defaults. -""") + Connect.__doc__ = _orig_conn.Connection.__init__.__doc__ del _orig_conn + def get_client_info(): # for MySQLdb compatibility return '.'.join(map(str, VERSION)) @@ -110,7 +106,7 @@ NULL = "NULL" __version__ = get_client_info() def thread_safe(): - return True # match MySQLdb.thread_safe() + return True # match MySQLdb.thread_safe() def install_as_MySQLdb(): """ @@ -119,6 +115,7 @@ def install_as_MySQLdb(): """ sys.modules["MySQLdb"] = sys.modules["_mysql"] = sys.modules["pymysql"] + __all__ = [ 'BINARY', 'Binary', 'Connect', 'Connection', 'DATE', 'Date', 'Time', 'Timestamp', 'DateFromTicks', 'TimeFromTicks', 'TimestampFromTicks', @@ -131,6 +128,5 @@ __all__ = [ 'paramstyle', 'threadsafety', 'version_info', "install_as_MySQLdb", - - "NULL","__version__", - ] + "NULL", "__version__", +] diff --git a/pymysql/connections.py b/pymysql/connections.py index c9f0597..1571325 100644 --- a/pymysql/connections.py +++ b/pymysql/connections.py @@ -521,7 +521,6 @@ class Connection(object): The proper way to get an instance of this class is to call connect(). - """ socket = None diff --git a/setup.cfg b/setup.cfg index 992ddab..06be91c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,4 +4,4 @@ universal = 1 [flake8] ignore = E226,E301,E701 exclude = tests,build -max-line-length = 99 +max-line-length = 119 diff --git a/setup.py b/setup.py index 92873a1..0737159 100755 --- a/setup.py +++ b/setup.py @@ -16,12 +16,11 @@ setup( author_email='yutaka.matsubara@gmail.com', maintainer='INADA Naoki', maintainer_email='songofacandy@gmail.com', - description='Pure-Python MySQL Driver', + description='Pure Python MySQL Driver', license="MIT", packages=find_packages(), classifiers=[ 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', @@ -33,5 +32,5 @@ setup( 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Topic :: Database', - ] + ], )