Issue 17011: ElementPath ignores different namespace mappings for the same path expression (original) (raw)
Issue17011
Created on 2013-01-22 07:16 by scoder, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg180366 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2013-01-22 07:16 |
There's a bug originally report for lxml that also applies to ElementTree: https://github.com/lxml/lxml/issues/95 Passing different namespace mappings into the Element.find*() methods will always reuse the first one due to incorrect caching based only on the literal path, not all parameters. My fix is here: https://github.com/lxml/lxml/commit/8bafbdc13ffb4fb8436eda01594780aac4735528 The lookup performance regression when a namespace mapping is passed (sorting etc.) is acceptable as most use cases won't pass any namespaces anyway, so this is a problem that rarely shows in practice. | ||
msg180367 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2013-01-22 07:25 |
Here is a test case (for lxml): https://github.com/lxml/lxml/commit/76f2ee991afd15d4f8c98cee3e095967bbf9937f | ||
msg194316 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2013-08-04 00:49 |
New changeset 854ded9135c2 by Eli Bendersky in branch '3.3': Issue #17011: Fix caching of xpath path when namespaces are present. http://hg.python.org/cpython/rev/854ded9135c2 New changeset ce0be0d03c0a by Eli Bendersky in branch 'default': Merge fix for Issue #17011 from 3.3 http://hg.python.org/cpython/rev/ce0be0d03c0a | ||
msg194317 - (view) | Author: Eli Bendersky (eli.bendersky) * ![]() |
Date: 2013-08-04 00:49 |
Fixed. Thanks! |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:40 | admin | set | github: 61213 |
2013-12-06 17:39:19 | eric.araujo | set | resolution: duplicate -> fixed |
2013-12-06 17:39:08 | eric.araujo | set | resolution: fixed -> duplicate |
2013-08-04 00:49:28 | eli.bendersky | set | status: open -> closedresolution: fixedmessages: + stage: resolved |
2013-08-04 00:49:02 | python-dev | set | nosy: + python-devmessages: + |
2013-01-31 02:15:34 | silverbacknet | set | nosy: + silverbacknet |
2013-01-22 09:07:34 | serhiy.storchaka | set | nosy: + eli.bendersky |
2013-01-22 07:25:12 | scoder | set | messages: + |
2013-01-22 07:16:47 | scoder | set | components: + XML |
2013-01-22 07:16:36 | scoder | set | components: + Library (Lib), - XML |
2013-01-22 07:16:24 | scoder | create |