mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Improve documentation about Sphinx's deprecation warnings
This commit is contained in:
parent
77d84713a1
commit
ec7567ce41
@ -387,18 +387,31 @@ Sphinx 2.x:
|
|||||||
|
|
||||||
* Sphinx 2.x will contain a backwards-compatible replica of the function
|
* Sphinx 2.x will contain a backwards-compatible replica of the function
|
||||||
which will raise a ``RemovedInSphinx40Warning``.
|
which will raise a ``RemovedInSphinx40Warning``.
|
||||||
|
This is a subclass of :exc:`python:PendingDeprecationWarning`, i.e. it
|
||||||
|
will not get displayed by default.
|
||||||
|
|
||||||
* Sphinx 3.x will still contain the backwards-compatible replica.
|
* Sphinx 3.x will still contain the backwards-compatible replica, but
|
||||||
|
``RemovedInSphinx40Warning`` will be a subclass of
|
||||||
|
:exc:`python:DeprecationWarning` then, and gets displayed by default.
|
||||||
|
|
||||||
* Sphinx 4.0 will remove the feature outright.
|
* Sphinx 4.0 will remove the feature outright.
|
||||||
|
|
||||||
The warnings are displayed by default. You can turn off display of these
|
Deprecation warnings
|
||||||
warnings with:
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Sphinx will enable its ``RemovedInNextVersionWarning`` warnings by default,
|
||||||
|
if :envvar:`python:PYTHONWARNINGS` is not set.
|
||||||
|
Therefore you can disable them using:
|
||||||
|
|
||||||
* ``PYTHONWARNINGS= make html`` (Linux/Mac)
|
* ``PYTHONWARNINGS= make html`` (Linux/Mac)
|
||||||
* ``export PYTHONWARNINGS=`` and do ``make html`` (Linux/Mac)
|
* ``export PYTHONWARNINGS=`` and do ``make html`` (Linux/Mac)
|
||||||
* ``set PYTHONWARNINGS=`` and do ``make html`` (Windows)
|
* ``set PYTHONWARNINGS=`` and do ``make html`` (Windows)
|
||||||
|
|
||||||
|
But you can also explicitly enable the pending ones using e.g.
|
||||||
|
``PYTHONWARNINGS=default`` (see the
|
||||||
|
:ref:`Python docs on configuring warnings <python:describing-warning-filters>`)
|
||||||
|
for more details.
|
||||||
|
|
||||||
Unit Testing
|
Unit Testing
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user