Avatar for the aio-libs user
aio-libs
yarl
BlogDocsChangelog

Performance History

Latest Results

Require a scheme to start with a letter <!-- Thank you for your contribution! --> ## What do these changes do? Require the first character of a scheme to be an ASCII letter, as [RFC 3986 section 3.1](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) and the WHATWG URL Standard both do. `split_url()` took that first character from urllib's `scheme_chars`, which also holds the digits, `+`, `-` and `.`, so `URL("10.0.0.7:8080/foo.html")` was a URL with the scheme `10.0.0.7` and `URL("1abc://example.com/")` had the host `example.com`. A string like that is a relative reference now, so `URL("http://example.com/a/b").join(URL("10.0.0.7:8080/foo.html"))` keeps the base and is `http://example.com/a/10.0.0.7:8080/foo.html`, which is what the WHATWG URL Standard expects for the `10.0.0.7:8080/foo.html` case of the vendored `urltestdata.json`. RFC 3986 mode already rejected both strings and is unchanged. The same first-letter rule now applies in the two helpers that mirror the parser: the colon of a relative path is re-encoded only when the prefix really is a scheme shape, so `URL.build(path="1a:b")` writes `1a:b` where it wrote `1a%3Ab`, and a backslash is read as a path separator only in a relative reference. The conformance report moves the `10.0.0.7:8080/foo.html` row from *WHATWG mode differs from WHATWG* to *yarl follows each standard in its mode*; no rows are added. ## Are there changes in behavior for the user? Yes. A string whose text before the first `:` is not a scheme, such as `127.0.0.1:8080/x`, is a relative reference instead of an absolute URL with that scheme, so `.scheme` is empty, `.host` is `None` rather than a host taken from a string that is not a URL, and `join()` resolves it against the base instead of returning it unchanged. RFC 3986 mode is unchanged. ## Is it a substantial burden for the maintainers to support this? No. It is one rule that RFC 3986 and the WHATWG URL Standard state identically, applied in the one place where the parser reads a scheme and in the two helpers that mirror it. ## Related issue number N/A ## Checklist - [x] I think the code is well written - [x] Unit tests for the changes exist - [x] Documentation reflects the changes - [ ] If you provide code modification, please add yourself to `CONTRIBUTORS.txt` - [x] Add a new news fragment into the `CHANGES/` folder Drafted with DeepSeek Harness; reviewed by simpleqt. <details> <summary>Agent run details (optional, for reviewers)</summary> Reproduction, run against master and against the branch (`scratch_repro2.py`, kept out of the commit): ``` master: RED: 7 of the checks failed: ["URL('10.0.0.7:8080/foo.html').scheme", "URL('10.0.0.7:8080/foo.html').raw_path", "URL('1abc://example.com/').scheme", "URL('1abc://example.com/').host", 'http join', 'file join', "URL.build(path='1a:b').raw_path"] branch: GREEN: every check passed ``` Tests: `python -m pytest tests -q -p no:cacheprovider --ignore=tests/test_codspeed.py`: 2566 passed, 5 skipped, 51 xfailed, 2 failed, 3 errors. The failures (`tests/test_rfc5952.py::test_canonical_text_form[::ffff:192.0.2.1]` and `[::ffff:c000:0201]`) and the three collection errors (`tests/test_query_to_pairs.py`, `tests/test_quoting.py`, `tests/test_quoting_hypothesis.py`) are the same on master with the same command: the Cython quoter cannot be built in this environment, and the two RFC 5952 cases are an `ipaddress` difference of the interpreter. `tests/test_url_scheme_start.py` adds 22 cases; the strict xfail `3.1-scheme-starts-with-digit` in `tests/test_rfc3986.py` keeps failing for the reason that remains (a relative path with `:` in the first segment is accepted), and a plain passing case now covers the rule itself, so `test_scheme_without_a_leading_letter` asserts that the prefix is no scheme. Conformance: `python tools/conformance/compare.py` regenerated `REPORT.md` and `--check` passes. Row movements: 79 to 78 in *WHATWG mode differs from WHATWG*, 318 to 319 in *yarl follows each standard in its mode*, `yarl WHATWG mode vs WHATWG` 88 to 87; *yarl differs* stays at 0. Both RFC 3986 mode results for the case are unchanged. Lint: `ruff check .` and `ruff format --check yarl tests tools` pass with ruff 0.15.20, the version pinned by the pre-commit configuration (the pre-commit hooks themselves are not installed in this environment, so `pre-commit run --all-files` did not run). Docs spelling: the project marks `sphinxcontrib-spelling` as Linux only (*We only use it in Azure CI*), so the checker was installed explicitly here and the spelling builder was run with the same options as `make doc-spelling` (`-b spelling -W -E --keep-going -n`). It reads `docs/spelling_wordlist.txt` and reports one misspelled word, in the pre-existing `CHANGES/1581.contrib.rst`; the same single warning appears on master, so the new fragment adds neither a spelling nor a docutils warning. Sphinx 9.0.4 was used because the pinned 9.1.0 requires Python 3.12 and this environment has 3.11. Not run here: the Cython quoter build and the tests that need it, the coverage gate (`--cov` with the project's `fail-under` cannot be met by a partial selection), the CodSpeed benchmarks, and `pre-commit` itself. Timing of `split_url()` and `_encode_url()` (5 repeats of 20000 calls, alternating branch and master runs) stayed within the run to run spread, about ten percent. </details>
simpleqt:scheme-starts-with-letter
12 minutes ago
Build(deps): Bump CodSpeedHQ/action from 5.4.2 to 5.5.0 (#1987) Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 5.4.2 to 5.5.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/codspeedhq/action/releases">CodSpeedHQ/action's releases</a>.</em></p> <blockquote> <h2>v5.5.0</h2> <p>Bumps the CodSpeed runner to <a href="https://github.com/CodSpeedHQ/codspeed/releases/tag/v5.5.0">v5.5.0</a>.</p> <p>This release adds support for Ubuntu 26.04, on both x86_64 and arm64. The officially supported distributions are now Ubuntu 22.04, 24.04 and 26.04, and Debian 12.</p> <p>Profile uploads are also faster on GitHub-hosted runners, and archives larger than 5 GiB can now be uploaded.</p> <p>Results from the <a href="https://codspeed.io/docs/instruments/memory">Memory instrument</a> are processed much faster and with less memory on large benchmarks.</p> <p>This release also fixes a crash that could affect some <code>pytest-codspeed</code> benchmarks since v5.4.2.</p> <h3>🚀 Features</h3> <ul> <li>Split profile archive uploads into concurrent parts by <a href="https://github.com/lvaroqui"><code>@​lvaroqui</code></a> in <a href="https://redirect.github.com/CodSpeedHQ/codspeed/pull/565">#565</a></li> </ul> <h3>🐛 Bug Fixes</h3> <ul> <li>Only set <code>PYTHONPERFSUPPORT</code> for exec-harness benchmarks by <a href="https://github.com/not-matthias"><code>@​not-matthias</code></a> in <a href="https://redirect.github.com/CodSpeedHQ/codspeed/pull/584">#584</a></li> </ul> <h3>⚡ Performance</h3> <ul> <li>Stream memtrack frames and decode them in parallel when finding module events by <a href="https://github.com/not-matthias"><code>@​not-matthias</code></a> in <a href="https://redirect.github.com/CodSpeedHQ/codspeed/pull/578">#578</a></li> <li>Use mimalloc as the runner's global allocator by <a href="https://github.com/not-matthias"><code>@​not-matthias</code></a> in <a href="https://redirect.github.com/CodSpeedHQ/codspeed/pull/581">#581</a></li> </ul> <h3>⚙️ Internals</h3> <ul> <li>Support Ubuntu 26.04 by <a href="https://github.com/lvaroqui"><code>@​lvaroqui</code></a> in <a href="https://redirect.github.com/CodSpeedHQ/codspeed/pull/574">#574</a></li> </ul> <p><strong>Full Runner Changelog</strong>: <a href="https://github.com/CodSpeedHQ/codspeed/blob/main/CHANGELOG.md">https://github.com/CodSpeedHQ/codspeed/blob/main/CHANGELOG.md</a></p> <h2>What's Changed</h2> <ul> <li>ci: migrate to github default arm runners by <a href="https://github.com/lvaroqui"><code>@​lvaroqui</code></a> in <a href="https://redirect.github.com/CodSpeedHQ/action/pull/250">CodSpeedHQ/action#250</a></li> <li>chore: bump runner version to 5.5.0 by <a href="https://github.com/github-actions"><code>@​github-actions</code></a>[bot] in <a href="https://redirect.github.com/CodSpeedHQ/action/pull/251">CodSpeedHQ/action#251</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/lvaroqui"><code>@​lvaroqui</code></a> made their first contribution in <a href="https://redirect.github.com/CodSpeedHQ/action/pull/250">CodSpeedHQ/action#250</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/CodSpeedHQ/action/compare/v5.4.2...v5.5.0">https://github.com/CodSpeedHQ/action/compare/v5.4.2...v5.5.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/CodSpeedHQ/action/commit/821a40cd6c80e3cfe387caf55668287addd808da"><code>821a40c</code></a> Release v5.5.0 🚀</li> <li><a href="https://github.com/CodSpeedHQ/action/commit/a0d1b908eeb3de697d48d361ae9ae301569a6e1b"><code>a0d1b90</code></a> chore: bump runner version to 5.5.0 (<a href="https://redirect.github.com/codspeedhq/action/issues/251">#251</a>)</li> <li><a href="https://github.com/CodSpeedHQ/action/commit/67e2f8c4088b50317987bccc22fe40524ecf9f08"><code>67e2f8c</code></a> ci: migrate to github default arm runners (<a href="https://redirect.github.com/codspeedhq/action/issues/250">#250</a>)</li> <li>See full diff in <a href="https://github.com/codspeedhq/action/compare/v5.4.2...v5.5.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=CodSpeedHQ/action&package-manager=github_actions&previous-version=5.4.2&new-version=5.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
master
6 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
Require a scheme to start with a letter#1988
28 minutes ago
63b9cf1
simpleqt:scheme-starts-with-letter
CodSpeed Performance Gauge
0%
Build(deps): Bump CodSpeedHQ/action from 5.4.2 to 5.5.0#1987
1 day ago
a9ddbf6
dependabot/github_actions/CodSpeedHQ/action-5.5.0
CodSpeed Performance Gauge
0%
1 day ago
00c1194
dependabot/github_actions/github/codeql-action-4.39.0
© 2026 CodSpeed Technology
Home Terms Privacy Docs