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

Accept objects that support __int__ for query vars #1139

Merged
merged 5 commits into from
Sep 9, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Sep 9, 2024

What do these changes do?

Previously we would only accept subclasses of int, we will now accept any object that implements __int__ and has the correct protocol.

Are there changes in behavior for the user?

np.int16 will now be accepted

Related issue number

closes #945

Previously we would only accept subclasses of int,
we will now accept any object that implements __int__
and has the correct protocol.
yarl/_url.py Outdated Show resolved Hide resolved
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 9, 2024
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.42%. Comparing base (0ee0104) to head (692bf1c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1139   +/-   ##
=======================================
  Coverage   95.41%   95.42%           
=======================================
  Files          30       30           
  Lines        4756     4761    +5     
  Branches      422      423    +1     
=======================================
+ Hits         4538     4543    +5     
  Misses        192      192           
  Partials       26       26           
Flag Coverage Δ
CI-GHA 95.37% <100.00%> (+<0.01%) ⬆️
MyPy 41.13% <25.00%> (-0.07%) ⬇️
OS-Linux 99.39% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.49% <100.00%> (+<0.01%) ⬆️
OS-macOS 99.10% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 99.00% <100.00%> (+<0.01%) ⬆️
Py-3.10.14 99.24% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 99.24% <100.00%> (+<0.01%) ⬆️
Py-3.12.5 99.24% <100.00%> (+<0.01%) ⬆️
Py-3.13.0-rc.1 99.24% <100.00%> (+<0.01%) ⬆️
Py-3.8.10 98.95% <100.00%> (+<0.01%) ⬆️
Py-3.8.18 99.18% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 98.95% <100.00%> (+<0.01%) ⬆️
Py-3.9.19 99.18% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.11 99.24% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 99.24% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.17 99.27% <100.00%> (+<0.01%) ⬆️
VM-macos-latest 99.10% <100.00%> (+<0.01%) ⬆️
VM-ubuntu-latest 99.39% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.49% <100.00%> (+<0.01%) ⬆️
pytest 99.39% <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 marked this pull request as ready for review September 9, 2024 19:18
@bdraco bdraco merged commit 2340c72 into master Sep 9, 2024
47 of 49 checks passed
@bdraco bdraco deleted the accept_supports_int_float branch September 9, 2024 19:19
@bdraco
Copy link
Member Author

bdraco commented Oct 13, 2024

This caused a performance regression, but we didn't know it at the time since we were not monitoring performance

Fixed in #1259

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.

Allow numpy values in query
1 participant