Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test against Sphinx 5.1.x #691

Merged
merged 4 commits into from Jul 24, 2022
Merged

test against Sphinx 5.1.x #691

merged 4 commits into from Jul 24, 2022

Conversation

jdknight
Copy link
Member

  • tox: adjust for new sphinx versions (v5.1.x)
  • workflows: adjust for new sphinx versions (v5.1.x)

Sphinx provides a stable v5.1.x series; adjusting the tox configuration
to support the new revision. Following maintenance guidelines, this
allows a series of legacy Sphinx revisions to be dropped as well.

See CONTRIBUTING.rst for additional information.

Signed-off-by: James Knight <james.d.knight@live.com>
The tox configuration has been adjusted with a new version of Sphinx
versions to test against. Adjusting the automated building to invoke
these accordingly.

Signed-off-by: James Knight <james.d.knight@live.com>
jdknight added a commit to jdknight/sphinx that referenced this pull request Jul 24, 2022
Changes to the builder to move towards passing an environment into the
builder [1] can cause some legacy builder types to fail to load [2].
For example:

    Traceback (most recent call last):
      File "/home/runner/work/confluencebuilder/confluencebuilder/.tox/py38-sphinx51/lib/python3.8/site-packages/sphinx/registry.py", line 162, in create_builder
        return self.builders[name](app, env)
    TypeError: __init__() takes 2 positional arguments but 3 were given

The fallback case for preparing deprecated builders should avoid setting
`env`.

[1]: 6ef22d2
[2]: sphinx-contrib/confluencebuilder#691

Signed-off-by: James Knight <james.d.knight@live.com>
jdknight added a commit to jdknight/sphinx that referenced this pull request Jul 24, 2022
Changes to the builder to move towards passing an environment into the
builder [1] can cause some legacy builder types to fail to load [2].
For example:

    Traceback (most recent call last):
      File "/home/runner/work/confluencebuilder/confluencebuilder/.tox/py38-sphinx51/lib/python3.8/site-packages/sphinx/registry.py", line 162, in create_builder
        return self.builders[name](app, env)
    TypeError: __init__() takes 2 positional arguments but 3 were given

The fallback case for preparing deprecated builders should avoid setting
`env`.

[1]: 6ef22d2
[2]: sphinx-contrib/confluencebuilder#691

Signed-off-by: James Knight <james.d.knight@live.com>
Newer versions of Sphinx will expected the builder environment to be
passed into a builder's `__init__` call. To support this, accept an
`env` option and forwarded it to the base construction if set;
otherwise, assume the environment is using an older version of Sphinx
and ignore the `env` argument.

Signed-off-by: James Knight <james.d.knight@live.com>
Newer versions of Sphinx will expect a build environment to be provided
into a builder's initialization. Adjusting the test implementation to
prepare one and forwarded it into the builder instance being used for
configuration checks. For older versions of Sphinx tested, this
environment will be ignored (which is fine).

Signed-off-by: James Knight <james.d.knight@live.com>
@jdknight jdknight merged commit ce47eea into master Jul 24, 2022
@jdknight jdknight deleted the test-against-sphinx-5.1.x branch July 24, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant