Skip to content

Conversation

@jorenham
Copy link
Member

Since Python 3.10 typing.Optional[T] has been deprecated in favour of the T | None syntax.
See https://typing.readthedocs.io/en/latest/spec/historical.html#union-and-optional .

Note that the remaining typing.Optional uses in numpy._array_api_info are already dealt with in #26873.

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
@seberg seberg merged commit d19263a into numpy:main Jul 18, 2024
@seberg
Copy link
Member

seberg commented Jul 18, 2024

That PR is a bit old, but I should resurrect it, and I think there was "sufficient" consensus on it: gh-23119.

@jorenham jorenham deleted the typing-optional-cleanup branch July 18, 2024 15:51
ArvidJB pushed a commit to ArvidJB/numpy that referenced this pull request Nov 1, 2024
…typing`` tests (numpy#26954)

Since Python 3.10 typing.Optional[T] has been deprecated in favour of the T | None syntax.
See https://typing.readthedocs.io/en/latest/spec/historical.html#union-and-optional .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants