result icon indicating copy to clipboard operation
result copied to clipboard

Remove the deprecated `.value` method

Open francium opened this issue 1 year ago • 5 comments

#121 deprecated the .value method. This method needs to be removed in a future version. Ideally we'd wait a while so users can have enough time to migrate away on their own.

We could also perhaps change the deprecated method to start throwing an exception and returning None before we remove it completely.

francium avatar Jun 11 '23 18:06 francium

Well, at least documentation should be updated first, to mention that this property is deprecated.

dolfinus avatar Dec 03 '23 23:12 dolfinus

Hello, err_value and ok_value is not covered in documentation, if I am not mistaken and they are not annotated by types, so deprecation looks premature

lesnik512 avatar Dec 06 '23 10:12 lesnik512

The field is not being removed in the immediate future. I'll update the docs...I've opened up #153 to improve the docs as a whole as the current setup with the README isn't very maintainable.

The value field deprecation is however mentioned in the changelog and we've put a deprecation warning whenever anyone tries to use it

DeprecationWarning: Accessing .value on Result type is deprecated, please use .ok_value or '.err_value' instead

francium avatar Dec 06 '23 15:12 francium

Docs and migration guide have been updated in https://github.com/rustedpy/result/pull/159. Thanks for pointing out the issue with the docs.

francium avatar Dec 08 '23 03:12 francium

I'm thinking this will be removed when https://github.com/rustedpy/result/issues/180 is also done. Enough time will pass by then to remove this deprecated method.

francium avatar Mar 22 '24 21:03 francium