Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
034d0aa2
Kaydet (Commit)
034d0aa2
authored
Haz 04, 2012
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #14711: os.stat_float_times() has been deprecated.
üst
e860404e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
os.rst
Doc/library/os.rst
+2
-0
test_os.py
Lib/test/test_os.py
+6
-2
NEWS
Misc/NEWS
+2
-0
posixmodule.c
Modules/posixmodule.c
+6
-2
No files found.
Doc/library/os.rst
Dosyayı görüntüle @
034d0aa2
...
...
@@ -2128,6 +2128,8 @@ Files and Directories
are processed, this application should turn the feature off until the library
has been corrected.
.. deprecated:: 3.3
.. function:: statvfs(path)
...
...
Lib/test/test_os.py
Dosyayı görüntüle @
034d0aa2
...
...
@@ -30,7 +30,9 @@ except ImportError:
threading
=
None
from
test.script_helper
import
assert_python_ok
os
.
stat_float_times
(
True
)
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"ignore"
,
DeprecationWarning
)
os
.
stat_float_times
(
True
)
st
=
os
.
stat
(
__file__
)
stat_supports_subsecond
=
(
# check if float and int timestamps are different
...
...
@@ -388,7 +390,9 @@ class StatAttributeTests(unittest.TestCase):
filename
=
self
.
fname
os
.
utime
(
filename
,
(
0
,
0
))
set_time_func
(
filename
,
atime
,
mtime
)
os
.
stat_float_times
(
True
)
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"ignore"
,
DeprecationWarning
)
os
.
stat_float_times
(
True
)
st
=
os
.
stat
(
filename
)
self
.
assertAlmostEqual
(
st
.
st_atime
,
atime
,
places
=
3
)
self
.
assertAlmostEqual
(
st
.
st_mtime
,
mtime
,
places
=
3
)
...
...
Misc/NEWS
Dosyayı görüntüle @
034d0aa2
...
...
@@ -15,6 +15,8 @@ Core and Builtins
Library
-------
-
Issue
#
14711
:
os
.
stat_float_times
()
has
been
deprecated
.
-
LZMAFile
now
accepts
the
modes
"rb"
/
"wb"
/
"ab"
as
synonyms
of
"r"
/
"w"
/
"a"
.
-
The
bz2
and
lzma
modules
now
each
contain
an
open
()
function
,
allowing
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
034d0aa2
...
...
@@ -1721,6 +1721,10 @@ stat_float_times(PyObject* self, PyObject *args)
int
newval
=
-
1
;
if
(
!
PyArg_ParseTuple
(
args
,
"|i:stat_float_times"
,
&
newval
))
return
NULL
;
if
(
PyErr_WarnEx
(
PyExc_DeprecationWarning
,
"stat_float_times() is deprecated"
,
1
))
return
NULL
;
if
(
newval
==
-
1
)
/* Return old value */
return
PyBool_FromLong
(
_stat_float_times
);
...
...
@@ -3605,7 +3609,7 @@ typedef struct {
PyObject
*
args
;
PyObject
*
kwargs
;
/* input/output */
/* input/output */
PyObject
**
path
;
/* output only */
...
...
@@ -3655,7 +3659,7 @@ typedef struct {
timet[1] = ua.mtime_s
/*
/*
* utime_read_time_arguments() processes arguments for the utime
* family of functions.
*/
...
...
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