]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-97639: Remove `tokenize.NL` check from `tabnanny` (GH-97640)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 4 Oct 2022 02:07:10 +0000 (19:07 -0700)
committerGitHub <noreply@github.com>
Tue, 4 Oct 2022 02:07:10 +0000 (19:07 -0700)
* 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@sobolevn.me>
Lib/tabnanny.py
Misc/NEWS.d/next/Library/2022-09-29-08-15-55.gh-issue-97639.JSjWYW.rst [new file with mode: 0644]

index 7973f26f98b8b245de3569580ca57e11736be7e9..a47f5a96b8972215bd2dfc7b4e07a11ea6a6921a 100755 (executable)
@@ -23,8 +23,6 @@ __version__ = "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 (file)
index 0000000..65c3105
--- /dev/null
@@ -0,0 +1 @@
+Remove ``tokenize.NL`` check from :mod:`tabnanny`.