forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mongodb: fix building with python312
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/buildscripts/moduleconfig.py b/buildscripts/moduleconfig.py | ||
index b4d0bba0490..f59ddd7bc5c 100644 | ||
--- a/buildscripts/moduleconfig.py | ||
+++ b/buildscripts/moduleconfig.py | ||
@@ -27,7 +27,7 @@ MongoDB SConscript files do. | ||
__all__ = ('discover_modules', 'discover_module_directories', 'configure_modules', | ||
'register_module_test') # pylint: disable=undefined-all-variable | ||
|
||
-import imp | ||
+import importlib | ||
import inspect | ||
import os | ||
|
||
@@ -71,7 +71,7 @@ def discover_modules(module_root, allowed_modules): | ||
print("adding module: %s" % (name)) | ||
fp = open(build_py, "r") | ||
try: | ||
- module = imp.load_module("module_" + name, fp, build_py, | ||
+ module = importlib.load_module("module_" + name, fp, build_py, | ||
(".py", "r", imp.PY_SOURCE)) | ||
if getattr(module, "name", None) is None: | ||
module.name = name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters