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
cb428f01
Kaydet (Commit)
cb428f01
authored
Ara 27, 2010
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
üst
8e286c47
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
exceptions.rst
Doc/c-api/exceptions.rst
+3
-2
warnings.h
Include/warnings.h
+1
-1
NEWS
Misc/NEWS
+3
-0
_warnings.c
Python/_warnings.c
+1
-1
No files found.
Doc/c-api/exceptions.rst
Dosyayı görüntüle @
cb428f01
...
...
@@ -297,8 +297,9 @@ in various ways. There is a separate error indicator for each thread.
is a straightforward wrapper around the Python function
:func:`warnings.warn_explicit`, see there for more information. The *module*
and *registry* arguments may be set to *NULL* to get the default effect
described there. *message*, *filename* and *module* are UTF-8 encoded
strings.
described there. *message* and *module* are UTF-8 encoded strings,
*filename* is decoded from the filesystem encoding
(:func:`sys.getfilesystemencoding`).
.. c:function:: int PyErr_WarnFormat(PyObject *category, Py_ssize_t stack_level, const char *format, ...)
...
...
Include/warnings.h
Dosyayı görüntüle @
cb428f01
...
...
@@ -20,7 +20,7 @@ PyAPI_FUNC(int) PyErr_WarnFormat(
PyAPI_FUNC
(
int
)
PyErr_WarnExplicit
(
PyObject
*
category
,
const
char
*
message
,
/* UTF-8 encoded string */
const
char
*
filename
,
/*
UTF-8 encoded str
ing */
const
char
*
filename
,
/*
decoded from the filesystem encod
ing */
int
lineno
,
const
char
*
module
,
/* UTF-8 encoded string */
PyObject
*
registry
);
...
...
Misc/NEWS
Dosyayı görüntüle @
cb428f01
...
...
@@ -8,6 +8,9 @@ What's New in Python 3.2 Release Candidate 1
Core and Builtins
-----------------
- Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
Library
-------
...
...
Python/_warnings.c
Dosyayı görüntüle @
cb428f01
...
...
@@ -783,7 +783,7 @@ PyErr_WarnExplicit(PyObject *category, const char *text,
{
PyObject
*
res
;
PyObject
*
message
=
PyUnicode_FromString
(
text
);
PyObject
*
filename
=
PyUnicode_
FromString
(
filename_str
);
PyObject
*
filename
=
PyUnicode_
DecodeFSDefault
(
filename_str
);
PyObject
*
module
=
NULL
;
int
ret
=
-
1
;
...
...
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