Skip to content

Fix importlib.resources for mypy - #2130

Merged
JelleZijlstra merged 4 commits into
python:masterfrom
emmatyping:typeshedcheck
May 15, 2018
Merged

JelleZijlstra merged 4 commits into
python:masterfrom
emmatyping:typeshedcheck

Conversation

@emmatyping

@emmatyping emmatyping commented May 15, 2018 •

Copy link
Copy Markdown
Member

These were discovered after finding that the selenium and importlib.resources stubs weren't findable. Since clearly no one was using selenium, Jelle and I offline agreed we should just remove them.

@gvanrossum

Copy link
Copy Markdown
Member

Um, before you delete the selenium stubs, IIUC they are used by some Dropbox code. What's wrong with them?

@emmatyping

Copy link
Copy Markdown
Member Author

@gvanrossum they haven't been accessible via mypy for a while, so they haven't been used. If selenium is used, we can work on cleaning them up. The main issues were they importing things that don't exist, and have many untyped methods.

@gvanrossum

Copy link
Copy Markdown
Member

Oh, at Dropbox we use --ignore-missing-imports so we never notice the missing dependencies. So I would like to keep selenium (and add a __init__.pyi).

I am okay on the solution for importlib.resources, but please put in a comment explaining that the entire module is not present before 3.7 but we can't express this easily.

@emmatyping emmatyping changed the title Remove old bad stubs, fix importlib.resources for mypy Fix importlib.resources for mypy May 15, 2018
@gvanrossum

Copy link
Copy Markdown
Member

Actually I take it back. It doesn't work with the Dropbox code base when I add __init__.pyi files. Just get rid of the selenium package.

@JelleZijlstra

Copy link
Copy Markdown
Member

Let's drop Selenium in a separate PR.

@JelleZijlstra
JelleZijlstra merged commit db9246b into python:master May 15, 2018
gwk pushed a commit to gwk/typeshed that referenced this pull request May 29, 2018
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants