[Bug]: Importlib is throwing warnings about naclimporter during test runs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
What happened?
What is happening:
When I run salt in my test environment I get the following:
<frozen importlib._bootstrap>:1049: ImportWarning: NaclImporter.find_spec() not found; falling back to find_module()
After investigating we have found that it comes from naclimporter
Find_module is deprecated
Action:
Please update naclimporter to use find_spec() instead of find_module()
Type of salt install
pip (pypi)
Major version
3008.x
What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)
debian-12
salt --versions-report output
Salt Version:
Salt: 3008.2
Python Version:
Python: 3.11.2 (main, May 12 2026, 05:17:27) [GCC 12.2.0]
Dependency Versions:
cffi: 2.0.0
cherrypy: 18.10.0
cryptography: 48.0.0
dateutil: 2.9.0.post0
docker-py: 7.1.0
gitdb: 4.0.12
gitpython: 3.1.50
Jinja2: 3.1.6
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.2.1
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.0
pycparser: 3.00
pycrypto: Not Installed
pycryptodome: 3.23.0
pygit2: Not Installed
python-gnupg: 0.5.6
PyYAML: 6.0.3
PyZMQ: 27.1.0
relenv: Not Installed
smmap: 5.0.3
timelib: 0.3.0
Tornado: 6.5.6
ZMQ: 4.3.5
Salt Extensions:
pytest-salt-factories: 1.0.4
Salt Package Information:
Package Type: Not Installed
System Versions:
dist: debian 12.15 bookworm
locale: utf-8
machine: x86_64
release: 5.15.0-134-generic
system: Linux
version: Debian GNU/Linux 12.15 bookworm
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the naclimporter implementation and reviewing how it handles Python's import hooks during test runs. Update the deprecated import behavior as described, then run Salt's relevant test suite and confirm the ImportWarning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100