Skip to main content

Backport of Python 3.12's tempfile library for Python 3.8+

Project description

tempfile312

Backport of Python 3.12's tempfile library for older Python versions. Notably, supports the delete_on_close parameter to NamedTemporaryFile to make it useful on Windows.

See official documentation here: https://docs.python.org/3.12/library/tempfile.html.

Major changes from Python 3.8:

  • Added delete_on_close parameter to NamedTemporaryFile
  • Added ignore_cleanup_errors and delete parameters to TemporaryDirectory
  • gettempdir() always returns a str. Previously it would return any tempdir value regardless of type so long as it was not None.
  • SpooledTemporaryFile fully implements the io.BufferedIOBase and io.TextIOBase abstract base classes (depending on whether binary or text mode was specified).
  • mkdtemp() now always returns an absolute path, even if dir is relative.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tempfile312-1.0.0.tar.gz (33.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tempfile312-1.0.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file tempfile312-1.0.0.tar.gz.

File metadata

  • Download URL: tempfile312-1.0.0.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.18

File hashes

Hashes for tempfile312-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fc777b783e5bf5076e089536d9586859851d7ca3fcf169e1fbee33de186b2a2c
MD5 a48f6edf631adeb56720d15a0b49f079
BLAKE2b-256 8b5f3470bfcb6fa5b8fc3a70327c9ddec951eadc0afcfdd3a371a5a06f8961a6

See more details on using hashes here.

File details

Details for the file tempfile312-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tempfile312-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.18

File hashes

Hashes for tempfile312-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc3d329ff443bf3e5dedd96d113ebafee1a0661693a5fc04e2358c344fba1520
MD5 a03ba8e8e079e132069424434ce53258
BLAKE2b-256 ac8545e18fe8624ed8414dac00a6a1350ee5254a535548f43b932c614d54a4cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page