python: rename CallSpec2 -> CallSpec#14742
Merged
RonnyPfannschmidt merged 3 commits intoJul 23, 2026
Merged
Conversation
Internal rename only to reduce noise in follow-up work for pytest-dev#13242. Does not expose CallSpec in the public API. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Cursor Grok 4.5 <grok@x.ai>
There was a problem hiding this comment.
Pull request overview
Renames pytest’s internal CallSpec2 dataclass to CallSpec across the collection/parametrize flow, reducing rename noise ahead of the dependent-parametrize work referenced in #13242. This is an internal refactor within _pytest modules and does not introduce behavioral logic changes.
Changes:
- Rename
CallSpec2toCallSpecinsrc/_pytest/python.py(definition, type annotations, construction sites). - Update internal type-checking imports and local annotations in
src/_pytest/fixtures.pyto useCallSpec.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/_pytest/python.py | Renames the internal callspec dataclass and updates all in-module references/annotations. |
| src/_pytest/fixtures.py | Updates TYPE_CHECKING import and local annotation to the new internal name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
FWIW some stuff from GitHub Code search: |
Plugins still import CallSpec2; provide a transitional module-level alias that emits PytestRemovedIn10Warning. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Cursor Grok 4.5 <grok@x.ai>
nicoddemus
requested changes
Jul 23, 2026
State consistently that the CallSpec2 alias remains until pytest 10. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Cursor Grok 4.5 <grok@x.ai>
RonnyPfannschmidt
force-pushed
the
ronny/rename-callspec2-to-callspec
branch
from
July 23, 2026 09:36
9be2beb to
810f9d5
Compare
nicoddemus
approved these changes
Jul 23, 2026
RonnyPfannschmidt
enabled auto-merge
July 23, 2026 09:45
nicoddemus
added a commit
to nicoddemus/pytest
that referenced
this pull request
Jul 23, 2026
Upstream renamed CallSpec2 to CallSpec (pytest-dev#14742). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
|
I'm not sure it's worth breaking e.g. anyio pytest plugin for a slightly cleaner name. |
nicoddemus
added a commit
to nicoddemus/pytest
that referenced
this pull request
Jul 24, 2026
Upstream renamed CallSpec2 to CallSpec (pytest-dev#14742). Co-Authored-By: Claude Sonnet 5 <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.
Summary
CallSpec2toCallSpec(no public API exposure, no behavior change).Test plan
CallSpec2references outside historical changelog entriesMade with Cursor