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

Fix handling of unsupported upgrades with the pure python http parser #8252

Merged
merged 9 commits into from
Mar 28, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Mar 26, 2024

What do these changes do?

Fix handling of unsupported upgrades with the pure python http parser

The content is now read from an unsupported upgrade request

Is it a substantial burden for the maintainers to support this?

no

Related issue number

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_or_pr_num>.<type>.rst (e.g. 588.bugfix.rst)

    • if you don't have an issue number, change it to the pull request
      number after creating the PR

      • .bugfix: A bug fix for something the maintainers deemed an
        improper undesired behavior that got corrected to match
        pre-agreed expectations.
      • .feature: A new behavior, public APIs. That sort of stuff.
      • .deprecation: A declaration of future API removals and breaking
        changes in behavior.
      • .breaking: When something public is removed in a breaking way.
        Could be deprecated in an earlier release.
      • .doc: Notable updates to the documentation structure or build
        process.
      • .packaging: Notes for downstreams about unobvious side effects
        and tooling. Changes in the test invocation considerations and
        runtime assumptions.
      • .contrib: Stuff that affects the contributor experience. e.g.
        Running tests, building the docs, setting up the development
        environment.
      • .misc: Changes that are hard to assign to any of the above
        categories.
    • Make sure to use full sentences with correct case and punctuation,
      for example:

      Fixed issue with non-ascii contents in doctest text files
      -- by :user:`contributor-gh-handle`.

      Use the past tense or the present tense a non-imperative mood,
      referring to what's changed compared to the last released version
      of this project.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Mar 26, 2024
@bdraco bdraco added backport-3.9 Trigger automatic backporting to the 3.9 release branch by Patchback robot backport-3.10 Trigger automatic backporting to the 3.10 release branch by Patchback robot labels Mar 26, 2024
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.53%. Comparing base (aa014a9) to head (7d96da7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8252   +/-   ##
=======================================
  Coverage   97.53%   97.53%           
=======================================
  Files         107      107           
  Lines       32843    32845    +2     
  Branches     3851     3851           
=======================================
+ Hits        32032    32034    +2     
  Misses        610      610           
  Partials      201      201           
Flag Coverage Δ
CI-GHA 97.44% <100.00%> (+<0.01%) ⬆️
OS-Linux 97.11% <100.00%> (+<0.01%) ⬆️
OS-Windows 95.80% <100.00%> (+0.17%) ⬆️
OS-macOS 96.92% <100.00%> (-0.01%) ⬇️
Py-3.10.11 95.54% <100.00%> (+<0.01%) ⬆️
Py-3.10.13 96.66% <100.00%> (-0.26%) ⬇️
Py-3.10.14 96.88% <100.00%> (+<0.01%) ⬆️
Py-3.11.8 96.89% <100.00%> (+0.30%) ⬆️
Py-3.12.2 97.02% <100.00%> (+0.30%) ⬆️
Py-3.8.10 95.52% <100.00%> (+<0.01%) ⬆️
Py-3.8.18 96.85% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 95.51% <100.00%> (+<0.01%) ⬆️
Py-3.9.18 96.63% <100.00%> (-0.26%) ⬇️
Py-3.9.19 96.85% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.15 96.42% <100.00%> (-0.01%) ⬇️
VM-macos 96.92% <100.00%> (-0.01%) ⬇️
VM-ubuntu 97.11% <100.00%> (+<0.01%) ⬆️
VM-windows 95.80% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco
Copy link
Member Author

bdraco commented Mar 27, 2024

#7960 passed but I guess I need to scape more out of there. Had to leave for the airport, so will have to pick it up later.

aiohttp/http_parser.py Outdated Show resolved Hide resolved
@bdraco bdraco marked this pull request as ready for review March 27, 2024 07:51
@Dreamsorcerer
Copy link
Member

I assume this affected all platforms then. Linux being fast enough that the race condition succeeded, Windows being slow enough that it always failed, and Mac being unreliable enough that it passes half the time?

Co-authored-by: Sam Bull <git@sambull.org>
@bdraco
Copy link
Member Author

bdraco commented Mar 28, 2024

I assume this affected all platforms then. Linux being fast enough that the race condition succeeded, Windows being slow enough that it always failed, and Mac being unreliable enough that it passes half the time?

Yes that is the same conclusion I reached as well.

@bdraco bdraco merged commit 8f23712 into master Mar 28, 2024
34 checks passed
@bdraco bdraco deleted the fix_unsupported_upgrade branch March 28, 2024 18:30
Copy link
Contributor

patchback bot commented Mar 28, 2024

Backport to 3.9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.9/8f23712616935bcd86b1c1bca434593ad92a4c14/pr-8252

Backported as #8254

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Mar 28, 2024
…#8252)

Co-authored-by: Sam Bull <git@sambull.org>
(cherry picked from commit 8f23712)
Copy link
Contributor

patchback bot commented Mar 28, 2024

Backport to 3.10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.10/8f23712616935bcd86b1c1bca434593ad92a4c14/pr-8252

Backported as #8255

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Mar 28, 2024
…#8252)

Co-authored-by: Sam Bull <git@sambull.org>
(cherry picked from commit 8f23712)
bdraco added a commit that referenced this pull request Mar 28, 2024
…es with the pure python http parser (#8255)

Co-authored-by: J. Nick Koston <nick@koston.org>
bdraco added a commit that referenced this pull request Mar 28, 2024
…s with the pure python http parser (#8254)

Co-authored-by: J. Nick Koston <nick@koston.org>
@@ -0,0 +1,2 @@
Fixed content not being read when an upgrade request was not supported with the pure Python implementation.
Copy link
Member

Choose a reason for hiding this comment

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

@bdraco it's best not to put a trailing period at the end of the sentence if the byline is right after — RST will render it on the same line. If you want a separate line, add an extra empty separator line in between. Look how it's rendered now: https://docs.aiohttp.org/en/latest/changes.html#bug-fixes.

Also, I suggest not using any period after the byline if it's on a dedicated line as opposed to being at the end of a sentence.

Examples:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.9 Trigger automatic backporting to the 3.9 release branch by Patchback robot backport-3.10 Trigger automatic backporting to the 3.10 release branch by Patchback robot 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.

None yet

3 participants