From 85de805d23f92d190e778528b05699cecdc13475 Mon Sep 17 00:00:00 2001 From: Yeojin Kim Date: Fri, 17 Feb 2023 16:58:52 +0900 Subject: [PATCH 1/2] Fix typo --- Doc/c-api/function.rst | 2 +- Misc/NEWS.d/3.12.0a2.rst | 2 +- Python/ast_opt.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst index 3cce18bdde3057..bc7569d0add97d 100644 --- a/Doc/c-api/function.rst +++ b/Doc/c-api/function.rst @@ -169,7 +169,7 @@ There are a few functions specific to Python functions. before the modification to *func* takes place, so the prior state of *func* can be inspected. The runtime is permitted to optimize away the creation of function objects when possible. In such cases no event will be emitted. - Although this creates the possitibility of an observable difference of + Although this creates the possibility of an observable difference of runtime behavior depending on optimization decisions, it does not change the semantics of the Python code being executed. diff --git a/Misc/NEWS.d/3.12.0a2.rst b/Misc/NEWS.d/3.12.0a2.rst index 318f3f71f11546..41ad8cd22b5d89 100644 --- a/Misc/NEWS.d/3.12.0a2.rst +++ b/Misc/NEWS.d/3.12.0a2.rst @@ -1060,7 +1060,7 @@ Add ``getbufferproc`` and ``releasebufferproc`` to the stable API. Some configurable capabilities of sub-interpreters have changed. They always allow subprocesses (:mod:`subprocess`) now, whereas before subprocesses -could be optionally disaallowed for a sub-interpreter. Instead +could be optionally disallowed for a sub-interpreter. Instead :func:`os.exec` can now be disallowed. Disallowing daemon threads is now supported. Disallowing all threads is still allowed, but is never done by default. Note that the optional restrictions are only available through diff --git a/Python/ast_opt.c b/Python/ast_opt.c index 1a0b2a05b1c713..fd6be059a62621 100644 --- a/Python/ast_opt.c +++ b/Python/ast_opt.c @@ -113,7 +113,7 @@ fold_unaryop(expr_ty node, PyArena *arena, _PyASTOptimizeState *state) return make_const(node, newval, arena); } -/* Check whether a collection doesn't containing too much items (including +/* Check whether a collection doesn't contain too many items (including subcollections). This protects from creating a constant that needs too much time for calculating a hash. "limit" is the maximal number of items. From 0149d36b5d87f1496c68a97216dfe019ad8f0e07 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 17 Feb 2023 09:39:48 +0100 Subject: [PATCH 2/2] Revert C comment change --- Python/ast_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/ast_opt.c b/Python/ast_opt.c index fd6be059a62621..1a0b2a05b1c713 100644 --- a/Python/ast_opt.c +++ b/Python/ast_opt.c @@ -113,7 +113,7 @@ fold_unaryop(expr_ty node, PyArena *arena, _PyASTOptimizeState *state) return make_const(node, newval, arena); } -/* Check whether a collection doesn't contain too many items (including +/* Check whether a collection doesn't containing too much items (including subcollections). This protects from creating a constant that needs too much time for calculating a hash. "limit" is the maximal number of items.