This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Missing "raise from None" in /Lib/xml/etree/ElementPath.py
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pablogsal, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2017-10-12 20:59 by pablogsal, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3978 merged pablogsal, 2017-10-12 21:02
Messages (2)
msg304288 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2017-10-12 20:59
Based on bpo-29762 (https://github.com/python/cpython/commit/5affd23e6f42125998724787025080a24839266e), 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

              raise SyntaxError("invalid path") from None
msg304462 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-16 08:24
New changeset 0df19055c92a0b0728659807978e4ca4d6c8e1bc by Serhiy Storchaka (Pablo Galindo) in branch 'master':
bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978)
https://github.com/python/cpython/commit/0df19055c92a0b0728659807978e4ca4d6c8e1bc
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 75957
2017-10-16 08:25:46serhiy.storchakasetstatus: open -> closed
type: behavior -> enhancement
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.7
2017-10-16 08:24:25serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg304462
2017-10-12 21:02:42pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request3953
2017-10-12 21:00:00pablogsalsettitle: Inconsistent exception chaining in /Lib/xml/etree/ElementPath.py -> Missing "raise from None" in /Lib/xml/etree/ElementPath.py
2017-10-12 20:59:28pablogsalcreate