Skip to content

Commit 8af9910

Browse files
authored
Modernize webassets (#553)
* Switch to uv * tox updated to use tox-uv * Bulk update the tests to drop the nosetest format * Mark webassets as typed * Fix the deprecation warning for `find_executable` * Fix the deprecation warning for invalid escapes * Fix test gaps - autoprefixer needs a different attribute; webkit supports animation - handle babel's weird-ass preset error messages * Add pytest xdist for looponfail * CI setup for supported Pythons * Fix tox config and hatch package * Switch to locally installed node packages * Explicitly install node during tests * Bump to v3.0.0a1 * Fix two escape deprecations in the webassets source * Pull tox out of pyproject.toml and leave it in CI * Don't even try import the yuicompressor package
1 parent 17d540e commit 8af9910

31 files changed

+5175
-593
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: CI
3+
4+
on:
5+
merge_group:
6+
push:
7+
branches: [master, main, ci-*]
8+
tags: ["*"]
9+
pull_request:
10+
workflow_dispatch:
11+
12+
env:
13+
FORCE_COLOR: "1"
14+
PIP_DISABLE_PIP_VERSION_CHECK: "1"
15+
PIP_NO_PYTHON_VERSION_WARNING: "1"
16+
17+
permissions: {}
18+
19+
jobs:
20+
tests:
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
python-version:
25+
- "3.10"
26+
- "3.11"
27+
- "3.12"
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-node@v4
32+
with:
33+
cache: 'npm'
34+
cache-dependency-path: package-lock.json
35+
- uses: hynek/setup-cached-uv@v2
36+
- run: |
37+
npm install
38+
echo "$(pwd)/node_modules/.bin" >> "$GITHUB_PATH"
39+
40+
- name: Prepare tox
41+
run: |
42+
V=${{ matrix.python-version }}
43+
echo TOX_PYTHON=py"$(echo $V | tr -d.)" >>"$GITHUB_ENV"
44+
45+
- run: >
46+
uvx --with=tox-uv
47+
tox run
48+
-e ${{ env.TOX_PYTHON }}

CHANGES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
3.0 (2024-09)
2+
3+
Bumped to 3.0 because holy *shit* did this drop a bunch of versions and make changes!
4+
5+
- drop every Python version earlier than 3.11
6+
- remove the now-obsolete "yui" compressor, since it's dead-dead-omgmalware-dead
7+
- update tests so they validate that they work with babel 7, not 6
8+
19
2.0 (2019-12-20)
210
Jump to 2.0 to leave alpha versioning and start doing semver. No actual breaking changes.
311

0 commit comments

Comments
 (0)