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

Raise TypeError when setting StreamResponse.last_modified to an unsupported type #10146

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Dec 8, 2024

What do these changes do?

closes #10143

Are there changes in behavior for the user?

Currently this would silently fail and discard the new value.

Screenshot 2024-12-08 at 12 32 49 PM

…pported type

Currently this would silently fail and discard the new
value.

fixes #10143
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Dec 8, 2024
Copy link

codspeed-hq bot commented Dec 8, 2024

CodSpeed Performance Report

Merging #10146 will not alter performance

Comparing raise_value_error_invalid_last_modified (1628210) with master (6200513)

Summary

✅ 47 untouched benchmarks

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.75%. Comparing base (6200513) to head (1628210).
Report is 3 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10146   +/-   ##
=======================================
  Coverage   98.75%   98.75%           
=======================================
  Files         122      122           
  Lines       36954    36960    +6     
  Branches     4411     4412    +1     
=======================================
+ Hits        36494    36501    +7     
  Misses        313      313           
+ Partials      147      146    -1     
Flag Coverage Δ
CI-GHA 98.64% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.33% <100.00%> (+<0.01%) ⬆️
OS-Windows 96.18% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.43% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 97.28% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.87% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.85% <100.00%> (-0.01%) ⬇️
Py-3.11.9 97.33% <100.00%> (-0.01%) ⬇️
Py-3.12.7 98.38% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 97.19% <100.00%> (+<0.01%) ⬆️
Py-3.13.1 98.35% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 97.20% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 97.73% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 97.35% <100.00%> (+<0.01%) ⬆️
VM-macos 97.43% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 98.33% <100.00%> (+<0.01%) ⬆️
VM-windows 96.18% <100.00%> (+<0.01%) ⬆️

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 bdraco added backport:skip Skip backport bot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot and removed backport:skip Skip backport bot labels Dec 8, 2024
@bdraco
Copy link
Member Author

bdraco commented Dec 8, 2024

Thought about it some more, and probably ok to backport to 3.12 but not 3.11

@bdraco
Copy link
Member Author

bdraco commented Dec 8, 2024

TypeError is probably better here actually

@bdraco bdraco changed the title Raise ValueError when setting StreamResponse.last_modified to an unsupported type Raise TypeError when setting StreamResponse.last_modified to an unsupported type Dec 8, 2024
CHANGES/10146.misc.rst Outdated Show resolved Hide resolved
aiohttp/web_response.py Outdated Show resolved Hide resolved
tests/test_web_response.py Outdated Show resolved Hide resolved
@bdraco bdraco marked this pull request as ready for review December 8, 2024 18:35
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.

lgtm

@asvetlov asvetlov merged commit a818e51 into master Dec 12, 2024
40 checks passed
@asvetlov asvetlov deleted the raise_value_error_invalid_last_modified branch December 12, 2024 13:57
Copy link
Contributor

patchback bot commented Dec 12, 2024

Backport to 3.12: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.12/a818e51cbba7daf8c7cebd246d9a0ba214ebeba3/pr-10146

Backported as #10161

🤖 @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 Dec 12, 2024
…nsupported type (#10146)

<!-- Thank you for your contribution! -->

## What do these changes do?

closes #10143

## Are there changes in behavior for the user?

Currently this would silently fail and discard the new value.

<img width="685" alt="Screenshot 2024-12-08 at 12 32 49 PM"
src="https://github.com/user-attachments/assets/b0cf00c3-cd2e-4be6-af94-d993491bd296">

(cherry picked from commit a818e51)
bdraco pushed a commit that referenced this pull request Dec 12, 2024
…treamResponse.last_modified` to an unsupported type (#10161)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.12 Trigger automatic backporting to the 3.12 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.

Raise TypeError when last_modified gets an unexpected type
3 participants