• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aio-libs / yarl / 36552953552
98%

Build:
DEFAULT BRANCH: master
Ran 29 Sep 2026 10:03AM UTC
Jobs 1
Files 44
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Sep 2026 10:01AM UTC coverage: 97.627% (-0.04%) from 97.669%
36552953552

push

github

web-flow
Read the authority of http:host without "//" in WHATWG mode (#1937)

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

## What do these changes do?

In the default WHATWG mode, `http:example.com/`, `http:/example.com/`
and `http:///example.com/` now parse as `http://example.com/`, as the
WHATWG URL Standard does for the `http`, `https`, `ws`, `wss` and `ftp`
schemes (the "special authority ignore slashes" state). Previously the
text stayed the path of a URL without an authority and printed as
`http:///example.com/`. Userinfo or a port without a host
(`http:@/www.example.com`) is rejected, as for `http://@/x`. `http:`,
`http:/`, `http:?q`, `http://` and `http:///` are kept as they were,
since there is no host to read. An input with `//` is absolute against
any base, as in WHATWG, so `join()` no longer keeps the base host for
`http:///example.com/`.

Against a base with the same scheme, WHATWG resolves the same input as a
relative reference (`http:foo.com` against `http://example.org/foo/bar`
is `http://example.org/foo/foo.com`). `URL.join()` only sees the parsed
reference, so a URL parsed this way keeps its original path in the cache
(and in its pickle state), and `join()` uses it when the schemes match.
RFC 3986 mode is unchanged: it already keeps these URLs without an
authority.

In `tools/conformance/REPORT.md`, 33 rows move from "WHATWG mode differs
from WHATWG, RFC mode follows RFC 3986" to "yarl follows each standard
in its mode" (28 to 61). Four inputs now fail in WHATWG mode without
changing section. Three are `http:\\host\` (a backslash in the authority
is rejected; backslash handling is a separate change). The fourth is
`http:[61:27]/:foo` against an http base, which WHATWG only accepts
relative to the base, while yarl parses the reference alone first. "yarl
differs, RFC 3986 and WHATWG agree" is unchanged.

## Are there changes in behavior for the user?

Yes. In WHATWG mode, `URL("http:example.com/")` has host `example.com`,
and `URL("http:@/x")` r... (continued)

97 of 194 branches covered (50.0%)

Branch coverage included in aggregate %.

134 of 140 new or added lines in 4 files covered. (95.71%)

1 existing line in 1 file now uncovered.

8953 of 9076 relevant lines covered (98.64%)

0.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
95.15
tests/test_url_special_authority.py
1
96.68
-0.07% yarl/_url.py

Coverage Regressions

Lines Coverage ∆ File
1
96.68
-0.07% yarl/_url.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 36552953552.1 29 Sep 2026 10:03AM UTC 44
97.63
GitHub Action Run
Source Files on build 36552953552
  • Tree
  • List 44
  • Changed 3
  • Source Changed 3
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #36552953552
  • 0bd174e1 on github
  • Prev Build on master (#36551594910)
  • Next Build on master (#36565635998)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc