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

xmlrpc escaping breaks on unicode \u043c #59739

Closed
ddvoinikov mannequin opened this issue Aug 2, 2012 · 5 comments
Closed

xmlrpc escaping breaks on unicode \u043c #59739

ddvoinikov mannequin opened this issue Aug 2, 2012 · 5 comments
Labels
release-blocker stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@ddvoinikov
Copy link
Mannequin

ddvoinikov mannequin commented Aug 2, 2012

BPO 15534
Nosy @loewis, @pitrou, @vstinner, @florentx
Files
  • fastsearch.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 = None
    closed_at = <Date 2012-08-02.21:09:18.027>
    created_at = <Date 2012-08-02.09:06:37.098>
    labels = ['type-bug', 'library', 'release-blocker']
    title = 'xmlrpc escaping breaks on unicode \\u043c'
    updated_at = <Date 2012-08-02.21:10:37.346>
    user = 'https://bugs.python.org/ddvoinikov'

    bugs.python.org fields:

    activity = <Date 2012-08-02.21:10:37.346>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-08-02.21:09:18.027>
    closer = 'python-dev'
    components = ['Library (Lib)']
    creation = <Date 2012-08-02.09:06:37.098>
    creator = 'ddvoinikov'
    dependencies = []
    files = ['26661']
    hgrepos = []
    issue_num = 15534
    keywords = ['patch']
    message_count = 5.0
    messages = ['167199', '167210', '167211', '167254', '167255']
    nosy_count = 6.0
    nosy_names = ['loewis', 'pitrou', 'vstinner', 'ddvoinikov', 'flox', 'python-dev']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue15534'
    versions = ['Python 3.3']

    @ddvoinikov
    Copy link
    Mannequin Author

    ddvoinikov mannequin commented Aug 2, 2012

    For the following script
    ------------------------------------

    import xmlrpc.client; from xmlrpc.client import escape
    text = "...\u043c......<"
    print(escape(text))

    Python 3.3.0b1 produces
    ...ь..<...<
    whereas Python 3.2
    ...ь......<

    @ddvoinikov ddvoinikov mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 2, 2012
    @vstinner
    Copy link
    Member

    vstinner commented Aug 2, 2012

    Hum, it's a regression introduced by the super-optimized fastsearch. It is just a typo: _s => s. I renamed _s to ptr to avoid future confusion ;-)

    --

    For your information, str.find(), str.rfind(), str.index(), str.rindex() and str.replace() are now using memchr() and memrchr() to find a substring, even if the substring contains characters outside the ASCII (U+0000-U+007F) and latin1 ranges (U+0000-U+00FF). memchr() and memrchr() are much faster than a dummy C loop, even if there are false positive.

    @pitrou
    Copy link
    Member

    pitrou commented Aug 2, 2012

    Ow, nice find.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 2, 2012

    New changeset 0e95b61af859 by Victor Stinner in branch 'default':
    Close bpo-15534: Fix a typo in the fast search function of the string library (_s => s)
    http://hg.python.org/cpython/rev/0e95b61af859

    @python-dev python-dev mannequin closed this as completed Aug 2, 2012
    @vstinner
    Copy link
    Member

    vstinner commented Aug 2, 2012

    The issue should be fixed, thanks for the report!

    @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
    release-blocker 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