Skip to content

Commit

Permalink
Fixes sqlalchemy#1273: Use "utf-8" encoding when reading conf file
Browse files Browse the repository at this point in the history
Fix sqlalchemy#1273

This merge request explicitly sets the encoding of the configuration file being read to "utf-8" as recommended by https://docs.python.org/3/library/io.html#opt-in-encodingwarning
  • Loading branch information
kkirsche authored and Kevin Kirsche committed Jul 14, 2023
1 parent 88db76e commit 0c6975e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alembic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def file_config(self):
self.config_args["here"] = here
file_config = ConfigParser(self.config_args)
if self.config_file_name:
file_config.read([self.config_file_name])
file_config.read([self.config_file_name], "utf-8")
else:
file_config.add_section(self.config_ini_section)
return file_config
Expand Down

0 comments on commit 0c6975e

Please sign in to comment.