https://github.com/python/cpython/commit/4d941d3fd11d2a669f6e895e0572de30cc0257a7
commit: 4d941d3fd11d2a669f6e895e0572de30cc0257a7
branch: 3.13
author: sobolevn <[email protected]>
committer: sobolevn <[email protected]>
date: 2025-02-17T08:21:47Z
summary:

[3.13] gh-129805: Fix `bytes` annotation in `Tools/jit` (GH-129806) (#130216)

(cherry picked from commit 422f8e9e02e68d45aee3846751a003a70fca13b6)

files:
M Tools/jit/_targets.py

diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py
index 73d10a128756eb..cebfad5a7467d2 100644
--- a/Tools/jit/_targets.py
+++ b/Tools/jit/_targets.py
@@ -102,7 +102,7 @@ def _handle_section(self, section: _S, group: 
_stencils.StencilGroup) -> None:
         raise NotImplementedError(type(self))
 
     def _handle_relocation(
-        self, base: int, relocation: _R, raw: bytes
+        self, base: int, relocation: _R, raw: bytes | bytearray
     ) -> _stencils.Hole:
         raise NotImplementedError(type(self))
 
@@ -275,7 +275,10 @@ def _unwrap_dllimport(self, name: str) -> 
tuple[_stencils.HoleValue, str | None]
         return _stencils.symbol_to_value(name)
 
     def _handle_relocation(
-        self, base: int, relocation: _schema.COFFRelocation, raw: bytes
+        self,
+        base: int,
+        relocation: _schema.COFFRelocation,
+        raw: bytes | bytearray,
     ) -> _stencils.Hole:
         match relocation:
             case {
@@ -366,7 +369,10 @@ def _handle_section(
             }, section_type
 
     def _handle_relocation(
-        self, base: int, relocation: _schema.ELFRelocation, raw: bytes
+        self,
+        base: int,
+        relocation: _schema.ELFRelocation,
+        raw: bytes | bytearray,
     ) -> _stencils.Hole:
         symbol: str | None
         match relocation:
@@ -442,7 +448,10 @@ def _handle_section(
             stencil.holes.append(hole)
 
     def _handle_relocation(
-        self, base: int, relocation: _schema.MachORelocation, raw: bytes
+        self,
+        base: int,
+        relocation: _schema.MachORelocation,
+        raw: bytes | bytearray,
     ) -> _stencils.Hole:
         symbol: str | None
         match relocation:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to