Victor Stinner
97d15ae1d8
bpo-40170: Use inline _PyType_HasFeature() function (GH-22375)
...
Use _PyType_HasFeature() in the _io module and in structseq
implementation. Replace PyType_HasFeature() opaque function call with
_PyType_HasFeature() inlined function.
2020-09-23 14:08:38 +02:00
Mohamed Koubaa
ddc0dd001a
bpo-1635741, unicodedata: add ucd_type parameter to UCD_Check() macro (GH-22328)
...
Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-23 12:38:16 +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
Raymond Hettinger
438e9fc66f
bpo-41513: Improve order of adding fractional values. Improve variable names. (GH-22368)
2020-09-22 20:01:12 -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
Mohamed Koubaa
1b328ea9a7
bpo-1635741: Convert an _lsprof method to argument clinic (GH-22240)
2020-09-21 14:40:42 +02: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
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
Raymond Hettinger
ec8a15b034
Make fractional value accumulation consistent inside and outside the loop. (GH-22315)
2020-09-18 17:57:28 -07: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
Raymond Hettinger
457d4e97de
bpo-41513: Add docs and tests for hypot() (GH-22238)
2020-09-13 23:33:41 -07:00
Mohamed Koubaa
f76d894dc5
bpo-1635741: Port cmath to multi-phase init (PEP 489) (GH-22165)
2020-09-10 16:09:04 +02:00
Jakub Kulík
fa8c9e7010
bpo-41687: Fix error handling in Solaris sendfile implementation (GH-22128)
...
I just realized that my recent PR with sendfile on Solaris ([PR 22040](https://github.com/python/cpython/pull/22040 )) has broken error handling.
Sorry for that, this simple followup fixes that.
Automerge-Triggered-By: @1st1
2020-09-09 12:29:42 -07:00
Mohamed Koubaa
3ff6975e2c
bpo-1635741: port scproxy to multi-phase init (GH-22164)
2020-09-09 12:28:48 +09:00
Mohamed Koubaa
52a2df135c
bpo-1635741: Convert _sha256 types to heap types (GH-22134)
...
Convert the _sha256 extension module types to heap types.
2020-09-08 11:16:14 +02:00
Mohamed Koubaa
15dcdb2113
bpo-1635741: Port the termios to multi-phase init (PEP 489) (GH-22139)
2020-09-08 10:59:15 +02:00
Erlend Egeberg Aasland
207c321f13
bpo-40744: Drop support for SQLite pre 3.7.3 (GH-20909)
...
Remove code required to support SQLite pre 3.7.3.
Co-written-by: Berker Peksag <berker.peksag@gmail.com>
Co-written-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2020-09-07 22:26:54 +01:00
Mohamed Koubaa
1baf030a90
bpo-1635741 port _curses_panel to multi-phase init (PEP 489) (GH-21986)
2020-09-07 17:14:25 +02:00
Mohamed Koubaa
2aabc3200b
bpo-1635741: Port _overlapped module to multi-phase init (GH-22051)
...
Port the _overlapped extension module to multi-phase initialization (PEP 489).
2020-09-07 15:12:40 +02:00
Mohamed Koubaa
426f2b4f13
bpo-1635741: Port _opcode module to multi-phase init (PEP 489) (GH-22050)
2020-09-07 10:48:44 +02:00
Mohamed Koubaa
1aaa21ff81
bpo-1635741 port zlib module to multi-phase init (GH-21995)
...
Port the zlib extension module to multi-phase initialization (PEP 489).
2020-09-07 10:27:55 +02:00
Raymond Hettinger
67c998de24
bpo-41513: Expand comments and add references for a better understanding (GH-22123)
2020-09-06 15:10:07 -07:00
Mohamed Koubaa
63f102fe07
bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818)
...
Port the _sha1, _sha512, and _md5 extension modules
to multi-phase initialization API (PEP 489).
2020-09-06 12:09:51 +02:00
Erlend Egeberg Aasland
7f331c898a
bpo-40318: Migrate to SQLite3 trace v2 API (GH-19581)
...
Ref. https://sqlite.org/c3ref/trace_v2.html
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-05 21:43:31 +01:00
Jakub Kulík
8c0be6fd91
bpo-41687: Fix sendfile implementation to work with Solaris ( #22040 )
2020-09-05 12:10:01 -07:00
Serhiy Storchaka
8171580871
bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999)
...
It contains now the name of the parameter instead of its index when parameters
are supplied as a dict.
2020-09-04 20:55:41 +03:00
Victor Stinner
4b8032e5a4
bpo-41713: _signal doesn't use multi-phase init (GH-22087)
...
Partially revert commit 71d1bd9569c8a497e279f2fea6fe47cd70a87ea3:
don't use multi-phase initialization (PEP 489) for the _signal
extension module.
2020-09-04 14:51:05 +02:00
Mohamed Koubaa
71d1bd9569
bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049)
2020-09-03 10:21:06 +02:00
Benjamin Peterson
3940333637
closes bpo-41689: Preserve text signature from tp_doc in C heap type creation. (GH-22058)
2020-09-02 11:29:06 -05:00
Pablo Galindo
f9c5e3f5f6
bpo-41675: Modernize siginterrupt calls (GH-22028)
...
siginterrupt is deprecated:
./Modules/signalmodule.c:667:5: warning: ‘siginterrupt’ is deprecated: Use sigaction with SA_RESTART instead [-Wdeprecated-declarations]
667 | if (siginterrupt(signalnum, flag)<0) {
2020-09-02 15:29:12 +01:00
Mohamed Koubaa
93d50a6a8d
bpo-1635741: Port _sha3 module to multi-phase init (GH-21855)
...
Port the _sha3 extension module to multi-phase init (PEP 489).
Convert static types to heap types.
2020-09-02 11:55:19 +02:00
Mohamed Koubaa
a7f026870d
bpo-1635741: Port _blake2 module to multi-phase init (GH-21856)
...
Port the _blake2 extension module to the multi-phase
initialization API (PEP 489).
2020-09-02 11:45:13 +02:00
Raymond Hettinger
5b24d1592a
Improve hypot() accuracy with three separate accumulators (GH-22032)
2020-09-01 22:00:50 -07:00
Raymond Hettinger
92c38164a4
Further improve accuracy of math.hypot() (GH-22013)
2020-08-30 10:00:11 -07:00
Raymond Hettinger
27de28607a
bpo-41513: Save unnecessary steps in the hypot() calculation ( #21994 )
2020-08-29 09:11:04 -07:00
Raymond Hettinger
82e79480d6
Fix typos in comment (GH-21966)
2020-08-26 13:09:40 -07:00
Dong-hee Na
31967fd8d0
bpo-40077: Convert _operator to use PyType_FromSpec (GH-21954)
2020-08-27 02:22:27 +09:00
Raymond Hettinger
8e19c8be87
bpo-41513: More accurate hypot() (GH-21916)
2020-08-24 17:40:08 -07:00
Paul Ganssle
c3dd7e45cc
bpo-41568: Fix refleaks in zoneinfo subclasses (GH-21907)
...
* Fix refleak in C module __init_subclass__
This was leaking a reference to the weak cache dictionary for every
ZoneInfo subclass created.
* Fix refleak in ZoneInfo subclass's clear_cache
The previous version of the code accidentally cleared the global
ZONEINFO_STRONG_CACHE variable (and inducing `ZoneInfo` to create a new
strong cache) on calls to a subclass's `clear_cache()`. This would not
affect guaranteed behavior, but it's still not the right thing to do
(and it caused reference leaks).
2020-08-17 23:40:07 +01:00
Soumendra Ganguly
97003466d4
Update the comment of termios.c ( #21886 )
2020-08-17 00:51:00 +09:00
Raymond Hettinger
fff3c28052
bpo-41513: Improve speed and accuracy of math.hypot() (GH-21803)
2020-08-15 19:38:19 -07:00
Dima Tisnek
495bd03566
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation (GH-18772)
...
[bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation
Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links)
2020-08-15 10:01:19 -07:00
Stefan Krah
40e700ad04
bpo-40878: xlc cannot handle C99 extern inline. (GH-21887)
...
This applies to the default "extc99" mode. Python does not compile with "stdc99".
2020-08-15 16:06:21 +02:00
Paul Ganssle
87d8287865
bpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965)
...
Prior to this change, attempting to subclass the C implementation of
zoneinfo.ZoneInfo gave the following error:
TypeError: unbound method ZoneInfo.__init_subclass__() needs an argument
https://bugs.python.org/issue41025
2020-08-13 22:38:30 -04:00
Mohamed Koubaa
e087f7cd43
bpo-1635741: Port _winapi ext to multi-stage init (GH-21371)
2020-08-13 16:22:48 +02:00
Stefan Krah
6e0b788881
Catch all skip_handler cases (GH-21842)
2020-08-12 16:00:05 +02:00
Stefan Krah
b5f87b93a5
Call randseed() before other imports in deccheck.py (GH-21834)
2020-08-11 21:14:51 +02:00
Mohamed Koubaa
1d541c25c8
bpo-1635741: Port multiprocessing ext to multiphase init (GH-21378)
...
Port the _multiprocessing extension module to multiphase initialization (PEP 489).
2020-08-11 12:32:35 +02:00
Stefan Krah
85fdafa6ea
Replace import_fresh_module in decimal test files (GH-21815)
2020-08-10 21:54:50 +02:00