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
Hook refactor squash #262
Merged
Merged
Hook refactor squash #262
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This rips the actual request flow logic out of website.py and moves it to flow/request.py, with a linear flow loop remaining in website. I modified the test client to handle the changes as well and wrote a single test for now. I also checked it TTW.
Move pytest fixture into the aspen library
Why make that backwards incompatible?
Fix test_flow tests Nuke fsfix
Update website_flow test Fix flow tests Fix socket tests by moving the socket fixtures onto harness Fix test_resources
The socket testing machinery had a make_request helper, but I want to use that name for a test helper for test_request.
Fix test_negotiated_resource Rename want_short_circuit to short_circuit
Want to be able to use this from things besides pytest fixtures.
Clean up remaining import errors in test suite
Fix test_dispatcher Fix test_negotiated_resource tests to use harness
Fix test_dispatcher tests Fix some json_resource tests
Fix json_resource test Fix test_dispatcher tests Fix configuration tests
Fix up httpbasic and httpdigest tests
With a module docstring to explain it.
Closed
Push the setting of `exc_info` and `state` down into flow, and require the rest to get populated from the return value of flow functions.
These really want to be logged somehow, but our logging is not awesome.
Remaining work:
Also (maybe before we land to master, maybe after):
|
To be parallel to flows.server, which I'm about to add.
This removes the old hooks for website.start/stop.
Now you can do website.server_flow.insert_before('start', func), etc.
I factored out the flow library into a standalone module. This commit upgrades Aspen to use the standalone version.
Ready for review! :-) |
pjz
added a commit
that referenced
this pull request
Nov 18, 2013
Major internals refactor; switch to using Algorithm and better py.test fixtures
This was referenced Nov 18, 2013
Changaco
pushed a commit
that referenced
this pull request
Mar 11, 2016
Major internals refactor; switch to using Algorithm and better py.test fixtures
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Redo of #261.