rusackas opened a new pull request, #44767: URL: https://github.com/apache/superset/pull/44767
### SUMMARY The `next` Python-version leg in `Python-Unit` ran on every push to `master`/release branches, exercising Python 3.12. This moves it to a dedicated nightly workflow (`Python-Nightly-Canary`) instead, so cross-version breakage is still caught without paying for a second full Python version on every merge. Also bumps `next`'s resolved version from 3.12 to 3.13. The 10 code-scanning alerts still open against the base image's Python interpreter (Grype-flagged CVEs on the bundled CPython) all have fix versions on 3.13+/3.14+ only, never backported to the 3.11 branch we currently ship. This canary is the first real step toward eventually moving the Dockerfile's `PY_VER` off 3.11 -- its job is to surface 3.13 incompatibilities ahead of that, not to do the bump itself. I ran the full unit-test suite locally against a real (non-alpha) Python 3.13.15 to see what the canary would actually catch before merging (GitHub only allows `workflow_dispatch` on a workflow already present on the default branch, so a real dry-run of the workflow itself has to wait for merge). It found two genuine, if narrow, 3.13 issues, both fixed in this PR: 1. **`gevent` import crash.** `zope-interface` (pulled in transitively by `gevent`, no direct version pin anywhere) resolved to `5.4.0`, whose metaclass treats every class attribute as an interface member -- including `__firstlineno__`, the implicit attribute Python 3.13 adds to every class (PEP 626 byte-code line tracking). That raises `zope.interface.exceptions.InvalidInterface` on import under 3.13, breaking anything that imports `gevent`, including the gunicorn+gevent worker class. Floored to `zope.interface>=7.2` in `requirements/development.in` and regenerated the lock via `scripts/uv-pip-compile.sh`. `requirements/base.txt` is untouched -- `gevent` only ever comes in through `development.in`'s `gevent` extra. 2. **A byte-budget test flake, cross-version.** `test_tool_inventory_size[update_dashboard]` failed on 3.13 only. Python 3.13's compiler now strips a docstring's common leading whitespace at compile time (`__doc__` comes out pre-dedented); 3.11/3.12 store it raw. `_truncate_description`'s fixed 300-character cutoff landed at a different point in `update_dashboard`'s multi-line docstring depending on which Python compiled it, since the raw (3.11/3.12) form pads every wrapped line with the original indentation, so fewer real characters fit before the cutoff. Calling `inspect.cleandoc()` before truncating makes the cut point identical on every Python version -- verified 3.11 and 3.13 now both produce the exact same 4129-byte serialized schema for this tool. Bumped its budget from 4100 to 4200 to match. Everything else that failed locally (11 tests, mostly `date_parser`/`jinja_context` time-boundary tests) was a pre-existing artifact of my dev machine's timezone (America/Los_Angeles, not UTC like the CI runners), confirmed unrelated to 3.13 by re-running the same tests under `TZ=UTC` on both 3.11 and 3.13 -- all pass. With both fixes applied: **18,451 passed, 38 skipped, 2 xfailed, 0 failed** on Python 3.13.15, under `TZ=UTC`. Same suite passes identically on 3.11. Note: `next`'s resolution is shared by `Python-Integration`'s own still-push-triggered `next` leg too, so that leg also starts targeting 3.13 as a side effect (no new runner cost, just a version change) -- it isn't otherwise touched by this PR, since the integration suite's 3.13 story hasn't been checked yet. ### TESTING INSTRUCTIONS - `action-validator` and `zizmor` pass on all changed/added workflow files. - Full `tests/unit_tests` + `tests/common` suite (18,451 tests) run locally against real Python 3.13.15 and 3.11.16: 0 failures on either, under `TZ=UTC`. - `Python-Nightly-Canary` itself will get its first real run once this merges (`workflow_dispatch` requires the workflow to already be on the default branch) -- can also be triggered manually afterward via Actions. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
