https://github.com/python/cpython/commit/7c03e9078d8b41b3e558aab2b09face5e12b308c commit: 7c03e9078d8b41b3e558aab2b09face5e12b308c branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2025-10-09T14:12:25+03:00 summary:
[3.14] GH-129805: Clean up some changes from GH-129806 (GH-133540) (#138972) Co-authored-by: Brandt Bucher <[email protected]> files: M Tools/jit/_stencils.py M Tools/jit/_targets.py diff --git a/Tools/jit/_stencils.py b/Tools/jit/_stencils.py index 03b0ba647b0db7..5977a7a30502ba 100644 --- a/Tools/jit/_stencils.py +++ b/Tools/jit/_stencils.py @@ -140,11 +140,7 @@ class Hole: def __post_init__(self) -> None: self.func = _PATCH_FUNCS[self.kind] - def fold( - self, - other: typing.Self, - body: bytes | bytearray, - ) -> typing.Self | None: + def fold(self, other: typing.Self, body: bytearray) -> typing.Self | None: """Combine two holes into a single hole, if possible.""" instruction_a = int.from_bytes( body[self.offset : self.offset + 4], byteorder=sys.byteorder diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index b383e39da19456..ed63e388e433b9 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -114,7 +114,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 | bytearray + self, base: int, relocation: _R, raw: bytearray ) -> _stencils.Hole: raise NotImplementedError(type(self)) @@ -282,10 +282,7 @@ 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 | bytearray, + self, base: int, relocation: _schema.COFFRelocation, raw: bytearray ) -> _stencils.Hole: match relocation: case { @@ -380,10 +377,7 @@ def _handle_section( }, section_type def _handle_relocation( - self, - base: int, - relocation: _schema.ELFRelocation, - raw: bytes | bytearray, + self, base: int, relocation: _schema.ELFRelocation, raw: bytearray ) -> _stencils.Hole: symbol: str | None match relocation: @@ -459,10 +453,7 @@ def _handle_section( stencil.holes.append(hole) def _handle_relocation( - self, - base: int, - relocation: _schema.MachORelocation, - raw: bytes | bytearray, + self, base: int, relocation: _schema.MachORelocation, raw: 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]
