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: dbm.open() encodes filename with default encoding rather than the filesystem encoding
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Josh Friend, arigo, iritkatriel, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-02-23 15:11 by Josh Friend, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5832 merged serhiy.storchaka, 2018-02-23 17:14
PR 5905 merged miss-islington, 2018-02-26 14:02
PR 5906 merged serhiy.storchaka, 2018-02-26 14:30
Messages (8)
msg312636 - (view) Author: Josh Friend (Josh Friend) Date: 2018-02-23 15:11
Armin Rigo from the PyPy project pointed this out to me: https://bitbucket.org/pypy/pypy/issues/2755/dbmopen-expects-a-str-for-filename-throws

This could probably lead to some weird behavior given the right filename
msg312649 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-02-23 17:18
PR 5832 fixes dbm.ndbm.open() and dbm.gdbm.open(). dbm.dumb.open() already used the filesystem encoding.

I don't think anything should be fixed in 2.7. Supporting Unicode filenames looks like a new feature.
msg312664 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2018-02-23 18:43
It's not a new feature.  See for example all functions from posixmodule.c: it should at least be PyArg_ParseTuple(args, "et", Py_FileSystemDefaultEncoding, &char_star_variable).
msg312925 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-02-26 14:02
New changeset 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e by Serhiy Storchaka in branch 'master':
bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832)
https://github.com/python/cpython/commit/6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e
msg312927 - (view) Author: miss-islington (miss-islington) Date: 2018-02-26 14:25
New changeset a9e0b070b3e36701d0139361c769d374c4aacf1a by Miss Islington (bot) in branch '3.7':
bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832)
https://github.com/python/cpython/commit/a9e0b070b3e36701d0139361c769d374c4aacf1a
msg312977 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-02-27 01:39
New changeset 5bf74859fe253f0e8ff73ba699cd1a7e2dfbcea3 by Serhiy Storchaka in branch '3.6':
[3.6] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832). (GH-5906)
https://github.com/python/cpython/commit/5bf74859fe253f0e8ff73ba699cd1a7e2dfbcea3
msg377942 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-10-04 14:35
This seems resolved, can it be closed?
msg377960 - (view) Author: Josh Friend (Josh Friend) Date: 2020-10-04 16:29
yes it should be closed, can i do that? (ill try...)
History
Date User Action Args
2022-04-11 14:58:58adminsetgithub: 77103
2020-10-04 16:29:39Josh Friendsetstatus: open -> closed

messages: + msg377960
stage: patch review -> resolved
2020-10-04 14:35:52iritkatrielsetnosy: + iritkatriel
messages: + msg377942
2018-02-27 01:39:55serhiy.storchakasetmessages: + msg312977
2018-02-26 14:30:48serhiy.storchakasetpull_requests: + pull_request5677
2018-02-26 14:25:42miss-islingtonsetnosy: + miss-islington
messages: + msg312927
2018-02-26 14:02:47miss-islingtonsetpull_requests: + pull_request5676
2018-02-26 14:02:30serhiy.storchakasetmessages: + msg312925
2018-02-23 18:43:22arigosetnosy: + arigo
messages: + msg312664
2018-02-23 17:18:05serhiy.storchakasetmessages: + msg312649
versions: + Python 3.7, Python 3.8, - Python 2.7
2018-02-23 17:14:01serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request5610
2018-02-23 17:09:49serhiy.storchakasetassignee: serhiy.storchaka
2018-02-23 15:20:47serhiy.storchakasetnosy: + serhiy.storchaka
2018-02-23 15:11:08Josh Friendcreate