Skip to content

bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include #20438

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

Merged
merged 3 commits into from
Jun 8, 2020

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented May 26, 2020

Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.

https://bugs.python.org/issue33187

Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.
@hauntsaninja
Copy link
Contributor Author

hauntsaninja commented May 26, 2020

cc @scoder as author of the relevant changes.

Seems to me like we can skip-news if we backport this to 3.9, since this is about changes in Python 3.9.

@scoder scoder added the needs backport to 3.9 only security fixes label Jun 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.

Thanks!

@@ -816,16 +816,25 @@ Functions
loader fails, it can return None or raise an exception.


.. function:: xml.etree.ElementInclude.include( elem, loader=None)
.. function:: xml.etree.ElementInclude.include( elem, loader=None, base_url=None, \
max_depth=DEFAULT_MAX_INCLUSION_DEPTH)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if it's better to use the (undocumented) named constant or the integer here. I wouldn't want the constant to be documented (it can't be changed, for example), and the actual value is probably best looked up through introspection (since it might change). So, just having a talking name here is probably best.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the spacing fixes!

By talking name, do you mean use lowercase and spaces? I couldn't really find an example in the docs to match against. (Also, feel free to make more changes directly if you find that efficient!)

Copy link
Contributor

Choose a reason for hiding this comment

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

With "talking name", I meant a named constant whose name explains the purpose.
I otherwise changed my mind, though. It's better if it's clear in the docs what the maximum depth is, even if that duplicates the value from the code. We should show the integer value here. Users will look up the documentation way more often than we risk to change the default value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, made the change!

@scoder scoder merged commit 301f0d4 into python:master Jun 8, 2020
@miss-islington
Copy link
Contributor

Thanks @hauntsaninja for the PR, and @scoder for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@scoder
Copy link
Contributor

scoder commented Jun 8, 2020

Thanks

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jun 8, 2020
@bedevere-bot
Copy link

GH-20722 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request Jun 8, 2020
…H-20438)

Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.
(cherry picked from commit 301f0d4)

Co-authored-by: Shantanu <[email protected]>
@hauntsaninja hauntsaninja deleted the xmldoc branch June 8, 2020 19:50
arun-mani-j pushed a commit to arun-mani-j/cpython that referenced this pull request Jul 21, 2020
…ythonGH-20438)

Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants