51 Commits

Author SHA1 Message Date
026e87f7b5 Remove py27 support from Python sources. (#394) 2019-11-28 22:04:42 +09:00
edeab3040d Use cp1252 for latin1 charset (#398) 2019-11-18 21:22:39 +09:00
acf4cdcf89 Add 'auth_plugin' option (#389) 2019-10-23 19:19:23 +09:00
b400acddd0 set charset before connect (#382) 2019-08-11 11:23:40 +09:00
e52812fd15 Improve docstring of use_unicode and charset options (#345) 2019-03-19 16:55:38 +09:00
1f6e18d345 Add some garbage for Django 1.11 compatibility (#327)
Django touched private area of this library.
Removing unused variables broke Django.

While Django 2.0 fixed it, Django 1.11 doesn't fix it
because it is in security-only fix mode.

So add unused variables for Django 1.11 compatibility.
They will be removed in next minor release.

Fix #303, #306
2019-02-07 18:05:40 +09:00
8ad1525c3f Raise ProgrammingError for nan and inf (#314)
* Raise ProgrammingError when inf or nan is passed
  Fixes #246
* Rename _mysql_exceptions -> _exceptions
2018-12-14 16:46:30 +09:00
0b6c6656f2 Refactoring JSON support (#312) 2018-12-13 17:40:37 +09:00
fe8032430c Reimplement JSON support (#310) 2018-12-13 12:41:53 +09:00
3bea8cd8dd Faster string and int decoder (#305) 2018-12-11 11:50:42 +09:00
5e8eeac47f Stop using surrogate escape (#302)
It was workaround for `bytes %`.
Since we dropped Python 3.4 support, we can use just `bytes %` now.
2018-12-07 02:39:33 +09:00
c2e5ff7bd3 Support utf8mb3 2018-12-04 22:25:57 +09:00
de44ff07e7 Remove waiter option 2018-12-04 20:59:16 +09:00
c64915b1e5 Remove context interface from Connector (#295) 2018-12-04 20:53:53 +09:00
0d7fcc269c Remove errorhandler (#294) 2018-12-04 20:36:04 +09:00
833816ee87 Move _mysql and _mysql_exceptions into MySQLdb/ (#293) 2018-12-04 20:19:04 +09:00
21170a7639 Deprecate waiter (#285) 2018-11-05 21:28:05 +09:00
07f4739d97 Spelling and grammar fixes 2018-05-15 22:04:10 +02:00
73ccdcdddf Fix decoding tiny/medium/long blobs (#215) 2017-12-14 17:30:29 +09:00
bab17ed504 remove extra parameter (#201)
This produced the error `TypeError: _tuple_literal() missing 1 required positional argument: 'd'` on line 316.
2017-09-02 01:39:41 +09:00
ca4317a6b5 Fix encoding tuple argument (#155)
Since Connections.encoders is broken by design.
Tuple and list is escaped directly in `Connection.literal()`.
Removed tuple and list from converters mapping.

Fixes #145
2017-08-30 18:49:02 +09:00
e39df07f29 Fix docstring for use_unicode type 2017-08-29 18:16:15 +09:00
8fcd2c5b7d Use surrogateescape normally on Python 3.6 2017-02-20 17:12:47 +09:00
118861f8cb deprecate Connection.__enter__ 2017-02-20 17:02:20 +09:00
cba486e043 Use _binary prefix for bytes/bytearray parameters (#140)
- Based on #106 but now disabled by default
- Can be enabled via 'binary_prefix' connection parameter
- Added unit tests to verify behaviour
2017-02-10 20:36:41 +09:00
490080ac79 Revert "Use _binary prefix for bytes/bytearray parameters" 2016-09-30 21:31:34 +09:00
2617620e27 Use _binary prefix for bytes/bytearray parameters (#106) 2016-09-11 19:55:34 +09:00
66029d6406 Support 'database' and 'password' kwargs 2016-06-28 17:36:57 +09:00
57dd34dc10 fixup 2016-05-11 18:21:49 +09:00
49e401b3bc Port executemany() implementation from PyMySQL 2016-05-11 12:35:00 +09:00
6ff138a597 faster surrogateescape 2016-01-12 01:17:01 +09:00
63a72f5861 connections.py use int not atoi
`atoi` is deprecated since python 2.0 and not in python 3. I guess this code is not being run since `_mysql.c` looks like it always defines `warning_count` anyway, but it should not sit around being python-3-incompatible.
2015-04-28 17:08:07 +01:00
a5716c33e4 Remove BaseCursor.__del__
Fixes #22 (Uncollectable cursor on Python 3.3)
2015-02-25 03:53:21 +09:00
739bc9325d fix. 2014-09-09 22:19:56 +09:00
7e15cf8617 Add waiter to MySQLdb.Connection. 2014-07-03 20:52:53 +09:00
b881072414 Remove unused import 2014-04-18 23:26:39 +09:00
e7545c7c40 refactoring. 2014-04-18 23:25:01 +09:00
312f46d6ca use_unicode=True by default on Python 3. 2014-04-18 12:17:34 +09:00
f188e0f9e4 Fix some tests. 2014-04-18 11:29:10 +09:00
c66b43cc22 Connection.literal() always returns str instance. 2014-04-17 22:36:01 +09:00
9440a0d4df Handle types in a Python 3 friendly way 2014-04-16 14:31:10 -07:00
b9aa0530a8 Improved support for Python 3. 2014-01-09 18:03:53 +01:00
2204283605 Remove unused variable. 2013-10-02 02:17:48 +09:00
3dbf035fa5 More precise get_autocommit based on server_status. 2013-10-02 02:10:02 +09:00
f064692a36 'BEGIN' on __enter__ if autocommit is enabled. 2013-05-22 22:33:20 +09:00
470eb56c4d Fix typo. 2013-05-21 13:32:23 +09:00
c1b8e8a047 autocommit=None means using server default. 2013-05-21 12:09:55 +09:00
797d9c3029 Support autocommit=True for constructor argument. 2013-01-05 09:34:59 +09:00
52894fd137 remove unused lines. 2013-01-05 09:19:43 +09:00
7d4993a53c Workaround for recommended MySQL 5.5 utf8mb4 character set, which is not recognized by Python yet. 2012-10-05 14:01:51 -04:00