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 tracking signals for getting request/response bodies. #2767

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
158cdbe
Add tracking signals for getting request/response bodies.
kowalski Feb 26, 2018
329f89a
Revert automatic pep8 fix.
kowalski Feb 27, 2018
24e1db9
Remove internal usage of Signal in favor of simple callbacks.
kowalski Feb 27, 2018
1be8ecb
Document new signals
kowalski Feb 27, 2018
f19e7c0
Move callback to a private method.
kowalski Feb 27, 2018
45d6332
Make check more idiomatic
kowalski Feb 27, 2018
e1e82e5
Reorder classes in __all__
kowalski Feb 27, 2018
6e3819f
Update request lifecycle diagram to include new signals
kowalski Feb 27, 2018
89dcb0f
Don't use mutable defaults for traces. Make it private in ClientRequest
kowalski Feb 27, 2018
8288c26
Further updates to tracing documentation
kowalski Feb 27, 2018
9265d0b
Merge branch 'master' into feature/add-signals-for-reqres-chunks
asvetlov Feb 27, 2018
202cb86
Polish docs
kowalski Feb 28, 2018
d687b92
Merge branch 'feature/add-signals-for-reqres-chunks' of github.com:ko…
kowalski Feb 28, 2018
d30d50b
Merge branch 'master' into feature/add-signals-for-reqres-chunks
asvetlov Feb 28, 2018
57e3060
Revert ignoring pep8 rules
kowalski Mar 1, 2018
f944a17
Subtle optimisation - don't create list instance if not needed
kowalski Mar 1, 2018
6a93b16
Remove assert statement
kowalski Mar 1, 2018
9f8d389
Add test case ensuring StreamWriter calls callback
kowalski Mar 1, 2018
4fbc080
Add test checking that response.read() trigger trace callback
kowalski Mar 1, 2018
1034104
Merge branch 'feature/add-signals-for-reqres-chunks' of github.com:ko…
kowalski Mar 1, 2018
dcd7366
Merge branch 'master' into feature/add-signals-for-reqres-chunks
asvetlov Mar 1, 2018
7badf72
Add CHANGES record
kowalski Mar 1, 2018
d7c995a
Merge branch 'feature/add-signals-for-reqres-chunks' of github.com:ko…
kowalski Mar 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert automatic pep8 fix.
Mark pep8 rules E225 and E226 as ignored, to prevent
automatic changes in code formating.
  • Loading branch information
kowalski committed Feb 27, 2018
commit 329f89aaf62af5db6dbfdf9327419d64a5176817
2 changes: 1 addition & 1 deletion aiohttp/http_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _write(self, chunk):
raise asyncio.CancelledError('Cannot write to closing transport')
self._transport.write(chunk)

async def write(self, chunk, *, drain=True, LIMIT=64 * 1024):
async def write(self, chunk, *, drain=True, LIMIT=64*1024):
"""Writes chunk of data to a stream.

write_eof() indicates end of stream.
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[pep8]
max-line-length=79
ignore=E225,E226
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in doubt that we should ignore these. Any reasons why to disable them globally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'm not in place to judge this. I did it to be able to save a file which has 64*1000 literal without spaces around *. Otherwise autopep just fixes it for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That autopep suggestion looks correct. You may also write 64000 instead without any loss in readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm with you. @asvetlov specifically asked me to keep it as was.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me the strange thing is successful passing flake8 checks without the ignore setting.
I'm totally fine with 64000 or even better 0x10000. Pretty sure it should be 64KiB instead of 64kB

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop the change. Feel free to replace the limit with 0x10000 if needed -- I'm +-0 for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


[easy_install]
zip_ok = false
Expand Down