Skip to content

sorting in turtle serializer breaks with datetime #613

@satra

Description

@satra

if one represents a graph like the one below

    ex:gen1 a prov:End ;
        prov:time "2016-03-20T18:11:44.996521"^^xsd:dateTime,
            "2012-12-03T21:08:16.686000+00:00"^^xsd:dateTime .

the following line:
https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/serializers/turtle.py#L106

raises the following error:

TypeError: can't compare offset-naive and offset-aware datetimes

this should do a lexical sort rather than a numeric or datatype sort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserializationRelated to serialization.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions