Skip to content
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

google-cloud-sdk: python3 -> python311 #357355

Closed
wants to merge 1 commit into from

Conversation

kraem
Copy link
Member

@kraem kraem commented Nov 19, 2024

pin the python version to 3.11 as the latest google-cloud-sdk bump broke gsutil with:

Error: gsutil requires Python version 2.7 or 3.5-3.11, but a different version is installed.
You are currently running Python 3.12
Follow the steps below to resolve this issue:
        1. Switch to Python 3.5-3.11 using your Python version manager or install an appropriate version.
        2. If you are unsure how to manage Python versions, visit [https://cloud.google.com/storage/docs/gsutil_install#specifications] for detailed instructions.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Let's update to at least 500.0.0 instead, which even supports Python 3.13: https://cloud.google.com/sdk/docs/release-notes

@terlar
Copy link
Contributor

terlar commented Nov 20, 2024

Well, I did that the other day:
#356927

And we still get this error it seems.

@terlar
Copy link
Contributor

terlar commented Nov 20, 2024

Seems gsutil still don't support python 3.12:
https://github.com/GoogleCloudPlatform/gsutil/blob/master/gsutil.py

@marcusramberg
Copy link
Contributor

I'm wondering if this check is actually faulty GoogleCloudPlatform/gsutil#1808 - Maybe we can patch out the check in gustily.py instead of reverting the sdk to an older python?

@terlar
Copy link
Contributor

terlar commented Nov 20, 2024

Seems we should be able to patch it out:
GoogleCloudPlatform/gsutil#1797 (comment)

In the meantime while waiting for their update to fully support 3.12.

It has not been less supported than now before the version check and I guess 3.12 has been used for a while...

@kraem
Copy link
Member Author

kraem commented Nov 20, 2024

nice find(s).

i'm not versed well enough with python to tell if it should run fine on python 3.12 or not. feel free to close this if/when you patch the version check out 👍

Copy link
Member

@fabianhjr fabianhjr left a comment

Choose a reason for hiding this comment

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

Might be better to do this then revert when upstream resolves python312 support for gsutil.

Could reproduce the issue and confirm this workaround on a workplace private repository.

@terlar terlar mentioned this pull request Nov 21, 2024
13 tasks
@wegank wegank added the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Nov 22, 2024
@fabianhjr
Copy link
Member

#358015

@fabianhjr fabianhjr closed this Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12.approvals: 2 This PR was reviewed and approved by two reputable people
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants