Minimum Python version to 3.10 TODO
maread99 opened this issue · comments
Marcus Read commented
type annotations
- Use of
Optional
andUnion
can now be migrated to using the|
operator in the following circumstances:- parameter annotations of functions decorated with
@valimp.parse
(get_type_hints did not support the | operator prior to py 3.10). For example,Optional[Union[str, float, int]]
can now be annotated asstr | float | int | None
. - creating type aliases, for example
Symbols = Union[list[str], str]
can now be defined asSymbols = list[str] | str
- Indeed, search across the library for any references to
Optional
andUnion
, including with the docs, and remove / revise.
- parameter annotations of functions decorated with
- Should also be able to lose the
from __future__ import annoations
lines from the top of modules. - Can probably by now revert the fix implemented to accommodate bug in pandas 2.1.0 concerning treatment of origin. Intention in pandas-dev/pandas#55064 was to revert in 2.1.1. Required changes to revert fix are noted in comments on the commit.
Marcus Read commented
Would be closed by #353