-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
[BugFix] Fix Python 3.9 Support #23306
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
The pipe operator `|` only supports being used in place of union in Python 3.10 and newer. So this switches the file to use the python 3.9 supported method. Signed-off-by: Jared O'Connell <46976761+jaredoconnell@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.
Code Review
This pull request correctly fixes a Python 3.9 compatibility issue by replacing the | type-hinting operator with typing.Union. The change is accurate, minimal, and resolves the TypeError as described. I approve of this change. To be thorough, a repository-wide check for other instances of the | operator would be beneficial to ensure full Python 3.9 support.
njhill
left a comment
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.
Thanks @jaredoconnell
DarkLight1337
left a comment
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.
One small nit, otherwise LGTM, thanks for fixing!
Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Signed-off-by: Duncan Moss <djm.moss@gmail.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Signed-off-by: Xiao Yu <xiao.yu@amd.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Signed-off-by: Jared O'Connell <46976761+jaredoconnell@users.noreply.github.com> Signed-off-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
Purpose
The purpose of this PR is to fix a change introduced in #22534
That PR used the pipe operator
|, which only supports being used in place of union in Python 3.10 and newer. So this switches the file to use the python 3.9 supported method.There was no indication that Python 3.9 was officially dropped, and the documentation still lists 3.9 as the minimum version, so this PR makes the code reflect that.
Here is the error that happens if you run the latest release on Python 3.9:
Test Plan
Since this is a two-line bug fix, the plan was to run it locally.
Test Result
With this change I was successfully able to run vLLM with Python 3.9.
(Optional) Documentation Update
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.