Filipe Laíns
23645420dc
GH-110749: fix unistd.h import in file_tokenizer.c ( #110750 )
2023-10-12 07:52:13 +02:00
Nikita Sobolev
5257ade0bc
gh-110682: Ignore `__match_args__` from `__instancecheck__` in protocols ( #110683 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-11 19:20:20 -07:00
Victor Stinner
88ecb190f3
gh-85283: _stat extension now uses the limited C API ( #110711 )
...
gh-85283: _stat extension uses the limited C API
The _stat C extension is now built with the limited C API.
2023-10-12 00:06:20 +02:00
Victor Stinner
b4e8049766
gh-110673: test_pty raises on short write ( #110677 )
...
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
2023-10-11 21:30:15 +00:00
J. Nick Koston
3ac8e6955f
gh-110733: Micro-optimization in BaseEventLoop._run_once ( #110735 )
2023-10-11 20:59:27 +00:00
Ezio Melotti
41d8ec5a1b
gh-110631: Fix reST indentation in `Doc/reference` ( #110708 )
...
Fix wrong indentation in the Doc/reference dir.
2023-10-11 22:50:55 +02:00
Victor Stinner
6f4a49942b
gh-85283: If Py_LIMITED_API is defined, undefine Py_BUILD_CORE ( #110725 )
...
If the Py_LIMITED_API macro is defined, Py_BUILD_CORE,
Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros are now
undefined by Python.h.
Only undefine these 3 macros after including "exports.h" which uses
them to define PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros.
Remove hacks (undefine manually the 3 Py_BUILD_CORE macros) in
Modules/_testcapi/parts.h and Modules/_testclinic_limited.c.
2023-10-11 20:47:54 +00:00
Ezio Melotti
718391f475
gh-110631: Fix reST indentation ( #110724 )
...
* Fix wrong indentation in the other dirs.
* Fix more wrong indentation.
2023-10-11 22:43:03 +02:00
Ezio Melotti
bb7923f556
gh-110631: Fix reST indentation in `Doc/library` ( #110685 )
...
Fix wrong indentation in the Doc/library dir.
2023-10-11 22:24:12 +02:00
Tian Gao
c523ce0f43
gh-65052: Prevent pdb from crashing when trying to display objects ( #110578 )
2023-10-11 19:52:14 +02:00
Hugo van Kemenade
de956b263b
gh-109408: Revert pre-commit whitespace checks pending portable solution ( #110726 )
2023-10-11 16:12:28 +00:00
Victor Stinner
467abfe1d4
gh-110313: Revert "gh-90108: Disable LTO on _freeze_module and _teste… ( #110720 )
...
gh-110313: Revert "gh-90108: Disable LTO on _freeze_module and _testembed (#109581 )"
This reverts commit 3e3a7da590
.
2023-10-11 15:54:40 +00:00
Lysandros Nikolaou
01481f2dc1
gh-104169: Refactor tokenizer into lexer and wrappers ( #110684 )
...
* The lexer, which include the actual lexeme producing logic, goes into
the `lexer` directory.
* The wrappers, one wrapper per input mode (file, string, utf-8, and
readline), go into the `tokenizer` directory and include logic for
creating a lexer instance and managing the buffer for different modes.
---------
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-10-11 15:14:44 +00:00
Serhiy Storchaka
eb50cd37ea
gh-110289: C API: Add PyUnicode_EqualToUTF8() and PyUnicode_EqualToUTF8AndSize() functions (GH-110297)
2023-10-11 16:41:58 +03:00
Adam Turner
d1f7fae424
GH-107518: Remove the Argument Clinic How-To ( #109900 )
...
* Remove the content of the Argument Clinic HOWTO
* Update cross-references to the Argument Clinic
* Add a note directing readers to the devguide
2023-10-11 14:57:51 +02:00
Zackery Spytz
f83fa0b9eb
gh-84489: Properly handle trailing spaces in Py_BuildValue() format strings (GH-21158)
...
The docs state that the space, tab, colon, and comma characters are
ignored in Py_BuildValue() format strings.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-11 14:44:06 +03:00
Serhiy Storchaka
f27b830907
gh-76106: Remove the cleanup lock in test_socket (GH-110539)
...
It does not already work (because it locks only addCleanup(), not doCleanups()),
and it is no longer needed since the clean up procedure waits for all test threads to join.
2023-10-11 13:52:06 +03:00
Serhiy Storchaka
5c6e85480a
gh-84489: C API: Add tests for Py_BuildValue() (GH-110596)
2023-10-11 10:08:51 +03:00
Ezio Melotti
3dd593e2f2
gh-110631: fix wrong indentation in the `Doc/whatsnew` dir ( #110632 )
...
Fix wrong indentation in the Doc/whatsnew dir.
2023-10-11 07:34:38 +02:00
Barney Gale
b5f7777cb3
GH-110488: Fix two small issues in `pathlib.PurePath.with_name()` ( #110651 )
...
Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`
Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.
2023-10-11 04:45:11 +01:00
Victor Stinner
790ecf6302
gh-110662: multiprocessing test_async_timeout() increase timeout ( #110663 )
...
Increase timeout from 1 second to 30 seconds, if not longer. The
important part is that apply_async() takes longer than TIMEOUT2.
2023-10-11 02:36:06 +00:00
Victor Stinner
1556f426da
gh-110666: Fix multiprocessing test_terminate() elapsed ( #110667 )
...
multiprocessing test_terminate() and test_wait_socket_slow() no
longer test the CI performance: no longer check maximum elapsed time.
Add CLOCK_RES constant: tolerate a difference of 100 ms.
2023-10-11 01:49:09 +00:00
Victor Stinner
f901f56313
gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN ( #110657 )
...
Skip test_post_fork_child_no_deadlock() if Python is built with ASAN.
Add support.HAVE_ASAN_FORK_BUG.
2023-10-11 02:57:53 +02:00
Victor Stinner
7ca4aafa0e
gh-108277: test_os tolerates 1 ms diff for timerfd ( #110661 )
2023-10-11 00:38:04 +00:00
Victor Stinner
e07c37cd52
gh-110647: Fix signal test_stress_modifying_handlers() ( #110650 )
...
* cycle_handlers() now waits until at least one signal is received.
* num_received_signals can be equal to num_sent_signals.
2023-10-10 23:59:43 +00:00
Barney Gale
da0a68afc9
GH-110109: Simplify pathlib test setup ( #110308 )
...
Use the class under test to create files, directories and symlinks.
2023-10-11 00:03:42 +01:00
Radislav Chugunov
0d805b998d
gh-108826: Document `dis` module CLI and rename `_test` function to `main` ( #108827 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-10-10 16:31:28 -06:00
Nikita Sobolev
732532b0af
gh-108303: Move all inspect test files to `test_inspect/` ( #109607 )
2023-10-10 22:15:11 +02:00
Nikita Sobolev
9cfb4e0d1e
gh-110525: Add tests for internal `set` CAPI (GH-110630)
2023-10-10 19:00:05 +03:00
Hugo van Kemenade
66a9b10820
gh-110631: Set three-space indents for reST in EditorConfig ( #110635 )
...
Set three-space indents in EditorConfig
2023-10-10 14:36:19 +00:00
Donghee Na
5bc1b7f08d
gh-109693: Update pycore_interp.h to use pyatomic.h ( #110604 )
2023-10-10 23:17:08 +09:00
Adam Turner
f5edb56328
GH-109408: Move the C file whitespace check from patchcheck to pre-commit ( #109890 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-10 07:40:08 -06:00
Adam Turner
e24f9ae703
Don't doubly-parallelise sphinx-lint ( #110617 )
2023-10-10 14:51:20 +02:00
Yilei Yang
ce43d5f0e1
gh-110050: Adjust the newline position in the TypeError message of the random.seed call. ( #110051 )
...
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-10-10 14:16:26 +02:00
Nikita Sobolev
756062b296
gh-101100: Fix sphinx warnings in `library/socketserver.rst` (GH-110207)
2023-10-10 13:44:19 +02:00
Serhiy Storchaka
7f702b26db
gh-110388: Add tests for tty (GH-110394)
2023-10-10 13:42:25 +02:00
Serhiy Storchaka
92a9e98024
gh-81002: Add tests for termios (GH-110386)
2023-10-10 13:35:15 +02:00
Nikita Sobolev
344d3a222a
gh-110590: Fix a bug where _sre.compile would overwrite exceptions ( #110591 )
...
TypeError would be overwritten by OverflowError
if 'code' param contained non-ints.
2023-10-10 10:15:12 +00:00
Donghee Na
0362cbf908
gh-109595: Add -Xcpu_count=<n> cmdline for container users ( #109667 )
...
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-10-10 19:00:09 +09:00
Serhiy Storchaka
5aa62a8de1
gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_async ( #110500 )
...
It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
2023-10-10 11:38:40 +02:00
Alex Waygood
fc811c8d20
gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic ( #110603 )
2023-10-10 09:35:36 +00:00
Eric Snow
757cc35b6b
gh-84570: Implement Waiting in SendChannel.send() (gh-110565)
...
We had been faking it (poorly).
We will add timeouts separately.
2023-10-10 09:35:14 +00:00
Nikita Sobolev
46462ff929
gh-107652: Fix CIFuzz typo ( #110602 )
2023-10-10 09:34:48 +00:00
Adam Turner
08ec4a1dbf
GH-109408: Move the Python file whitespace check from patchcheck to pre-commit ( #109891 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-10 09:17:53 +00:00
Brandt Bucher
982f1b7d6d
Remove an old macro from executor.c ( #110597 )
2023-10-10 08:45:23 +00:00
Brandt Bucher
13380da91e
GH-104584: Fix refleak when tracing through calls (GH-110593)
2023-10-10 08:29:48 +00:00
Alex Waygood
d5ec77fafd
Add some 'meta hooks' to our pre-commit config ( #110587 )
2023-10-10 08:21:58 +00:00
Hugo van Kemenade
7426ed0347
gh-109408: Add the docs whitespace check from patchcheck to pre-commit ( #109854 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-10 08:11:51 +00:00
Alex Waygood
7b2764e798
gh-110558: Run ruff on Argument Clinic in CI ( #110559 )
2023-10-10 07:52:39 +00:00
Serhiy Storchaka
96fed66a65
gh-110378: Close invalid generators in contextmanager and asynccontextmanager (GH-110499)
...
contextmanager and asynccontextmanager context managers now close an invalid
underlying generator object that yields more then one value.
2023-10-10 09:43:04 +02:00