Activity log for bug #2059977

Date Who What changed Old value New value Message
2024-04-01 22:29:42 AustinMatherne bug added bug
2024-04-01 22:29:42 AustinMatherne attachment added scratch.py https://bugs.launchpad.net/bugs/2059977/+attachment/5761135/+files/scratch.py
2024-04-01 22:46:50 AustinMatherne attachment removed scratch.py https://bugs.launchpad.net/lxml/+bug/2059977/+attachment/5761135/+files/scratch.py
2024-04-01 22:47:42 AustinMatherne attachment added scratch.py https://bugs.launchpad.net/lxml/+bug/2059977/+attachment/5761139/+files/scratch.py
2024-04-01 22:56:06 AustinMatherne description After updating to versions 5.1.1 and 5.2.0, our codebase encounters exceptions when using absolute paths with the iterfind method of an ElementTree object, and with find, findall, and iterfind methods of an Element object. This behavior deviates from the expected, where a FutureWarning should be logged instead of raising an exception directly. Expected Behavior: Absolute paths should trigger a FutureWarning indicating that absolute paths should not be used without interrupting the execution flow. Actual Behavior: A SyntaxError exception is raised, which prevents further execution of the script. Affected Methods: ElementTree.iterfind raises an exception when used with an absolute path. Element.find, Element.findall, and Element.iterfind raise an exception when used with an absolute path. Unaffected Methods: ElementTree.find and ElementTree.findall do not raise an exception when used with an absolute path. Environment tested with: Python version: 3.12.2 lxml versions: 5.1.1 and 5.2.0 Attachments: Python script to reproduce the exception. Steps to Reproduce: Use the lxml library version 5.1.1 or 5.2.0. Run the following Python script: ```python from lxml import etree xml_string = """ <concept> <concept>Content 1</concept> <concept>Content 2</concept> </concept> """ root = etree.fromstring(xml_string) root.iterfind("//concept") ``` After updating to versions 5.1.1 and 5.2.0, our codebase encounters exceptions when using absolute paths with the iterfind method of an ElementTree object. This behavior deviates from the expected, where a FutureWarning should be logged instead of raising an exception directly. Expected Behavior: Absolute paths should trigger a FutureWarning indicating that absolute paths should not be used without interrupting the execution flow. Actual Behavior: A SyntaxError exception is raised, which prevents further execution of the script. Affected Methods: ElementTree.iterfind raises an exception when used with an absolute path. Environment tested with: Python version: 3.12.2 lxml versions: 5.1.1 and 5.2.0 Attachments: Python script to reproduce the exception. Steps to Reproduce: Use the lxml library version 5.1.1 or 5.2.0. Run the following Python script: ```python from lxml import etree xml_string = """ <concept>     <concept>Content 1</concept>     <concept>Content 2</concept> </concept> """ root_tree = etree.fromstring(xml_string).getroottree() root_tree.iterfind("//concept") ```
2024-04-01 22:57:49 AustinMatherne attachment removed scratch.py https://bugs.launchpad.net/lxml/+bug/2059977/+attachment/5761139/+files/scratch.py
2024-04-01 22:58:03 AustinMatherne attachment added scratch.py https://bugs.launchpad.net/lxml/+bug/2059977/+attachment/5761140/+files/scratch.py
2024-04-01 22:59:57 AustinMatherne attachment removed scratch.py https://bugs.launchpad.net/lxml/+bug/2059977/+attachment/5761140/+files/scratch.py
2024-04-01 23:00:07 AustinMatherne attachment added scratch.py https://bugs.launchpad.net/lxml/+bug/2059977/+attachment/5761141/+files/scratch.py
2024-04-02 07:42:56 scoder lxml: importance Undecided Low
2024-04-02 07:42:56 scoder lxml: status New Fix Committed
2024-04-02 07:42:56 scoder lxml: assignee scoder (scoder)
2024-04-02 07:43:20 scoder lxml: milestone 5.1.2
2024-04-02 18:50:10 scoder lxml: milestone 5.1.2 5.2.1
2024-04-02 18:50:20 scoder lxml: status Fix Committed Fix Released