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
9ad11544
Kaydet (Commit)
9ad11544
authored
Ock 19, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
set tp_new from the class in the hierarchy that actually owns the descriptor (closes #25731)
Debugging by Eryk Sun.
üst
9e9f850f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
test_descr.py
Lib/test/test_descr.py
+8
-0
NEWS
Misc/NEWS
+2
-0
typeobject.c
Objects/typeobject.c
+1
-1
No files found.
Lib/test/test_descr.py
Dosyayı görüntüle @
9ad11544
...
@@ -4564,6 +4564,14 @@ order (MRO) for bases """
...
@@ -4564,6 +4564,14 @@ order (MRO) for bases """
self
.
assertRegex
(
repr
(
method
),
self
.
assertRegex
(
repr
(
method
),
r"<bound method qualname of <object object at .*>>"
)
r"<bound method qualname of <object object at .*>>"
)
def
test_deleting_new_in_subclasses
(
self
):
class
X
:
def
__init__
(
self
,
a
):
pass
X
.
__new__
=
None
del
X
.
__new__
X
(
1
)
# should work
class
DictProxyTests
(
unittest
.
TestCase
):
class
DictProxyTests
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
9ad11544
...
@@ -10,6 +10,8 @@ Release date: tba
...
@@ -10,6 +10,8 @@ Release date: tba
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #25731: Fix set and deleting __new__ on a class.
- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
_PyObject_GetState() due to regressions observed in Cython-based projects.
_PyObject_GetState() due to regressions observed in Cython-based projects.
...
...
Objects/typeobject.c
Dosyayı görüntüle @
9ad11544
...
@@ -6777,7 +6777,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
...
@@ -6777,7 +6777,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
sanity checks and constructing a new argument
sanity checks and constructing a new argument
list. Cut all that nonsense short -- this speeds
list. Cut all that nonsense short -- this speeds
up instance creation tremendously. */
up instance creation tremendously. */
specific
=
(
void
*
)
type
->
tp_new
;
specific
=
(
void
*
)
((
PyTypeObject
*
)
PyCFunction_GET_SELF
(
descr
))
->
tp_new
;
/* XXX I'm not 100% sure that there isn't a hole
/* XXX I'm not 100% sure that there isn't a hole
in this reasoning that requires additional
in this reasoning that requires additional
sanity checks. I'll buy the first person to
sanity checks. I'll buy the first person to
...
...
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