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
a394f2dc
Kaydet (Commit)
a394f2dc
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
e7d149ec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
cgi.py
Lib/cgi.py
+2
-2
gzip.py
Lib/gzip.py
+1
-1
plistlib.py
Lib/plistlib.py
+5
-5
string.py
Lib/string.py
+1
-1
No files found.
Lib/cgi.py
Dosyayı görüntüle @
a394f2dc
...
...
@@ -163,13 +163,13 @@ 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
):
"""Parse a query given as a string argument."""
warn
(
"cgi.parse_qs is deprecated, use urllib.parse.parse_qs instead"
,
DeprecationWarning
)
DeprecationWarning
,
2
)
return
urllib
.
parse
.
parse_qs
(
qs
,
keep_blank_values
,
strict_parsing
)
def
parse_qsl
(
qs
,
keep_blank_values
=
0
,
strict_parsing
=
0
):
"""Parse a query given as a string argument."""
warn
(
"cgi.parse_qsl is deprecated, use urllib.parse.parse_qsl instead"
,
DeprecationWarning
)
DeprecationWarning
,
2
)
return
urllib
.
parse
.
parse_qsl
(
qs
,
keep_blank_values
,
strict_parsing
)
def
parse_multipart
(
fp
,
pdict
):
...
...
Lib/gzip.py
Dosyayı görüntüle @
a394f2dc
...
...
@@ -136,7 +136,7 @@ class GzipFile:
@property
def
filename
(
self
):
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"
:
return
self
.
name
+
".gz"
return
self
.
name
...
...
Lib/plistlib.py
Dosyayı görüntüle @
a394f2dc
...
...
@@ -263,13 +263,13 @@ class _InternalDict(dict):
raise
AttributeError
(
attr
)
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
PendingDeprecationWarning
)
"notation instead"
,
PendingDeprecationWarning
,
2
)
return
value
def
__setattr__
(
self
,
attr
,
value
):
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
PendingDeprecationWarning
)
"notation instead"
,
PendingDeprecationWarning
,
2
)
self
[
attr
]
=
value
def
__delattr__
(
self
,
attr
):
...
...
@@ -279,14 +279,14 @@ class _InternalDict(dict):
raise
AttributeError
(
attr
)
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
PendingDeprecationWarning
)
"notation instead"
,
PendingDeprecationWarning
,
2
)
class
Dict
(
_InternalDict
):
def
__init__
(
self
,
**
kwargs
):
from
warnings
import
warn
warn
(
"The plistlib.Dict class is deprecated, use builtin dict instead"
,
PendingDeprecationWarning
)
PendingDeprecationWarning
,
2
)
super
()
.
__init__
(
**
kwargs
)
...
...
@@ -299,7 +299,7 @@ class Plist(_InternalDict):
def
__init__
(
self
,
**
kwargs
):
from
warnings
import
warn
warn
(
"The Plist class is deprecated, use the readPlist() and "
"writePlist() functions instead"
,
PendingDeprecationWarning
)
"writePlist() functions instead"
,
PendingDeprecationWarning
,
2
)
super
()
.
__init__
(
**
kwargs
)
def
fromFile
(
cls
,
pathOrFile
):
...
...
Lib/string.py
Dosyayı görüntüle @
a394f2dc
...
...
@@ -51,7 +51,7 @@ def maketrans(frm: bytes, to: bytes) -> bytes:
"""
import
warnings
warnings
.
warn
(
"string.maketrans is deprecated, use bytes.maketrans instead"
,
DeprecationWarning
)
DeprecationWarning
,
2
)
if
len
(
frm
)
!=
len
(
to
):
raise
ValueError
(
"maketrans arguments must have same length"
)
if
not
(
isinstance
(
frm
,
bytes
)
and
isinstance
(
to
,
bytes
)):
...
...
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