Ram Rachum
b0dfc75816
bpo-41773: Raise exception for non-finite weights in random.choices(). (GH-22441)
2020-09-28 18:32:10 -07:00
Dennis Sweeney
e8acc355d4
bpo-41873: Add vectorcall for float() (GH-22432)
2020-09-29 09:55:52 +09:00
Hai Shi
d332e7b816
bpo-41842: Add codecs.unregister() function (GH-22360)
...
Add codecs.unregister() and PyCodec_Unregister() functions
to unregister a codec search function.
2020-09-28 23:41:11 +02:00
Dong-hee Na
24ba3b0df5
bpo-41875: Use __builtin_unreachable when possible (GH-22433)
2020-09-29 05:41:23 +09:00
Jan Mazur
ff9147d93b
bpo-40105: ZipFile truncate in append mode with shorter comment (GH-19337)
2020-09-28 21:53:33 +03:00
Dong-hee Na
a195bceff7
bpo-41870: Use PEP 590 vectorcall to speed up bool() (GH-22427)
...
* bpo-41870: Use PEP 590 vectorcall to speed up bool()
* bpo-41870: Add NEWS.d
2020-09-29 01:16:21 +09:00
Dong-hee Na
2afd1751dd
bpo-1635741: Port _bisect module to multi-phase init (GH-22415)
2020-09-26 19:56:26 +09:00
Mark Shannon
02d126aa09
bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395)
...
* Account for control blocks in 'except' in compiler. Fixes #39934 .
2020-09-25 14:04:19 +01:00
Terry Jan Reedy
05cc881cbc
bpo-41775: Make 'IDLE Shell' the shell title ( #22399 )
...
'Python Shell' may have contributed to some beginners confusing 'IDLE' with ' Python'.
2020-09-24 15:30:09 -04:00
Victor Stinner
98c16c991d
bpo-41833: threading.Thread now uses the target name (GH-22357)
2020-09-23 23:21:19 +02:00
Zackery Spytz
2e4dd336e5
bpo-30155: Add macros to get tzinfo from datetime instances (GH-21633)
...
Add PyDateTime_DATE_GET_TZINFO() and PyDateTime_TIME_GET_TZINFO()
macros.
2020-09-23 14:43:45 -04:00
Victor Stinner
19c3ac92bf
bpo-41834: Remove _Py_CheckRecursionLimit variable (GH-22359)
...
Remove the global _Py_CheckRecursionLimit variable: it has been
replaced by ceval.recursion_limit of the PyInterpreterState
structure.
There is no need to keep the variable for the stable ABI, since
Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() were not usable
in Python 3.8 and older: these macros accessed PyThreadState members,
whereas the PyThreadState structure is opaque in the limited C API.
2020-09-23 14:04:57 +02:00
Mohamed Koubaa
83de110dce
bpo-1635741: Port _lsprof extension to multi-phase init (PEP 489) (GH-22220)
2020-09-23 12:33:21 +02:00
Terry Jan Reedy
947adcaa13
bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363)
2020-09-22 13:21:58 -04:00
Bas van Beek
0d0e9fe2ff
bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` & `.NotImplementedType` (GH-22336)
...
closes issue 41810
2020-09-22 08:55:34 -07:00
Thomas Grainger
a68a2ad19c
bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module ( #21956 )
...
Closes bpo issue 41602
2020-09-22 08:53:03 -07:00
Ethan Furman
ea0711a9f9
bpo-41817: use new StrEnum to ensure all members are strings (GH-22348)
...
* use new StrEnum to ensure all members are strings
2020-09-22 08:01:17 -07:00
Serhiy Storchaka
557b9a52ed
bpo-40670: More reliable validation of statements in timeit.Timer. (GH-22358)
...
It now accepts "empty" statements (only whitespaces and comments)
and rejects misindentent statements.
2020-09-22 16:16:46 +03:00
Ethan Furman
62e40d8450
Enum: add extended AutoNumber example (GH-22349)
2020-09-22 00:05:27 -07:00
Terry Jan Reedy
40a0625792
bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350)
...
The marker was added to the language in 3.8 and
3.7 only gets security patches.
2020-09-22 01:43:55 -04:00
Ethan Furman
0063ff4e58
bpo-41816: add `StrEnum` (GH-22337)
...
`StrEnum` ensures that its members were already strings, or intended to
be strings.
2020-09-21 17:23:13 -07:00
Angelin BOOZ
68526fe258
bpo-40084: Enum - dir() includes member attributes (GH-19219)
2020-09-21 06:11:06 -07:00
Berker Peksag
5c0eed7375
bpo-12178: Fix escaping of escapechar in csv.writer() (GH-13710)
...
Co-authored-by: Itay Elbirt <anotahacou@gmail.com>
2020-09-20 09:38:07 +03:00
Peter McCormick
bfee9fad84
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)
...
# [bpo-41815](): SQLite: fix segfault if backup called on closed database
Attempting to backup a closed database will trigger segfault:
```python
import sqlite3
target = sqlite3.connect(':memory:')
source = sqlite3.connect(':memory:')
source.close()
source.backup(target)
```
2020-09-19 20:40:46 -07:00
Mark Dickinson
c8c70e7876
Add missing whatsnew entry for TestCase.assertNoLogs (GH-22317)
2020-09-19 21:38:11 +01:00
idomic
0c71a66b53
bpo-33689: Blank lines in .pth file cause a duplicate sys.path entry (GH-20679)
2020-09-19 22:13:29 +03:00
Vladimir Matveev
2b05361bf7
bpo-41756: Introduce PyGen_Send C API (GH-22196)
...
The new API allows to efficiently send values into native generators
and coroutines avoiding use of StopIteration exceptions to signal
returns.
ceval loop now uses this method instead of the old "private"
_PyGen_Send C API. This translates to 1.6x increased performance
of 'await' calls in micro-benchmarks.
Aside from CPython core improvements, this new API will also allow
Cython to generate more efficient code, benefiting high-performance
IO libraries like uvloop.
2020-09-18 18:38:38 -07:00
Dong-hee Na
6595cb0af4
bpo-35293: Remove RemovedInSphinx40Warning (GH-22198)
...
* bpo-35293: Remove RemovedInSphinx40Warning
* Update Misc/NEWS.d/next/Documentation/2020-09-12-17-37-13.bpo-35293._cOwPD.rst
Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-35293: Apply Victor's review
Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-18 18:22:36 +09:00
Serhiy Storchaka
27201cddf3
Remove duplicated words words (GH-22298)
2020-09-18 09:54:42 +03:00
Serhiy Storchaka
0b419b7910
bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
...
* When the parameters argument is a list, correctly handle the case
of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
override an exception raised in ``__len__()``.
2020-09-17 10:35:44 +03:00
Ethan Furman
7219e27087
Enum: make `Flag` and `IntFlag` members iterable (GH-22221)
2020-09-16 13:01:00 -07:00
Ethan Furman
5c1b46d897
acknowledge Weipeng Hong's contributions (GH-22284)
2020-09-16 11:37:24 -07:00
Ethan Furman
c95ad7a91f
bpo-39728: Enum: fix duplicate `ValueError` (GH-22277)
...
fix default `_missing_` to return `None` instead of raising a `ValueError`
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>
2020-09-16 10:26:50 -07:00
Ethan Furman
3064dbf5df
bpo-41517: do not allow Enums to be extended ( #22271 )
...
fix bug that let Enums be extended via multiple inheritance
2020-09-16 07:11:57 -07:00
Patrick Reader
0705ec8a14
bpo-41792: Add is_typeddict function to typing.py (GH-22254)
...
Closes issue41792.
Also closes https://github.com/python/typing/issues/751 .
2020-09-15 21:58:32 -07:00
Ethan Furman
22415ad625
bpo-41789: honor object overrides in Enum classes (GH-22250)
...
EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed. This patch fixes that.
Automerge-Triggered-By: @ethanfurman
2020-09-15 16:28:25 -07:00
Ethan Furman
bff01f3a3a
bpo-39587: Enum - use correct mixed-in data type (GH-22263)
2020-09-15 15:56:26 -07:00
Batuhan Taskaya
2e87774df1
bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262)
...
Automerge-Triggered-By: @gvanrossum
2020-09-15 14:58:32 -07:00
Victor Stinner
e5fbe0cbd4
bpo-41631: _ast module uses again a global state ( #21961 )
...
Partially revert commit ac46eb4ad6662cf6d771b20d8963658b2186c48c:
"bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)".
Using a module state per module instance is causing subtle practical
problems.
For example, the Mercurial project replaces the __import__() function
to implement lazy import, whereas Python expected that "import _ast"
always return a fully initialized _ast module.
Add _PyAST_Fini() to clear the state at exit.
The _ast module has no state (set _astmodule.m_size to 0). Remove
astmodule_traverse(), astmodule_clear() and astmodule_free()
functions.
2020-09-15 18:03:34 +02:00
Václav Slavík
7c11a9acca
bpo-41744: Package python.props with correct name in NuGet package (GH-22154)
...
NuGet automatically includes .props file from the build directory in the
target using the package, but only if the .props file has the correct
name: it must be $(id).props
Rename python.props correspondingly in all the nuspec variants. Also
keep python.props as it were for backward compatibility.
2020-09-14 20:30:15 +01:00
Victor Stinner
1b0f0e3d7d
bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)
...
Fix a race condition in the call_soon_threadsafe() method of
asyncio.ProactorEventLoop: do nothing if the self-pipe socket has
been closed.
2020-09-12 08:50:18 +02:00
Terry Jan Reedy
7e711ead26
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
...
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].
2020-09-12 02:25:36 -04:00
Mark Roseman
06d0b8b67e
bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188)
...
The new link responds much faster and begins with a short explanation of the status of the doc.
2020-09-10 16:04:20 -04:00
Mohamed Koubaa
f76d894dc5
bpo-1635741: Port cmath to multi-phase init (PEP 489) (GH-22165)
2020-09-10 16:09:04 +02:00
Maggie Moss
1b4552c5e8
bpo-41428: Implementation for PEP 604 (GH-21515)
...
See https://www.python.org/dev/peps/pep-0604/ for more information.
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2020-09-09 21:23:24 +01:00
Hai Shi
1e2f051a61
bpo-41726: Update the refcounts info of PyType_FromModuleAndSpec in refcounts.dat (GH-22112)
...
Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat
2020-09-09 11:48:44 +02:00
Mohamed Koubaa
3ff6975e2c
bpo-1635741: port scproxy to multi-phase init (GH-22164)
2020-09-09 12:28:48 +09:00
Serhiy Storchaka
58de1dd6a8
bpo-41525: Make the Python program help ASCII-only (GH-21836)
2020-09-09 01:28:02 +01:00
Mark Shannon
2de50f2600
Fix incorrect bpo number in change notes. (GH-22151)
2020-09-08 17:47:14 +01:00
Victor Stinner
f315142ddc
bpo-1635741: Port mashal module to multi-phase init ( #22149 )
...
Port the 'mashal' extension module to the multi-phase initialization
API (PEP 489).
2020-09-08 15:33:52 +02:00