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
e139688d
Kaydet (Commit)
e139688d
authored
Şub 17, 2008
tarafından
Facundo Batista
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 2112. mmap does not raises EnvironmentError no more, but
a subclass of it. Thanks John Lenton.
üst
f88a077f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
test_mmap.py
Lib/test/test_mmap.py
+5
-0
NEWS
Misc/NEWS
+3
-0
mmapmodule.c
Modules/mmapmodule.c
+4
-1
No files found.
Lib/test/test_mmap.py
Dosyayı görüntüle @
e139688d
...
@@ -436,6 +436,11 @@ class MmapTests(unittest.TestCase):
...
@@ -436,6 +436,11 @@ class MmapTests(unittest.TestCase):
self
.
assertRaises
(
TypeError
,
m
.
write
,
"foo"
)
self
.
assertRaises
(
TypeError
,
m
.
write
,
"foo"
)
def
test_error
(
self
):
self
.
assert_
(
issubclass
(
mmap
.
error
,
EnvironmentError
))
self
.
assert_
(
"mmap.error"
in
str
(
mmap
.
error
))
def
test_main
():
def
test_main
():
run_unittest
(
MmapTests
)
run_unittest
(
MmapTests
)
...
...
Misc/NEWS
Dosyayı görüntüle @
e139688d
...
@@ -1149,6 +1149,9 @@ Library
...
@@ -1149,6 +1149,9 @@ Library
Extension Modules
Extension Modules
-----------------
-----------------
- #2112: mmap.error is now a subclass of EnvironmentError and not a
direct EnvironmentError
- Bug #2111: mmap segfaults when trying to write a block opened with PROT_READ
- Bug #2111: mmap segfaults when trying to write a block opened with PROT_READ
- #2063: correct order of utime and stime in os.times() result on Windows.
- #2063: correct order of utime and stime in os.times() result on Windows.
...
...
Modules/mmapmodule.c
Dosyayı görüntüle @
e139688d
...
@@ -1402,7 +1402,10 @@ initmmap(void)
...
@@ -1402,7 +1402,10 @@ initmmap(void)
dict
=
PyModule_GetDict
(
module
);
dict
=
PyModule_GetDict
(
module
);
if
(
!
dict
)
if
(
!
dict
)
return
;
return
;
mmap_module_error
=
PyExc_EnvironmentError
;
mmap_module_error
=
PyErr_NewException
(
"mmap.error"
,
PyExc_EnvironmentError
,
NULL
);
if
(
mmap_module_error
==
NULL
)
return
;
PyDict_SetItemString
(
dict
,
"error"
,
mmap_module_error
);
PyDict_SetItemString
(
dict
,
"error"
,
mmap_module_error
);
PyDict_SetItemString
(
dict
,
"mmap"
,
(
PyObject
*
)
&
mmap_object_type
);
PyDict_SetItemString
(
dict
,
"mmap"
,
(
PyObject
*
)
&
mmap_object_type
);
#ifdef PROT_EXEC
#ifdef PROT_EXEC
...
...
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