]> granicus.if.org Git - python/log
python
7 years agobpo-32030: Enhance Py_Main() (#4412)
Victor Stinner [Thu, 16 Nov 2017 02:11:45 +0000 (18:11 -0800)]
bpo-32030: Enhance Py_Main() (#4412)

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.

7 years agobpo-32030: Split Py_Main() into subfunctions (#4399)
Victor Stinner [Wed, 15 Nov 2017 23:48:08 +0000 (15:48 -0800)]
bpo-32030: Split Py_Main() into subfunctions (#4399)

* Don't use "Python runtime" anymore to parse command line options or
  to get environment variables: pymain_init() is now a strict
  separation.
* Use an error message rather than "crashing" directly with
  Py_FatalError(). Limit the number of calls to Py_FatalError(). It
  prepares the code to handle errors more nicely later.
* Warnings options (-W, PYTHONWARNINGS) and "XOptions" (-X) are now
  only added to the sys module once Python core is properly
  initialized.
* _PyMain is now the well identified owner of some important strings
  like: warnings options, XOptions, and the "program name". The
  program name string is now properly freed at exit.
  pymain_free() is now responsible to free the "command" string.
* Rename most methods in Modules/main.c to use a "pymain_" prefix to
  avoid conflits and ease debug.
* Replace _Py_CommandLineDetails_INIT with memset(0)
* Reorder a lot of code to fix the initialization ordering. For
  example, initializing standard streams now comes before parsing
  PYTHONWARNINGS.
* Py_Main() now handles errors when adding warnings options and
  XOptions.
* Add _PyMem_GetDefaultRawAllocator() private function.
* Cleanup _PyMem_Initialize(): remove useless global constants: move
  them into _PyMem_Initialize().
* Call _PyRuntime_Initialize() as soon as possible:
  _PyRuntime_Initialize() now returns an error message on failure.
* Add _PyInitError structure and following macros:

  * _Py_INIT_OK()
  * _Py_INIT_ERR(msg)
  * _Py_INIT_USER_ERR(msg): "user" error, don't abort() in that case
  * _Py_INIT_FAILED(err)

7 years agobpo-32034: Make IncompleteReadError & LimitOverrunError pickleable #4409
Yury Selivanov [Wed, 15 Nov 2017 22:14:28 +0000 (17:14 -0500)]
bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable #4409

7 years agobpo-32025: Add time.thread_time() (#4410)
Antoine Pitrou [Wed, 15 Nov 2017 21:52:21 +0000 (22:52 +0100)]
bpo-32025: Add time.thread_time() (#4410)

* bpo-32025: Add time.thread_time()

* Add missing #endif

* Add NEWS blurb

* Add docs and whatsnew

* Address review comments

* Review comments

7 years agobpo-32018: Fix inspect.signature repr to follow PEP 8 (#4408)
Dong-hee Na [Wed, 15 Nov 2017 18:30:59 +0000 (03:30 +0900)]
bpo-32018: Fix inspect.signature repr to follow PEP 8 (#4408)

7 years agobpo-30399: Get rid of trailing comma in the repr of BaseException. (#1650)
Serhiy Storchaka [Wed, 15 Nov 2017 15:53:28 +0000 (17:53 +0200)]
bpo-30399: Get rid of trailing comma in the repr of BaseException. (#1650)

7 years agobpo-30950: Convert round() to Argument Clinic. (#2740)
Serhiy Storchaka [Wed, 15 Nov 2017 15:51:14 +0000 (17:51 +0200)]
bpo-30950: Convert round() to Argument Clinic. (#2740)

7 years agobpo-32011: Revert "Issue #15480: Remove the deprecated and unused TYPE_INT64 code...
Serhiy Storchaka [Wed, 15 Nov 2017 15:41:05 +0000 (17:41 +0200)]
bpo-32011: Revert "Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal." (#4381)

Simplify the reverted code.

This reverts commit e9bbe8b87ba2874efba0474af5cc7d5941dbf742.

7 years agobpo-32023: Disallow genexprs without parenthesis in class definitions. (#4400)
Serhiy Storchaka [Wed, 15 Nov 2017 15:39:37 +0000 (17:39 +0200)]
bpo-32023: Disallow genexprs without parenthesis in class definitions. (#4400)

7 years agobpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (#4289)
Serhiy Storchaka [Wed, 15 Nov 2017 15:38:52 +0000 (17:38 +0200)]
bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (#4289)

* Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks.
* Setting sys.tracebacklimit to None now causes using the default limit.
* Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using
  the limit LONG_MAX rather than the default limit.
* Fixed integer overflows in the case of more than 2**31 traceback items on
  Windows.
* Fixed output errors handling.

7 years agobpo-32032: Test both implementations of module-level pickle API. (#4401)
Serhiy Storchaka [Wed, 15 Nov 2017 12:01:08 +0000 (14:01 +0200)]
bpo-32032: Test both implementations of module-level pickle API. (#4401)

7 years agoChanged lambda to str.strip in _strip_spaces in logging.config (#4332)
sanjayp [Wed, 15 Nov 2017 09:28:11 +0000 (14:58 +0530)]
Changed lambda to str.strip in _strip_spaces in logging.config (#4332)

7 years agobpo-32012: Disallow trailing comma after genexpr without parenthesis. (#4382)
Serhiy Storchaka [Wed, 15 Nov 2017 06:49:40 +0000 (08:49 +0200)]
bpo-32012: Disallow trailing comma after genexpr without parenthesis. (#4382)

7 years agobpo-31948: Fix broken links in msilib docs (GH-4397)
Jesse-Bakker [Tue, 14 Nov 2017 23:06:15 +0000 (00:06 +0100)]
bpo-31948: Fix broken links in msilib docs (GH-4397)

7 years agobpo-15606: Improve the re.VERBOSE documentation. (#4366)
Serhiy Storchaka [Tue, 14 Nov 2017 15:21:26 +0000 (17:21 +0200)]
bpo-15606: Improve the re.VERBOSE documentation. (#4366)

7 years agobpo-32015: Asyncio looping during simultaneously socket read/write an… (#4386)
Andrey Egorov [Tue, 14 Nov 2017 09:18:59 +0000 (12:18 +0300)]
bpo-32015: Asyncio looping during simultaneously socket read/write an… (#4386)

* bpo-32015: Asyncio cycling during simultaneously socket read/write and reconnection

* Tests fix

* Tests fix

* News add

* Add new unit tests

7 years agobpo-32020: arraymodule: Correct missing Py_DECREF in failure case of make_array(...
Mat M [Tue, 14 Nov 2017 06:00:54 +0000 (01:00 -0500)]
bpo-32020: arraymodule: Correct missing Py_DECREF in failure case of make_array() (#4391)

7 years agobpo-16055: Fixes incorrect error text for int('1', base=1000) (#4376)
Sanyam Khurana [Mon, 13 Nov 2017 21:49:26 +0000 (03:19 +0530)]
bpo-16055: Fixes incorrect error text for int('1', base=1000) (#4376)

* bpo-16055: Fixes incorrect error text for int('1', base=1000)

* bpo-16055: Address review comments

7 years agobpo-31979: Simplify transforming decimals to ASCII (#4336)
Serhiy Storchaka [Mon, 13 Nov 2017 19:23:48 +0000 (21:23 +0200)]
bpo-31979: Simplify transforming decimals to ASCII (#4336)

in int(), float() and complex() parsers.

This also speeds up parsing non-ASCII numbers by around 20%.

7 years agobpo-28369: Enhance transport socket check in add_reader/writer (#4365)
Yury Selivanov [Mon, 13 Nov 2017 18:38:22 +0000 (13:38 -0500)]
bpo-28369: Enhance transport socket check in add_reader/writer (#4365)

7 years agobpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter() (#4384)
Mat M [Mon, 13 Nov 2017 07:50:16 +0000 (02:50 -0500)]
bpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter() (#4384)

7 years agoremove detect_math_libs (#4383)
Benjamin Peterson [Mon, 13 Nov 2017 04:53:39 +0000 (20:53 -0800)]
remove detect_math_libs (#4383)

Darwin may not require libm, but it doesn't hurt to link it and simplifies configuration logic.

7 years agobpo-29181: Skip test_tarfile tests on PermissionError raised by Android (GH-4375)
xdegaye [Sun, 12 Nov 2017 17:02:06 +0000 (18:02 +0100)]
bpo-29181: Skip test_tarfile tests on PermissionError raised by Android (GH-4375)

7 years agobpo-29180: Skip test_os tests on PermissionError raised by Android (GH-4374)
xdegaye [Sun, 12 Nov 2017 16:57:04 +0000 (17:57 +0100)]
bpo-29180: Skip test_os tests on PermissionError raised by Android (GH-4374)

7 years agobpo-28759: Skip some tests on PermissionError raised by Android (GH-4350)
xdegaye [Sun, 12 Nov 2017 16:31:07 +0000 (17:31 +0100)]
bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350)

Access to mkfifo(), mknod() and hard link creation is controled
by SELinux on Android.
Also remove test.support.android_not_root.

7 years agobpo-30696: Fix the REPL looping endlessly when no memory (GH-4160)
xdegaye [Sun, 12 Nov 2017 15:50:48 +0000 (16:50 +0100)]
bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160)

7 years agobpo-28180: Fix the implementation of PEP 538 on Android (GH-4334)
xdegaye [Sun, 12 Nov 2017 11:45:59 +0000 (12:45 +0100)]
bpo-28180: Fix the implementation of PEP 538 on Android (GH-4334)

7 years agoMove comments in configure.ac to more appropriate place. (#4371)
Serhiy Storchaka [Sat, 11 Nov 2017 17:18:28 +0000 (19:18 +0200)]
Move comments in configure.ac to more appropriate place. (#4371)

7 years agoThe termios man page is in section 3 (GH-2450)
Edward Betts [Sat, 11 Nov 2017 16:40:26 +0000 (16:40 +0000)]
The termios man page is in section 3 (GH-2450)

7 years agoRemove redundant 'exc = True' line (GH-4357)
Berker Peksag [Sat, 11 Nov 2017 14:55:05 +0000 (17:55 +0300)]
Remove redundant 'exc = True' line (GH-4357)

It can be removed after https://github.com/python/peps/commit/c28890fb421c906241da6da718f9eacc5a3109ee

7 years agobpo-31572: Get rid of _PyObject_HasAttrId() in the ASDL parser. (#3725)
Serhiy Storchaka [Sat, 11 Nov 2017 14:41:32 +0000 (16:41 +0200)]
bpo-31572: Get rid of _PyObject_HasAttrId() in the ASDL parser. (#3725)

Silence only expected AttributeError.

7 years agobpo-31572: Get rid of _PyObject_HasAttrId() in dict and OrderedDict. (#3728)
Serhiy Storchaka [Sat, 11 Nov 2017 14:19:56 +0000 (16:19 +0200)]
bpo-31572: Get rid of _PyObject_HasAttrId() in dict and OrderedDict. (#3728)

Silence only AttributeError when get "key" and "items" attributes in
the constructor and the update() method of dict and OrderedDict .

7 years agobpo-31572: Silence only AttributeError when get the __copy__ attribute in itertools...
Serhiy Storchaka [Sat, 11 Nov 2017 13:51:42 +0000 (15:51 +0200)]
bpo-31572: Silence only AttributeError when get the __copy__ attribute in itertools.tee(). (#3724)

7 years agobpo-31572: Don't silence unexpected errors in the _warnings module. (#3731)
Serhiy Storchaka [Sat, 11 Nov 2017 13:19:47 +0000 (15:19 +0200)]
bpo-31572: Don't silence unexpected errors in the _warnings module. (#3731)

Get rid of _PyObject_HasAttrId() and PyDict_GetItemString().
Silence only expected AttributeError, KeyError and ImportError when
get an attribute, look up in a dict or import a module.

7 years agoAdd the const qualifier to "char *" variables that refer to literal strings. (#4370)
Serhiy Storchaka [Sat, 11 Nov 2017 11:06:26 +0000 (13:06 +0200)]
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)

7 years agobpo-31824: Document default value of 'errors' parameters (GH-4328)
Pablo Galindo [Fri, 10 Nov 2017 23:05:12 +0000 (23:05 +0000)]
bpo-31824: Document default value of 'errors' parameters (GH-4328)

7 years agobpo-31976: Fix race condition when flushing a file is slow. (#4331)
benfogle [Fri, 10 Nov 2017 21:03:40 +0000 (16:03 -0500)]
bpo-31976: Fix race condition when flushing a file is slow. (#4331)

7 years agoRewrite asyncio test to be more meaningful (#4363)
Yury Selivanov [Fri, 10 Nov 2017 20:34:17 +0000 (15:34 -0500)]
Rewrite asyncio test to be more meaningful (#4363)

7 years agobpo-31985: Deprecate openfp in aifc, sunau, and wave (#4344)
Brian Curtin [Fri, 10 Nov 2017 16:38:25 +0000 (11:38 -0500)]
bpo-31985: Deprecate openfp in aifc, sunau, and wave (#4344)

The openfp functions of aifp, sunau, and wave had pointed to the open
function of each module since 1993 as a matter of backwards
compatibility. In the case of aifc.openfp, it was both undocumented
and untested. This change begins the formal deprecation of those
openfp functions, with their removal coming in 3.9.

This additionally adds a TODO in test_pyclbr around using aifc.openfp,
though it shouldn't be changed until removal in 3.9.

7 years agobpo-31999: Fix test_venv in case the zlib module is not available. (#4359)
Serhiy Storchaka [Fri, 10 Nov 2017 10:09:39 +0000 (12:09 +0200)]
bpo-31999: Fix test_venv in case the zlib module is not available. (#4359)

7 years agobpo-31998: Fix test_zipapp in case the zlib module is not available. (#4358)
Serhiy Storchaka [Fri, 10 Nov 2017 10:09:24 +0000 (12:09 +0200)]
bpo-31998: Fix test_zipapp in case the zlib module is not available. (#4358)

7 years agobpo-31222: Make (datetime|date|time).replace return subclass type in Pure Python...
Paul Ganssle [Thu, 9 Nov 2017 21:34:29 +0000 (16:34 -0500)]
bpo-31222: Make (datetime|date|time).replace return subclass type in Pure Python (#4176)

7 years agoFix phrasing in Doc/whatsnew/3.7.rst (GH-4318)
Cody Scott [Thu, 9 Nov 2017 18:58:59 +0000 (13:58 -0500)]
Fix phrasing in Doc/whatsnew/3.7.rst (GH-4318)

7 years agoCorrect the location of a function mentioned in a comment (GH-4327)
Ned Batchelder [Thu, 9 Nov 2017 16:55:34 +0000 (11:55 -0500)]
Correct the location of a function mentioned in a comment (GH-4327)

7 years agobpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (#4235)
Serhiy Storchaka [Thu, 9 Nov 2017 16:00:38 +0000 (18:00 +0200)]
bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (#4235)

* Fix compilation of the socket module on NetBSD 8.
* Fix the assertion failure or reading arbitrary data when parse
  a AF_BLUETOOTH address on NetBSD and DragonFly BSD.
* Fix other potential errors and make the code more reliable.

7 years agoSilence error output in test_concurrent_futures (bpo-21423) (#4347)
Antoine Pitrou [Thu, 9 Nov 2017 14:33:43 +0000 (15:33 +0100)]
Silence error output in test_concurrent_futures (bpo-21423) (#4347)

* Silence error output in test_concurrent_futures (bpo-21423)

7 years agoReplace KB unit with KiB (#4293)
Victor Stinner [Wed, 8 Nov 2017 22:44:44 +0000 (14:44 -0800)]
Replace KB unit with KiB (#4293)

kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate.

Same change for MB and GB which become MiB and GiB.

Change the output of Tools/iobench/iobench.py.

Round also the size of the documentation from 5.5 MB to 5 MiB.

7 years agobpo-11063: Use more reliable way to check if uuid function exists (GH-4343)
Berker Peksag [Wed, 8 Nov 2017 21:43:14 +0000 (00:43 +0300)]
bpo-11063: Use more reliable way to check if uuid function exists (GH-4343)

7 years agobpo-11063: Add a configure check for uuid_generate_time_safe (GH-4287)
Berker Peksag [Wed, 8 Nov 2017 20:09:16 +0000 (23:09 +0300)]
bpo-11063: Add a configure check for uuid_generate_time_safe (GH-4287)

7 years agobpo-31810: added missing keywords to docs. (#4140)
Tom Floyer [Wed, 8 Nov 2017 17:31:26 +0000 (20:31 +0300)]
bpo-31810: added missing keywords to docs. (#4140)

async and await keywords has been merged into upstream, but they are
all missing in the lexical analysis docs. This change adds them to the
appropriate keywords section in documentation.

7 years agobpo-29179: Document the Py_UNUSED macro (#4341)
Petr Viktorin [Wed, 8 Nov 2017 15:59:20 +0000 (16:59 +0100)]
bpo-29179: Document the Py_UNUSED macro (#4341)

Py_UNUSED has a public name, and is used in the wild outside CPython,
but was not documented. Rectify that.

The macro was added in bpo-19976 and referenced in bpo-26179.

7 years agobpo-31934: Abort when building out of a not clean source tree (GH-4255)
xdegaye [Wed, 8 Nov 2017 15:03:58 +0000 (16:03 +0100)]
bpo-31934: Abort when building out of a not clean source tree (GH-4255)

7 years agobpo-31884 subprocess: add Windows constants for process priority (#4150)
James [Wed, 8 Nov 2017 14:18:59 +0000 (14:18 +0000)]
bpo-31884 subprocess: add Windows constants for process priority (#4150)

7 years agobpo-31338: C API intro: add missing versionadded (#4339)
Victor Stinner [Wed, 8 Nov 2017 14:06:24 +0000 (06:06 -0800)]
bpo-31338: C API intro: add missing versionadded (#4339)

7 years agoFix broken link in Doc/whatsnew/3.7.rst (GH-4335)
Berker Peksag [Wed, 8 Nov 2017 13:36:58 +0000 (16:36 +0300)]
Fix broken link in Doc/whatsnew/3.7.rst (GH-4335)

7 years agoDocs: Mention that Py_UNREACHABLE was added in 3.7 (#4337)
Petr Viktorin [Wed, 8 Nov 2017 13:11:16 +0000 (14:11 +0100)]
Docs: Mention that Py_UNREACHABLE was added in 3.7 (#4337)

The macro was added for bpo-31338 in commit b2e5794870eb4728ddfaafc0f79a40299576434f

7 years agobpo-21862: Add -m option to cProfile for profiling modules (#4297)
Sanyam Khurana [Wed, 8 Nov 2017 10:50:56 +0000 (16:20 +0530)]
bpo-21862: Add -m option to cProfile for profiling modules (#4297)

* bpo-21862: Add -m option to cProfile for profiling modules

7 years agoRemove unused var from CheckCancelOperation test (GH-4317)
Simon Willison [Tue, 7 Nov 2017 21:06:55 +0000 (13:06 -0800)]
Remove unused var from CheckCancelOperation test (GH-4317)

It looks like this was copied from one of the previous tests, which did use it.

7 years agoAdded :const:`mmap.ACCESS_DEFAULT` constant. (#4093)
Justus Schwabedal [Tue, 7 Nov 2017 20:51:43 +0000 (15:51 -0500)]
Added :const:`mmap.ACCESS_DEFAULT` constant. (#4093)

7 years agobpo-31620: have asyncio/queues not leak memory when you've exceptions during waiting...
Suren Nihalani [Tue, 7 Nov 2017 17:35:23 +0000 (09:35 -0800)]
bpo-31620: have asyncio/queues not leak memory when you've exceptions during waiting (#3813)

7 years agoFix a typo (#4323)
Barry Warsaw [Tue, 7 Nov 2017 17:05:15 +0000 (09:05 -0800)]
Fix a typo (#4323)

7 years agobpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)
Julien Palard [Tue, 7 Nov 2017 16:46:50 +0000 (17:46 +0100)]
bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)

7 years agobpo-31970: Reduce performance overhead of asyncio debug mode. (#4314)
Antoine Pitrou [Tue, 7 Nov 2017 16:23:29 +0000 (17:23 +0100)]
bpo-31970: Reduce performance overhead of asyncio debug mode. (#4314)

* bpo-31970: Reduce performance overhead of asyncio debug mode.

7 years agobpo-31965: fix doc for multiprocessing.connection.Client and Listener (#4304)
Jelle Zijlstra [Tue, 7 Nov 2017 16:13:02 +0000 (08:13 -0800)]
bpo-31965: fix doc for multiprocessing.connection.Client and Listener (#4304)

* fix doc for multiprocessing.connection.Client

The authenticate argument does not exist on either Client or Listener:
- https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.py#L483 (master)
- https://github.com/python/cpython/blob/3.6/Lib/multiprocessing/connection.py#L478 (3.6)
- https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.py#L478 (3.5)
- https://github.com/python/cpython/blob/3.4/Lib/multiprocessing/connection.py#L487 (3.4)
The documentation also claimed that these functions will call `current_process().auth_key`, for which I could find no evidence in the code. I rewrote the documentation to reflect the actual behavior.

Also made some small changes to vary sentence structure.

7 years agobpo-31960: Fix asyncio.Future documentation for thread (un)safety. (#4319)
Antoine Pitrou [Tue, 7 Nov 2017 16:03:28 +0000 (17:03 +0100)]
bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (#4319)

7 years agoFix the sizeof test for dicts with shared keys. (#4311)
Serhiy Storchaka [Tue, 7 Nov 2017 13:08:09 +0000 (15:08 +0200)]
Fix the sizeof test for dicts with shared keys. (#4311)

By accident the size of the empty dict keys object matched the
size of values array.

7 years agobpo-20486: Implement Database.Close() method in msilib (GH-4141)
Berker Peksag [Tue, 7 Nov 2017 12:58:53 +0000 (15:58 +0300)]
bpo-20486: Implement Database.Close() method in msilib (GH-4141)

7 years agobpo-31626: Mark ends of the reallocated block in debug build. (#4210)
Serhiy Storchaka [Tue, 7 Nov 2017 10:46:42 +0000 (12:46 +0200)]
bpo-31626: Mark ends of the reallocated block in debug build. (#4210)

Few bytes at the begin and at the end of the reallocated blocks, as well
as the header and the trailer, now are erased before calling realloc()
in debug build.  This will help to detect using or double freeing the
reallocated block.

7 years agoFix a memory leak in _msi.c (#4127)
Zackery Spytz [Tue, 7 Nov 2017 10:03:09 +0000 (03:03 -0700)]
Fix a memory leak in _msi.c (#4127)

7 years agobpo-31950: Improve event loop policy doc (#4306)
Antoine Pitrou [Tue, 7 Nov 2017 09:26:32 +0000 (10:26 +0100)]
bpo-31950: Improve event loop policy doc (#4306)

7 years agoAdd asyncio.Handle.cancelled() method (#2388)
Marat Sharafutdinov [Tue, 7 Nov 2017 09:06:05 +0000 (12:06 +0300)]
Add asyncio.Handle.cancelled() method (#2388)

7 years agobpo-31415: Improve error handling and caching of the importtime option. (#4138)
Serhiy Storchaka [Tue, 7 Nov 2017 06:55:38 +0000 (08:55 +0200)]
bpo-31415: Improve error handling and caching of the importtime option. (#4138)

7 years agobpo-28791: Update Windows builds to use SQLite 3.21.0. (GH-4246)
Mariatta [Tue, 7 Nov 2017 03:31:53 +0000 (19:31 -0800)]
bpo-28791: Update Windows builds to use SQLite 3.21.0. (GH-4246)

7 years agoFix a minor typo and hyphenate "multi-threading" (#4237)
Barry Warsaw [Tue, 7 Nov 2017 02:18:40 +0000 (18:18 -0800)]
Fix a minor typo and hyphenate "multi-threading" (#4237)

7 years agobpo-31843: sqlite3.connect() now accepts PathLike objects as database name (#4299)
Anders Lorentsen [Tue, 7 Nov 2017 00:47:43 +0000 (01:47 +0100)]
bpo-31843: sqlite3.connect() now accepts PathLike objects as database name (#4299)

7 years agobpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is...
Oren Milman [Tue, 7 Nov 2017 00:09:49 +0000 (02:09 +0200)]
bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (#3958)

7 years agobpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more...
Oren Milman [Tue, 7 Nov 2017 00:01:47 +0000 (02:01 +0200)]
bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once (#3968)

7 years agobpo-31945: Configurable blocksize in HTTP(S)Connection (#4279)
Nir Soffer [Mon, 6 Nov 2017 21:16:37 +0000 (23:16 +0200)]
bpo-31945: Configurable blocksize in HTTP(S)Connection (#4279)

blocksize was hardcoded to 8192, preventing efficient upload when using
file-like body. Add blocksize argument to __init__, so users can
configure the blocksize to fit their needs.

I tested this uploading data from /dev/zero to a web server dropping the
received data, to test the overhead of the HTTPConnection.send() with a
file-like object.

Here is an example 10g upload with the default buffer size (8192):

$ time ~/src/cpython/release/python upload-httplib.py 10 https://localhost:8000/
Uploaded 10.00g in 17.53 seconds (584.00m/s)

real 0m17.574s
user 0m8.887s
sys 0m5.971s

Same with 512k blocksize:

$ time ~/src/cpython/release/python upload-httplib.py 10 https://localhost:8000/
Uploaded 10.00g in 6.60 seconds (1551.15m/s)

real 0m6.641s
user 0m3.426s
sys 0m2.162s

In real world usage the difference will be smaller, depending on the
local and remote storage and the network.

See https://github.com/nirs/http-bench for more info.

7 years agobpo-31957: Fixes version detection. (#4298)
Steve Dower [Mon, 6 Nov 2017 20:52:09 +0000 (12:52 -0800)]
bpo-31957: Fixes version detection. (#4298)

7 years agoRemove outdated with_threads checks in configure.ac (GH-4294)
Berker Peksag [Mon, 6 Nov 2017 16:06:05 +0000 (19:06 +0300)]
Remove outdated with_threads checks in configure.ac (GH-4294)

7 years agoFix miscellaneous typos (#4275)
luzpaz [Sun, 5 Nov 2017 13:37:50 +0000 (07:37 -0600)]
Fix miscellaneous typos (#4275)

7 years agobpo-28994: PyErr_NormalizeException() no longer use C stack for recursion. (#2035)
Serhiy Storchaka [Sun, 5 Nov 2017 09:27:48 +0000 (11:27 +0200)]
bpo-28994: PyErr_NormalizeException() no longer use C stack for recursion. (#2035)

MemoryError raised when normalizing a RecursionError raised during exception normalization now not always causes a fatal error.

7 years agobpo-22257: Mention startup refactoring in What's New (GH-4286)
Nick Coghlan [Sun, 5 Nov 2017 04:58:45 +0000 (14:58 +1000)]
bpo-22257: Mention startup refactoring in What's New (GH-4286)

While technically a purely internal change, bpo-31845 was
a fairly significant externally visible bug caused by
these changes (environment variable based configuration
was being ignored due to a change in the relative order
of reading the environment and reading command line settings,
and the test suite was only testing the command line options)

Hence this note to essentially say "If you see odd startup
problems in 3.7 that you've never seen in previous releases,
it's probably our fault, so let us know, and we'll fix it".

7 years agobpo-31609: Fixes quotes in PCbuild/clean.bat (#4280)
Steve Dower [Sat, 4 Nov 2017 23:29:03 +0000 (16:29 -0700)]
bpo-31609: Fixes quotes in PCbuild/clean.bat (#4280)

7 years agobpo-31944: Fixes build and Modify button (#4278)
Steve Dower [Sat, 4 Nov 2017 23:28:47 +0000 (16:28 -0700)]
bpo-31944: Fixes build and Modify button (#4278)

7 years agobpo-31923: Fix spelling in sqlite3 docs (GH-4227)
davy wybiral [Sat, 4 Nov 2017 23:00:51 +0000 (18:00 -0500)]
bpo-31923: Fix spelling in sqlite3 docs (GH-4227)

7 years agoAdd version{changed,added} markers and make minor style changes (GH-4273)
Berker Peksag [Sat, 4 Nov 2017 12:17:56 +0000 (15:17 +0300)]
Add version{changed,added} markers and make minor style changes (GH-4273)

7 years agobpo-28564: Use os.scandir() in shutil.rmtree(). (#4085)
Serhiy Storchaka [Sat, 4 Nov 2017 12:16:35 +0000 (14:16 +0200)]
bpo-28564: Use os.scandir() in shutil.rmtree(). (#4085)

This speeds up it to 20-40%.

7 years agobpo-31678: Fix typo in PyDateTime_DELTA_GET_MICROSECONDS (GH-3869)
Phobosmir [Sat, 4 Nov 2017 10:39:45 +0000 (13:39 +0300)]
bpo-31678: Fix typo in PyDateTime_DELTA_GET_MICROSECONDS (GH-3869)

7 years agobpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor (#4241)
Antoine Pitrou [Sat, 4 Nov 2017 10:05:49 +0000 (11:05 +0100)]
bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor (#4241)

* bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor

* Fix docstring

7 years agobpo-18699: Corrected documentation for window.chgat in curses module (#1430)
Chillar Anand [Sat, 4 Nov 2017 08:13:16 +0000 (13:43 +0530)]
bpo-18699: Corrected documentation for window.chgat in curses module (#1430)

7 years agobpo-9678: Fix determining the MAC address in the uuid module. (#4264)
Serhiy Storchaka [Sat, 4 Nov 2017 07:37:32 +0000 (09:37 +0200)]
bpo-9678: Fix determining the MAC address in the uuid module. (#4264)

* Using ifconfig on NetBSD and OpenBSD.
* Using arp on Linux, FreeBSD, NetBSD and OpenBSD.

Based on patch by Takayuki Shimizukawa.

7 years agoFix a grammatical problem and reword for clarity. (#4257)
Barry Warsaw [Fri, 3 Nov 2017 20:45:46 +0000 (13:45 -0700)]
Fix a grammatical problem and reword for clarity. (#4257)

bpo-31936

7 years agobpo-31933: fix blake2 multi-byte params on big endian platforms (#4250)
Jack O'Connor [Fri, 3 Nov 2017 19:02:41 +0000 (15:02 -0400)]
bpo-31933: fix blake2 multi-byte params on big endian platforms (#4250)

All Blake2 params have to be encoded in little-endian byte order. For
the two multi-byte integer params, leaf_length and node_offset, that
means that assigning a native-endian integer to them appears to work on
little-endian platforms, but gives the wrong result on big-endian. The
current libb2 API doesn't make that very clear, and @sneves is working
on new API functions in the GH issue above. In the meantime, we can work
around the problem by explicitly assigning little-endian values to the
parameter block.

See https://github.com/BLAKE2/libb2/issues/12.

7 years agobpo-30057: Fix potential missed signal in signal.signal(). (#4258)
Antoine Pitrou [Fri, 3 Nov 2017 18:58:46 +0000 (19:58 +0100)]
bpo-30057: Fix potential missed signal in signal.signal(). (#4258)

Bug report and patch by Jeroen Demeyer.

7 years agobpo-31924: Fix test_curses on NetBSD 8. (#4228)
Serhiy Storchaka [Fri, 3 Nov 2017 18:29:33 +0000 (20:29 +0200)]
bpo-31924: Fix test_curses on NetBSD 8. (#4228)

7 years agobpo-31310: multiprocessing's semaphore tracker should be launched again if crashed...
Antoine Pitrou [Fri, 3 Nov 2017 13:31:38 +0000 (14:31 +0100)]
bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed (#3247)

* bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed

* Avoid mucking with process state in test.
Add a warning if the semaphore process died, as semaphores may then be leaked.

* Add NEWS entry

7 years agobpo-31308: If multiprocessing's forkserver dies, launch it again when necessary ...
Antoine Pitrou [Fri, 3 Nov 2017 12:34:22 +0000 (13:34 +0100)]
bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary (#3246)

* bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary.

* Fix test on Windows

* Add NEWS entry

* Adopt a different approach: ignore SIGINT and SIGTERM, as in semaphore tracker.

* Fix comment

* Make sure the test doesn't muck with process state

* Also test previously-started processes

* Update 2017-08-30-17-59-36.bpo-31308.KbexyC.rst

* Avoid masking SIGTERM in forkserver.  It's not necessary and causes a race condition in test_many_processes.

7 years agobpo-31926: fix missing *_METHODDEF statements by argument clinic (#4230)
Tal Einat [Fri, 3 Nov 2017 09:09:00 +0000 (11:09 +0200)]
bpo-31926: fix missing *_METHODDEF statements by argument clinic (#4230)

When a single .c file contains several functions and/or methods with
the same name, a safety _METHODDEF #define statement is generated
only for one of them.

This fixes the bug by using the full name of the function to avoid
duplicates rather than just the name.

7 years agobpo-31415: Support PYTHONPROFILEIMPORTTIME envvar equivalent to -X importtime (#4240)
Barry Warsaw [Thu, 2 Nov 2017 23:13:36 +0000 (16:13 -0700)]
bpo-31415: Support PYTHONPROFILEIMPORTTIME envvar equivalent to -X importtime (#4240)

Support PYTHONPROFILEIMPORTTIME envvar equivalent to -X importtime