Your message dated Tue, 12 Oct 2021 20:22:47 +0000
with message-id <e1maoir-0006qt...@fasolo.debian.org>
and subject line Bug#995737: fixed in pytest-doctestplus 0.11.0-2
has caused the Debian Bug report #995737,
regarding pytest breaks pytest-doctestplus autopkgtest: 
pytest.PytestAssertRewriteWarning: Module already imported so cannot be 
rewritten: pytest_doctestplus
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
995737: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995737
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: pytest, pytest-doctestplus
Control: found -1 pytest/6.2.5-1
Control: found -1 pytest-doctestplus/0.11.0-1
Severity: serious
Tags: sid bookworm
X-Debbugs-CC: debian...@lists.debian.org
User: debian...@lists.debian.org
Usertags: breaks needs-update

Dear maintainer(s),

With a recent upload of pytest the autopkgtest of pytest-doctestplus
fails in testing when that autopkgtest is run with the binary packages
of pytest from unstable. It passes when run with only packages from
testing. In tabular form:

                       pass            fail
pytest                 from testing    6.2.5-1
pytest-doctestplus     from testing    0.11.0-1
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of pytest to testing
[1]. Due to the nature of this issue, I filed this bug report against
both packages. Can you please investigate the situation and reassign the
bug to the right package?

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=pytest

https://ci.debian.net/data/autopkgtest/testing/amd64/p/pytest-doctestplus/15768646/log.gz

=================================== FAILURES
===================================
_________________________ test_ignore_warnings_module
__________________________

testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_ignore_warnings_module0')>

    def test_ignore_warnings_module(testdir):

        # First check that we get a warning if we don't add the
IGNORE_WARNINGS
        # directive
        p = testdir.makepyfile(
            """
            def myfunc():
                '''
                >>> import warnings
                >>> warnings.warn('A warning occurred', UserWarning)
                '''
                pass
            """)
>       reprec = testdir.inline_run(p, "--doctest-plus", "-W error")

