File: 0045-Rename-base-ByteCode-class-to-_ByteCode.patch

package info (click to toggle)
numba 0.56.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,672 kB
  • sloc: python: 183,651; ansic: 15,370; cpp: 2,259; javascript: 424; sh: 308; makefile: 174
file content (40 lines) | stat: -rw-r--r-- 1,094 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From: Siu Kwan Lam <1929845+sklam@users.noreply.github.com>
Origin: https://github.com/numba/numba/pull/8545
Date: Wed, 23 Nov 2022 13:44:54 -0600
Subject: Rename base ByteCode class to _ByteCode

---
 numba/core/bytecode.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/numba/core/bytecode.py b/numba/core/bytecode.py
index 410fb4c..5fe02ef 100644
--- a/numba/core/bytecode.py
+++ b/numba/core/bytecode.py
@@ -202,7 +202,7 @@ class ByteCodeIter(object):
         return buf
 
 
-class ByteCode(object):
+class _ByteCode(object):
     """
     The decoded bytecode of a function, and related information.
     """
@@ -307,7 +307,7 @@ class ByteCode(object):
                                           self.co_consts, self.co_names)
 
 
-class ByteCodePy311(ByteCode):
+class ByteCodePy311(_ByteCode):
     def __init__(self, func_id):
         super().__init__(func_id)
 
@@ -340,6 +340,8 @@ class ByteCodePy311(ByteCode):
 
 if PYVERSION >= (3, 11):
     ByteCode = ByteCodePy311
+else:
+    ByteCode = _ByteCode
 
 
 class FunctionIdentity(serialize.ReduceMixin):