result
result copied to clipboard
Remove the deprecated `.value` method
#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.
Well, at least documentation should be updated first, to mention that this property is deprecated.
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
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
Docs and migration guide have been updated in https://github.com/rustedpy/result/pull/159. Thanks for pointing out the issue with the docs.
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.