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

gh-120590: Fix test_pydoc in the refleak hunting mode #120615

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jun 17, 2024

Mocking only works if sys.modules['pydoc'] and pydoc are the same, but some pydoc functions reload the module and change sys.modules. Ensure that sys.modules['pydoc'] is always restored after the corresponding tests.

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jun 17, 2024
@serhiy-storchaka serhiy-storchaka merged commit 2cf4738 into python:main Jun 18, 2024
36 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the test_pydoc branch June 18, 2024 09:19
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 18, 2024
…-120615)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
(cherry picked from commit 2cf4738)

Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 18, 2024
…-120615)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
(cherry picked from commit 2cf4738)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jun 18, 2024

GH-120669 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 18, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jun 18, 2024

GH-120670 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 18, 2024
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Clang Installed 3.x has failed when building commit 2cf4738.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/14/builds/6267) and take a look at the build logs.
  4. Check if the failure is related to this commit (2cf4738) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/14/builds/6267

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 6, done.        
remote: Counting objects:  16% (1/6)        
remote: Counting objects:  33% (2/6)        
remote: Counting objects:  50% (3/6)        
remote: Counting objects:  66% (4/6)        
remote: Counting objects:  83% (5/6)        
remote: Counting objects: 100% (6/6)        
remote: Counting objects: 100% (6/6), done.        
remote: Compressing objects:  16% (1/6)        
remote: Compressing objects:  33% (2/6)        
remote: Compressing objects:  50% (3/6)        
remote: Compressing objects:  66% (4/6)        
remote: Compressing objects:  83% (5/6)        
remote: Compressing objects: 100% (6/6)        
remote: Compressing objects: 100% (6/6), done.        
remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '2cf47389e26cb591342d07dad98619916d5a1b15'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 2cf47389e2 gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615)
Switched to and reset branch 'main'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

Python/import.c:1555:1: warning: unused function 'is_core_module' [-Wunused-function]
 1555 | is_core_module(PyInterpreterState *interp, PyObject *name, PyObject *path)
      | ^~~~~~~~~~~~~~
Python/pystate.c:1135:1: warning: unused function 'check_interpreter_whence' [-Wunused-function]
 1135 | check_interpreter_whence(long whence)
      | ^~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
1 warning generated.

ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device: '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/bin/pip3'

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ~~~~~~~~~~~~~~~^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/Lib/ensurepip/__init__.py", line 257, in _main
    return _bootstrap(
        root=args.root,
    ...<4 lines>...
        default_pip=args.default_pip,
    )
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/Lib/ensurepip/__init__.py", line 172, in _bootstrap
    return _run_pip([*args, "pip"], [os.fsdecode(tmp_wheel_path)])
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/Lib/ensurepip/__init__.py", line 87, in _run_pip
    return subprocess.run(cmd, check=True).returncode
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmpgh76f2w9/pip-24.0-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmpgh76f2w9\', \'--root\', \'/\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [Makefile:2282: install] Error 1

serhiy-storchaka added a commit that referenced this pull request Jun 18, 2024
…) (GH-120670)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
(cherry picked from commit 2cf4738)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable 3.x has failed when building commit 2cf4738.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/543/builds/6142) and take a look at the build logs.
  4. Check if the failure is related to this commit (2cf4738) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/543/builds/6142

Failed tests:

  • test_pdb
  • test_cext
  • test_cppext

