summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32030: Add _PyPathConfig_Init() (#4551)Victor Stinner2017-11-255-307/+476
| | | | | | | | | | | | | | * Add _PyPathConfig_Init() and _PyPathConfig_Fini() * Remove _Py_GetPathWithConfig() * _PyPathConfig_Init() returns _PyInitError to allow to handle errors properly * Add pathconfig_clear() * Windows calculate_path_impl(): replace Py_FatalError() with _PyInitError * Py_FinalizeEx() now calls _PyPathConfig_Fini() to release memory * Fix _Py_InitializeMainInterpreter() regression: don't initialize path config if _disable_importlib is false * PyPathConfig now uses dynamically allocated memory
* bpo-32128: Skip test_nntplib.test_article_head_body() (#4552)Victor Stinner2017-11-251-0/+1
| | | | | The NNTP server currently has troubles with SSL, whereas we don't have the control on this server. This test blocks all CIs, so disable it until a fix can be found.
* Asyncion-Dev docs: Fix the reference to sys.excepthook (GH-4414)Ashley Camba2017-11-241-2/+2
|
* bpo-32030: Add _PyMainInterpreterConfig.program_name (#4548)Victor Stinner2017-11-245-70/+96
| | | | | | * Py_Main() now calls Py_SetProgramName() earlier to be able to get the program name in _PyMainInterpreterConfig_ReadEnv(). * Rename prog to program_name * Rename progpath to program_name
* bpo-32030: Add _PyMainInterpreterConfig_ReadEnv() (#4542)Victor Stinner2017-11-248-142/+165
| | | | | | | | | | | | | | | | | | Py_GetPath() and Py_Main() now call _PyMainInterpreterConfig_ReadEnv() to share the same code to get environment variables. Changes: * Add _PyMainInterpreterConfig_ReadEnv() * Add _PyMainInterpreterConfig_Clear() * Add _PyMem_RawWcsdup() * _PyMainInterpreterConfig: rename pythonhome to home * Rename _Py_ReadMainInterpreterConfig() to _PyMainInterpreterConfig_Read() * Use _Py_INIT_USER_ERR(), instead of _Py_INIT_ERR(), for decoding errors: the user is able to fix the issue, it's not a bug in Python. Same change was made in _Py_INIT_NO_MEMORY(). * Remove _Py_GetPythonHomeWithConfig()
* bpo-32124: Document C functions safe before init (#4540)Victor Stinner2017-11-243-5/+214
| | | | Explicitly document C functions and C variables that can be set before Py_Initialize().
* bpo-32125: Remove Py_UseClassExceptionsFlag flag (#4544)Victor Stinner2017-11-244-3/+2
| | | This flag was deprecated and wasn't used anymore since Python 2.0.
* bpo-28684: Remove useless import added by the previous commit (GH-4547)xdegaye2017-11-241-1/+0
|
* Improve the String tutorial docs (GH-4541)Will White2017-11-241-7/+7
| | | | | The paragraph that contains example of string literal concatenation was placed after the section about concatenation using the '+' sign. Moved the paragraph to the appropriate section.
* bpo-28684: asyncio tests handle PermissionError raised on binding unix ↵xdegaye2017-11-245-11/+45
| | | | | | | | | sockets (GH-4503) The test.support.skip_unless_bind_unix_socket() decorator is used to skip asyncio tests that fail because the platform lacks a functional bind() function for unix domain sockets (as it is the case for non root users on the recent Android versions that run now SELinux in enforcing mode).
* bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)Berker Peksag2017-11-243-0/+11
| | | | | | | The previous behavior was to raise an exception NotImplementedError: result of type 0 when the value of the property is VT_EMPTY.
* bpo-32096: Remove obj and mem from _PyRuntime (#4532)Victor Stinner2017-11-2412-689/+685
| | | | | | | | | | | | | | | | | bpo-32096, bpo-30860: Partially revert the commit 2ebc5ce42a8a9e047e790aefbf9a94811569b2b6: * Move structures back from Include/internal/mem.h to Objects/obmalloc.c * Remove _PyObject_Initialize() and _PyMem_Initialize() * Remove Include/internal/pymalloc.h * Add test_capi.test_pre_initialization_api(): Make sure that it's possible to call Py_DecodeLocale(), and then call Py_SetProgramName() with the decoded string, before Py_Initialize(). PyMem_RawMalloc() and Py_DecodeLocale() can be called again before _PyRuntimeState_Init(). Co-Authored-By: Eric Snow <ericsnowcurrently@gmail.com>
* bpo-12382: Make OpenDatabase() raise better exception messages (GH-4528)Berker Peksag2017-11-243-0/+20
| | | | | | | | | | | Previously, 'msilib.OpenDatabase()' function raised a cryptical exception message when it couldn't open or create an MSI file. For example: Traceback (most recent call last): File "<stdin>", line 1, in <module> _msi.MSIError: unknown error 6e
* Extending Python Doc minor updates (GH-4518)Emanuele Gaifas2017-11-242-4/+4
| | | | Move footnote markers to be closer to the related terminology: before the end of the sentence, instead of after.
* bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (#4529)Berker Peksag2017-11-234-12/+19
|
* bpo-32099 Add deque variant of roundrobin() recipe (#4497)Raymond Hettinger2017-11-231-0/+19
| | | | * Minor wording tweaks
* bpo-19610: setup() now raises TypeError for invalid types (GH-4519)Berker Peksag2017-11-236-12/+112
| | | | | | The Distribution class now explicitly raises an exception when 'classifiers', 'keywords' and 'platforms' fields are not specified as a list.
* bpo-31979: Remove unused align_maxchar() function (#4527)Victor Stinner2017-11-231-13/+0
|
* bpo-32030: Fix calculate_path() on macOS (#4526)Victor Stinner2017-11-231-8/+9
|
* bpo-27535: Cleanup create_filter() (#4516)Victor Stinner2017-11-231-38/+18
| | | | | create_filter() now expects the action as a _Py_Identifier which avoids string comparison, and more important, to avoid handling the "unknown action" annoying case.
* bpo-32030: Rewrite calculate_path() (#4521)Victor Stinner2017-11-235-601/+966
| | | | | | | | | | | | | | | | | * calculate_path() rewritten in Modules/getpath.c and PC/getpathp.c * Move global variables into a new PyPathConfig structure. * calculate_path(): * Split the huge calculate_path() function into subfunctions. * Add PyCalculatePath structure to pass data between subfunctions. * Document PyCalculatePath fields. * Move cleanup code into a new calculate_free() subfunction * calculate_init() now handles Py_DecodeLocale() failures properly * calculate_path() is now atomic: only replace PyPathConfig (path_config) at once on success. * _Py_GetPythonHomeWithConfig() now returns an error on failure * Add _Py_INIT_NO_MEMORY() helper: report a memory allocation failure * Coding style fixes (PEP 7)
* bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)Berker Peksag2017-11-233-2/+49
|
* bpo-28762: Revert last commit (now using Android Unified Headers) (GH-4488)xdegaye2017-11-234-41/+4
|
* bpo-29040: Support building Android with Unified Headers (GH-4492)xdegaye2017-11-234-3/+13
|
* bpo-28538: Revert all the changes (now using Android Unified Headers) (GH-4479)xdegaye2017-11-233-83/+5
|
* bpo-32030: Add _PyMainInterpreterConfig.pythonhome (#4513)Victor Stinner2017-11-238-42/+135
| | | | | | | | | | | | * 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
* bpo-32030: Move PYTHONPATH to _PyMainInterpreterConfig (#4511)Victor Stinner2017-11-236-29/+29
| | | | Move _PyCoreConfig.module_search_path_env to _PyMainInterpreterConfig structure.
* bpo-10049: Add a "no-op" (null) context manager to contextlib (GH-4464)Jesse-Bakker2017-11-234-19/+57
| | | | | Adds a simpler and faster alternative to ExitStack for handling single optional context managers without having to change the lexical structure of your code.
* bpo-32100: IDLE: Fix pathbrowser errors; improve tests. (#4484)Cheryl Sabella2017-11-236-27/+90
| | | Patch mostly by Cheryl Sabella
* bpo-32030: Add _PyCoreConfig.module_search_path_env (#4504)Victor Stinner2017-11-227-86/+189
| | | | | | | | | | | 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.
* bpo-27535: Optimize warnings.warn() (#4508)Victor Stinner2017-11-222-45/+47
| | | | | | | | | | | | | * 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
* bpo-31324: Fix test.support.set_match_tests(None) (#4505)Victor Stinner2017-11-222-0/+7
|
* bpo-31324: Optimize support._match_test() (#4421)Victor Stinner2017-11-214-15/+111
| | | | | | | | | | | * 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>
* bpo-32105: add asyncio.BaseEventLoop.connect_accepted_socket versionadded to ↵AraHaan2017-11-212-0/+4
| | | | documentation. (#4491)
* bpo-31672 - Add one last minor clarification for idpattern (#4483)Barry Warsaw2017-11-212-6/+11
| | | Add one last minor clarification for idpattern
* Add comment and improve variable name in roundrobin() (#4486)Raymond Hettinger2017-11-211-4/+5
|
* bpo-32043: Rephrase -X dev documentation (#4478)Victor Stinner2017-11-211-4/+5
| | | | * should not be more verbose if the code is correct * enabled checks can be "expensive"
* bpo-32030: Add more options to _PyCoreConfig (#4485)Victor Stinner2017-11-219-57/+41
| | | | | | Py_Main() now handles two more -X options: * -X showrefcount: new _PyCoreConfig.show_ref_count field * -X showalloccount: new _PyCoreConfig.show_alloc_count field
* bpo-32089: Fix warnings filters in dev mode (#4482)Victor Stinner2017-11-217-39/+97
| | | | | | | | | | 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.
* bpo-32094: Update subprocess for -X dev (#4480)Victor Stinner2017-11-202-2/+79
| | | | | | | | 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().
* bpo-32066: Support pathlib.Path in create_unix_connection; sock arg should ↵Yury Selivanov2017-11-205-8/+31
| | | | be optional (#4447)
* bpo-32088: Display Deprecation in debug mode (#4474)Victor Stinner2017-11-204-7/+24
| | | | | | | | 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.
* bpo-32050: Fix -x option documentation (#4475)Victor Stinner2017-11-201-2/+0
| | | | The line number in correct when using the -x option: Py_Main() uses ungetc() to not skip the first newline character.
* bpo-32047: -X dev enables asyncio debug mode (#4418)Victor Stinner2017-11-206-18/+42
| | | | The new -X dev command line option now also enables asyncio debug mode.
* Remove duplicated import from datetime tests (#4444)Riccardo Magliocchetti2017-11-201-2/+0
|
* bpo-30904: Removed duplicated Host: header. (#4465)Vinay Sajip2017-11-191-1/+3
|
* Remove outdated .pyo reference from msilib docs (GH-4461)Berker Peksag2017-11-191-1/+1
| | | | | Since f299abdafa0f2b6eb7abae274861b19b361c96bc the remove_pyc() method no longer tries to remove .pyo files.
* Document parameters of BaseServer.finish_request() (GH-4445)Masayuki Yamamoto2017-11-191-1/+1
|
* [Doc] Update opcode for var-positional arguments (#4446)Moses Koledoye2017-11-181-1/+1
| | | `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`.
* bpo-32031: Fix pydoc `test_mixed_case_module_names_are_lower_cased` (GH-4441)xdegaye2017-11-181-1/+1
| | | When there is a symlink in the directory path of the standard library.