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 — Compilation breaks on Python 3.11.0a7 in PyFrame_GetLasti · Issue #32 · python/pythoncapi-compat

Compilation breaks on Python 3.11.0a7 in PyFrame_GetLasti #32

New issue
Copy link
New issue
Copy link
Closed
Closed
Compilation breaks on Python 3.11.0a7 in PyFrame_GetLasti#32
Copy link

Description

@icemac
icemac
opened on Apr 27, 2022
Issue body actions

Using the latest version of pythoncapi_compat.h currently breaks on Python 3.11.0a7.
I have seen this on GHA for Ubuntu and MacOS and locally on MacOS:

src/zope/container/_compat.h:254:14: error: incomplete definition of type 'struct _frame'
    if (frame->f_lasti < 0) {
        ~~~~~^
/Users/runner/hostedtoolcache/Python/3.11.0-alpha.7/x64/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'struct _frame'
typedef struct _frame PyFrameObject;
               ^
In file included from src/zope/container/_zope_container_contained.c:34:
src/zope/container/_compat.h:257:17: error: incomplete definition of type 'struct _frame'
    return frame->f_lasti * 2;
           ~~~~~^

See https://github.com/zopefoundation/zope.container/runs/6188321544?check_suite_focus=true#step:7:61 where pythoncapi_compat.h is src/zope/container/_compat.h.

Activity

  1. vstinner commented on Apr 27, 2022

    @vstinner
    vstinner
    on Apr 27, 2022
    Member
    More actions

    If you don't need the latest enhancements of pythoncapi_compat.h, just keep your old version.

    Sadly, the new version is not compatible with Python 3.11 alpha versions. PyFrameObject got a lot of changes in alpha versions. Hopefully, new public getter functions were added to solve most issues: https://docs.python.org/dev/c-api/frame.html Problem: implementing these getter functions for early alpha versions would require a lot of code in pythoncapi_compat.h, and I chose to not do that.

    Workaround if you need to update pythoncapi_compat.h: manually remove the PyFrame functions which cause you build errors. Does it sound like a reasonable workaround to you? That's the approach that I adopted in my coverage PR: coveragepy/coveragepy#1353

  2. vstinner
    closed this as completedon Apr 27, 2022
  3. vstinner
    reopened this on Apr 27, 2022
  4. vstinner commented on Apr 27, 2022

    @vstinner
    vstinner
    on Apr 27, 2022
    Member
    More actions

    (Oops, I clicked on the wrong button by mistake, I didn't want to close the issue.)

  5. icemac commented on Apr 29, 2022

    @icemac
    icemac
    on Apr 29, 2022
    Author
    More actions

    @vstinner Thank you for your explanation. It seems that I do not need PyFrame_GetLasti – at least in zope.container.

    Thank you for your hard work on the compatibility side!

    Reacted by Erlend E. Aasland
  6. vstinner commented on Jun 14, 2022

    @vstinner
    vstinner
    on Jun 14, 2022
    Member
    More actions

    Python 3.11 beta3 is now released: can you update to a newer Python 3.11?

  7. icemac commented on Jun 24, 2022

    @icemac
    icemac
    on Jun 24, 2022
    Author
    More actions

    I am trying to do so in zopefoundation/zope.container#45, but there are several other problems which arose over night in Python 3.10 and need to be fixed beforehand.

  8. vstinner commented on Jun 24, 2022

    @vstinner
    vstinner
    on Jun 24, 2022
    Member
    More actions

    It seems to be unrelated to pythoncapi-compat. I close the issue.

    Supporting alpha versions of Python 3.11 is too complicated. To get Python 3.11, use beta1 or newer.

  9. vstinner
    closed this as completedon Jun 24, 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

    No labels
    No labels

    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.