archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: Pointer file creation fails in Python 3 #887

Closed replaceafill closed 3 years ago

replaceafill commented 5 years ago

Expected behaviour

Pointer files can be created in Python 2 and 3.

Current behaviour

Some of the logic to create pointer files (replicas and encryption) relies on PREMIS agents and events being unique and filtered using sets. See:

However these objects (subclassed from PREMISElement) are not hashable, which is a requirement of set operations, and they implement the __eq__ method which makes them fail in Python 3 with a TypeError: unhashable type.

Steps to reproduce

I found this through the aip-encrypt-mirror AMAUAT tag using the Python 3 branch of the SS.

Your environment (version of Archivematica, OS version, etc)

https://github.com/artefactual-labs/am/commit/67dbcc0fbbf541ed2594c83078a4299c808fe84c using the Python 3 branch of the SS.


For Artefactual use: Please make sure these steps are taken before moving this issue from Review to Done:

sromkey commented 3 years ago

Tested with RC2, pointer files are being created.