Title: py39: remove deprecation note for xml.etree.cElementTree
Type: Stage:
Components: Documentation Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: DahlitzFlorian, Manjusaka, cajetan.rodrigues, christian.heimes, docs@python, fdrake, serhiy.storchaka
Priority: normal Keywords: easy

Created on 2020-03-25 19:09 by fdrake, last changed 2020-05-21 01:10 by Manjusaka.

Messages (10)
msg365016 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2020-03-25 19:09
Since xml.etree.cElementTree does not exist in Python 3.9, the statement that it's deprecated should be removed from the documentation.
msg365073 - (view) Author: Manjusaka (Manjusaka) * Date: 2020-03-26 13:51
I will clean this

This issue looks like the same with
msg365076 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2020-03-26 14:04
Same core problem (module removed with insufficient document update), but a different action is needed for 3.8 and 3.9.

When I started testing an application with 3.9 and found one of the dependencies broken because it was relying directly on xml.etree.cElementTree, I had to dig into the history to determine that it was removed intentionally.  Updated documentation would have helped.

I did file an issue on the dependency as well:
msg365078 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-03-26 14:40
Thank you for catching this Fred. I am surprised that some code uses xml.etree.cElementTree without falling back to xml.etree.ElementTree. In Python 3 you can just use xml.etree.ElementTree, in Python 2 you have to fallback to the Python implementation because the C implementation was optional.
msg365079 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-03-26 14:43
The common idiom is

    import xml.etree.cElementTree as ET
except ImportError:
    import xml.etree.ElementTree as ET
msg365084 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2020-03-26 15:16
The Python 2.7 documentation was not clear that xml.etree.cElementTree was optional, so users who didn't dive into the implementation or build process could easily not have known unless someone with a more limited installation used their code.
msg366240 - (view) Author: Cajetan Rodrigues (cajetan.rodrigues) * Date: 2020-04-12 11:57
For the record, I submitted a fix to the dependent:
msg369474 - (view) Author: Florian Dahlitz (DahlitzFlorian) * Date: 2020-05-20 19:43
Are you still working on this @Manjusaka?
If not, I would like to submit a patch for it.
msg369480 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-05-20 22:10
Although the modules has been deprecated for a long time, the removal came as surprise. We are currently debating to bring the module back and warn users that it will be removed in 3.10.
msg369487 - (view) Author: Manjusaka (Manjusaka) * Date: 2020-05-21 01:10
I'm working on it. I will make a PR today.
Date User Action Args
2020-05-21 01:10:42Manjusakasetmessages: + msg369487
2020-05-20 22:10:47christian.heimessetnosy: + christian.heimes
messages: + msg369480
2020-05-20 19:43:55DahlitzFloriansetnosy: + DahlitzFlorian
messages: + msg369474
2020-04-12 11:57:17cajetan.rodriguessetnosy: + cajetan.rodrigues
messages: + msg366240
2020-03-26 15:16:07fdrakesetmessages: + msg365084
2020-03-26 14:43:16serhiy.storchakasetmessages: + msg365079
2020-03-26 14:40:57serhiy.storchakasetmessages: + msg365078
2020-03-26 14:04:23fdrakesetmessages: + msg365076
2020-03-26 13:51:19Manjusakasetnosy: + Manjusaka
messages: + msg365073
2020-03-26 02:50:12xtreaksetnosy: + serhiy.storchaka
2020-03-25 19:09:39fdrakecreate