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

Start using types-WebOb #2226

Closed
Daverball opened this issue Jul 4, 2023 · 2 comments · Fixed by #3122
Closed

Start using types-WebOb #2226

Daverball opened this issue Jul 4, 2023 · 2 comments · Fixed by #3122
Labels
Enhancement New feature or request

Comments

@Daverball
Copy link
Contributor

Problem Statement

I've recently contributed type stubs for WebOb on typeshed, which have been merged and are now available to the public. Some of the Integrations refer to types defined in WebOb (e.g. PyramidIntegration), but don't yet make use of types-WebOb and as such are really operating on Any.

Solution Brainstorm

Install types-WebOb and fix any uncovered typing issues.

As a side note, I've noticed that sometimes you use dict[str, str] as the type annotation for environ, even though that is inaccurate. You should use _typeshed.wsgi.WSGIEnvironment which is currently an alias for dict[str, Any] but will ensure that your type hints for environ will remain consistent with the stdlib and any third party stubs managed through typeshed in the future.

The same goes for WSGIApplication and StartResponse defined within that module.

@antonpirker
Copy link
Member

Hey @Daverball

Thanks for writing in, sounds like a good think. (In general for our typing there is still lots of room for improvement.)
I put this on our backlog but not at a high priority, because we have lots of other things we want to do before.

@szokeasaurusrex
Copy link
Member

Hi @Daverball, if you would like to implement this, feel free to submit a PR. We are closing for now since we do not plan to implement this ourselves

@szokeasaurusrex szokeasaurusrex closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
Daverball added a commit to Daverball/sentry-python that referenced this issue Jun 3, 2024
Adds `types-webob`, `types-greenlet` and `types-gevent` to linter
requirements and fixes newly exposed typing issues.

Fixes getsentryGH-2226
Daverball added a commit to Daverball/sentry-python that referenced this issue Jun 4, 2024
Adds `types-webob`, `types-greenlet` and `types-gevent` to linter
requirements and fixes newly exposed typing issues.

Fixes getsentryGH-2226
@sentrivana sentrivana reopened this Jun 5, 2024
Daverball added a commit to Daverball/sentry-python that referenced this issue Jun 6, 2024
Adds `types-webob`, `types-greenlet` and `types-gevent` to linter
requirements and fixes newly exposed typing issues.

Fixes getsentryGH-2226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants