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 BasicInterpolation issue with %() #71215

Closed
timonti mannequin opened this issue May 15, 2016 · 2 comments
Closed

configparser BasicInterpolation issue with %() #71215

timonti mannequin opened this issue May 15, 2016 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@timonti
Copy link
Mannequin

timonti mannequin commented May 15, 2016

BPO 27028
Nosy @bitdancer
Files
  • bg.py: Source Code for reading INI file
  • 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 = <Date 2016-05-15.15:45:49.811>
    created_at = <Date 2016-05-15.15:00:49.071>
    labels = ['invalid', 'type-bug', 'library']
    title = 'configparser BasicInterpolation issue with %()'
    updated_at = <Date 2016-05-15.15:45:49.809>
    user = 'https://bugs.python.org/timonti'

    bugs.python.org fields:

    activity = <Date 2016-05-15.15:45:49.809>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-05-15.15:45:49.811>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2016-05-15.15:00:49.071>
    creator = 'timonti'
    dependencies = []
    files = ['42859']
    hgrepos = []
    issue_num = 27028
    keywords = []
    message_count = 2.0
    messages = ['265617', '265623']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'timonti']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27028'
    versions = ['Python 3.5']

    @timonti
    Copy link
    Mannequin Author

    timonti mannequin commented May 15, 2016

    The below code works fine with ExtendedInterpolation; however with BasicInterpolation it _url fails with invalid variable reference.

    The INI file:
    [DEFAULT]
    domain=abc.labs.com

    [machine-details]
    compilation_machine=abc1
    compilation_machine_url=%(compilation_machine).%(domain)
    compilation_machine_url2=${compilation_machine}.${domain}

    Python Version:
    Python 3.5.1

    Environment:
    Arch Linux

    @timonti timonti mannequin added build The build process and cross-build stdlib Python modules in the Lib dir labels May 15, 2016
    @bitdancer
    Copy link
    Member

    You are missing the trailing 's' on the format string.

    @bitdancer bitdancer changed the title BasicInterpolation issue with %() configparser BasicInterpolation issue with %() May 15, 2016
    @bitdancer bitdancer added invalid type-bug An unexpected behavior, bug, or error and removed build The build process and cross-build labels May 15, 2016
    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant