Commit graph

102141 commits

Author SHA1 Message Date
Victor Stinner
5640d030e1 bpo-30317: Fix multiprocessing test_timeout() (GH-8621)
Multiprocessing test_timeout() now accepts a delta of 100 ms instead
of just 50 ms, since the test failed with 135.8 ms instead of the
expected 200 ms.
2018-08-03 01:09:00 +01:00
Victor Stinner
72ec3193b5
bpo-34170: Cleanup pymain_run_filename() (GH-8631)
* Inline pymain_run_file() and pymain_open_filename() into
  pymain_run_filename()
* Created pymain_run_stdin() which is pymain_run_filename() with
  filename=NULL
* Rename pymain_run_filename() to pymain_run_file()
2018-08-02 19:34:20 +02:00
torsava
f394ee5eaf bpo-27910: Update documentation of traceback module (GH-6116)
In the documentation for the traceback module, the definitions of functions
extract_tb(), format_list() and classmethod StackSummary.from_list()
mention the old style 4-tuples that these functions used to return or accept.

Since Python 3.5, however, they return or accept a FrameSummary object
instead of a 4-tuple, or a StackSummary object instead of a list of 4-tuples.

Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
2018-08-02 19:08:59 +03:00
Marcel Plch
a2fe1e52eb bpo-34097: Add support for zipping files older than 1980-01-01 (GH-8270)
ZipFile can zip files older than 1980-01-01 and newer than 2107-12-31 using
a new strict_timestamps parameter at the cost of setting the timestamp
to the limit.
2018-08-02 15:04:52 +02:00
jdemeyer
fc512e3e06 bpo-34287: Do not use second argument of METH_NOARGS functions (GH-8582) 2018-08-02 20:14:54 +09:00
Tal Einat
dd74369cb7
bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616) 2018-08-02 10:30:06 +03:00
Tal Einat
10ea9409ce
bpo-34120: fix IDLE freezing after closing dialogs (GH-8603)
Added missing .grab_release() calls to all places where we call .grab_set().
2018-08-02 09:18:29 +03:00
Victor Stinner
80b762f010
bpo-31650: Remove _Py_CheckHashBasedPycsMode global config var (GH-8608)
bpo-31650, bpo-34170: Replace _Py_CheckHashBasedPycsMode with
_PyCoreConfig._check_hash_pycs_mode. Modify PyInit__imp() and
zipimport to get the parameter from the current interpreter core
configuration.

Remove Include/internal/import.h file.
2018-08-01 18:18:07 +02:00
Victor Stinner
6c785c0ebd
bpo-34170: Add Python/coreconfig.c for _PyCoreConfig (GH-8607)
* Add Include/coreconfig.h
* Move config_*() and _PyCoreConfig_*() functions from Modules/main.c
  to a new Python/coreconfig.c file.
* Inline _Py_ReadHashSeed() into config_init_hash_seed()
* Move global configuration variables to coreconfig.c
2018-08-01 17:56:14 +02:00
Victor Stinner
cfc8831f5e
Define _Py_NO_RETURN for Microsoft C compiler (GH-8606) 2018-08-01 16:41:25 +02:00
Victor Stinner
fc96437db4
bpo-33499: Fix pymain_init_pycache_prefix() (GH-8596)
Fix a memory leak in pymain_init_pycache_prefix()
when PYTHONPYCACHEPREFIX and -X pycache_prefix are used.
2018-08-01 16:16:46 +02:00
Victor Stinner
ea68d83933
bpo-34170: _PyCoreConfig_Read() defaults to argc=0 (GH-8595)
Add unit tests for argc and argv of _PyCoreConfig.
2018-08-01 03:07:18 +02:00
Victor Stinner
9851227382
bpo-34170: Rename _PyCoreConfig.unbuffered_stdip (GH-8594)
* Rename _PyCoreConfig.unbuffered_stdio to buffered_stdio
* Rename _PyCoreConfig.debug to parser_debug
2018-08-01 03:07:00 +02:00
Victor Stinner
a4d20b2e5e
bpo-34170: Py_Main() updates config when setting Py_InspectFlag (GH-8593) 2018-08-01 02:57:45 +02:00
Victor Stinner
b75d7e2435
bpo-34170: Add _PyCoreConfig._frozen parameter (GH-8591)
Modify frozenmain.c to use _Py_InitializeFromConfig().
2018-08-01 02:13:04 +02:00
costypetrisor
8ed317f1ca bpo-34113: Fix a crash when using LLTRACE is on (GH-8517)
Fix a crash on negative STACKADJ() when Low-Level trace (LLTRACE) is enabled.
2018-07-31 22:55:14 +02:00
MartinAltmayer
944451cd8d bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532) 2018-07-31 10:06:12 -04:00
Raymond Hettinger
9c18b1ae52
bpo-33089: Add math.dist() for computing the Euclidean distance between two points (GH-8561) 2018-07-31 00:45:49 -07:00
Serhiy Storchaka
9d5727326a
bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931)
* Fix integer overflow in os.readv(), os.writev(), os.preadv()
  and os.pwritev() and in os.sendfile() with headers or trailers
  arguments (on BSD-based OSes and MacOS).

* Fix sending the part of the file in os.sendfile() on MacOS.
  Using the trailers argument could cause sending more bytes from
  the input file than was specified.

Thanks Ned Deily for testing on 32-bit MacOS.
2018-07-31 10:24:54 +03:00
Serhiy Storchaka
f1d36d8efa
bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346)
* help(hashlib) didn't work because of incorrect module name in blake2b and
  blake2s classes.
* Constructors blake2*(), sha3_*(), shake_*() and keccak_*() incorrectly
  accepted keyword argument "string" for binary data, but documented as
  accepting the "data" keyword argument. Now this parameter is positional-only.
* Keyword-only parameters in blake2b() and blake2s() were not documented as
  keyword-only.
* Default value for some parameters of blake2b() and blake2s() was None,
  which is not acceptable value.
* The length argument for shake_*.digest() was wrapped out to 32 bits.
* The argument for shake_128.digest() and shake_128.hexdigest() was not
  positional-only as intended.
* TypeError messages for incorrect arguments in all constructors sha3_*(),
  shake_*() and keccak_*() incorrectly referred to sha3_224.

Also made the following enhancements:

* More accurately specified input and result types for strings, bytes and
  bytes-like objects.
* Unified positional parameter names for update() and constructors.
* Improved formatting.
2018-07-31 09:50:16 +03:00
Serhiy Storchaka
4b8a7f51da
Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (GH-3771)" (#8241)
This reverts commit af810b35b4.

This is not valid syntax (see bpo-32012).
2018-07-31 09:34:30 +03:00
Serhiy Storchaka
ac20e0f98d
bpo-1617161: Make the hash and equality of methods not depending on the value of self. (GH-7848)
* The hash of BuiltinMethodType instances no longer depends on the hash
  of __self__. It depends now on the hash of id(__self__).
* The hash and equality of ModuleType and MethodWrapperType instances no
  longer depend on the hash and equality of __self__. They depend now on
  the hash and equality of id(__self__).
* MethodWrapperType instances no longer support ordering.
2018-07-31 09:18:24 +03:00
INADA Naoki
c48e26dcad
bpo-27671: Update FAQ about why len is function (GH-8432) 2018-07-31 14:49:22 +09:00
Sergey Fedoseev
b229b072a9 Remove creation of a list for row_cast_map in pysqlite_cursor_init() (GH-8494)
This list is never used: if detect_types is on, this list will be
replaced with another one before row_cast_map is used, if
detect_types is off, row_cast_map is not used at all.
2018-07-31 00:11:50 +03:00
twisteroid ambassador
9045199c5a bpo-33833: Fix ProactorSocketTransport AssertionError (#7893) 2018-07-30 21:58:50 +03:00
Andrés Delfino
6921ef7bef Use 'for example' instead of 'in other words' in compound statement doc (GH-8401) 2018-07-30 11:44:35 -07:00
Segev Finer
8e7e8bd898 Fix typos & formatting in Using Python on Windows doc (GH-8559) 2018-07-30 10:11:30 -07:00
Peter Lamut
20678fd874 Add docstrings to public methods from context.c (GH-8531) 2018-07-30 16:15:44 +01:00
Elvis Pranskevichus
22d25085db bpo-34075: Deprecate non-ThreadPoolExecutor in loop.set_default_executor() (GH-8533)
Various asyncio internals expect that the default executor is a
`ThreadPoolExecutor`, so deprecate passing anything else to
`loop.set_default_executor()`.
2018-07-30 12:42:43 +02:00
Bo Bayles
4e11c461ed bpo-34182: Fix test_pydoc running as a script. (GH-8389) 2018-07-29 22:15:14 +03:00
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