What's New in PyScript 2023.11.2
Published November 29, 2023
With the 2023.11.1 release of PyScript behind us, i.e. the "break the world" release, the PyScript team is looking to push out releases more frequently. We're hoping to integrate both quality-of-life and significant feature improvements at a faster pace, and to push out releases to match.
It's worth remembering at this point that PyScript uses the CalVer versioning system, where the parts of the version are YEAR.MONTH.RELEASE-NUMBER. That is, there is no minor version component of the release number, and all releases should be treated as potentially breaking. Given the speed at which PyScript is moving (and heck, the whole thing just got re-written from scratch), the versioning system accurately reflects that fact that things are going to break and change all the time.
That siad, there aren't too many terribly breaking things in this release - a better Error message when
input() is used on the main thread is a UI nice touch. No, the biggest change is what's happening to
PyScript has had, up to this point, several valid URLs that it can be fetched from. In order from oldest to most-bleeding-edge, they are
https://pyscript.net/alpha/pyscript.js: The original release link promoted at the PyCon 2022 Keynote
https://pyscript.net/releases/20XX.X.X/pyscript.js: Pinned versions of each of the releases of PyScript. See below for a complete list of pinned releases.
https://pyscript.net/latest/core.jsThe most recent full release
https://pyscript.net/unstable/core.jsBleeding-edge builds; rebuilt on every merge to the
The challenge is that highlighted item, the
/latest version. It's very tempting to use - "hey, I want the most recent version, and here's an easy way to get it!" In press releases and official documentation, this was even the way pyscript recommended grabbing PyScript from a CDN. It's quick, it's easy, it's concise. So what's the problem?
It's an invitation to your code being broken.
/latest, just like leaving any dependency of a thing unpinned, is an active invitation to the developers of that thing to break your code. They can change, update, roll back as they please, and you would welcome that. I, Jeff Glass, have personally done it to you! I've made changes to the PyScript codebase before that have definitely broken the sites that link to
/latest when the next release rollled you. You're welcome! That's what you wanted after all, right?
That's usually not the approach you'd take with your code. Which is why
/latest is being deprecated, and will be removed from the release process in releases
2023.12.x and later.
Please feel free to come tell us all the reasons why
/latest is easier, more convenient, less frustrating, etc. But in the long term, we think allowing (and promoting) unpinned versions was the wrong move, and we're breaking from that now.
List of Pinned Releases
For posterity's sake, the complete list of pinned releases (as of today, November 29 2023) is:
.../2023.11.1/core.js(note the change in file name)