Skip to content

Commit fe529bc

Browse files
committed
Complete lazy-import exception and traceback library closure
Copy canonical traceback and legacy exception mappings with preserved RustPython guards. Copy explicit non-Python library assets by exact path so exception hierarchy data does not expand into the entire test package. Assisted-by: OpenAI Codex:model version unavailable
1 parent d415d1a commit fe529bc

6 files changed

Lines changed: 1180 additions & 98 deletions

File tree

‎Lib/_compat_pickle.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@
183183
'SimpleDialog': 'tkinter.simpledialog',
184184
'DocXMLRPCServer': 'xmlrpc.server',
185185
'SimpleHTTPServer': 'http.server',
186-
'CGIHTTPServer': 'http.server',
187186
# For compatibility with broken pickles saved in old Python 3 versions
188187
'UserDict': 'collections',
189188
'UserList': 'collections',
@@ -225,8 +224,6 @@
225224
('DocXMLRPCServer', 'DocCGIXMLRPCRequestHandler'),
226225
('http.server', 'SimpleHTTPRequestHandler'):
227226
('SimpleHTTPServer', 'SimpleHTTPRequestHandler'),
228-
('http.server', 'CGIHTTPRequestHandler'):
229-
('CGIHTTPServer', 'CGIHTTPRequestHandler'),
230227
('_socket', 'socket'): ('socket', '_socketobject'),
231228
})
232229

@@ -251,6 +248,7 @@
251248
REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'OSError')
252249

253250
PYTHON3_IMPORTERROR_EXCEPTIONS = (
251+
'ImportCycleError',
254252
'ModuleNotFoundError',
255253
)
256254

‎Lib/test/exception_hierarchy.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ BaseException
1414
├── EOFError
1515
├── ExceptionGroup [BaseExceptionGroup]
1616
├── ImportError
17+
│ └── ImportCycleError
1718
│ └── ModuleNotFoundError
1819
├── LookupError
1920
│ ├── IndexError

0 commit comments

Comments
 (0)