Skip to content

Conversation

@djpohly
Copy link
Contributor

@djpohly djpohly commented Jun 18, 2022

See comments in #411.

This requires "annotations" from __future__, which doesn't exist in
Python 3.6.  Might be nice to have someday though.
@ptmcg
Copy link
Member

ptmcg commented Jun 18, 2022

I'm inclined to keep the replaced_by_pep8 decorator, as it gives a good place to emit a DeprecationWarning when I do the 3.1.0 release.

@djpohly
Copy link
Contributor Author

djpohly commented Jun 18, 2022

That makes sense. What would you think about still referencing the individual modules directly for Sphinx? It would make it more straightforward to include documentation for module-level variables like alphanums, empty, common_html_entity, or ParseAction.

The alternative, if we wanted to document any variables, would be to put their documentation directly in __init__.py, separate from the actual definition. Either of the following options would keep mypy happy:

common_html_entity: ParserElement = common_html_entity
"""Convenience parser for common HTML entities"""
common_html_entity: ParserElement  # type: ignore[no-redef]
"""Convenience parser for common HTML entities"""

@ptmcg
Copy link
Member

ptmcg commented Jun 19, 2022

Looking at this, but late now - will pick up some time tomorrow.

@ptmcg
Copy link
Member

ptmcg commented Nov 5, 2022

Please don't remove the replaced_by_pep8 decorators. As I said, I'm going to use those to emit DeprecationWarnings starting in pyparsing 3.1.0

@ptmcg ptmcg mentioned this pull request Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants