Skip to content

Commit f3e40e1

Browse files
remove default charset encoding spec to allow system spec
1 parent d8e2eba commit f3e40e1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

datajoint/connection.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ def connect(self):
9292
"""
9393
with warnings.catch_warnings():
9494
warnings.filterwarnings('ignore', '.*deprecated.*')
95-
self._conn = client.connect(init_command=self.init_fun,
96-
sql_mode="NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,"
97-
"STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION",
98-
charset=config['connection.charset'],
99-
**self.conn_info)
95+
self._conn = client.connect(
96+
init_command=self.init_fun,
97+
sql_mode="NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,"
98+
"STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION",
99+
charset=config['connection.charset'],
100+
**self.conn_info)
100101

101102
def register(self, schema):
102103
self.schemas[schema.database] = schema

datajoint/schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ def repl(s):
140140
for k, v in module_lookup.items()),
141141
body))
142142

143-
144143
def spawn_missing_classes(self):
145144
"""
146145
Creates the appropriate python user relation classes from tables in the database and places them

datajoint/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
'database.user': None,
3434
'database.port': 3306,
3535
'connection.init_function': None,
36-
'connection.charset': 'utf8',
36+
'connection.charset': '', # pymysql uses '' as default
3737
'database.reconnect': False,
3838
'loglevel': 'INFO',
3939
'safemode': True,

0 commit comments

Comments
 (0)