[Python-checkins] gh-97639: Remove `tokenize.NL` check from `tabnanny` (GH-97640)

miss-islington webhook-mailer at python.org
Mon Oct 3 22:07:17 EDT 2022


https://github.com/python/cpython/commit/40e56f3191a2fd242b2c03d483fe23c960fb8c22
commit: 40e56f3191a2fd242b2c03d483fe23c960fb8c22
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-03T19:07:10-07:00
summary:

gh-97639: Remove `tokenize.NL` check from `tabnanny` (GH-97640)


* gh-97639: Remove `tokenize.NL` check from `tabnanny`

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 06016845dcca1d444a6db6d70ce9fe6274d551d3)

Co-authored-by: Nikita Sobolev <mail at sobolevn.me>

files:
A Misc/NEWS.d/next/Library/2022-09-29-08-15-55.gh-issue-97639.JSjWYW.rst
M Lib/tabnanny.py

diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py
index 7973f26f98b8..a47f5a96b897 100755
--- a/Lib/tabnanny.py
+++ b/Lib/tabnanny.py
@@ -23,8 +23,6 @@
 import os
 import sys
 import tokenize
-if not hasattr(tokenize, 'NL'):
-    raise ValueError("tokenize.NL doesn't exist -- tokenize module too old")
 
 __all__ = ["check", "NannyNag", "process_tokens"]
 
diff --git a/Misc/NEWS.d/next/Library/2022-09-29-08-15-55.gh-issue-97639.JSjWYW.rst b/Misc/NEWS.d/next/Library/2022-09-29-08-15-55.gh-issue-97639.JSjWYW.rst
new file mode 100644
index 000000000000..65c3105f3bc3
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-09-29-08-15-55.gh-issue-97639.JSjWYW.rst
@@ -0,0 +1 @@
+Remove ``tokenize.NL`` check from :mod:`tabnanny`.



More information about the Python-checkins mailing list