From 75e2628782c1ccb626603a0ae852478dbf11b1d0 Mon Sep 17 00:00:00 2001 From: dsashidh Date: Fri, 18 Jul 2025 19:42:09 +0000 Subject: [PATCH] Add lower bounds for fsspec and networkx dependencies (#158565) Fixes #156587 This sets lower bounds for fsspec and networkx in both setup.py and requirements,txt. - fsspec>= 0.8.5 (released December 15, 2020) - netowrkx>= 2.5.1 (released April 3, 2021) These are the first stable versions released after Python 3.9 came out on October 5, 2020. Since Python 3.8 is no longer maintained, setting these minimums helps ensure PyTorch won't be installed alongside unexpectedly old versions of these packages. Tested with these versions locally to make sure they don't break anything. Adding CI for lower-bound testing could be a follow up later if need. Pull Request resolved: https://github.com/pytorch/pytorch/pull/158565 Approved by: https://github.com/janeyx99 --- requirements.txt | 4 ++-- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2f585def9f19..2affc4d2215a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,11 +7,11 @@ build[uv] # for building sdist and wheel expecttest>=0.3.0 filelock -fsspec +fsspec>=0.8.5 hypothesis jinja2 lintrunner ; platform_machine != "s390x" -networkx +networkx>=2.5.1 optree>=0.13.0 psutil sympy>=1.13.3 diff --git a/setup.py b/setup.py index 232cf214d32e..076d3d1e7ec0 100644 --- a/setup.py +++ b/setup.py @@ -1233,9 +1233,9 @@ def main() -> None: "typing-extensions>=4.10.0", 'setuptools ; python_version >= "3.12"', "sympy>=1.13.3", - "networkx", + "networkx>=2.5.1", "jinja2", - "fsspec", + "fsspec>=0.8.5", ] if BUILD_PYTHON_ONLY: install_requires += [f"{LIBTORCH_PKG_NAME}=={TORCH_VERSION}"]