add support for returning type of urllib.parse.ParseResult#13
add support for returning type of urllib.parse.ParseResult#13albertedwardson wants to merge 7 commits intoTkTech:mainfrom
Conversation
|
@TkTech pinging :^) |
|
Heyo, this was reviewed as part of v3 and I added a test for it, but as I was doing so I started having Qs about how compatible we should be. For example WHATWG includes : in the schema and ? in the path, but urllib does not. Do we just care about the structure and not the contents? |
Oh, ok, thanks :) Reopening it then
If user wants correctness and compliance to the WHATWG spec, one should not use I think this compatibility layer is for scenarios where end user wants speedups, not spec compliance |
|
Will add bytes type parse result and them mark as ready for review |
As an aside, I tried supporting the buffer interface with nanobind's ndarray and directly supporting bytes, and oddly both were significantly slower, with more time being taking by nanobind glue than I'd expect. So |
|
compatibility tests fails with mismatched |
Could resolve #2
Performance impact:
Yes, using
namedtuple+ acquiringscheme, netloc, path, params, query, fragmentat creation time reduces performance slightly, but this implementation is still significantly faster thanurllib.parse.Benchmark results:
TODOs:
ParseResultBytesparse_compatmatchesurllib.parse.urlparseresults