Commit Graph

102211 Commits

Author SHA1 Message Date
Mickaël Schoentgen 3f8c6913b8 bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527) 2018-07-29 21:26:52 +03:00
Franz Wöllert d2e902e4fb bpo-31047: Fix ntpath.abspath for invalid paths (GH-8544) 2018-07-29 13:47:09 +01:00
Stéphane Wirtel b7fd73896d bpo-34231: PYTHONBREAKPOINT is not documented on python --help (GH-8475) 2018-07-29 11:27:16 +01:00
Vinay Sajip c536beedd5 Updated MSI README to mention dependency on .NET 3.5. (GH-8375) 2018-07-29 10:05:20 +01:00
Berker Peksag a71fed0b75 bpo-8145: Improve isolation_level documentation (GH-8499)
Initial patch by R. David Murray.
2018-07-29 10:01:38 +01:00
Berker Peksag 11eb1a9470 bpo-34251: Restore msilib.Win64 to preserve compatibility (GH-8510) 2018-07-28 16:02:56 -05:00
Tim Golden 1561703a78
bpo-42349: Switch to test.support.unlink per review by Serhiy Storchaka (GH-8529)
Serhiy Storchaka pointed out that using test.support.unlink was preferable
2018-07-28 18:27:11 +01:00
Raymond Hettinger c6dabe37e3
bpo-33089: Multidimensional math.hypot() (GH-8474) 2018-07-28 07:48:04 -07:00
Elena Oat 5032692746 bpo-24356: Specify which Python binary will be used with venv (GH-6589) 2018-07-28 13:58:05 +01:00
Dong-hee Na 8fe9eed937 bpo-33476: Fix _header_value_parser when address group is missing final ';' (GH-7484) 2018-07-28 13:55:11 +01:00
INADA Naoki 1d2dafa249 bpo-33666: Add what's new entry for os.errno removal (GH-#8497)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2018-07-28 13:47:31 +01:00
johnthagen 95dfb9c3ae bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877)
Clarify how to bind to all interfaces using socket
2018-07-28 11:03:23 +01:00
Andrés Delfino 937fb55d35 bpo-5978: Document that profiling needs cmd/function to return (GH-7938)
<!-- issue-number: bpo-5978 -->
https://bugs.python.org/issue5978
<!-- /issue-number -->
2018-07-28 11:01:24 +01:00
Sanyam Khurana b4bc5cab82 bpo-29710: Clarify documentation for Bitwise binary operation (GH-1691)
Mathematically, bitwise operations on integers behave as if there were an
infinite number of sign bits. Pragmatically, that gives the same answer as
using one extra sign bit for the bitwise logical operations.
2018-07-28 15:15:50 +10:00
Berker Peksag 612dbefe9d
bpo-30722: Fix NEWS entries (GH-8501) 2018-07-27 18:49:58 +03:00
Sergey Fedoseev aee632dfbb Remove some unused code in _pysqlite_query_execute() (GH-8495)
Unused since commit ab994ed8b9.
2018-07-27 13:06:03 +03:00
INADA Naoki 3e7d18a54b
vsts: Avoid conflict with Homebrew Python (GH-8430)
/usr/local/lib/pythonX.Y is used by Homebrew's Python already.
2018-07-27 16:52:24 +09:00
Berker Peksag defcffdf86
bpo-12743: Delete comment from marshal.rst (GH-8457)
Also, update the list of exceptions that may raised by PyMarshal_*
functions. We usually don't document exceptions raised by a
function, but in this case most of them were already documented
in C API and standard library documentation.
2018-07-27 07:35:11 +03:00
Tim Golden 6a62e1d365
bpo-34239: Convert test_bz2 to use tempfile (#8485)
* bpo-34239: Convert test_bz2 to use tempfile

test_bz2 currently uses the test.support.TESTFN functionality which creates a temporary file local to the test directory named around the pid.

This can give rise to race conditions where tests are competing with each other to delete and recreate the file.

This change converts the tests to use tempfile.mkstemp which gives a different file every time from the system's temp area
2018-07-26 22:05:00 +01:00
Victor Stinner 56b29b6d6f
bpo-34170, test_embed: write Py_Initialize() tests (GH-8484) 2018-07-26 18:57:56 +02:00
Andrés Delfino e42b705188 Fix typo: variables(s) (GH-8482)
Remove extra `(s)` in the documentation of `compound_stmts`.
2018-07-26 16:35:23 +01:00
Serhiy Storchaka 3b5342caaa
bpo-34201: Tweak test_buffer. (GH-8481) 2018-07-26 17:34:07 +03:00
Victor Stinner d145775b45
bpo-34170: Cleanup pymain_read_conf() (GH-8476)
* Config: Rename ignore_environment field to use_environment.
* _PyCoreConfig_Read(): if isolated is set, use_environment and
  site_import are now always set to 0.
* Inline pymain_free_raw() into pymain_free()
* Move config_init_warnoptions() call into pymain_read_conf_impl()
* _PyCoreConfig_Read(): don't replace values if they are already set:
  faulthandler, pycache_prefix, home.
2018-07-26 16:04:56 +02:00
Steve Dower 5473f061f5
bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) 2018-07-26 04:23:10 -07:00
Serhiy Storchaka e0d67f17cc
bpo-34201: Make ndarray.readonly a bool and use stricter tests in test_buffer. (GH-8414) 2018-07-26 13:23:03 +03:00
Serhiy Storchaka 7cb7bcff20
bpo-20260: Implement non-bitwise unsigned int converters for Argument Clinic. (GH-8434) 2018-07-26 13:22:16 +03:00
Serhiy Storchaka 323748ad74
bpo-34197: Make _csv.Dialect attributes booleans. (GH-8440)
Attributes skipinitialspace, doublequote and strict are now
booleans instead of integers 0 or 1.
2018-07-26 13:21:09 +03:00
Victor Stinner ecf411c59e
bpo-34170: Enhance _PyCoreConfig_Read() (GH-8468)
* Inline cmdline_get_env_flags() into config_read_env_vars():
  _PyCoreConfig_Read() now reads much more environment variables like
  PYTHONVERBOSE.
* Allow to override faulthandler and allocator even if dev_mode=1.
  PYTHONMALLOC is now the priority over PYTHONDEVMODE.
* Fix _PyCoreConfig_Copy(): copy also install_signal_handlers,
  coerce_c_locale and coerce_c_locale_warn
* _PyCoreConfig.install_signal_handlers default is now 1: install
  signals by default
* Fix also a compiler warning: don't define _PyPathConfig type twice.
2018-07-26 02:37:22 +02:00
chason 48ed88a93b bpo-32663 Make SMTPUTF8SimTests run (#5314)
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).
2018-07-25 15:01:28 -04:00
Victor Stinner 60b04c9f6f
bpo-34228: Allow PYTHONTRACEMALLOC=0 (GH-8467)
PYTHONTRACEMALLOC=0 environment variable and -X tracemalloc=0 command
line option are now allowed to disable explicitly tracemalloc at
startup.
2018-07-25 19:23:53 +02:00
Ammar Askar 96d1e69a12 bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385)
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.
2018-07-25 12:54:58 -04:00
Berker Peksag 74102c9a5f
bpo-13041: Use shutil.get_terminal_size() in argparse.HelpFormatter (GH-8459) 2018-07-25 18:23:44 +03:00
Aaron Ang c0f0a7669c bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208) 2018-07-25 17:21:32 +03:00
Tim Golden ff64add8d4
bpo-34195: Fix case-sensitive comparison in test_nt_helpers (GH-8448)
* 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.
2018-07-25 14:36:54 +01:00
Serhiy Storchaka ee98e7bbde
bpo-34218: Fix a leak in _elementtree.c introduced in GH-6769. (GH-8460) 2018-07-25 14:52:45 +03:00
Victor Stinner d3b191992e
bpo-34170: Cleanup pymain_run_python() (GH-8455)
* Move _PyMain.main_importer_path inside pymain_run_python
* If main_importer_path is non-NULL, update sys.path[0] earlier
2018-07-25 10:21:03 +02:00
Victor Stinner 1dc6e3906a
bpo-34170: Add _Py_InitializeFromConfig() (GH-8454)
* 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.
2018-07-25 02:49:17 +02:00
erikjanss 6cf8255912 bpo-34217: Use lowercase header for Windows (GH-8453) 2018-07-25 09:41:46 +09:00
Victor Stinner 53b7d4e402
bpo-34170: Add _PyCoreConfig.bytes_warning (GH-8447)
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
2018-07-25 01:37:05 +02:00
Mariatta 95d34c2a37
Fix site module documentation. (GH-8441)
The script will exit with the number 0 (zero), instead of the letter O.
2018-07-24 09:14:20 -07:00
Serhiy Storchaka c206f0d137
bpo-34136: Make test_do_not_recreate_annotations more lenient. (GH-8437) 2018-07-24 15:05:28 +03:00
Victor Stinner d19d8d5279
bpo-34170: Add _PyCoreConfig.isolated (GH-8417)
* _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
2018-07-24 13:55:48 +02:00
Serhiy Storchaka ac0b3c2f4d
bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351)
Now base64.Error is always raised instead of UnboundLocalError or
OverflowError.
2018-07-24 12:52:51 +03:00
Serhiy Storchaka 02ec92fa7b
bpo-29209: Remove old-deprecated features in ElementTree. (GH-6769)
Also make getchildren() and getiterator() emitting
a DeprecationWarning instead of PendingDeprecationWarning.
2018-07-24 12:03:34 +03:00
Serhiy Storchaka c5734998d9
bpo-33720: Refactor marshalling/unmarshalling floats. (GH-8071) 2018-07-24 10:55:47 +03:00
Alexander Marshalov e22072fb11 bpo-34149: Behavior of the min/max with key=None (GH-8328)
Improve consistency with the signature for sorted(), heapq.nsmallest(), heapq.nlargest(), and itertools.groupby().
2018-07-23 20:58:21 -07:00
Matthias Bussonnier bde782bb59 bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) 2018-07-24 00:10:56 +03:00
Serhiy Storchaka a6fdddb7df
bpo-32500: Fix error messages for sequence and mapping C API. (GH-7846)
Fix error messages for PySequence_Size(), PySequence_GetItem(),
PySequence_SetItem() and PySequence_DelItem() called with a mapping
and PyMapping_Size() called with a sequence.
2018-07-23 23:43:42 +03:00
Serhiy Storchaka aba24ff360
bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) 2018-07-23 23:41:11 +03:00
Serhiy Storchaka db8e3a1e44
bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381) 2018-07-23 23:38:31 +03:00