Commit Graph

12082 Commits

Author SHA1 Message Date
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
Stefan Krah
39042e00ab bpo-41324 Add a minimal decimal capsule API (#21519) 2020-08-10 16:32:21 +02:00
pxinwr
3405e05428 bpo-41440: add os.cpu_count() support for VxWorks RTOS (GH-21685) 2020-08-07 14:21:52 +09:00
Hans Petter Jansson
da4e09fff6 bpo-36982: Add support for extended color functions in ncurses 6.1 (GH-17536)
Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>
2020-08-03 23:51:33 -04:00
linchiwei123
52bf4706a3 Fix atexitmodule doc (GH-21456) 2020-07-26 20:33:00 -03:00
Stefan Krah
9b9f158275 bpo-41369 Update to libmpdec-2.5.1: new features (GH-21593) 2020-07-22 21:54:42 +02:00
Zackery Spytz
eca2549f5a bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)
Do not call PyObject_CallMethod() with a live exception (like
KeyboardInterrupt).
2020-07-20 15:51:26 +03:00
Serhiy Storchaka
b4c98ed41e bpo-41288: Refactor of unpickling NEWOBJ and NEWOBJ_EX opcodes. (GH-21472)
* Share code for NEWOBJ and NEWOBJ_EX.
* More detailed error messages.
2020-07-18 11:11:21 +03:00
Mark Shannon
cb9879b948 bpo-40941: Unify implicit and explicit state in the frame and generator objects into a single value. (GH-20803)
* Merge gen and frame state variables into one.

* Replace stack pointer with depth in PyFrameObject. Makes code easier to read and saves a word of memory.
2020-07-17 11:44:23 +01:00
matthewhughes934
8e836bb21c bpo-41195: Add getter for Openssl security level (GH-21282)
Add an accessor under SSLContext.security_level as a wrapper around
SSL_CTX_get_security_level, see:
https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_security_level.html


------
This is my first time contributing, so please pull me up on all the things I missed or did incorrectly.

Automerge-Triggered-By: @tiran
2020-07-17 01:59:15 -07:00
Zackery Spytz
af4eda46d1 bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() call (GH-19686) 2020-07-15 21:43:00 +03:00
Benjamin Peterson
0108b2a240 Fix -Wstring-prototypes warnings in _zoneinfo.c. (GH-21478) 2020-07-15 12:02:14 -05:00
Felix Yan
015efdbef7 bpo-41302: Fix build with system libmpdec (GH-21481)
Move definition of UNUSED from modified headers of libmpdec to
_decimal.c itself. This makes the vendored source closer to the
standalone library and fixes build with --with-system-libmpdec.

Tested to build fine with either system libmpdec or the vendored one.
2020-07-15 14:14:11 +02:00
Zackery Spytz
bbceef6851 bpo-20183: Convert _locale to the Argument Clinic (GH-14201) 2020-07-15 12:07:34 +03:00
Serhiy Storchaka
4f309abf55 bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)
Automerge-Triggered-By: @tiran
2020-07-13 05:49:26 -07:00