extension: fix env.app deprecation warning#300
Conversation
Switch from env.app.emit() to env.events.emit() to fix the Sphinx deprecation warning introduced in version v9.0.0: RemovedInSphinx11Warning: 'sphinx.environment.BuildEnvironment.app' is deprecated The env.events.emit() interface has been there since Sphinx v3.0.0, so there shouldn't be any need to bump dependencies for this. See also sphinx-doc/sphinx#14119
BrunoMSantos
left a comment
There was a problem hiding this comment.
Nice to see these recent clean ups in sphinx, even if they break a couple of things along the way.
Just to confirm, this is still valid on older Sphinx versions, right?
It should work with Sphinx v3.0.0 and later, based on looking at Sphinx git history, but I was only able to test v6.2.1. Earlier Sphinx would have required an earlier Python version, and I didn't want to go through that rabbit hole. |
Ah, sure. I only meant to check that |
Switch from env.app.emit() to env.events.emit() to fix the Sphinx deprecation warning introduced in version v9.0.0:
RemovedInSphinx11Warning: 'sphinx.environment.BuildEnvironment.app' is deprecated
The env.events.emit() interface has been there since Sphinx v3.0.0, so there shouldn't be any need to bump dependencies for this.
See also sphinx-doc/sphinx#14119