Skip to content

Remove request_ctx Fixture #168

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

Merged
merged 4 commits into from
Oct 23, 2023
Merged

Conversation

threeal
Copy link
Contributor

@threeal threeal commented Oct 3, 2023

This pull request removed the request_ctx fixture since it has been marked deprecated for a long time and currently it is not supported on the Flask v3.0.0.

For a side note, inlining the import won't work since it could still break the test if using Flask v3.0.0.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in docs/CHANGELOG.rst, summarizing the change and linking to the issue.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and make sure no tests failed.

@jonyscathe
Copy link

Is there anything stopping this from being merged now and a release being made?
Would love to move some projects to flask==3, but need this change through first if I don't want to rewrite a whole lot of tests.

@EvanBldy
Copy link

EvanBldy commented Oct 9, 2023

I'm interested in a new release with that too :)

@nicoddemus nicoddemus closed this Oct 9, 2023
@nicoddemus nicoddemus reopened this Oct 9, 2023
@nicoddemus nicoddemus mentioned this pull request Oct 9, 2023
@nicoddemus
Copy link
Member

I'm improving/fixing CI in #169, after that gets merged I think we can merge this one as well.

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

My understanding is that the internal api used there is intentionally made gone

Is there another way we can safely enter the request context?

@RonnyPfannschmidt
Copy link
Member

Nm, I wasn't in the full picture

@nicoddemus nicoddemus merged commit b731fec into pytest-dev:master Oct 23, 2023
@nicoddemus
Copy link
Member

Thanks a lot @threeal and sorry for the delay.

I will prepare a new release shortly.

@nicoddemus
Copy link
Member

1.3.0 has been released. 🎉

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.

Flask v3.0.0 breaks pytest-flask import of _request_ctx_stack
9 participants