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

Make the dict type used in csv.DictReader configurable #76520

Closed
serhiy-storchaka opened this issue Dec 15, 2017 · 3 comments
Closed

Make the dict type used in csv.DictReader configurable #76520

serhiy-storchaka opened this issue Dec 15, 2017 · 3 comments
Labels
3.7 (EOL) end of life easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 32339
Nosy @rhettinger, @serhiy-storchaka, @aisk
PRs
  • bpo-32339: Make csv.DictReader returning regular dict instead of OrderedDict. #4904
  • 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 = None
    closed_at = None
    created_at = <Date 2017-12-15.19:00:53.576>
    labels = ['3.7', 'easy', 'type-feature', 'library']
    title = 'Make the dict type used in csv.DictReader configurable'
    updated_at = <Date 2021-12-17.11:07:10.801>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-12-17.11:07:10.801>
    actor = 'asaka'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2017-12-15.19:00:53.576>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32339
    keywords = ['patch', 'easy']
    message_count = 3.0
    messages = ['308420', '308434', '408771']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'serhiy.storchaka', 'asaka']
    pr_nums = ['4904']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue32339'
    versions = ['Python 3.7']

    @serhiy-storchaka
    Copy link
    Member Author

    Since 3.6 csv.DictReader emits OrderedDicts instead of regular dicts. Since regular dicts are ordered in 3.7, this is an overkill. It would be nice to add a configuration option for a return type.

    This is an easy issue.

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life stdlib Python modules in the Lib dir easy type-feature A feature request or enhancement labels Dec 15, 2017
    @rhettinger
    Copy link
    Contributor

    For csv.DictReader and collections.namedtuple._asdict, it might be cleaner to just deprecate the OrderedDict in favor of returning regular dict. I suspect that in these contexts, no one really wants an actual OrderedDict.

    @aisk
    Copy link
    Mannequin

    aisk mannequin commented Dec 17, 2021

    As #4904 is closed now, I think this issue should be closed now?

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @merwok merwok closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 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 easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    Status: Done
    Development

    No branches or pull requests

    3 participants