RDFLib / rdflib

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
https://rdflib.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.17k stars 557 forks source link

apidocs/rdflib.extras.html varies between builds #2645

Open bmwiedemann opened 11 months ago

bmwiedemann commented 11 months ago

While working on reproducible builds for openSUSE, I found that our python-rdflib package varied in every build, because the sphinx-generated /usr/share/doc/packages/python-rdflib-doc/html/apidocs/rdflib.extras.html had such a diff:

 <dl class="py attribute">
 <dt class="sig sig-object py" id="rdflib.extras.infixowl.Individual.factoryGraph">
-<span class="sig-name descname"><span class="pre">factoryGraph</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">&lt;Graph</span> <span class="pre">identifier=N5b6201e23fba40f7a644eb4550f13254</span> <span class="pre">(&lt;class</span> <span class="pre">'rdflib.graph.Graph'&gt;)&gt;</span></em><a class="headerlink" href="#href_anchor" title="Link to this definition">¶</a></dt>
+<span class="sig-name descname"><span class="pre">factoryGraph</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">&lt;Graph</span> <span class="pre">identifier=N1ace9a2f55f24c4e9fbe635c5ad9130c</span> <span class="pre">(&lt;class</span> <span class="pre">'rdflib.graph.Graph'&gt;)&gt;</span></em><a class="headerlink" href="#href_anchor" title="Link to this definition">¶</a></dt>

longer diff

bmwiedemann commented 11 months ago

I found that this helps to prevent the embedding of random identifier values:

--- rdflib-6.1.1.orig/rdflib/extras/infixowl.py
+++ rdflib-6.1.1/rdflib/extras/infixowl.py
@@ -365,6 +365,8 @@ class TermDeletionHelper:
 class Individual(object):
     """
     A typed individual
+
+    :meta private:
     """

     factoryGraph = Graph()
@@ -1606,6 +1608,7 @@ class Restriction(Class):
     individualRestrictionComponent
     { individualRestrictionComponent } ')'

+    :meta private:
     """

     restrictionKinds = [