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
ded87d80
Kaydet (Commit)
ded87d80
authored
Eki 19, 2018
tarafından
Matthias Bussonnier
Kaydeden (comit)
Victor Stinner
Eki 19, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-33594: Add deprecation info in inspect.py module (GH-7036)
üst
0f14fc1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
inspect.py
Lib/inspect.py
+15
-7
2018-05-21-14-36-12.bpo-33594.-HRcyX.rst
...xt/Documentation/2018-05-21-14-36-12.bpo-33594.-HRcyX.rst
+3
-0
No files found.
Lib/inspect.py
Dosyayı görüntüle @
ded87d80
...
...
@@ -1070,8 +1070,10 @@ def getargspec(func):
Alternatively, use getfullargspec() for an API with a similar namedtuple
based interface, but full support for annotations and keyword-only
parameters.
Deprecated since Python 3.5, use `inspect.getfullargspec()`.
"""
warnings
.
warn
(
"inspect.getargspec() is deprecated, "
warnings
.
warn
(
"inspect.getargspec() is deprecated
since Python 3.0
, "
"use inspect.signature() or inspect.getfullargspec()"
,
DeprecationWarning
,
stacklevel
=
2
)
args
,
varargs
,
varkw
,
defaults
,
kwonlyargs
,
kwonlydefaults
,
ann
=
\
...
...
@@ -2797,19 +2799,25 @@ class Signature:
@classmethod
def
from_function
(
cls
,
func
):
"""Constructs Signature for the given python function."""
"""Constructs Signature for the given python function.
Deprecated since Python 3.5, use `Signature.from_callable()`.
"""
warnings
.
warn
(
"inspect.Signature.from_function() is deprecated
,
"
"use Signature.from_callable()"
,
warnings
.
warn
(
"inspect.Signature.from_function() is deprecated
since
"
"
Python 3.5,
use Signature.from_callable()"
,
DeprecationWarning
,
stacklevel
=
2
)
return
_signature_from_function
(
cls
,
func
)
@classmethod
def
from_builtin
(
cls
,
func
):
"""Constructs Signature for the given builtin function."""
"""Constructs Signature for the given builtin function.
Deprecated since Python 3.5, use `Signature.from_callable()`.
"""
warnings
.
warn
(
"inspect.Signature.from_builtin() is deprecated
,
"
"use Signature.from_callable()"
,
warnings
.
warn
(
"inspect.Signature.from_builtin() is deprecated
since
"
"
Python 3.5,
use Signature.from_callable()"
,
DeprecationWarning
,
stacklevel
=
2
)
return
_signature_from_builtin
(
cls
,
func
)
...
...
Misc/NEWS.d/next/Documentation/2018-05-21-14-36-12.bpo-33594.-HRcyX.rst
0 → 100644
Dosyayı görüntüle @
ded87d80
Document ``getargspec``, ``from_function`` and ``from_builtin`` as
deprecated in their respective docstring, and include version since
deprecation in DeprecationWarning message.
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