Skip to content

Commit df7cac6

Browse files
committed
Update deprecation docs to avoid duplicate autosummary/errors
Removes the duplicate deprecation autosummary docs to avoid errors from logging output in the docs output strings.
1 parent 2770360 commit df7cac6

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
lines changed

doc/OnlineDocs/explanation/developer_utils/deprecation.rst

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,29 @@ Deprecation
99
-----------
1010

1111
We offer a set of tools to help with deprecation in
12-
``pyomo.common.deprecation``.
12+
:py:mod:`pyomo.common.deprecation`.
1313

1414
By policy, when deprecating or moving an existing capability, one of the
1515
following utilities should be leveraged. Each has a required
1616
``version`` argument that should be set to current development version (e.g.,
1717
``"6.6.2.dev0"``). This version will be updated to the next actual
1818
release as part of the Pyomo release process. The current development version
19-
can be found by running ``pyomo --version`` on your local fork/branch.
19+
can be found by running
20+
21+
``pyomo --version``
22+
23+
on your local fork/branch.
2024

2125
.. currentmodule:: pyomo.common.deprecation
2226

2327
.. autosummary::
2428

2529
deprecated
2630
deprecation_warning
27-
relocated_module
31+
moved_module
2832
relocated_module_attribute
2933
RenamedClass
3034

31-
.. autodecorator:: pyomo.common.deprecation.deprecated
32-
:noindex:
33-
34-
.. autofunction:: pyomo.common.deprecation.deprecation_warning
35-
:noindex:
36-
37-
.. autofunction:: pyomo.common.deprecation.relocated_module
38-
:noindex:
39-
40-
.. autofunction:: pyomo.common.deprecation.relocated_module_attribute
41-
:noindex:
42-
43-
.. autoclass:: pyomo.common.deprecation.RenamedClass
44-
:noindex:
45-
4635

4736
Removal
4837
-------
@@ -52,10 +41,8 @@ warning, pending extenuating circumstances. The functionality should
5241
be deprecated, following the information above.
5342

5443
If the functionality is documented in the most recent
55-
edition of [`Pyomo - Optimization Modeling in Python`_], it may not be removed
56-
until the next major version release.
57-
58-
.. _Pyomo - Optimization Modeling in Python: https://doi.org/10.1007/978-3-030-68928-5
44+
edition of :ref:`Pyomo - Optimization Modeling in Python <pyomobookiii>`,
45+
it may not be removed until the next major version release.
5946

6047
For other functionality, it is preferred that ample time is given
6148
before removing the functionality. At minimum, significant functionality

doc/OnlineDocs/reference/bibliography.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ These publications describe various Pyomo capabilitites or subpackages:
2929
Vol. 67. Springer. 2021. DOI `10.1007/978-3-030-68928-5
3030
<https://doi.org/10.1007/978-3-030-68928-5>`_
3131
32+
..
33+
NOTE: When adding a new edition of the Pyomo Book, search the codebase
34+
both for citation references "[PyomoBookIII]" and references "pyomobookiii"
35+
3236
.. [PyomoDAE-paper] Bethany Nicholson, John D. Siirola, Jean-Paul Watson,
3337
Victor M. Zavala, and Lorenz T. Biegler. "pyomo.dae: a modeling and
3438
automatic discretization framework for optimization with differential

pyomo/common/deprecation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def _find_calling_frame(module_offset):
169169
def deprecation_warning(
170170
msg, logger=None, version=None, remove_in=None, calling_frame=None
171171
):
172-
"""Standardized formatter for deprecation warnings
172+
"""Standardized function for formatting and emitting deprecation warnings.
173173
174174
This is a standardized routine for formatting deprecation warnings
175175
so that things look consistent and "nice".

0 commit comments

Comments
 (0)