You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently going through a list of projects still using the imp module, which is removed with Python 3.12, as we are about to upgrade to Python 3.12 on Arch Linux.
Upstream Python suggests to replace the problematic function in question with
importimportlib.utilimportimportlib.machinerydefload_source(modname, filename):
loader=importlib.machinery.SourceFileLoader(modname, filename)
spec=importlib.util.spec_from_file_location(modname, filename, loader=loader)
module=importlib.util.module_from_spec(spec)
# The module is always executed and not cached in sys.modules.# Uncomment the following line to cache the module.# sys.modules[module.__name__] = moduleloader.exec_module(module)
returnmodule
Which category does this issue belong to?
External Dependency
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Description of the bug:
Hi! 馃憢
We're currently going through a list of projects still using the imp module, which is removed with Python 3.12, as we are about to upgrade to Python 3.12 on Arch Linux.
cc @svenstaro @kgizdov (package maintainers for bazel on Arch Linux)
Upstream Python suggests to replace the problematic function in question with
Which category does this issue belong to?
External Dependency
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run this code with Python >= 3.12:
bazel/tools/build_defs/pkg/path_test.py
Lines 16 to 21 in 2195baa
Which operating system are you running Bazel on?
Arch Linux
What is the output of
bazel info release
?7.0.2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.We build bazel from source: https://gitlab.archlinux.org/archlinux/packaging/packages/bazel/-/blob/34d58f27f8164b5dab8c57669f007022c8b6479a/PKGBUILD
What's the output of
git remote get-url origin; git rev-parse HEAD
?Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
n/a
Have you found anything relevant by searching the web?
https://docs.python.org/dev/whatsnew/3.12.html#imp
Any other information, logs, or outputs that you want to share?
n/a
The text was updated successfully, but these errors were encountered: