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

expandvars removes single quotes ( ' ) #67930

Closed
manuelv mannequin opened this issue Mar 23, 2015 · 4 comments
Closed

expandvars removes single quotes ( ' ) #67930

manuelv mannequin opened this issue Mar 23, 2015 · 4 comments
Assignees
Labels
OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@manuelv
Copy link
Mannequin

manuelv mannequin commented Mar 23, 2015

BPO 23742
Nosy @tjguk, @bitdancer, @zware, @serhiy-storchaka, @zooba
Files
  • issue23742.patch
  • 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 2015-03-25.14:44:26.871>
    created_at = <Date 2015-03-23.01:35:37.433>
    labels = ['type-bug', 'library', 'OS-windows']
    title = "expandvars removes single quotes ( ' )"
    updated_at = <Date 2015-03-25.14:44:26.870>
    user = 'https://bugs.python.org/manuelv'

    bugs.python.org fields:

    activity = <Date 2015-03-25.14:44:26.870>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2015-03-25.14:44:26.871>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)', 'Windows']
    creation = <Date 2015-03-23.01:35:37.433>
    creator = 'manuel_v'
    dependencies = []
    files = ['38646']
    hgrepos = []
    issue_num = 23742
    keywords = ['patch']
    message_count = 4.0
    messages = ['238968', '238971', '238984', '239258']
    nosy_count = 7.0
    nosy_names = ['tim.golden', 'r.david.murray', 'python-dev', 'zach.ware', 'serhiy.storchaka', 'steve.dower', 'manuel_v']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue23742'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @manuelv
    Copy link
    Mannequin Author

    manuelv mannequin commented Mar 23, 2015

    When executing

    os.path.expandvars("%SystemDrive%\\Foo'Bar")

    the function erases the ' returning

    'C:\\FooBar'

    using Python 3.4.3 on Windows 7

    @manuelv manuelv mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Mar 23, 2015
    @bitdancer
    Copy link
    Member

    It apparently only loses unbalanced single quotes.

    @bitdancer bitdancer added OS-windows and removed stdlib Python modules in the Lib dir labels Mar 23, 2015
    @serhiy-storchaka
    Copy link
    Member

    Here is a patch.

    @serhiy-storchaka serhiy-storchaka added the stdlib Python modules in the Lib dir label Mar 23, 2015
    @serhiy-storchaka serhiy-storchaka self-assigned this Mar 23, 2015
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 25, 2015

    New changeset 9f4d2bdced9c by Serhiy Storchaka in branch '2.7':
    Issue bpo-23742: ntpath.expandvars() no longer loses unbalanced single quotes.
    https://hg.python.org/cpython/rev/9f4d2bdced9c

    New changeset 613c4bd1c29c by Serhiy Storchaka in branch '3.4':
    Issue bpo-23742: ntpath.expandvars() no longer loses unbalanced single quotes.
    https://hg.python.org/cpython/rev/613c4bd1c29c

    New changeset 16e6515c9476 by Serhiy Storchaka in branch 'default':
    Issue bpo-23742: ntpath.expandvars() no longer loses unbalanced single quotes.
    https://hg.python.org/cpython/rev/16e6515c9476

    @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
    OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants