Commit Graph

28743 Commits

Author SHA1 Message Date
David Bonner 37c0f9ccc0
gh-95804: Respect MemoryHandler.flushOnClose in logging shutdown. (GH-95857) 2022-08-10 18:08:55 +01:00
Eric Snow 3ff6d9affb
gh-95349: Hide a Distutils Warning Filter for test_check_c_globals (GH-95837)
Under certain build conditions, test_check_c_globals fails.  This fix takes the same approach as we took for gh-84236 (via gh-20095).  We'll be removing use of distutils in the c-analyzer at some point.  Until then we'll hide the warning filter.
2022-08-09 16:04:05 -07:00
Petr Viktorin eb81c1aea1
Disable Limited API tests with Py_TRACE_REFS (GH-95796) 2022-08-09 09:03:11 +02:00
Serhiy Storchaka 62f06508e7
gh-95781: More strict format string checking in PyUnicode_FromFormatV() (GH-95784)
An unrecognized format character in PyUnicode_FromFormat() and
PyUnicode_FromFormatV() now sets a SystemError.
In previous versions it caused all the rest of the format string to be
copied as-is to the result string, and any extra arguments discarded.
2022-08-08 19:21:07 +03:00
Petr Viktorin 656dad702d
gh-93274: Expose receiving vectorcall in the Limited API (GH-95717) 2022-08-08 14:12:05 +02:00
Serhiy Storchaka cc9160a29b
gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650) 2022-08-08 14:00:17 +03:00
Erlend E. Aasland 78a85a34ea
gh-95388: Suppress deprecation warning in test_immutable_type_with_mutable_base (GH-95728)
When 3.14 kicks in, it'll be a RuntimeError;
the test will correctly fail then.
2022-08-08 12:15:57 +02:00
JuniorJPDJ 330f1d5828
gh-88339: enable fast seeking of uncompressed unencrypted zipfile.ZipExtFile (GH-27737)
Avoid reading all of the intermediate data in uncompressed items in a zip file when the user seeks forward.

Contributed by: @JuniorJPDJ
2022-08-06 16:21:23 -07:00
Sion Kang a17cd47b61
gh-95376: Add test for names containing null (#GH-5394)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-08-06 18:53:19 +02:00
Sion Kang 4703c15811
gh-95395: Add argument type error test (GH-95412) 2022-08-06 18:52:53 +02:00
da-woods 59e09efe88
Fix typo in test_dataclasses.py (gh-95735)
`dataclass` was called as a function when it was almost certainly intended to be a decorator.
2022-08-06 11:56:00 -04:00
Oleg Iarygin 56d16e8cb4
gh-93243: Make smtpd private before porting its users (GH-93246)
gh-93243

This PR is required to reduce diffs of the following porting (no need to either maintain documentation and tests consistent with each porting step, or try to port everything and remove smtpd in a single PR).

Automerge-Triggered-By: GH:warsaw
2022-08-05 17:41:29 -07:00
Barney Gale 29650fea96
gh-86943: implement `pathlib.WindowsPath.is_mount()` (GH-31458)
Have `pathlib.WindowsPath.is_mount()` call `ntpath.ismount()`. Previously it raised `NotImplementedError` unconditionally.


https://bugs.python.org/issue42777
2022-08-05 15:37:44 -07:00
Pablo Galindo Salgado 787498cbbb
Update the magic number in test_util.py (#95714) 2022-08-05 15:42:39 +01:00
Fantix King 3a9e1fda7a
gh-95573: Reduce test data size in test_asyncio/test_ssl.py (GH-95668)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-08-05 10:45:36 +02:00
Fantix King e1d68b3ce7
gh-95573: Fix a mistake in asyncio ssl tests suppressing all logs (#95687) 2022-08-05 09:33:35 +02:00
Eric Snow 87154d8dd8
gh-94673: Add Per-Interpreter tp_subclasses for Static Builtin Types (gh-95301) 2022-08-04 19:26:59 -06:00
Barry Warsaw e1182bc377
gh-94619: Remove long deprecated methods module_repr() and load_module() (#94624)
* gh-94619: Remove long deprecated methods module_repr() and load_module()

Closes #94619

* Update Misc/NEWS.d/next/Library/2022-07-06-14-57-33.gh-issue-94619.PRqKVX.rst

Fix typo

Co-authored-by: Brett Cannon <brett@python.org>

Co-authored-by: Brett Cannon <brett@python.org>
2022-08-04 17:24:26 -07:00
Serhiy Storchaka ab8a5beb5f
Fix links to old SF bugs (#95648) 2022-08-04 18:12:35 +02:00
Petr Viktorin 7b370b7305
gh-93274: Make vectorcall safe on mutable classes & inherit it by default (#95437) 2022-08-04 17:19:29 +02:00
Petr Viktorin a613fedd6e
gh-95388: Deprecate creating immutable types with mutable bases (GH-95533) 2022-08-04 16:13:45 +02:00
Kumar Aditya 2fef27589e
GH-95289: Always call uncancel() when parent cancellation is requested (#95602)
Co-authored-by: Guido van Rossum <guido@python.org>
2022-08-04 06:57:44 -07:00
Łukasz Langa 0342c93a6b
gh-91323: Revert "Allow overriding a future compliance check in asyncio.Task (GH-32197)" (GH-95442)
This reverts commit d4bb38f82b.
2022-08-04 15:51:38 +02:00
Serhiy Storchaka d0d0154443
gh-91838: Resolve HTTP links which redirect to HTTPS (GH-95642)
It updates links which redirect to HTTPS with different authority or
path.
2022-08-04 13:30:05 +03:00
Miro Hrončok fe23c0061d
gh-94675: Add a regression test for rjsmin re slowdown (GH-94685)
Adds a regression test for an re slowdown observed by rjsmin.
Uses multiprocessing to kill the test after SHORT_TIMEOUT.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Co-authored-by: Christian Heimes <christian@python.org>
2022-08-03 16:19:36 -07:00
Steve Dower 67840edb28
gh-94399: Restore PATH search behaviour of py.exe launcher for '/usr/bin/env' shebang lines (GH-95582) 2022-08-03 22:18:51 +01:00
Jo, Yunjin b53aed76d2
gh-95597: Fix typo in Lib directory files (#95599) 2022-08-03 17:16:15 -04:00
Mark Shannon 906e450932
GH-92678: Fix tp_dictoffset inheritance. (GH-95596)
* Add test for inheriting explicit __dict__ and weakref.

* Restore 3.10 behavior for multiple inheritance of C extension classes that store their dictionary at the end of the struct.
2022-08-03 18:56:24 +01:00
Brandt Bucher c7e5bbaee8
GH-95150: Use position and exception tables for code hashing and equality (GH-95509) 2022-08-01 11:02:56 -07:00
Eugene Triguba a95e60db74
gh-91447: Fix findtext to only give an empty string on None (GH-91486)
The API documentation for [findtext](https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.findtext) states that this function gives back an empty string on "no text content." With the previous implementation, this would give back a empty string even on text content values such as 0 or False. This patch attempts to resolve that by only giving back an empty string if the text attribute is set to `None`. Resolves #91447.

Automerge-Triggered-By: GH:gvanrossum
2022-08-01 09:52:39 -07:00
Jacob Walls c0cd790219
gh-95173: Add a regression test for sorting tuples containing None (#95464) 2022-08-01 18:02:09 +02:00
Erlend Egeberg Aasland bc7c7cd18a
gh-77617: Add sqlite3 command-line interface (#95026)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-08-01 12:25:16 +02:00
Pablo Galindo Salgado aa37ffda29
bpo-45445: Revert "bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)" (#94745) 2022-07-31 16:33:56 +01:00
Robert O'Shea cd26595232
gh-95454: Replace truthy/falsy with true/false (GH-95456) 2022-07-30 00:42:21 -07:00
Serhiy Storchaka 0956b6d9c4
gh-94938: Fix test (GH-95396) 2022-07-30 09:16:22 +03:00
Raghunandan Bhat edb72047f3
gh-43414: os.get_terminal_size() now uses the actual file descriptor on Windows instead of mapping to standard handles (#93203) 2022-07-28 23:48:33 +01:00
Jingxuan He 390847922c
Fix misused variable that was preventing permutations of classes from being tested (GH-93935) 2022-07-28 23:42:51 +01:00
Steve Dower 38bb2068fe
gh-95359: Fix py.exe launcher handling of per-user py.ini and command names (GH-95399) 2022-07-28 21:11:17 +01:00
Kumar Aditya 54f48844d1
GH-95097: fix `asyncio.run` for tasks without `uncancel` method (#95211)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-28 08:47:54 -07:00
Thomas Grainger e16d4ed590
gh-95166: cancel map waited on future on timeout (GH-95169)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-28 11:20:10 +02:00
Serhiy Storchaka ebad53a4dc
gh-94938: Fix errror detection of unexpected keyword arguments (GH-94999)
When keyword argument name is an instance of a str subclass with
overloaded methods __eq__ and __hash__, the former code could not find
the name of an extraneous keyword argument to report an error, and
_PyArg_UnpackKeywords() returned success without setting the
corresponding cell in the linearized arguments array. But since the number
of expected initialized cells is determined as the total number of passed
arguments, this lead to reading NULL as a keyword parameter value, that
caused SystemError or crash or other undesired behavior.
2022-07-28 07:40:36 +03:00
Christian Heimes 0fe645d6fd
gh-95174: Add pthread stubs for WASI (GH-95234)
Co-authored-by: Brett Cannon <brett@python.org>
2022-07-27 20:28:06 +02:00
Jason R. Coombs 78eb3f79ea
gh-93963: Remove usage of deprecated interface from importlib.abc. (#95217)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-27 04:54:31 -04:00
Christian Heimes 565403038b
gh-95280: Fix test_get_ciphers on systems without RSA key exchange (GH-95282) 2022-07-27 09:19:49 +02:00
Christian Heimes 8b24d60f1b
gh-95174: WASI: skip missing sockets functions (GH-95179) 2022-07-27 08:19:23 +02:00
Eric Snow 47e75a0025
gh-94673: Add Per-Interpreter Storage for Static Builtin Types (#95255)
This is the last precursor to storing tp_subclasses (and tp_weaklist) on the interpreter state for static builtin types.

Here we add per-type storage on PyInterpreterState, but only for the static builtin types.  This involves the following:

* add PyInterpreterState.types
   * move PyInterpreterState.type_cache to it
   * add a "num_builtins_initialized" field
   * add a "builtins" field (a static array big enough for all the static builtin types)
* add _PyStaticType_GetState() to look up a static builtin type's state
* (temporarily) add PyTypeObject.tp_static_builtin_index (to hold the type's index into PyInterpreterState.types.builtins)

We will be eliminating tp_static_builtin_index in a later change.
2022-07-26 17:26:43 -06:00
Steve Dower 7ac5bb3e6a
gh-95285: py.exe launcher fails with short argv0 (GH-95295) 2022-07-26 21:24:44 +01:00
Christian Heimes 51c56f8d72
gh-93678: Address stack exhaustion on WASI (GH-95296) 2022-07-26 22:14:35 +02:00
Erlend Egeberg Aasland 152eb90311
gh-95291: Use import helper to improve sqlite3 audit tests (#95292)
Now the tests are correctly reported as skipped if sqlite3 is not available.
2022-07-26 21:18:16 +02:00
Irit Katriel 8660604b3e
gh-95259: add test for traceback with angle-bracketed filename (GH-95260) 2022-07-26 14:34:46 +01:00