Skip to content

Upcoming incompatibility with CPython 3.15 #481

@tacaswell

Description

@tacaswell

python/cpython#141108 that removes an enum value https://github.com/python/cpython/pull/141108/files#diff-1541528aa8ba238fa13865ed284b8b100b9f35bfea78237cfd2f5506715d8367L27

g++ -fPIC -I/home/tcaswell/.virtualenvs/bisect/include -I/home/tcaswell/.pybuild/bisect/include/python3.15 -c src/greenlet/
greenlet.cpp -o build/temp.linux-x86_64-cpython-315/src/greenlet/greenlet.o
In file included from /home/tcaswell/.pybuild/bisect/include/python3.15/internal/pycore_backoff.h:12,
                 from /home/tcaswell/.pybuild/bisect/include/python3.15/internal/pycore_code.h:11,
                 from /home/tcaswell/.pybuild/bisect/include/python3.15/internal/pycore_interpframe.h:8,
                 from src/greenlet/TGreenlet.hpp:35,
                 from src/greenlet/greenlet_internal.hpp:18,
                 from src/greenlet/greenlet.cpp:19:
src/greenlet/TGreenlet.cpp: In member function ‘void greenlet::Greenlet::expose_frames()’:
src/greenlet/TGreenlet.cpp:636:41: error: ‘FRAME_OWNED_BY_CSTACK’ was not declared in this scope; did you mean ‘FRAME_OWNED_BY_THREAD’?
  636 |             assert(iframe_copy.owner != FRAME_OWNED_BY_CSTACK);
      |   

If -DNDEBUG is passed then greenlet compiles with only warnings. I had -fpermissive set in my $CXXFLAGS which seems to cause something in the build chain to drop -DNDEBUG . There may be a better way to trigger this, but it setting CXXFLAGS='-fpermissive' is key to reproducing (it may be setting anything is enough?).

Given that the assert is checking the variable has a value that no longer exists I think it should be safe to delete the line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions