Commit Graph

31 Commits

Author SHA1 Message Date
1d03be3483 TLS fixes for C/C 3.4.x
- Always set/unset peer certificate verification flag
- Return None (instead of raising an exception) for tls connection
  properties if TLS is not in use
- bumped version number to 1.1.11
2024-09-16 10:13:38 +02:00
d8b337d4ee correct documentation typo CURSOR_TYPE -> CURSOR
There is no CURSOR_TYPE, only CURSOR.
2023-06-30 12:30:36 +10:00
7daab2feb5 Fix for CONPY-245:
Instead of iterating through all connections and checking the health
status via ping, used and unused connections were separated in different
lists. This ensures that the last used connection will be always the first.
2023-02-01 09:33:54 +01:00
1d700addae Fix for CONPY-226:
Replaced deprecated call to distutils.version.StrictVersion by
packaging.version.Version
2022-10-09 15:05:31 +02:00
d18a2405c6 Fix for CONPY-220:
Added _get_socket method (for internal use only)
2022-08-17 14:45:46 +02:00
71614ab159 Merge branch '1.1-status' into 1.1 2022-08-09 16:09:22 +02:00
cdd42743cc Coding style fixes (PEP8)
Fixed various coding style stuff detected by flake8.
Added .pre-commit-config.yaml:
With command pre_commit install a hook for flake8 will be
installed.
2022-08-07 16:47:26 +02:00
a9ad1fcaee First implementation for status callback 2022-08-05 14:41:43 +02:00
17d5aed2dc CONPY-217:
Add reconnect keyword for connection.
2022-07-18 13:55:39 +02:00
d2f9780965 typos 2022-06-22 16:22:27 -05:00
ad4937dc96 Changed error message for closed connection
Since SQLALchemy test suite checks for the word
'Invalid' we changed the error message for closed
connections back to "Invalid connection or not connected"
2022-06-07 08:37:48 +02:00
30c8f33b08 CONPY-205: Inconsistent exceptions
- All parameter exceptions are now ProgrammingErrors
- A dictionary now might contain more keys than
  placeholders in statement
- Fixed unhandled exception when using dictionary as parameter
2022-05-25 18:47:03 +02:00
48aea2f27c Docu fxes 2022-04-05 16:54:37 +02:00
63c82019ab Check if client lib supports multi hosts
Since MariaDB Connector/C 3.3.0 host parameter may contain multiple hosts,
separated by a comma for simple failover. If MariaDB Connector/Python uses
a MariaDB Connector/C library < 3.3.0 an exception will be raised if host
parameter contains a comma.
2022-01-23 20:40:59 +01:00
811cc1c5f7 Check if object was closed:
When accessing methods or properties of connection and cursor objects
we now check if the object or parent object was closed and raise an
exception.
2022-01-16 20:59:58 +01:00
aaba6e2e11 Fix for CONPY-187:
For detecting server bulk capabilities extended server capabitilies
(instead of standard capabilities) have to be checked.

Kudos to Diego Dupin
2021-12-19 19:52:14 +01:00
263f428213 CONPY-184
Display status of connection, cursor and pool class in
string representation.

If an object (cursor, class, connection pool) was closed, the
string representation (tp_repr) now shows the status of the object.

Example:

>>> import mariadb
>>> connection=mariadb.connect()
>>> connection
<mariadb.connection connected to 'localhost' at 0x7f94d77c3b40>
>>> connection.close()
>>> connection
<mariadb.connection (closed) at 0x7f94d77c3b40>
2021-12-13 05:55:10 +01:00
aa6edc38cb Updated documentation 2021-08-21 18:09:48 +02:00
18b81fd282 Documentation fixes 2021-08-18 07:19:48 +02:00
6bbe0260a7 Moved MemberDef properties
Mostly all properties moved to Python code
2021-08-16 10:08:15 +02:00
9ac0551ed1 Default mode for cursor changed:
Due to several incompatibilites (but also MDEV-23768, where errors
can't be triggered in unbuffered) we decided to switch the default
mode for cursor class for buffered from False to True.
2021-08-05 08:32:20 +02:00
47ca11d921 Documentation update 2021-08-01 10:31:10 +02:00
ebb09cf56e Documentation 2021-07-28 06:55:10 +02:00
5a81686f4c Documentation work 2021-07-26 06:54:38 +02:00
6c6e1005eb remove commit/rollback from c code 2021-07-23 11:07:43 +02:00
ea97f66769 connection class:
moved kill method to python class
2021-07-22 16:06:27 +02:00
5870f5d4d7 cursor:
added keyword quote_sequences (default=true)

connection:

moved tpc functions to native python
moved autocommit to native python
2021-07-22 14:15:53 +02:00
2bd40ca1de Test fixes 2021-07-18 18:16:38 +02:00
84df56ce40 connection and cursor class are now written in
native python
2021-07-12 09:46:05 +02:00
27730cd018 Moved more methods and propertys from C to Python code 2021-03-21 22:44:42 +01:00
aa65cc853a Exchanged C written connection pool class by native python class. 2021-01-18 06:11:03 +01:00