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

Hook refactor squash #262

Merged
merged 52 commits into from Nov 18, 2013
Merged

Hook refactor squash #262

merged 52 commits into from Nov 18, 2013

Conversation

chadwhitacre
Copy link
Contributor

Redo of #261.

chadwhitacre and others added 27 commits October 31, 2013 20:39
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.
@chadwhitacre chadwhitacre mentioned this pull request Nov 1, 2013
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.
@chadwhitacre
Copy link
Contributor Author

Remaining work:

  • Reimplement start/stop hooks using a second flow on the server object.
  • Incorporate aspen.hooks.options200 into the main website.flow.
  • Reimplement by_regex and by_dict hook filters for new flow.
  • Prune aspen.hooks.

Also (maybe before we land to master, maybe after):

  • Refactor request flow to be more steps (more fine-grained, more hook points available)
  • Think through relationship of flow state and request.context.

@chadwhitacre
Copy link
Contributor Author

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
@pjz pjz merged commit f74531d into master Nov 18, 2013
@pjz pjz deleted the hook-refactor-squash branch November 18, 2013 18:52
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants