Commit Graph

13 Commits

Author SHA1 Message Date
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
afdf8cefe8 Update importlib from v3.14.2 2026-02-05 00:21:34 +09:00
Jeong, YunWon
69601a18a4 Upgrade threading to 3.13.11; sys.setprofile & impl more threading (#6691)
* Upgrade threading,test_threading from 3.13.11

* increase ci limit to 45mins

* impl more threading

* no static for asyncgen
2026-01-12 15:33:28 +09:00
Jeong, YunWon
af884cb284 First step for Python 3.12 support (#5078)
* Mark 3.12

* Update importlib from Python 3.12.0

* Update test_importlib from Python3.12

* Mark failings tests from importlib

* Update test.support from Python3.12

* Fix unsupported parser feature

* mark failing test

* Update functools from Python 3.12

* manual type annotation

* slice behavior changed in 3.12

* empty unittest.main returns non-zero

* test_decimal from CPython 3.12

* Mark failing tests

* Update test_unicode from CPython 3.12

* Update test_functools from Python 3.12

* Update enum from Python 3.12

* enum

* Doc format changed

* Update test_module from CPython

---------

Co-authored-by: CPython developers <>
2023-10-22 19:19:05 -07:00
CPython Developers
496006d629 Update importlib from CPython 3.11.2 2023-02-25 22:59:57 +09:00
Jeong YunWon
9a40c87dbd mark hanging/failing tests 2022-08-18 03:22:20 +09:00
CPython Developers
da109336bb Update importlib/test_importlib from CPython 3.10.6 2022-08-18 03:22:20 +09:00
Padraic Fanning
c8748bc98e Fix test.support imports 2022-02-13 17:56:08 -05:00
Padraic Fanning
5d4faf0ccf Skip tests that sometimes hang the CI
Tested with `act`.
2021-08-19 00:42:35 +09:00
Padraic Fanning
44d10c7e1e Skip flaky test in test_importlib/test_locks 2021-07-10 19:21:08 -04:00
Noah
02daac61e5 Try fixing macos deadlock 2020-11-02 12:42:44 -06:00
Aviv Palivoda
f039959480 Mark unsupported py_compile tests 2020-07-18 17:04:35 +03:00
Aviv Palivoda
e6d413b30b Add test_importlib from CPython 3.8 2020-07-18 17:04:35 +03:00