Skip to content

Update stdlib.sh to avoid deprecation warning #1221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2023
Merged

Update stdlib.sh to avoid deprecation warning #1221

merged 1 commit into from
Dec 26, 2023

Conversation

nmutalik
Copy link
Contributor

Before this, layout python or layout pyenv would always output the following:
DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead

``` DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead
```
@zimbatm zimbatm merged commit af06cb0 into direnv:master Dec 26, 2023
@nmutalik nmutalik deleted the patch-1 branch December 26, 2023 13:17
@dipensompurasr
Copy link

dipensompurasr commented May 12, 2024

This is breaking layout_python2 as python2 do not have importlib.util. Resulting following error.

[1] $ echo "layout python2" > .envrc
direnv: loading ~/temp/py2/.envrc
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named util
direnv: Could not find python's version
direnv: export ~XPC_SERVICE_NAME

@slinkp
Copy link

slinkp commented Aug 1, 2024

layout python2 breakage also reported as this bug:
#1258

@zimbatm
Copy link
Member

zimbatm commented Aug 6, 2024

Please send a PR. I'm not using python enough to know what is the right thing to do here.

@dipensompurasr
Copy link

Please send a PR. I'm not using python enough to know what is the right thing to do here.

#1309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants