Skip to content

3.27.0: pytest is failing in tests/test_basic.py units with deprecation errors #38

Open
@kloczek

Description

@kloczek

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using 'installer` module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-moderncmakedomain-3.27.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-moderncmakedomain-3.27.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/moderncmakedomain-3.27.0
configfile: pyproject.toml
testpaths: tests
collected 4 items

tests/test_basic.py EEE                                                                                                                                                               [ 75%]
tests/test_version.py .                                                                                                                                                               [100%]

========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________________ ERROR at setup of test_simple_html[0] ___________________________________________________________________________

test_params = {'shared_result': None}
app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
make_app = <function make_app.<locals>.make at 0x7f5525a635e0>, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5525a4f7c0>

    @pytest.fixture(scope='function')
    def app(test_params: dict, app_params: tuple[dict, dict], make_app: Callable,
            shared_result: SharedResult) -> Generator[SphinxTestApp, None, None]:
        """
        Provides the 'sphinx.application.Sphinx' object
        """
        args, kwargs = app_params
>       app_ = make_app(*args, **kwargs)

app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
args       = ['html']
kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')}
make_app   = <function make_app.<locals>.make at 0x7f5525a635e0>
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5525a4f7c0>
test_params = {'shared_result': None}

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
    app_: Any = SphinxTestApp(*args, **kwargs)
        apps       = []
        args       = ('html',)
        kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root'), 'status': <_io.StringIO object at 0x7f5525a63700>, ...}
        status     = <_io.StringIO object at 0x7f5525a63700>
        test_params = {'shared_result': None}
        warning    = <_io.StringIO object at 0x7f5525a63790>
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
    super().__init__(srcdir, confdir, outdir, doctreedir,
        __class__  = <class 'sphinx.testing.util.SphinxTestApp'>
        builddir   = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build')
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        docutilsconf = None
        freshenv   = True
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63700>
        tags       = None
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:225: in __init__
    self.setup_extension(extension)
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        extension  = 'sphinxcontrib.htmlhelp'
        freshenv   = True
        keep_going = False
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        pdb        = False
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63700>
        tags       = None
        verbosity  = 0
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
    self.registry.load_extension(self, extname)
        extname    = 'sphinxcontrib.htmlhelp'
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
/usr/lib/python3.8/site-packages/sphinx/registry.py:442: in load_extension
    mod = import_module(extname)
        app        = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5525a4fd30>
        extname    = 'sphinxcontrib.htmlhelp'
        prefix     = 'while setting up extension sphinxcontrib.htmlhelp:'
        self       = <sphinx.registry.SphinxComponentRegistry object at 0x7f5525a4fdc0>
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
        level      = 0
        name       = 'sphinxcontrib.htmlhelp'
        package    = None
/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: in <module>
    from sphinx.util import progress_message
        Any        = typing.Any
        Config     = <class 'sphinx.config.Config'>
        Dict       = typing.Dict
        Element    = <class 'docutils.nodes.Element'>
        IndexEntries = <class 'sphinx.environment.adapters.indexentries.IndexEntries'>
        List       = typing.List
        Node       = <class 'docutils.nodes.Node'>
        Set        = typing.Set
        Sphinx     = <class 'sphinx.application.Sphinx'>
        StandaloneHTMLBuilder = <class 'sphinx.builders.html.StandaloneHTMLBuilder'>
        Tuple      = typing.Tuple
        Type       = typing.Type
        __builtins__ = <builtins>
        __cached__ = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__pycache__/__init__.cpython-38.pyc'
        __doc__    = '\n    sphinxcontrib.htmlhelp\n    ~~~~~~~~~~~~~~~~~~~~~~\n\n    Build HTML help support files.\n\n    :copyright: Copyright 2007-2019 by the Sphinx team, see README.\n    :license: BSD, see LICENSE for details.\n'
        __file__   = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x7f5525087e80>
        __name__   = 'sphinxcontrib.htmlhelp'
        __package__ = 'sphinxcontrib.htmlhelp'
        __path__   = ['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp']
        __spec__   = ModuleSpec(name='sphinxcontrib.htmlhelp', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f5525087e80...xcontrib/htmlhelp/__init__.py', submodule_search_locations=['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp'])
        __warningregistry__ = {'version': 33}
        addnodes   = <module 'sphinx.addnodes' from '/usr/lib/python3.8/site-packages/sphinx/addnodes.py'>
        document   = <class 'docutils.nodes.document'>
        get_translation = <function get_translation at 0x7f55263e5670>
        html       = <module 'html' from '/usr/lib64/python3.8/html/__init__.py'>
        logging    = <module 'sphinx.util.logging' from '/usr/lib/python3.8/site-packages/sphinx/util/logging.py'>
        nodes      = <module 'docutils.nodes' from '/usr/lib/python3.8/site-packages/docutils/nodes.py'>
        os         = <module 'os' from '/usr/lib64/python3.8/os.py'>
        path       = <module 'posixpath' from '/usr/lib64/python3.8/posixpath.py'>
/usr/lib/python3.8/site-packages/sphinx/util/__init__.py:408: in __getattr__
    _deprecation_warning(__name__, name, canonical_name, remove=(8, 0))
        _deprecation_warning = <function _deprecation_warning at 0x7f55266b4a60>
        canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
        deprecated_object = <class 'sphinx.util.display.progress_message'>
        name       = 'progress_message'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

module = 'sphinx.util', attribute = 'progress_message', canonical_name = 'sphinx.http_date.epoch_to_rfc1123'

    def _deprecation_warning(
        module: str,
        attribute: str,
        canonical_name: str,
        *,
        remove: tuple[int, int],
    ) -> None:
        """Helper function for module-level deprecations using __getattr__

        Exemplar usage:

        .. code:: python

           # deprecated name -> (object to return, canonical path or empty string)
           _DEPRECATED_OBJECTS = {
               'deprecated_name': (object_to_return, 'fully_qualified_replacement_name'),
           }


           def __getattr__(name):
               if name not in _DEPRECATED_OBJECTS:
                   raise AttributeError(f'module {__name__!r} has no attribute {name!r}')

               from sphinx.deprecation import _deprecation_warning

               deprecated_object, canonical_name = _DEPRECATED_OBJECTS[name]
               _deprecation_warning(__name__, name, canonical_name, remove=(7, 0))
               return deprecated_object
        """

        if remove == (7, 0):
            warning_class: type[Warning] = RemovedInSphinx70Warning
        elif remove == (8, 0):
            warning_class = RemovedInSphinx80Warning
        else:
            raise RuntimeError(f'removal version {remove!r} is invalid!')

        qualified_name = f'{module}.{attribute}'
        if canonical_name:
            message = (f'The alias {qualified_name!r} is deprecated, '
                       f'use {canonical_name!r} instead.')
        else:
            message = f'{qualified_name!r} is deprecated.'

>       warnings.warn(message + " Check CHANGES for Sphinx API modifications.",
                      warning_class, stacklevel=3)
E       sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.

attribute  = 'progress_message'
canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
message    = "The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead."
module     = 'sphinx.util'
qualified_name = 'sphinx.util.progress_message'
remove     = (8, 0)
warning_class = <class 'sphinx.deprecation.RemovedInSphinx80Warning'>

/usr/lib/python3.8/site-packages/sphinx/deprecation.py:63: RemovedInSphinx80Warning
___________________________________________________________________________ ERROR at setup of test_simple_html[1] ___________________________________________________________________________

test_params = {'shared_result': None}
app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
make_app = <function make_app.<locals>.make at 0x7f5524f0d8b0>, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f05b50>

    @pytest.fixture(scope='function')
    def app(test_params: dict, app_params: tuple[dict, dict], make_app: Callable,
            shared_result: SharedResult) -> Generator[SphinxTestApp, None, None]:
        """
        Provides the 'sphinx.application.Sphinx' object
        """
        args, kwargs = app_params
>       app_ = make_app(*args, **kwargs)

app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
args       = ['html']
kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')}
make_app   = <function make_app.<locals>.make at 0x7f5524f0d8b0>
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f05b50>
test_params = {'shared_result': None}

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
    app_: Any = SphinxTestApp(*args, **kwargs)
        apps       = []
        args       = ('html',)
        kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root'), 'status': <_io.StringIO object at 0x7f5524f0d9d0>, ...}
        status     = <_io.StringIO object at 0x7f5524f0d9d0>
        test_params = {'shared_result': None}
        warning    = <_io.StringIO object at 0x7f5524f0da60>
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
    super().__init__(srcdir, confdir, outdir, doctreedir,
        __class__  = <class 'sphinx.testing.util.SphinxTestApp'>
        builddir   = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build')
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        docutilsconf = None
        freshenv   = True
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5524f0d9d0>
        tags       = None
        warning    = <_io.StringIO object at 0x7f5524f0da60>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:225: in __init__
    self.setup_extension(extension)
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        extension  = 'sphinxcontrib.htmlhelp'
        freshenv   = True
        keep_going = False
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        pdb        = False
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5524f0d9d0>
        tags       = None
        verbosity  = 0
        warning    = <_io.StringIO object at 0x7f5524f0da60>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
    self.registry.load_extension(self, extname)
        extname    = 'sphinxcontrib.htmlhelp'
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
/usr/lib/python3.8/site-packages/sphinx/registry.py:442: in load_extension
    mod = import_module(extname)
        app        = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524f056d0>
        extname    = 'sphinxcontrib.htmlhelp'
        prefix     = 'while setting up extension sphinxcontrib.htmlhelp:'
        self       = <sphinx.registry.SphinxComponentRegistry object at 0x7f5524f05670>
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
        level      = 0
        name       = 'sphinxcontrib.htmlhelp'
        package    = None
/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: in <module>
    from sphinx.util import progress_message
        Any        = typing.Any
        Config     = <class 'sphinx.config.Config'>
        Dict       = typing.Dict
        Element    = <class 'docutils.nodes.Element'>
        IndexEntries = <class 'sphinx.environment.adapters.indexentries.IndexEntries'>
        List       = typing.List
        Node       = <class 'docutils.nodes.Node'>
        Set        = typing.Set
        Sphinx     = <class 'sphinx.application.Sphinx'>
        StandaloneHTMLBuilder = <class 'sphinx.builders.html.StandaloneHTMLBuilder'>
        Tuple      = typing.Tuple
        Type       = typing.Type
        __builtins__ = <builtins>
        __cached__ = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__pycache__/__init__.cpython-38.pyc'
        __doc__    = '\n    sphinxcontrib.htmlhelp\n    ~~~~~~~~~~~~~~~~~~~~~~\n\n    Build HTML help support files.\n\n    :copyright: Copyright 2007-2019 by the Sphinx team, see README.\n    :license: BSD, see LICENSE for details.\n'
        __file__   = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x7f5524eb47f0>
        __name__   = 'sphinxcontrib.htmlhelp'
        __package__ = 'sphinxcontrib.htmlhelp'
        __path__   = ['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp']
        __spec__   = ModuleSpec(name='sphinxcontrib.htmlhelp', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f5524eb47f0...xcontrib/htmlhelp/__init__.py', submodule_search_locations=['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp'])
        __warningregistry__ = {'version': 66}
        addnodes   = <module 'sphinx.addnodes' from '/usr/lib/python3.8/site-packages/sphinx/addnodes.py'>
        document   = <class 'docutils.nodes.document'>
        get_translation = <function get_translation at 0x7f55263e5670>
        html       = <module 'html' from '/usr/lib64/python3.8/html/__init__.py'>
        logging    = <module 'sphinx.util.logging' from '/usr/lib/python3.8/site-packages/sphinx/util/logging.py'>
        nodes      = <module 'docutils.nodes' from '/usr/lib/python3.8/site-packages/docutils/nodes.py'>
        os         = <module 'os' from '/usr/lib64/python3.8/os.py'>
        path       = <module 'posixpath' from '/usr/lib64/python3.8/posixpath.py'>
/usr/lib/python3.8/site-packages/sphinx/util/__init__.py:408: in __getattr__
    _deprecation_warning(__name__, name, canonical_name, remove=(8, 0))
        _deprecation_warning = <function _deprecation_warning at 0x7f55266b4a60>
        canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
        deprecated_object = <class 'sphinx.util.display.progress_message'>
        name       = 'progress_message'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

module = 'sphinx.util', attribute = 'progress_message', canonical_name = 'sphinx.http_date.epoch_to_rfc1123'

    def _deprecation_warning(
        module: str,
        attribute: str,
        canonical_name: str,
        *,
        remove: tuple[int, int],
    ) -> None:
        """Helper function for module-level deprecations using __getattr__

        Exemplar usage:

        .. code:: python

           # deprecated name -> (object to return, canonical path or empty string)
           _DEPRECATED_OBJECTS = {
               'deprecated_name': (object_to_return, 'fully_qualified_replacement_name'),
           }


           def __getattr__(name):
               if name not in _DEPRECATED_OBJECTS:
                   raise AttributeError(f'module {__name__!r} has no attribute {name!r}')

               from sphinx.deprecation import _deprecation_warning

               deprecated_object, canonical_name = _DEPRECATED_OBJECTS[name]
               _deprecation_warning(__name__, name, canonical_name, remove=(7, 0))
               return deprecated_object
        """

        if remove == (7, 0):
            warning_class: type[Warning] = RemovedInSphinx70Warning
        elif remove == (8, 0):
            warning_class = RemovedInSphinx80Warning
        else:
            raise RuntimeError(f'removal version {remove!r} is invalid!')

        qualified_name = f'{module}.{attribute}'
        if canonical_name:
            message = (f'The alias {qualified_name!r} is deprecated, '
                       f'use {canonical_name!r} instead.')
        else:
            message = f'{qualified_name!r} is deprecated.'

>       warnings.warn(message + " Check CHANGES for Sphinx API modifications.",
                      warning_class, stacklevel=3)
E       sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.

attribute  = 'progress_message'
canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
message    = "The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead."
module     = 'sphinx.util'
qualified_name = 'sphinx.util.progress_message'
remove     = (8, 0)
warning_class = <class 'sphinx.deprecation.RemovedInSphinx80Warning'>

/usr/lib/python3.8/site-packages/sphinx/deprecation.py:63: RemovedInSphinx80Warning
___________________________________________________________________________ ERROR at setup of test_simple_html[2] ___________________________________________________________________________

test_params = {'shared_result': None}
app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
make_app = <function make_app.<locals>.make at 0x7f55259ceaf0>, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f99520>

    @pytest.fixture(scope='function')
    def app(test_params: dict, app_params: tuple[dict, dict], make_app: Callable,
            shared_result: SharedResult) -> Generator[SphinxTestApp, None, None]:
        """
        Provides the 'sphinx.application.Sphinx' object
        """
        args, kwargs = app_params
>       app_ = make_app(*args, **kwargs)

app_params = app_params(args=['html'], kwargs={'freshenv': True, 'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')})
args       = ['html']
kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root')}
make_app   = <function make_app.<locals>.make at 0x7f55259ceaf0>
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7f5524f99520>
test_params = {'shared_result': None}

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:178: in make
    app_: Any = SphinxTestApp(*args, **kwargs)
        apps       = []
        args       = ('html',)
        kwargs     = {'confoverrides': {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}, 'freshenv': True, 'srcdir': path('/tmp/pytest-of-tkloczko/pytest-71/root'), 'status': <_io.StringIO object at 0x7f5525a63040>, ...}
        status     = <_io.StringIO object at 0x7f5525a63040>
        test_params = {'shared_result': None}
        warning    = <_io.StringIO object at 0x7f5525a63790>
/usr/lib/python3.8/site-packages/sphinx/testing/util.py:138: in __init__
    super().__init__(srcdir, confdir, outdir, doctreedir,
        __class__  = <class 'sphinx.testing.util.SphinxTestApp'>
        builddir   = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build')
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        docutilsconf = None
        freshenv   = True
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63040>
        tags       = None
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:225: in __init__
    self.setup_extension(extension)
        buildername = 'html'
        confdir    = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        confoverrides = {'html_baseurl': 'https://example.org/docs/', 'language': 'en'}
        doctreedir = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/doctrees')
        extension  = 'sphinxcontrib.htmlhelp'
        freshenv   = True
        keep_going = False
        outdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root/_build/html')
        parallel   = 0
        pdb        = False
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
        srcdir     = path('/tmp/pytest-of-tkloczko/pytest-71/root')
        status     = <_io.StringIO object at 0x7f5525a63040>
        tags       = None
        verbosity  = 0
        warning    = <_io.StringIO object at 0x7f5525a63790>
        warningiserror = False
/usr/lib/python3.8/site-packages/sphinx/application.py:404: in setup_extension
    self.registry.load_extension(self, extname)
        extname    = 'sphinxcontrib.htmlhelp'
        self       = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
/usr/lib/python3.8/site-packages/sphinx/registry.py:442: in load_extension
    mod = import_module(extname)
        app        = <[AttributeError("'SphinxTestApp' object has no attribute 'builder'") raised in repr()] SphinxTestApp object at 0x7f5524ec03a0>
        extname    = 'sphinxcontrib.htmlhelp'
        prefix     = 'while setting up extension sphinxcontrib.htmlhelp:'
        self       = <sphinx.registry.SphinxComponentRegistry object at 0x7f5524ec04f0>
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
        level      = 0
        name       = 'sphinxcontrib.htmlhelp'
        package    = None
/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: in <module>
    from sphinx.util import progress_message
        Any        = typing.Any
        Config     = <class 'sphinx.config.Config'>
        Dict       = typing.Dict
        Element    = <class 'docutils.nodes.Element'>
        IndexEntries = <class 'sphinx.environment.adapters.indexentries.IndexEntries'>
        List       = typing.List
        Node       = <class 'docutils.nodes.Node'>
        Set        = typing.Set
        Sphinx     = <class 'sphinx.application.Sphinx'>
        StandaloneHTMLBuilder = <class 'sphinx.builders.html.StandaloneHTMLBuilder'>
        Tuple      = typing.Tuple
        Type       = typing.Type
        __builtins__ = <builtins>
        __cached__ = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__pycache__/__init__.cpython-38.pyc'
        __doc__    = '\n    sphinxcontrib.htmlhelp\n    ~~~~~~~~~~~~~~~~~~~~~~\n\n    Build HTML help support files.\n\n    :copyright: Copyright 2007-2019 by the Sphinx team, see README.\n    :license: BSD, see LICENSE for details.\n'
        __file__   = '/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py'
        __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x7f5524e67be0>
        __name__   = 'sphinxcontrib.htmlhelp'
        __package__ = 'sphinxcontrib.htmlhelp'
        __path__   = ['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp']
        __spec__   = ModuleSpec(name='sphinxcontrib.htmlhelp', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f5524e67be0...xcontrib/htmlhelp/__init__.py', submodule_search_locations=['/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp'])
        __warningregistry__ = {'version': 99}
        addnodes   = <module 'sphinx.addnodes' from '/usr/lib/python3.8/site-packages/sphinx/addnodes.py'>
        document   = <class 'docutils.nodes.document'>
        get_translation = <function get_translation at 0x7f55263e5670>
        html       = <module 'html' from '/usr/lib64/python3.8/html/__init__.py'>
        logging    = <module 'sphinx.util.logging' from '/usr/lib/python3.8/site-packages/sphinx/util/logging.py'>
        nodes      = <module 'docutils.nodes' from '/usr/lib/python3.8/site-packages/docutils/nodes.py'>
        os         = <module 'os' from '/usr/lib64/python3.8/os.py'>
        path       = <module 'posixpath' from '/usr/lib64/python3.8/posixpath.py'>
/usr/lib/python3.8/site-packages/sphinx/util/__init__.py:408: in __getattr__
    _deprecation_warning(__name__, name, canonical_name, remove=(8, 0))
        _deprecation_warning = <function _deprecation_warning at 0x7f55266b4a60>
        canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
        deprecated_object = <class 'sphinx.util.display.progress_message'>
        name       = 'progress_message'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

module = 'sphinx.util', attribute = 'progress_message', canonical_name = 'sphinx.http_date.epoch_to_rfc1123'

    def _deprecation_warning(
        module: str,
        attribute: str,
        canonical_name: str,
        *,
        remove: tuple[int, int],
    ) -> None:
        """Helper function for module-level deprecations using __getattr__

        Exemplar usage:

        .. code:: python

           # deprecated name -> (object to return, canonical path or empty string)
           _DEPRECATED_OBJECTS = {
               'deprecated_name': (object_to_return, 'fully_qualified_replacement_name'),
           }


           def __getattr__(name):
               if name not in _DEPRECATED_OBJECTS:
                   raise AttributeError(f'module {__name__!r} has no attribute {name!r}')

               from sphinx.deprecation import _deprecation_warning

               deprecated_object, canonical_name = _DEPRECATED_OBJECTS[name]
               _deprecation_warning(__name__, name, canonical_name, remove=(7, 0))
               return deprecated_object
        """

        if remove == (7, 0):
            warning_class: type[Warning] = RemovedInSphinx70Warning
        elif remove == (8, 0):
            warning_class = RemovedInSphinx80Warning
        else:
            raise RuntimeError(f'removal version {remove!r} is invalid!')

        qualified_name = f'{module}.{attribute}'
        if canonical_name:
            message = (f'The alias {qualified_name!r} is deprecated, '
                       f'use {canonical_name!r} instead.')
        else:
            message = f'{qualified_name!r} is deprecated.'

>       warnings.warn(message + " Check CHANGES for Sphinx API modifications.",
                      warning_class, stacklevel=3)
E       sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.

attribute  = 'progress_message'
canonical_name = 'sphinx.http_date.epoch_to_rfc1123'
message    = "The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead."
module     = 'sphinx.util'
qualified_name = 'sphinx.util.progress_message'
remove     = (8, 0)
warning_class = <class 'sphinx.deprecation.RemovedInSphinx80Warning'>

/usr/lib/python3.8/site-packages/sphinx/deprecation.py:63: RemovedInSphinx80Warning
================================================================================== short test summary info ==================================================================================
ERROR tests/test_basic.py::test_simple_html[0] - sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modif...
ERROR tests/test_basic.py::test_simple_html[1] - sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modif...
ERROR tests/test_basic.py::test_simple_html[2] - sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modif...
================================================================================ 1 passed, 3 errors in 0.54s ================================================================================

Here is list of installed modules in build env

Package                       Version
----------------------------- --------
alabaster                     0.7.13
asttokens                     2.2.1
Babel                         2.12.1
backcall                      0.2.0
build                         0.10.0
charset-normalizer            3.1.0
decorator                     5.1.1
distro                        1.8.0
docutils                      0.19
editables                     0.4
exceptiongroup                1.1.1
executing                     1.2.0
gpg                           1.20.0
hatchling                     1.18.0
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.7.0
iniconfig                     2.0.0
installer                     0.7.0
ipython                       8.12.0
jedi                          0.18.2
Jinja2                        3.1.2
libcomps                      0.1.19
MarkupSafe                    2.1.2
matplotlib-inline             0.1.6
packaging                     23.1
parso                         0.8.3
pathspec                      0.11.1
pexpect                       4.8.0
pickleshare                   0.7.5
pluggy                        1.0.0
prompt-toolkit                3.0.38
ptyprocess                    0.7.0
pure-eval                     0.2.2
Pygments                      2.15.1
pyproject_hooks               1.0.0
pytest                        7.4.0
python-dateutil               2.8.2
pytz                          2023.2
requests                      2.31.0
setuptools                    68.0.0
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        6.2.1
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
stack-data                    0.6.2
tomli                         2.0.1
traitlets                     5.9.0
trove-classifiers             2023.7.6
typing_extensions             4.7.1
urllib3                       1.26.15
wcwidth                       0.2.6
wheel                         0.40.0
zipp                          3.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions