@ai-ecoverse/wasix-python 3.14.2-22 → 3.14.2-24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -5
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/bin/python.wasm +0 -0
- package/include/python3.14/pythread.h +1 -1
- package/lib/libpython3.14.a +2 -2
- package/lib/python3.14/multiprocessing/__pycache__/connection.cpython-314.pyc +0 -0
- package/lib/python3.14/multiprocessing/__pycache__/context.cpython-314.pyc +0 -0
- package/lib/python3.14/multiprocessing/__pycache__/heap.cpython-314.pyc +0 -0
- package/lib/python3.14/multiprocessing/__pycache__/shared_memory.cpython-314.pyc +0 -0
- package/lib/python3.14/multiprocessing/connection.py +9 -1
- package/lib/python3.14/multiprocessing/context.py +4 -1
- package/lib/python3.14/multiprocessing/heap.py +6 -0
- package/lib/python3.14/multiprocessing/shared_memory.py +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@ CPython 3.14 for slicc WASIX (`commands` `python` / `python3`).
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- PIE dynamic-main (`dylink.0`) on wasix-sysroot 2025.9.30-
|
|
7
|
+
- PIE dynamic-main (`dylink.0`) on wasix-sysroot 2025.9.30-31's `sysroot-ehpic` (legacy wasm EH), SOABI `cpython-314-wasm32-wasix`; native side modules (py-numpy, py-scipy, py-pandas, …) load by `dlopen`
|
|
8
8
|
- **File modes** (3.14.2-12, on slicc-kernel ≥ 1.35.1; older kernels keep the no-op modes): `os.umask`, `open()`/`os.mkdir` create modes, `os.chmod`, `tempfile.mkstemp` 600 / `mkdtemp` 700, pip console scripts 755
|
|
9
9
|
- Built in: `ssl`/`hashlib` (OpenSSL 3.5.9, `@ai-ecoverse/wasix-openssl`), `zlib` 1.3.1, `bz2`, `lzma` (xz 5.8.4), `sqlite3` (3.54.0; FTS5, JSON, math, R*Tree; no WAL, no extensions), `readline` 8.3 (ncurses 6.5 terminfo compiled in: xterm, screen, tmux, vt100, linux), `ctypes` / `_ctypes` (wasix-org/libffi; needs slicc-kernel#306 step 1 for `call_dynamic` + `closure_{allocate,free}`), `mmap`, `fcntl`, `termios`, `resource`, `pwd`, `grp`, `select`
|
|
10
10
|
- No `fork`/`vfork`; `subprocess` via `os.posix_spawn` (`proc_spawn2`/`3`)
|
|
11
11
|
- `os.getuid()`/`getgid()`/`getgroups()` and `pwd`/`grp` come from slicc-kernel's process credentials and its `/etc/passwd`/`/etc/group` (3.14.2-13, wasix-sysroot -20; slicc-kernel ≥ 1.44.0, no fallback: ids are -1 on older kernels). Root is uid 0 with home `/root`.
|
|
12
|
-
-
|
|
12
|
+
- Record locks (`fcntl` F_SETLK*, `lockf`) go through slicc-kernel (since -21, below); `flock` is a no-op
|
|
13
13
|
- stdout is line-buffered unless it is a regular file, so output streams and survives crashes
|
|
14
14
|
- `signal.alarm`/`setitimer` and `time.sleep` resuming after a signal (the sysroot's libc patches, `patches/`)
|
|
15
15
|
- Bundled `pip` 25.3; `.pyc` are unchecked-hash
|
|
@@ -18,6 +18,49 @@ CPython 3.14 for slicc WASIX (`commands` `python` / `python3`).
|
|
|
18
18
|
|
|
19
19
|
Since 3.14.2-12 the package is cross-built from source in CI (`build.sh`); see `THIRD-PARTY-NOTICES.md` for the statically linked libraries.
|
|
20
20
|
|
|
21
|
+
Since 3.14.2-24 (wasix-sysroot -31):
|
|
22
|
+
|
|
23
|
+
- `multiprocessing.Manager()` works: `dict`, `list`, `Queue`, `Namespace`,
|
|
24
|
+
`Value` and the other managed objects, also passed to spawned children,
|
|
25
|
+
over an AF_UNIX socket. Up to -23 the first proxy call raised
|
|
26
|
+
`TypeError: str, bytes or bytearray expected, not int`: WASIX's libc
|
|
27
|
+
returned family 0 and no path from `getsockname`, `getpeername` and
|
|
28
|
+
`accept` for every AF_UNIX socket (homescoop#515). `socket.getsockname()`
|
|
29
|
+
of a bound AF_UNIX socket now gives its path, and an unbound one `''`.
|
|
30
|
+
- A Manager is what the -23 error for shared ctypes recommends, so that
|
|
31
|
+
advice holds now (homescoop#669). The error also names `Barrier`, which
|
|
32
|
+
keeps its state in shared memory too.
|
|
33
|
+
- From the sysroot: `select.poll` reports `POLLHUP` for a registered fd with
|
|
34
|
+
no events whose peer closed, and `POLLERR` for a pipe write end whose
|
|
35
|
+
reader is gone; a process is no longer limited to 256 named semaphores.
|
|
36
|
+
|
|
37
|
+
Since 3.14.2-23:
|
|
38
|
+
|
|
39
|
+
- `multiprocessing.connection`'s `Listener` on an AF_UNIX path closes
|
|
40
|
+
cleanly on every kernel. slicc-kernel before 1.103.1 keeps socket paths out
|
|
41
|
+
of the filesystem (slicc-kernel#753), so the path it unlinks at close was
|
|
42
|
+
already gone, and up to -22 `close()` raised `FileNotFoundError` there. `multiprocessing.Manager()` also
|
|
43
|
+
needs WASIX's libc to return AF_UNIX addresses from `getsockname`, which
|
|
44
|
+
comes with wasix-sysroot -31 in the next release (homescoop#515).
|
|
45
|
+
- `threading.get_native_id()` and `Thread.native_id` exist (WASIX's thread id;
|
|
46
|
+
homescoop#587). Up to -22 they were missing or `None`, and
|
|
47
|
+
`scipy.fft.set_backend`/`skip_backend` raised `AttributeError`.
|
|
48
|
+
- **Shared memory fails loudly instead of silently** (homescoop#516).
|
|
49
|
+
Processes share no memory here, so nothing written into an `mp.Value`,
|
|
50
|
+
`mp.Array` (with or without a lock) or `SharedMemory` ever reached another
|
|
51
|
+
process, and up to -22 nothing said so.
|
|
52
|
+
- Passing a `Value`, `Array` or other shared ctypes object to a child
|
|
53
|
+
(`Process` arguments, `Pool` initargs) now raises `NotImplementedError` at
|
|
54
|
+
`start()`, naming a Queue, a Pipe or a Manager as the alternatives. Inside
|
|
55
|
+
one process (threads) they work as before.
|
|
56
|
+
- `multiprocessing.shared_memory` raises `ImportError` on import, as on
|
|
57
|
+
upstream WASI builds, and `multiprocessing.managers.HAS_SHMEM` is
|
|
58
|
+
`False`.
|
|
59
|
+
- `multiprocessing.get_all_start_methods()` is `['spawn']`, and
|
|
60
|
+
`get_context("fork")`/`("forkserver")` raise `ValueError`. Up to -22 they
|
|
61
|
+
listed `fork` and `forkserver`, and a fork `Process` failed at `start()`
|
|
62
|
+
with `AttributeError` (no `os.fork`, homescoop#357).
|
|
63
|
+
|
|
21
64
|
Since 3.14.2-22 the `sqlite3` module uses SQLite's `unix` VFS, with `fcntl`
|
|
22
65
|
locks, instead of SQLITE_WASI's default `unix-dotfile`, whose `.lock`
|
|
23
66
|
directory no other program saw. Python and the sqlite3 CLI (or another
|
|
@@ -36,9 +79,10 @@ Since 3.14.2-21 (wasix-sysroot -30):
|
|
|
36
79
|
- `multiprocessing` works with the `spawn` start method (the default):
|
|
37
80
|
`Pool`, `Queue`, `Lock`, `Semaphore` and the other synchronisation
|
|
38
81
|
primitives, across processes. Its named semaphores are kept by slicc-kernel
|
|
39
|
-
(≥ 1.99.0). `shared_memory` and shared ctypes (`Value`/`Array
|
|
40
|
-
`lock
|
|
41
|
-
no `fork` start method (no
|
|
82
|
+
(≥ 1.99.0). `shared_memory` and shared ctypes (`Value`/`Array`, whatever
|
|
83
|
+
their `lock`) aren't shared between processes, because processes don't
|
|
84
|
+
share memory (an error since -23). There is no `fork` start method (no
|
|
85
|
+
`os.fork`).
|
|
42
86
|
- `fcntl.lockf`/`fcntl.fcntl` record locks and `os.lockf` go through the libc
|
|
43
87
|
to slicc-kernel (slicc-kernel#722) and hold against other processes, such as
|
|
44
88
|
a second python or the sqlite3 CLI on the same database. On an older kernel
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -13,7 +13,7 @@ bin/python.wasm statically links the components below. The table lists them; eac
|
|
|
13
13
|
| GNU Readline | 8.3 | GPL-3.0-or-later | gnu.org/software/readline |
|
|
14
14
|
| ncurses (tinfo) | 6.5 | X11 | invisible-island.net/ncurses |
|
|
15
15
|
| libffi | 3.5.1 (wasix-org 09cbf7d + patches/libffi-wasix-varargs.patch) | MIT | github.com/wasix-org/libffi |
|
|
16
|
-
| wasix-libc | wasix-sysroot 2025.9.30-
|
|
16
|
+
| wasix-libc | wasix-sysroot 2025.9.30-31 | Apache-2.0 WITH LLVM-exception, MIT | @ai-ecoverse/wasix-sysroot |
|
|
17
17
|
| libc++, libc++abi, libunwind | wasix-libc v2026-07-03.1 sysroot-ehpic (LLVM 20.1) | Apache-2.0 WITH LLVM-exception | github.com/wasix-org/wasix-libc |
|
|
18
18
|
|
|
19
19
|
GNU Readline is licensed under the GPL-3.0-or-later and is linked statically, so bin/python.wasm as a whole (a combined work with CPython, whose PSF-2.0 licence is GPL-compatible, and the other components above, all under GPL-compatible licences) is distributed under the terms of the GPL-3.0-or-later; hence the package licence PSF-2.0 AND GPL-3.0-or-later. Redistributors pass on its Corresponding Source: the homescoop repository (https://github.com/ai-ecoverse/homescoop) at the commit this release was built from, plus the sha256-pinned upstream archives and dev packages its recipe.yaml lists, which homescoop keeps available.
|
|
@@ -2022,7 +2022,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
2022
2022
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
2023
2023
|
```
|
|
2024
2024
|
|
|
2025
|
-
## wasix-libc (@ai-ecoverse/wasix-sysroot 2025.9.30-
|
|
2025
|
+
## wasix-libc (@ai-ecoverse/wasix-sysroot 2025.9.30-31; files from tag v2025-09-02.1)
|
|
2026
2026
|
|
|
2027
2027
|
```text
|
|
2028
2028
|
wasi-libc as a whole is multi-licensed under the
|
package/bin/python.wasm
CHANGED
|
Binary file
|
|
@@ -42,7 +42,7 @@ PyAPI_FUNC(unsigned long) PyThread_get_thread_ident(void);
|
|
|
42
42
|
#if (defined(__APPLE__) || defined(__linux__) || defined(_WIN32) \
|
|
43
43
|
|| defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
|
|
44
44
|
|| defined(__OpenBSD__) || defined(__NetBSD__) \
|
|
45
|
-
|| defined(__DragonFly__) || defined(_AIX))
|
|
45
|
+
|| defined(__DragonFly__) || defined(_AIX) || defined(__wasi__))
|
|
46
46
|
#define PY_HAVE_THREAD_NATIVE_ID
|
|
47
47
|
PyAPI_FUNC(unsigned long) PyThread_get_thread_native_id(void);
|
|
48
48
|
#endif
|
package/lib/libpython3.14.a
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/lib/libpython3.14.a
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 59670786 bytes
|
|
4
|
+
sha256: c614008b169a505ef753438e52e6e65be14fecfa21454dcea57589d91504a5d5
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -634,7 +634,8 @@ class SocketListener(object):
|
|
|
634
634
|
if family == 'AF_UNIX' and not util.is_abstract_socket_namespace(address):
|
|
635
635
|
# Linux abstract socket namespaces do not need to be explicitly unlinked
|
|
636
636
|
self._unlink = util.Finalize(
|
|
637
|
-
self, os.unlink,
|
|
637
|
+
self, _unlink_socket if sys.platform == 'wasi' else os.unlink,
|
|
638
|
+
args=(address,), exitpriority=0
|
|
638
639
|
)
|
|
639
640
|
else:
|
|
640
641
|
self._unlink = None
|
|
@@ -654,6 +655,13 @@ class SocketListener(object):
|
|
|
654
655
|
unlink()
|
|
655
656
|
|
|
656
657
|
|
|
658
|
+
def _unlink_socket(path):
|
|
659
|
+
try:
|
|
660
|
+
os.unlink(path)
|
|
661
|
+
except FileNotFoundError:
|
|
662
|
+
pass
|
|
663
|
+
|
|
664
|
+
|
|
657
665
|
def SocketClient(address):
|
|
658
666
|
'''
|
|
659
667
|
Return a connection object connected to the socket given by `address`
|
|
@@ -319,10 +319,13 @@ if sys.platform != 'win32':
|
|
|
319
319
|
'spawn': SpawnContext(),
|
|
320
320
|
'forkserver': ForkServerContext(),
|
|
321
321
|
}
|
|
322
|
+
if sys.platform == 'wasi' and not hasattr(os, 'fork'):
|
|
323
|
+
del _concrete_contexts['fork'], _concrete_contexts['forkserver']
|
|
322
324
|
# bpo-33725: running arbitrary code after fork() is no longer reliable
|
|
323
325
|
# on macOS since macOS 10.14 (Mojave). Use spawn by default instead.
|
|
324
326
|
# gh-84559: We changed everyones default to a thread safeish one in 3.14.
|
|
325
|
-
if
|
|
327
|
+
if ('forkserver' in _concrete_contexts and reduction.HAVE_SEND_HANDLE
|
|
328
|
+
and sys.platform != 'darwin'):
|
|
326
329
|
_default_context = DefaultContext(_concrete_contexts['forkserver'])
|
|
327
330
|
else:
|
|
328
331
|
_default_context = DefaultContext(_concrete_contexts['spawn'])
|
|
@@ -98,6 +98,12 @@ else:
|
|
|
98
98
|
return util.get_temp_dir()
|
|
99
99
|
|
|
100
100
|
def reduce_arena(a):
|
|
101
|
+
if sys.platform == 'wasi':
|
|
102
|
+
raise NotImplementedError(
|
|
103
|
+
'multiprocessing: Value, Array, Barrier and other objects '
|
|
104
|
+
'in shared memory cannot be shared with another process on '
|
|
105
|
+
'WASI, where processes share no memory; use a Queue, a Pipe '
|
|
106
|
+
'or a Manager')
|
|
101
107
|
if a.fd == -1:
|
|
102
108
|
raise ValueError('Arena is unpicklable because '
|
|
103
109
|
'forking was enabled when it was created')
|
|
@@ -14,11 +14,16 @@ import os
|
|
|
14
14
|
import errno
|
|
15
15
|
import struct
|
|
16
16
|
import secrets
|
|
17
|
+
import sys
|
|
17
18
|
import types
|
|
18
19
|
|
|
19
20
|
if os.name == "nt":
|
|
20
21
|
import _winapi
|
|
21
22
|
_USE_POSIX = False
|
|
23
|
+
elif sys.platform == "wasi":
|
|
24
|
+
raise ImportError(
|
|
25
|
+
"multiprocessing.shared_memory is not available on WASI: "
|
|
26
|
+
"processes share no memory")
|
|
22
27
|
else:
|
|
23
28
|
import _posixshmem
|
|
24
29
|
_USE_POSIX = True
|
package/package.json
CHANGED