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
fe8f4c9e
Kaydet (Commit)
fe8f4c9e
authored
Eyl 07, 2016
tarafından
Steve Dower
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #27959: Prevent ImportError from escaping codec search function
üst
2f8bfef1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
__init__.py
Lib/encodings/__init__.py
+8
-4
test_io.py
Lib/test/test_io.py
+1
-2
No files found.
Lib/encodings/__init__.py
Dosyayı görüntüle @
fe8f4c9e
...
...
@@ -155,9 +155,13 @@ codecs.register(search_function)
if
sys
.
platform
==
'win32'
:
def
_alias_mbcs
(
encoding
):
import
_bootlocale
if
encoding
==
_bootlocale
.
getpreferredencoding
(
False
):
import
encodings.mbcs
return
encodings
.
mbcs
.
getregentry
()
try
:
import
_bootlocale
if
encoding
==
_bootlocale
.
getpreferredencoding
(
False
):
import
encodings.mbcs
return
encodings
.
mbcs
.
getregentry
()
except
ImportError
:
# Imports may fail while we are shutting down
pass
codecs
.
register
(
_alias_mbcs
)
Lib/test/test_io.py
Dosyayı görüntüle @
fe8f4c9e
...
...
@@ -3230,8 +3230,7 @@ def _to_memoryview(buf):
class
CTextIOWrapperTest
(
TextIOWrapperTest
):
io
=
io
shutdown_error
=
(
"ImportError: sys.meta_path is None"
if
os
.
name
==
"nt"
else
"RuntimeError: could not find io module state"
)
shutdown_error
=
"RuntimeError: could not find io module state"
def
test_initialization
(
self
):
r
=
self
.
BytesIO
(
b
"
\xc3\xa9\n\n
"
)
...
...
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