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

bpo-31776: Missing "raise from None" in /Lib/xml/etree/ElementPath.py #3978

Merged
merged 3 commits into from Oct 16, 2017

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Oct 12, 2017

Based on bpo-29762 (5affd23), there is an inconsistency on one exception chain in /Lib/xml/etree/ElementPath.py:

     try:
         selector.append(ops[token[0]](next, token))
     except StopIteration:
        raise SyntaxError("invalid path")

should be

     try:
         selector.append(ops[token[0]](next, token))
     except StopIteration:
        raise SyntaxError("invalid path") from None

https://bugs.python.org/issue31776

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Good catch!

But the original patch didn't have a NEWS entry, and I think it is not needed for this one.

@pablogsal
Copy link
Member Author

pablogsal commented Oct 15, 2017

I have deleted the NEWS entry.

This reverts commit bcb2a91.
@serhiy-storchaka serhiy-storchaka merged commit 0df1905 into python:master Oct 16, 2017
@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Oct 16, 2017

Thank you for your contribution @pablogsal.

@pablogsal pablogsal deleted the from_none branch Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants