From 943a6ced8bbb5066850984c65a33da81bc1ab1e6 Mon Sep 17 00:00:00 2001 From: Akshay <153769403+Akshay9715@users.noreply.github.com> Date: Thu, 2 Oct 2025 21:46:42 +0530 Subject: [PATCH] Fix flagging undeprecated importlib.resources functions (#10595) (cherry picked from commit f941edd5e48495ae299e4240aedcda8c02a70574) --- doc/whatsnew/fragments/10593.false_positive | 3 +++ pylint/checkers/stdlib.py | 8 +------- 2 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 doc/whatsnew/fragments/10593.false_positive diff --git a/doc/whatsnew/fragments/10593.false_positive b/doc/whatsnew/fragments/10593.false_positive new file mode 100644 index 0000000000..44ff2d9f0a --- /dev/null +++ b/doc/whatsnew/fragments/10593.false_positive @@ -0,0 +1,3 @@ +No longer flag undeprecated functions in ``importlib.resources`` as deprecated. + +Closes #10593 diff --git a/pylint/checkers/stdlib.py b/pylint/checkers/stdlib.py index 9225cd4d26..01f9a7851a 100644 --- a/pylint/checkers/stdlib.py +++ b/pylint/checkers/stdlib.py @@ -238,13 +238,6 @@ "binascii.a2b_hqx", "binascii.rlecode_hqx", "binascii.rledecode_hqx", - "importlib.resources.contents", - "importlib.resources.is_resource", - "importlib.resources.open_binary", - "importlib.resources.open_text", - "importlib.resources.path", - "importlib.resources.read_binary", - "importlib.resources.read_text", }, (3, 10, 0): { "_sqlite3.enable_shared_cache", @@ -264,6 +257,7 @@ "cgi.log", }, (3, 11, 0): { + "importlib.resources.contents", "locale.getdefaultlocale", "locale.resetlocale", "re.template",