]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-93351: Add news entry and what's new entry for changes in gh-93351 (#95175)
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Sat, 23 Jul 2022 18:35:44 +0000 (19:35 +0100)
committerGitHub <noreply@github.com>
Sat, 23 Jul 2022 18:35:44 +0000 (19:35 +0100)
Doc/whatsnew/3.11.rst
Misc/NEWS.d/next/Core and Builtins/2022-07-23-19-16-25.gh-issue-93351.0Jyvu-.rst [new file with mode: 0644]

index 8b2cb90fb1553c3a64f762a79bbe26ca7a671db0..0bdf3d1e4d965ac2225c0f41b6f0657131a2cf5c 100644 (file)
@@ -1501,6 +1501,10 @@ Changes in the Python API
   is larger than the population size, a :exc:`ValueError` is raised.
   (Contributed by Raymond Hettinger in :issue:`40465`.)
 
+* :class:`ast.AST` node positions are now validated when provided to
+  :func:`compile` and other related functions. If invalid positions are detected,
+  a :exc:`ValueError` will be raised. (Contributed by Pablo Galindo in :gh:`93351`)
+
 
 Build Changes
 =============
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-07-23-19-16-25.gh-issue-93351.0Jyvu-.rst b/Misc/NEWS.d/next/Core and Builtins/2022-07-23-19-16-25.gh-issue-93351.0Jyvu-.rst
new file mode 100644 (file)
index 0000000..97cf805
--- /dev/null
@@ -0,0 +1,3 @@
+:class:`ast.AST` node positions are now validated when provided to
+:func:`compile` and other related functions. If invalid positions are
+detected, a :exc:`ValueError` will be raised.