This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead
Type: Stage: resolved
Components: Tests, Windows Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, paul.moore, shreyanavigyan, steve.dower, tim.golden, vstinner, xtreak, zach.ware
Priority: normal Keywords: patch

Created on 2021-04-16 13:12 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25563 merged brett.cannon, 2021-04-23 21:06
PR 25656 merged shreyanavigyan, 2021-04-27 09:10
Messages (6)
msg391192 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-16 13:12
On Windows, test_importlib logs "DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated (...)". Example:

vstinner@DESKTOP-DK7VBIL C:\vstinner\python\master>python -m test -v test_importlib 
test_find_module_missing (test.test_importlib.test_windows.Frozen_WindowsRegistryFinderTests) ... <frozen importlib._bootstrap_external>:848: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for 
removal in Python 3.12; use find_spec() instead


test_find_module_missing (test.test_importlib.test_windows.Source_WindowsRegistryFinderTests) ... C:\vstinner\python\master\lib\importlib\ DeprecationWarning: WindowsRegistryFinder.find_module() is de
precated and slated for removal in Python 3.12; use find_spec() instead
  _warnings.warn("WindowsRegistryFinder.find_module() is deprecated and "

msg391252 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2021-04-16 20:07
Darn, forgot about Windows when I hunted down all the warnings on macOS.
msg392050 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-04-27 09:04
Can you reopen this issue? Brett forgot to silence another warning in WindowsRegistryFinderTests class. I'm opening a PR for that.
msg392073 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-27 14:11
commit 22556d84bca68a16e030e2337dcad80069d06f6b
Author: Brett Cannon <>
Date:   Fri Apr 23 14:40:18 2021 -0700

    Silence find_module() DeprecationWarning on Windows tests (GH-25563)
msg392074 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-27 14:12
I reopen the issue for PR 25656.
msg392096 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-04-27 15:56
New changeset e3bf179642a3445fb079454f382b93d0177f5012 by Shreyan Avigyan in branch 'master':
bpo-43864: Silence deprecation warning in test_importlib.test_module_found and test_importlib.test_module_not_found (GH-25656)
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88030
2021-04-27 15:56:23steve.dowersetstatus: open -> closed
resolution: fixed
2021-04-27 15:56:17steve.dowersetmessages: + msg392096
2021-04-27 14:12:08vstinnersetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg392074
2021-04-27 14:11:19vstinnersetmessages: + msg392073
2021-04-27 09:10:14shreyanavigyansetpull_requests: + pull_request24347
2021-04-27 09:04:17shreyanavigyansetmessages: + msg392050
2021-04-24 23:41:30brett.cannonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-04-23 21:06:39brett.cannonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request24283
2021-04-16 20:07:20brett.cannonsetassignee: brett.cannon
messages: + msg391252
2021-04-16 19:37:05shreyanavigyansetnosy: + shreyanavigyan
2021-04-16 13:12:55vstinnercreate