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

aio-libs / yarl / 37000909309
98%

Build:
DEFAULT BRANCH: master
Ran 02 Oct 2026 11:26AM UTC
Jobs 1
Files 50
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

02 Oct 2026 11:25AM UTC coverage: 97.836% (+0.03%) from 97.803%
37000909309

push

github

web-flow
Keep Windows drive letters in file URLs in WHATWG mode (#1962)

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

## What do these changes do?

WHATWG mode now handles Windows drive letters in `file` URLs as the
WHATWG URL Standard does (file, file slash and file host states,
"shorten a path"). `C|` in the first path segment is read as `C:`, a
drive letter in the authority starts the path (`file://C:/x` is
`file:///C:/x`), `..` never removes the drive letter, an absolute-path
reference keeps the drive letter of the base (`/` against
`file:///C:/a/b` is `file:///C:/`), and a reference that starts with a
drive letter replaces the base path (`file:c:\foo\bar.html` against
`file:///tmp/mock/path` is `file:///c:/foo/bar.html`). A schemeless
reference whose drive letter only matters against a file base (`C|/x`,
`//d:`, `//C|/x`) keeps its original form in the `_join_path` cache, and
`join()` re-reads it as `file:` + reference against a file base.
`URL.build`, `with_path`, `joinpath` and `/` normalize the same way. RFC
mode is unchanged.

Conformance report: 23 of the 25 *Windows drive letter* rows move from
*WHATWG mode differs from WHATWG* to *yarl follows each standard in its
mode*, as do `file:///w|/m` (*empty host*), `'C|\n/'` (*tab or newline*)
and ` File:c|////foo\bar.html` (*leading or trailing C0*). In the
*follows* section, `/\//\/a/../` against `file:///`, and `file:.`,
`file:..` and `file:.//p`, now give the WHATWG result exactly, where
before they only matched after normalization. Two rows stay: `C|a`
against `file://host/dir/file` and `file:C||/m/` resolve to the right
paths, but WHATWG mode percent-encodes `|` in every path (`C%7Ca`),
while WHATWG keeps it literal. Fixing that changes path quoting for all
schemes, so it is left for a separate change. Nothing is added to *yarl
differs, RFC 3986+3987 and WHATWG agree*.

## Are there changes in behavior for the user?

Yes, in WHATWG mode only, for `file` URLs with a drive letter: for
example `URL("file:... (continued)

97 of 194 branches covered (50.0%)

Branch coverage included in aggregate %.

383 of 387 new or added lines in 5 files covered. (98.97%)

10435 of 10571 relevant lines covered (98.71%)

0.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
98.24
tests/test_url_file_drive.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 37000909309.1 02 Oct 2026 11:26AM UTC 50
97.84
GitHub Action Run
Source Files on build 37000909309
  • Tree
  • List 50
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37000909309
  • ee6bc6af on github
  • Prev Build on master (#36971974712)
  • Next Build on master (#37009328384)
  • 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