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

ConfigParser has_option case sensitive #36658

Closed
knet mannequin opened this issue May 29, 2002 · 2 comments
Closed

ConfigParser has_option case sensitive #36658

knet mannequin opened this issue May 29, 2002 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@knet
Copy link
Mannequin

knet mannequin commented May 29, 2002

BPO 561822
Nosy @freddrake
Files
  • ConfigParser.patch: Patch for python 2.2's ConfigParser.py
  • 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/freddrake'
    closed_at = <Date 2002-09-27.15:35:47.000>
    created_at = <Date 2002-05-29.07:01:40.000>
    labels = ['library']
    title = 'ConfigParser has_option case sensitive'
    updated_at = <Date 2002-09-27.15:35:47.000>
    user = 'https://bugs.python.org/knet'

    bugs.python.org fields:

    activity = <Date 2002-09-27.15:35:47.000>
    actor = 'fdrake'
    assignee = 'fdrake'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2002-05-29.07:01:40.000>
    creator = 'knet'
    dependencies = []
    files = ['496']
    hgrepos = []
    issue_num = 561822
    keywords = []
    message_count = 2.0
    messages = ['10948', '10949']
    nosy_count = 2.0
    nosy_names = ['fdrake', 'knet']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue561822'
    versions = []

    @knet
    Copy link
    Mannequin Author

    knet mannequin commented May 29, 2002

    In python 2.x ConfigParser.py has_option has the
    following case-sensitive code:

    	if not section or section == "DEFAULT":
    		return self.__defaults.has_key(option)

    whereas the rest of the module uses option.lower().
    This means the DEFAULT section is case-sensitive but
    other sections are not.

    Attached is a patch to fix the problem in Python 2.2.

    @knet knet mannequin closed this as completed May 29, 2002
    @knet knet mannequin assigned freddrake May 29, 2002
    @knet knet mannequin added the stdlib Python modules in the Lib dir label May 29, 2002
    @knet knet mannequin closed this as completed May 29, 2002
    @knet knet mannequin assigned freddrake May 29, 2002
    @knet knet mannequin added the stdlib Python modules in the Lib dir label May 29, 2002
    @freddrake
    Copy link
    Member

    Logged In: YES
    user_id=3066

    Fixed in Lib/ConfigParser.py 1.38.10.2 + 1.38.10.3 and 1.45.
    Added regression test in Lib/test/test_cfgparser.py
    1.9.10.2 and 1.13.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant