Commit Graph

3421 Commits

Author SHA1 Message Date
Alexey Ignatiev b81df2925a
Updated python-sat to version 1.8.dev7. (#4656) 2024-04-02 17:36:37 +09:00
Gyeongjae Choi d3bb516d92
Add changelog entry for 0.25.1 (#4657) 2024-03-31 20:19:15 +09:00
Gyeongjae Choi 7cb3ad8412
Fix build error on pypa/build >= 1.2.0 (#4653)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-31 15:31:28 +09:00
Yuichiro Tachibana (Tsuchiya) c776168c53
Update docs/usage/file-system.md about IDBFS (#4650) 2024-03-30 12:38:50 +09:00
Gyeongjae Choi bd643ae5f7
PKG Add pygame-ce (#4602) 2024-03-29 17:55:21 +09:00
Gyeongjae Choi 08e22b4e43
xfail slow tests in firefox (#4643) 2024-03-29 17:54:00 +09:00
Alexey Ignatiev 65de1f69a5
Updated python-sat to version 1.8.dev6. (#4641) 2024-03-28 17:20:08 +09:00
Hood Chatham 49a605094f
Fix stack switching leaks (#4639)
Stack switching was leaking datastack chunks. This seems to fix it. It is very confusing,
but the leaked chunks are allocated in slabs of size 2^14 so it doesn't take long to leak
a substantial amount of memory.

Code inspired by greenlet:
937f150e07/src/greenlet/TPythonState.cpp (L291)
2024-03-27 21:11:03 +01:00
Hood Chatham fd07a6a10b
Fix toJs on dict subclasses (#4637) 2024-03-26 11:34:16 +01:00
Matthias Hochsteger 8daf71c306
Fix Ipython dependencies (#4626)
Co-authored-by: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
2024-03-26 11:32:04 +01:00
dependabot[bot] 9006a6572d
Bump the github-actions group with 8 updates (#4630)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 16:39:28 +09:00
Hood Chatham a71970e033
Make `to_js` of a dictionary return a `LiteralMap` (#4576)
Co-authored-by: Andrea Giammarchi <andrea.giammarchi@gmail.com>
2024-03-25 23:35:45 +01:00
David Contreras 56708507fa
Fixed Fatal error with CoolProp (#4455) 2024-03-25 23:35:08 +01:00
Hood Chatham c9809eea86
Don't throw when calling str on a proxy without a toString method (#4574)
Resolves #4569. It still doesn't make sure `str(jsproxy)` never throws. It will throw if:
1. accessing `obj.toString` succeeds and returns a function, but calling the function throws
2. accessing `obj.toString` fails or returns not a function, and `Object.prototype.toString.call` fails.
2024-03-25 13:15:25 +01:00
pyodide-pr-bot 9d5870478c
Upgrade awkward-cpp to 31 (#4633)
Co-authored-by: pyodide-pr-bot (workflow) <username@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-23 19:08:46 +09:00
Gyeongjae Choi 7e3ccf6234
Remove unused base-64 dependency and base64 Node compat (#4631) 2024-03-23 19:08:18 +09:00
Philipp Schiele 61c0180ff6
Add packages cvxpy, clarabel (#4587)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-22 13:00:50 +09:00
Christian Clauss 654204775b
Keep GitHub Actions up to date with GitHub's Dependabot (#4622)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-21 23:26:55 +09:00
Hood Chatham 163a46e3ca
More specific feature detection (#4617)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2024-03-16 15:56:14 +09:00
Sam Estep 36a1f750bf
Add docs for usage with Vite (#4591)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-16 15:43:37 +09:00
Gyeongjae Choi 6edf6b2535
CI Bump chrome version in the docker image to 122 (#4616) 2024-03-15 19:45:20 +09:00
Hood Chatham ece8e95916 Back to development version 2024-03-14 08:53:16 +01:00
Hood Chatham 404305c232 v0.26.0a4 2024-03-14 08:52:21 +01:00
Hood Chatham 4444d1a6a4
Always build tblib (#4607)
This automatically makes sure everyone gets good tracebacks with run_in_pyodide which
should make things easier for occasional contributors.
2024-03-14 08:44:39 +01:00
Gyeongjae Choi d65980c70c
Rename lazy-loader to lazy_loader (#4610)
`lazy_loader` seems to be the correct project name.
2024-03-14 08:44:13 +01:00
Hood Chatham ef66f1eeed
Fix fatal error when except blocks are interleaved by stack switching (#4615)
Before we moved the exception state into the saved ExceptionState as part of
saving the Python state but we didn't clear the exception state. This logic
was copied from greenlet; I can't find where they clear the exception state
either. However, in our case it is definitely wrong. If we stack switch inside
an except block and then enter and stack switch inside a second except block,
after exiting from everything we end up witht the exception state set instead of
cleared (as if we were still in an except block) and worse the exception state
is set to an already freed exception. I'm not actually sure why the bug
manifests in this particular way, but this change fixes it.
2024-03-14 08:42:18 +01:00
John Wason 75111de0c1
Update RobotRaconteur package to 1.1.0 (#4613) 2024-03-14 07:27:17 +01:00
Gyeongjae Choi de27f18c91
Update chrome url in the dockerfile (#4592) 2024-03-12 19:28:33 +09:00
guangwu cdd1a559a5
fix: typo (#4609) 2024-03-12 10:42:21 +01:00
Hood Chatham 6c8888c070
Scipy 1.12.0 (#4499) 2024-03-08 14:10:14 -05:00
Gyeongjae Choi b36c9a6084
Make `asyncio.sleep(0)` run faster (take 2) (#4590) 2024-03-07 21:09:12 +09:00
pyodide-pr-bot 561f72412e
Upgrade awkward-cpp to 30 (#4589)
Co-authored-by: pyodide-pr-bot (workflow) <username@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-07 19:05:29 +09:00
James J Balamuta 5f5ff6fd49
Add {quarto-pyodide} to list of related projects (#4588) 2024-03-07 19:03:16 +09:00
Myles Scolnick 01dc0d63e8
add marimo to related-projects.md (#4586) 2024-03-02 22:29:55 +09:00
Joel Ostblom 395a18e370
Note that `make` is needed to test packages (#4581) 2024-03-01 15:11:49 -08:00
Gyeongjae Choi f2411848f7
Revert "Make `asyncio.sleep(0)` run faster (#4568)" (#4583) 2024-03-01 12:22:03 +09:00
Joel Ostblom 2731e22844
Add the altair package (#4580)
This adds the altair packages and closes #4579. I wasn't sure what tests would be appropriate, it seems like some package like mpl, pandas, etc tests very specific things whereas others such as shapely, bokeh, statsmodels, etc keep it more minimal. I started minimal for now but happy to add more if there are issues.
2024-02-29 13:23:02 -08:00
Bart Broere 7dd7030724
Bump protobuf version to 4.24.4 (#4553) 2024-02-28 14:22:14 -08:00
Hood Chatham c91684a7e7 Back to development version 2024-02-28 14:11:36 -08:00
Hood Chatham a6dc3e1140 Version 0.26.0a3 take 2 2024-02-28 14:10:23 -08:00
Hood Chatham 31fbdd510e Debug check-release-version CI job 2024-02-28 14:05:50 -08:00
Hood Chatham 6a1b0b09b6 Add CI job to check that release version matches repo file contents 2024-02-28 14:03:57 -08:00
Hood Chatham e6e4750bff Revert "v0.26.0a4"
This reverts commit cb2a4d3cad.
2024-02-28 13:52:31 -08:00
Hood Chatham cb2a4d3cad v0.26.0a4 2024-02-28 13:48:33 -08:00
Hood Chatham 3549bc7bc8 Fix deploy-release job 2024-02-28 13:48:00 -08:00
Hood Chatham 6e162830c0 Revert "v0.26.0a3"
This reverts commit 9ffb47fc44.
2024-02-28 10:46:13 -08:00
Hood Chatham 9ffb47fc44 v0.26.0a3 2024-02-28 09:57:34 -08:00
Hood Chatham da771f2e52
FIX don't let promising call's exception be stolen by interleaved calls (#4564)
Consider the code:
```js
pyodide.runPython(`
    def a():
        raise Exception("hi")
    def b():
        return 7;
`);
const a = pyodide.globals.get("a");
const b = pyodide.globals.get("b");
const p = a.callSyncifying();
assert(b() === 7);
await p;
```

This used to misbehave because because a()'s error status got stolen by b().
This happened because the promising function is a separate task from the js code
in callPyObjectSuspending, so the sequence of events goes:

- enter main task,
    - enter callPyObjectSuspending(a)
        - enter promisingApply(a)
        - sets error flag and returns NULL
    - queue continue callPyObjectSuspending(a) in event loop
        now looks like [main task, continue callPyObjectSuspending(a)]

    - enter b()
        - enter Python
        - returns 7 with error state still set
    - rejects with "SystemError: <function b at 0x1140f20> returned a result with an exception set"
- queue continue main() in event loop
- continue callPyObjectSuspending(a)
    - pythonexc2js called attempting to read error flag set by promisingApply(a), fails with
        PythonError: TypeError: Pyodide internal error: no exception type or value

The solution: at the end of `_pyproxy_apply_promising` we move the error
flag into errStatus argument. In callPyObjectSuspending when we're ready we
move the error back from the errorStatus variable into the error flag before
calling `pythonexc2js()`
2024-02-28 09:55:25 -08:00
Hood Chatham 49c9e7a97c
MAINT Update error handling code to use new Python 3.12 APIs (#4567)
The only behavior change here should be that we are setting `sys.last_exc`
(added in Python3.12). Since we haven't released with Python 3.12 yet, this
doesn't need a changelog.

Python 3.12 added a bunch of modern APIs that handle a single exception object
rather than the (type, val, tb) triples. They also repaired various quirks of
the old error handling APIs. They are much easier to work with. Also, now that
we have `capture_stderr` and `restore_stderr` we can use `PyErr_Print()` to
format the traceback. This allows us to cut out a fair amount of code in
error_handling.c.

This now uses `sys.excepthook` to format exceptions. We set `sys.excepthook` to
`traceback.print_exception` because the default excepthook does not respect the
linecache which we use to implement `pyodide.runPython("...", {file:
"some_file.py"});`
2024-02-28 07:54:28 -08:00
Gyeongjae Choi 5c55d93fc1
Make `asyncio.sleep(0)` run faster (#4568) 2024-02-28 23:14:26 +09:00