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
23f0d6b5
Kaydet (Commit)
23f0d6b5
authored
Haz 05, 2010
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #8627: remove out-of-date warning about overriding __cmp__
üst
a441287f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
8 deletions
+3
-8
test_descr.py
Lib/test/test_descr.py
+0
-1
NEWS
Misc/NEWS
+3
-0
typeobject.c
Objects/typeobject.c
+0
-7
No files found.
Lib/test/test_descr.py
Dosyayı görüntüle @
23f0d6b5
...
@@ -4621,7 +4621,6 @@ def test_main():
...
@@ -4621,7 +4621,6 @@ def test_main():
deprecations
+=
[
deprecations
+=
[
(
"classic (int|long) division"
,
DeprecationWarning
),
(
"classic (int|long) division"
,
DeprecationWarning
),
(
"coerce.. not supported"
,
DeprecationWarning
),
(
"coerce.. not supported"
,
DeprecationWarning
),
(
"Overriding __cmp__ "
,
DeprecationWarning
),
(
".+__(get|set|del)slice__ has been removed"
,
DeprecationWarning
)]
(
".+__(get|set|del)slice__ has been removed"
,
DeprecationWarning
)]
with
test_support
.
check_warnings
(
*
deprecations
):
with
test_support
.
check_warnings
(
*
deprecations
):
# Run all local test cases, with PTypesLongInitTest first.
# Run all local test cases, with PTypesLongInitTest first.
...
...
Misc/NEWS
Dosyayı görüntüle @
23f0d6b5
...
@@ -12,6 +12,9 @@ What's New in Python 2.7 Release Candidate 1?
...
@@ -12,6 +12,9 @@ What's New in Python 2.7 Release Candidate 1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of
__hash__ in 3.x" warning.
- Issue #8748: Fix two issues with comparisons between complex and integer
- Issue #8748: Fix two issues with comparisons between complex and integer
objects. (1) The comparison could incorrectly return True in some cases
objects. (1) The comparison could incorrectly return True in some cases
(2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
(2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
...
...
Objects/typeobject.c
Dosyayı görüntüle @
23f0d6b5
...
@@ -3723,7 +3723,6 @@ overrides_name(PyTypeObject *type, char *name)
...
@@ -3723,7 +3723,6 @@ overrides_name(PyTypeObject *type, char *name)
}
}
#define OVERRIDES_HASH(x) overrides_name(x, "__hash__")
#define OVERRIDES_HASH(x) overrides_name(x, "__hash__")
#define OVERRIDES_CMP(x) overrides_name(x, "__cmp__")
#define OVERRIDES_EQ(x) overrides_name(x, "__eq__")
#define OVERRIDES_EQ(x) overrides_name(x, "__eq__")
static
void
static
void
...
@@ -3869,12 +3868,6 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
...
@@ -3869,12 +3868,6 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
if
(
base
->
tp_hash
&&
if
(
base
->
tp_hash
&&
(
base
->
tp_hash
!=
PyObject_HashNotImplemented
)
&&
(
base
->
tp_hash
!=
PyObject_HashNotImplemented
)
&&
!
OVERRIDES_HASH
(
type
))
{
!
OVERRIDES_HASH
(
type
))
{
if
(
OVERRIDES_CMP
(
type
))
{
PyErr_WarnPy3k
(
"Overriding "
"__cmp__ blocks inheritance "
"of __hash__ in 3.x"
,
1
);
}
if
(
OVERRIDES_EQ
(
type
))
{
if
(
OVERRIDES_EQ
(
type
))
{
PyErr_WarnPy3k
(
"Overriding "
PyErr_WarnPy3k
(
"Overriding "
"__eq__ blocks inheritance "
"__eq__ blocks inheritance "
...
...
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