Failed subtests:

  • test_pdbrc_commands - test.test_pdb.PdbTestCase.test_pdbrc_commands
  • test_pdbrc_alias - test.test_pdb.PdbTestCase.test_pdbrc_alias
  • test_relative_imports_on_plain_module - test.test_pdb.PdbTestCase.test_relative_imports_on_plain_module
  • test_build_c99 - test.test_cext.TestExt.test_build_c99
  • test_pdbrc_semicolon - test.test_pdb.PdbTestCase.test_pdbrc_semicolon
  • test_pdbrc_basic - test.test_pdb.PdbTestCase.test_pdbrc_basic
  • test_run_module - test.test_pdb.PdbTestCase.test_run_module
  • test_package_without_a_main - test.test_pdb.PdbTestCase.test_package_without_a_main
  • test_relative_imports - test.test_pdb.PdbTestCase.test_relative_imports
  • test_build - test.test_cppext.TestCPPExt.test_build
  • test_build_limited - test.test_cext.TestExt.test_build_limited
  • test_build_c11 - test.test_cext.TestExt.test_build_c11
  • test_build_cpp03 - test.test_cppext.TestCPPExt.test_build_cpp03
  • test_readrc_kwarg - test.test_pdb.PdbTestCase.test_readrc_kwarg

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3250, in test_pdbrc_alias
    stdout, stderr = self.run_pdb_script(script, 'q\n', pdbrc=pdbrc, remove_home=True)
                     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 2900, in run_pdb_script
    with open(filename, 'w') as f:
         ~~~~^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3292, in test_readrc_kwarg
    stdout, stderr = self.run_pdb_script(script, 'q\n', pdbrc='invalid', remove_home=True)
                     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 2900, in run_pdb_script
    with open(filename, 'w') as f:
         ~~~~^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3391, in test_package_without_a_main
    os.makedirs(modpath)
    ~~~~~~~~~~~^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/os.py", line 225, in makedirs
    makedirs(head, exist_ok=exist_ok)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/os.py", line 235, in makedirs
    mkdir(name, mode)
    ~~~~~^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: 't_pkg'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 29, in test_build
    self.check_build('_testcppext')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 47, in check_build
    self._check_build(extension_name, python_exe, std=std)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 79, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 62, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_651549æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_651549æ/tempcwd/pkg']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3231, in test_pdbrc_empty_line
    stdout, stderr = self.run_pdb_script(script, 'q\n', pdbrc=pdbrc, remove_home=True)
                     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 2900, in run_pdb_script
    with open(filename, 'w') as f:
         ~~~~^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 37, in test_build_c11
    self.check_build('_test_c11_cext', std='c11')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 53, in check_build
    with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2374, in setup_venv_with_pip_setuptools_wheel
    run_command(cmd)
    ~~~~~~~~~~~^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2349, in run_command
    subprocess.run(cmd, check=True)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/setuptools-67.6.1-py3-none-any.whl', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/wheel-0.43.0-py3-none-any.whl']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 37, in test_build_c11
    self.check_build('_test_c11_cext', std='c11')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 53, in check_build
    with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2374, in setup_venv_with_pip_setuptools_wheel
    run_command(cmd)
    ~~~~~~~~~~~^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2349, in run_command
    subprocess.run(cmd, check=True)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_657367æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/setuptools-67.6.1-py3-none-any.whl', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/wheel-0.43.0-py3-none-any.whl']' returned non-zero exit status 1.


