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

RDFLib / rdflib / 31461536028
91%
master: 91%

Build:
Build:
LAST BUILD BRANCH: upgrade-mypy-v3
DEFAULT BRANCH: master
Ran 11 Aug 2026 05:39AM UTC
Jobs 1
Files 135
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

11 Aug 2026 05:24AM UTC coverage: 91.09% (+0.006%) from 91.084%
31461536028

push

github

web-flow
fix: Turtle/longturtle collection syntax can silently corrupt shared RDF lists (#3504)

isValidList only checked that each cell of an rdf:List chain carries exactly
one rdf:first/rdf:rest pair, not how many statements point into the chain.
When a cell (not just the list head) is referenced from more than one place,
the inline ( ... ) collection form consumes it at a single reference and
writes it out nowhere else, so the other reference is left dangling and the
serialization does not round-trip:

    _:tail rdf:first "b" ; rdf:rest rdf:nil .
    _:l1   rdf:first "a" ; rdf:rest _:tail .
    ex:s1  ex:p _:l1 .
    ex:s2  ex:p _:tail .

was serialized as:

    ex:s1 ex:p ( "a" "b" ) .
    ex:s2 ex:p _:tail .          # _:tail is never defined -> data loss

isValidList now also requires that every non-nil cell in the chain (including
the head) is the object of exactly one statement. When that does not hold,
the serializer falls back to explicit rdf:first/rdf:rest statements, which
always round-trip. Private (unshared) lists are unaffected and keep using the
compact syntax. Fixed identically in both TurtleSerializer and
LongTurtleSerializer, which duplicate this logic.

Added regression tests covering the shared-tail case and confirming private
lists still serialize compactly for both serializers.

Co-authored-by: Nicholas Car <nick@kurrawong.net>

7865 of 9556 branches covered (82.3%)

9 of 10 new or added lines in 2 files covered. (90.0%)

23125 of 25387 relevant lines covered (91.09%)

0.91 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
91.88
0.54% rdflib/plugins/serializers/longturtle.py
Jobs
ID Job ID Ran Files Coverage
1 31461536028.1 11 Aug 2026 05:39AM UTC 135
91.09
GitHub Action Run
Source Files on build 31461536028
  • Tree
  • List 135
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b459049a on github
  • Prev Build on main (#31459546150)
  • Next Build on main (#31463554546)
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