From d73fcceecda81f5a6060778d840bef17ce1f9841 Mon Sep 17 00:00:00 2001
From: Julian Gilbey <jdg@debian.org>
Date: Thu, 20 Feb 2025 22:53:56 +0000
Subject: [PATCH] New upstream version (closes: #1082200)

---
 debian/changelog                              |  6 ++++
 debian/control                                |  2 +-
 .../pydevd-add-offset-to-instructions.patch   | 29 +++++++++----------
 3 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 012da2b..82de6cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-bytecode (0.16.1-1) unstable; urgency=medium
+
+  * New upstream version (closes: #1082200)
+
+ -- Julian Gilbey <jdg@debian.org>  Thu, 20 Feb 2025 22:22:47 +0000
+
 python-bytecode (0.15.1-3) unstable; urgency=medium
 
   * Fix autopkgtest calling (closes: #1059334); this requires moving away
diff --git a/debian/control b/debian/control
index 5d7ca28..c1d9e91 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-sphinx <!nodoc>,
                python3-sphinx-rtd-theme <!nodoc>,
                python3-sphinx-tabs <!nodoc>
-Standards-Version: 4.6.2
+Standards-Version: 4.7.0
 Homepage: https://github.com/MatthieuDartiailh/bytecode
 Vcs-Git: https://salsa.debian.org/python-team/packages/python-bytecode.git
 Vcs-Browser: https://salsa.debian.org/python-team/packages/python-bytecode
diff --git a/debian/patches/pydevd-add-offset-to-instructions.patch b/debian/patches/pydevd-add-offset-to-instructions.patch
index 97531c9..6e1fe61 100644
--- a/debian/patches/pydevd-add-offset-to-instructions.patch
+++ b/debian/patches/pydevd-add-offset-to-instructions.patch
@@ -1,8 +1,7 @@
 From: Fabio Zadrozny <fabiofz@gmail.com>
 Date: Wed, 14 Dec 2022 19:47:25 +0100
 Subject: Add offset to instructions from bytecode library.
-
-Last-Update: 2021-04-10
+Last-Update: 2025-02-20
 Origin: https://github.com/fabioz/PyDev.Debugger/commit/ab9958b70c69f14e69fda6023ec26106b921b13d
 Forwarded: not-needed
 
@@ -15,16 +14,16 @@ Forwarded: not-needed
 
 --- a/src/bytecode/concrete.py
 +++ b/src/bytecode/concrete.py
-@@ -79,7 +79,7 @@
+@@ -83,7 +83,7 @@
      # For ConcreteInstr the argument is always an integer
      _arg: int
  
--    __slots__ = ("_size", "_extended_args")
-+    __slots__ = ("_size", "_extended_args", "offset")
+-    __slots__ = ("_extended_args", "_size")
++    __slots__ = ("_extended_args", "_size", "offset")
  
      def __init__(
          self,
-@@ -89,12 +89,14 @@
+@@ -93,12 +93,14 @@
          lineno: Union[int, None, _UNSET] = UNSET,
          location: Optional[InstrLocation] = None,
          extended_args: Optional[int] = None,
@@ -40,7 +39,7 @@ Forwarded: not-needed
  
      def _check_arg(self, name: str, opcode: int, arg: int) -> None:
          if opcode_has_argument(opcode):
-@@ -174,7 +176,11 @@
+@@ -178,7 +180,11 @@
          else:
              arg = UNSET
          name = _opcode.opname[op]
@@ -52,8 +51,8 @@ Forwarded: not-needed
 +
  
      def use_cache_opcodes(self) -> int:
-         return (
-@@ -770,6 +776,7 @@
+         if sys.version_info >= (3, 13):
+@@ -781,6 +787,7 @@
                      arg,
                      location=instr.location,
                      extended_args=nb_extended_args,
@@ -61,7 +60,7 @@ Forwarded: not-needed
                  )
                  instructions[index] = instr
                  nb_extended_args = 0
-@@ -1058,7 +1065,7 @@
+@@ -1092,7 +1099,7 @@
                      instr_index = len(instructions)
                      jumps.append((instr_index, jump_target))
  
@@ -72,16 +71,16 @@ Forwarded: not-needed
              if current_instr_offset in ex_end:
 --- a/src/bytecode/instr.py
 +++ b/src/bytecode/instr.py
-@@ -522,7 +522,7 @@
+@@ -555,7 +555,7 @@
  class BaseInstr(Generic[A]):
      """Abstract instruction."""
  
--    __slots__ = ("_name", "_opcode", "_arg", "_location")
-+    __slots__ = ("_name", "_opcode", "_arg", "_location", "offset")
+-    __slots__ = ("_arg", "_location", "_name", "_opcode")
++    __slots__ = ("_arg", "_location", "_name", "_opcode", "offset")
  
      # Work around an issue with the default value of arg
      def __init__(
-@@ -532,8 +532,10 @@
+@@ -565,8 +565,10 @@
          *,
          lineno: Union[int, None, _UNSET] = UNSET,
          location: Optional[InstrLocation] = None,
@@ -92,7 +91,7 @@ Forwarded: not-needed
          if location:
              self._location = location
          elif lineno is UNSET:
-@@ -658,7 +660,7 @@
+@@ -691,7 +693,7 @@
              return (_effect, 0)
  
      def copy(self: T) -> T:
-- 
GitLab