-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify
"locale"
encoding when reading configuration file
Added ``encoding="locale"`` setting to the use of Python's ``ConfigParser.read()``, so that a warning is not generated when using the recently added Python feature ``PYTHONWARNDEFAULTENCODING`` specified in :pep:`597`. The encoding is passed as the ``"locale"`` string under Python 3.10 and greater, which indicates that the system-level locale should be used, as was the case already here. Pull request courtesy Kevin Kirsche. Fixes: #1273 Closes: #1274 Pull-request: #1274 Pull-request-sha: d0abd33 Change-Id: I75c1237ba8bd2e38890d0e5e4a578a6ca0b24883
- Loading branch information
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.. change:: | ||
:tags: bug, commands | ||
:tickets: 1273 | ||
|
||
Added ``encoding="locale"`` setting to the use of Python's | ||
``ConfigParser.read()``, so that a warning is not generated when using the | ||
recently added Python feature ``PYTHONWARNDEFAULTENCODING`` specified in | ||
:pep:`597`. The encoding is passed as the ``"locale"`` string under Python | ||
3.10 and greater, which indicates that the system-level locale should be | ||
used, as was the case already here. Pull request courtesy Kevin Kirsche. | ||
|