Skip to content

pyrift v0.3.0 — 17 rules, 67 tests, zero dependencies

Choose a tag to compare

@BHUVANSH855 BHUVANSH855 released this 24 Aug 10:03
· 57 commits to main since this release
6439a18

First public release of pyrift.

Install

pip install pyrift

What it does

Detects silent Python behaviour differences that linters and security
scanners both miss — code that runs without errors but produces wrong
results on different Python versions or PyPy.

Rules — 17 total

CPython version compatibility (10 rules)

ID What it catches
CPY001 Dict ordering assumption
CPY002 Exception.add_note() requires Python 3.11+
CPY003 X | Y union type syntax requires Python 3.10+
CPY004 tomllib requires Python 3.11+
CPY005 match/case requires Python 3.10+
CPY006 asyncio.timeout() / TaskGroup requires Python 3.11+
CPY007 21 modules removed in Python 3.13
CPY008 __slots__ + base class inheritance pitfall
CPY009 ExceptionGroup requires Python 3.11+
CPY010 @dataclass(slots=True) requires Python 3.10+

PyPy runtime differences (7 rules)

ID What it catches
PPY001 __del__ resource cleanup silently leaks on PyPy
PPY002 ctypes may silently fail on PyPy
PPY003 sys.getrefcount() meaningless on PyPy
PPY004 weakref.proxy() raises ReferenceError unpredictably
PPY005 File writes may be lost on PyPy without explicit flush
PPY006 Monkey-patching built-in types broken on PyPy
PPY007 sys.intern() identity not guaranteed on PyPy

Stats

  • 67 tests — all passing on Python 3.10, 3.11, 3.12, 3.13
  • Zero dependencies — pure Python
  • MIT license

Links