Skip to content

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

Merged
Mic92 merged 2 commits intodirenv:masterfrom
jamesboehmer:jamesboehmer/1176-update
Apr 2, 2025
Merged

A more universal fix for the python 3.14 find_spec deprecation warning#1382
Mic92 merged 2 commits intodirenv:masterfrom
jamesboehmer:jamesboehmer/1176-update

Conversation

@jamesboehmer
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Mic92 commented Apr 2, 2025

@Mergifyio rebase

@mergify
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Mic92 commented Apr 2, 2025

@Mergifyio queue

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 2, 2025

queue

🟠 Waiting for conditions to match

Details
  • -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