/tmp/autopkgtest-lxc.37ycsxwg/downtmp/build.mpq/src/tests/test_doctestplus.py:414:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/_pytest/pytester.py:1615: in inline_run
    return self._pytester.inline_run(
/usr/lib/python3/dist-packages/_pytest/pytester.py:1072: in inline_run
    ret = main([str(x) for x in args], plugins=plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:143: in main
    config = _prepareconfig(args, plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:318: in
_prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
/usr/lib/python3/dist-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:92: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:83: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
/usr/lib/python3/dist-packages/_pytest/helpconfig.py:100: in
pytest_cmdline_parse
    config: Config = outcome.get_result()
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1003: in
pytest_cmdline_parse
    self.parse(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1283: in parse
    self._preparse(args, addopts=addopts)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1167: in _preparse
    self._consider_importhook(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1114: in
_consider_importhook
    self._mark_plugins_for_rewrite(hook)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1135: in
_mark_plugins_for_rewrite
    hook.mark_rewrite(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:259: in
mark_rewrite
    self._warn_already_imported(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:266: in
_warn_already_imported
    self.config.issue_config_time_warning(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

self = <_pytest.config.Config object at 0x7ff7857c78e0>
warning = PytestAssertRewriteWarning('Module already imported so cannot
be rewritten: pytest_doctestplus')
stacklevel = 5

    def issue_config_time_warning(self, warning: Warning, stacklevel:
int) -> None:
        """Issue and handle a warning during the "configure" stage.

        During ``pytest_configure`` we can't capture warnings using the
``catch_warnings_for_item``
        function because it is not possible to have hookwrappers around
``pytest_configure``.

        This function is mainly intended for plugins that need to issue
warnings during
        ``pytest_configure`` (or similar stages).

        :param warning: The warning instance.
        :param stacklevel: stacklevel forwarded to warnings.warn.
        """
        if self.pluginmanager.is_blocked("warnings"):
            return

        cmdline_filters = self.known_args_namespace.pythonwarnings or []
        config_filters = self.getini("filterwarnings")

        with warnings.catch_warnings(record=True) as records:
            warnings.simplefilter("always", type(warning))
            apply_warning_filters(config_filters, cmdline_filters)
>           warnings.warn(warning, stacklevel=stacklevel)
E           pytest.PytestAssertRewriteWarning: Module already imported
so cannot be rewritten: pytest_doctestplus

/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1321:
PytestAssertRewriteWarning
___________________________ test_ignore_warnings_rst
___________________________

testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_ignore_warnings_rst0')>

    def test_ignore_warnings_rst(testdir):

        # First check that we get a warning if we don't add the
IGNORE_WARNINGS
        # directive
        p = testdir.makefile(".rst",
                             """
            ::
                >>> import warnings
                >>> warnings.warn('A warning occurred', UserWarning)
            """)
>       reprec = testdir.inline_run(p, "--doctest-plus", "--doctest-rst",
                                    "--text-file-format=rst", "-W error")

/tmp/autopkgtest-lxc.37ycsxwg/downtmp/build.mpq/src/tests/test_doctestplus.py:441:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/_pytest/pytester.py:1615: in inline_run
    return self._pytester.inline_run(
/usr/lib/python3/dist-packages/_pytest/pytester.py:1072: in inline_run
    ret = main([str(x) for x in args], plugins=plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:143: in main
    config = _prepareconfig(args, plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:318: in
_prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
/usr/lib/python3/dist-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:92: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:83: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
/usr/lib/python3/dist-packages/_pytest/helpconfig.py:100: in
pytest_cmdline_parse
    config: Config = outcome.get_result()
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1003: in
pytest_cmdline_parse
    self.parse(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1283: in parse
    self._preparse(args, addopts=addopts)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1167: in _preparse
    self._consider_importhook(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1114: in
_consider_importhook
    self._mark_plugins_for_rewrite(hook)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1135: in
_mark_plugins_for_rewrite
    hook.mark_rewrite(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:259: in
mark_rewrite
    self._warn_already_imported(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:266: in
_warn_already_imported
    self.config.issue_config_time_warning(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

self = <_pytest.config.Config object at 0x7ff784d29640>
warning = PytestAssertRewriteWarning('Module already imported so cannot
be rewritten: pytest_doctestplus')
stacklevel = 5

    def issue_config_time_warning(self, warning: Warning, stacklevel:
int) -> None:
        """Issue and handle a warning during the "configure" stage.

        During ``pytest_configure`` we can't capture warnings using the
``catch_warnings_for_item``
        function because it is not possible to have hookwrappers around
``pytest_configure``.

        This function is mainly intended for plugins that need to issue
warnings during
        ``pytest_configure`` (or similar stages).

        :param warning: The warning instance.
        :param stacklevel: stacklevel forwarded to warnings.warn.
        """
        if self.pluginmanager.is_blocked("warnings"):
            return

        cmdline_filters = self.known_args_namespace.pythonwarnings or []
        config_filters = self.getini("filterwarnings")

        with warnings.catch_warnings(record=True) as records:
            warnings.simplefilter("always", type(warning))
            apply_warning_filters(config_filters, cmdline_filters)
>           warnings.warn(warning, stacklevel=stacklevel)
E           pytest.PytestAssertRewriteWarning: Module already imported
so cannot be rewritten: pytest_doctestplus

/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1321:
PytestAssertRewriteWarning
__________________________ test_show_warnings_module
___________________________

testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_show_warnings_module0')>

    def test_show_warnings_module(testdir):

        p = testdir.makepyfile(
            """
            def myfunc():
                '''
                >>> import warnings
                >>> warnings.warn('A warning occurred', UserWarning)  #
doctest: +SHOW_WARNINGS
                UserWarning: A warning occurred
                '''
                pass
            """)
>       reprec = testdir.inline_run(p, "--doctest-plus", "-W error")

/tmp/autopkgtest-lxc.37ycsxwg/downtmp/build.mpq/src/tests/test_doctestplus.py:469:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/_pytest/pytester.py:1615: in inline_run
    return self._pytester.inline_run(
/usr/lib/python3/dist-packages/_pytest/pytester.py:1072: in inline_run
    ret = main([str(x) for x in args], plugins=plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:143: in main
    config = _prepareconfig(args, plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:318: in
_prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
/usr/lib/python3/dist-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:92: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:83: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
/usr/lib/python3/dist-packages/_pytest/helpconfig.py:100: in
pytest_cmdline_parse
    config: Config = outcome.get_result()
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1003: in
pytest_cmdline_parse
    self.parse(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1283: in parse
    self._preparse(args, addopts=addopts)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1167: in _preparse
    self._consider_importhook(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1114: in
_consider_importhook
    self._mark_plugins_for_rewrite(hook)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1135: in
_mark_plugins_for_rewrite
    hook.mark_rewrite(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:259: in
mark_rewrite
    self._warn_already_imported(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:266: in
_warn_already_imported
    self.config.issue_config_time_warning(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

self = <_pytest.config.Config object at 0x7ff7857c7eb0>
warning = PytestAssertRewriteWarning('Module already imported so cannot
be rewritten: pytest_doctestplus')
stacklevel = 5

    def issue_config_time_warning(self, warning: Warning, stacklevel:
int) -> None:
        """Issue and handle a warning during the "configure" stage.

        During ``pytest_configure`` we can't capture warnings using the
``catch_warnings_for_item``
        function because it is not possible to have hookwrappers around
``pytest_configure``.

        This function is mainly intended for plugins that need to issue
warnings during
        ``pytest_configure`` (or similar stages).

        :param warning: The warning instance.
        :param stacklevel: stacklevel forwarded to warnings.warn.
        """
        if self.pluginmanager.is_blocked("warnings"):
            return

        cmdline_filters = self.known_args_namespace.pythonwarnings or []
        config_filters = self.getini("filterwarnings")

        with warnings.catch_warnings(record=True) as records:
            warnings.simplefilter("always", type(warning))
            apply_warning_filters(config_filters, cmdline_filters)
>           warnings.warn(warning, stacklevel=stacklevel)
E           pytest.PytestAssertRewriteWarning: Module already imported
so cannot be rewritten: pytest_doctestplus

/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1321:
PytestAssertRewriteWarning
____________________________ test_show_warnings_rst
____________________________

testdir = <Testdir
local('/tmp/pytest-of-debci/pytest-0/test_show_warnings_rst0')>

    def test_show_warnings_rst(testdir):

        p = testdir.makefile(".rst",
                             """
            ::
                >>> import warnings
                >>> warnings.warn('A warning occurred', UserWarning)  #
doctest: +SHOW_WARNINGS
                UserWarning: A warning occurred
            """)
>       reprec = testdir.inline_run(p, "--doctest-plus", "--doctest-rst",
                                    "--text-file-format=rst", "-W error")

/tmp/autopkgtest-lxc.37ycsxwg/downtmp/build.mpq/src/tests/test_doctestplus.py:495:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/_pytest/pytester.py:1615: in inline_run
    return self._pytester.inline_run(
/usr/lib/python3/dist-packages/_pytest/pytester.py:1072: in inline_run
    ret = main([str(x) for x in args], plugins=plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:143: in main
    config = _prepareconfig(args, plugins)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:318: in
_prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
/usr/lib/python3/dist-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:92: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python3/dist-packages/pluggy/manager.py:83: in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
/usr/lib/python3/dist-packages/_pytest/helpconfig.py:100: in
pytest_cmdline_parse
    config: Config = outcome.get_result()
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1003: in
pytest_cmdline_parse
    self.parse(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1283: in parse
    self._preparse(args, addopts=addopts)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1167: in _preparse
    self._consider_importhook(args)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1114: in
_consider_importhook
    self._mark_plugins_for_rewrite(hook)
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1135: in
_mark_plugins_for_rewrite
    hook.mark_rewrite(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:259: in
mark_rewrite
    self._warn_already_imported(name)
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:266: in
_warn_already_imported
    self.config.issue_config_time_warning(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

self = <_pytest.config.Config object at 0x7ff784df0760>
warning = PytestAssertRewriteWarning('Module already imported so cannot
be rewritten: pytest_doctestplus')
stacklevel = 5

    def issue_config_time_warning(self, warning: Warning, stacklevel:
int) -> None:
        """Issue and handle a warning during the "configure" stage.

        During ``pytest_configure`` we can't capture warnings using the
``catch_warnings_for_item``
        function because it is not possible to have hookwrappers around
``pytest_configure``.

        This function is mainly intended for plugins that need to issue
warnings during
        ``pytest_configure`` (or similar stages).

        :param warning: The warning instance.
        :param stacklevel: stacklevel forwarded to warnings.warn.
        """
        if self.pluginmanager.is_blocked("warnings"):
            return

        cmdline_filters = self.known_args_namespace.pythonwarnings or []
        config_filters = self.getini("filterwarnings")

        with warnings.catch_warnings(record=True) as records:
            warnings.simplefilter("always", type(warning))
            apply_warning_filters(config_filters, cmdline_filters)
>           warnings.warn(warning, stacklevel=stacklevel)
E           pytest.PytestAssertRewriteWarning: Module already imported
so cannot be rewritten: pytest_doctestplus

/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1321:
PytestAssertRewriteWarning
=========================== short test summary info
============================
FAILED tests/test_doctestplus.py::test_ignore_warnings_module -
pytest.Pytest...
FAILED tests/test_doctestplus.py::test_ignore_warnings_rst -
pytest.PytestAss...
FAILED tests/test_doctestplus.py::test_show_warnings_module -
pytest.PytestAs...
FAILED tests/test_doctestplus.py::test_show_warnings_rst -
pytest.PytestAsser...
========================= 4 failed, 39 passed in 3.55s
=========================

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Source: pytest-doctestplus
Source-Version: 0.11.0-2
Done: Stefano Rivera <stefa...@debian.org>

We believe that the bug you reported is fixed in the latest version of
pytest-doctestplus, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 995...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stefano Rivera <stefa...@debian.org> (supplier of updated pytest-doctestplus 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 12 Oct 2021 12:34:41 -0700
Source: pytest-doctestplus
Architecture: source
Version: 0.11.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+pyt...@tracker.debian.org>
Changed-By: Stefano Rivera <stefa...@debian.org>
Closes: 995737
Changes:
 pytest-doctestplus (0.11.0-2) unstable; urgency=medium
 .
   * Team Upload.
   * Run autopkgtests outside the source package to use the installed module
     (Closes: #995737)
   * Run autopkgtests against all supported Python 3 versions.
Checksums-Sha1:
 83549b5b57b06c5404bc57247e5e431af841bdae 1684 pytest-doctestplus_0.11.0-2.dsc
 d6009eff47bb41f18517e4b0611aadf1a187eb60 3156 
pytest-doctestplus_0.11.0-2.debian.tar.xz
 f68eec3c21f9afdaa649e777c0c2d4072185ab0d 6224 
pytest-doctestplus_0.11.0-2_source.buildinfo
Checksums-Sha256:
 178e6c3f2d170462e8d1c41d1fa5ee5888a0b569597981701097c5b4c3276aa0 1684 
pytest-doctestplus_0.11.0-2.dsc
 9a75515adb4ee0210231f7b5d6244bff48e35db9aee7ce4741d32324f26996c4 3156 
pytest-doctestplus_0.11.0-2.debian.tar.xz
 59db8c6a612b36f60aa2207b120745fd17be6287892a847ab926ddc8d11bb534 6224 
pytest-doctestplus_0.11.0-2_source.buildinfo
Files:
 4323a765e3857705d594c63caa39b269 1684 python optional 
pytest-doctestplus_0.11.0-2.dsc
 9479cdeba5555154737ddaa8822eea5b 3156 python optional 
pytest-doctestplus_0.11.0-2.debian.tar.xz
 8da3d0a208789a0644a17d457d49add2 6224 python optional 
pytest-doctestplus_0.11.0-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iIoEARYKADIWIQTumtb5BSD6EfafSCRHew2wJjpU2AUCYWXjZhQcc3RlZmFub3JA
ZGViaWFuLm9yZwAKCRBHew2wJjpU2CL+AP9hsMfFcZ6QkVMmm2asSgPf5vHUuGGf
HfidTZaq7k7yDAD/fcCyj0C+0EZJIqmC/8hNGFCsMd6xyDlF0BgxYWqNNgw=
=saLe
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to