X Tutup
The Wayback Machine - https://web.archive.org/web/20240502114350/https://github.com/python/cpython/issues/84246
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py39: remove deprecation note for xml.etree.cElementTree #84246

Open
freddrake opened this issue Mar 25, 2020 · 20 comments
Open

py39: remove deprecation note for xml.etree.cElementTree #84246

freddrake opened this issue Mar 25, 2020 · 20 comments
Labels
3.9 only security fixes docs Documentation in the Doc dir easy topic-XML

Comments

@freddrake
Copy link
Member

BPO 40065
Nosy @freddrake, @taleinat, @tiran, @serhiy-storchaka, @DahlitzFlorian, @Zheaoli, @idomic, @caje731, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-03-25.19:09:39.026>
labels = ['easy', '3.9', 'docs']
title = 'py39: remove deprecation note for xml.etree.cElementTree'
updated_at = <Date 2022-03-22.15:27:54.687>
user = 'https://github.com/freddrake'

bugs.python.org fields:

activity = <Date 2022-03-22.15:27:54.687>
actor = 'iritkatriel'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2020-03-25.19:09:39.026>
creator = 'fdrake'
dependencies = []
files = []
hgrepos = []
issue_num = 40065
keywords = ['easy']
message_count = 18.0
messages = ['365016', '365073', '365076', '365078', '365079', '365084', '366240', '369474', '369480', '369487', '370822', '370995', '370998', '370999', '371001', '371005', '371960', '415788']
nosy_count = 10.0
nosy_names = ['fdrake', 'taleinat', 'christian.heimes', 'docs@python', 'serhiy.storchaka', 'DahlitzFlorian', 'Manjusaka', 'Ido Michael', 'cajetan.rodrigues', 'iritkatriel']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue40065'
versions = ['Python 3.9']

@freddrake
Copy link
Member Author

Since xml.etree.cElementTree does not exist in Python 3.9, the statement that it's deprecated should be removed from the documentation.

@freddrake freddrake added the 3.9 only security fixes label Mar 25, 2020
@freddrake freddrake added docs Documentation in the Doc dir easy 3.9 only security fixes labels Mar 25, 2020
@freddrake freddrake added docs Documentation in the Doc dir easy labels Mar 25, 2020
@Zheaoli
Copy link
Mannequin

Zheaoli mannequin commented Mar 26, 2020

I will clean this

This issue looks like the same with https://bugs.python.org/issue40064

@freddrake
Copy link
Member Author

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:
boto/botocore#2002

@serhiy-storchaka
Copy link
Member

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.

@serhiy-storchaka
Copy link
Member

The common idiom is

try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET

@freddrake
Copy link
Member Author

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.

@caje731
Copy link
Mannequin

caje731 mannequin commented Apr 12, 2020

For the record, I submitted a fix to the dependent:

boto/botocore#2015

@DahlitzFlorian
Copy link
Mannequin

DahlitzFlorian mannequin commented May 20, 2020

Are you still working on this @manjusaka?
If not, I would like to submit a patch for it.

@tiran
Copy link
Member

tiran commented May 20, 2020

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.

@Zheaoli
Copy link
Mannequin

Zheaoli mannequin commented May 21, 2020

I'm working on it. I will make a PR today.

@idomic
Copy link
Mannequin

idomic mannequin commented Jun 6, 2020

Tal, is there a decision to this debate or can I just move the dep. warning?

@taleinat
Copy link
Contributor

taleinat commented Jun 8, 2020

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, bpo-40064.)

@taleinat
Copy link
Contributor

taleinat commented Jun 8, 2020

(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.)

@taleinat
Copy link
Contributor

taleinat commented Jun 8, 2020

(My mistake! This should be done from/against the master branch, and then back-ported to 3.9, as usual.)

@tiran
Copy link
Member

tiran commented Jun 8, 2020

No, please don't change the docs yet. I want to re-introduce the cElementTree and go through a proper deprecation phase.

@taleinat
Copy link
Contributor

taleinat commented Jun 8, 2020

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?

@idomic
Copy link
Mannequin

idomic mannequin commented Jun 20, 2020

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.

@iritkatriel
Copy link
Member

We are currently debating to bring the module back and warn users that it will be removed in 3.10.

Doesn't look like it was removed in 3.10. Was this an oversight?

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@jacobtylerwalls
Copy link
Contributor

Doesn't look like it was removed in 3.10. Was this an oversight?

From #80724 (comment) there seems to be no consensus for either removing the module or adding real deprecation warnings. I did end up following the suggestion in #80724 (comment) and got pylint to emit a deprecated-module warning: pylint-dev/pylint#5863.

@mblahay
Copy link
Contributor

mblahay commented Apr 24, 2023

Does this issue require additional research or can it be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.9 only security fixes docs Documentation in the Doc dir easy topic-XML
Projects
None yet
Development

No branches or pull requests

7 participants
X Tutup