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

bpo-36543: Restore cElementTree and mark it for removal in 3.10 #19921

Closed
wants to merge 2 commits into from

Conversation

tiran
Copy link
Member

@tiran tiran commented May 5, 2020

  • Restore xml.etree.cElementTree
  • Schedule the module for removal in 3.10
  • Add a PendingDeprecationWarning

https://bugs.python.org/issue36543

@tiran tiran changed the title bpo-36453: Restore cElementTree and mark it for removal 3.10 bpo-36453: Restore cElementTree and mark it for removal in 3.10 May 5, 2020
@tiran tiran force-pushed the restore_celementtree branch from c10d287 to 1372fe1 Compare May 5, 2020 11:57
@tiran tiran changed the title bpo-36453: Restore cElementTree and mark it for removal in 3.10 bpo-36543: Restore cElementTree and mark it for removal in 3.10 May 5, 2020
Copy link
Contributor

@scoder scoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Do we need a News entry for this? It's only reverting an alpha change.

@@ -616,6 +616,10 @@ Deprecated
`parso`_.
(Contributed by Carl Meyer in :issue:`40360`.)

* The :mod:`xml.etree.cElementTree` module has been deprecated since Python
3.3 and is scheduled to be removed in Python 3.10.
(Contributed by Serhiy Storchaka and Christian Heemes in :issue:`36543`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A typo in your own name? That's rare, I guess. ;-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You wouldn't believe me 👍

_warn(
"xml.etree.cElementTree is deprecated, use xml.etree.ElementTree instead",
PendingDeprecationWarning
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
)
)
del _warn

@scoder
Copy link
Contributor

scoder commented May 5, 2020

Let's got with GH-19920 instead, shall we?

@tiran tiran force-pushed the restore_celementtree branch from 1372fe1 to 23bb770 Compare May 15, 2020 17:38
Signed-off-by: Christian Heimes <christian@python.org>
@tiran tiran force-pushed the restore_celementtree branch from 23bb770 to 99cd4ef Compare May 15, 2020 17:41
@tirkarthi
Copy link
Member

With 3.9 branch created the PR pointed to master will go in for 3.10.

@tiran tiran added the needs backport to 3.9 only security fixes label May 19, 2020
tiran added a commit to tiran/pip that referenced this pull request May 20, 2020
It's been deprecated and will be removed in 3.9 or 3.10. 3.9.0b1 doesn't
have cElementTree. I'd like to bring it back with a deprecation warning
to drop in 3.10.

See: python/cpython#19921
Signed-off-by: Christian Heimes <christian@python.org>
@@ -626,6 +626,10 @@ Deprecated
`parso`_.
(Contributed by Carl Meyer in :issue:`40360`.)

* The :mod:`xml.etree.cElementTree` module has been deprecated since Python
3.3 and is scheduled to be removed in Python 3.10.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use more direct wording:

  • clearer
  • similar to that in xml.etree.elementtree.rst
  • fewer words = more readable
Suggested change
3.3 and is scheduled to be removed in Python 3.10.
3.3 and will be removed in Python 3.10.

gsnedders pushed a commit to gsnedders/html5lib-python that referenced this pull request Jun 10, 2020
It's been deprecated and will be removed in 3.9 or 3.10. 3.9.0b1 doesn't
have cElementTree. I'd like to bring it back with a deprecation warning
to drop in 3.10.

See: python/cpython#19921
Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Sam Sneddon <me@gsnedders.com>
@scoder
Copy link
Contributor

scoder commented Jun 10, 2020

I merged #20117, which reverts the removal.

@scoder scoder closed this Jun 10, 2020
gsnedders pushed a commit to gsnedders/html5lib-python that referenced this pull request Jun 17, 2020
It's been deprecated and will be removed in 3.9 or 3.10. 3.9.0b1 doesn't
have cElementTree. I'd like to bring it back with a deprecation warning
to drop in 3.10.

See: python/cpython#19921
Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Sam Sneddon <me@gsnedders.com>
gsnedders pushed a commit to html5lib/html5lib-python that referenced this pull request Jun 17, 2020
It's been deprecated and will be removed in 3.9 or 3.10. 3.9.0b1 doesn't
have cElementTree. I'd like to bring it back with a deprecation warning
to drop in 3.10.

See: python/cpython#19921
Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Sam Sneddon <me@gsnedders.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants