Open aucampia opened 2 years ago
It should be noted that these warnings also occur when running pydoc/help:
$ pipx run --spec git+https://github.com/RDFLib/rdflib.git@master#egg=rdflib python -m pydoc rdflib 2>&1 >/dev/null | head
⚠️ python is already on your PATH and installed at /usr/bin/python.
Downloading and running anyway.
/usr/lib64/python3.10/inspect.py:2426: UserWarning: Code: _partialmethod is not defined in namespace BRICK
partialmethod = obj._partialmethod
/usr/lib64/python3.10/pydoc.py:312: UserWarning: Code: _fields is not defined in namespace BRICK
fields = getattr(object, '_fields', [])
https://brickschema.org/schema/Brick#AED = does not look like a valid URI, trying to serialize this will break.
https://brickschema.org/schema/Brick#AED = rdflib.term.URIRef('https://brickschema.org/schema/Brick#https://brickschema.org/schema/Brick#AED') does not look like a valid URI, trying to serialize this will break.
https://brickschema.org/schema/Brick#AHU = does not look like a valid URI, trying to serialize this will break.
https://brickschema.org/schema/Brick#AHU = rdflib.term.URIRef('https://brickschema.org/schema/Brick#https://brickschema.org/schema/Brick#AHU') does not look like a valid URI, trying to serialize this will break.
The _pytestfixturefunction
warning is also raised when running pytest
using the TIME
namespace.
site-packages\_pytest\compat.py:328: UserWarning: Code: _pytestfixturefunction is not defined in namespace DCAT
Also raised there.
The "readthedocs" CI build is now failing due to these warnings. There is a simple easy fix: DefinedNamespace can have a list known attribute names that it will not throw a warning on. If it finds those it can raise AttributeError as expected by those libraries.
Fixed by #2852
This is maybe not a bug exactly but it is annoying. When building sphinx we get the following warnings:
pytest:
sphinx:
Not sure what the best strategy is to fix it, one option is to just always raise AttributeError for these attributes, but I'm not sure this is entirely right either, as it seems to be somewhat over fitting/pinning to the problem, there may be a more general solution which is sensible, maybe there is some way to mark the class/metaclass to prevent this.
This is really low priority as it does not break anything, but I thought I would record it anyway just as a mental note.
More details:
https://readthedocs.org/projects/rdflib/builds/16667234/
https://github.com/RDFLib/rdflib/runs/6046502650?check_suite_focus=true