-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[xmltodict] stub improvements and update to 1.0 #14695
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
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
_AttrValue: TypeAlias = str | dict[str, str] | ||
_AttrDict: TypeAlias = dict[str, _AttrValue] | ||
|
||
class _DictSAXHandler: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this PR's still a draft, but since you were working on this class I wanted to ask: Is _DictSAXHandler
part of the public API or known to be used in user code? If not, it shouldn't be included in the stubs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not public API, but:
- I'm currently writing proprietary code that needs to directly access
_DictSAXHandler
, and need a stub so that my code type-checks _DictSAXHandler.__init__ args
are exposed indirectly via public apiparse(**kwargs)
- stubgen created incomplete
_DictSAXHandler
stubs
Since I need to write the stub anyway, I figured I'd share it. If it's not appropriate, I can remove _DictSAXHandler
. The research would still be preserved in the parse(**kwargs)
typings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case it's probably fine to include (we're generally willing to include private APIs when users request them), but I'd like to hear another maintainer's thoughts
This comment has been minimized.
This comment has been minimized.
Marking this as draft as it looks like upstream is about to make a new release that changes some types |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Closes: python#14710 - Add default values - Reveal kwargs - Add to stricter pyright exclude list
This comment has been minimized.
This comment has been minimized.
Ready for review as xmltodict 1.0 is released and I included it with a merge from @donBarbos |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
_DictSAXHandler