Skip to content

Update Rust crate tempfile to v3.20.0 #11154

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
May 12, 2025
Merged

Update Rust crate tempfile to v3.20.0 #11154

merged 1 commit into from
May 12, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 11, 2025

This PR contains the following updates:

Package Type Update Change
tempfile (source) dependencies minor =3.19.1 -> =3.20.0

Release Notes

Stebalien/tempfile (tempfile)

v3.20.0

Compare Source

This release mostly unifies the behavior/capabilities around "keeping" temporary files:

  • Rename Builder::keep(bool) (via deprecation) to Builder::disable_cleanup(bool) to make it clear that behaves differently from NamedTempFile::keep(). The former disables automatic cleanup while the latter consumes the NamedTempFile object entirely and unsets the "temporary file" attribute (on Windows).
  • Rename TempDir::into_path (via deprecation) to TempDir::keep to mirror NamedTempFile::keep.
  • Add TempDir::disable_cleanup, NamedTempFile::disable_cleanup, and TempPath::disable_cleanup making it possible to disable automatic cleanup in-place after creating a temporary file/directory (equivalent to calling Builder::disable_cleanup before creating the file/directory).

Additionally, it adds a few spooled temporary file features:

  • Add SpooledTempFile::into_file for turning a SpooledTempFile into a regular unnamed temporary file, writing it to the backing storage ("rolling" it) if it was still stored in-memory.
  • Add spooled_tempfile_in and SpooledTempFile::new_in methods for creating spooled temporary files in a specific directory. This makes it possible to choose the backing device for your spooled temporary file which is rather important on Linux where the default temporary directory is likely backed by memory (defeating the entire point of having a spooled temporary file).

Finally, this release improves documentation, especially the top-level documentation explaining which temporary file type to use.

BREAKING for those with deny(warnings):

  • Builder::keep deprecated in favor of Builder::disable_cleanup.
  • TempDir::into_path is deprecated in favor of TempDir::keep.

BREAKING:


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@Turbo87 Turbo87 merged commit ade81a5 into main May 12, 2025
9 checks passed
@Turbo87 Turbo87 deleted the renovate/tempfile-3.x branch May 12, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant