summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2021-07-31 01:17:09 (GMT)
committerGitHub <noreply@github.com>2021-07-31 01:17:09 (GMT)
commitb6bde9fc42aecad5be0457198d17cfe7b481ad79 (patch)
treeec5e777de20072b7bf98d8101adf07e942cde4e8 /Misc/NEWS.d
parente63e6311aa258a5f3f49a7aed9fdde445fd384d6 (diff)
downloadcpython-b6bde9fc42aecad5be0457198d17cfe7b481ad79.zip
cpython-b6bde9fc42aecad5be0457198d17cfe7b481ad79.tar.gz
cpython-b6bde9fc42aecad5be0457198d17cfe7b481ad79.tar.bz2
bpo-44667: Treat correctly lines ending with comments and no newlines in the Python tokenizer (GH-27499)
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/Library/2021-07-30-23-27-30.bpo-44667.tu0Xrv.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-07-30-23-27-30.bpo-44667.tu0Xrv.rst b/Misc/NEWS.d/next/Library/2021-07-30-23-27-30.bpo-44667.tu0Xrv.rst
new file mode 100644
index 0000000..5b7e20e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-07-30-23-27-30.bpo-44667.tu0Xrv.rst
@@ -0,0 +1,4 @@
+The :func:`tokenize.tokenize` doesn't incorrectly generate a ``NEWLINE``
+token if the source doesn't end with a new line character but the last line
+is a comment, as the function is already generating a ``NL`` token. Patch by
+Pablo Galindo