Repository navigation
Deprecate environmental plugin managers - #540
Merged
Merged
Conversation
corranwebster
approved these changes
Mar 17, 2023
corranwebster
left a comment
Contributor
There was a problem hiding this comment.
Looks good, modulo the discussion in #532.
Member
Author
|
I'm going to update the warning messages to remove the mentions of the |
mdickinson
added a commit
that referenced
this pull request
Feb 24, 2026
…#599) ## Summary Remove the deprecated `EggPluginManager`, `EggBasketPluginManager` and `PackagePluginManager` classes for the Envisage 8.0 release. These were deprecated in #540 (Envisage 7.0). Closes #548 ## Changes ### Deleted files - `envisage/egg_plugin_manager.py`, `envisage/egg_basket_plugin_manager.py`, `envisage/package_plugin_manager.py` — the three deprecated plugin manager classes - `envisage/egg_utils.py` — utility module used only by the egg plugin managers - `envisage/tests/test_egg_plugin_manager.py`, `envisage/tests/test_egg_basket_plugin_manager.py`, `envisage/tests/test_package_plugin_manager.py` — associated tests - `envisage/tests/eggs/`, `envisage/tests/bad_eggs/`, `envisage/tests/plugins/` — test data directories ### Edited files - `envisage/api.py` — removed `EggPluginManager` from public API - `envisage/application.py` — updated comment to reference `PluginManager` instead of `EggPluginManager` - `envisage/composite_plugin_manager.py` — updated docstring example to use `PluginManager` - `envisage/tests/support.py` — removed egg/package-related test helpers (`restore_pkg_resources_working_set`, `build_egg`, `PLUGIN_PACKAGES`, `BAD_PLUGIN_PACKAGES`) and the now-unused `subprocess` and `pkg_resources` imports - `pyproject.toml` — removed egg/plugin test data from `[tool.setuptools.package-data]` - `MANIFEST.in` — removed `recursive-include` lines for deleted test data directories - `docs/source/conf.py` — added `|PluginManager|` RST substitution - `docs/source/envisage_core_documentation/plugins.rst` — rewrote to reference `PluginManager` instead of Python Eggs - `docs/source/envisage_core_documentation/message_of_the_day.rst` — removed reference to egg-based plugin discovery - `docs/source/envisage_core_documentation/extension_points.rst` — removed unused Python Eggs link - `CHANGES.rst` — added Version 8.0.0 removal entry ### Notes - The `setuptools` runtime dependency is retained because `pkg_resources.resource_filename` is still used in 3 other files (`test_core_plugin.py`, `test_tasks_application.py`, `_etsdemo_info.py`). Migrating those to `importlib.resources` is a separate task. - The `envisage.plugins` entry point in `pyproject.toml` is retained as it may be useful for third-party plugin discovery mechanisms. *This PR was created with the assistance of an AI coding agent.*
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.
This PR deprecates the following three plugin managers:
Each of these uses a rather ad-hoc method to find and load plugins. There are other maintainability issues, too, for example with building eggs, or with the managers modifying global state that doesn't belong to them (like
sys.path, for example).The recommended way to retrieve plugins from an environment going forward is to install plugin-carrying packages into site-packages and have those packages advertise their plugins through entry points (which are now an official part of core Python, not just setuptools). Other application-specific ad-hoc mechanisms should be implemented by the application itself rather than by this library.
The current warning messages are based on the assumption that #532 will go in; if not, we'll need to drop references to the
EntryPointPluginManager.Related discussion: #521
See also #532
Closes #541