- 26 Nov, 2018 12 commits
-
-
Victor Stinner authored
Tolerate up to 30 ms, instead of 15 min, in other threads.
-
Lisa Roach authored
-
Victor Stinner authored
Move unicodeobject.h code surrounded by "#ifndef Py_LIMITED_API" to a new Include/cpython/unicodeobject.h header file.
-
Mathieu Dupuy authored
-
Victor Stinner authored
* Move object.h code surrounded by "#ifndef Py_LIMITED_API" to a new Include/cpython/object.h header file. * "typedef struct _typeobject PyTypeObject;" is now always defined in object.h, but if Py_LIMITED_API is not defined, Include/cpython/object.h also defines the structure. * Complete the printfunc comment to mention Py_LIMITED_API define.
-
Victor Stinner authored
Log TZ to debug a timezone issue... and a few more :-)
-
Victor Stinner authored
Fix str.format(), float.__format__() and complex.__format__() methods for non-ASCII decimal point when using the "n" formatter. Changes: * Rewrite _PyUnicode_InsertThousandsGrouping(): it now requires a _PyUnicodeWriter object for the buffer and a Python str object for digits. * Rename FILL() macro to unicode_fill(), convert it to static inline function, add "assert(0 <= start);" and rework its code.
-
Victor Stinner authored
Add "assert(PyTuple_Check(op));" to _PyTuple_CAST() to check that the argument is a tuple object in debug mode. PyTuple_GET_SIZE() now uses _PyTuple_CAST() to get its assertion.
-
INADA Naoki authored
There are some same consts in a module. This commit merges them into single instance. It reduces number of objects in memory after loading modules. https://bugs.python.org/issue34100
-
Victor Stinner authored
* Remove an unused import. * Move get_expected_config() call to check_config() to ease backport to Python 3.7.
-
Victor Stinner authored
test_embed.InitConfigTests now gets the expected configuration from a child process run with -S to not run the site module.
-
-
- 25 Nov, 2018 4 commits
-
-
Victor Stinner authored
Move _PyTuple_ITEMS() to a new header file: Include/internal/pycore_tupleobject.h
-
Victor Stinner authored
-
Boštjan Mejak authored
-
Serhiy Storchaka authored
-
- 24 Nov, 2018 1 commit
-
-
Julien Palard authored
-
- 23 Nov, 2018 13 commits
-
-
Zackery Spytz authored
-
Dustin Spicuzza authored
Importing ProcessPoolExecutor may hang or cause an error when the import accesses urandom on a low resource platform https://bugs.python.org/issue29877
-
Victor Stinner authored
The "-I" command line option (run Python in isolated mode) is now also copied by the multiprocessing and distutils modules when spawning child processes. Previously, only -E and -s options (enabled by -I) were copied. subprocess._args_from_interpreter_flags() now copies the -I flag.
-
takey authored
-
Victor Stinner authored
Include/*.h should be the "portable Python API", whereas Include/cpython/*.h should be the "CPython API": CPython implementation details. Changes: * Create Include/cpython/ subdirectory * "make install" now creates $prefix/include/cpython and copy Include/cpython/* to $prefix/include/cpython * Create Include/cpython/objimpl.h: move objimpl.h code surrounded by "#ifndef Py_LIMITED_API" to cpython/objimpl.h. * objimpl.h now includes cpython/objimpl.h * Windows installer (MSI) now also install Include/ subdirectories: Include/cpython/ and Include/internal/.
-
nierob authored
Modify the following fnctl function to retry if interrupted by a signal (EINTR): flock, lockf, fnctl.
-
Victor Stinner authored
make install now also installs the internal API: Include/internal/*.h header files.
-
Mathieu Dupuy authored
That section is a tip on how to kill process on Windows for Python prior to 2.7 and 3.2. 3.1 end of support was April 2012 and 2.6 was October 2013, so that hasn't been need for supported versions of Python for more than 5 years. Beside not being needed anymore for a long time, when I read it with the eyes of a Python profane, it makes Python looks bad, like a language from the parts with warts you need to circumvent. Let's delete that :)
-
Victor Stinner authored
-
Victor Stinner authored
PyObject_INIT() and PyObject_INIT_VAR() now cast their first argument to PyObject*, as done in Python 3.7. Revert partially commit b4435e20.
-
Victor Stinner authored
bpo-34523, bpo-35290: C locale coercion now resets the Python internal "force ASCII" mode. This change fix the filesystem encoding on FreeBSD CURRENT, which has a new "C.UTF-8" locale, when the UTF-8 mode is disabled. Add _Py_ResetForceASCII(): _Py_SetLocaleFromEnv() now calls it.
-
Victor Stinner authored
-
Victor Stinner authored
Add pycore_fileutils.h and pycore_object.h to Makefile.pre.in and to the pythoncore project of PCbuild/.
-
- 22 Nov, 2018 10 commits
-
-
Victor Stinner authored
Partially revert commit 5f2df88b: add "#undef Yield" to .c files after including Python-ast.h. Fix the warning: winbase.h(102): warning C4005: 'Yield': macro redefinition
-
Victor Stinner authored
If _PyObject_Dump() detects that the object is freed, don't try to dump it (exit immediately). Enhance also _PyObject_IsFreed(): it now detects if the pointer itself looks like freed memory.
-
Victor Stinner authored
os_read_impl() now also truncates the size to _PY_READ_MAX on macOS, to avoid to allocate a larger buffer even if _Py_read() is limited to _PY_READ_MAX bytes (ex: INT_MAX on macOS).
-
Victor Stinner authored
When iterating using asdl_seq_LEN(), use 'Py_ssize_t' type instead of 'int' for the iterator variable, to avoid downcast on 64-bit platforms. _Py_asdl_int_seq_new() now also ensures that the index is greater than or equal to 0.
-
Victor Stinner authored
CryptGenRandom() maximum size is PY_DWORD_MAX, not INT_MAX. Use DWORD type for the 'chunk' variable Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com>
-
Victor Stinner authored
Explicit cast a pointer difference (intptr_t) to int to fix two warnings on 64-bit Windows: Modules\pyexpat.c(1181): warning C4244: 'initializing': conversion from '__int64' to 'int', possible loss of data Modules\pyexpat.c(1192): warning C4244: 'initializing': conversion from '__int64' to 'int', possible loss of data
-
Victor Stinner authored
Fixed the following compiler warning in multibytecodec.c: warning C4244: '=': conversion from 'Py_ssize_t' to 'unsigned char', possible loss of data Cast Py_ssize_t to unsigned char: the maximum value is checked on the previous line.
-
Victor Stinner authored
Don't pass void* to Python macros: use _PyObject_CAST().
-
Victor Stinner authored
Don't pass complex expressions but regular variables to Python macros. * _datetimemodule.c: split single large "if" into two "if" in date_new(), time_new() and datetime_new(). * _pickle.c, load_extension(): flatten complex "if" expression into more regular C code. * _ssl.c: addbool() now uses a temporary bool_obj to only evaluate the value once. * weakrefobject.c: replace "Py_INCREF(result = proxy);" with "result = proxy; Py_INCREF(result);"
-
Victor Stinner authored
Add _PyObject_CAST() and _PyVarObject_CAST() macros to cast argument to PyObject* and PyVarObject* properly.
-