avatar
David Beazley @dabeaz.com

My impression was that PyPy was nearly 100% compatible with "normal" Python programs, but you could get off in the weeds with certain techniques like stack frame introspection, C extension modules, etc.

may 16, 2025, 4:24 pm • 1 0

Replies

avatar
Sam Tobin-Hochstadt @samth.bsky.social

I believe the biggest incompatibility is that if you rely on when objects are collected it will be different. For C extensions it's mostly if they tried to use internals of the implementation (which happens of course).

may 16, 2025, 4:54 pm • 3 0 • view
avatar
Laurence Tratt @ltratt.bsky.social

I wouldn't call the GC aspect an incompatibility per se; rather it is programs and programmers assuming that a particular implementation is coterminous with the specification. This can feel like a pedantic distinction to many folk, I admit.

may 16, 2025, 5:02 pm • 2 0 • view
avatar
Sam Tobin-Hochstadt @samth.bsky.social

I agree with that, I mostly mean that if code runs in CPython and then breaks in PyPy in 2025, that's the most likely reason.

may 16, 2025, 5:03 pm • 2 0 • view
avatar
Thomas Dickerson @elfprince13.mumak.app

CPython on Windows and CPython on Linux or Mac aren’t going to have the same behavior for all programs either. I don’t think it’s pedantic.

may 16, 2025, 5:09 pm • 1 0 • view
avatar
Sam Tobin-Hochstadt @samth.bsky.social

Aside from code relying on private implementation details, most of the other incompatibility is like GC -- code that's non-deterministic on both systems but PyPy is mostly or all one way while CPython is mostly the other way.

may 16, 2025, 5:01 pm • 2 0 • view