aglinxinyuan commented on code in PR #6412:
URL: https://github.com/apache/texera/pull/6412#discussion_r3607245109


##########
amber/requirements.txt:
##########
@@ -16,7 +16,7 @@
 # under the License.
 
 # Not imported directly: `fs` needs pkg_resources at import time (#4199).
-setuptools==80.10.2
+setuptools==83.0.0

Review Comment:
   Unfortunately we can't — `pkg_resources` isn't a real PyPI package, so 
nothing can declare it as a dependency. It's a module that ships *inside* 
setuptools, and only below 82: setuptools 82.0.0 removed it 
([changelog](https://setuptools.pypa.io/en/stable/history.html#v82-0-0)). `fs` 
already declares `setuptools`, just with no version bound, and 2.4.16 is the 
project's final release, so that metadata won't be fixed upstream. The 
setuptools changelog itself recommends the fix we're using: "Projects and 
environments relying on `pkg_resources` … should depend on older versions of 
`setuptools`."
   
   Removing the line would still work today, but only by accident: 
`torch==2.12.1+cpu` in `operator-requirements.txt` declares `setuptools<82`, 
which is what keeps a pkg_resources-bearing setuptools installed. Once torch 
relaxes that cap, we'd hit the same `ModuleNotFoundError: No module named 
'pkg_resources'` from #4199 again on some unrelated PR.
   
   That torch cap is also why the original bump to 83.0.0 here looked green: CI 
installs the two requirement files in separate passes, and the second pass 
silently downgraded setuptools before pytest ran (run log: `Successfully 
uninstalled setuptools-83.0.0` → `Successfully installed … setuptools-81.0.0`), 
so 83.0.0 — which has no pkg_resources — was never actually tested. I verified 
in a clean venv that `setuptools==83.0.0` + `fs==2.4.16` fails at `import fs`.
   
   I've reworked this PR to `setuptools<82` instead of the exact pin — it 
encodes the actual requirement, currently resolves to 81.0.0 (the version CI 
really ran under), and can't conflict with torch's cap.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to