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
90b20675
Kaydet (Commit)
90b20675
authored
Ara 28, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#10777: fix iteration over dict keys while mutating the dict.
üst
ff52f760
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
test_xml_etree.py
Lib/test/test_xml_etree.py
+9
-0
ElementTree.py
Lib/xml/etree/ElementTree.py
+1
-1
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_xml_etree.py
Dosyayı görüntüle @
90b20675
...
...
@@ -1841,6 +1841,15 @@ def check_issue6565():
"""
def
check_issue10777
():
"""
Registering a namespace twice caused a "dictionary changed size during
iteration" bug.
>>> ET.register_namespace('test10777', 'http://myuri/')
>>> ET.register_namespace('test10777', 'http://myuri/')
"""
# --------------------------------------------------------------------
...
...
Lib/xml/etree/ElementTree.py
Dosyayı görüntüle @
90b20675
...
...
@@ -1068,7 +1068,7 @@ _serialize = {
def
register_namespace
(
prefix
,
uri
):
if
re
.
match
(
"ns
\
d+$"
,
prefix
):
raise
ValueError
(
"Prefix format reserved for internal use"
)
for
k
,
v
in
_namespace_map
.
items
(
):
for
k
,
v
in
list
(
_namespace_map
.
items
()
):
if
k
==
uri
or
v
==
prefix
:
del
_namespace_map
[
k
]
_namespace_map
[
uri
]
=
prefix
...
...
Misc/NEWS
Dosyayı görüntüle @
90b20675
...
...
@@ -18,6 +18,9 @@ Core and Builtins
Library
-------
- Issue #10777: Fix "dictionary changed size during iteration" bug in
ElementTree register_namespace().
- Issue #10626: test_logging now preserves logger disabled states.
- Issue #10774: test_logging now removes temp files created during tests.
...
...
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