Skip to content

Commit b06a87c

Browse files
authored
Merge branch 'master' into fix-mysql8-tests
2 parents 513695d + 71ea9f3 commit b06a87c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Changes
22
-------
33

4-
pending release
4+
To be included in 1.0.0 (unreleased)
55
^^^^^^^^^^^^^^^^^^^
66

7+
* Don't send sys.argv[0] as program_name to MySQL server by default #620
78
* Fix timed out MySQL 8.0 connections raising InternalError rather than OperationalError #660
89
* Fix timed out MySQL 8.0 connections being returned from Pool #660
910
* Ensure connections are properly closed before raising an OperationalError when the server connection is lost #660

aiomysql/connection.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def __init__(self, host="localhost", user=None, password="",
183183
when using IAM authentication with Amazon RDS.
184184
(default: Server Default)
185185
:param program_name: Program name string to provide when
186-
handshaking with MySQL. (default: sys.argv[0])
186+
handshaking with MySQL. (omitted by default)
187187
:param server_public_key: SHA256 authentication plugin public
188188
key value.
189189
:param loop: asyncio loop
@@ -237,8 +237,6 @@ def __init__(self, host="localhost", user=None, password="",
237237
}
238238
if program_name:
239239
self._connect_attrs["program_name"] = program_name
240-
elif sys.argv:
241-
self._connect_attrs["program_name"] = sys.argv[0]
242240

243241
self._unix_socket = unix_socket
244242
if charset:

docs/connection.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ Example::
8888
when using IAM authentication with Amazon RDS.
8989
(default: Server Default)
9090
:param program_name: Program name string to provide when
91-
handshaking with MySQL. (default: sys.argv[0])
91+
handshaking with MySQL. (omitted by default)
92+
93+
.. versionchanged:: 1.0
94+
``sys.argv[0]`` is no longer passed by default
9295
:param server_public_key: SHA256 authenticaiton plugin public key value.
9396
:param loop: asyncio event loop instance or ``None`` for default one.
9497
:returns: :class:`Connection` instance.

0 commit comments

Comments
 (0)