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

Improve support for deprecated builders without env arg #10702

Commits on Jul 24, 2022

  1. do not pass env argument into deprecated builders

    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 committed Jul 24, 2022
    Copy the full SHA
    7a39a30 View commit details
    Browse the repository at this point in the history
  2. always default create optional environment for deprecated builders

    Builder implementation would originally always create an optional
    environment instance, which an extended builder's implementation could
    reference in their own `__init__` call. However, with the change [1] to
    support an `env` argument, there is no longer a guarantee that
    `self.env` will exist. This commit changes this to restore the creating
    of `self.env` if `env` if not passed in.
    
    [1]: 6ef22d2
    
    Signed-off-by: James Knight <james.d.knight@live.com>
    jdknight committed Jul 24, 2022
    Copy the full SHA
    c83c83c View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2022

  1. Copy the full SHA
    10e632b View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    a2b9e3d View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    e3de9f7 View commit details
    Browse the repository at this point in the history