Commit Graph

105431 Commits

Author SHA1 Message Date
Victor Stinner d299b8b47d
Fix _PyTraceMalloc_Fini() definition (GH-16259)
The function return type is void, not int.
2019-09-18 14:39:20 +02:00
Victor Stinner 0a963fbc9c
bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16249)
dump_traceback_later() and cancel_dump_traceback_later() functions of
the faulthandler module are always available since Python 3.7.
2019-09-18 14:15:10 +02:00
Victor Stinner da57599af5
bpo-38203: regrtest: put a 2 min timeout on Python exit (GH-16250) 2019-09-18 08:29:25 +02:00
Raymond Hettinger 272d0d017a
bpo-36546: No longer a need to make "data" positional only (GH-16252) 2019-09-17 20:45:05 -07:00
Victor Stinner b9877cd2cc
bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on Windows (GH-16247)
It is a known and tracked bug: disable the test until it's fixed.
2019-09-18 01:58:29 +02:00
Victor Stinner 1ce16fb097
bpo-38070: Py_FatalError() logs runtime state (GH-16246) 2019-09-18 01:35:33 +02:00
Victor Stinner d3b904144e
bpo-38070: Add _PyRuntimeState.preinitializing (GH-16245)
Add _PyRuntimeState.preinitializing field: set to 1 while
Py_PreInitialize() is running.

_PyRuntimeState: rename also pre_initialized field to preinitialized.
2019-09-17 23:59:51 +02:00
Victor Stinner b39afb7876
bpo-38070: Enhance _PyObject_Dump() (GH-16243)
_PyObject_Dump() now dumps the object address for freed objects and
objects with ob_type=NULL.
2019-09-17 23:36:28 +02:00
Victor Stinner 8fa3e1740b
bpo-38070: _Py_DumpTraceback() writes <no Python frame> (GH-16244)
When a Python thread has no frame, _Py_DumpTraceback() and
_Py_DumpTracebackThreads() now write "<no Python frame>", rather than
writing nothing.
2019-09-17 23:36:16 +02:00
Serhiy Storchaka 8fc5839a9d
bpo-38191: Turn warnings into errors in NamedTuple() and TypedDict(). (GH-16238) 2019-09-17 22:41:55 +03:00
Serhiy Storchaka 2bf31ccab3
bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222)
This includes such names as "cls", "self", "typename", "_typename",
"fields" and "_fields".
Passing positional arguments by keyword is deprecated.
2019-09-17 21:22:00 +03:00
Diego Alberto Barriga Martínez b57481318e bpo-37904: Edition on python tutorial - section 4 (GH-16169)
A little change on first paragraph of python tutorial to be more clearly



https://bugs.python.org/issue37904



Automerge-Triggered-By: @ericvsmith
2019-09-17 09:57:55 -07:00
Pablo Galindo 6fbc924696
bpo-38187: Fix reference leak in test_tools (GH-16233) 2019-09-17 17:04:46 +01:00
Andrew Svetlov c275312a62 bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070)
Even when the helper is not started yet.

This behavior follows conventional generator one.
There is no reason for `async_generator_athrow` to handle `gen.throw()` differently.



https://bugs.python.org/issue38013
2019-09-17 05:59:49 -07:00
Abraham Toriz Cruz 5f5f11faf9 bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)
In the format string for assert_called the evaluation order is incorrect and hence for mock's without name, 'None' is printed whereas it should be 'mock' like for other messages. The error message is ("Expected '%s' to have been called." % self._mock_name or 'mock').
2019-09-17 12:16:08 +01:00
Jörn Heissler 219fb9d65e Doc: Fix grammar/spelling in ssl.VERIFY_CRL_CHECK_LEAF docs (GH-16221) 2019-09-17 12:42:30 +02:00
Victor Stinner 46b0b81220
bpo-37531: regrtest main process uses shorter timeout (GH-16220)
When using multiprocesss (-jN), the main process now uses a timeout
of 60 seconds instead of the double of the --timeout value. The
buildbot server stops a job which does not produce any output in 1200
seconds.
2019-09-17 10:08:19 +02:00
Hrvoje Nikšić 5d359cc62e bpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202)
See https://bugs.python.org/issue38192 .



