Commit Graph

4 Commits

Author SHA1 Message Date
Hood Chatham 33d1794a6e
Use a more robust method to improve our ModuleNotFound errors (#3263)
@ryanking13 added these very nice error messages to the `ModuleNotFound`
errors. However they introduce a few problems:
1. `find_spec` is supposed to return `None` or a spec and not to raise an error.
If it raises errors, it can cause trouble in code that tries to check if a module is
installed or not.
2. Other code that tries to add new import hooks has to know to insert them
before these error-raising import hooks.

See the discussion in #3262.

This instead patches `importlib._bootstrap` to create a function called
`_get_module_not_found_error`. We then can monkey patch this to modify
the error messages that `importlib` raises.

See Python issue: https://github.com/python/cpython/issues/100208
2022-12-12 18:35:51 -08:00
Hood Chatham 67aa16861d
Update Emscripten to 3.1.18 (#2950) 2022-08-21 17:17:49 -07:00
Hood Chatham 52f27f06ad
Update to emscripten 3.1.6 (#2672) 2022-06-10 08:13:36 -07:00
Hood Chatham 0e1e2ac01c
Python 3.10 (#2225) 2022-03-17 15:48:56 -07:00