Skip to content

[YUNIKORN-3327] Replace deprecated distutils with shutil in release script - #233

Closed
PoiBlackTea wants to merge 1 commit into
apache:masterfrom
PoiBlackTea:YUNIKORN-3327
Closed

PoiBlackTea wants to merge 1 commit into
apache:masterfrom
PoiBlackTea:YUNIKORN-3327

Conversation

@PoiBlackTea

Copy link
Copy Markdown
Contributor

Description

The distutils package is deprecated (PEP 632) and completely removed in Python 3.12.
This updates release-tools/build-release.py to use the standard library shutil.copytree instead of distutils.dir_util.copy_tree, ensuring compatibility with modern Python environments.

Type of change

Please delete options that are not relevant.

  • Bug Fix
  • Improvement
  • Feature
  • Refactoring
  • Documentation

Jira issue

Jira ID : https://issues.apache.org/jira/browse/YUNIKORN-3327

  • I have created a Jira issue for this pull request.
  • The Jira ID is part of the title of this pull request.

AI Tooling

If an AI tool was used:

  • The PR includes the phrase "Generated by Antigravity IDE", where Antigravity IDE is the name of the AI tool used.
  • My use of AI contributions follows the ASF legal policy.

Check https://www.apache.org/legal/generative-tooling.html for details.

How has this been tested?

Can be verified across different Python versions using uv (ensure build/staging is removed first):
Python 3.12 (Verify fix & compatibility):

uv run --python 3.12 --with GitPython python release-tools/build-release.py

Python 3.10 (Verify warnings are resolved):

SETUPTOOLS_USE_DISTUTILS=stdlib uv run --python 3.10 --with GitPython python -W default release-tools/build-release.py

Questions:

  • The change needs documentation, a pull request for apache/yunikorn-site repository will be created.
  • There is breaking changes for older versions: jira is tagged with release-notes label.
  • The licenses files needs to be updated.

Screenshots or other details

N/A

…cript

The distutils package is deprecated (PEP 632) and completely removed in Python 3.12.
This updates release-tools/build-release.py to use the standard library shutil.copytree instead of distutils.dir_util.copy_tree , ensuring compatibility with modern Python environments.
@PoiBlackTea

Copy link
Copy Markdown
Contributor Author

Hi @wilfred-s @manirajv06
Could you please help review this PR? Thanks

@manirajv06 manirajv06 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

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.

3 participants