https://bugs.python.org/issue38192
2019-09-17 00:16:43 -07:00
Serhiy Storchaka f669581a95
bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190) 2019-09-17 09:20:56 +03:00
Terry Jan Reedy dfd34a9cd5
bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)
One happens when EditorWindow.close is called twice.
Printing a traceback, when IDLE is run from a terminal,
is useless and annoying.
2019-09-17 02:05:04 -04:00
Adorilson Bezerra 63dedef48b Doc: Add list(dict) in stdtypes library (GH-16209) 2019-09-17 06:57:14 +02:00
Terry Jan Reedy 0048afc16a
bpo-38183: Test_idle ignores user config directory GH-16198)
It no longer tries to create or access .idlerc or any files within.
Users must run IDLE to discover problems with saving settings.
2019-09-16 19:04:21 -04:00
Ivan Levkivskyi 81528ba2e8
bpo-28556: Update the opening note in typing docs (GH-16204)
This PR replaces the old note mentioning that `typing` is a provisional module with a new one mentioning types are not enforced at runtime. I am not sure if there was any official announcement about making `typing` non-provisional, but _de-facto_ no new features were added during Python 3.7, and no backwards incompatible changes were made except for few small things that were considered bugs.
2019-09-16 23:04:06 +01:00
Christian Heimes 724f1a5723 bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140)
``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``. 


