Commit Graph

51381 Commits

Author SHA1 Message Date
Sergey B Kirpichev c61de456db
gh-102837: more tests for the math module (GH-111930)
Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8204
2023-11-13 10:57:57 +01:00
Serhiy Storchaka 1d75ef6b61
gh-111999: Add signatures and improve docstrings for builtins (GH-112000) 2023-11-13 09:13:49 +02:00
Barney Gale d7cef7bc7e
GH-111429: Speed up `pathlib.PurePath.[is_]relative_to()` (#111431) 2023-11-12 22:59:17 +00:00
Irit Katriel b2af50cb02
gh-111969: refactor to make it easier to construct a dis.Instruction object (#111970) 2023-11-12 14:06:02 +00:00
Serhiy Storchaka 40752c1c1e
gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002) 2023-11-12 13:35:31 +02:00
Stephen Gildea 38035fed9b
gh-90890: New methods to access mailbox.Maildir message info and flags (#103905)
New methods to access mailbox.Maildir message info and flags:
get_info, set_info, get_flags, set_flags, add_flag, remove_flag.

These methods speed up accessing a message's info and/or flags and are
useful when it is not necessary to access the message's contents,
as when iterating over a Maildir to find messages with specific flags.

---------

* Add more str type checking
* modernize to f-strings instead of %

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-11-11 17:41:33 +00:00
Nikita Sobolev ae8116cfa9
gh-107431: Make `multiprocessing.managers.{DictProxy,ListProxy}` generic (#107433)
Make `multiprocessing.managers.{DictProxy,ListProxy}` generic for type annotation use.  `ListProxy[str]` for example.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-11-10 23:23:27 +00:00
Tian Gao 148af38cd0
gh-80731: Avoid executing code in except block in cmd (GH-111740) 2023-11-10 21:13:29 +00:00
Łukasz Langa 3932b0f7b1
gh-110722: Make `-m test -T -j` use sys.monitoring (GH-111710)
Now all results from worker processes are aggregated and
displayed together as a summary at the end of a regrtest run.

The traditional trace is left in place for use with sequential
in-process test runs but now raises a warning that those
numbers are not precise.

`-T -j` requires `--with-pydebug` as it relies on `-Xpresite=`.
2023-11-10 18:17:45 +01:00
Serhiy Storchaka 0b06d2482d
gh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows (GH-111842) 2023-11-10 18:42:14 +02:00
Zac Hatfield-Dodds d61313bdb1
gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910) 2023-11-10 13:32:36 +00:00
Serhiy Storchaka 64fea3211d
gh-111912: Run test_posix on Windows (GH-111913) 2023-11-10 13:29:15 +00:00
Nicolas Tessore baeb7718f8
gh-111356: io: Add missing documented objects to io.__all__ (#111370)
Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
2023-11-10 16:18:52 +09:00
Victor Stinner b9f814ce6f
gh-111881: Import _sha2 lazily in random (#111889)
The random module now imports the _sha2 module lazily in the
Random.seed() method for str, bytes and bytearray seeds. It also
imports lazily the warnings module in the _randbelow() method for
classes without getrandbits(). Lazy import makes Python startup
faster and reduces the number of imported modules at startup.
2023-11-09 23:10:21 +01:00
Vinay Sajip a5f29c9faf
gh-110875: Handle '.' properties in logging formatter configuration c… (GH-110943) 2023-11-09 18:55:22 +00:00
Victor Stinner 6f09f69b7f
gh-111881: Import doctest lazily in libregrtest (#111884)
In most cases, doctest is not needed. So don't always import it at
startup. The change reduces the number of modules already
imported when a test is run.
2023-11-09 15:00:10 +00:00
Nikita Sobolev 0c42f7304a
gh-108303: Move more files to `Lib/test/test_module` (#111880) 2023-11-09 15:42:34 +01:00
Victor Stinner 0372e3b02a
gh-111881: Use lazy import in test.support (#111885)
* Import lazily getpass in test.support
* Only import ctypes on Windows in test.support.os_helper.
2023-11-09 15:38:13 +01:00
Nikita Sobolev cc18b886a5
gh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879) 2023-11-09 14:52:32 +01:00
Mark Shannon 25c4956488
GH-109369: Exit tier 2 if executor is invalid (GH-111657) 2023-11-09 11:19:51 +00:00
Donghee Na 6046aec377
gh-111835: Add seekable method to mmap.mmap (gh-111852) 2023-11-09 20:13:35 +09:00
Jelle Zijlstra 0b718e6407
gh-110543: Fix CodeType.replace in presence of comprehensions (#110586) 2023-11-08 13:11:59 -07:00
Kalyan a3903c8ec8
gh-111495: Add tests for PyList C API (#111562)
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-11-08 18:10:53 +01:00
Serhiy Storchaka 005d1e8fc8
gh-68166: Tkinter: Add tests and examples for element_create() (GH-111453)
* Remove mention of "vsapi" element type from the documentation.
* Add tests for element_create() and other ttk.Style methods.
* Add examples for element_create() in the documentation.
2023-11-08 18:25:58 +02:00
Pierre Ossman (ThinLinc team) 74b868f636
gh-111246: Remove listening Unix socket on close (#111483)
Try to clean up the socket file we create so we don't add unused noise to the file system.
2023-11-08 08:10:10 -08:00
Stefan f88caab467
gh-111768: Add `wsgiref.util.is_hop_by_hop` to `__all__` (#111770) 2023-11-08 15:29:47 +00:00
Nikita Sobolev 82e36dba45
gh-108303: Move more `typing` related files to `Lib/test/typinganndata` (#111825)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-08 14:19:34 +00:00
Mark Shannon 06efb60264
GH-111848: Tidy up tier 2 handling of FOR_ITER specialization by using DEOPT_IF instead of jumps. (GH-111849) 2023-11-08 13:31:55 +00:00
Victor Stinner 11e83488c5
gh-111089: Revert PyUnicode_AsUTF8() changes (#111833)
* Revert "gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)"

This reverts commit d9b606b3d0.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)"

This reverts commit cde1071b2a.

* Revert "gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)"

This reverts commit d731579bfb.

* Revert "gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)"

This reverts commit d8f32be5b6.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)"

This reverts commit 37e4e20eaa.
2023-11-07 22:36:13 +00:00
Romuald Brunet ea970fb116
gh-61199: Remove superfluous global statements from `base64._b32{en,de}code()*` (GH-111785)
Minor cleanup after commit 4ce6faa6c9
2023-11-07 16:32:44 -06:00
Nikita Sobolev f115a55f0e
gh-111806: Fix `test_recursion` in `test_richcmp` on WASI builds (GH-111830) 2023-11-07 13:37:29 -08:00
Nikita Sobolev 0e83d941be
gh-111808: Fix recursion error on WASM in `test_typing` (GH-111819) 2023-11-07 11:23:57 -08:00
Irit Katriel 2f9cb7e095
gh-81137: deprecate assignment of code object to a function of a mismatched type (#111823) 2023-11-07 18:54:36 +00:00
Anthony Shaw 178861b193
gh-111623: Add Support for Cross-interpreter tuples (gh-111628) 2023-11-07 10:58:29 -07:00
Serhiy Storchaka 70afb8d732
gh-85098: Implement functional CLI of symtable (#109112)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-11-07 16:32:16 +00:00
Serhiy Storchaka f55cb44359
gh-106672: C API: Report indiscriminately ignored errors (GH-106674)
Functions which indiscriminately ignore all errors now report them as
unraisable errors.
2023-11-07 15:58:04 +02:00
Sergey B Kirpichev a077b2fbb8
gh-111765: Move old PyFloat_* tests to Lib/test/test_capi/test_float.py (GH-111766) 2023-11-07 13:40:58 +02:00
Mark Shannon 931f4438c9
GH-111485: Allow arbitrary annotations on instructions and micro-ops. (GH-111697) 2023-11-07 09:42:39 +00:00
Irit Katriel 13405ecffd
gh-79932: raise exception if frame.clear() is called on a suspended frame (#111792) 2023-11-07 08:49:30 +00:00
Gregory P. Smith d2ddfccfb4
gh-110395: test: assert after the child dies. (#111816)
based on review from Victor Stinner.  I already made this edit in the 3.12 backport PR.
2023-11-07 06:05:56 +00:00
Dennis Sweeney 5e5762a2b8
gh-96954: Use skip_if_missing in test_makeunicodedata (GH-111764)
skip_if_missing in test_makeunicodedata
2023-11-06 15:32:35 +01:00
Masayuki Moriyama c8faa3568a
gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695) 2023-11-06 19:59:22 +09:00
Charles Machalow ba8aa1fd37
gh-109466: Add ipv6_mapped property to IPv4Address (#109467)
Adds the `IPv4Address.ipv6_mapped` property.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-05 16:50:31 +00:00
Sergey B Kirpichev 24b5cbd3dc
gh-111495: Add tests for PyComplex C API (GH-111591) 2023-11-05 07:42:42 +00:00
Sergey B Kirpichev b452202a11
gh-111495: Add tests for PyFloat C API (GH-111624) 2023-11-05 09:20:12 +02:00
Tian Gao 853b4b549d
gh-111719: Add extra check for alias command (#111720) 2023-11-04 23:05:22 +00:00
Davide Rizzo a6c1c04d4d
gh-110395: invalidate open kqueues after fork (#110517)
Invalidate open select.kqueue instances after fork as the fd will be invalid in the child.
2023-11-04 21:45:24 +00:00
Tian Gao cd6b2ced75
gh-80675: Set `f_trace_lines = True` on all frames upon `pdb.set_trace()` (#110881) 2023-11-04 19:59:36 +00:00
CF Bolz-Tereick 9573d14215
gh-96954: use a directed acyclic word graph for storing the unicodedata codepoint names (#97906)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2023-11-04 15:56:58 +01:00
Antoine Pitrou 0e9c364f4a
GH-110829: Ensure Thread.join() joins the OS thread (#110848)
Joining a thread now ensures the underlying OS thread has exited. This is required for safer fork() in multi-threaded processes.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-11-04 13:59:24 +00:00