Skip to content
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

Add support for gevent to TimeLimit middleware #408

Closed

Conversation

FinnLidbetter
Copy link
Contributor

Fixes Issue #403

  • Adds function to check if gevent monkey patching is in use
  • Adds gevent to list of extra dependencies
  • Makes Time Limit middleware use gevent Timeout objects if gevent is
    being used
  • Adds testing for the time limit middleware (for gevent and non-gevent)
  • Adds testing script for running pytest with gevent monkey-patching
  • Adds gevent pytest command to tox with --cov-append.
  • Identifies existing tests that fail with gevent (shutdown notification
    middleware). I suggest that fixing this other issue should be out of
    scope for this PR.

Note that this doubles the length of time that it takes tests to run
since tests are run once with gevent and once without. This approach to
testing of running everything twice should be considered carefully
before accepting.
I am open to revising this to only running certain marked tests with gevent,
but running the whole test suite with gevent does not seem inappropriate
to me and it is certainly safer for catching regressions and identifying future
incompatibilities.

Fixes Issue Bogdanp#403

- Adds function to check for gevent
- Adds gevent to list of extra dependencies
- Makes Time Limit middleware use gevent Timeout objects if gevent is
  being used
- Adds testing for the time limit middleware (for gevent and non-gevent)
- Adds testing script for running pytest with gevent monkey-patching
- Adds gevent pytest command to tox with --cov-append.
- Identifies existing tests that fail with gevent (shutdown notification
  middleware). I suggest that fixing this other issue should be out of
  scope for this PR.

Note that this DOUBLES the length of time that it takes tests to run
since tests are run once with gevent and once without. This approach to
testing of running *everything* twice should be considered carefully
before accepting.
@Bogdanp
Copy link
Owner

Bogdanp commented Sep 19, 2021

Thanks! This has been rebased and merged.

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.

None yet

2 participants