| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
data (including local variables caught in the stack trace) alive infinitely.
|
|
|
|
| |
narrow/wide unicode build.
|
|
|
|
|
|
|
|
| |
is silent by default,
except when configured --with-pydebug.
Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
|
| |
|
|
|
|
| |
They can be retrieved through a new attribute `sys._xoptions`.
|
|
|
|
| |
Patch from ActiveState.
|
| |
|
|
|
|
|
|
|
| |
* Rename _PyImport_FindExtension() to _PyImport_FindExtensionUnicode():
the filename becomes a Unicode object instead of byte string
* Rename _PyImport_FixupExtension() to _PyImport_FixupExtensionUnicode():
the filename becomes a Unicode object instead of byte string
|
|
|
|
|
|
| |
_Py_char2wchar() callers usually need the result size in characters. Since it's
trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add
an option to get it.
|
|
|
|
|
|
|
|
| |
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if
Py_FileSystemDefaultEncoding is NULL
* redecode_filenames() functions and _Py_code_object_list (issue #9630)
are no more needed: remove them
|
| |
|
| |
|
| |
|
|
|
|
| |
encodings
|
| |
|
|
|
|
|
| |
On Windows, Py_UNICODE is wchar_t, so we can avoid the expensive Py_UNICODE*
=> wchar_t* conversion.
|
|
|
|
|
|
| |
* Don't define _Py_wstat() on Windows, Windows has its own _wstat() function
with a different API (the stat buffer has another type)
* Include windows.h
|
|
|
|
|
|
|
| |
* _Py_fopen() and _Py_stat() come from Python/import.c
* (_Py)_wrealpath() comes from Python/sysmodule.c
* _Py_char2wchar(), _Py_wchar2char() and _Py_wfopen() come from Modules/main.c
* (_Py)_wstat(), (_Py)_wgetcwd(), _Py_wreadlink() come from Modules/getpath.c
|
|
|
|
|
| |
All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the
prototype for the new function PyUnicode_AsWideCharString().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redecode the filenames of:
- all modules: __file__ and __path__ attributes
- all code objects: co_filename attribute
- sys.path
- sys.meta_path
- sys.executable
- sys.path_importer_cache (keys)
Keep weak references to all code objects until initfsencoding() is called, to
be able to redecode co_filename attribute of all code objects.
|
| |
|
|
|
|
|
|
| |
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
|
|
|
|
| |
Add a Py_SetPath api to override magic path computations when starting up python.
|
| |
|
| |
|
|
|
|
| |
from the old FAQ into the docs
|
|
|
|
|
| |
re-created on a subsequent call to Py_Initialize(). The problem (a crash)
wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
|
|
|
|
|
|
|
|
| |
The internal unicode database is now always used.
(after 5 years: see
http://mail.python.org/pipermail/python-dev/2004-December/050193.html
)
|
| |
|
|
|
|
|
|
| |
a non-ASCII byte in the format string.
Document also the encoding.
|
|
|
|
|
|
| |
environment variable to set the filesystem encoding at Python startup.
sys.setfilesystemencoding() creates inconsistencies because it is unable to
reencode all filenames in all objects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
namespace if it occurs as a free variable in a nested block. This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
This sample was valid in 2.6, but fails to compile in 3.x without this change::
>>> def f():
... def print_error():
... print(e)
... try:
... something
... except Exception as e:
... print_error()
... # implicit "del e" here
This sample has always been invalid in Python, and now works::
>>> def outer(x):
... def inner():
... return x
... inner()
... del x
There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.
|
| |
|
| |
|
|
|
|
|
| |
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but
our bytecode is a bit simplified. Patch by Demur Rumed.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
|
|
|
|
| |
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
|
|
|
|
| |
other than MSC
|
|
|
|
|
| |
to the socket module, and fix the width of socket descriptors to be
correctly detected under 64-bit Windows.
|
|
|
|
| |
getting rid of the cached copy of thread-local attribute dictionary.
|
|
|
|
|
|
|
|
|
|
| |
Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept
and return characters from the full Unicode range (Py_UCS4).
The differences from Python code are few:
- unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit()
now return the correct value for large code points
- repr() may consider more characters as printable.
|
|
|
|
|
|
| |
... to get the filename as a unicode object, instead of a byte string. Function
needed to support unencodable filenames. Deprecate PyModule_GetFilename() in
favor on the new function.
|
| |
|
| |
|
|
|
|
|
| |
The code is based on strncmp() of the libiberty library,
function in the public domain.
|
|
|
|
|
| |
Write a message formatted by PyUnicode_FromFormatV() to sys.stdout and
sys.stderr.
|
|
|
|
|
|
| |
Call _wfopen() on Windows, or fopen() otherwise. Return the new file object on
success, or NULL if the file cannot be open or (if PyErr_Occurred()) on unicode
error.
|