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

Middleware + docs update #2972

Closed
10 tasks done
pacrob opened this issue Jun 3, 2023 · 1 comment
Closed
10 tasks done

Middleware + docs update #2972

pacrob opened this issue Jun 3, 2023 · 1 comment
Assignees

Comments

@pacrob
Copy link
Contributor

pacrob commented Jun 3, 2023

What was wrong?

Middleware and related docs need cleanup and organization

How can it be fixed?

Noted so far:

Clean up middleware

  • Remove middlewares marked Delete in web3/manager.py -> RequestManager -> default_middlewares
  • Delete those middlewares from web3/middleware too
  • Create tests for both regular and async default middlewares somewhere in tests/core/manager that verify defaults haven't changed
  • Add a comment, something like "If you're changing the default middlewares, remember to update tests and docs"

Clean up middleware docs
in docs/middlwares.rst:

  • List default middlewares for sync and async providers towards the top
  • List all middleware descriptions together, with the Configuring Middleware above or below them
  • Any deleted middlewares' docs can be removed.
  • HTTPRequestRetry is in the docs but nowhere in the code? Can be removed?

Improve middleware docs

  • Document Validation Middleware, any others that are in web3/middleware but not in docs
  • Code examples with async middlewares
@reedsa
Copy link
Contributor

reedsa commented Jun 8, 2023

HTTPRequestRetry is in reference to the middleware defined here:

def http_retry_request_middleware(

@reedsa reedsa closed this as completed Jul 5, 2023
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

No branches or pull requests

2 participants