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 — Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’ · Issue #91071 · python/cpython

Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’ #91071

New issue
Copy link
New issue
Copy link
Closed
Closed
Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’#91071
Copy link
Assignees
vstinner
Labels
3.11only security fixesonly security fixesbuildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)

Description

@tiran
tiran
opened on Mar 3, 2022
Issue body actions
BPO 46915
Nosy @vstinner, @tiran, @pablogsal
PRs
  • bpo-46915: Fix unknown type PyModuleDef_Slot regression #31667
  • 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 = 'https://github.com/vstinner'
    closed_at = None
    created_at = <Date 2022-03-03.21:15:25.727>
    labels = ['interpreter-core', 'build', '3.11']
    title = 'Build with Py_LIMITED_API fails unknown type name \xe2\x80\x98PyModuleDef_Slot\xe2\x80\x99'
    updated_at = <Date 2022-03-12.00:35:14.453>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2022-03-12.00:35:14.453>
    actor = 'vstinner'
    assignee = 'vstinner'
    closed = False
    closed_date = None
    closer = None
    components = ['Build', 'Interpreter Core']
    creation = <Date 2022-03-03.21:15:25.727>
    creator = 'christian.heimes'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46915
    keywords = ['3.11regression']
    message_count = 7.0
    messages = ['414473', '414474', '414475', '414476', '414480', '414488', '414956']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'christian.heimes', 'pablogsal']
    pr_nums = ['31667']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'open'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue46915'
    versions = ['Python 3.11']

    Activity

    Next
    1. tiran commented on Mar 3, 2022

      @tiran
      tiran
      on Mar 3, 2022
      MemberAuthor
      More actions

      Extension modules with bare "#define Py_LIMITED_API" without version fail to build with error:

      moduleobject.h:82:3: error: unknown type name ‘PyModuleDef_Slot’

      The issue was introduced in PR #75709 and bpo-45459. The type PyModuleDef_Slot is only defined when Py_LIMITED_API is set to Python 3.5.0 or higher.

    2. tiran
      added
      release-blocker
      on Mar 3, 2022
    3. tiran
      self-assigned this
      on Mar 3, 2022
    4. tiran
      added
      3.11only security fixesonly security fixes
      buildThe build process and cross-buildThe build process and cross-build
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      release-blocker
      on Mar 3, 2022
    5. tiran
      self-assigned this
      on Mar 3, 2022
    6. tiran
      added
      3.11only security fixesonly security fixes
      buildThe build process and cross-buildThe build process and cross-build
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      on Mar 3, 2022
    7. tiran commented on Mar 3, 2022

      @tiran
      tiran
      on Mar 3, 2022
      MemberAuthor
      More actions

      The problem was first reported to PyCA cryptography project in bug pyca/cryptography#6929

    8. tiran commented on Mar 3, 2022

      @tiran
      tiran
      on Mar 3, 2022
      MemberAuthor
      More actions

      With fix:

      $ /tmp/python311/bin/pip3 install --no-binary :all: cryptography
      Collecting cryptography
        Using cached cryptography-36.0.1.tar.gz (572 kB)
        Installing build dependencies ... done
        Getting requirements to build wheel ... done
          Preparing wheel metadata ... done
      Requirement already satisfied: cffi>=1.12 in /tmp/python311/lib/python3.11/site-packages (from cryptography) (1.15.0)
      Requirement already satisfied: pycparser in /tmp/python311/lib/python3.11/site-packages (from cffi>=1.12->cryptography) (2.21)
      Building wheels for collected packages: cryptography
        Building wheel for cryptography (PEP 517) ... done
        Created wheel for cryptography: filename=cryptography-36.0.1-cp311-cp311-linux_x86_64.whl size=2628351 sha256=fb3cc21f8eaa546cd2c0123ea01a98bf92a9824fcdca36cfcf765b2c044bd186
        Stored in directory: /home/heimes/.cache/pip/wheels/6c/77/a9/3c4762d4e65bef5f742a304c507f9723ca3563a38d108618ad
      Successfully built cryptography
      Installing collected packages: cryptography
      Successfully installed cryptography-36.0.1

      Without fix:

      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/python311/include/python3.11 -c build/temp.linux-x86_64-3.11/_openssl.c -o build/temp.linux-x86_64-3.11/build/temp.linux-x86_64-3.11/_openssl.o -Wconversion -Wno-error=sign-conversion
      In file included from /tmp/python311/include/python3.11/Python.h:66,
      from build/temp.linux-x86_64-3.11/_openssl.c:57:
      /tmp/python311/include/python3.11/moduleobject.h:82:3: error: unknown type name ‘PyModuleDef_Slot’
      82 | PyModuleDef_Slot *m_slots;
      | ^~~~~~~~~~~~~~~~

    9. 2 remaining items

    10. vstinner
      closed this as completedon Mar 3, 2022
    11. vstinner
      removed
      release-blocker
      on Mar 3, 2022
    12. vstinner
      closed this as completedon Mar 3, 2022
    13. vstinner
      removed
      release-blocker
      on Mar 3, 2022
    14. tiran commented on Mar 3, 2022

      @tiran
      tiran
      on Mar 3, 2022
      MemberAuthor
      More actions

      Please add a blurb entry.

    15. tiran
      reopened this on Mar 3, 2022
    16. tiran
      assigned
      vstinner
      and unassigned
      tiran
      on Mar 3, 2022
    17. tiran
      reopened this on Mar 3, 2022
    18. tiran
      assigned
      vstinner
      and unassigned
      tiran
      on Mar 3, 2022
    19. vstinner commented on Mar 12, 2022

      @vstinner
      vstinner
      on Mar 12, 2022
      Member
      More actions

      Fixed by 0b63215

      This change is now part of Python 3.11 alpha6 released a few days ago. Python 3.11a6 news entries were merged into the Misc/NEWS.d/3.11.0a6.rst file.

      Please add a blurb entry.

      I consider that the changelog is for changes which impacts users when they update. The regression was introduced after 3.11 alpha5 but fixed before Python 3.11 alpha6. Only projects using contiguous integration were impacted. Only the cryptography project was impacted in practice.

      pyca/cryptography#6929

      This issue was closed as with the comment:

      "Going to close this as it's an upstream python bug that's now been fixed."

    20. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    21. kumaraditya303 commented on May 9, 2022

      @kumaraditya303
      kumaraditya303
      on May 9, 2022
      Contributor
      More actions

      Since only alpha6 was impacted and is now fixed, I am closing the issue.

    22. kumaraditya303
      closed this as completedon May 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    • @vstinner
      vstinner

    Labels

    3.11only security fixesonly security fixesbuildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — 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.