skhavin commited on
Commit
e249c3f
·
1 Parent(s): b786614

fix: add python 3.13 pipes compatibility shim to press.py

Browse files
Files changed (1) hide show
  1. proactive_cache/press.py +7 -0
proactive_cache/press.py CHANGED
@@ -22,6 +22,13 @@ from typing import Optional
22
  from .eviction import score_tokens
23
 
24
 
 
 
 
 
 
 
 
25
  # ── KVPress BasePress compatibility shim ─────────────────────────────────────
26
  try:
27
  from kvpress import BasePress
 
22
  from .eviction import score_tokens
23
 
24
 
25
+ # Shim for Python 3.13+ which removed the 'pipes' module (needed by fire/kvpress)
26
+ try:
27
+ import pipes
28
+ except ImportError:
29
+ import sys, shlex
30
+ sys.modules['pipes'] = shlex
31
+
32
  # ── KVPress BasePress compatibility shim ─────────────────────────────────────
33
  try:
34
  from kvpress import BasePress