summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32663 Make SMTPUTF8SimTests run (#5314)chason2018-07-252-25/+16
| | | | | | | | | | | Enable and fix SMTPUTF8SimTests in test_smtplib. The tests for SMTPUTF8SimTests in test_smtplib.py were not actually being run because test_smtplib was still using the 'test_main' pattern, and the class was never added to test_main. Additionally, one of the tests needed to be moved to the non-UTF8 server class because it relies on the server not being UTF-8 compatible (and it had a bug in in).
* bpo-34228: Allow PYTHONTRACEMALLOC=0 (GH-8467)Victor Stinner2018-07-254-9/+30
| | | | | PYTHONTRACEMALLOC=0 environment variable and -X tracemalloc=0 command line option are now allowed to disable explicitly tracemalloc at startup.
* bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385)Ammar Askar2018-07-254-2/+34
| | | On Windows, passing a negative value to local results in an OSError because localtime_s on Windows does not support negative timestamps. Unfortunately this means that fold detection for timestamps between 0 and max_fold_seconds will result in this OSError since we subtract max_fold_seconds from the timestamp to detect a fold. However, since we know there haven't been any folds in the interval [0, max_fold_seconds) in any timezone, we can hackily just forego fold detection for this time range on Windows.
* bpo-13041: Use shutil.get_terminal_size() in argparse.HelpFormatter (GH-8459)Berker Peksag2018-07-253-6/+8
|
* bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208)Aaron Ang2018-07-251-2/+2
|
* bpo-34195: Fix case-sensitive comparison in test_nt_helpers (GH-8448)Tim Golden2018-07-251-5/+11
| | | | | * Fix case-sensitive comparison test_nt_helpers assumed that two versions of a Windows path could be compared case-sensitively. This is not the case, and the difference can be triggered (apparently) by running the test on a path somewhere below a Junction.
* bpo-34218: Fix a leak in _elementtree.c introduced in GH-6769. (GH-8460)Serhiy Storchaka2018-07-251-0/+1
|
* bpo-34170: Cleanup pymain_run_python() (GH-8455)Victor Stinner2018-07-251-107/+67
| | | | * Move _PyMain.main_importer_path inside pymain_run_python * If main_importer_path is non-NULL, update sys.path[0] earlier
* bpo-34170: Add _Py_InitializeFromConfig() (GH-8454)Victor Stinner2018-07-256-200/+297
| | | | | | | | | | | | | | * If _Py_InitializeCore() is called twice, the second call now copies and apply (partially) the new configuration. * Rename _Py_CommandLineDetails to _PyCmdline * Move more code into pymain_init(). The core configuration created by Py_Main() is new destroyed before running Python to reduce the memory footprint. * _Py_InitializeCore() now returns the created interpreter. _Py_InitializeMainInterpreter() now expects an interpreter. * Remove _Py_InitializeEx_Private(): _freeze_importlib now uses _Py_InitializeFromConfig() * _PyCoreConfig_InitPathConfig() now only computes the path configuration if needed.
* bpo-34217: Use lowercase header for Windows (GH-8453)erikjanss2018-07-252-2/+2
|
* bpo-34170: Add _PyCoreConfig.bytes_warning (GH-8447)Victor Stinner2018-07-247-138/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add more fields to _PyCoreConfig: * _check_hash_pycs_mode * bytes_warning * debug * inspect * interactive * legacy_windows_fs_encoding * legacy_windows_stdio * optimization_level * quiet * unbuffered_stdio * user_site_directory * verbose * write_bytecode Changes: * Remove pymain_get_global_config() and pymain_set_global_config() which became useless. These functions have been replaced by _PyCoreConfig_GetGlobalConfig() and _PyCoreConfig_SetGlobalConfig(). * sys.flags.dont_write_bytecode value is now restricted to 1 even if -B option is specified multiple times on the command line. * PyThreadState_Clear() now uses the config from the current interpreter rather than using global Py_VerboseFlag
* Fix site module documentation. (GH-8441)Mariatta2018-07-241-1/+1
| | | The script will exit with the number 0 (zero), instead of the letter O.
* bpo-34136: Make test_do_not_recreate_annotations more lenient. (GH-8437)Serhiy Storchaka2018-07-241-5/+4
|
* bpo-34170: Add _PyCoreConfig.isolated (GH-8417)Victor Stinner2018-07-247-354/+412
| | | | | | | | | | | | | | | * _PyCoreConfig: add isolated and site_import attributes * Replace Py_IgnoreEnvironment with config->ignore_environment when reading the current configuration * _PyCoreConfig_Read() now sets ignore_environment, utf8_mode, isolated and site_import from Py_IgnoreEnvironment, Py_UTF8Mode, Py_IsolatedFlag and Py_NoSiteFlag * _Py_InitializeCore() now sets Py_xxx flags from the configuration * pymain_read_conf() now uses _PyCoreConfig_Copy() to save/restore the configuration. * Rename _disable_importlib of _PyCoreConfig to _install_importlib * _PyCoreConfig_SetGlobalConfig() now also set Py_HashRandomizationFlag * Replace !Py_NoSiteFlag with core_config->site_import
* bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351)Serhiy Storchaka2018-07-243-17/+21
| | | | | Now base64.Error is always raised instead of UnboundLocalError or OverflowError.
* bpo-29209: Remove old-deprecated features in ElementTree. (GH-6769)Serhiy Storchaka2018-07-247-182/+73
| | | | | Also make getchildren() and getiterator() emitting a DeprecationWarning instead of PendingDeprecationWarning.
* bpo-33720: Refactor marshalling/unmarshalling floats. (GH-8071)Serhiy Storchaka2018-07-243-112/+77
|
* bpo-34149: Behavior of the min/max with key=None (GH-8328)Alexander Marshalov2018-07-245-8/+17
| | | Improve consistency with the signature for sorted(), heapq.nsmallest(), heapq.nlargest(), and itertools.groupby().
* bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816)Matthias Bussonnier2018-07-231-11/+17
|
* bpo-32500: Fix error messages for sequence and mapping C API. (GH-7846)Serhiy Storchaka2018-07-232-0/+24
| | | | | Fix error messages for PySequence_Size(), PySequence_GetItem(), PySequence_SetItem() and PySequence_DelItem() called with a mapping and PyMapping_Size() called with a sequence.
* bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. ↵Serhiy Storchaka2018-07-233-8/+22
| | | | (GH-8262)
* bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381)Serhiy Storchaka2018-07-231-1/+1
|
* bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382)Serhiy Storchaka2018-07-231-5/+5
|
* bpo-34190: Fix reference leak in call_function() (GH-8413)jdemeyer2018-07-231-5/+8
|
* bpo-33336, imaplib: Legalize MOVE command (GH-6569)Matěj Cepl2018-07-232-0/+4
| | | | | imaplib now allows MOVE command in IMAP4.uid() (RFC 6851: IMAP MOVE Extension) and potentially as a name of supported method of IMAP4 object.
* bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406)Victor Stinner2018-07-231-4/+14
| | | | | | | | | | When Python is installed on Windows, python -m test test_tools failed because it tried to run Tools\scripts\2to3.py which requires an argument. Skip this script. On other platforms or on Windows but when run from source code (not installed), the script is called "2to3" instead of "2to.py" and so was already skipped. Modify also the unit test to unload all modules which have been loaded by the test.
* AppVeyor: build Python in 64-bit mode (GH-8363)Victor Stinner2018-07-231-3/+3
| | | | Previously, Python was built in 32-bit mode and so issues specific to 64-bit mode like compiler warnings could be missed.
* bpo-21446: Update reload fixer to use importlib (GH-8391)Berker Peksag2018-07-234-10/+12
|
* bpo-940286: Fix pydoc to show cross refs correctly (GH-8390)Berker Peksag2018-07-232-2/+5
|
* bpo-34127: Fix grammar in error message with respect to argument count (GH-8395)Xtreak2018-07-223-4/+22
|
* bpo-34189: Fix checking for bugfix Tcl version. (GH-8397)Serhiy Storchaka2018-07-222-4/+14
|
* bpo-34189: Add simple tests for new Tk widget options. (GH-8396)Serhiy Storchaka2018-07-221-2/+25
|
* Fix versionchanged indentation in popitem documentation (GH-8387)Andrés Delfino2018-07-211-3/+2
|
* bpo-34181: Fix running Lib/test/test_typing.py as a script. (GH-8380)Serhiy Storchaka2018-07-211-2/+2
|
* bpo-34179: Make sure decimal context doesn't affect other tests. (#8376)Bo Bayles2018-07-211-13/+13
|
* bpo-34126: Fix crashes while profiling invalid calls. (GH-8300)jdemeyer2018-07-213-4/+28
|
* bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367)Xtreak2018-07-211-3/+5
|
* bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364)Serhiy Storchaka2018-07-211-5/+9
|
* bpo-34170: _PyCoreConfig_Read() leaves Py_IsolatedFlag unchanged (GH-8361)Victor Stinner2018-07-216-41/+44
| | | | | | | | | | * _PyCoreConfig_Read() no longer directly modifies Py_IsolatedFlag and Py_NoSiteFlag global configuration flags. The function now requires two pointers to integer, so these flags can be set later, to avoid side effets in _PyCoreConfig_Read(). * pathconfig_global_init() now leaves Py_IsolatedFlag and Py_NoSiteFlag unchanged. * Fix pathconfig_global_init(): avoid computing the path configuration twice, use _PyCoreConfig_SetPathConfig().
* Fix Windows compiler warning in tokenize.c (GH-8359)Victor Stinner2018-07-211-1/+1
| | | | | | Fix the following warning on Windows: parser\tokenizer.c(1297): warning C4244: 'function': conversion from '__int64' to 'int', possible loss of data.
* bpo-33723: Fix test_time.test_process_time() (GH-8358)Victor Stinner2018-07-211-4/+9
| | | | | | The test failed on my laptop because the busy loop took 15.9 ms whereas the test expects at least 20 ms. Modify test_process_time() as test_thread_time() has been modified recently: only require 15 ms instead of 20 ms.
* bpo-34170: Rework _PyCoreConfig_Read() to avoid side effect (GH-8353)Victor Stinner2018-07-218-146/+358
| | | | | | | | | | | | | | | | | | | | | | | | | Rework _PyCoreConfig_Read() function which *reads* core configuration to not *modify* the path configuration. A new _PyCoreConfig_SetPathConfig() function now recreates the path configuration from the core configuration. This function is now called very late in _Py_InitializeCore(), just before calling initimport(). Changes: * Add _PyCoreConfig.dll_path * Py_SetPath() now fails with a fatal python error on memory allocation failure. * Rename _PyPathConfig_Calculate() to _PyPathConfig_Calculate_impl() * Replace _PyPathConfig_Init() with _PyPathConfig_Calculate(): the function now requires a _PyPathConfig * Add _PyPathConfig_SetGlobal() to set the _Py_path_config global variable. * Add _PyCoreConfig_InitPathConfig(): compute the path configuration * Add _PyCoreConfig_SetPathConfig(): set path configuration from core configuration * Rename wstrlist_append() to _Py_wstrlist_append() * _Py_wstrlist_append() now handles integer overflow.
* bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253)Vinay Sajip2018-07-202-1/+9
|
* Remove extra parentheses in output formatting tutorial (GH-8350)Aaqa Ishtyaq2018-07-201-2/+2
| | | The parentheses were incorrect.
* bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043)Victor Stinner2018-07-205-6/+52
| | | | | Py_Main() can again be called after Py_Initialize(), as in Python 3.6. The new configuration is ignored, except of _PyMainInterpreterConfig.argv which is used to update sys.argv.
* bpo-34162: idlelib/NEWS.txt entries to 2018-7-20 (GH-8345)Terry Jan Reedy2018-07-201-2/+34
|
* bpo-30237: Output error when ReadConsole is canceled by CancelSynchronousIo. ↵ValeriyaSinevich2018-07-193-2/+11
| | | | (GH-7911)
* bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331)Victor Stinner2018-07-191-2/+3
| | | | | Increase the timeout: give timeout x 4 instead of timeout x 2 to threads to wait until the Event is set, but reduce the sleep from 500 ms to 250 ms. So the test should be more reliable and faster!
* bpo-34130: Fix test_signal.test_warn_on_full_buffer() (GH-8327)Victor Stinner2018-07-181-15/+41
| | | | | | | | | | | | | | | | | On Windows, sometimes test_signal.test_warn_on_full_buffer() fails to fill the socketpair buffer. In that case, the C signal handler succeed to write into the socket, it doesn't log the expected send error, and so the test fail. On Windows, the test now uses a timeout of 50 ms to fill the socketpair buffer to fix this race condition. Other changes: * Begin with large chunk size to fill the buffer to speed up the test. * Add error messages to assertion errors to more easily identify which assertion failed. * Don't set the read end of the socketpair as non-blocking.
* bpo-34130: Fix test_signal.test_socket() (GH-8326)Victor Stinner2018-07-181-1/+0
| | | | | | | | test_signal.test_socket(): On Windows, sometimes even if the C signal handler succeed to write the signal number into the write end of the socketpair, the test fails with a BlockingIOError on the non-blocking read.recv(1) because the read end of the socketpair didn't receive the byte yet. Fix the race condition on Windows by setting the read end as blocking.