Skip to content

uWSGI: Use a TypeVarTuple in uwsgidecorators.thread #11128

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Daverball
Copy link
Contributor

@Daverball Daverball commented Dec 9, 2023

This addresses one of the FIXME comments (and a stubtest_allowlist entry) in types-uWSGI


Deferral reason: google/pytype#1525

This comment has been minimized.

@Daverball
Copy link
Contributor Author

Looks like pytype isn't happy with the use of a TypeVarTuple in a generic class yet.

@AlexWaygood AlexWaygood added the status: deferred Issue or PR deferred until some precondition is fixed label Dec 9, 2023
@JelleZijlstra
Copy link
Member

Is there a pytype issue we can refer to that tracks the necessary support?

This comment has been minimized.

@AlexWaygood
Copy link
Member

AlexWaygood commented Feb 17, 2024

Is there a pytype issue we can refer to that tracks the necessary support?

The issue is that pytype doesn't yet support classes being generic over Unpack[Ts]. I don't think pytype has a more specific issue for that than google/pytype#1525.

When we use Unpack[Ts] for a parameter annotation, pytype just falls back to Any, but it doesn't yet do that if a class is generic over Unpack[Ts]. I can think of reasons why that might be a little harder to do, but I don't know that it actually is harder.

@Daverball
Copy link
Contributor Author

Daverball commented Feb 17, 2024

The reason it's harder is that the generic now needs to be able to accept multiple values instead of just one, as well as some of the other special rules, such as not requiring redundant brackets. So I can see why there is maybe no easy way to add partial support for it, except for maybe the most simple case, where a generic accepts a single TypeVarTuple and nothing else, re-using the tuple logic 1:1.

This comment has been minimized.

This comment has been minimized.

@Avasam
Copy link
Collaborator

Avasam commented Jul 30, 2025

We have removed support for pytype, so I'll also remove the deferred status

@Avasam Avasam removed the status: deferred Issue or PR deferred until some precondition is fixed label Jul 30, 2025
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy