Source: python-spdx-tools
Version: 0.8.3-3
Severity: serious
Tags: ftbfs
Forwarded: https://github.com/spdx/tools-python/issues/866
python-spdx-tools fails when trying to build for python3.14:
=================================== FAILURES ===================================
___________________________ test_bump_spdx_document ____________________________
def test_bump_spdx_document():
spdx2_document: Spdx2_Document = document_fixture()
spdx2_document.creation_info.creators.append(actor_fixture(ActorType.TOOL,
"tool_name", None))
document_namespace = document_fixture().creation_info.document_namespace
payload: Payload = bump_spdx_document(spdx2_document)
> write_payload(payload, sys.stdout)
tests/spdx3/bump/test_spdx_document_bump.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
spdx_tools/spdx3/writer/console/payload_writer.py:64: in write_payload
write_method(element, text_output)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
relationship =
Relationship(spdx_id='https://some.namespace#SPDXRef-Relationship-0',
creation_info=None, name=None, summary=None, des...#SPDXRef-File'],
relationship_type=<RelationshipType.DESCRIBES: 15>, completeness=None,
start_time=None, end_time=None)
text_output = <EncodedFile name="<_io.FileIO name=6 mode='rb+' closefd=True>"
mode='r+' encoding='utf-8'>
heading = True
def write_relationship(relationship: Relationship, text_output: TextIO,
heading: bool = True):
if heading:
text_output.write("## Relationship\n")
write_element_properties(relationship, text_output)
> for property_name in relationship.__annotations__.keys():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E AttributeError: 'Relationship' object has no attribute
'__annotations__'. Did you mean: '__annotate_func__'?
spdx_tools/spdx3/writer/console/relationship_writer.py:15: AttributeError
...
This can be seen at
https://salsa.debian.org/python-team/packages/python-spdx-tools/-/jobs/8720947#L2243.
This error doesn't happen building with python3.13 (only):
https://salsa.debian.org/python-team/packages/python-spdx-tools/-/jobs/8607066.