Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import redis.connection.BaseParser instead of from untyped module #2073

Closed
wants to merge 1 commit into from

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Apr 17, 2024

I was getting errors when running stubtest locally:

➤ bash ./scripts/stubtest.sh
error: not checking stubs due to mypy build errors:
django-stubs/core/cache/backends/redis.pyi:7: error: Library stubs not installed for "redis._parsers"  [import-untyped]
django-stubs/core/cache/backends/redis.pyi:7: note: Hint: "python3 -m pip install types-redis"
django-stubs/core/cache/backends/redis.pyi:7: note: (or run "mypy --install-types" to install all missing stub packages)
django-stubs/core/cache/backends/redis.pyi:7: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

Not sure if it could be related to the new release of types-redis from ~12h ago: https://pypi.org/project/types-redis/4.6.0.20240417/

Though I'm finding the DefaultParser / BaseParser from redis declared at:

And I think that aligns with Django's runtime usage, found here:

@flaeppe
Copy link
Member Author

flaeppe commented Apr 17, 2024

Nvm this, just figured out we shouldn't use types-redis from this #1948 (comment)

@flaeppe flaeppe closed this Apr 17, 2024
@flaeppe flaeppe deleted the fix/stubtest-redis branch July 30, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant