Skip to content

Commit 99d9e3f

Browse files
authored
Merge pull request #184 from pyscript/2025-7-1
Bump docs to version 2025-7-1
2 parents 3021be5 + f2c5929 commit 99d9e3f

File tree

7 files changed

+58
-16
lines changed

7 files changed

+58
-16
lines changed

docs/beginning-pyscript.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ module in the document's `<head>` tag:
117117
<meta charset="utf-8" />
118118
<meta name="viewport" content="width=device-width,initial-scale=1" />
119119
<title>🦜 Polyglot - Piratical PyScript</title>
120-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.5.1/core.css">
121-
<script type="module" src="https://pyscript.net/releases/2025.5.1/core.js"></script>
120+
<link rel="stylesheet" href="https://pyscript.net/releases/2025.7.1/core.css">
121+
<script type="module" src="https://pyscript.net/releases/2025.7.1/core.js"></script>
122122
</head>
123123
<body>
124124

@@ -168,8 +168,8 @@ In the end, our HTML should look like this:
168168
<meta charset="utf-8" />
169169
<meta name="viewport" content="width=device-width,initial-scale=1" />
170170
<title>🦜 Polyglot - Piratical PyScript</title>
171-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.5.1/core.css">
172-
<script type="module" src="https://pyscript.net/releases/2025.5.1/core.js"></script>
171+
<link rel="stylesheet" href="https://pyscript.net/releases/2025.7.1/core.css">
172+
<script type="module" src="https://pyscript.net/releases/2025.7.1/core.js"></script>
173173
</head>
174174
<body>
175175
<h1>Polyglot 🦜 💬 🇬🇧 ➡️ 🏴‍☠️</h1>

docs/user-guide/configuration.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,22 @@ following valid forms:
318318
* An arbitrary URL to a Python package: `"https://.../package.whl"`
319319
* A file copied onto the browser based file system: `"emfs://.../package.whl"`
320320

