Skip to content

Conversation

@millerdev
Copy link
Collaborator

Fixes #3

🐡 Review by commit.

@millerdev millerdev requested review from Copilot and gherceg July 11, 2025 15:22
Copy link

Copilot AI left a 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 updates the codebase to be compatible with pytest 8.4 by replacing deprecated internal APIs with standard library equivalents. The main changes involve switching from pytest's internal _api.is_generator function to Python's built-in inspect.isgeneratorfunction and updating fixture wrapping mechanisms.

  • Replace deprecated _api.is_generator with inspect.isgeneratorfunction
  • Update fixture wrapping by using __signature__ = None instead of deleting __wrapped__
  • Remove imports of deprecated pytest internal APIs (is_generator, _PytestWrapper)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/test_fixtures.py Updates test to use isgeneratorfunction and removes _api import
src/unmagic/fixtures.py Replaces _api.is_generator calls and updates fixture wrapping mechanism
src/unmagic/autouse.py Adds isgeneratorfunction import and replaces _api.is_generator usage
src/unmagic/_api.py Removes imports of deprecated pytest internal APIs

@millerdev millerdev marked this pull request as ready for review July 11, 2025 15:26
@millerdev millerdev merged commit a0863a3 into main Jul 14, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does not support pytest >= 8.5.0

3 participants