Studio: self-heal a pre-#6483-fix anyio>=4.14 stuck in existing installs (#6805)
* Studio: self-heal a pre-#6483-fix anyio>=4.14 stuck in existing installs The <4.14 cap in constraints.txt/no-torch-runtime.txt only constrains new anyio resolutions. An install made before that cap existed can already be sitting on anyio 4.14+, and since it already satisfies mcp/fastmcp's anyio>=4.5 floor, every later constrained install skips it as already-satisfied -- so affected installs never recover and keep hitting the cancel-scope RuntimeError on every request (#6797, a recurrence of #6483). Force-reinstall anyio<4.14 whenever a stuck 4.14+ is detected. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Studio: also repair anyio on the update fast path setup.sh's _SKIP_PYTHON_DEPS and setup.ps1's $SkipPythonDeps skip install_python_stack.py entirely once the installed package version already matches PyPI latest, so an install stuck on anyio>=4.14 with an otherwise up-to-date package never reaches the repair added in install_python_stack.py. Probe anyio on that fast path too and fall through to the full dependency pass when it's still >=4.14, mirroring the existing ROCm/CPU-torch override right below it. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
4f24b12cc9
commit
91f4ec7ba7
3 changed files with 79 additions and 1 deletions
|
|
@ -947,6 +947,23 @@ print(version(sys.argv[1]))
|
|||
if [ -n "$INSTALLED_VER" ] && [ -n "$LATEST_VER" ] && [ "$INSTALLED_VER" = "$LATEST_VER" ]; then
|
||||
step "python" "$_PKG_NAME $INSTALLED_VER is up to date"
|
||||
_SKIP_PYTHON_DEPS=true
|
||||
# A pre-#6483-fix install can be stuck on anyio>=4.14 even though
|
||||
# $_PKG_NAME itself is current; the fast path above would otherwise
|
||||
# never reach install_python_stack's anyio repair (#6797).
|
||||
if "$VENV_DIR/bin/python" -c "
|
||||
import re, sys
|
||||
from importlib.metadata import version, PackageNotFoundError
|
||||
try:
|
||||
parts = version('anyio').split('.')
|
||||
major = int(parts[0])
|
||||
minor = int(re.sub(r'[^0-9].*', '', parts[1])) if len(parts) > 1 else 0
|
||||
except (PackageNotFoundError, ValueError, IndexError):
|
||||
sys.exit(1)
|
||||
sys.exit(0 if (major, minor) >= (4, 14) else 1)
|
||||
" 2>/dev/null; then
|
||||
substep "anyio >=4.14 found (#6483) -- forcing dependency pass to repair..."
|
||||
_SKIP_PYTHON_DEPS=false
|
||||
fi
|
||||
elif [ -n "$INSTALLED_VER" ] && [ -n "$LATEST_VER" ]; then
|
||||
substep "$_PKG_NAME $INSTALLED_VER -> $LATEST_VER available, updating..."
|
||||
elif [ -z "$LATEST_VER" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue