-
-
Notifications
You must be signed in to change notification settings - Fork 228
Remove Python 3.8 support #1143
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
Conversation
# Conflicts: # pdm.lock
@dbanty I was curious about the need to translate
I think the generated client would be easier to use if we kept fields named Edit: Oh, I see you are using the If this really must be done, I'd personally advocate for using the old |
@johnthagen I may be off base but I think the issue may not be specifically the presence of a class attribute with that name, but instead, the fact that the generated If that is the issue... I think everyone would agree that moving away from that local-variable-naming scheme would be helpful, but it's non-trivial due to the way template macros are being used (at least in the case of |
@eli-bl is correct. The better solution would be to change the local variable naming, but it's a much bigger change. Sticking with
|
Yeah, Python supports shadowing at all levels, so locals will shadow built-ins within the scope they are declared. Shadowing typically makes this not a problem (otherwise lots of builtin names would need to be avoided). A trivial example: def main(a: type[int]) -> str:
type = str(a)
return type
print(main(int))
# prints: <class 'int'> |
Now that 3.8 is EoL, we can finally update to use 3.9's generic syntax!