Merge branch 'master' into python-3.3-to-3.5

This commit is contained in:
rocky
2024-03-15 22:38:54 -04:00
6 changed files with 31 additions and 9 deletions

20
NEWS.md
View File

@@ -1,3 +1,23 @@
3.9.1: 2024-05-15
=================
Lots of changes major changes. track xdis API has changes.
Separate Phases more clearly:
* disassembly
* tokenization
* parsing
* abstracting to AST (more is done in newer projects)
* printing
Although we do not decompile bytecode greater than 3.8, code supports running from up to 3.12.
Many bugs fixed.
A lot of Linting and coding style modernization.
Work done in preparation for Blackhat Asia 2024
3.9.0: 2022-12-22
=================

View File

@@ -62,6 +62,8 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Debuggers",
"Topic :: Software Development :: Libraries :: Python Modules",

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2015-2023 by Rocky Bernstein
# Copyright (c) 2015-2024 by Rocky Bernstein
# Copyright (c) 2005 by Dan Pascu <dan@windowmaker.org>
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
#
@@ -207,7 +207,7 @@ class Scanner2(Scanner):
bytecode = self.build_instructions(co)
if show_asm in ("both", "before"):
print("\n# ---- before tokenization:")
print("\n# ---- disassembly:")
bytecode.disassemble_bytes(
co.co_code,
varnames=co.co_varnames,
@@ -495,7 +495,7 @@ class Scanner2(Scanner):
pass
if show_asm in ("both", "after"):
print("\n# ---- after tokenization:")
print("\n# ---- tokenization:")
for t in new_tokens:
print(t.format(line_prefix=""))
print()

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2015-2017, 2021-2022 by Rocky Bernstein
# Copyright (c) 2015-2017, 2021-2022, 2024 by Rocky Bernstein
# Copyright (c) 2005 by Dan Pascu <dan@windowmaker.org>
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
#
@@ -80,7 +80,7 @@ class Scanner26(scan.Scanner2):
# show_asm = 'after'
if show_asm in ("both", "before"):
print("\n# ---- before tokenization:")
print("\n# ---- disassembly:")
for instr in bytecode.get_instructions(co):
print(instr.disassemble(self.opc))
@@ -346,7 +346,7 @@ class Scanner26(scan.Scanner2):
pass
if show_asm in ("both", "after"):
print("\n# ---- after tokenization:")
print("\n# ---- tokenization:")
for t in tokens:
print(t.format(line_prefix=""))
print()

View File

@@ -415,7 +415,7 @@ class Scanner3(Scanner):
# show_asm = 'both'
if show_asm in ("both", "before"):
print("\n# ---- before tokenization:")
print("\n# ---- disassembly:")
bytecode.disassemble_bytes(
co.co_code,
varnames=co.co_varnames,
@@ -789,7 +789,7 @@ class Scanner3(Scanner):
pass
if show_asm in ("both", "after"):
print("\n# ---- after tokenization:")
print("\n# ---- tokenization:")
for t in new_tokens:
print(t.format(line_prefix=""))
print()

View File

@@ -14,4 +14,4 @@
# This file is suitable for sourcing inside POSIX shell as
# well as importing into Python
# fmt: off
__version__="3.9.1.dev0" # noqa
__version__="3.9.1" # noqa