Skip to content

Conversation

@OriolAbril
Copy link
Contributor

Several of these types have been deprecated from typing to the ones in collections.abc.
If you want to leave this open a bit I can add more if there were as I notice them while I try the
library, otherwise I can do other PRs, whatever makes your life easier.

@OriolAbril OriolAbril changed the title Update import for Generator type Update import for Generator and Callable types May 14, 2025
@lagru lagru added the maintenance Keeps the lights on label May 14, 2025
@lagru lagru added this to the v0.3 (MVP) milestone May 14, 2025
@lagru lagru merged commit 72ff2a0 into scientific-python:main May 14, 2025
4 checks passed
@lagru
Copy link
Member

lagru commented May 14, 2025

Good catch! I'm curious how you stumbled on these? Perhaps I'm missing a linter that should have caught these. E.g. I guess at the very least mypy should have complained in the CI? 🤔

Anyway, I'm very happy reviewing PRs as they come. Thank you. 😊

@OriolAbril
Copy link
Contributor Author

Manual inspection. I was curious about how the yield section had been processed and in the stubs I saw Sequence, Iterable and some other input types were imported from collections.abc (without me defining those imports) while Generator was being imported from typing and was surprised about the difference. After checking and seeing the deprecation I searched for similar imports from the typing module and found the Callable one and the test using Sequence from typing.

@OriolAbril OriolAbril deleted the generator_import branch May 14, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Keeps the lights on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants