Skip to content

Conversation

@hlky
Copy link
Contributor

@hlky hlky commented Apr 9, 2025

What does this PR do?

Allows tests using tempfile.TemporaryDirectory to run on Windows, the parameter was introduced in 3.10 so we include our own TemporaryDirectory based on the 3.10 version.

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@hlky
Copy link
Contributor Author

hlky commented Apr 9, 2025

@bot /style

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2025

Style fixes have been applied. View the workflow run here.

@hlky hlky requested review from DN6 and sayakpaul April 9, 2025 09:44
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Should be good to go! My only concern is that since we have Python 3.8 as the minimum and ignore_cleanup_errors was introduced in 3.10 -- would the changes under src/diffusers be concerning?

GenericAlias = List[int]


class TemporaryDirectory:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sayakpaul See here. This is the 3.10 version of TemporaryDirectory with a few changes for 3.8 support. We are using this over tempfile.TemporaryDirectory

@hlky hlky closed this Apr 15, 2025
@hlky hlky deleted the tempfile-tmpdir-windows branch April 15, 2025 09:13
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