Skip to content

Commit 0dffe48

Browse files
committed
compress -> compression_algorithm
1 parent 57fcd8e commit 0dffe48

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cymysql/connections.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def __init__(self, host="localhost", user=None, passwd="",
117117
read_default_file=None,
118118
client_flag=0, cursorclass=None, init_command=None,
119119
connect_timeout=None, ssl=None, read_default_group=None,
120-
compress="", zstd_compression_level=3, named_pipe=None,
120+
compression_algorithm="", zstd_compression_level=3, named_pipe=None,
121121
conv=decoders, encoders=encoders):
122122
"""
123123
Establish a connection to the MySQL database. Accepts several
@@ -139,7 +139,7 @@ def __init__(self, host="localhost", user=None, passwd="",
139139
connect_timeout: Timeout before throwing an exception when connecting.
140140
ssl: A dict of arguments similar to mysql_ssl_set()'s parameters. For now the capath and cipher arguments are not supported.
141141
read_default_group: Group to read from in the configuration file.
142-
compress: Compression algorithm ("zlib" or "zstd").
142+
compression_algorithm: Compression algorithm ("zlib" or "zstd").
143143
zstd_compression_level: zstd compression leve (1-22), default is 3.
144144
named_pipe: Not supported
145145
"""
@@ -149,10 +149,10 @@ def __init__(self, host="localhost", user=None, passwd="",
149149
if ssl and ('capath' in ssl or 'cipher' in ssl):
150150
raise NotImplementedError('ssl options capath and cipher are not supported')
151151

152-
if compress and compress not in ("zlib", "zstd"):
153-
raise NotImplementedError('compress argument can set zlib or zstd')
152+
if compression_algorithm and compression_algorithm not in ("zlib", "zstd"):
153+
raise NotImplementedError('compression_algorithm argument can set zlib or zstd')
154154

155-
self.compress = compress
155+
self.compress = compression_algorithm
156156
self.zstd_compression_level = zstd_compression_level
157157
self.socket = None
158158
self.ssl = False

0 commit comments

Comments
 (0)