Bytecode

Latest version: v0.16.1

Safety actively analyzes 722460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.16.1

--------------------------

Bugfixes:

- fix flag inference for async code PR 157

0.16.0

--------------------------

New features:

- Add support for Python 3.13 PR 146

Support for Python 3.13, comes with a number of changes reflecting changes in
CPython bytecode itself:

- handle the ability of comparison to cast with new enum variants:
LT_CAST, LE_CAST, etc
- allow LOAD_FAST to access free and cell vars

Bugfixes:

- Properly handle TryEnd with no matching TryBegin in stack size computation on
the CFG PR 149
- Ensure that empty or small (one-instruction) try blocks are handled without
problems when compiling and de-compiling abstract code for CPython 3.11 and
later. PR 145

0.15.1

--------------------------

Bugfixes:

- Disallow creating an instruction targeting a pseudo/instrumented opcode PR 133
- Fixes encoding of 0 as a varint PR 132
- Correct spelling of "INTRINSIC" in several places; this affected
some ops in Python 3.12. PR 131

0.15.0

--------------------------

New features:

- Add support for Python 3.12 PR 122

Support for Python 3.12, comes with a number of changes reflecting changes in
CPython bytecode itself:

- handle the ability of ``LOAD_ATTR`` to replace ``LOAD_METHOD``
As a consequence the argument is now a ``tuple[bool, str]``
- similarly ``LOAD_SUPER_ATTR`` which uses the 2 lowest bits as flag takes
a ``tuple[bool, bool, str]`` as argument
- ``POP_JUMP_IF_*`` instructions are undirected in Python 3.12
- ``YIELD_VALUE`` now takes an argument
- Support for ``CALL_INTRINSIC_1/2`` led to the addition of 2 new enums to
represent the argument

0.14.2

--------------------------

Bugfixes:

- allow to convert a CFG, for which stack sizes have not been computed, to Bytecode
even in the presence of mergeable TryBegin/TryEnd PR 120
- remove spurious TryEnd leftover when going from CFG to Bytecode PR 120

0.14.1

--------------------------

Bugfixes:

- allow to disassemble code containing ``EXTENDED_ARG`` targeting a ``NOP`` PR 117

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.