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
a717d563
Kaydet (Commit)
a717d563
authored
Haz 15, 2012
tarafından
Petri Lehtinen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
#15036: Make a repeated changes and flushes work with single-file mailboxes
üst
3730a17a
02653f1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
mailbox.py
Lib/mailbox.py
+1
-0
test_mailbox.py
Lib/test/test_mailbox.py
+11
-0
NEWS
Misc/NEWS
+4
-0
No files found.
Lib/mailbox.py
Dosyayı görüntüle @
a717d563
...
@@ -675,6 +675,7 @@ class _singlefileMailbox(Mailbox):
...
@@ -675,6 +675,7 @@ class _singlefileMailbox(Mailbox):
new_file
.
write
(
buffer
)
new_file
.
write
(
buffer
)
new_toc
[
key
]
=
(
new_start
,
new_file
.
tell
())
new_toc
[
key
]
=
(
new_start
,
new_file
.
tell
())
self
.
_post_message_hook
(
new_file
)
self
.
_post_message_hook
(
new_file
)
self
.
_file_length
=
new_file
.
tell
()
except
:
except
:
new_file
.
close
()
new_file
.
close
()
os
.
remove
(
new_file
.
name
)
os
.
remove
(
new_file
.
name
)
...
...
Lib/test/test_mailbox.py
Dosyayı görüntüle @
a717d563
...
@@ -504,6 +504,17 @@ class TestMailbox(TestBase):
...
@@ -504,6 +504,17 @@ class TestMailbox(TestBase):
# Write changes to disk
# Write changes to disk
self
.
_test_flush_or_close
(
self
.
_box
.
flush
,
True
)
self
.
_test_flush_or_close
(
self
.
_box
.
flush
,
True
)
def
test_popitem_and_flush_twice
(
self
):
# See #15036.
self
.
_box
.
add
(
self
.
_template
%
0
)
self
.
_box
.
add
(
self
.
_template
%
1
)
self
.
_box
.
flush
()
self
.
_box
.
popitem
()
self
.
_box
.
flush
()
self
.
_box
.
popitem
()
self
.
_box
.
flush
()
def
test_lock_unlock
(
self
):
def
test_lock_unlock
(
self
):
# Lock and unlock the mailbox
# Lock and unlock the mailbox
self
.
assertFalse
(
os
.
path
.
exists
(
self
.
_get_lock_path
()))
self
.
assertFalse
(
os
.
path
.
exists
(
self
.
_get_lock_path
()))
...
...
Misc/NEWS
Dosyayı görüntüle @
a717d563
...
@@ -21,6 +21,10 @@ Core and Builtins
...
@@ -21,6 +21,10 @@ Core and Builtins
Library
Library
-------
-------
- Issue #15036: Allow removing or changing multiple items in
single-file mailboxes (mbox, MMDF, Babyl) flushing the mailbox
between the changes.
- Issue #14059: Implement multiprocessing.Barrier.
- Issue #14059: Implement multiprocessing.Barrier.
- Issue #15061: The inappropriately named hmac.secure_compare has been
- Issue #15061: The inappropriately named hmac.secure_compare has been
...
...
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