ipython / ipython

Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.

Home Page:https://ipython.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

: documentation build fails with `cannot import name 'system' from 'IPython.utils.process'` error

kloczek opened this issue · comments

Looks like something is wrong ant with new version is no longer possible to build documentation

+ /usr/bin/sphinx-build -n -T -b man docs/source build/sphinx/man
Running Sphinx v7.3.7

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/sphinx/registry.py", line 453, in load_extension
    mod = import_module(extname)
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/__init__.py", line 54, in <module>
    from .core.application import Application
  File "/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/core/application.py", line 26, in <module>
    from IPython.core import release, crashhandler
  File "/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/core/crashhandler.py", line 27, in <module>
    from IPython.core import ultratb
  File "/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/core/ultratb.py", line 115, in <module>
    from IPython.utils import path as util_path
  File "/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/utils/path.py", line 17, in <module>
    from IPython.utils.process import system
ImportError: cannot import name 'system' from 'IPython.utils.process' (/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/utils/process.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/sphinx/cmd/build.py", line 332, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/usr/lib/python3.10/site-packages/sphinx/application.py", line 229, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python3.10/site-packages/sphinx/application.py", line 402, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python3.10/site-packages/sphinx/registry.py", line 456, in load_extension
    raise ExtensionError(__('Could not import extension %s') % extname,
sphinx.errors.ExtensionError: Could not import extension IPython.sphinxext.ipython_console_highlighting (exception: cannot import name 'system' from 'IPython.utils.process' (/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/utils/process.py))

Extension error:
Could not import extension IPython.sphinxext.ipython_console_highlighting (exception: cannot import name 'system' from 'IPython.utils.process' (/home/tkloczko/rpmbuild/BUILD/ipython-8.24.0/IPython/utils/process.py))
Adding Tag: ipystable

🤨 ?

Are you doing the build from the tgz of the Github source ?

The only possible thing I see would the PRs around #14316, but those were release as part of 8.21.

Any chance you can poke around/bisect ? Because I can't figure out how this can be happening.

Yes I'm building from autogenerated from git tag tar ball.