https://bugs.python.org/issue33936
2019-09-16 12:10:05 -07:00
amist 336b3064d8 Doc: Fix Wikipedia link for functools.lru_cache (GH-16183) 2019-09-16 20:36:14 +02:00
Serhiy Storchaka 8debfa5040
bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155) 2019-09-16 20:15:18 +03:00
marcoramirezmx a9187c3118 bpo-38100: Fix spelling error in unittest.mock code (GH-16168) 2019-09-16 18:34:46 +02:00
Adorilson Bezerra f18242be16 Doc: Add link of GNU Readline library to interpreter tutorial (GH-16152) 2019-09-16 18:18:04 +02:00
Steve Dower 89b8933bb5
bpo-38081: Add more non-fatal error codes for ntpath.realpath (GH-16156) 2019-09-16 15:25:11 +01:00
Steve Dower 3ab73f6bbf
bpo-38117: Update bundled Windows OpenSSL to 1.1.1d (GH-16184) 2019-09-16 15:21:16 +01:00
Adorilson Bezerra b7af4e7565 Doc: remove duplicate word in controlflow tutorial (GH-16163) 2019-09-16 09:04:58 +02:00
Hai Shi 56a45142e7 Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) 2019-09-16 13:56:57 +08:00
Ned Deily 24d1597e43
bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170) 2019-09-16 03:38:27 +01:00
Hrvoje Nikšić c717c73fa3 bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159)
https://bugs.python.org/issue38178
2019-09-15 10:06:02 -07:00
Raymond Hettinger 6e27a0d775
bpo-37798: Prevent undefined behavior in direct calls to the C helper function. (#16149) 2019-09-15 09:36:38 -07:00
Dino Viehland 09dc2c672f
Fix missing dec ref (#16158) 2019-09-15 15:51:44 +01:00
t k 8b31a11a69 bpo38158: Removing nonexistant member "doc" from PyType_Spec documentation (GH-16142) 2019-09-15 07:50:05 +01:00
Kyle Stanley ff603f6c3d bpo-37635: Update arg name for seek() in IO tutorial (GH-16147)
Typically, the second positional argument for ``seek()`` is *whence*. That is the POSIX standard name (http://man7.org/linux/man-pages/man3/lseek.3p.html) and the name listed in the documentation for ``io`` module (https://docs.python.org/3/library/io.html#io.IOBase.seek). 

The tutorial for IO is the only location where the second positional argument for ``seek()`` is referred to as *from_what*. I suspect this was created at an early point in Python's history, and was never updated (as this section predates the GitHub repository):

```
$ git grep "from_what"
Doc/tutorial/inputoutput.rst:To change the file object's position, use ``f.seek(offset, from_what)``.  The position is computed
Doc/tutorial/inputoutput.rst:the *from_what* argument.  A *from_what* value of 0 measures from the beginning
Doc/tutorial/inputoutput.rst:the reference point.  *from_what* can be omitted and defaults to 0, using the
```

For consistency, I am suggesting that the tutorial be updated to use the same argument name as the IO documentation and POSIX standard for ``seek()``, particularly since this is the only location where *from_what* is being used.

Note: In the POSIX standard, *whence* is technically the third positional argument, but the first argument *fildes* (file descriptor) is implicit in Python.


https://bugs.python.org/issue37635
2019-09-14 13:29:23 -07:00
Christian Heimes eb2b0c694a
bpo-38153: detect shake independently from sha3 (GH-16143)
XOF digests (SHAKE) are not available in OpenSSL 1.1.0 but SHA3 fixed-length digests are.

Signed-off-by: Christian Heimes <christian@python.org>
2019-09-14 17:29:54 +02:00
Dino Viehland f919054e53
bpo-38116: Convert select module to PEP-384 (#15971)
* Convert select module to PEP-384

Summary: Do the necessary versions to be Pyro-compatible, including migrating `PyType_Ready` to `PyType_FromSpec` and moving static data into a new `_selectstate` struct.

* 📜🤖 Added by blurb_it.

* Fixup Mac OS/X build
2019-09-14 15:20:27 +01:00
Eddie Elizondo 0247e80f3c Fix leaks in Python-ast.c (#16127) 2019-09-14 14:38:17 +01:00
Serhiy Storchaka 279f44678c
bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values
(like in the optional third parameter of getattr). "None" should be used if None is accepted
as argument and passing None has the same effect as not passing the argument at all.
2019-09-14 12:24:05 +03:00
Zackery Spytz d057b896f9 bpo-37953: Fix deprecation warnings in test_typing (GH-16133)
self.assertEquals() is deprecated.

```
./python -We -m test test_typing
Run tests sequentially
0:00:00 load avg: 0.23 [1/1] test_typing
test test_typing failed -- Traceback (most recent call last):
  File "/home/lubuntu2/cpython/Lib/test/test_typing.py", line 2382, in test_forward_equality_gth
    self.assertEquals(Union[c1, c1_gth], Union[c1])
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 1390, in deprecated_func
    warnings.warn(
DeprecationWarning: Please use assertEqual instead.

test_typing failed

== Tests result: FAILURE ==

1 test failed:
    test_typing

Total duration: 140 ms
Tests result: FAILURE
```



https://bugs.python.org/issue37953
2019-09-14 00:42:56 -07:00
Anthony Sottile a26ace19bd Doc: Fix link to window.getch in curses documentation (GH-16132) 2019-09-14 07:17:09 +01:00
Xtreak bdd6945d4d bpo-33095: Add reference to isolated mode in -m and script option (GH-7764)
Attempt to make isolated mode easier to discover via additional inline documentation.

Co-Authored-By: Julien Palard <julien@palard.fr>
2019-09-14 10:35:44 +10:00
Serhiy Storchaka bf169915ec
bpo-38005: Fixed comparing and creating of InterpreterID and ChannelID. (GH-15652)
* Fix a crash in comparing with float (and maybe other crashes).
* They are now never equal to strings and non-integer numbers.
* Comparison with a large number no longer raises OverflowError.
* Arbitrary exceptions no longer silenced in constructors and comparisons.
* TypeError raised in the constructor contains now the name of the type.
* Accept only ChannelID and int-like objects in channel functions.
* Accept only InterpreterId, int-like objects and str in the InterpreterId constructor.
* Accept int-like objects, not just int in interpreter related functions.
2019-09-13 22:50:27 +03:00
plokmijnuhby e082e7cbe4 bpo-37953: Fix ForwardRef hash and equality checks (GH-15400)
Ideally if we stick a ForwardRef in a dictionary we would like to reliably be able to get it out again.

https://bugs.python.org/issue37953
2019-09-13 20:40:54 +01:00
Eric O. LEBIGOT (EOL) 77cd0ceab2 Doc: fcntl.lockf() is more powerful than written (GH-6750) 2019-09-13 18:32:28 +01:00
Benjamin Peterson 0bc17ea2f5
Fix typo in test_api.py. (GH-16119) 2019-09-13 18:27:59 +01:00
bchhabra2490 d44542f9a2 bpo-32790: Add info about alt format using # for 'g' in chart (GH-6624) 2019-09-13 18:20:21 +01:00