Merge branch '5.1.x' into 5.x

# Conflicts:
#	CHANGES
#	sphinx/__init__.py
This commit is contained in:
Adam Turner 2022-07-26 22:30:40 +01:00
commit 65f548e6ee
3 changed files with 34 additions and 2 deletions

31
CHANGES
View File

@ -22,6 +22,37 @@ Bugs fixed
Testing
--------
Release 5.1.2 (in development)
==============================
Dependencies
------------
Incompatible changes
--------------------
Deprecated
----------
Features added
--------------
Bugs fixed
----------
Testing
--------
Release 5.1.1 (released Jul 26, 2022)
=====================================
Bugs fixed
----------
* #10701: Fix ValueError in the new ``deque`` based ``sphinx.ext.napolean``
iterator implementation.
* #10702: Restore compatability with third-party builders.
Release 5.1.0 (released Jul 24, 2022)
=====================================

View File

@ -89,10 +89,11 @@ class Builder:
self.env: BuildEnvironment = env
self.env.set_versioning_method(self.versioning_method,
self.versioning_compare)
elif env is not Ellipsis:
else:
# ... is passed by SphinxComponentRegistry.create_builder to not show two warnings.
warnings.warn("The 'env' argument to Builder will be required from Sphinx 7.",
RemovedInSphinx70Warning, stacklevel=2)
self.env = None
self.events: EventManager = app.events
self.config: Config = app.config
self.tags: Tags = app.tags

View File

@ -166,7 +166,7 @@ class SphinxComponentRegistry:
f"'env'argument. Report this bug to the developers of your custom builder, "
f"this is likely not a issue with Sphinx. The 'env' argument will be required "
f"from Sphinx 7.", RemovedInSphinx70Warning, stacklevel=2)
builder = self.builders[name](app, env=...) # type: ignore[arg-type]
builder = self.builders[name](app)
if env is not None:
builder.set_environment(env)
return builder