Commit Graph

117234 Commits

Author SHA1 Message Date
Alex Waygood c05c31db8c
gh-105144: Runtime-checkable protocols: move all 'sanity checks' to `_ProtocolMeta.__subclasscheck__` (#105152) 2023-05-31 17:02:25 +00:00
Guido van Rossum df396b59af
gh-104909: Split BINARY_OP into micro-ops (#104910)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2023-05-31 08:09:23 -07:00
Irit Katriel fbc9d0dbb2
gh-105111: remove deprecated macros Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END (#105112) 2023-05-31 15:44:11 +01:00
Victor Stinner 0430e97097
gh-104773: cgi: Fix typo in What's New in Python 3.13 (#105139) 2023-05-31 14:54:07 +02:00
Victor Stinner 03ad6624c2
gh-105096: Deprecate wave getmarkers() method (#105098)
wave: Deprecate the getmark(), setmark() and getmarkers() methods of
the Wave_read and Wave_write classes. They will be removed in Python
3.15.
2023-05-31 12:09:41 +00:00
Victor Stinner 58a2e09816
gh-62948: IOBase finalizer logs close() errors (#105104) 2023-05-31 11:41:19 +00:00
Victor Stinner 85e5d03163
gh-105096: Reformat wave documentation (#105136)
Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore
2023-05-31 11:29:10 +00:00
Victor Stinner 579c41c102
gh-105107: Remove PyEval_CallFunction() function (#105108)
Remove 4 functions from the C API, deprecated in Python 3.9:

* PyEval_CallObjectWithKeywords()
* PyEval_CallObject()
* PyEval_CallFunction()
* PyEval_CallMethod()

Keep 3 functions in the stable ABI:

* PyEval_CallObjectWithKeywords()
* PyEval_CallFunction()
* PyEval_CallMethod()
2023-05-31 11:17:06 +00:00
Inada Naoki adccff3b3f
gh-104922: Make `PY_SSIZE_T_CLEAN` not mandatory again (#105051) 2023-05-31 18:38:55 +09:00
Ned Deily f90d3f68db
gh-103142: Update macOS installer to use OpenSSL 1.1.1u. (GH-105130) 2023-05-31 05:44:10 +00:00
Carl Meyer 5701799067
gh-97933: add LOAD_FAST_AND_CLEAR to 3.12 What's New bytecode section (#105126) 2023-05-30 20:19:25 -06:00
Carl Meyer 7fbac51baf
gh-87729: add LOAD_SUPER_ATTR to 3.12 What's New (#105125) 2023-05-30 20:19:04 -06:00
Eric Snow 7be667dfaf
gh-105020: Share tp_bases and tp_mro Between Interpreters For All Static Builtin Types (gh-105115)
In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry.  However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses).  We address that here by reverting back to shared objects, making them immortal in the process.
2023-05-31 00:13:35 +00:00
Eric Snow 26e7bbf66e
gh-102304: Fix 2 New Stable ABI Functions (gh-104762) 2023-05-30 22:40:07 +00:00
Lysandros Nikolaou 70f315c2d6
gh-105042: Disable unmatched parens syntax error in python tokenize (#105061) 2023-05-30 22:52:52 +01:00
Pablo Galindo Salgado 9216e69a87
gh-105069: Add a readline-like callable to the tokenizer to consume input iteratively (#105070) 2023-05-30 22:43:34 +01:00
Erlend E. Aasland 2ea34cfb3a
gh-89886: Properly quote Autoconf macro arguments (#105062)
Autoconf 2.70 macros are picky about argument quotation.
2023-05-30 21:13:08 +00:00
Carl Meyer 68c75c3153
gh-105035: fix super() calls on unusual types (e.g. meta-types) (#105094) 2023-05-30 14:36:24 -06:00
Barney Gale 49f90ba1ea
GH-73435: Implement recursive wildcards in `pathlib.PurePath.match()` (#101398)
`PurePath.match()` now handles the `**` wildcard as in `Path.glob()`, i.e. it matches any number of path segments.

We now compile a `re.Pattern` object for the entire pattern. This is made more difficult by `fnmatch` not treating directory separators as special when evaluating wildcards (`*`, `?`, etc), and so we arrange the path parts onto separate *lines* in a string, and ensure we don't set `re.DOTALL`.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-30 20:18:09 +00:00
Hugo van Kemenade 4c770617c0
CI: Temporarily skip paths with spaces to avoid error (#105110)
* CI: Temporarily skip paths with spaces to avoid "Error: One of your files includes a space"

* Dummy NEWS file to test the action. Will be deleted before merge.

* Revert "Dummy NEWS file to test the action. Will be deleted before merge."

This reverts commit 05cd028fd4.
2023-05-30 23:01:58 +03:00
Irit Katriel 4571eedca2
gh-105071: add missing versionadded directive (#105097) 2023-05-30 18:03:20 +01:00
Victor Stinner 4b65d5638c
gh-80064: Fix is_valid_wide_char() return type (#105099)
Return a classical int, rather than size_t. The size_t type was
kept from copied/pasted code related to mbstowcs().
2023-05-30 18:36:20 +02:00
Raymond Hettinger 18cfc1eea5
Small speedup for dataclass __eq__ and __repr__ (#104904)
Faster __repr__ with str.__add__ moved inside the f-string. For __eq__ comp;are field by field instead of building temporary tuples.

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-05-30 12:35:30 -04:00
Alex Waygood c8c1e73d95
gh-103921: Minor PEP-695 fixes to the `ast` module docs (#105093) 2023-05-30 09:19:10 -07:00
Petr Viktorin 0656d23d82
gh-105091: stable_abi.py: Remove "Unixy" check from --all on other platforms (GH-105092) 2023-05-30 17:45:56 +02:00
Irit Katriel b7aadb4583
gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (#105072) 2023-05-30 15:03:36 +01:00
Miro Hrončok bd98b65e97
gh-105084: Tests: Use setuptools+wheel from sysconfig.get_config_var('WHEEL_PKG_DIR') if set (#105056) 2023-05-30 11:20:30 +01:00
Steve Dower cda1bd3c9d
gh-88745: Add _winapi.CopyFile2 and update shutil.copy2 to use it (GH-105055) 2023-05-30 11:00:29 +01:00
sunmy2019 d14eb3433c
gh-102251: Fix reference leak in _testsinglephase initialization (#105082)
Correctly decref 'initialized' in init_module()

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-30 09:27:55 +00:00
Nikita Sobolev 219f01b185
gh-83403: Test `parent` param in `Mock.__init__` (#103630) 2023-05-30 08:36:22 +01:00
Zachary Ware 5454db4ace
gh-105077: Fix test_tkinter refleak checking (GH-105078)
Use specific symbols from `test.support` to avoid having `support`
overwritten by `test_tkinter`'s own `support` submodule.
2023-05-30 03:53:55 +00:00
Barney Gale d593074494
GH-104898: Revert pathlib os.PathLike registration change. (GH-105073)
Subclassing `os.PathLike` rather than using `register()` makes
initialisation slower, due to the additional `__isinstance__` work.

This partially reverts commit bd1b6228d1.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-29 21:44:51 +00:00
Jakub Kuczys 39f6a0489f
GH-89455: Add missing attributes (added in 3.11) to traceback module docs (#105044) 2023-05-29 18:28:37 +00:00
Steve Dower 6da701511e
gh-103646: Remove --include-pip-user from default APPX package build (GH-105064) 2023-05-29 17:58:23 +01:00
Barney Gale ace676e2c2
GH-77609: Add follow_symlinks argument to `pathlib.Path.glob()` (GH-102616)
Add a keyword-only *follow_symlinks* parameter to `pathlib.Path.glob()` and`rglob()`.

When *follow_symlinks* is `None` (the default), these methods follow symlinks except when evaluating "`**`" wildcards. When set to true or false, symlinks are always or never followed, respectively.
2023-05-29 16:59:52 +01:00
Petr Viktorin 1668b41dc4
gh-97908: CAPI docs: Remove repeated struct names from member docs (GH-100054)
And add raw HTML fragments to keep old links working.
2023-05-29 13:54:14 +02:00
Steve Dower bfd20d257e
gh-104803: Implement ntpath.isdevdrive for checking whether a path is on a Windows Dev Drive (GH-104805) 2023-05-29 10:05:32 +01:00
Inada Naoki e92ac0a741
Fix compiler warning in unicodeobject.c (#105050) 2023-05-29 17:31:03 +09:00
Jelle Zijlstra 595ffddb33
Document PEP 698 and other new typing features in What's New (#104957) 2023-05-28 12:13:19 -07:00
Sviatoslav Sydorenko 88d14da76f
Convert `doc.yml` workflow to be reusable (#103914)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-28 16:21:29 +01:00
Marta Gómez Macías 96fff35325
gh-105017: Include CRLF lines in strings and column numbers (#105030)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2023-05-28 15:15:53 +01:00
Hugo van Kemenade 3821b92c1f
gh-104992: [What's New in 3.12] Document unittest.TestProgram.usageExit's deprecation (#104995) 2023-05-28 02:06:31 -06:00
Pablo Galindo Salgado 3a5be878be
gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (#105021) 2023-05-28 00:20:42 +01:00
Hugo van Kemenade b225c08de8
gh-104992: Remove deprecated unittest.TestProgram.usageExit (#104993) 2023-05-27 21:34:14 +00:00
Terry Jan Reedy 897e716d03
gh-104497: Make tkinter test pass with tk 8.7 (#104789)
* gh-104497: Make tkinter test pass with tk 8.7

For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.

* Update Lib/test/test_tkinter/test_widgets.py

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

---------

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-05-27 19:23:56 +00:00
Zachary Ware a989b73e8e
gh-75552: Remove deprecated tkinter.tix module (GH-104902) 2023-05-27 12:34:19 -05:00
Marta Gómez Macías 86d8f48935
gh-105017: Fix including additional NL token when using CRLF (#105022)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-27 16:50:43 +00:00
Petr Vaněk 6e62eb2e70
Fix indentation in Parser/tokenizer.c (#105012) 2023-05-27 12:41:50 +01:00
Itamar Ostricher 949f0f5bb0
CI: Precompute hash for config cache key in check_source job (#105008) 2023-05-27 03:43:50 -06:00
Hugo van Kemenade 7df861c23c
gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (#104994)
Document unittest.TestProgram.usageExit's pending removal in 3.13
2023-05-26 19:09:47 -07:00