summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-35081: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273)Victor Stinner2018-11-0117-110/+150
| | | | | | | | | | * And pycore_lifecycle.h and pycore_pathconfig.h headers to Include/internal/ * Move Py_BUILD_CORE specific code from coreconfig.h and pylifecycle.h to pycore_pathconfig.h and pycore_lifecycle.h * Move _Py_wstrlist_XXX() definitions and _PyPathConfig code from pycore_state.h to pycore_pathconfig.h * Move "Init" and "Fini" function definitions from pylifecycle.c to pycore_lifecycle.h.
* bpo-35081: Move accu.h to Include/internal/pycore_accu.h (GH-10271)Victor Stinner2018-11-019-20/+17
| | | | | | | The accu.h header is no longer part of the Python C API: it has been moved to the "internal" headers which are restricted to Python itself. Replace #include "accu.h" with #include "pycore_accu.h".
* bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266)Victor Stinner2018-11-0120-104/+144
| | | | | | | | | | | | | | | | | | | | | | | | | If Py_BUILD_CORE is defined, the PyThreadState_GET() macro access _PyRuntime which comes from the internal pycore_state.h header. Public headers must not require internal headers. Move PyThreadState_GET() and _PyInterpreterState_GET_UNSAFE() from Include/pystate.h to Include/internal/pycore_state.h, and rename PyThreadState_GET() to _PyThreadState_GET() there. The PyThreadState_GET() macro of pystate.h is now redefined when pycore_state.h is included, to use the fast _PyThreadState_GET(). Changes: * Add _PyThreadState_GET() macro * Replace "PyThreadState_GET()->interp" with _PyInterpreterState_GET_UNSAFE() * Replace PyThreadState_GET() with _PyThreadState_GET() in internal C files (compiled with Py_BUILD_CORE defined), but keep PyThreadState_GET() in the public header files. * _testcapimodule.c: replace PyThreadState_GET() with PyThreadState_Get(); the module is not compiled with Py_BUILD_CORE defined. * pycore_state.h now requires Py_BUILD_CORE to be defined.
* bpo-35081: Add pycore_ prefix to internal header files (GH-10263)Victor Stinner2018-10-3178-137/+138
| | | | | | | | | | | | | | | | | | | | * Rename Include/internal/ header files: * pyatomic.h -> pycore_atomic.h * ceval.h -> pycore_ceval.h * condvar.h -> pycore_condvar.h * context.h -> pycore_context.h * pygetopt.h -> pycore_getopt.h * gil.h -> pycore_gil.h * hamt.h -> pycore_hamt.h * hash.h -> pycore_hash.h * mem.h -> pycore_mem.h * pystate.h -> pycore_state.h * warnings.h -> pycore_warnings.h * PCbuild project, Makefile.pre.in, Modules/Setup: add the Include/internal/ directory to the search paths of header files. * Update includes. For example, replace #include "internal/mem.h" with #include "pycore_mem.h".
* bpo-26558: Fix Py_FatalError() with GIL released (GH-10267)Victor Stinner2018-10-311-10/+25
| | | | | Don't call _Py_FatalError_PrintExc() nor flush_std_files() if the current thread doesn't hold the GIL, or if the current thread has no Python state thread.
* bpo-35081: Move Py_BUILD_CORE code to internal/mem.h (GH-10249)Victor Stinner2018-10-3110-10/+20
| | | | | * Add #include "internal/mem.h" to C files using _PyMem_SetDefaultAllocator(). * Include/internal/mem.h now requires Py_BUILD_CORE to be defined.
* bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. ↵Xiang Zhang2018-10-313-1/+13
| | | | | | (GH-10217) _io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range value to the bitwise struct field.
* bpo-35110: Fix yet few spaces before dashes. (GH-10255)Serhiy Storchaka2018-10-312-4/+4
|
* Fix a possible crash in range.__reversed__(). (GH-10252)Zackery Spytz2018-10-311-0/+1
|
* bpo-33138: Change standard error message for non-pickleable and non-copyable ↵Serhiy Storchaka2018-10-3111-91/+17
| | | | types. (GH-6239)
* bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231)Serhiy Storchaka2018-10-3134-124/+128
|
* bpo-35116, urllib.parse: Document the new max_num_fields parameter (GH-10247)matthewbelisle-wf2018-10-301-2/+16
|
* bpo-35086: Fix tkinter example "A Simple Hello World Program". (GH-10160)Daniel Lovell2018-10-301-1/+2
| | | The root widget was accessed as a global variable in the Application's method.
* bpo-35081: Move Include/pyatomic.c to Include/internal/ (GH-10239)Victor Stinner2018-10-3010-10/+23
| | | Add pyatomic.h to the VS project (it wasn't referenced).
* bpo-35081: Cleanup pystate.c and pystate.h (GH-10240)Victor Stinner2018-10-304-31/+26
| | | | | | | | | | | | * Remove _PyThreadState_Current * Replace GET_TSTATE() with PyThreadState_GET() * Replace GET_INTERP_STATE() with _PyInterpreterState_GET_UNSAFE() * Replace direct access to _PyThreadState_Current with PyThreadState_GET() * Replace _PyThreadState_Current with _PyRuntime.gilstate.tstate_current * Rename SET_TSTATE() to _PyThreadState_SET(), name more consistent with _PyThreadState_GET() * Update outdated comments
* bpo-35059: Convert _Py_Dealloc() to static inline function (GH-10223)Victor Stinner2018-10-302-21/+24
| | | | | Convert _Py_Dealloc() macro into a static inline function. Moreover, it is now also defined as a static inline function if Py_TRACE_REFS is defined.
* bpo-32030: Make _PySys_AddXOptionWithError() private (GH-10236)Victor Stinner2018-10-302-8/+8
| | | | | | | | Make _PySys_AddXOptionWithError() and _PySys_AddWarnOptionWithError() functions private again. They are no longer needed to initialize Python: _PySys_EndInit() is now responsible to add these options instead. Moreover, PySys_AddWarnOptionUnicode() now clears the exception on failure if possible.
* bpo-34523: Fix config_init_fs_encoding() for ASCII (GH-10232)Victor Stinner2018-10-302-20/+24
| | | | | | | * bpo-34523, bpo-34403: Fix config_init_fs_encoding(): it now uses ASCII if _Py_GetForceASCII() is true. * Fix a regression of commit b2457efc78b74a1d6d1b77d11a939e886b8a4e2c. * Fix also a memory leak: get_locale_encoding() already allocates memory, no need to duplicate the string.
* bpo-31680: Add curses.ncurses_version. (GH-4217)Serhiy Storchaka2018-10-305-3/+119
| | | | Use curses.ncurses_version for conditionally skipping a test.
* bpo-33237: Improve AttributeError message for partially initialized module. ↵Serhiy Storchaka2018-10-307-23/+67
| | | | (GH-6398)
* bpo-34876: Change the lineno of the AST for decorated function and class. ↵Serhiy Storchaka2018-10-307-2491/+2560
| | | | | | | (GH-9731) It was overridden by the lineno of the first decorator. Now it is the lineno of 'def' or 'class'.
* Doc: fix asyncio loop.close() description (GH-10229)Andriy Maletsky2018-10-291-1/+1
| | | Needs backport to 3.7. In 3.6 the description is correct.
* bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011)Pablo Galindo2018-10-291-0/+7
| | | Some FreeBSD buildbots fail to run this test as the eof was not being received by the server if the size is not big enough. This behaviour only appears if the client is using TLS1.3.
* bpo-34765: install-sh is executable (GH-10225)Victor Stinner2018-10-291-0/+0
| | | | Fix 'install-sh' file permission: add execution bit ("chmod +x"), "-rw-rw-r--." becomes "-rwxrwxr-x.".
* bpo-34945: Buffer output in test suite only when creating junit file (GH-10204)Pablo Galindo2018-10-292-14/+16
| | | | | | | | | | | After commit d0f49d2f5085ca68e3dc8725f1fb1c9674bfb5ed, the output of the test suite is always buffered as the test output needs to be included in the JUnit file in same cases (as when a test fails). This has the consequence that printing or using debuggers (like pdb) in the test suite does not result in a good user experience anymore. This commit modifies the test suite runner so it only captures the test output when the JUnit file is requested to fix the regression so prints and debuggers are usable again.
* bpo-35059: Convert Py_XINCREF() to static inline function (GH-10224)Victor Stinner2018-10-291-13/+17
| | | | Convert Py_XINCREF() and Py_XDECREF() macros into static inline functions.
* Include memo in the documented signature of copy.deepcopy()Stephan Hoyer2018-10-291-3/+3
| | | | | | | | * Include memo in the documented signature of copy.deepcopy() The memo argument is mentioned lower on the doc page under writing a `__deepcopy__` method, but is not included in the documented function signature. This makes it easy to miss, and can lead to incorrect/buggy implementations of `__deepcopy__` -- which is exatly what just happpend to me!
* bpo-34160: Preserve user specified order of Element attributes in html. ↵Serhiy Storchaka2018-10-292-9/+5
| | | | (GH-10190)
* bpo-33331: Clean modules in the reversed order in PyImport_Cleanup(). (GH-6565)Serhiy Storchaka2018-10-294-1845/+1813
| | | | | | Modules imported last are now cleared first at interpreter shutdown. A newly imported module is moved to the end of sys.modules, behind modules on which it depends.
* bpo-35059: Remove Py_STATIC_INLINE() macro (GH-10216)Victor Stinner2018-10-293-42/+25
| | | | "static inline" should be used directly. Forcing the compiler to inline is not recommended.
* bpo-35059: Convert Py_INCREF() to static inline function (GH-10079)Victor Stinner2018-10-291-29/+42
| | | | | * Convert Py_INCREF() and Py_DECREF() macros into static inline functions. * Remove _Py_CHECK_REFCNT() macro: code moved into Py_DECREF().
* bpo-27741: Better wording for datetime.strptime() (GH-9994)Gus Goulart2018-10-291-1/+3
|
* Fix a possible "double decref" in termios.tcgetattr(). (GH-10194)Zackery Spytz2018-10-291-2/+2
|
* bpo-35097: Add IDLE doc subsection explaining editor windows. (#10206)Terry Jan Reedy2018-10-293-1/+37
| | | Topics include opening, title and status bar, .py* extension, and running.
* bpo-33234: Add exact allocation optimization to lists in What's New (GH-10200)Pablo Galindo2018-10-281-0/+5
| | | | In commit 372d705 a new optimization to the list() type was introduced but it was not added to the optimization section in What's new for Python 3.8.
* bpo-35047, unittest.mock: Better error messages on assert_called_xxx ↵Petter Strandmark2018-10-284-8/+62
| | | | | | | failures (GH-10090) unittest.mock now includes mock calls in exception messages if assert_not_called, assert_called_once, or assert_called_once_with fails.
* Issue 35093: Document the IDLE document viewer in the IDLE doc. (#10195)Terry Jan Reedy2018-10-283-20/+42
| | | Add a paragraph in "Help and preferences", "Help sources" subsection.
* bpo-33234 Improve list() pre-sizing for inputs with known lengths (GH-9846)Pablo Galindo2018-10-283-0/+51
| | | | | | | | | | | | The list() constructor isn't taking full advantage of known input lengths or length hints. This commit makes the constructor pre-size and not over-allocate when the input size is known (the input collection implements __len__). One on the main advantages is that this provides 12% difference in memory savings due to the difference between overallocating and allocating exactly the input size. For efficiency purposes and to avoid a performance regression for small generators and collections, the size of the input object is calculated using __len__ and not __length_hint__, as the later is considerably slower.
* Fix yet one error in checking Tcl version. (GH-10189)Serhiy Storchaka2018-10-281-1/+1
|
* bpo-34160: Preserve user specified order of Element attributes (GH-10163)Raymond Hettinger2018-10-284-1/+30
|
* Fix checking for bugfix Tcl version. (GH-10185)Serhiy Storchaka2018-10-281-1/+1
|
* bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174)Alexey Izbyshev2018-10-283-5/+5
| | | | | | | * Fix potential division by zero in BZ2_Malloc() * Avoid division by zero in PyLzma_Malloc() * Avoid division by zero and integer overflow in PyZlib_Malloc() Reported by Svace static analyzer.
* bpo-1529353: Explain Shell text squeezing in the IDLE doc. (#10169)Terry Jan Reedy2018-10-282-3/+39
|
* bpo-35089: Don't mention typing.io and typing.re (GH-10173)Sebastian Rittau2018-10-282-16/+11
| | | | https://bugs.python.org/issue35089
* bpo-34672: fix a compiler warning in timemodule.c (GH-10176)Xiang Zhang2018-10-281-1/+1
|
* bpo-35064 prefix smelly symbols that appear with COUNT_ALLOCS with _Py_ ↵Pablo Galindo2018-10-287-31/+31
| | | | | | | (GH-10152) Configuring python with ./configure --with-pydebug CFLAGS="-D COUNT_ALLOCS -O0" makes "make smelly" fail as some symbols were being exported without the "Py_" or "_Py" prefixes.
* bpo-32892: Support subclasses of base types in isinstance checks for AST ↵Serhiy Storchaka2018-10-282-1/+5
| | | | | | | constants. (GH-9934) Some projects (e.g. Chameleon) create ast.Str containing an instance of the str subclass.
* bpo-35054: Add yet more index entries for symbols. (GH-10121)Serhiy Storchaka2018-10-2830-190/+223
|
* Fix mistakes on function coroutines related definitions (GH-9871)Andrés Delfino2018-10-281-8/+8
| | | | | | | Fix a bug I introduced in #9864 by which coroutines are treated as synonymous of function coroutines. Also, fix the same mistake (coroutines == function coroutines) already present in other parts of the reference. I'm very sorry for the hassle.
* bpo-35088: Update idlelib.help.copy_string docstring (#10164)Terry Jan Reedy2018-10-282-17/+19
| | | We now use git and backporting instead of hg and forward merging.