Skip to content

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.

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!


.. 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
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 <hauntsaninja@users.noreply.github.com>
@hauntsaninja hauntsaninja deleted the xmldoc branch June 8, 2020 19:50
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