You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst working on #98 I have made explicit filename and pathlib_filename properties on classes that have the filename property. I kept a setter for filename because to remove it would be a breaking change.
Additionally, whilst working on the tests for these changes I notice that if an invalid filename is provided the class constructor will throw an error, but obviously this wasn't happening with the setters then and it isn't happening with the setters I've added now. Do we want people to be able to set the filename like this? This would be on the Result class or Archive class, for example.
It would be trivial to delete the new setter methods before making my PR. Or alternatively I could add a check to the setters? However, this would still be a breaking change since this wasn't in the original behaviour. I would suggest just deleting the setters as it seems like you get undefined behaviour otherwise and the filename would still be accessible by the _filename property anyway if a user was particularly determined.
It would be trivial to delete the new setter methods before making my PR. Or alternatively I could add a check to the setters? However, this would still be a breaking change since this wasn't in the original behaviour. I would suggest just deleting the setters as it seems like you get undefined behaviour otherwise and the filename would still be accessible by the _filename property anyway if a user was particularly determined.
I think deleting the setters is the most straightforward approach.
This fixes#104. Removed the newly introduced filename setters and
amended docstrings to indicate the properties are read-only.
Additionally amended the tests to check the properties ARE read only
instead of checking that they were write as well.
This fixes#104. Removed the newly introduced filename setters and
amended docstrings to indicate the properties are read-only.
Additionally amended the tests to check the properties ARE read only
instead of checking that they were write as well.
Whilst working on #98 I have made explicit
filename
andpathlib_filename
properties on classes that have thefilename
property. I kept a setter forfilename
because to remove it would be a breaking change.Additionally, whilst working on the tests for these changes I notice that if an invalid filename is provided the class constructor will throw an error, but obviously this wasn't happening with the setters then and it isn't happening with the setters I've added now. Do we want people to be able to set the filename like this? This would be on the Result class or Archive class, for example.
It would be trivial to delete the new setter methods before making my PR. Or alternatively I could add a check to the setters? However, this would still be a breaking change since this wasn't in the original behaviour. I would suggest just deleting the setters as it seems like you get undefined behaviour otherwise and the filename would still be accessible by the
_filename
property anyway if a user was particularly determined.What do you think @akaszynski ?
Classes this affects:
EmatFile
FullFile
Archive
Result
The text was updated successfully, but these errors were encountered: