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

Sphinx directives require version argument #40

Assignees
Milestone

Comments

@auscompgeek
Copy link

The Sphinx versionadded, versionchanged, and deprecated directives have a non-optional version argument. However, Deprecated will happily generate a Sphinx directive that is missing the version argument:

https://github.com/tantale/deprecated/blob/a02525b4f6e112743e1142fc9735dd4d46a4c66e/deprecated/sphinx.py#L100

@tantale tantale added this to the 1.2.12 milestone Jan 31, 2021
@tantale
Copy link
Collaborator

tantale commented Feb 1, 2021

The Sphinx build shows a warning similar to:

reading sources... [100%] api                                                                                           
[...]/deprecated_demo/sphinx/main.py:docstring of deprecated_demo.sphinx.main.add:7: WARNING: Error in "deprecated" directive:
1 argument(s) required, 0 supplied.

.. deprecated::

The user (who is a developer) can easily fix this problem in its own code.

@tantale tantale self-assigned this Feb 1, 2021
@auscompgeek
Copy link
Author

Problem is though if you specify a reason without a version, there's no warning; the first word is silently considered to be the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment