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
d846f1d4
Kaydet (Commit)
d846f1d4
authored
May 08, 2009
tarafından
Philip Jenvey
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#4351: more appropriate DeprecationWarning stacklevels
üst
6f997785
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
16 deletions
+22
-16
cgi.py
Lib/cgi.py
+2
-2
commands.py
Lib/commands.py
+1
-1
gzip.py
Lib/gzip.py
+1
-1
macpath.py
Lib/macpath.py
+2
-1
ntpath.py
Lib/ntpath.py
+2
-1
plistlib.py
Lib/plistlib.py
+8
-7
posixpath.py
Lib/posixpath.py
+2
-1
tarfile.py
Lib/tarfile.py
+2
-1
xmllib.py
Lib/xmllib.py
+2
-1
No files found.
Lib/cgi.py
Dosyayı görüntüle @
d846f1d4
...
@@ -181,14 +181,14 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
...
@@ -181,14 +181,14 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
def
parse_qs
(
qs
,
keep_blank_values
=
0
,
strict_parsing
=
0
):
def
parse_qs
(
qs
,
keep_blank_values
=
0
,
strict_parsing
=
0
):
"""Parse a query given as a string argument."""
"""Parse a query given as a string argument."""
warn
(
"cgi.parse_qs is deprecated, use urlparse.parse_qs
\
warn
(
"cgi.parse_qs is deprecated, use urlparse.parse_qs
\
instead"
,
PendingDeprecationWarning
)
instead"
,
PendingDeprecationWarning
,
2
)
return
urlparse
.
parse_qs
(
qs
,
keep_blank_values
,
strict_parsing
)
return
urlparse
.
parse_qs
(
qs
,
keep_blank_values
,
strict_parsing
)
def
parse_qsl
(
qs
,
keep_blank_values
=
0
,
strict_parsing
=
0
):
def
parse_qsl
(
qs
,
keep_blank_values
=
0
,
strict_parsing
=
0
):
"""Parse a query given as a string argument."""
"""Parse a query given as a string argument."""
warn
(
"cgi.parse_qsl is deprecated, use urlparse.parse_qsl instead"
,
warn
(
"cgi.parse_qsl is deprecated, use urlparse.parse_qsl instead"
,
PendingDeprecationWarning
)
PendingDeprecationWarning
,
2
)
return
urlparse
.
parse_qsl
(
qs
,
keep_blank_values
,
strict_parsing
)
return
urlparse
.
parse_qsl
(
qs
,
keep_blank_values
,
strict_parsing
)
def
parse_multipart
(
fp
,
pdict
):
def
parse_multipart
(
fp
,
pdict
):
...
...
Lib/commands.py
Dosyayı görüntüle @
d846f1d4
...
@@ -37,7 +37,7 @@ __all__ = ["getstatusoutput","getoutput","getstatus"]
...
@@ -37,7 +37,7 @@ __all__ = ["getstatusoutput","getoutput","getstatus"]
def
getstatus
(
file
):
def
getstatus
(
file
):
"""Return output of "ls -ld <file>" in a string."""
"""Return output of "ls -ld <file>" in a string."""
import
warnings
import
warnings
warnings
.
warn
(
"commands.getstatus() is deprecated"
,
DeprecationWarning
)
warnings
.
warn
(
"commands.getstatus() is deprecated"
,
DeprecationWarning
,
2
)
return
getoutput
(
'ls -ld'
+
mkarg
(
file
))
return
getoutput
(
'ls -ld'
+
mkarg
(
file
))
...
...
Lib/gzip.py
Dosyayı görüntüle @
d846f1d4
...
@@ -124,7 +124,7 @@ class GzipFile:
...
@@ -124,7 +124,7 @@ class GzipFile:
@property
@property
def
filename
(
self
):
def
filename
(
self
):
import
warnings
import
warnings
warnings
.
warn
(
"use the name attribute"
,
DeprecationWarning
)
warnings
.
warn
(
"use the name attribute"
,
DeprecationWarning
,
2
)
if
self
.
mode
==
WRITE
and
self
.
name
[
-
3
:]
!=
".gz"
:
if
self
.
mode
==
WRITE
and
self
.
name
[
-
3
:]
!=
".gz"
:
return
self
.
name
+
".gz"
return
self
.
name
+
".gz"
return
self
.
name
return
self
.
name
...
...
Lib/macpath.py
Dosyayı görüntüle @
d846f1d4
...
@@ -170,7 +170,8 @@ def walk(top, func, arg):
...
@@ -170,7 +170,8 @@ def walk(top, func, arg):
beyond that arg is always passed to func. It can be used, e.g., to pass
beyond that arg is always passed to func. It can be used, e.g., to pass
a filename pattern, or a mutable object designed to accumulate
a filename pattern, or a mutable object designed to accumulate
statistics. Passing None for arg is common."""
statistics. Passing None for arg is common."""
warnings
.
warnpy3k
(
"In 3.x, os.path.walk is removed in favor of os.walk."
)
warnings
.
warnpy3k
(
"In 3.x, os.path.walk is removed in favor of os.walk."
,
stacklevel
=
2
)
try
:
try
:
names
=
os
.
listdir
(
top
)
names
=
os
.
listdir
(
top
)
except
os
.
error
:
except
os
.
error
:
...
...
Lib/ntpath.py
Dosyayı görüntüle @
d846f1d4
...
@@ -250,7 +250,8 @@ def walk(top, func, arg):
...
@@ -250,7 +250,8 @@ def walk(top, func, arg):
beyond that arg is always passed to func. It can be used, e.g., to pass
beyond that arg is always passed to func. It can be used, e.g., to pass
a filename pattern, or a mutable object designed to accumulate
a filename pattern, or a mutable object designed to accumulate
statistics. Passing None for arg is common."""
statistics. Passing None for arg is common."""
warnings
.
warnpy3k
(
"In 3.x, os.path.walk is removed in favor of os.walk."
)
warnings
.
warnpy3k
(
"In 3.x, os.path.walk is removed in favor of os.walk."
,
stacklevel
=
2
)
try
:
try
:
names
=
os
.
listdir
(
top
)
names
=
os
.
listdir
(
top
)
except
os
.
error
:
except
os
.
error
:
...
...
Lib/plistlib.py
Dosyayı görüntüle @
d846f1d4
...
@@ -114,7 +114,8 @@ def writePlistToString(rootObject):
...
@@ -114,7 +114,8 @@ def writePlistToString(rootObject):
def
readPlistFromResource
(
path
,
restype
=
'plst'
,
resid
=
0
):
def
readPlistFromResource
(
path
,
restype
=
'plst'
,
resid
=
0
):
"""Read plst resource from the resource fork of path.
"""Read plst resource from the resource fork of path.
"""
"""
warnings
.
warnpy3k
(
"In 3.x, readPlistFromResource is removed."
)
warnings
.
warnpy3k
(
"In 3.x, readPlistFromResource is removed."
,
stacklevel
=
2
)
from
Carbon.File
import
FSRef
,
FSGetResourceForkName
from
Carbon.File
import
FSRef
,
FSGetResourceForkName
from
Carbon.Files
import
fsRdPerm
from
Carbon.Files
import
fsRdPerm
from
Carbon
import
Res
from
Carbon
import
Res
...
@@ -129,7 +130,7 @@ def readPlistFromResource(path, restype='plst', resid=0):
...
@@ -129,7 +130,7 @@ def readPlistFromResource(path, restype='plst', resid=0):
def
writePlistToResource
(
rootObject
,
path
,
restype
=
'plst'
,
resid
=
0
):
def
writePlistToResource
(
rootObject
,
path
,
restype
=
'plst'
,
resid
=
0
):
"""Write 'rootObject' as a plst resource to the resource fork of path.
"""Write 'rootObject' as a plst resource to the resource fork of path.
"""
"""
warnings
.
warnpy3k
(
"In 3.x, writePlistToResource is removed."
)
warnings
.
warnpy3k
(
"In 3.x, writePlistToResource is removed."
,
stacklevel
=
2
)
from
Carbon.File
import
FSRef
,
FSGetResourceForkName
from
Carbon.File
import
FSRef
,
FSGetResourceForkName
from
Carbon.Files
import
fsRdWrPerm
from
Carbon.Files
import
fsRdWrPerm
from
Carbon
import
Res
from
Carbon
import
Res
...
@@ -300,13 +301,13 @@ class _InternalDict(dict):
...
@@ -300,13 +301,13 @@ class _InternalDict(dict):
raise
AttributeError
,
attr
raise
AttributeError
,
attr
from
warnings
import
warn
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
PendingDeprecationWarning
)
"notation instead"
,
PendingDeprecationWarning
,
2
)
return
value
return
value
def
__setattr__
(
self
,
attr
,
value
):
def
__setattr__
(
self
,
attr
,
value
):
from
warnings
import
warn
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
PendingDeprecationWarning
)
"notation instead"
,
PendingDeprecationWarning
,
2
)
self
[
attr
]
=
value
self
[
attr
]
=
value
def
__delattr__
(
self
,
attr
):
def
__delattr__
(
self
,
attr
):
...
@@ -316,14 +317,14 @@ class _InternalDict(dict):
...
@@ -316,14 +317,14 @@ class _InternalDict(dict):
raise
AttributeError
,
attr
raise
AttributeError
,
attr
from
warnings
import
warn
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
PendingDeprecationWarning
)
"notation instead"
,
PendingDeprecationWarning
,
2
)
class
Dict
(
_InternalDict
):
class
Dict
(
_InternalDict
):
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
from
warnings
import
warn
from
warnings
import
warn
warn
(
"The plistlib.Dict class is deprecated, use builtin dict instead"
,
warn
(
"The plistlib.Dict class is deprecated, use builtin dict instead"
,
PendingDeprecationWarning
)
PendingDeprecationWarning
,
2
)
super
(
Dict
,
self
)
.
__init__
(
**
kwargs
)
super
(
Dict
,
self
)
.
__init__
(
**
kwargs
)
...
@@ -336,7 +337,7 @@ class Plist(_InternalDict):
...
@@ -336,7 +337,7 @@ class Plist(_InternalDict):
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
from
warnings
import
warn
from
warnings
import
warn
warn
(
"The Plist class is deprecated, use the readPlist() and "
warn
(
"The Plist class is deprecated, use the readPlist() and "
"writePlist() functions instead"
,
PendingDeprecationWarning
)
"writePlist() functions instead"
,
PendingDeprecationWarning
,
2
)
super
(
Plist
,
self
)
.
__init__
(
**
kwargs
)
super
(
Plist
,
self
)
.
__init__
(
**
kwargs
)
def
fromFile
(
cls
,
pathOrFile
):
def
fromFile
(
cls
,
pathOrFile
):
...
...
Lib/posixpath.py
Dosyayı görüntüle @
d846f1d4
...
@@ -216,7 +216,8 @@ def walk(top, func, arg):
...
@@ -216,7 +216,8 @@ def walk(top, func, arg):
beyond that arg is always passed to func. It can be used, e.g., to pass
beyond that arg is always passed to func. It can be used, e.g., to pass
a filename pattern, or a mutable object designed to accumulate
a filename pattern, or a mutable object designed to accumulate
statistics. Passing None for arg is common."""
statistics. Passing None for arg is common."""
warnings
.
warnpy3k
(
"In 3.x, os.path.walk is removed in favor of os.walk."
)
warnings
.
warnpy3k
(
"In 3.x, os.path.walk is removed in favor of os.walk."
,
stacklevel
=
2
)
try
:
try
:
names
=
os
.
listdir
(
top
)
names
=
os
.
listdir
(
top
)
except
os
.
error
:
except
os
.
error
:
...
...
Lib/tarfile.py
Dosyayı görüntüle @
d846f1d4
...
@@ -1588,7 +1588,8 @@ class TarFile(object):
...
@@ -1588,7 +1588,8 @@ class TarFile(object):
return
self
.
format
==
USTAR_FORMAT
return
self
.
format
==
USTAR_FORMAT
def
_setposix
(
self
,
value
):
def
_setposix
(
self
,
value
):
import
warnings
import
warnings
warnings
.
warn
(
"use the format attribute instead"
,
DeprecationWarning
)
warnings
.
warn
(
"use the format attribute instead"
,
DeprecationWarning
,
2
)
if
value
:
if
value
:
self
.
format
=
USTAR_FORMAT
self
.
format
=
USTAR_FORMAT
else
:
else
:
...
...
Lib/xmllib.py
Dosyayı görüntüle @
d846f1d4
...
@@ -6,7 +6,8 @@ import re
...
@@ -6,7 +6,8 @@ import re
import
string
import
string
import
warnings
import
warnings
warnings
.
warn
(
"The xmllib module is obsolete. Use xml.sax instead."
,
DeprecationWarning
)
warnings
.
warn
(
"The xmllib module is obsolete. Use xml.sax instead."
,
DeprecationWarning
,
2
)
del
warnings
del
warnings
version
=
'0.3'
version
=
'0.3'
...
...
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