Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
dd766d53
Commit
dd766d53
authored
Aug 05, 2007
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move tempfile over to the io module. Makes test_threaded_import pass.
Thanks Paul Colomiets.
parent
9c121069
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Lib/tempfile.py
Lib/tempfile.py
+3
-3
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Lib/tempfile.py
View file @
dd766d53
...
@@ -197,7 +197,7 @@ def _get_default_tempdir():
...
@@ -197,7 +197,7 @@ def _get_default_tempdir():
filename
=
_os
.
path
.
join
(
dir
,
name
)
filename
=
_os
.
path
.
join
(
dir
,
name
)
try
:
try
:
fd
=
_os
.
open
(
filename
,
flags
,
0o600
)
fd
=
_os
.
open
(
filename
,
flags
,
0o600
)
fp
=
_
os
.
fd
open
(
fd
,
'w'
)
fp
=
_
io
.
open
(
fd
,
'w'
)
fp
.
write
(
'blat'
)
fp
.
write
(
'blat'
)
fp
.
close
()
fp
.
close
()
_os
.
unlink
(
filename
)
_os
.
unlink
(
filename
)
...
@@ -438,7 +438,7 @@ def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",
...
@@ -438,7 +438,7 @@ def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",
flags
|=
_os
.
O_TEMPORARY
flags
|=
_os
.
O_TEMPORARY
(
fd
,
name
)
=
_mkstemp_inner
(
dir
,
prefix
,
suffix
,
flags
)
(
fd
,
name
)
=
_mkstemp_inner
(
dir
,
prefix
,
suffix
,
flags
)
file
=
_
os
.
fd
open
(
fd
,
mode
,
bufsize
)
file
=
_
io
.
open
(
fd
,
mode
,
bufsize
)
return
_TemporaryFileWrapper
(
file
,
name
,
delete
)
return
_TemporaryFileWrapper
(
file
,
name
,
delete
)
if
_os
.
name
!=
'posix'
or
_os
.
sys
.
platform
==
'cygwin'
:
if
_os
.
name
!=
'posix'
or
_os
.
sys
.
platform
==
'cygwin'
:
...
@@ -471,7 +471,7 @@ else:
...
@@ -471,7 +471,7 @@ else:
(
fd
,
name
)
=
_mkstemp_inner
(
dir
,
prefix
,
suffix
,
flags
)
(
fd
,
name
)
=
_mkstemp_inner
(
dir
,
prefix
,
suffix
,
flags
)
try
:
try
:
_os
.
unlink
(
name
)
_os
.
unlink
(
name
)
return
_
os
.
fd
open
(
fd
,
mode
,
bufsize
)
return
_
io
.
open
(
fd
,
mode
,
bufsize
)
except
:
except
:
_os
.
close
(
fd
)
_os
.
close
(
fd
)
raise
raise
...
...
Misc/ACKS
View file @
dd766d53
...
@@ -134,6 +134,7 @@ Josh Cogliati
...
@@ -134,6 +134,7 @@ Josh Cogliati
Dave Cole
Dave Cole
Benjamin Collar
Benjamin Collar
Jeffery Collins
Jeffery Collins
Paul Colomiets
Matt Conway
Matt Conway
David M. Cooke
David M. Cooke
Greg Copeland
Greg Copeland
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment