Skip to content

A more universal fix for the python 3.14 find_spec deprecation warning #1382

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 2 commits into from
Apr 2, 2025

Conversation

jamesboehmer
Copy link
Contributor

The fix merged by #1176 cleans up the deprecation warning, but breaks for all python versions prior to 3.4. This change uses some simple try/except blocks to successively look for venv or virtualenv without version checking or conditional imports:

import platform as p
try:
 import venv
 ve="venv"
except Exception:
 try:
  import virtualenv
  ve="virtualenv"
 except Exception:
  ve=""
print(p.python_version()+" "+ve)

@Mic92 Mic92 force-pushed the jamesboehmer/1176-update branch from 9c33c1b to 6fd4c44 Compare April 2, 2025 13:12
@Mic92
Copy link
Contributor

Mic92 commented Apr 2, 2025

@Mergifyio rebase

Copy link
Contributor

mergify bot commented Apr 2, 2025

rebase

✅ Branch has been successfully rebased

@Mic92 Mic92 force-pushed the jamesboehmer/1176-update branch from 6fd4c44 to b7d594f Compare April 2, 2025 13:57
@Mic92
Copy link
Contributor

Mic92 commented Apr 2, 2025

@Mergifyio queue

Copy link
Contributor

mergify bot commented Apr 2, 2025

queue

🟠 Waiting for conditions to match

  • -closed [📌 queue requirement]
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • label~=merge-queue|dependencies
      • base=master
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

@Mic92 Mic92 merged commit d023c79 into direnv:master Apr 2, 2025
14 checks passed
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.

3 participants