Commit Graph

46 Commits

Author SHA1 Message Date
Miss Islington (bot) 9aeb9d1e80
wasm: do not use inline comment in .editorconfig (GH-106610)
It is no longer valid since 0.15.0
https://github.com/editorconfig/specification/blob/v0.15/index.rstGH-no-inline-comments
(cherry picked from commit 64c0890b69)

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2023-07-16 16:03:24 +09:00
Miss Islington (bot) 966e0f6494
[3.11] gh-100340: Allows -Wno-int-conversion for wasm (GH-100341) (#106066)
(cherry picked from commit 75c8133efe)

Co-authored-by: Kushal Das <mail@kushaldas.in>
2023-06-28 09:27:59 +02:00
Christian Heimes 876606fc65
[3.11] gh-96883: browser: include concurrent.futures (GH-96886) (GH-96888) 2022-09-17 16:40:24 +02:00
Miss Islington (bot) 8238fa91c1
gh-84461: Omit resource mod and getresuid funcs on Emscripten (GH-96303)
(cherry picked from commit a36235d5c7)

Co-authored-by: Christian Heimes <christian@python.org>
2022-09-13 03:08:12 -07:00
Christian Heimes 4958820032
[3.11] gh-95853: Add script to automate WASM build (GH-95828, GH-95985, GH-96045, GH-96389, GH-96744) (GH-96749)
Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.

``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.
2022-09-13 12:06:39 +02:00
Miss Islington (bot) 390123b412
[3.11] gh-96320: WASI socket fixes (GH-96388) (GH-#96748)
- ignore missing functions in ``socket.__repr__``
- bundle network files with assets
2022-09-13 12:05:25 +02:00
Christian Heimes e62a0dfab2
[3.11] gh-95174: Add pthread stubs for WASI (GH-95234) (#95503)
Co-authored-by: Brett Cannon <brett@python.org>.
(cherry picked from commit 0fe645d6fd)

Co-authored-by: Christian Heimes <christian@python.org>
2022-08-01 15:37:45 +01:00
Christian Heimes 06b5f78d64
[3.11] gh-95174: WASI: skip missing sockets functions (GH-95179) (GH-95308)
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-07-31 18:19:32 +02:00
Miss Islington (bot) 25086f1eed
gh-95174: Move WASIX logic into wasi-env (GH-95320)
wasi-env now sets WASIX flags. This allows us to control all build
parameter for wasm32-wasi buildbot from CPython repository.

Also export and improve SYSROOT parameter.
(cherry picked from commit 2833f3798d)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-27 07:11:00 -07:00
Miss Islington (bot) 202311c67a
[3.11] gh-95085: Promote Emscripten and WASI to PEP 11 tier 3 (GH-95086) (GH-95307)
Co-authored-by: Christian Heimes <christian@python.org>
2022-07-27 11:16:38 +02:00
Miss Islington (bot) 6284f23258
gh-95205: Improve WASM README.md (GH-95267) (GH-95270)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit e8f3e8f0ab)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-26 12:17:05 +02:00
Miss Islington (bot) df95ad3d72
gh-95205: Improve wasm README (GH-95206)
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit 310f94871a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-07-25 02:52:47 -07:00
Miss Islington (bot) e98728ab4d
gh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035)
(cherry picked from commit 0f34c7e2d3)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-20 00:17:52 -07:00
Miss Islington (bot) 9fa966136f
gh-84461: Tool/wasm/python.html: Add subresource integrity hashes (GH-93953)
(cherry picked from commit 1df9449db2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2022-07-01 03:17:38 -07:00
Miss Islington (bot) ca58ca8641
gh-84461: Improve WebAssembly in-browser demo (GH-91879)
* Buffer standard input line-by-line

* Add non-root .editorconfig for JS & HTML indent

* Add support for clearing REPL with CTRL+L

* Support unicode in stdout and stderr

* Remove \r\n normalization

* Note that local .editorconfig file extends root

* Only normalize lone \r characters (convert to \n)

* Skip non-printable characters in buffered input

* Fix Safari bug (regex lookbehind not supported)

Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit a8e333d79a)

Co-authored-by: Trey Hunner <trey@treyhunner.com>
2022-07-01 03:16:25 -07:00
Miss Islington (bot) c966e0816e
gh-84461: Build Emscripten with WASM BigInt support (GH-94219)
(cherry picked from commit e69306f08b)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-24 08:30:46 -07:00
Miss Islington (bot) 4d2c972ff7
gh-84461: Fix ctypes and test_ctypes on Emscripten (GH-94142)
- c_longlong and c_longdouble need experimental WASM bigint.
- Skip tests that need threading
- Define ``CTYPES_MAX_ARGCOUNT`` for Emscripten. libffi-emscripten 2022-06-23 supports up to 1000 args.
(cherry picked from commit 8625802d85)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-24 04:17:21 -07:00
Christian Heimes 1073184918
[3.11] gh-84461: Fix Emscripten umask and permission issues (GH-94002) (GH-94006)
Co-authored-by: Christian Heimes <christian@python.org>
2022-06-19 20:18:34 +02:00
Miss Islington (bot) 6c8eb9503c
gh-84461: Fix pydebug Emscripten browser builds (GH-93982)
wasm_assets script did not take the ABIFLAG flag of sysconfigdata into
account.
(cherry picked from commit 7a2cc35e1c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-18 06:17:09 -07:00
Miss Islington (bot) 6e28032662
gh-84461: Document how to install SDKs manually (GH-93844)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit 8ba1c7f720)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-15 12:53:51 -07:00
Miss Islington (bot) 52032554ae
gh-84461: Emscripten's faccessat() does not accept flags (GHß92353)
(cherry picked from commit 70690c7233)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-07 05:28:11 -07:00
Miss Islington (bot) 6787a8f146
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534) (GH-93550)
WASI does not have the ``chmod(2)`` syscall yet.
(cherry picked from commit 22fed605e0)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 20:09:51 +02:00
Miss Islington (bot) 20be4a11fe
gh-90473: WASI requires proper open(2) flags (GH-93529)
(cherry picked from commit 4c71d22c4f)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 03:32:23 -07:00
Miss Islington (bot) 1d2b766100
gh-90473: Skip and document more failing tests on WASI (GH-93436)
- Mark more ``umask()`` cases
- ``dup()`` is not supported
- ``/dev/null`` is not available
- document missing features
- mark more modules as not available
(cherry picked from commit 069c96f84c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-02 23:50:44 -07:00
Miss Islington (bot) 0fb70ce191
gh-90473: Misc test fixes for WASI (GH-93218)
* ``sys.executable`` is not set
* WASI does not support subprocess
* ``pwd`` module is not available
* WASI checks ``open`` syscall flags more strict, needs r, w, rw flag.
* ``umask`` is not available
* ``/dev/null`` may not be accessible
(cherry picked from commit 1f134e96ba)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-25 07:24:32 -07:00
Miss Islington (bot) a29b1f8b4b
gh-90473: WASI: skip gethostname tests (GH-93092)
- WASI's ``gethostname()`` is a stub that always fails with OSError
  ``ENOTSUP``
- skip mailcap ``test`` if subprocess is not available
- WASI process_time clock does not work.
(cherry picked from commit 760ec8940a)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-23 08:21:45 -07:00
Miss Islington (bot) 7afccd34a6
gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)
(cherry picked from commit 137fd3d88a)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-19 08:05:52 -07:00
Christian Heimes 92c1037afc
gh-84461: Add --enable-wasm-pthreads and more file systems (GH-91820) 2022-04-23 14:59:33 +02:00
Christian Heimes 9b5ca5405e
gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781) 2022-04-23 09:52:16 +02:00
Christian Heimes defbbd68f7
bpo-40280: WASM docs and smaller browser builds (GH-32412)
Co-authored-by: Brett Cannon <brett@python.org>
2022-04-10 09:29:51 +02:00
Christian Heimes 96e09837fb
bpo-40280: Add limited Emscripten REPL (GH-32284)
Co-authored-by: Katie Bell <katie@katharos.id.au>
2022-04-05 11:21:11 +02:00
Christian Heimes c9844cb8aa
bpo-40280: Add --enable-wasm-dynamic-linking (GH-32253) 2022-04-04 19:31:31 +02:00
Christian Heimes 4ed8a9a589
bpo-40280: Enable most file-at() and nanosleep APIs again (GH-32238) 2022-04-02 10:13:44 +02:00
Christian Heimes 4aea656d62
bpo-32033: Finalize WASI configure options (GH-32053) 2022-03-22 18:42:09 +01:00
Christian Heimes ef1327e3b6
bpo-40280: Skip more tests on Emscripten (GH-31947)
- lchmod, lchown are not fully implemented
- skip umask tests
- cannot fstat unlinked or renamed files yet
- ignore musl libc issues that affect Emscripten
2022-03-17 12:09:57 +01:00
Christian Heimes ecfff63e06
bpo-40280: Disable AF_UNIX, AF_PACKET, SO_REUSE* on Emscripten (#31829)
Emscripten's socket emulation is limited. AF_UNIX, AF_PACKET, setsockopt(), and most SO_* constants are not supported.
2022-03-11 23:25:14 +01:00
Christian Heimes de554d6e02
bpo-40280: Skip more tests/features that don't apply to Emscripten (GH-31791)
- fd inheritance can't be modified because Emscripten doesn't support subprocesses anyway.
- setpriority always fails
- geteuid no longer causes problems with latest emsdk
- umask is a stub
- geteuid / getuid always return 0, but process cannot chown to random uid.
2022-03-10 13:43:40 +01:00
Christian Heimes 5081e78efd
bpo-40280: Block more non-working syscalls in Emscripten (GH-31757)
- getgroups always fails.
- geteuid and getegid always return 0 (root), which confuse tarfile and
  tests.
- hardlinks (link, linkat) always fails.
- non-encodable file names are not supported by NODERAWFS layer.
- mark more tests with dependency on subprocess and multiprocessing.
  Mocking does not work if the module fails to import.
2022-03-08 12:17:30 +01:00
Christian Heimes 96b344c2f1
bpo-40280: Address more test failures on Emscripten (GH-31050)
Co-authored-by: Brett Cannon <brett@python.org>
2022-02-05 20:52:01 +01:00
Christian Heimes d5fd438b38
bpo-40280: Get help() working and more (GH-30858) 2022-01-24 22:02:01 +01:00
Christian Heimes c02e860ee7
bpo-40280: Misc fixes for wasm32-emscripten (GH-30722) 2022-01-20 18:56:33 +01:00
Christian Heimes ee1a8b336d
bpo-40280: Block more syscalls that are causing crashes in tests (GH-30601) 2022-01-14 18:48:44 +01:00
Christian Heimes a6ca8eee22
bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507) 2022-01-13 09:46:04 +01:00
Christian Heimes 43839ba438
bpo-40280: Add --with-emscripten-target to build for browser or node (GH-30552)
Co-authored-by: Ethan Smith <ethan@ethanhs.me>
2022-01-12 16:08:19 +01:00
Ethan Smith 5c66414b55
bpo-40280: Disable epoll_create in Emscripten config.site (GH-30494)
Co-authored-by: nick.pope@infogrid.io
2022-01-09 11:58:59 +01:00
Christian Heimes 0339434835
bpo-40280: Add Tools/wasm with helpers for cross building (GH-29984)
Co-authored-by: Ethan Smith <ethan@ethanhs.me>
Co-authored-by: Brett Cannon <brett@python.org>
2021-12-18 15:54:02 +01:00