321+
#### Package Cache
322+
323+
For performance reasons, PyScript caches packages so that a delay resulting
324+
from downloading the packages is only noticable on first load - after which,
325+
PyScript will fall back on packages previously downloaded and held in the
326+
browser's local cache.
327+
328+
The behaviour of caching can be configured via the `packages_cache` setting. If
329+
this setting is not used, PyScript will cache packages. Otherwise, override
330+
PyScript's behaviour by setting `packages_cache` to one of these two values:
331+
332+
* `never` - PyScript will not cache packages.
333+
* `passthrough` - this only works with Pyodide (see [this wiki](https://deepwiki.com/cloudflare/pyodide/3-package-system)),
334+
and will cause Pyodide to download packages in a parallel manner rather than
335+
the default linear fashion. However, these packages will not be cached.
336+
321337
### Plugins
322338

323339
The `plugins` option allows user to either augment, or exclude, the list of
@@ -518,6 +534,32 @@ experimental_create_proxy = "auto"
518534
[raise an issue](https://github.com/pyscript/pyscript/issues) with a
519535
reproducable example, and we'll investigate.
520536

537+
### experimental_ffi_timeout
538+
539+
When bootstrapping a worker, the worker is told to use a cache for round-trip
540+
operations (for example, `window.my_object.foo.bar.baz` causes a round-trip to
541+
the main thread for each dot `.` in this chain of references). By caching the
542+
dotted references performance can be improved by reducing the number of
543+
round trips PyScript makes.
544+
545+
However, not everything can be cached (those APIs or objects with side-effects
546+
won't work; for example DOM element based APIs etc).
547+
548+
The `experimental_ffi_timeout` setting defines the maximum lifetime of that
549+
cache. If it's less than 0 (the default), there is no cache whatsoever. Zero
550+
means to clean up the cache on the next iteration of the event loop. A positive
551+
number is the maximum number of milliseconds the cache will be kept alive.
552+
553+
In this experimental phase, we suggest trying `0`, `30` or a value that won't
554+
likely bypass the browser rendering of 60fps. Of course, `1000` (i.e. a second)
555+
would be a fun, if greedy, experiment.
556+
557+
### debug
558+
559+
When using Pyodide, if the `debug` setting is set to `true`, then Pyodide will
560+
run in debug mode. See Pyodide's documentation for details of what this
561+
entails.
562+
521563
### Custom
522564

523565
Sometimes plugins or apps need bespoke configuration options.

docs/user-guide/first-steps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ CSS:
2020
<meta charset="UTF-8">
2121
<meta name="viewport" content="width=device-width,initial-scale=1.0">
2222
<!-- PyScript CSS -->
23-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.5.1/core.css">
23+
<link rel="stylesheet" href="https://pyscript.net/releases/2025.7.1/core.css">
2424
<!-- This script tag bootstraps PyScript -->
25-
<script type="module" src="https://pyscript.net/releases/2025.5.1/core.js"></script>
25+
<script type="module" src="https://pyscript.net/releases/2025.7.1/core.js"></script>
2626
</head>
2727
<body>
2828
<!-- your code goes here... -->

docs/user-guide/plugins.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ For example, this will work because all references are contained within the
100100
registered function:
101101

102102
```js
103-
import { hooks } from "https://pyscript.net/releases/2025.5.1/core.js";
103+
import { hooks } from "https://pyscript.net/releases/2025.7.1/core.js";
104104

105105
hooks.worker.onReady.add(() => {
106106
// NOT suggested, just an example!
@@ -114,7 +114,7 @@ hooks.worker.onReady.add(() => {
114114
However, due to the outer reference to the variable `i`, this will fail:
115115

116116
```js
117-
import { hooks } from "https://pyscript.net/releases/2025.5.1/core.js";
117+
import { hooks } from "https://pyscript.net/releases/2025.7.1/core.js";
118118

119119
// NO NO NO NO NO! ☠️
120120
let i = 0;
@@ -147,7 +147,7 @@ the page.
147147

148148
```js title="log.js - a plugin that simply logs to the console."
149149
// import the hooks from PyScript first...
150-
import { hooks } from "https://pyscript.net/releases/2025.5.1/core.js";
150+
import { hooks } from "https://pyscript.net/releases/2025.7.1/core.js";
151151

152152
// The `hooks.main` attribute defines plugins that run on the main thread.
153153
hooks.main.onReady.add((wrap, element) => {
@@ -197,8 +197,8 @@ hooks.worker.onAfterRun.add(() => {
197197
<!-- JS plugins should be available before PyScript bootstraps -->
198198
<script type="module" src="./log.js"></script>
199199
<!-- PyScript -->
200-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.5.1/core.css">
201-
<script type="module" src="https://pyscript.net/releases/2025.5.1/core.js"></script>
200+
<link rel="stylesheet" href="https://pyscript.net/releases/2025.7.1/core.css">
201+
<script type="module" src="https://pyscript.net/releases/2025.7.1/core.js"></script>
202202
</head>
203203
<body>
204204
<script type="mpy">

docs/user-guide/pygame-ce.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ will be placed. Make sure to update the pyscript release to the latest version.
106106
<title>PyScript Pygame-CE Quickstart</title>
107107
<meta charset="UTF-8">
108108
<meta name="viewport" content="width=device-width,initial-scale=1.0">
109-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.5.1/core.css">
110-
<script type="module" src="https://pyscript.net/releases/2025.5.1/core.js"></script>
109+
<link rel="stylesheet" href="https://pyscript.net/releases/2025.7.1/core.css">
110+
<script type="module" src="https://pyscript.net/releases/2025.7.1/core.js"></script>
111111
</head>
112112
<body>
113113
<canvas id="canvas" style="image-rendering: pixelated"></canvas>

docs/user-guide/workers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ Here's how:
282282
<meta charset="utf-8">
283283
<meta name="viewport" content="width=device-width,initial-scale=1">
284284
<!-- PyScript CSS -->
285-
<link rel="stylesheet" href="https://pyscript.net/releases/2025.5.1/core.css">
285+
<link rel="stylesheet" href="https://pyscript.net/releases/2025.7.1/core.css">
286286
<!-- This script tag bootstraps PyScript -->
287-
<script type="module" src="https://pyscript.net/releases/2025.5.1/core.js"></script>
287+
<script type="module" src="https://pyscript.net/releases/2025.7.1/core.js"></script>
288288
<title>PyWorker - mpy bootstrapping pyodide example</title>
289289
<script type="mpy" src="main.py"></script>
290290
</head>

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "2025.5.1"
2+
"version": "2025.7.1"
33
}

0 commit comments

Comments
 (0)