Traceback (most recent call last):
        File "<string>", line 2, in <module>
          exec(compile('''
          ~~~~^^^^^^^^^^^^
          # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ...<31 lines>...
          exec(compile(setup_py_code, filename, "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ''' % ('/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/pkg/setup.py',), "<pip-setuptools-caller>", "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/pkg/setup.py", line 100, in <module>
          main()
          ~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/pkg/setup.py", line 94, in main
          setup(name=f'internal_{module_name}',
          ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                version='0.0',
                ^^^^^^^^^^^^^^
                ext_modules=[ext])
                ^^^^^^^^^^^^^^^^^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
                 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
          ~~~~~~~~~~~~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
          ~~~~~~~~~~~~~~~~^^^^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/command/egg_info.py", line 318, in run
          self.find_sources()
          ~~~~~~~~~~~~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/command/egg_info.py", line 326, in find_sources
          mm.run()
          ~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/command/egg_info.py", line 570, in run
          self.add_defaults()
          ~~~~~~~~~~~~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/command/egg_info.py", line 608, in add_defaults
          sdist.add_defaults(self)
          ~~~~~~~~~~~~~~~~~~^^^^^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/command/sdist.py", line 106, in add_defaults
          super().add_defaults()
          ~~~~~~~~~~~~~~~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
          ~~~~~~~~~~~~~~~~~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
          build_ext = self.get_finalized_command('build_ext')
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/cmd.py", line 304, in get_finalized_command
          cmd_obj = self.distribution.get_command_obj(command, create)
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/dist.py", line 860, in get_command_obj
          klass = self.get_command_class(command)
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/dist.py", line 966, in get_command_class
          self.cmdclass[command] = cmdclass = ep.load()
                                              ~~~~~~~^^
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/importlib/metadata/__init__.py", line 179, in load
          module = import_module(match.group('module'))
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/importlib/__init__.py", line 88, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 1023, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/command/build_ext.py", line 8, in <module>
          from distutils.command.build_ext import build_ext as _du_build_ext
        File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/lib64/python3.14/site-packages/setuptools/_distutils/command/build_ext.py", line 20, in <module>
          from ..sysconfig import customize_compiler, get_python_version
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 1019, in exec_module
        File "<frozen importlib._bootstrap_external>", line 1152, in get_code
        File "<frozen importlib._bootstrap_external>", line 781, in _compile_bytecode
      EOFError: marshal data too short
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
rror: metadata-generation-failed


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 32, in test_build_cpp03
    self.check_build('_testcpp03ext', std='c++03')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 46, in check_build
    with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2374, in setup_venv_with_pip_setuptools_wheel
    run_command(cmd)
    ~~~~~~~~~~~^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2349, in run_command
    subprocess.run(cmd, check=True)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_651549æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/setuptools-67.6.1-py3-none-any.whl', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/wheel-0.43.0-py3-none-any.whl']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 41, in test_build_c99
    self.check_build('_test_c99_cext', std='c99')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 53, in check_build
    with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2374, in setup_venv_with_pip_setuptools_wheel
    run_command(cmd)
    ~~~~~~~~~~~^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2349, in run_command
    subprocess.run(cmd, check=True)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_657367æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/setuptools-67.6.1-py3-none-any.whl', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/wheel-0.43.0-py3-none-any.whl']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 45, in test_build_limited
    self.check_build('_test_limited_cext', limited=True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 53, in check_build
    with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2374, in setup_venv_with_pip_setuptools_wheel
    run_command(cmd)
    ~~~~~~~~~~~^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2349, in run_command
    subprocess.run(cmd, check=True)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/setuptools-67.6.1-py3-none-any.whl', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/wheel-0.43.0-py3-none-any.whl']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 29, in test_build
    self.check_build('_testcppext')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cppext/__init__.py", line 46, in check_build
    with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2374, in setup_venv_with_pip_setuptools_wheel
    run_command(cmd)
    ~~~~~~~~~~~^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 2349, in run_command
    subprocess.run(cmd, check=True)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_657366æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/setuptools-67.6.1-py3-none-any.whl', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/wheeldata/wheel-0.43.0-py3-none-any.whl']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3323, in test_run_module
    stdout, stderr = self.run_pdb_module(script, commands)
                     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 2925, in run_pdb_module
    os.mkdir(self.module_name)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: 't_main'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 41, in test_build_c99
    self.check_build('_test_c99_cext', std='c99')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 54, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 89, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_cext/__init__.py", line 72, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/build_oot/build/test_python_649627æ/tempcwd/pkg']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3266, in test_pdbrc_semicolon
    stdout, stderr = self.run_pdb_script(script, 'q\n', pdbrc=pdbrc, remove_home=True)
                     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 2900, in run_pdb_script
    with open(filename, 'w') as f:
         ~~~~^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3284, in test_pdbrc_commands
    stdout, stderr = self.run_pdb_script(script, 'q\n', pdbrc=pdbrc, remove_home=True)
                     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 2900, in run_pdb_script
    with open(filename, 'w') as f:
         ~~~~^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3557, in test_relative_imports_on_plain_module
    os.mkdir(self.module_name)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: 't_main'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3212, in test_pdbrc_basic
    stdout, stderr = self.run_pdb_script(script, 'q\n', pdbrc=pdbrc, remove_home=True)
                     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 2900, in run_pdb_script
    with open(filename, 'w') as f:
         ~~~~^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64/build/Lib/test/test_pdb.py", line 3519, in test_relative_imports
    os.mkdir(self.module_name)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: 't_main'

serhiy-storchaka added a commit that referenced this pull request Jun 18, 2024
…) (GH-120669)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
(cherry picked from commit 2cf4738)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows Server 2022 NoGIL 3.13 has failed when building commit 451cb71.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1488/builds/238) and take a look at the build logs.
  4. Check if the failure is related to this commit (451cb71) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1488/builds/238

Failed tests:

  • test_launcher

Failed subtests:

  • test_search_major_3 - test.test_launcher.TestLauncher.test_search_major_3
  • test_search_major_2 - test.test_launcher.TestLauncher.test_search_major_2

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_launcher.py", line 462, in test_search_major_2
    self.assertEqual("PythonCore", data["env.company"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'PythonCore' != 'PythonTestSuite'
- PythonCore
+ PythonTestSuite


Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_launcher.py", line 442, in test_search_major_3
    self.assertEqual("PythonCore", data["env.company"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'PythonCore' != 'PythonTestSuite'
- PythonCore
+ PythonTestSuite

mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
…-120615)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…-120615)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…-120615)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants