- 23 Nov, 2017 6 commits
-
-
xdegaye authored
-
xdegaye authored
-
Victor Stinner authored
* Py_Main() now reads the PYTHONHOME environment variable * Add _Py_GetPythonHomeWithConfig() private function * Add _PyWarnings_InitWithConfig() * init_filters() doesn't get the current core configuration from the current interpreter or Python thread anymore. Pass explicitly the configuration to _PyWarnings_InitWithConfig(). * _Py_InitializeCore() now fails on _PyWarnings_InitWithConfig() failure. * Pass configuration as constant
-
Victor Stinner authored
Move _PyCoreConfig.module_search_path_env to _PyMainInterpreterConfig structure.
-
Jesse-Bakker authored
Adds a simpler and faster alternative to ExitStack for handling single optional context managers without having to change the lexical structure of your code.
-
Cheryl Sabella authored
Patch mostly by Cheryl Sabella
-
- 22 Nov, 2017 3 commits
-
-
Victor Stinner authored
Changes: * Py_Main() initializes _PyCoreConfig.module_search_path_env from the PYTHONPATH environment variable. * PyInterpreterState_New() now initializes core_config and config fields * Compute sys.path a little bit ealier in _Py_InitializeMainInterpreter() and new_interpreter() * Add _Py_GetPathWithConfig() private function.
-
Victor Stinner authored
* Optimize warnings.filterwarnings(). Replace re.compile('') with None to avoid the cost of calling a regex.match() method, whereas it always matchs. * Optimize get_warnings_attr(): replace PyObject_GetAttrString() with _PyObject_GetAttrId(). Cleanup also create_filter(): * Use _Py_IDENTIFIER() to allow to cleanup strings at Python finalization * Replace Py_FatalError() with a regular exceptions
-
Victor Stinner authored
-
- 21 Nov, 2017 7 commits
-
-
Victor Stinner authored
* Rename support._match_test() to support.match_test(): make it public * Remove support.match_tests global variable. It is replaced with a new support.set_match_tests() function, so match_test() doesn't have to check each time if patterns were modified. * Rewrite match_test(): use different code paths depending on the kind of patterns for best performances. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
-
AraHaan authored
-
Barry Warsaw authored
Add one last minor clarification for idpattern
-
Raymond Hettinger authored
-
Victor Stinner authored
* should not be more verbose if the code is correct * enabled checks can be "expensive"
-
Victor Stinner authored
Py_Main() now handles two more -X options: * -X showrefcount: new _PyCoreConfig.show_ref_count field * -X showalloccount: new _PyCoreConfig.show_alloc_count field
-
Victor Stinner authored
The developer mode (-X dev) now creates all default warnings filters to order filters in the correct order to always show ResourceWarning and make BytesWarning depend on the -b option. Write a functional test to make sure that ResourceWarning is logged twice at the same location in the developer mode. Add a new 'dev_mode' field to _PyCoreConfig.
-
- 20 Nov, 2017 6 commits
-
-
Victor Stinner authored
Modify subprocess._args_from_interpreter_flags() to handle -X dev option. Add also unit tests for test.support.args_from_interpreter_flags() and test.support.optim_args_from_interpreter_flags().
-
Yury Selivanov authored
-
Victor Stinner authored
When Python is build is debug mode (Py_DEBUG), DeprecationWarning, PendingDeprecationWarning and ImportWarning warnings are now displayed by default. test_venv: run "-m pip" and "-m ensurepip._uninstall" with -W ignore::DeprecationWarning since pip code is not part of Python.
-
Victor Stinner authored
The line number in correct when using the -x option: Py_Main() uses ungetc() to not skip the first newline character.
-
Victor Stinner authored
The new -X dev command line option now also enables asyncio debug mode.
-
Riccardo Magliocchetti authored
-
- 19 Nov, 2017 3 commits
-
-
Vinay Sajip authored
-
Berker Peksag authored
Since f299abda the remove_pyc() method no longer tries to remove .pyo files.
-
Masayuki Yamamoto authored
-
- 18 Nov, 2017 5 commits
-
-
Moses Koledoye authored
`BUILD_MAP_UNPACK_WITH_CALL` was duplicated as the opcode for both var-positional and var-keyword arguments. The opcode for the former was updated as `BUILD_TUPLE_UNPACK_WITH_CALL`.
-
xdegaye authored
When there is a symlink in the directory path of the standard library.
-
xdegaye authored
* Run gzip with separate command line options (Android understands '-f9' as the name of a file). * Creation of a hard link is controled by SELinux on Android.
-
xdegaye authored
-
Andrew Svetlov authored
* Drop legacy SSL transport * Drop unused import * Fix Windows tests * Drop never executed on Python 3.4+ code
-
- 17 Nov, 2017 2 commits
-
-
Henk-Jaap Wagenaar authored
-
Victor Stinner authored
Remove the following fields from tok_state structure which are now used unused: * altwarning: "Issue warning if alternate tabs don't match" * alterror: "Issue error if alternate tabs don't match" * alttabsize: "Alternate tab spacing" Replace alttabsize variable with ALTTABSIZE define.
-
- 16 Nov, 2017 8 commits
-
-
native-api authored
-
Erik Bray authored
`kargs` -> `kwargs`
-
Serhiy Storchaka authored
The log_rounds parameter for Blowfish has been replaced with the rounds parameter.
-
Victor Stinner authored
Add a new "developer mode": new "-X dev" command line option to enable debug checks at runtime. Changes: * Add unit tests for -X dev * test_cmd_line: replace test.support with support. * Fix _PyRuntimeState_Fini(): Use the same memory allocator than _PyRuntimeState_Init(). * Fix _PyMem_GetDefaultRawAllocator()
-
Serhiy Storchaka authored
in regular expressions.
-
Serhiy Storchaka authored
-
Serhiy Storchaka authored
from collections.abc rather than collections.
-
Victor Stinner authored
Parse more env vars in Py_Main(): * Add more options to _PyCoreConfig: * faulthandler * tracemalloc * importtime * Move code to parse environment variables from _Py_InitializeCore() to Py_Main(). This change fixes a regression from Python 3.6: PYTHONUNBUFFERED is now read before calling pymain_init_stdio(). * _PyFaulthandler_Init() and _PyTraceMalloc_Init() now take an argument to decide if the module has to be enabled at startup. * tracemalloc_start() is now responsible to check the maximum number of frames. Other changes: * Cleanup Py_Main(): * Rename some pymain_xxx() subfunctions * Add pymain_run_python() subfunction * Cleanup Py_NewInterpreter() * _PyInterpreterState_Enable() now reports failure * init_hash_secret() now considers pyurandom() failure as an "user error": don't fail with abort(). * pymain_optlist_append() and pymain_strdup() now sets err on memory allocation failure.
-