summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35134: Add Include/cpython/pyerrors.h (GH-10727)Victor Stinner2018-11-262-168/+182
| | | | Move pyerrors.h code surrounded by "#ifndef Py_LIMITED_API" to a new Include/cpython/pyerrors.h header file.
* bpo-33723: Fix test_time.test_thread_time() (GH-10724)Victor Stinner2018-11-261-3/+7
| | | Tolerate up to 30 ms, instead of 15 min, in other threads.
* Adds IPv6 support when invoking http.server directly. (GH-10595)Lisa Roach2018-11-264-2/+30
|
* bpo-35134: Create Include/cpython/unicodeobject.h (GH-10680)Victor Stinner2018-11-262-1286/+1251
| | | | Move unicodeobject.h code surrounded by "#ifndef Py_LIMITED_API" to a new Include/cpython/unicodeobject.h header file.
* Doc: Delete now useless Windows FAQ section (GH-10557)Mathieu Dupuy2018-11-261-11/+0
|
* bpo-35134: Create Include/cpython/object.h (GH-10679)Victor Stinner2018-11-262-485/+460
| | | | | | | | * 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.
* pythoninfo: log more environment variable (GH-10719)Victor Stinner2018-11-261-4/+45
| | | Log TZ to debug a timezone issue... and a few more :-)
* bpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623)Victor Stinner2018-11-265-252/+228
| | | | | | | | | | | | 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.
* Add assertion to _PyTuple_CAST(op) (GH-10712)Victor Stinner2018-11-261-2/+2
| | | | | | 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.
* bpo-34100: Merge constants recursively (GH-8341)INADA Naoki2018-11-266-4594/+4692
| | | | | | | 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
* bpo-35313: Cleanup test_embed.py (GH-10716)Victor Stinner2018-11-261-4/+3
| | | | | * Remove an unused import. * Move get_expected_config() call to check_config() to ease backport to Python 3.7.
* bpo-35313: Fix test_embed when run from venv (GH-10713)Victor Stinner2018-11-261-63/+68
| | | | test_embed.InitConfigTests now gets the expected configuration from a child process run with -S to not run the site module.
* bpo-35300: Add usage note to the lru_cache() docs (GH-10707)Raymond Hettinger2018-11-261-0/+5
| | | https://bugs.python.org/issue35300
* bpo-35081: Add Include/internal/pycore_tupleobject.h (GH-10705)Victor Stinner2018-11-2512-5/+30
| | | | Move _PyTuple_ITEMS() to a new header file: Include/internal/pycore_tupleobject.h
* bpo-35081: Add _PyTuple_CAST() (GH-10704)Victor Stinner2018-11-251-4/+7
|
* closes bpo-35309: cpath should be capath (GH-10699)Boštjan Mejak2018-11-251-1/+1
|
* bpo-32035: Fix words about strings and bytes in zipfile documentation. ↵Serhiy Storchaka2018-11-252-16/+12
| | | | (GH-10592)
* Doc: Bump sphinx. (GH-10676)Julien Palard2018-11-242-2/+2
|
* bpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689)Zackery Spytz2018-11-231-0/+1
|
* bpo-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856)Dustin Spicuzza2018-11-233-11/+17
| | | | | | | Importing ProcessPoolExecutor may hang or cause an error when the import accesses urandom on a low resource platform https://bugs.python.org/issue29877
* bpo-34812: subprocess._args_from_interpreter_flags(): add isolated (GH-10675)Victor Stinner2018-11-233-4/+20
| | | | | | | | 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.
* Linkify SMTP.quit() in smtplib documentation. (GH-9785)takey2018-11-231-1/+1
|
* bpo-35134: Create Include/cpython/ subdirectory (GH-10624)Victor Stinner2018-11-237-108/+138
| | | | | | | | | | | | | | | | 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/.
* bpo-35189: Retry fnctl calls on EINTR (GH-10413)nierob2018-11-233-23/+73
| | | | Modify the following fnctl function to retry if interrupted by a signal (EINTR): flock, lockf, fnctl.
* bpo-35296: make install now installs the internal API (GH-10665)Victor Stinner2018-11-232-0/+12
| | | | make install now also installs the internal API: Include/internal/*.h header files.
* Doc: Delete "how do I emulate os.kill" section in Windows FAQ (GH-10487)Mathieu Dupuy2018-11-231-20/+0
| | | | | 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 :)
* bpo-35081: add NEWS entry for new Include/internal/pycore_*.h files (GH-10666)Victor Stinner2018-11-231-0/+2
|
* bpo-35059: PyObject_INIT() casts to PyObject* (GH-10674)Victor Stinner2018-11-238-12/+18
| | | | | | PyObject_INIT() and PyObject_INIT_VAR() now cast their first argument to PyObject*, as done in Python 3.7. Revert partially commit b4435e20a92af474f117b78b98ddc6f515363af5.
* bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672)Victor Stinner2018-11-233-4/+29
| | | | | | | | 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.
* bpo-35059: NEWS entry for macros converted to inline funcs (GH-10671)Victor Stinner2018-11-231-0/+3
|
* bpo-35081: Add new internal headers to Makefile (GH-10670)Victor Stinner2018-11-233-0/+10
| | | | Add pycore_fileutils.h and pycore_object.h to Makefile.pre.in and to the pythoncore project of PCbuild/.
* bpo-35177, Python-ast.h: Fix "Yield" compiler warning (GH-10664)Victor Stinner2018-11-228-2/+8
| | | | | | | | Partially revert commit 5f2df88b63e50d23914e97ec778861a52abdeaad: add "#undef Yield" to .c files after including Python-ast.h. Fix the warning: winbase.h(102): warning C4005: 'Yield': macro redefinition
* bpo-9263: Fix _PyObject_Dump() for freed object (#10661)Victor Stinner2018-11-221-0/+5
| | | | | | | 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.
* bpo-24658: os.read() reuses _PY_READ_MAX (GH-10657)Victor Stinner2018-11-221-5/+1
| | | | | 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).
* bpo-18407: ast.c uses Py_ssize_t for asdl_seq_LEN() iterator (GH-10655)Victor Stinner2018-11-222-10/+10
| | | | | | | 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.
* bpo-18407: win32_urandom() uses PY_DWORD_MAX (GH-10656)Victor Stinner2018-11-221-4/+2
| | | | | | 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>
* bpo-9566: Fix compiler warnings in pyexpat.c (GH-10654)Victor Stinner2018-11-221-2/+4
| | | | | | | | | | 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
* cjkcodecs: Fix compiler warning (GH-10651)Victor Stinner2018-11-221-2/+2
| | | | | | | | | 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.
* bpo-35059: Cast void* to PyObject* (GH-10650)Victor Stinner2018-11-224-11/+17
| | | Don't pass void* to Python macros: use _PyObject_CAST().
* bpo-35059: Cleanup usage of Python macros (GH-10648)Victor Stinner2018-11-224-90/+114
| | | | | | | | | | | | | 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);"
* bpo-35059: Add _PyObject_CAST() macro (GH-10645)Victor Stinner2018-11-225-23/+29
| | | | Add _PyObject_CAST() and _PyVarObject_CAST() macros to cast argument to PyObject* and PyVarObject* properly.
* bpo-35059: Convert _PyObject_GC_TRACK() to inline function (GH-10643)Victor Stinner2018-11-223-42/+68
| | | | | | | | | | | | | * Add _PyObject_ASSERT_FROM() and _PyObject_ASSERT_FAILED_MSG() macros. * PyObject_GC_Track() now calls _PyObject_ASSERT_FAILED_MSG(), instead of Py_FatalError(), if the object is already tracked, to dump more information on error. * _PyObject_GC_TRACK() no longer checks if the object is already tracked at runtime, use an assertion instead for best performances; PyObject_GC_Track() still checks at runtime. * pycore_object.h now includes pycore_pystate.h. * Convert _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to inline functions.
* bpo-35059: Enhance _PyObject_AssertFailed() (GH-10642)Victor Stinner2018-11-213-14/+20
| | | | | | Enhance _PyObject_AssertFailed() * Exchange 'expr' and 'msg' parameters * 'expr' and 'func' arguments can now be NULL
* bpo-35081: Add Include/internal/pycore_object.h (GH-10640)Victor Stinner2018-11-2134-50/+93
| | | | Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from Include/objimpl.h to Include/internal/pycore_object.h.
* bpo-35189: Fix eintr_tester.py (GH-10637)Victor Stinner2018-11-211-22/+18
| | | | | | | | | | | | | Call setitimer() before each test method, instead of once per test case, to ensure that signals are sent in each test method. Previously, only the first method of a testcase class got signals. Changes: * Replace setUpClass() with setUp() and replace tearDownClass() with tearDown(). * tearDown() now ensures that at least one signal has been sent. * Replace support.run_unittest() with unittest.main() which has a nicer CLI and automatically discover test cases.
* bpo-35035: Rename email.utils documentation to email.utils.rst (GH-10023)Zhiming Wang2018-11-213-1/+2
| | | I'll watch for 404 on the old URL and will setup an HTTP redirection if needed.
* bpo-35290: Add debug info to test_c_locale_coercion (GH-10631)Victor Stinner2018-11-211-6/+15
| | | | In verbose mode, test_c_locale_coercion now dumps global variables at startup.
* bpo-35221: Additional hint that the placeholder is to be replaced. (GH-10604)Julien Palard2018-11-211-1/+2
|
* bpo-35081: Move _PyGC_FINALIZED() back to C API (GH-10626)Victor Stinner2018-11-201-3/+3
| | | | | | | | | | | | | | | | Partially revert commit 1a6be91e6fd65ce9cb88cbbbb193db7e92ec6076, move back PyGC API from the internal API to the C API: * _PyGCHead_NEXT(g), _PyGCHead_SET_NEXT(g, p) * _PyGCHead_PREV(g), _PyGCHead_SET_PREV(g, p) * _PyGCHead_FINALIZED(g), _PyGCHead_SET_FINALIZED(g) * _PyGC_FINALIZED(o), _PyGC_SET_FINALIZED(o) * _PyGC_PREV_MASK_FINALIZED * _PyGC_PREV_MASK_COLLECTING * _PyGC_PREV_SHIFT * _PyGC_PREV_MASK _PyObject_GC_TRACK(o) and _PyObject_GC_UNTRACK(o) remain in the internal API.
* bpo-34532: Fixed exit code for py.exe list versions arg (GH-9039)Brendan Gerrity2018-11-202-4/+6
|