-
Notifications
You must be signed in to change notification settings - Fork 134
Etablish claude #613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Etablish claude #613
Conversation
also add uv based tooling to ease things Co-Authored-By: Claude <[email protected]> - add ruff/mypy - allow claude to run some commands directly
- Bump requires-python to >=3.10 in pyproject.toml - Remove Python 3.9 from classifiers, CI matrix, tox envlist - Update PyPy version references (pypy3.9 → pypy3.10) - Modernize type hints: Union → |, Optional → | None - Move Callable imports to collections.abc - Update pyupgrade to --py310-plus 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Replace .format() with f-string in _tracing.py - Use walrus operator for dict.get() pattern in _tracing.py - Convert string concatenation to parenthesized f-strings in _callers.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Create src/pluggy/_compat.py for legacy pkg_resources compatibility - Move DistFacade from _manager.py to _compat.py - Update PluginManager to use stdlib Distribution internally - Add new list_plugin_distributions() method returning unwrapped Distribution objects - Update list_plugin_distinfo() to wrap with DistFacade for backward compatibility - Update test import to use _compat module This separates legacy setuptools API emulation from modern importlib.metadata usage, while maintaining full backward compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add test coverage for the new list_plugin_distributions() method - Verify it returns unwrapped importlib.metadata.Distribution objects - Confirm DistFacade wrapping only in legacy list_plugin_distinfo() - Extend existing test_load_setuptools_instantiation test 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Replace standalone coverage package with pytest-cov for better pytest integration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add test coverage for the error path in HookCaller._remove_plugin() when attempting to remove a plugin that isn't registered with the hook. This improves coverage from 99% to nearly 100%, with only defensive code remaining uncovered (isinstance check that's always true). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Convert the isinstance(res, list) conditional to an assertion since res is guaranteed to always be a list in call_historic: 1. Historic hooks are called with firstresult=False, which always returns a list from _multicall 2. Historic hooks cannot have wrappers/hookwrappers (enforced by validation), so no teardowns can modify the result type This change: - Documents the invariant explicitly - Achieves 100% branch coverage on _hooks.py (was 99%) - Makes the code clearer by removing unreachable defensive code - Will catch future bugs if the invariant is violated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
i jsut upped coverage to 100% locally - seems like codecov is broken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR drops Python 3.9 support, migrates from setuptools' extras to PEP 735 dependency-groups, and prepares for deprecation of setuptools compatibility APIs by introducing a new _compat module and modernizing type hints.
- Drops Python 3.9 support across all configuration files
- Migrates from
project.optional-dependenciesto PEP 735dependency-groups - Introduces
_compatmodule withDistFacadeand newlist_plugin_distributions()API - Modernizes imports by using
collections.abc.Callableand union type syntax
Reviewed Changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Updates Python version constraints and replaces extras=testing with dependency_groups=testing |
| pyproject.toml | Removes Python 3.9 classifier, updates requires-python, migrates to dependency-groups, adds uv configuration |
| .pre-commit-config.yaml | Updates pyupgrade to target Python 3.10+ |
| .github/workflows/main.yml | Removes Python 3.9 test jobs, updates PyPy to 3.10 |
| src/pluggy/_compat.py | New module containing DistFacade compatibility wrapper |
| src/pluggy/_manager.py | Moves DistFacade to _compat, adds list_plugin_distributions(), updates internal storage type |
| src/pluggy/_hooks.py | Replaces typing.Callable, Optional, Union with modern equivalents, adds assertion for historic hooks |
| src/pluggy/_result.py | Modernizes type hints using union syntax |
| src/pluggy/_tracing.py | Modernizes imports and string formatting |
| src/pluggy/_callers.py | Improves string formatting for warning message |
| testing/*.py | Updates test files to use collections.abc.Callable and modern union syntax |
| CLAUDE.md | Adds Claude Code configuration documentation |
| .claude/settings.json | Adds Claude Code permissions configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,5 +1,5 @@ | |||
| [tox] | |||
| envlist=docs,py{39,310,311,312,313,py3},py{39}-pytestmain | |||
| envlist=docs,py{310,311,312,313,py3},py{310}-pytestmain | |||
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'focuesed' to 'focused' in PR title (note: this is metadata, not code).
| envlist=docs,py{310,311,312,313,py3},py{310}-pytestmain | |
| envlist = docs, py310, py311, py312, py313, py3, py310-pytestmain |
|
Hi @RonnyPfannschmidt, do you think you could split this into more focused PRs? Like adding uv, adding claude, requiring Python 3.10, setuptools stuff. |
|
Absolutely |
this time more focuesed an nuanced