Repository navigation
Drop support for Python 3.8 and 3.9 - #622
Merged
Merged
Conversation
Envisage now requires Python 3.10 or later. - `requires-python` is bumped to `>= 3.10`, and the conditional `importlib-resources` dependency is dropped: `importlib.resources` provides `files` and `as_file` from 3.9 onwards, so the five `try`/`except ImportError` import blocks become plain imports. - `HTTPResourceProtocol.file` closes the caught `HTTPError` unconditionally again; the `exc.fp is not None` guard added in #618 was only needed for 3.8 and 3.9. - The EDM runtime lists in etstool.py and the two EDM workflows lose 3.8, leaving 3.11. The `linux_runtime_platform` mapping goes with it: it existed only to select `rh7_x86_64` for the 3.8 runtime, and 3.11 uses EDM's default `rh8_x86_64`. The macOS/3.8 matrix exclusions go too. - The test-with-pypi matrix drops 3.8, leaving 3.10 through 3.14. Closes #616 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
uv.lock is a generated local development artifact and has never been tracked in this repository. It was picked up unintentionally when the previous commit was staged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Envisage to require Python 3.10+ (dropping 3.8 and 3.9), simplifying resource imports now that importlib.resources is always available, and aligning CI/EDM tooling with the supported runtimes.
Changes:
- Bump
requires-pythonto>= 3.10and remove the conditionalimportlib-resourcesdependency. - Replace
try/except ImportErrorfallbacks with directimportlib.resourcesimports across code and tests; simplifyHTTPResourceProtocol.filecleanup logic for 3.10+. - Update EDM tooling and GitHub Actions matrices to remove Python 3.8/3.9 coverage and adjust related workflow logic/docs.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.rst | Updates documented supported Python version to 3.10+. |
| pyproject.toml | Sets requires-python >= 3.10 and drops importlib-resources dependency. |
| etstool.py | Removes 3.8 runtime/platform handling; defaults EDM runtime to 3.11. |
| envisage/ui/tasks/tests/test_tasks_application.py | Simplifies importlib.resources import usage. |
| envisage/tests/test_core_plugin.py | Simplifies importlib.resources imports for tests. |
| envisage/resource/tests/test_resource_manager.py | Simplifies importlib.resources imports for tests. |
| envisage/resource/package_resource_protocol.py | Removes backport fallback; uses importlib.resources directly. |
| envisage/resource/http_resource_protocol.py | Unconditionally closes HTTPError (safe for 3.10+). |
| envisage/examples/_etsdemo_info.py | Removes backport fallback; uses importlib.resources directly. |
| CHANGES.rst | Records Python support drop and dependency removal in release notes. |
| .github/workflows/test-with-pypi.yml | Drops 3.8 from PyPI test matrix. |
| .github/workflows/test-with-edm.yml | Drops 3.8 runtime from EDM test matrix and related exclusions. |
| .github/workflows/ets-from-source.yml | Drops 3.8 runtime from ETS-from-source EDM matrix and related exclusions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mdickinson
added a commit
that referenced
this pull request
Aug 5, 2026
A review of the 8.0.0 changelog against `7.0.4..main`. 7.0.4 was tagged directly on main — `0c02d0b` is both the tag commit and the merge-base — so that range is exact. It holds 30 non-merge commits: 11 touching the library or packaging, 19 CI and infrastructure. ## The library side was already complete All eight substantive changes had entries, and both deprecations 7.0.0 promised to remove in 8.0 (#540, #544) are removed and listed. No `DeprecationWarning` remains anywhere in the library, so nothing is left dangling for 9.0. ## References now point at PRs, not issues The two `Fixes` entries for the `HTTPError` leak cited #615, whose title is "Clean up test noise from warnings and WARNING-level log messages". The leak was found *via* that cleanup, but a reader following the reference lands on a test-hygiene issue rather than a resource-leak fix. Rather than fix those two in isolation, every reference in the section now points at the PR that made the change: #574→#613, #616→#622, #548→#599, #547→#612, #614→#617, and #615→#618/#619/#621 as appropriate. This also supplies the reference the `pkg_resources` entry was missing — #600, the PR, rather than #515, the issue. Two notes: - The "no longer writes `WARNING`-level log messages" entry cites **both** #618 and #621. #618 deliberately deferred the four `envisage.ui.tasks.tasks` records from the `TasksApplication` tests to a follow-up, so the claim only became true once #621 landed. - Sections for 7.0.4 and earlier are untouched; they already cite PRs. ## CI and build work added Nineteen PRs had no entry at all, in contrast with 7.0.4, which listed its action bumps and copyright-header updates under `Build`. Five new entries cover them, aggregated where the work was one theme: | Entry | PRs | | --- | --- | | Trusted publishing (OIDC) and SHA-pinned actions | #604, #608 | | Copyright end years, and the year-rollover fix to the style check | #596, #597, #607 | | GitHub Action bumps | #591, #592, #593, #594, #595, #602, #603, #605, #606, #609, #610 | | Pre-release Pythons in the CI matrix | #601, #624 | | `AGENTS.md` | #598, #626 | Trusted publishing changes how releases are authenticated, so it seemed worth naming rather than folding into the general CI churn. ## Judgment calls worth a second opinion **The CI matrix entry names no versions.** It reads "now includes pre-release Python versions" rather than "3.14, and 3.15 pre-releases". Naming them is more informative, but in a section whose `Removals` entry deliberately gives no upper bound on supported Pythons, a `Build` line ending in "3.15" invites exactly the reading that bound was left out to avoid. Easy to change if you'd rather have the numbers. **No upper bound on Python versions.** Considered and rejected: it means churn on every Python release, and forwards compatibility is the reasonable default expectation for a package that runs warning-free on the current version. **Deliberate omissions.** #626's other cleanups — an `IServiceRegistry` docstring, the legacy examples README, dead Traits<6.0 test code — change nothing for users. There's no `Documentation` section because the doc edits in #599 are just the egg-manager material going away with the classes, already covered by the `Removals` entry. And `CorePlugin` gaining its own `stop()` to unregister service offers is an implementation move; the #617 entry already notes that `PluginActivator` no longer calls `register_services`/`unregister_services`, which is the part a downstream `Plugin` subclass would notice. ## Left to the release PR The `Released:` date line, an introductory paragraph, a "Thanks to:" list, and the `version = '7.0.4'` still in `pyproject.toml`. The date isn't settled yet. ## Verification `CHANGES.rst` parses under docutils with no warnings at report level 2 or above, and all lines stay within 79 characters. Changelog only — no code touched. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #616.
Envisage now requires Python 3.10 or later.
Changes
requires-pythonis bumped to>= 3.10, and the conditionalimportlib-resourcesdependency is dropped.importlib.resourceshasprovided
filesandas_filesince 3.9, so the fivetry/except ImportErrorimport blocks become plain imports.HTTPResourceProtocol.filecloses the caughtHTTPErrorunconditionally again. The
exc.fp is not Noneguard added in Clean up warnings and log noise from the test suite #618 wasneeded only because
close()raisedKeyError: 'file'on 3.8 and 3.9when the error had no
fp; on 3.10+self.fpbecomes anio.BytesIOand
close()works.etstool.pyand the two EDM workflows lose3.8, leaving 3.11. The
linux_runtime_platformmapping and the--platformflag it fed go with it: they existed only to selectrh7_x86_64for the 3.8 runtime, and 3.11 uses EDM's defaultrh8_x86_64. Themacos-latest/ 3.8 matrix exclusions go too.test-with-pypimatrix drops 3.8, leaving 3.10 through 3.14.EDM + Python 3.8 is removed.
The existing
pkg_resourcesentry inCHANGES.rstdescribedimportlib-resourcesas a backport for Python 3.8, which is no longertrue, so that parenthetical is edited out rather than left to contradict
the new entry.
Verification
pytest: 171 passed, 7 skipped (no toolkit installed) on both 3.15 anda clean 3.10 environment.
python -W default -m unittest discover -t . -s envisage: 178 tests OK,no new warnings.
test_resource_managerunder-W erroron 3.10, to confirm theunguarded
exc.close()is safe there.black --check,isort --check,flake8clean.python -m buildplustwine check --strictpass; the wheel metadatareports
Requires-Python: >=3.10and noimportlib-resourcesinRequires-Dist.One point for review
The EDM matrices are now single-runtime, since 3.8 was the only other
entry.
available_runtimes,supported_combinationsand the--runtimeoption are all still in place, so adding a runtime is a one-line change.
If EDM offers something newer than 3.11 it would be worth adding here,
rather than leaving the EDM jobs covering a single version.
🤖 Generated with Claude Code