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

[3.7] bpo-34461: Availability of parsers in etree initializer of xml package #8857

Closed
wants to merge 2 commits into from

Conversation

nealpy
Copy link

@nealpy nealpy commented Aug 22, 2018

By providing the above PR - all the parsers will be available to etree library of xml package. Now it's recommended by this solution - script can be written as

from xml import *
etree.ElementTree.somemethod

https://bugs.python.org/issue34461

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!


# Occupy all the parser files in initializer.

from . import (ElementInclude, ElementPath, ElementTree, cElementTree)
Copy link
Contributor

Choose a reason for hiding this comment

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

What happen if you use the __all__ variable?

Copy link
Author

Choose a reason for hiding this comment

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

if we use __all__ over etree initialize then context will be little bit changed as far core behavior of this package - as all the sub-libraries(etree etc.) are already available in global name-space by __all__ in __init__.py of xml package. I know if we can introduce __all__ from here then we can use from xml.etree import *;ElementTree.somemethod - Do you think to introduce this technique will be better approach comparing the current PR solution? Let me know accordingly i'll make the changes over PR

@nealpy nealpy changed the title 3.7: Availability of parsers in etree initializer of xml package [3.7] bpo-34461: Availability of parsers in etree initializer of xml package Aug 22, 2018
@Mariatta
Copy link
Member

Thanks for the PR. Please first make a PR against the master branch.

@matrixise
Copy link
Member

Hi @nealpy

Thank you for your contributions but we need that you sign the CLA for your code. Please could you go to https://www.python.org/psf/contrib/contrib-form/ and sign the document?

Thank you,

@ned-deily
Copy link
Member

Since there has been no consensus that this change is desirable, I'm closing the issue and the PRs.

@ned-deily ned-deily closed this Mar 18, 2019
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.

None yet

7 participants