Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-bytecode for openSUSE:Factory
checked in at 2025-05-06 16:44:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bytecode (Old)
and /work/SRC/openSUSE:Factory/.python-bytecode.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-bytecode"
Tue May 6 16:44:11 2025 rev:13 rq:1274910 version:0.16.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bytecode/python-bytecode.changes
2025-02-03 21:47:16.339809681 +0100
+++
/work/SRC/openSUSE:Factory/.python-bytecode.new.30101/python-bytecode.changes
2025-05-06 16:44:22.243688595 +0200
@@ -1,0 +2,7 @@
+Tue May 6 10:22:56 UTC 2025 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to 0.16.2
+ * fix ControlFlowGraph dead block detection by accounting for
+ fall-through edges. PR #161
+
+-------------------------------------------------------------------
Old:
----
bytecode-0.16.1.tar.gz
New:
----
bytecode-0.16.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-bytecode.spec ++++++
--- /var/tmp/diff_new_pack.Z0pYMh/_old 2025-05-06 16:44:22.831713296 +0200
+++ /var/tmp/diff_new_pack.Z0pYMh/_new 2025-05-06 16:44:22.831713296 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-bytecode
-Version: 0.16.1
+Version: 0.16.2
Release: 0
Summary: Python module to generate and modify bytecode
License: MIT
++++++ bytecode-0.16.1.tar.gz -> bytecode-0.16.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/.github/workflows/release.yml
new/bytecode-0.16.2/.github/workflows/release.yml
--- old/bytecode-0.16.1/.github/workflows/release.yml 2025-01-21
19:22:34.000000000 +0100
+++ new/bytecode-0.16.2/.github/workflows/release.yml 2025-04-14
15:38:47.000000000 +0200
@@ -74,7 +74,7 @@
runs-on: ubuntu-latest
steps:
- name: Download all the dists
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
pattern: cibw-*
path: dist
@@ -101,7 +101,7 @@
steps:
- name: Download all the dists
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
pattern: cibw-*
path: dist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/PKG-INFO new/bytecode-0.16.2/PKG-INFO
--- old/bytecode-0.16.1/PKG-INFO 2025-01-21 19:22:39.138942700 +0100
+++ new/bytecode-0.16.2/PKG-INFO 2025-04-14 15:38:53.760714500 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 2.2
+Metadata-Version: 2.4
Name: bytecode
-Version: 0.16.1
+Version: 0.16.2
Summary: Python module to generate and modify bytecode
Author-email: Victor Stinner <[email protected]>
Maintainer-email: "Matthieu C. Dartiailh" <[email protected]>
@@ -47,6 +47,7 @@
Description-Content-Type: text/x-rst
License-File: COPYING
Requires-Dist: typing_extensions; python_version < "3.10"
+Dynamic: license-file
********
bytecode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/doc/changelog.rst
new/bytecode-0.16.2/doc/changelog.rst
--- old/bytecode-0.16.1/doc/changelog.rst 2025-01-21 19:22:34.000000000
+0100
+++ new/bytecode-0.16.2/doc/changelog.rst 2025-04-14 15:38:47.000000000
+0200
@@ -1,6 +1,14 @@
ChangeLog
=========
+2025-04-14: Version 0.16.2
+--------------------------
+
+Bugfixes:
+
+- fix ControlFlowGraph dead block detection by accounting for fall-through
+ edges. PR #161
+
2025-01-21: Version 0.16.1
--------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/src/bytecode/cfg.py
new/bytecode-0.16.2/src/bytecode/cfg.py
--- old/bytecode-0.16.1/src/bytecode/cfg.py 2025-01-21 19:22:34.000000000
+0100
+++ new/bytecode-0.16.2/src/bytecode/cfg.py 2025-04-14 15:38:47.000000000
+0200
@@ -731,12 +731,18 @@
if id(block) in seen_block_ids:
continue
seen_block_ids.add(id(block))
+ fall_through = True
for i in block:
- if isinstance(i, Instr) and isinstance(i.arg, BasicBlock):
- stack.append(i.arg)
+ if isinstance(i, Instr):
+ if isinstance(i.arg, BasicBlock):
+ stack.append(i.arg)
+ if i.is_final():
+ fall_through = False
elif isinstance(i, TryBegin):
assert isinstance(i.target, BasicBlock)
stack.append(i.target)
+ if fall_through and block.next_block:
+ stack.append(block.next_block)
return [b for b in self if id(b) not in seen_block_ids]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/src/bytecode/instr.py
new/bytecode-0.16.2/src/bytecode/instr.py
--- old/bytecode-0.16.1/src/bytecode/instr.py 2025-01-21 19:22:34.000000000
+0100
+++ new/bytecode-0.16.2/src/bytecode/instr.py 2025-04-14 15:38:47.000000000
+0200
@@ -336,15 +336,15 @@
"CHECK_EXC_MATCH": (-2, 2), # (TOS1, TOS) -> (TOS1, bool)
"CHECK_EG_MATCH": (-2, 2), # (TOS, TOS1) -> non-matched, matched or TOS1,
None)
"PREP_RERAISE_STAR": (-2, 1), # (TOS1, TOS) -> new exception group)
- **{k: (-1, 1) for k in (o for o in _opcode.opmap if
(o.startswith("UNARY_")))},
- **{
- k: (-2, 1)
- for k in (
+ **dict.fromkeys((o for o in _opcode.opmap if o.startswith("UNARY_")), (-1,
1)),
+ **dict.fromkeys(
+ (
o
for o in _opcode.opmap
- if (o.startswith("BINARY_") or o.startswith("INPLACE_"))
- )
- },
+ if o.startswith("BINARY_") or o.startswith("INPLACE_")
+ ),
+ (-2, 1),
+ ),
# Python 3.12 changes not covered by dis.stack_effect
"BINARY_SLICE": (-3, 1),
# "STORE_SLICE" handled by dis.stack_effect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/src/bytecode/version.py
new/bytecode-0.16.2/src/bytecode/version.py
--- old/bytecode-0.16.1/src/bytecode/version.py 2025-01-21 19:22:39.000000000
+0100
+++ new/bytecode-0.16.2/src/bytecode/version.py 2025-04-14 15:38:53.000000000
+0200
@@ -5,7 +5,7 @@
#: A namedtuple of the version info for the current release.
_version_info = namedtuple("_version_info", "major minor micro status")
-parts = "0.16.1".split(".", 3)
+parts = "0.16.2".split(".", 3)
version_info = _version_info(
int(parts[0]),
int(parts[1]),
@@ -16,4 +16,4 @@
# Remove everything but the 'version_info' from this module.
del namedtuple, _version_info, parts
-__version__ = "0.16.1"
+__version__ = "0.16.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/src/bytecode.egg-info/PKG-INFO
new/bytecode-0.16.2/src/bytecode.egg-info/PKG-INFO
--- old/bytecode-0.16.1/src/bytecode.egg-info/PKG-INFO 2025-01-21
19:22:39.000000000 +0100
+++ new/bytecode-0.16.2/src/bytecode.egg-info/PKG-INFO 2025-04-14
15:38:53.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 2.2
+Metadata-Version: 2.4
Name: bytecode
-Version: 0.16.1
+Version: 0.16.2
Summary: Python module to generate and modify bytecode
Author-email: Victor Stinner <[email protected]>
Maintainer-email: "Matthieu C. Dartiailh" <[email protected]>
@@ -47,6 +47,7 @@
Description-Content-Type: text/x-rst
License-File: COPYING
Requires-Dist: typing_extensions; python_version < "3.10"
+Dynamic: license-file
********
bytecode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bytecode-0.16.1/tests/test_cfg.py
new/bytecode-0.16.2/tests/test_cfg.py
--- old/bytecode-0.16.1/tests/test_cfg.py 2025-01-21 19:22:34.000000000
+0100
+++ new/bytecode-0.16.2/tests/test_cfg.py 2025-04-14 15:38:47.000000000
+0200
@@ -712,6 +712,20 @@
other_block = BasicBlock()
self.assertRaises(ValueError, blocks.get_block_index, other_block)
+ def test_get_dead_blocks(self):
+ def condition():
+ pass
+
+ def test():
+ if condition():
+ print("1")
+ else:
+ print("2")
+
+ bytecode = Bytecode.from_code(test.__code__)
+ cfg = ControlFlowGraph.from_bytecode(bytecode)
+ assert len(cfg.get_dead_blocks()) == 0
+
class CFGStacksizeComputationTests(TestCase):
def check_stack_size(self, func):