12 Commits

Author SHA1 Message Date
Shahar Naveh
938d42184f Update some tests to 3.14.5 (#7990)
* Update `test_embed.py` to 3.14.5

* Update `test_cmd_line*` to 3.14.5

* Update unicode related tests

* Update `test_script_helper.py`

* Update `test_gc.py`
2026-05-30 20:16:10 +09:00
Shahar Naveh
48ad238349 Update some tests to 3.14.5 (#7909)
* Align patches for `test_class.py`

* Update more tests to 3.14.5

* Update `test_math`

* `test_hash.py`

* Update `test_grammar.py`

* Fix failing test

* Restore `test_grammar.py`
2026-05-19 13:31:33 +09:00
Jeong, YunWon
470bd5990b Fix test_import: import machinery, circular imports, and script shadowing (#7034)
* Fix test_import: import machinery and errors

- Emit IMPORT_FROM instead of LOAD_ATTR for `import a.b.c as m`
- Add "partially initialized module" error for circular imports
- Add "cannot access submodule" error for initializing submodules
- Implement script shadowing detection with "consider renaming" hint
  - Detect user scripts shadowing stdlib/third-party modules
  - Compute original sys.path[0] from sys.argv[0]
  - Check sys.stdlib_module_names for stdlib detection
  - Respect safe_path setting
- Implement _imp._fix_co_filename for code source_path rewriting
- Add data parameter to _imp.get_frozen_object with marshal deser
- Fix import_from: check __spec__.has_location before using origin
- Set ImportError.path attribute on import failures
- Fix import_star error messages for non-str __all__/__dict__ items
- Always call builtins.__import__ in import_inner

* Propagate __bool__ errors from fromlist in import

Previously, try_to_bool errors were silently swallowed via .ok(),
causing fromlist with broken __bool__ to default to false.
2026-02-09 01:40:26 +09:00
CPython Developers
75137f7cdd Update test_import from v3.14.3 2026-02-07 15:13:43 +09:00
Jeong, YunWon
40a43f3210 instruction improvements (#6829)
New Features

Direct small-integer loading (0–255) and locals-loading for faster execution
Async-generator wrapping and improved generator resume behavior
Performance

Faster integer loads and streamlined jump/loop handling for better runtime performance
Bug Fixes

More robust StopIteration handling and stricter init return checks
Corrected iterator cleanup for async and sync loops
Improvements

Aligns loop and jump semantics with CPython 3.14 patterns
2026-01-22 17:25:56 +09:00
Terry Tianlin Luan
4bec6bb6f9 Updated the pkgutil + unittest libraries + the pkgutil, unittest and import tests - v.3.13.11 (#6610)
* Updated unittest + tests

* Updated pkgutil + the associated test

* Updated test_import

* Fixed import + unittest test errors

* Updated test_dll_dependency_import with expectedFailure
2026-01-04 09:54:01 +09:00
Jeong, YunWon
75ecd72428 test_builtin.test_import (#6546)
* fix warnings

* fix test_import
2025-12-27 21:38:12 +09:00
Shahar Naveh
adc2b0dbbe Update test_zipfile64.py from 3.13.11 (#6433)
* Update `test_zipfile64.py` from 3.13.11

* Mark flaky test
2025-12-17 00:28:06 +09:00
Jiseok CHOI
d4f85cf073 Provide detailed error for circular from imports (#5972) 2025-07-15 01:45:42 +09:00
Noa
a86126419c Fix remaining tests 2025-03-25 19:05:12 -05:00
Jeong YunWon
8daffa76dd Mark failing tests of test_import 2023-03-01 18:07:36 +09:00
CPython Developers
d55f554d7b test_import from CPython 3.11.2 2023-03-01 18:06:50 +09:00