Skip to content

sphinx is not py3k compatible #63447

Closed
Closed

Description

@kousu
mannequin
BPO 19248
Nosy @birkenfeld, @kousu, @ezio-melotti
Superseder
  • bpo-10224: Build 3.x documentation using python3.x
  • Files
  • sphinx_version_check.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2013-10-13.20:19:42.317>
    created_at = <Date 2013-10-13.19:09:31.192>
    labels = ['docs']
    title = 'sphinx is not py3k compatible'
    updated_at = <Date 2013-10-13.20:42:23.748>
    user = 'https://github.com/kousu'

    bugs.python.org fields:

    activity = <Date 2013-10-13.20:42:23.748>
    actor = 'Arfrever'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2013-10-13.20:19:42.317>
    closer = 'python-dev'
    components = ['Documentation']
    creation = <Date 2013-10-13.19:09:31.192>
    creator = 'kousu'
    dependencies = []
    files = ['32093']
    hgrepos = []
    issue_num = 19248
    keywords = ['patch']
    message_count = 6.0
    messages = ['199764', '199765', '199766', '199767', '199791', '199796']
    nosy_count = 6.0
    nosy_names = ['georg.brandl', 'kousu', 'ezio.melotti', 'Arfrever', 'docs@python', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = '10224'
    type = None
    url = 'https://bugs.python.org/issue19248'
    versions = ['Python 3.1', 'Python 3.2', 'Python 3.3', 'Python 3.4', 'Python 3.5']

    Activity

    1. kousu commented on Oct 13, 2013

      kousumannequin
      MannequinAuthor

      I'm running Arch. I just checked out python's hg and tried to build the docs, and found that I couldn't:

      $ cd cpython/doc
      $ make update
      [lots of output stripped]
      $ make pydoc-topics
      mkdir -p build/pydoc-topics build/doctrees
      python tools/sphinx-build.py -b pydoc-topics -d build/doctrees -D latex_paper_size=  . build/pydoc-topics 
      Traceback (most recent call last):
        File "tools/sphinx-build.py", line 27, in <module>
          from sphinx import main
        File "/home/kousu/pro/cpython/Doc/tools/sphinx/__init__.py", line 44
          except ImportError, err:
                            ^
      SyntaxError: invalid syntax
      make: *** [build] Error 1

      I edited the Makefile to say PYTHON = python2
      and then it worked. Is the assumption that python2 is still supposed to be the default python everywhere? Is python 3 not able to build itself yet?

      [kousu@galleon Doc]$ pacman -Qi python
      Name : python
      Version : 3.3.2-2
      Description : Next generation of the python high-level scripting language
      Architecture : x86_64
      URL : http://www.python.org/
      Licenses : custom
      Groups : None
      Provides : python3
      Depends On : expat bzip2 gdbm openssl libffi zlib
      Optional Deps : tk: for tkinter [installed]
      sqlite [installed]
      Required By : cython ipython ktoblzcheck libreoffice-common python-cairo python-dateutil python-dbus python-markupsafe
      python-numpy python-pyparsing python-pytz python-pyzmq python-setuptools python-sip python-six python-sympy
      python-tornado python-xdg ranger youtube-dl
      Optional For : systemd
      Conflicts With : None
      Replaces : python3
      Installed Size : 86980.00 KiB
      Packager : Bart
      Build Date : Fri Sep 6 03:31:57 2013
      Install Date : Tue Sep 17 10:29:36 2013
      Install Reason : Installed as a dependency for another package
      Install Script : No
      Validated By : Signature

    2. added
      docsDocumentation in the Doc dir
      on Oct 13, 2013
    3. ezio-melotti commented on Oct 13, 2013

      @ezio-melotti
      Member

      This is a duplicate of bpo-10224.

    4. kousu commented on Oct 13, 2013

      kousumannequin
      MannequinAuthor

      I see that in Doc/tools/sphinx-build.py there is this check:

          if sys.version_info[:3] < (2, 4, 0):
              sys.stderr.write("""\
      Error: Sphinx needs to be executed with Python 2.4 or newer (not 3.0 though).
      (If you run this from the Makefile, you can set the PYTHON variable
      to the path of an alternative interpreter executable, e.g.,
      ``make html PYTHON=python2.5``).
      """)

      But I never saw this and had to debug it myself. I submit the attached patch as a solution.

    5. reopened this on Oct 13, 2013
    6. birkenfeld commented on Oct 13, 2013

      @birkenfeld
      Member

      Looks ok for now.

    7. python-dev commented on Oct 13, 2013

      python-devmannequin
      Mannequin

      New changeset 6e65ee2a0073 by Georg Brandl in branch '3.3':
      Closes bpo-19248: actually check for Python 3.x in tools/sphinx-build.py.
      http://hg.python.org/cpython/rev/6e65ee2a0073

    8. Arfrever commented on Oct 13, 2013

      Arfrevermannequin
      Mannequin

      Is the assumption that python2 is still supposed to be the default python everywhere?
      Is python 3 not able to build itself yet?

      You can manually install Sphinx >=1.1 (preferably >=1.2.*) (and its dependencies) using Python 3, and directly call sphinx-build from so installed Sphinx, instead of using make.

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      docsDocumentation in the Doc dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions