mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Deprecate sphinx.io.FiletypeNotFoundError and get_filetype()
This commit is contained in:
parent
2f768cf5a7
commit
00c30679cf
3
CHANGES
3
CHANGES
@ -10,6 +10,9 @@ Incompatible changes
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
* ``sphinx.io.FiletypeNotFoundError``
|
||||
* ``sphinx.io.get_filetype()``
|
||||
|
||||
Features added
|
||||
--------------
|
||||
|
||||
|
@ -26,6 +26,16 @@ The following is a list of deprecated interfaces.
|
||||
- (will be) Removed
|
||||
- Alternatives
|
||||
|
||||
* - ``sphinx.io.FiletypeNotFoundError``
|
||||
- 2.4
|
||||
- 4.0
|
||||
- ``sphinx.errors.FiletypeNotFoundError``
|
||||
|
||||
* - ``sphinx.io.get_filetype()``
|
||||
- 2.4
|
||||
- 4.0
|
||||
- ``sphinx.util.get_filetype()``
|
||||
|
||||
* - ``sphinx.builders.gettext.POHEADER``
|
||||
- 2.3
|
||||
- 4.0
|
||||
|
13
sphinx/io.py
13
sphinx/io.py
@ -19,7 +19,10 @@ from docutils.statemachine import StringList, string2lines
|
||||
from docutils.transforms.references import DanglingReferences
|
||||
from docutils.writers import UnfilteredWriter
|
||||
|
||||
from sphinx.deprecation import RemovedInSphinx30Warning, RemovedInSphinx40Warning
|
||||
from sphinx.deprecation import (
|
||||
RemovedInSphinx30Warning, RemovedInSphinx40Warning, deprecated_alias
|
||||
)
|
||||
from sphinx.errors import FiletypeNotFoundError
|
||||
from sphinx.transforms import (
|
||||
AutoIndexUpgrader, DoctreeReadEvent, FigureAligner, SphinxTransformer
|
||||
)
|
||||
@ -335,3 +338,11 @@ def read_doc(app, env, filename):
|
||||
|
||||
pub.publish()
|
||||
return pub.document
|
||||
|
||||
|
||||
deprecated_alias('sphinx.io',
|
||||
{
|
||||
'FiletypeNotFoundError': FiletypeNotFoundError,
|
||||
'get_filetype': get_filetype,
|
||||
},
|
||||
RemovedInSphinx40Warning)
|
||||
|
Loading…
Reference in New Issue
Block a user