mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #7151: crashed when extension assigns a value to `env.indexentries
`
This commit is contained in:
parent
1339948dce
commit
151b4afde2
1
CHANGES
1
CHANGES
@ -19,6 +19,7 @@ Bugs fixed
|
|||||||
* #7138: autodoc: ``autodoc.typehints`` crashed when variable has unbound object
|
* #7138: autodoc: ``autodoc.typehints`` crashed when variable has unbound object
|
||||||
as a value
|
as a value
|
||||||
* #7156: autodoc: separator for keyword only arguments is not shown
|
* #7156: autodoc: separator for keyword only arguments is not shown
|
||||||
|
* #7151: crashed when extension assigns a value to ``env.indexentries``
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -755,6 +755,14 @@ class BuildEnvironment:
|
|||||||
domain = cast(IndexDomain, self.get_domain('index'))
|
domain = cast(IndexDomain, self.get_domain('index'))
|
||||||
return domain.entries
|
return domain.entries
|
||||||
|
|
||||||
|
@indexentries.setter
|
||||||
|
def indexentries(self, entries: Dict[str, List[Tuple[str, str, str, str, str]]]) -> None:
|
||||||
|
warnings.warn('env.indexentries() is deprecated. Please use IndexDomain instead.',
|
||||||
|
RemovedInSphinx40Warning, stacklevel=2)
|
||||||
|
from sphinx.domains.index import IndexDomain
|
||||||
|
domain = cast(IndexDomain, self.get_domain('index'))
|
||||||
|
domain.data['entries'] = entries
|
||||||
|
|
||||||
|
|
||||||
from sphinx.errors import NoUri # NOQA
|
from sphinx.errors import NoUri # NOQA
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user