Commit Graph

42 Commits

Author SHA1 Message Date
Gyeongjae Choi ed3ae1ba49
Download standard libraries in a zipfile (#3582) 2023-03-01 23:11:30 +01:00
Gyeongjae Choi 9e1e575dfe
Deepfreeze essential parts of the encodings module (#3585) 2023-02-22 18:40:05 +09:00
Gyeongjae Choi f50c749c9a
Apply upstream cpython commits to relocate test directories (#3507) 2023-01-30 13:34:33 +09:00
Hood Chatham 3b2952fc92
Python3.11 (#3252) 2023-01-23 19:45:59 -08:00
Hood Chatham 68b3f3d067
Fix top level multiprocessing.connection import and update yt (#3371)
This updates yt. The new yt has a top level `multiprocessing.connection` import so we patch
that so that it can be imported without raising an error.
2022-12-19 16:56:31 -08:00
Gyeongjae Choi cb29aca290
Patch ctypes.util.find_library to support Emscripten platform (#3353) 2022-12-18 11:20:00 +01:00
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 1335d7ee64
Add argument handling and _run_main function (#3021)
The command line runner in #2976 finally works, but it is a large change set so
I am planning to split it up. This is the first PR split off from there.

This PR adds a patch to Python to expose pymain_run_python. We cannot use the
public API Py_RunMain for this purpose because it finalizes the Python
interpreter with Py_FinalizeEx when it is done. If we start an async task with
Py_RunMain then it will segfault. pymain_run_python does a large amount of work
and reproducing it is undesirable.

I added an args parameter which accepts command line arguments. The private
entry point pyodide._main._run_main() executes the main Python entrypoint
without shutting down the interpreter and returns the return code.
2022-08-30 08:49:06 -07: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 f04ba9d56a
Add bitarray (#2459) 2022-05-04 09:50:44 -06:00
Hood Chatham fda600e519
Fix interrupt handler patch (#2405) 2022-04-19 14:40:58 +02:00
Hood Chatham dfbf28856e
New keyboard interrupt patch from upstream (#2332) 2022-04-08 08:35:58 -07:00
Hood Chatham eb8afb00c2
Update libffi commit (#2350)
All libffi tests pass now. The only failing ctypes test is test_callback_too_many_args which doesn't segfault anymore, it only soft fails. Planning to submit a PR to cpython that fixes test_callback_too_many_args.
See also:
bugs.python.org/issue47208
https://github.com/emscripten-core/emscripten/pull/16658
2022-04-04 21:18:20 -07:00
Hood Chatham f06eb77387
Remove bad ctypes patch (#2331) 2022-03-30 15:03:36 -07:00
Hood Chatham 0e1e2ac01c
Python 3.10 (#2225) 2022-03-17 15:48:56 -07:00
Hood Chatham 19261f394c
Remove function pointer cast emulation (#2019) 2021-12-09 10:31:21 -08:00
Roman Yurchak 82aa271b4e
Remove disable-set-inheritable CPython patch (#2003) 2021-11-26 14:47:04 -08:00
Hood Chatham 70e9e19dde
Patches from joemarshall/fpcast (#1708)
Co-authored-by: joemarshall <joe.marshall@nottingham.ac.uk>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-11-13 12:31:11 +01:00
Gyeongjae Choi 754ae621c8
Drop Python built-in pwd module support (#1883) 2021-10-12 20:45:46 +02:00
Hood Chatham 3e3d6eb8a9
ENH Support PyErr_CheckSignals interrupts (#1294) 2021-09-26 11:53:46 -07:00
Hood Chatham 6059fc7652
Remove fpcast calls from CALL_FUNCTION opcode (#1699) 2021-07-18 15:04:42 -07:00
Hood Chatham 447da28e80
Up to date libffi port (with varargs support) (#1674) 2021-06-29 19:01:19 -07:00
Hood Chatham 653891b045
ENH Add Ctypes support (#1656) 2021-06-26 10:34:31 +02:00
Hood Chatham b4f4bcffdc
Update to Python 3.9.5 (#1637)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-06-19 15:49:25 -07:00
joemarshall 1bd8380c01
Emscripten 2.0.12 Upstream backend (#1102)
Co-authored-by: Dexter Chua <dalcde@users.noreply.github.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-02-06 08:58:12 +01:00
Hood Chatham f8d363822c
Patch ceval to add callback to use for KeyboardInterrupt handling (#1148)
* Patch ceval to add interrupt handler callback

* Don't use SharedArrayBuffer in test, Firefox doesn't expose it

* Fix test

* Retest

Co-authored-by: Jan Max Meyer <jmm@phorward.de>
2021-01-20 23:27:28 +01:00
Dexter Chua a211802b44
Slightly simplify cpython patch (#1023) 2021-01-03 09:48:16 +01:00
Dexter Chua 043f699c3f
Remove superfluous CPython patch (#993) 2020-12-31 18:22:33 +01:00
Dexter Chua 9e6a9f426d
Remove some unneeded CPython patches (#994) 2020-12-31 18:19:24 +01:00
Dexter Chua e8cc4e8835
PKG Configure zlib, not patch (#849)
The #include <unistd.h> line is added in zconf.h, which is generated by
configure.
2020-12-12 12:33:33 +01:00
Dexter Chua c870b3ebf5
BLD Replace sqlite patch with Makefile configuration (#841)
When sqlite was originally added, the issue
described was bypassed by patching the python files. An alternative
workaround is used here that doesn't require any patching.
2020-12-10 09:01:17 +01:00
Dexter Chua 688ec60a40
Remove unnecessary no_af_vsock patch (#839)
In `pyconfig.undefs.h` we have undefined `HAVE_LINUX_VM_SOCKETS_H`, and
based on that, `Modules/socketmodule.h` already undefines `AF_VSOCK` for
us.
2020-12-09 08:21:08 +01:00
Roman Yurchak fc5495ffdb
Update to Python 3.8.2 (#712)
* Updating to CPython 3.8

* More fixes

* Skip python headers check in tools/dependency-check.sh

* Fix checksum

* Fix packages

* Fix syntax error

* Fix benchmark path

* Update CPython tests

* More test fixes

* Fix PyStone

* More Cpython test fixes

* Update docs

* Fix issue in conftest

* Add documentation

* Upload updated Docker image
2020-07-07 16:21:33 +02:00
Adam Seering f71b69bf7c
ENH Upgrade to Python 3.7.1 (#619) 2020-03-11 11:32:30 +01:00
Marc Abramowitz ac76220b59 Enable building sqlite3 into cpython (#352)
* Enable building sqlite3 into cpython
2019-03-26 08:44:21 -04:00
Michael Droettboom 56562257ef Fix #71: Upgrade to Python 3.7 2018-09-06 10:56:33 -04:00
Michael Droettboom 6c1b25101b Fix some tests 2018-07-25 11:07:57 -04:00
Michael Droettboom 8b1c538ef2 Mark broken tests so the test suite runs 2018-04-11 15:26:19 -04:00
Michael Droettboom e382ada4ce More progress on running CPython tests 2018-04-09 15:53:33 -04:00
Michael Droettboom 6cce6d654d Basics for testing CPython 2018-04-09 10:39:52 -04:00
Michael Droettboom f2c08119af Add internal cpython build 2018-02-27 17:57:22 -05:00