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

Simplify the hello world example, explain request lifecycle #4329

Merged
merged 5 commits into from
Nov 12, 2019

Conversation

ksamuel
Copy link
Contributor

@ksamuel ksamuel commented Nov 8, 2019

What do these changes do?

Simplify the hello world example in the README and doc index

Add a new page to the doc (http_request_lifecycle) to explain why aiohttp's client API requires several steps for performing a request. Compare it with the "requests" library. Gives some information about the use of the ClientSession object.

Are there changes in behavior for the user?

No

Related issue number

Close #4272

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

Simplify the hello world example in the README and doc index

Add a new page to the doc (http_request_lifecycle) to explain why aiohttp's client API requires several steps for performing a request. Compare it with the "requests" library. Gives some information about the use of the ClientSession object.
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Nov 8, 2019
README.rst Outdated

Comming from `requests<https://requests.readthedocs.io/>`_ ? Read :ref:`why we need so many lines <http://aiohttp.readthedocs.io/en/latest/aiohttp-request-lifecycle>`.
Copy link
Member

Choose a reason for hiding this comment

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

This makes the CI fail.

CONTRIBUTORS.txt Outdated
@@ -125,6 +125,7 @@ Igor Pavlov
Ilya Chichak
Ingmar Steen
Ivan Larin
Kevin Samuel
Copy link
Member

Choose a reason for hiding this comment

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

"K" goes after "J" in the alphabet.

@codecov-io
Copy link

codecov-io commented Nov 9, 2019

Codecov Report

Merging #4329 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4329      +/-   ##
==========================================
- Coverage   97.55%   97.51%   -0.04%     
==========================================
  Files          43       43              
  Lines        8862     8859       -3     
  Branches     1389     1389              
==========================================
- Hits         8645     8639       -6     
- Misses         93       96       +3     
  Partials      124      124
Impacted Files Coverage Δ
aiohttp/web_protocol.py 91.81% <0%> (-0.88%) ⬇️
aiohttp/helpers.py 96.12% <0%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0bd628...11eaf4a. Read the comment docs.

@ksamuel
Copy link
Contributor Author

ksamuel commented Nov 9, 2019

I see that the coverage went down, but I didn't touched the code or unit tests.

Maybe I'm doing the PR on the wrong branch?

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

Awesome!
I very appreciate the PR, it elaborates the idea of the client session pretty well.

One minor thing: please use double backticks for inline code examples.
aiohttp follows CPython style guide for documentation, it contains a rule for code formatting.

@asvetlov
Copy link
Member

Coverage jittering for aiohttp worries me too.
Maybe this is because we report the coverage for both master and 3.7 branches?
I don't know.

@asvetlov asvetlov merged commit 17bed45 into aio-libs:master Nov 12, 2019
@asvetlov
Copy link
Member

Thanks!

asvetlov pushed a commit that referenced this pull request Nov 12, 2019
asvetlov added a commit that referenced this pull request Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve client "hello world" in README
4 participants