GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Docs build error with Sphinx 3.0 due to invalid C declaration · Issue #84385 · python/cpython

Docs build error with Sphinx 3.0 due to invalid C declaration #84385

New issue
Copy link
New issue
Copy link
Closed
Closed
Docs build error with Sphinx 3.0 due to invalid C declaration#84385
Copy link
Labels
3.10 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@tirkarthi
tirkarthi
opened on Apr 6, 2020
Issue body actions
BPO 40204
Nosy @birkenfeld, @rhettinger, @terryjreedy, @doko42, @vstinner, @benjaminp, @ned-deily, @ezio-melotti, @merwok, @skrah, @serhiy-storchaka, @willingc, @JulienPalard, @miss-islington, @tirkarthi, @m-aciek
PRs
  • bpo-40204: Update documentation formatting for Sphinx 3.0 #19397
  • [3.8] bpo-40204: Pin Sphinx version to 1.8.2 in Doc/Makefile #19442
  • [3.7] bpo-40204: Pin Sphinx version to 1.8.2 in Doc/Makefile (GH-19442) #19443
  • bpo-40204: Pin Sphinx version to 2.3.1 in Doc/Makefile. #21141
  • [3.9] bpo-40204: Pin Sphinx version to 2.3.1 in Doc/Makefile. (GH-21141) #21146
  • [3.8] bpo-40204: Pin Sphinx version to 2.3.1 in Doc/Makefile. (GH-21141) #21147
  • bpo-40204: Allow pre-Sphinx 3 syntax in the doc #21844
  • bpo-40204, doc: Fix syntax of C variables #21846
  • bpo-40204: Fix duplicates in the documentation #21857
  • bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst #21858
  • bpo-40204: Add :noindex: in the documentation #21859
  • bpo-40204: Fix reference to terms in the doc #21865
  • bpo-40204: Fix duplicated productionlist names in the doc #21900
  • [3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) #21901
  • [3.8] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) #21924
  • [3.8] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) #21928
  • bpo-40204: Update Sphinx to version 3.2.1 in Doc/Makefile #22043
  • 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 2020-08-20.11:33:09.064>
    created_at = <Date 2020-04-06.14:32:48.165>
    labels = ['type-bug', '3.8', '3.9', '3.10', 'docs']
    title = 'Docs build error with Sphinx 3.0 due to invalid C declaration'
    updated_at = <Date 2020-09-02.10:29:35.521>
    user = 'https://github.com/tirkarthi'

    bugs.python.org fields:

    activity = <Date 2020-09-02.10:29:35.521>
    actor = 'vstinner'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-08-20.11:33:09.064>
    closer = 'vstinner'
    components = ['Documentation']
    creation = <Date 2020-04-06.14:32:48.165>
    creator = 'xtreak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40204
    keywords = ['patch']
    message_count = 42.0
    messages = ['365858', '365872', '365876', '365895', '366021', '366022', '366023', '366082', '366090', '366091', '366096', '366097', '366172', '371790', '372262', '372265', '372271', '372292', '372347', '372348', '372353', '372698', '372701', '372702', '372704', '372858', '373083', '374736', '375254', '375281', '375320', '375321', '375335', '375341', '375343', '375392', '375527', '375529', '375661', '375703', '375704', '376223']
    nosy_count = 18.0
    nosy_names = ['georg.brandl', 'rhettinger', 'terry.reedy', 'doko', 'vstinner', 'benjamin.peterson', 'ned.deily', 'ezio.melotti', 'eric.araujo', 'skrah', 'docs@python', 'python-dev', 'serhiy.storchaka', 'willingc', 'mdk', 'miss-islington', 'xtreak', 'Maciej Olko']
    pr_nums = ['19397', '19442', '19443', '21141', '21146', '21147', '21844', '21846', '21857', '21858', '21859', '21865', '21900', '21901', '21924', '21928', '22043']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue40204'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    Next
    1. tirkarthi commented on Apr 6, 2020

      @tirkarthi
      tirkarthi
      on Apr 6, 2020
      MemberAuthor
      More actions

      The following error is caused in Docs build for a 3.8 backport since sphinx is ran with warnings. Sphinx released 3.0 on April 6. The last successful build on master uses Sphinx 2.2.0 [0]. My guess is sphinx new version possibly breaking the build on Python 3.8 where it's not pinned to use 2.2.0 pulling the latest version. The changelog for Sphinx has below note :

      https://www.sphinx-doc.org/en/master/changes.html#release-3-0-0-released-apr-06-2020

      The C domain has been rewritten, with additional directives and roles. The existing ones are now more strict, resulting in new warnings.

      Python 3.8 and Python 3.7 doesn't have Sphinx pinned to 2.2.0 while master does.

      Python 3.8 Docs makefile :

      cpython/Doc/Makefile

      Line 146 in f7b0259

      $(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb python-docs-theme

      Failed build :

      https://github.com/python/cpython/pull/19388/checks?check_run_id=563053793#step:7:46

      Error :

      Warning, treated as error:
      /home/runner/work/cpython/cpython/Doc/c-api/buffer.rst:92:Error in declarator or parameters
      Invalid C declaration: Expected identifier in nested name. [error at 5]
      void \*buf
      -----^
      Makefile:49: recipe for target 'build' failed
      make[1]: *** [build] Error 2

      [0] https://github.com/python/cpython/runs/564123625#step:6:24

    2. tirkarthi
      added
      3.8 (EOL)end of lifeend of life
      on Apr 6, 2020
    3. tirkarthi
      assigned
      docspython
      on Apr 6, 2020
    4. tirkarthi
      added
      docsDocumentation in the Doc dirDocumentation in the Doc dir
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      3.8 (EOL)end of lifeend of life
      on Apr 6, 2020
    5. tirkarthi
      assigned
      docspython
      on Apr 6, 2020
    6. tirkarthi
      added
      docsDocumentation in the Doc dirDocumentation in the Doc dir
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Apr 6, 2020
    7. vstinner commented on Apr 6, 2020

      @vstinner
      vstinner
      on Apr 6, 2020
      Member
      More actions

      It sounds dangerous to not pin the Sphinx version in our CI :-/ Another issue caused by CI configuration stored at the same place than the code:
      https://mail.python.org/archives/list/[email protected]/thread/WEU5CQKIA4LIHWHT53YA7HHNUY5H2FUT/

    8. serhiy-storchaka commented on Apr 6, 2020

      @serhiy-storchaka
      serhiy-storchaka
      on Apr 6, 2020
      Member
      More actions

      Maybe copy the code for deprecated and removed features to Doc/tools/extensions?

    9. tirkarthi commented on Apr 7, 2020

      @tirkarthi
      tirkarthi
      on Apr 7, 2020
      MemberAuthor
      More actions

      The sphinx version is not pinned in 3.7, 3.6, 3.5 and 2.7 branches too for Doc/Makefile that can cause error on someone trying it out locally. They are pinned in .travis.yml and .azure-pipelines configurations.

    10. vstinner commented on Apr 8, 2020

      @vstinner
      vstinner
      on Apr 8, 2020
      Member
      More actions

      Python 3.8 and Python 3.7 doesn't have Sphinx pinned to 2.2.0 while master does.

      In 3.8, .azure-pipelines/docs-steps.yml contains:

      • script: python -m pip install sphinx==1.8.2 blurb python-docs-theme

      and .travis.yml contains:

      • python -m pip install sphinx==1.8.2 blurb python-docs-theme

      For example, the Sphinx version was changed from 1.8.1 to 1.8.2 in the CI configuration by:

      commit 7f4ba4a
      Author: Julien Palard <[email protected]>
      Date: Sat Nov 24 11:35:21 2018 +0100

      Doc: Bump sphinx. (GH-10676)
      

      --

      I guess that you're talking about Doc/Makefile which uses "Sphinx" in 3.8 but "Sphinx==2.2.0" in master. Code in 3.8:

      venv:
      $(PYTHON) -m venv $(VENVDIR)
      $(VENVDIR)/bin/python3 -m pip install -U pip setuptools
      $(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb python-docs-theme
      @echo "The venv has been created in the $(VENVDIR) directory"

    11. vstinner commented on Apr 8, 2020

      @vstinner
      vstinner
      on Apr 8, 2020
      Member
      More actions

      I guess that you're talking about Doc/Makefile which uses "Sphinx" in 3.8 but "Sphinx==2.2.0" in master.

      I wrote PR 19442 to pin Sphinx version to 1.8.2 in Doc/Makefile.

    12. vstinner commented on Apr 8, 2020

      @vstinner
      vstinner
      on Apr 8, 2020
      Member
      More actions

      New changeset 37a257c by Victor Stinner in branch '3.8':
      bpo-40204: Pin Sphinx version to 1.8.2 in Doc/Makefile (GH-19442)
      37a257c

    13. 27 remaining items

    14. vstinner commented on Aug 13, 2020

      @vstinner
      vstinner
      on Aug 13, 2020
      Member
      More actions

      With PR 21865, there are only two remaining warnings:

      Doc/library/string.rst:311: WARNING: duplicate token description of sf:format_spec, other instance in library/string
      Doc/reference/introduction.rst:96: WARNING: duplicate token description of *:name, other instance in reference/expressions

      See bpo-35293 for RemovedInSphinx40Warning (which are already prevent with Sphinx 2).

    15. vstinner commented on Aug 14, 2020

      @vstinner
      vstinner
      on Aug 14, 2020
      Member
      More actions

      New changeset bb0b085 by Victor Stinner in branch 'master':
      bpo-40204: Fix reference to terms in the doc (GH-21865)
      bb0b085

    16. vstinner commented on Aug 17, 2020

      @vstinner
      vstinner
      on Aug 17, 2020
      Member
      More actions

      New changeset 1abeda8 by Victor Stinner in branch 'master':
      bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)
      1abeda8

    17. vstinner commented on Aug 17, 2020

      @vstinner
      vstinner
      on Aug 17, 2020
      Member
      More actions

      I'm now able to build the Python documentation with Sphinx 3.2.1 without modifying the Doc/Makefile, so using -W option (treat warnings as errors): there are no more Sphinx 3 warnings.

      When Sphinx 3 will be more widely available (ex: in Linux distributions), we will be able to consider removing c_allow_pre_v3=True and c_warn_on_allowed_pre_v3=False in doc/conf.py. For that, we should update the documentation to use the Sphinx 3 syntax, see PR 19397 written by Jakob Lykke Andersen.

      For now, I prefer to keep Sphinx 2 support and so keep Sphinx 2 syntax in the C domain, since it allows supporting Sphinx 2 and Sphinx 3.

    18. vstinner commented on Aug 19, 2020

      @vstinner
      vstinner
      on Aug 19, 2020
      Member
      More actions

      New changeset 8f88190 by Victor Stinner in branch '3.9':
      [3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901)
      8f88190

    19. vstinner commented on Aug 20, 2020

      @vstinner
      vstinner
      on Aug 20, 2020
      Member
      More actions

      New changeset 7d0fef5 by Victor Stinner in branch '3.8':
      bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)
      7d0fef5

    20. vstinner commented on Aug 20, 2020

      @vstinner
      vstinner
      on Aug 20, 2020
      Member
      More actions

      I merged my changes to add Sphinx 3.2 and newer support into 3.8, 3.9 and master branches.

      I close the issue.

      Sadly, it seems like it's not possible to keep Sphinx 2 support if we add Sphinx 3.0 and Sphinx 3.1 support. For now, only Sphinx 2 and Sphinx 3.2+ are supported: 3.0 and 3.1 are not supported.

    21. vstinner
      added
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      on Aug 20, 2020
    22. vstinner
      closed this as completedon Aug 20, 2020
    23. vstinner
      added
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      on Aug 20, 2020
    24. vstinner
      closed this as completedon Aug 20, 2020
    25. vstinner commented on Sep 2, 2020

      @vstinner
      vstinner
      on Sep 2, 2020
      Member
      More actions

      New changeset c0d5c13 by Victor Stinner in branch 'master':
      bpo-40204: Update Sphinx to version 3.2.1 in Doc/Makefile (GH-22043)
      c0d5c13

    26. ezio-melotti
      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

      3.10 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — GeezerVison does not store the pages you look up.
        Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.