#1076361 direnv: Deprecation warning with Python 3.12

Package:
direnv
Source:
direnv
Description:
Utility to set directory specific environment variables
Submitter:
Manish Singh
Date:
2025-03-15 20:33:01 UTC
Severity:
normal
#1076361#5
Date:
2024-07-15 02:16:18 UTC
From:
To:
Now that sid has python 3.12, direnv displays the following output with
"layout python" in the .envrc:

$ cd ~/test-python-envrc
direnv: loading ~/test-python-envrc/.envrc
<string>:1: DeprecationWarning: 'pkgutil.find_loader' is deprecated and
slated for removal in Python 3.14; use importlib.util.find_spec() instead
direnv: export +VIRTUAL_ENV ~PATH

This has already been reported and fixed upstream:
https://github.com/direnv/direnv/issues/1177

The latest upstream release (2.34.0) has this change, so this can be
addressed by packaging the new release, or alternatively backporting the
commit attached to the upstream GitHub issue.

Thanks,
-Manish

#1076361#10
Date:
2025-03-15 20:22:47 UTC
From:
To:
Hi,

i tried my luck and this was the result.
https://salsa.debian.org/cb/direnv

~/tst % direnv version
2.35.0
~/tst % apt list '~i~ndirenv'
direnv/now 2.35.0-1 amd64 [installed,local]
Notice: There are 2 additional versions. Please use the '-a' switch to see them.
~/tst % python -V
Python 3.13.2
~/tst % rm -rf direnv/.venv
~/tst % cat direnv/.envrc
export VIRTUAL_ENV=."venv"
layout python
~/tst % cd direnv
direnv: loading ~/tst/direnv/.envrc
direnv: export +VIRTUAL_ENV ~PATH
~/tst/direnv % whence -p python3
/home/cb/tst/direnv/.venv/bin/python3

looks good to me ö/