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

Inconsistent behaviour between Cython and CPython (or lack of docs, or both) #991

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pajod
Copy link

@pajod pajod commented Feb 7, 2024

What do these changes do?

Adds a test for the quoting inconsistency that I believe needs change. It is written such that the compiled module passes but setting YARL_NO_EXTENSIONS=1 fails.

Submitting without the desired change to verify CI results. May or may not add actual content eventually.

Are there changes in behavior for the user?

No, but maybe there should be. Telling the user they are responsible about URL correctness is not particularly useful if the specific correctness properties are not enumerated.

Related issue number

Still roughly the same scenario, just moved from aio-libs/aiohttp#8088 where it was unnecessarily tested for, and thus failed on PyPy

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@webknjaz
Copy link
Member

We should really finish up #860 to catch the differences better...

assert u.query_string == ""
assert u.fragment == "Pünktelchen\udca0\udcef\udcb6"
assert u.path == u2.path
# assert u.fragment == u2.fragment
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# assert u.fragment == u2.fragment

@@ -584,3 +584,34 @@ def test_empty_path(self):
assert u.path == ""
assert u.query_string == ""
assert u.fragment == ""

def test_truncated_utf_sequence(self):
Copy link
Member

Choose a reason for hiding this comment

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

If path is the only difference, could you parametrize the test?

@webknjaz webknjaz requested a review from mjpieters February 12, 2024 04:22
Copy link

codecov bot commented Jun 28, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Project coverage is 95.83%. Comparing base (fd1c2c9) to head (d76fc99).

Files with missing lines Patch % Lines
tests/test_url_parsing.py 85.71% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #991      +/-   ##
==========================================
- Coverage   95.88%   95.83%   -0.06%     
==========================================
  Files          27       27              
  Lines        5303     5331      +28     
  Branches      316      316              
==========================================
+ Hits         5085     5109      +24     
- Misses        192      196       +4     
  Partials       26       26              
Flag Coverage Δ
CI-GHA 95.83% <85.71%> (-0.06%) ⬇️
MyPy 44.00% <0.00%> (-0.25%) ⬇️
OS-Linux 99.35% <100.00%> (+0.04%) ⬆️
OS-Windows 99.41% <100.00%> (+0.05%) ⬆️
OS-macOS 99.08% <100.00%> (+0.05%) ⬆️
Py-3.10.11 99.05% <100.00%> (+0.05%) ⬆️
Py-3.10.15 99.31% <100.00%> (+0.05%) ⬆️
Py-3.11.10 99.31% <100.00%> (+0.05%) ⬆️
Py-3.11.9 99.05% <100.00%> (+0.05%) ⬆️
Py-3.12.7 99.31% <100.00%> (+0.05%) ⬆️
Py-3.13.0 99.31% <100.00%> (+0.05%) ⬆️
Py-3.9.13 99.01% <100.00%> (+0.05%) ⬆️
Py-3.9.20 99.26% <100.00%> (+0.05%) ⬆️
Py-pypy7.3.16 89.94% <54.16%> (-9.32%) ⬇️
Py-pypy7.3.17 91.07% <100.00%> (-8.22%) ⬇️
VM-macos-latest 99.08% <100.00%> (+0.05%) ⬆️
VM-ubuntu-latest 99.35% <100.00%> (+0.04%) ⬆️
VM-windows-latest 99.41% <100.00%> (+0.05%) ⬆️
pytest 99.35% <100.00%> (+0.04%) ⬆️

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.

Copy link

codspeed-hq bot commented Oct 12, 2024

CodSpeed Performance Report

Merging #991 will not alter performance

Comparing pajod:test-cmod-utfseq (d76fc99) with master (fd1c2c9)

Summary

✅ 64 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants