Open
Description
Fedora project is now planning to import python 3.13 into Fedora 40, and now trying to rebuild all packages in Fedora with python 3.13b2 .
With rdflib 7.0.0, testsuite TestUtil.test_to_bits_from_bits_round_trip
fails with python 3.13b2 as:
__________________ TestUtil.test_to_bits_from_bits_round_trip __________________
self = <test_nodepickler.TestUtil object at 0x7fe577cee490>
def test_to_bits_from_bits_round_trip(self):
np = NodePickler()
a = Literal(
"""A test with a \\n (backslash n), "\u00a9" , and newline \n and a second line.
"""
)
> b = np.loads(np.dumps(a))
test/test_store/test_nodepickler.py:32:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rdflib.store.NodePickler object at 0x7fe5742e5010>
obj = rdflib.term.Literal('A test with a \\n (backslash n), "©" , and newline \n and a second line.\n')
protocol = None, bin = None
def dumps(
self, obj: "Node", protocol: Optional[Any] = None, bin: Optional[Any] = None
):
src = BytesIO()
p = Pickler(src)
# NOTE on type error: https://github.com/python/mypy/issues/2427
# type error: Cannot assign to a method
> p.persistent_id = self._get_ids # type: ignore[assignment]
E AttributeError: '_pickle.Pickler' object attribute 'persistent_id' is read-only
rdflib/store.py:149: AttributeError
_________________________ TestUtil.test_literal_cases __________________________
self = <test_nodepickler.TestUtil object at 0x7fe577cee5d0>
def test_literal_cases(self):
np = NodePickler()
for l in cases:
a = Literal(l)
> b = np.loads(np.dumps(a))
test/test_store/test_nodepickler.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rdflib.store.NodePickler object at 0x7fe5742cd450>
obj = rdflib.term.Literal('no quotes'), protocol = None, bin = None
def dumps(
self, obj: "Node", protocol: Optional[Any] = None, bin: Optional[Any] = None
):
src = BytesIO()
p = Pickler(src)
# NOTE on type error: https://github.com/python/mypy/issues/2427
# type error: Cannot assign to a method
> p.persistent_id = self._get_ids # type: ignore[assignment]
E AttributeError: '_pickle.Pickler' object attribute 'persistent_id' is read-only
rdflib/store.py:149: AttributeError
Looks like this assignment is no longer accepted.
Line 136 in fcfc2aa
Line 149 in fcfc2aa
Metadata
Metadata
Assignees
Labels
No labels