This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Normalise file encodings in Lib/sqlite3/test/
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, erlendaasland, gvanrossum
Priority: normal Keywords: patch

Created on 2021-01-06 23:41 by erlendaasland, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24147 merged erlendaasland, 2021-01-07 00:14
Messages (5)
msg384543 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-01-06 23:41
GitHub does not play well with other file encodings than UTF-8. For example, when the "suggestion" in https://github.com/python/cpython/pull/20538#discussion_r552926126 was applied, GitHub silently converted Lib/sqlite3/test/types.py from ISO-8859 to UTF-8, as seen in the resulting commit fd4f65141925f2d84e0efd17ca4b9395c171d7ba. Apart from being annoying, this created an inconsistency between the `#-*- coding: iso-8859-1 -*-` header in Lib/sqlite3/test/types.py and its actual encoding (now UTF-8).

I suggest to convert Lib/sqlite3/test/* to UTF-8 encoding for consistency.

$ file Lib/sqlite3/test/*.py
Lib/sqlite3/test/backup.py:        Python script text executable, ASCII text
Lib/sqlite3/test/dbapi.py:         Python script text executable, ISO-8859 text
Lib/sqlite3/test/dump.py:          Python script text executable, ASCII text
Lib/sqlite3/test/factory.py:       Python script text executable, ISO-8859 text
Lib/sqlite3/test/hooks.py:         Python script text executable, ISO-8859 text
Lib/sqlite3/test/regression.py:    Python script text executable, ISO-8859 text
Lib/sqlite3/test/transactions.py:  Python script text executable, ISO-8859 text
Lib/sqlite3/test/types.py:         Python script text executable, ISO-8859 text
Lib/sqlite3/test/userfunctions.py: Python script text executable, UTF-8 Unicode text
msg384544 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-01-06 23:51
SGTM, the use of ISO-8859 is surely a legacy issue.
msg384545 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-01-06 23:52
Indeed it is. I'll create a PR as soon as GH-20538 is merged.
msg384548 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2021-01-07 00:36
New changeset deab1e54ff1695cdbe87f8db3d2c382d8e78330f by Erlend Egeberg Aasland in branch 'master':
bpo-42847: Normalise Lib/sqlite3/test/* file encodings (GH-24147)
https://github.com/python/cpython/commit/deab1e54ff1695cdbe87f8db3d2c382d8e78330f
msg384549 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2021-01-07 00:40
iso-8859-1 is still commonly used in some parts of Nordic countries, but I don't see a reason not to change it here :) Thank you, Erlend!
History
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 87013
2021-01-07 00:40:15berker.peksagsettype: enhancement
messages: + msg384549
components: + Tests, - Library (Lib)
2021-01-07 00:38:06erlendaaslandsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-01-07 00:36:50berker.peksagsetmessages: + msg384548
2021-01-07 00:14:35erlendaaslandsetkeywords: + patch
stage: patch review
pull_requests: + pull_request22975
2021-01-06 23:52:48erlendaaslandsetmessages: + msg384545
2021-01-06 23:51:00gvanrossumsetnosy: + gvanrossum
messages: + msg384544
2021-01-06 23:41:04erlendaaslandcreate