Skip to content

python: rename CallSpec2 -> CallSpec#14742

Merged
RonnyPfannschmidt merged 3 commits into
pytest-dev:mainfrom
RonnyPfannschmidt:ronny/rename-callspec2-to-callspec
Jul 23, 2026
Merged

python: rename CallSpec2 -> CallSpec#14742
RonnyPfannschmidt merged 3 commits into
pytest-dev:mainfrom
RonnyPfannschmidt:ronny/rename-callspec2-to-callspec

Conversation

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

Summary

Test plan

  • CI green
  • Confirm no remaining CallSpec2 references outside historical changelog entries

Made with Cursor

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>
Copilot AI review requested due to automatic review settings July 21, 2026 12:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CallSpec2 to CallSpec in src/_pytest/python.py (definition, type annotations, construction sites).
  • Update internal type-checking imports and local annotations in src/_pytest/fixtures.py to use CallSpec.

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.

@The-Compiler

Copy link
Copy Markdown
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>
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jul 21, 2026
Comment thread changelog/14742.deprecation.rst Outdated
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
RonnyPfannschmidt force-pushed the ronny/rename-callspec2-to-callspec branch from 9be2beb to 810f9d5 Compare July 23, 2026 09:36
@RonnyPfannschmidt
RonnyPfannschmidt merged commit 5c0dcff into pytest-dev:main Jul 23, 2026
36 checks passed
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>
@bluetech

Copy link
Copy Markdown
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants