GeezerVison is showing github.com — Merge branch '3.14' into backport-59547a2-3.14 · python/cpython@150ae29
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: Android/testbed/app/build.gradle.kts +5-4Lines changed: 5 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -47,7 +47,7 @@ for ((i, prefix) in prefixes.withIndex()) { | 47 | 47 | val libDir = file("$prefix/lib") | 48 | 48 | val version = run { | 49 | 49 | for (filename in libDir.list()!!) { | 50 | | - """python(\d+\.\d+)""".toRegex().matchEntire(filename)?.let { | | 50 | + """python(\d+\.\d+[a-z]*)""".toRegex().matchEntire(filename)?.let { | 51 | 51 | return@run it.groupValues[1] | 52 | 52 | } | 53 | 53 | } | @@ -64,9 +64,10 @@ for ((i, prefix) in prefixes.withIndex()) { | 64 | 64 | val libPythonDir = file("$libDir/python$pythonVersion") | 65 | 65 | val triplet = run { | 66 | 66 | for (filename in libPythonDir.list()!!) { | 67 | | - """_sysconfigdata__android_(.+).py""".toRegex().matchEntire(filename)?.let { | 68 | | - return@run it.groupValues[1] | 69 | | - } | | 67 | + """_sysconfigdata_[a-z]*_android_(.+).py""".toRegex() | | 68 | + .matchEntire(filename)?.let { | | 69 | + return@run it.groupValues[1] | | 70 | + } | 70 | 71 | } | 71 | 72 | throw GradleException("Failed to find Python triplet in $libPythonDir") | 72 | 73 | } | |
Collapse file Copy file name to clipboardExpand all lines: Doc/library/importlib.rst +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1253,7 +1253,7 @@ find and load modules. | 1253 | 1253 | To accommodate this requirement, when running on iOS, extension module | 1254 | 1254 | binaries are *not* packaged as ``.so`` files on ``sys.path``, but as | 1255 | 1255 | individual standalone frameworks. To discover those frameworks, this loader | 1256 | | - is be registered against the ``.fwork`` file extension, with a ``.fwork`` | | 1256 | + is registered against the ``.fwork`` file extension, with a ``.fwork`` | 1257 | 1257 | file acting as a placeholder in the original location of the binary on | 1258 | 1258 | ``sys.path``. The ``.fwork`` file contains the path of the actual binary in | 1259 | 1259 | the ``Frameworks`` folder, relative to the app bundle. To allow for | |
Collapse file Copy file name to clipboardExpand all lines: Doc/library/stdtypes.rst +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5944,7 +5944,7 @@ It is written as ``None``. | 5944 | 5944 | The Ellipsis Object | 5945 | 5945 | ------------------- | 5946 | 5946 |
| 5947 | | -This object is commonly used used to indicate that something is omitted. | | 5947 | +This object is commonly used to indicate that something is omitted. | 5948 | 5948 | It supports no special operations. There is exactly one ellipsis object, named | 5949 | 5949 | :const:`Ellipsis` (a built-in name). ``type(Ellipsis)()`` produces the | 5950 | 5950 | :const:`Ellipsis` singleton. | |
Collapse file Copy file name to clipboardExpand all lines: Doc/library/tkinter.rst +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -392,7 +392,7 @@ by spaces. Without getting into too many details, notice the following: | 392 | 392 | * Operations which are implemented as separate *commands* in Tcl (like | 393 | 393 | ``grid`` or ``destroy``) are represented as *methods* on Tkinter widget | 394 | 394 | objects. As you'll see shortly, at other times Tcl uses what appear to be | 395 | | - method calls on widget objects, which more closely mirror what would is | | 395 | + method calls on widget objects, which more closely mirror what is | 396 | 396 | used in Tkinter. | 397 | 397 |
| 398 | 398 |
| |
Collapse file Copy file name to clipboardExpand all lines: Doc/library/warnings.rst +11-4Lines changed: 11 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -476,14 +476,21 @@ Available Functions | 476 | 476 | .. function:: warn_explicit(message, category, filename, lineno, module=None, registry=None, module_globals=None, source=None) | 477 | 477 |
| 478 | 478 | This is a low-level interface to the functionality of :func:`warn`, passing in | 479 | | - explicitly the message, category, filename and line number, and optionally the | 480 | | - module name and the registry (which should be the ``__warningregistry__`` | 481 | | - dictionary of the module). The module name defaults to the filename with | 482 | | - ``.py`` stripped; if no registry is passed, the warning is never suppressed. | | 479 | + explicitly the message, category, filename and line number, and optionally | | 480 | + other arguments. | 483 | 481 | *message* must be a string and *category* a subclass of :exc:`Warning` or | 484 | 482 | *message* may be a :exc:`Warning` instance, in which case *category* will be | 485 | 483 | ignored. | 486 | 484 |
| | 485 | + *module*, if supplied, should be the module name. | | 486 | + If no module is passed, the filename with ``.py`` stripped is used. | | 487 | + | | 488 | + *registry*, if supplied, should be the ``__warningregistry__`` dictionary | | 489 | + of the module. | | 490 | + If no registry is passed, each warning is treated as the first occurrence, | | 491 | + that is, filter actions ``"default"``, ``"module"`` and ``"once"`` are | | 492 | + handled as ``"always"``. | | 493 | + | 487 | 494 | *module_globals*, if supplied, should be the global namespace in use by the code | 488 | 495 | for which the warning is issued. (This argument is used to support displaying | 489 | 496 | source for modules found in zipfiles or other non-filesystem import | |
Collapse file Copy file name to clipboardExpand all lines: Doc/reference/lexical_analysis.rst +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1308,8 +1308,8 @@ The parts are separated by a decimal point, ``.``:: | 1308 | 1308 | 2.71828 | 1309 | 1309 | 4.0 | 1310 | 1310 |
| 1311 | | -Unlike in integer literals, leading zeros are allowed in the numeric parts. | 1312 | | -For example, ``077.010`` is legal, and denotes the same number as ``77.10``. | | 1311 | +Unlike in integer literals, leading zeros are allowed. | | 1312 | +For example, ``077.010`` is legal, and denotes the same number as ``77.01``. | 1313 | 1313 |
| 1314 | 1314 | As in integer literals, single underscores may occur between digits to help | 1315 | 1315 | readability:: | |
Collapse file Copy file name to clipboardExpand all lines: Doc/whatsnew/3.14.rst +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1140,7 +1140,7 @@ concurrent.futures | 1140 | 1140 | .. _whatsnew314-concurrent-futures-start-method: | 1141 | 1141 |
| 1142 | 1142 | * On Unix platforms other than macOS, :ref:`'forkserver' | 1143 | | - <multiprocessing-start-method-forkserver>` is now the the default :ref:`start | | 1143 | + <multiprocessing-start-method-forkserver>` is now the default :ref:`start | 1144 | 1144 | method <multiprocessing-start-methods>` for | 1145 | 1145 | :class:`~concurrent.futures.ProcessPoolExecutor` | 1146 | 1146 | (replacing :ref:`'fork' <multiprocessing-start-method-fork>`). | @@ -1591,7 +1591,7 @@ multiprocessing | 1591 | 1591 | .. _whatsnew314-multiprocessing-start-method: | 1592 | 1592 |
| 1593 | 1593 | * On Unix platforms other than macOS, :ref:`'forkserver' | 1594 | | - <multiprocessing-start-method-forkserver>` is now the the default :ref:`start | | 1594 | + <multiprocessing-start-method-forkserver>` is now the default :ref:`start | 1595 | 1595 | method <multiprocessing-start-methods>` | 1596 | 1596 | (replacing :ref:`'fork' <multiprocessing-start-method-fork>`). | 1597 | 1597 | This change does not affect Windows or macOS, where :ref:`'spawn' | |
Collapse file Copy file name to clipboardExpand all lines: Include/cpython/warnings.h -6Lines changed: 0 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,9 +18,3 @@ PyAPI_FUNC(int) PyErr_WarnExplicitFormat( | 18 | 18 |
| 19 | 19 | // DEPRECATED: Use PyErr_WarnEx() instead. | 20 | 20 | #define PyErr_Warn(category, msg) PyErr_WarnEx((category), (msg), 1) | 21 | | - | 22 | | -int _PyErr_WarnExplicitObjectWithContext( | 23 | | - PyObject *category, | 24 | | - PyObject *message, | 25 | | - PyObject *filename, | 26 | | - int lineno); |
Collapse file Copy file name to clipboardExpand all lines: Include/refcount.h +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -117,6 +117,8 @@ PyAPI_FUNC(Py_ssize_t) Py_REFCNT(PyObject *ob); | 117 | 117 | } | 118 | 118 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 | 119 | 119 | # define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST(ob)) | | 120 | + #else | | 121 | + # define Py_REFCNT(ob) _Py_REFCNT(ob) | 120 | 122 | #endif | 121 | 123 | #endif | 122 | 124 |
| |
Collapse file Copy file name to clipboardExpand all lines: Lib/ctypes/__init__.py +6-5Lines changed: 6 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | """create and manipulate C data types in Python""" | 2 | 2 |
| 3 | | -import os as _os, sys as _sys | | 3 | +import os as _os | | 4 | +import sys as _sys | | 5 | +import sysconfig as _sysconfig | 4 | 6 | import types as _types | 5 | 7 |
| 6 | 8 | __version__ = "1.1.0" | @@ -556,10 +558,9 @@ def LoadLibrary(self, name): | 556 | 558 |
| 557 | 559 | if _os.name == "nt": | 558 | 560 | pythonapi = PyDLL("python dll", None, _sys.dllhandle) | 559 | | -elif _sys.platform == "android": | 560 | | - pythonapi = PyDLL("libpython%d.%d.so" % _sys.version_info[:2]) | 561 | | -elif _sys.platform == "cygwin": | 562 | | - pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2]) | | 561 | +elif _sys.platform in ["android", "cygwin"]: | | 562 | + # These are Unix-like platforms which use a dynamically-linked libpython. | | 563 | + pythonapi = PyDLL(_sysconfig.get_config_var("LDLIBRARY")) | 563 | 564 | else: | 564 | 565 | pythonapi = PyDLL(None) | 565 | 566 |
| |
|