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

Created on 2020-03-25 19:09 by fdrake, last changed 2020-06-20 19:53 by Ido Michael.

Messages (17)
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 https://bugs.python.org/issue40064
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:
https://github.com/boto/botocore/issues/2002
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

try:
    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:

https://github.com/boto/botocore/pull/2015
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.
msg370822 - (view) Author: Ido Michael (Ido Michael) * Date: 2020-06-06 13:50
Tal, is there a decision to this debate or can I just move the dep. warning?
msg370995 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-08 15:34
AFAICT from following the discussion, the decision is to hold off on a few deprecations which were causing most of the breakage. However, this does not appear to include xml.etree.cElementTree. Since that has currently been removed in the 3.9 branch, we should indeed fix the docs accordingly.

(Note that previous versions' docs, especially 3.8, should also be updated in this regard, as per the other issue Fred opened about this, #40064.)
msg370998 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-08 15:37
(Also, please note that the "master" branch is now for version 3.10; PRs for version 3.9 should be based on the "3.9" branch, and the pull request made for that branch too.)
msg370999 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-08 15:38
(My mistake! This should be done from/against the master branch, and then back-ported to 3.9, as usual.)
msg371001 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-06-08 15:53
No, please don't change the docs yet. I want to re-introduce the cElementTree and go through a proper deprecation phase.
msg371005 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-08 16:07
Ah, thanks for the update Christian, I must have misunderstood your intentions.

So should the deprecation note be removed in the "master" branch for 3.10?
msg371960 - (view) Author: Ido Michael (Ido Michael) * Date: 2020-06-20 19:53
Thanks Tal.

Yes, I also got the impression we want to clean this, sorry Christian.

Please let me know how to follow up on this.
History
Date User Action Args
2020-06-20 19:53:02Ido Michaelsetmessages: + msg371960
2020-06-08 16:07:06taleinatsetmessages: + msg371005
2020-06-08 15:53:23christian.heimessetmessages: + msg371001
2020-06-08 15:38:27taleinatsetmessages: + msg370999
2020-06-08 15:37:14taleinatsetmessages: + msg370998
2020-06-08 15:34:28taleinatsetmessages: + msg370995
2020-06-06 13:50:43Ido Michaelsetnosy: + taleinat, Ido Michael
messages: + msg370822
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