Skip to content

fix: enforce python version #1345

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

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

leseb
Copy link
Contributor

@leseb leseb commented Nov 6, 2024

4246c57 fix: enforce python version

commit 4246c57
Author: Sébastien Han seb@redhat.com
Date: Wed Nov 6 10:30:24 2024 +0100

fix: enforce python version

The previous Python version check was incorrect, allowing installations
on unsupported interpreter versions, which caused installation failures.
Additionally, we now respect the specified interpreter version if
provided, consistently using it throughout the installation process by
enforcing it with pip.

Signed-off-by: Sébastien Han <seb@redhat.com>

Copy link

pytorch-bot bot commented Nov 6, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1345

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 4246c57 with merge base e30aaa0 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link

Hi @leseb!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@leseb
Copy link
Contributor Author

leseb commented Nov 6, 2024

CLA is in-progress.

@leseb leseb force-pushed the enforce-python3.10 branch 2 times, most recently from e03ae74 to a2fee7b Compare November 6, 2024 09:54
Copy link
Contributor

@Jack-Khuu Jack-Khuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the fixes @leseb

@Jack-Khuu
Copy link
Contributor

Jack-Khuu commented Nov 6, 2024

Looks like there's some updates required from the CI side, able to take a look?

"Python version must be 3.10.x or 3.11.x. Detected version: 3.11"

@Jack-Khuu Jack-Khuu added the bug Something isn't working label Nov 6, 2024
@leseb
Copy link
Contributor Author

leseb commented Nov 7, 2024

Looks like there's some updates required from the CI side, able to take a look?

"Python version must be 3.10.x or 3.11.x. Detected version: 3.11"

Certainly!

@leseb leseb force-pushed the enforce-python3.10 branch from a2fee7b to 01b73c3 Compare November 7, 2024 09:19
@leseb leseb requested a review from Jack-Khuu November 7, 2024 09:19
Copy link
Contributor

@Jack-Khuu Jack-Khuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the changes; I'm debugging the upstream CI issue

Will force merge if it's a non trivial fix

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 12, 2024
The previous Python version check was incorrect, allowing installations
on unsupported interpreter versions, which caused installation failures.
Additionally, we now respect the specified interpreter version if
provided, consistently using it throughout the installation process by
enforcing it with pip.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb leseb force-pushed the enforce-python3.10 branch from 01b73c3 to 4246c57 Compare November 12, 2024 14:43
@Jack-Khuu Jack-Khuu merged commit 2fcc37c into pytorch:main Nov 12, 2024
52 checks passed
if [[ $? -ne 0 ]]
if ! $PYTHON_EXECUTABLE -c "
import sys
if sys.version_info < (3, 10) or sys.version_info >= (3, 12):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's wrong with 3.12? that seems to be what I have on my Mac and I don't think I've updated recently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was based on the existing comments (which we just happen to not enforce)

That said, let's open up 3.12 since that's been looking fine to me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I get for reviewing code after 1AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t see any issues with 3.12. The main question is less about whether it works on 3.12 and more about which version the project currently aims to support. Opened a followup PR to address this.

@leseb leseb deleted the enforce-python3.10 branch November 13, 2024 08:58
vmpuri pushed a commit that referenced this pull request Feb 4, 2025
The previous Python version check was incorrect, allowing installations
on unsupported interpreter versions, which caused installation failures.
Additionally, we now respect the specified interpreter version if
provided, consistently using it throughout the installation process by
enforcing it with pip.

Signed-off-by: Sébastien Han <seb@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants