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: Manjusaka, docs@python, fdrake, serhiy.storchaka
Priority: normal Keywords: easy

Created on 2020-03-25 19:09 by fdrake, last changed 2020-03-26 15:16 by fdrake.

Messages (6)
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.
Date User Action Args
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