-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Refactor ClientRequest #11012
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
base: master
Are you sure you want to change the base?
Refactor ClientRequest #11012
Conversation
for more information, see https://pre-commit.ci
@@ -28,8 +29,9 @@ | |||
from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy | |||
from yarl import URL | |||
|
|||
from . import hdrs, helpers, http, multipart, payload | |||
from . import hdrs, multipart, payload |
Check notice
Code scanning / CodeQL
Cyclic import Note
aiohttp.multipart
Copilot Autofix
AI 8 days ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
…into clientrequest-refactor
body: Any = b"" | ||
auth = None | ||
response = None | ||
class ClientResponse(HeadersMixin): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 0 changes to ClientResponse, I've just moved it up so I can reference it in ClientRequest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression the design was to be able to GC ClientRequest but hold on to ClientResponse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't that makes a difference? I've just added a reference to ClientResponse (the class, not an instance) as a class attribute in ClientRequest, so need it defined first.
❌ 217 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
@@ -190,623 +193,352 @@ class ConnectionKey(NamedTuple): | |||
proxy_headers_hash: Optional[int] # hash(CIMultiDict) | |||
|
|||
|
|||
class ClientRequest: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can back-port a limited version of this to keep back-ports more manageable. Right now automatic back-porting fails far too often, and we aren't any closer to releasing 4.x so we are going to have to deal with that for a long time which makes the risk of back-port errors higher.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. Will have to move backportable parts to another PR and merge, then update this one.
CodSpeed Performance ReportMerging #11012 will degrade performances by 9.34%Comparing Summary
Benchmarks breakdown
|
for more information, see https://pre-commit.ci
…into clientrequest-refactor
Sorry about the conflicts |
Goals
TODO
If we're happy with this generally, then I still need to fix up the tests, which will take a substantial amount of work.