Skip to content

Make update_deps.py compatible with Python 3.9 #1253

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
Apr 10, 2025

Conversation

yukawa
Copy link
Collaborator

@yukawa yukawa commented Apr 7, 2025

Description

This follows up to my previous commit (837d4da), where update_deps.py is updated to also deploy MSYS2 for Windows to automate build environment setup for Windows.

The issue is that the above commit introduced the dependency on onexc parameter in shutil.rmtree, which is only available in Python 3.12 and later, while we still would like to support Python 3.9.6 that is installed as part of Xcode Command Line Tools.

To make update_deps.py compatible with Python 3.9.6 again, let's use onexc when and only when it is actually available.

Issue IDs

Steps to test new behaviors (if any)

  • OS: macOS Sequoia 15.4
  • Steps:
    1. Confirm python3 build_tools/update_deps.py succeeds.

This follows up to my previous commit [1], where 'update_deps.py' is
updated to also deploy MSYS2 for Windows to automate build environment
setup for Windows (google#1079).

The issue is that the above commit introduced the dependency on 'onexc'
parameter in 'shutil.rmtree', which is only available in Python 3.12 and
later, while we still would like to support Python 3.9.6 that is
installed as part of Xcode Command Line Tools.

To make 'update_deps.py' compatible with Python 3.9.6 again, let's use
'onexc' when and only when it is actually available.

 [1]: 837d4da
@hiroyuki-komatsu hiroyuki-komatsu merged commit c17035a into google:master Apr 10, 2025
1 check passed
@hiroyuki-komatsu
Copy link
Collaborator

We have merged your PR.
Thank you for the contribution!

@yukawa yukawa deleted the optional_onexc branch April 10, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants