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
4db56d50
Kaydet (Commit)
4db56d50
authored
Şub 02, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.4 (#23366)
üst
ad9f99e4
819c4e9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
test_itertools.py
Lib/test/test_itertools.py
+5
-0
NEWS
Misc/NEWS
+2
-0
itertoolsmodule.c
Modules/itertoolsmodule.c
+4
-0
No files found.
Lib/test/test_itertools.py
Dosyayı görüntüle @
4db56d50
...
...
@@ -264,6 +264,11 @@ class TestBasicOps(unittest.TestCase):
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
+
1
):
self
.
pickletest
(
proto
,
combinations
(
values
,
r
))
# test pickling
@support.bigaddrspacetest
def
test_combinations_overflow
(
self
):
with
self
.
assertRaises
(
OverflowError
):
combinations
(
"AA"
,
2
**
29
)
# Test implementation detail: tuple re-use
@support.impl_detail
(
"tuple reuse is specific to CPython"
)
def
test_combinations_tuple_reuse
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
4db56d50
...
...
@@ -229,6 +229,8 @@ Library
- Issue #23326: Removed __ne__ implementations. Since fixing default __ne__
implementation in issue #21408 they are redundant.
- Issue #23366: Fixed possible integer overflow in itertools.combinations.
- Issue #23369: Fixed possible integer overflow in
_json.encode_basestring_ascii.
...
...
Modules/itertoolsmodule.c
Dosyayı görüntüle @
4db56d50
...
...
@@ -2359,6 +2359,10 @@ combinations_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
goto
error
;
}
if
(
r
>
PY_SSIZE_T_MAX
/
sizeof
(
Py_ssize_t
))
{
PyErr_SetString
(
PyExc_OverflowError
,
"r is too big"
);
goto
error
;
}
indices
=
PyMem_Malloc
(
r
*
sizeof
(
Py_ssize_t
));
if
(
indices
==
NULL
)
{
PyErr_NoMemory
();
...
...
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