Carey Metcalfe
78e70be331
gh-70363: Implement `io.IOBase` interface for `SpooledTemporaryFile` (GH-29560)
...
Since the underlying file-like objects (either `io.BytesIO`,
or a true file object) all implement the `io.IOBase`
interface, the `SpooledTemporaryFile` should as well.
Additionally, since the underlying file object will either be an
instance of an `io.BufferedIOBase` (for binary mode) or an
`io.TextIOBase` (for text mode), methods for these classes were also
implemented.
In every case, the required methods and properties are simply delegated
to the underlying file object.
Co-authored-by: Gary Fernie <Gary.Fernie@skyscanner.net>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-05-03 21:18:18 +09:00
slateny
624e3986fb
Correctly document class instead of function (GH-32016)
2022-03-23 14:39:07 +00:00
slateny
53ecf9e08d
bpo-34429: Noted TemporaryFile behavior on non-Posix/non-Cygwin systems (GH-31547)
2022-02-25 11:07:52 +00:00
Anthony Shaw
c5c5326d47
bpo-39498 Start linking the security warnings in the stdlib modules (GH-18272)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-10 00:35:51 +02:00
Catherine Devlin
b3ab4344d1
bpo-4928: Document NamedTemporaryFile non-deletion after SIGKILL ( #26198 )
...
* bpo-4928 Document NamedTemporaryFile non-deletion after SIGKILL
* 📜 🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2021-05-19 10:21:03 -04:00
Gregory P. Smith
e05a703848
bpo-40701: doc typo historcal -> historical (GH-25334)
2021-04-10 10:55:14 -07:00
CAM Gerlach
bd2fa3c416
bpo-29982: Add "ignore_cleanup_errors" param to tempfile.TemporaryDirectory() (GH-24793)
2021-03-14 11:06:56 -07:00
Eric L
9c7927400c
bpo-40701: tempfile mixes str and bytes in an inconsistent manner (GH-20442)
...
The case of tempfile.tempdir variable being bytes is now handled consistently.
The getters return the right type and no more error of mixing str and bytes unless explicitly caused by the user.
Adds a regression test.
Expands the documentation to clarify the behavior.
Co-authored-by: Eric L <ewl+git@lavar.de>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-03-03 12:36:22 -08:00
Sergey Fedoseev
b48389d950
bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* functions (GH-21763)
...
`None` doesn't work:
```python
>>> import tempfile
>>> tempfile.TemporaryFile(buffering=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sergey/tmp/cpython-dev/Lib/tempfile.py", line 607, in TemporaryFile
return _io.open(fd, mode, buffering=buffering,
TypeError: 'NoneType' object cannot be interpreted as an integer
```
Automerge-Triggered-By: @vsajip
2020-09-13 10:59:01 -07:00
Rishav Kundu
e55de68be3
bpo-41410: Fix outdated info in mkstemp docs (GH-21701)
...
Automerge-Triggered-By: @ericvsmith
2020-08-13 18:33:14 -07:00
Inada Naoki
ea9835c5d1
bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)
...
SpooledTemporaryFile.rollback() might cause data corruption
when it is in text mode.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
2019-11-27 22:22:06 +09:00
Anthony Sottile
370138ba9c
bpo-35803: Document and test dir=PathLike for tempfile (GH-11644)
...
Co-Authored-By: Ammar Askar <ammar_askar@hotmail.com>
2019-09-09 10:54:34 -05:00
Steve Dower
44f91c388a
bpo-37390: Add audit event table to documentations (GH-14406)
...
Also updates some (unreleased) event names to be consistent with the others.
2019-06-27 10:47:59 -07:00
Steve Dower
60419a7e96
bpo-37363: Add audit events for a range of modules (GH-14301)
2019-06-24 08:42:54 -07:00
Serhiy Storchaka
2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)
2018-12-19 08:09:46 +02:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
940ae60856
Clarified the tempfile.tempdir documentation (GH-7829)
2018-06-21 03:52:43 -04:00
sth
825aab95fd
bpo-27300: Add the errors parameter to tempfile classes. (GH-6696)
2018-05-23 08:07:01 +03:00
Jelle Zijlstra
d3b8f98696
tempfile.rst: Fix some typos (GH-610)
2017-03-11 09:34:55 -08:00
Terry Jan Reedy
fa089b9b0b
Issue #22558 : Add remaining doc links to source code for Python-coded modules.
...
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Martin Panter
8f26565ba9
Fix spelling (inital), grammar (may translates) in documentation, comments
2016-04-19 04:03:41 +00:00
Martin Panter
1f0e1f3cbb
Issue #26261 : Clarify NamedTemporaryFile name attribute vs file.name
2016-02-22 10:10:00 +00:00
Martin Panter
9b566c324d
Issue #25064 : Adjust documentation according to new mkstemp signature
...
The mkstemp() and mkdtemp() signatures have already been updated, but the
higher-level functions still suggest that the default values are forced to
text strings. Also merged some paragraphs describing the "suffix" and
"prefix" parameters, and pointed out that mktemp() does not support the new
changes.
2015-11-07 00:32:50 +00:00
Martin Panter
2eb819f7a8
Issue #25523 : Merge "a" to "an" fixes from 3.4 into 3.5
2015-11-02 04:04:57 +00:00
Martin Panter
7462b64911
Issue #25523 : Correct "a" article to "an" article
...
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
2015-11-02 03:37:02 +00:00
Robert Collins
2ebdc13d11
Issue #23725 : Overhaul tempfile docs.
...
Patch from Zbigniew Jędrzejewski-Szmek.
2015-08-13 11:38:02 +12:00
Gregory P. Smith
ad577b938b
Issue 24230: The tempfile module now accepts bytes for prefix, suffix and dir
...
parameters and returns bytes in such situations (matching the os module APIs).
2015-05-22 16:18:14 -07:00
Georg Brandl
e21a531ef1
merge with 3.4
2014-10-31 10:39:29 +01:00
Georg Brandl
8ed75cd8e9
#22613 : minor other fixes in library docs (thanks Jacques Ducasse)
2014-10-31 10:25:48 +01:00
Victor Stinner
d967fc9da2
Issue #21515 : tempfile.TemporaryFile now uses os.O_TMPFILE flag is available
2014-06-05 14:27:45 +02:00
R David Murray
23686074b0
#14515 : clarify that TemporaryDirectory's __enter__ returns the name.
2014-02-05 14:53:40 -05:00
Serhiy Storchaka
e79be877df
Issue #18743 : Fix references to non-existant "StringIO" module.
2013-08-17 00:09:55 +03:00
Ezio Melotti
5c72b3f067
#17271 : merge with 3.2.
2013-02-22 08:29:11 +02:00
Ezio Melotti
ad17bc0bf9
#17271 : update example in tempfile docs.
2013-02-22 08:28:14 +02:00
Serhiy Storchaka
19a5214da4
Minor fix of previous commit.
2013-02-09 11:51:48 +02:00
Serhiy Storchaka
4b109cb4a8
Minor fix of previous commit.
2013-02-09 11:51:21 +02:00
Serhiy Storchaka
23a6726bc8
Issue #17147 . Mention BytesIO in SpooledTemporaryFile documentation.
2013-02-09 11:47:20 +02:00
Serhiy Storchaka
4f169a7a4d
Issue #17147 . Mention BytesIO in SpooledTemporaryFile documentation.
2013-02-09 11:46:42 +02:00
R David Murray
ca76ea16ad
#9957 : document that SpooledTemporaryFile.truncate now accepts a size arg
2012-10-06 18:32:39 -04:00
R David Murray
138a314d1a
#9957 : document that SpooledTemporaryFile.truncate does not take size arg
2012-10-06 18:26:56 -04:00
Senthil Kumaran
276a58b821
Merge from 3.2 . Replace the term members with correct and appropriate terminology. Initial patch by Adam Woodbeck.
2011-07-04 11:31:53 -07:00
Senthil Kumaran
a6bac95a3c
issue10403 - Let's not use members anymore. Use 'attribute' where it denotes attribute and 'methods' where it denotes methods. Context should clarify usage.
2011-07-04 11:28:30 -07:00
R David Murray
3a420c752d
#10354 : remove last public mentions of 'template' and comment as private.
...
I didn't rename the variable because I can see no good reason
to break backward compatibility just to put an underscore in
the name.
2011-06-22 21:01:13 -04:00
Ross Lagerwall
810b94a364
Issue #11818 : Fix tempfile examples for Python 3.
2011-04-10 09:30:04 +02:00
Raymond Hettinger
a199368b23
More source links.
2011-01-27 01:20:32 +00:00
Nick Coghlan
543af75961
Issue 5178: Add tempfile.TemporaryDirectory (original patch by Neil Schemenauer)
2010-10-24 11:23:25 +00:00
Antoine Pitrou
11cb961b38
Add cross-references to the glossary entry for file objects.
2010-09-15 11:11:28 +00:00
Georg Brandl
14dfede13b
Fix signatures for the various TemporaryFile class^Wfunctions.
2010-05-21 21:12:07 +00:00
Georg Brandl
7f01a13e7c
Last round of adapting style of documenting argument default values.
2009-09-16 15:58:14 +00:00
Georg Brandl
502d9a5c2c
Merged revisions 74207 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74207 | georg.brandl | 2009-07-26 16:19:57 +0200 (So, 26 Jul 2009) | 1 line
#6577 : fix (hopefully) all links to builtin instead of module/class-specific objects.
........
2009-07-26 15:02:41 +00:00
Georg Brandl
36ab1ef8ee
Merged revisions 68219 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix uses of the default role.
........
2009-01-03 21:17:04 +00:00