-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Update deprecated Python 3.8 typing #13971
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
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is not necessary. we should keep the compatibility if it does not hurt.
for example, if someone still uses a fork of vllm, and he sticks to python 3.8, this PR will make their rebase and update very painful.
Python 3.8 is effectively not supported anymore (even without this PR) as we now directly subscript builtins like |
I think it's fine to use new type annotation like |
We can selectively enforce this rule via https://docs.astral.sh/ruff/settings/#lint_per-file-ignores Perhaps we can start by applying this to V1 code? |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
I'm fine with applying it to new code, but I think changing thousands of lines as in this PR is not necessary. |
I don't think there is any harm in using the modern syntax throughout vLLM. I'm in favour of updating everything because then the whole repo is consistent and little consistencies like these add up to make the library more maintainable. |
Also, PyTorch has dropped Python 3.8 and we already use the modern syntax in some places. So as @DarkLight1337 said, we already do not support Python 3.8. |
For what is worth torch still appears to be using the old |
How's this? I have reverted everything inside
|
This pull request has merge conflicts that must be resolved before it can be |
This sounds good to me. Let's merge this over the weekend to avoid conflicts. |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Can you update this PR? |
Does it need rebasing? The last thing the bot did was remove the label. |
Yeah, GH says there are merge conflicts. |
Ok, I've updated |
Pre-commit is failing |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
The main change is in
pyproject.toml
, the rest is just fixing the pre-commit errors that creates.The following two rules have been enabled:
They have been enabled:
vllm/
directoryvllm/v1
andvllm/entrypoints
vllm/*.py