Skip to content

Conversation

@gpauloski
Copy link
Collaborator

Description

pytest-asyncio v0.22.0 deprecates overriding the event_loop fixture, and replacing the event_loop fixture with the asyncio_event_loop mark breaks our session scoped asyncio fixtures (e.g., the relay_server fixture which will now raise ScopeMismatch: You tried to access the function scoped fixture event_loop with a module scoped request object, involved factories).

This commit doesn't fix this problem, but at least defers the problems for some time while I figure out how to correctly instrument our shared asyncio fixtures.

Related:
pytest-dev/pytest-asyncio#657
pytest-dev/pytest-asyncio#658

Fixes N/A

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

N/A

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., black, mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

pytest-asyncio v0.22.0 deprecates overriding the event_loop fixture,
and replacing the event_loop fixture with the asyncio_event_loop mark
breaks our session scoped asyncio fixtures (e.g., the relay_server
fixture).

This commit doesn't fix this problem, but at least defers the problems
for some time while I figure out how to correctly instrument our shared
asyncio fixtures.

Related:
pytest-dev/pytest-asyncio#657
pytest-dev/pytest-asyncio#658
@gpauloski gpauloski added internal Refactoring, style changes, testing, or code optimizations package Dependencies, version changes, or package metadata labels Oct 31, 2023
@gpauloski gpauloski merged commit a5c9d5f into main Oct 31, 2023
@gpauloski gpauloski deleted the pytest-asyncio-v0.22.0-failures branch October 31, 2023 16:16
@gpauloski gpauloski mentioned this pull request Dec 8, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Refactoring, style changes, testing, or code optimizations package Dependencies, version changes, or package metadata

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants