- 03 Ara, 2017 1 kayıt (commit)
-
-
Nick Coghlan yazdı
Previously, CO_NOFREE was set in the compiler, which meant it could end up being set incorrectly when code objects were created directly. Setting it in the constructor based on freevars and cellvars ensures it is always accurate, regardless of how the code object is defined.
-
- 02 Ara, 2017 4 kayıt (commit)
-
-
Julien Palard yazdı
Also addresses doc build failures documented in bpo-32200.
-
Neil Schemenauer yazdı
If the marshal or bytecode formats get changed, frozen.c needs to be updated as well. It can be easy to miss this step and not doing so can cause test_importlib to crash in mysterious ways. Add an explict unit test to make it easier to track down the problem.
-
Serhiy Storchaka yazdı
* Revert "bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)" This reverts commit af5a8950. * Revert "bpo-32030: Fix config_get_program_name() on macOS (#4669)" This reverts commit e23c06e2. * Revert "bpo-32030: Add Python/pathconfig.c (#4668)" This reverts commit 0ea395ae. * Revert "bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)" This reverts commit ebac19da. * Revert "bpo-32030: Fix Py_GetPath(): init program_name (#4665)" This reverts commit 9ac3d888.
-
Victor Stinner yazdı
_PyPathConfig_Init() now also initialize home and program_name: * Rename existing _PyPathConfig_Init() to _PyPathConfig_Calculate(). Add a new _PyPathConfig_Init() function in pathconfig.c which handles the _Py_path_config variable and call _PyPathConfig_Calculate(). * Add home and program_name fields to _PyPathConfig.home * _PyPathConfig_Init() now initialize home and program_name from main_config * Py_SetProgramName(), Py_SetPythonHome() and Py_GetPythonHome() now calls Py_FatalError() on failure, instead of silently ignoring failures. * config_init_home() now gets directly _Py_path_config.home to only get the value set by Py_SetPythonHome(), or NULL if Py_SetPythonHome() was not called. * config_get_program_name() now gets directly _Py_path_config.program_name to only get the value set by Py_SetProgramName(), or NULL if Py_SetProgramName() was not called. * pymain_init_python() doesn't call Py_SetProgramName() anymore, _PyPathConfig_Init() now always sets the program name * Call _PyMainInterpreterConfig_Read() in pymain_parse_cmdline_envvars_impl() to control the memory allocator * C API documentation: it's no more safe to call Py_GetProgramName() before Py_Initialize().
-
- 01 Ara, 2017 10 kayıt (commit)
-
-
Victor Stinner yazdı
-
Victor Stinner yazdı
* Factorize code from PC/getpathp.c and Modules/getpath.c to remove duplicated code * rename pathconfig_clear() to _PyPathConfig_Clear() * Inline _PyPathConfig_Fini() in pymain_impl() and then remove it, since it's a oneliner
-
Victor Stinner yazdı
Changes: * _PyPathConfig_Fini() cannot be called in Py_FinalizeEx(). Py_Initialize() and Py_Finalize() can be called multiple times, but it must not "forget" parameters set by Py_SetProgramName(), Py_SetPath() or Py_SetPythonHome(), whereas _PyPathConfig_Fini() clear all these parameters. * config_get_program_name() and calculate_program_full_path() now also decode paths using Py_DecodeLocale() to use the surrogateescape error handler, rather than decoding using mbstowcs() which is strict. * Change _Py_CheckPython3() prototype: () => (void) * Truncate a few lines which were too long
-
Victor Stinner yazdı
* _PyMainInterpreterConfig_ReadEnv() now sets program_name from environment variables and pymain_parse_envvars() implements the falls back on argv[0]. * Remove _PyMain.program_name: use the program_name from _PyMainInterpreterConfig * Move the Py_SetProgramName() call back to pymain_init_python(), just before _Py_InitializeCore(). * pathconfig_global_init() now also calls _PyMainInterpreterConfig_Read() to set program_name if it isn't set yet * Cleanup PyCalculatePath: pass main_config to subfunctions to get directly fields from main_config (home, module_search_path_env and program_name)
-
Victor Stinner yazdı
* Rename PyPathConfig structure to _PyPathConfig and move it to Include/internal/pystate.h * Rename path_config to _Py_path_config * _PyPathConfig: Rename program_name field to program_full_path * Add assert(str != NULL); to _PyMem_RawWcsdup(), _PyMem_RawStrdup() and _PyMem_Strdup(). * Rename calculate_path() to pathconfig_global_init(). The function now does nothing if it's already initiallized.
-
John Chen yazdı
-
xdegaye yazdı
Skip tests with test.support.import_module('multiprocessing.synchronize') instead when the semaphore implementation is broken or missing.
-
Serhiy Storchaka yazdı
-
Serhiy Storchaka yazdı
The current behaviour of yield expressions inside comprehensions and generator expressions is essentially an accident of implementation - it arises implicitly from the way the compiler handles yield expressions inside nested functions and generators. Since the current behaviour wasn't deliberately designed, and is inherently confusing, we're deprecating it, with no current plans to reintroduce it. Instead, our advice will be to use a named nested generator definition for cases where this behaviour is desired.
-
Nir Soffer yazdı
In _io_FileIO_readall_impl(), lseek() and _Py_fstat_noraise() were called without releasing the GIL. This can cause all threads to hang for unlimited time when calling FileIO.read() and the NFS server is not accessible.
-
- 30 Kas, 2017 9 kayıt (commit)
-
-
Victor Stinner yazdı
Fix the following false-alarm Coverity warning: Result is not floating-point (UNINTENDED_INTEGER_DIVISION)integer_division: Dividing integer expressions 9223372036854775807LL and 1000LL, and then converting the integer quotient to type double. Any remainder, or fractional part of the quotient, is ignored. To compute and use a non-integer quotient, change or cast either operand to type double. If integer division is intended, consider indicating that by casting the result to type long long .
-
Victor Stinner yazdı
Avoid also "cd $(srcdir)" to not change the current directory.
-
Serhiy Storchaka yazdı
* Fixed saving bytearrays. * Identical objects will be saved only once. * Equal references will be load as identical objects. * Added support for saving and loading recursive data structures.
-
Victor Stinner yazdı
When PyGILState_Ensure() is called in a non-Python thread before PyEval_InitThreads(), only call PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. Add an unit test in test_embed.
-
Serhiy Storchaka yazdı
with the persistent_id() and persistent_load() methods.
-
Victor Stinner yazdı
_Py_InitializeEx_Private() now calls _PyMainInterpreterConfig_ReadEnv() to read environment variables PYTHONHOME and PYTHONPATH, and set the program name.
-
Victor Stinner yazdı
Handle PyModule_AddIntConstant() and PyModule_AddStringConstant() failures. Add also constants before calling setup_readline(), since setup_readline() registers callbacks which uses a reference to the module, whereas the module is destroyed if adding constants fails. Fix Coverity warning: CID 1414686: Unchecked return value (CHECKED_RETURN) 2. check_return: Calling PyModule_AddStringConstant without checking return value (as is done elsewhere 45 out of 55 times).
-
Victor Stinner yazdı
bpo-31705.
-
Victor Stinner yazdı
* bpo-32101: Add sys.flags.dev_mode flag Rename also the "Developer mode" to the "Development mode". * bpo-32101: Add PYTHONDEVMODE environment variable Mention it in the development chapiter.
-
- 29 Kas, 2017 10 kayıt (commit)
-
-
Jesse-Bakker yazdı
* Add most_recent_first parameter to tracemalloc.Traceback.format to allow reversing the order of the frames in the output * Reversed default sorting of tracemalloc.Traceback frames * Allowed negative limit, truncating from the other side.
-
Victor Stinner yazdı
Partially revert the commit fe2d5bab. Clarify the usage of this file in Misc/README.
-
Andrew Svetlov yazdı
* Drop Python 3.4 code from asyncio * Fix notes * Add missing imports * Restore comment * Resort imports * Drop Python 3.4-3.5 specific code * Drop redunant check * Fix tests * Restore _COROUTINE_TYPES order * Remove useless code
-
Victor Stinner yazdı
* Fix _PyMem_SetupAllocators("debug"): always restore allocators to the defaults, rather than only caling _PyMem_SetupDebugHooks(). * Add _PyMem_SetDefaultAllocator() helper to set the "default" allocator. * Add _PyMem_GetAllocatorsName(): get the name of the allocators * main() now uses debug hooks on memory allocators if Py_DEBUG is defined, rather than calling directly malloc() * Document default memory allocators in C API documentation * _Py_InitializeCore() now fails with a fatal user error if PYTHONMALLOC value is an unknown memory allocator, instead of failing with a fatal internal error. * Add new tests on the PYTHONMALLOC environment variable * Add support.with_pymalloc() * Add the _testcapi.WITH_PYMALLOC constant and expose it as support.with_pymalloc(). * sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so replace it with support.with_pymalloc(). * pythoninfo: add _testcapi collector for pymem
-
Victor Stinner yazdı
-
xdegaye yazdı
Remove the test.support.requires_android_level decorator.
-
xdegaye yazdı
-
Terry Jan Reedy yazdı
-
Terry Jan Reedy yazdı
-
Terry Jan Reedy yazdı
-
- 28 Kas, 2017 6 kayıt (commit)
-
-
Serhiy Storchaka yazdı
characters/bytes for non-negative n. This makes it compatible with read() methods of other file-like objects.
-
Barry Warsaw yazdı
``uuid.getnode()`` now preferentially returns universally administered MAC addresses if available, over locally administered MAC addresses. This makes a better guarantee for global uniqueness of UUIDs returned from ``uuid.uuid1()``. If only locally administered MAC addresses are available, the first such one found is returned. Also improve internal code style by being explicit about ``return None`` rather than falling off the end of the function. Improve the test robustness.
-
Victor Stinner yazdı
Revert distutils changes of the commit 696b501c and remove the realm variable.
-
Victor Stinner yazdı
CPython migrated from CVS to Subversion, to Mercurial, and then to Git. CVS and Subversion are not more used to develop CPython. * platform module: drop support for sys.subversion. The sys.subversion attribute has been removed in Python 3.3. * Remove Misc/svnmap.txt * Remove Tools/scripts/svneol.py * Remove Tools/scripts/treesync.py
-
Serhiy Storchaka yazdı
-
Serhiy Storchaka yazdı
-