Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbm.open() encodes filename with default encoding rather than the filesystem encoding #77103

Closed
JoshFriend mannequin opened this issue Feb 23, 2018 · 8 comments
Closed
Assignees
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@JoshFriend
Copy link
Mannequin

JoshFriend mannequin commented Feb 23, 2018

BPO 32922
Nosy @arigo, @serhiy-storchaka, @miss-islington, @iritkatriel
PRs
  • bpo-32922: dbm.open() now encodes filename with the filesystem encoding. #5832
  • [3.7] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832) #5905
  • [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832). #5906
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2020-10-04.16:29:39.358>
    created_at = <Date 2018-02-23.15:11:08.664>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'dbm.open() encodes filename with default encoding rather than the filesystem encoding'
    updated_at = <Date 2020-10-04.16:29:39.357>
    user = 'https://bugs.python.org/JoshFriend'

    bugs.python.org fields:

    activity = <Date 2020-10-04.16:29:39.357>
    actor = 'Josh Friend'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2020-10-04.16:29:39.358>
    closer = 'Josh Friend'
    components = ['Library (Lib)']
    creation = <Date 2018-02-23.15:11:08.664>
    creator = 'Josh Friend'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32922
    keywords = ['patch']
    message_count = 8.0
    messages = ['312636', '312649', '312664', '312925', '312927', '312977', '377942', '377960']
    nosy_count = 5.0
    nosy_names = ['arigo', 'serhiy.storchaka', 'Josh Friend', 'miss-islington', 'iritkatriel']
    pr_nums = ['5832', '5905', '5906']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue32922'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @JoshFriend
    Copy link
    Mannequin Author

    JoshFriend mannequin commented Feb 23, 2018

    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

    @JoshFriend JoshFriend mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Feb 23, 2018
    @serhiy-storchaka serhiy-storchaka self-assigned this Feb 23, 2018
    @serhiy-storchaka
    Copy link
    Member

    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.

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life 3.8 (EOL) end of life labels Feb 23, 2018
    @arigo
    Copy link
    Mannequin

    arigo mannequin commented Feb 23, 2018

    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).

    @serhiy-storchaka
    Copy link
    Member

    New changeset 6f600ff by Serhiy Storchaka in branch 'master':
    bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832)
    6f600ff

    @miss-islington
    Copy link
    Contributor

    New changeset a9e0b07 by Miss Islington (bot) in branch '3.7':
    bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832)
    a9e0b07

    @serhiy-storchaka
    Copy link
    Member

    New changeset 5bf7485 by Serhiy Storchaka in branch '3.6':
    [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832). (GH-5906)
    5bf7485

    @iritkatriel
    Copy link
    Member

    This seems resolved, can it be closed?

    @JoshFriend
    Copy link
    Mannequin Author

    JoshFriend mannequin commented Oct 4, 2020

    yes it should be closed, can i do that? (ill try...)

    @JoshFriend JoshFriend mannequin closed this as completed Oct 4, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants