[Tech Debt] [python] Remove setuptools<82 constraint after apache-flink upgrades to apache-beam>=2.66.0
- Dominant language
- Java
- Stars
- 452
- Forks
- 167
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 49
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/flink-agents/issues) and found nothing similar.
### Description
### Problem
`setuptools 82.0.0` (released Feb 8, 2026) removed `pkg_resources` module entirely. `apache-beam<2.66.0` still uses `pkg_resources` in its `setup.py` ([source](https://github.com/apache/beam/blob/v2.65.0/sdks/python/setup.py)), so building `apache-beam` from source fails with:
```
ModuleNotFoundError: No module named 'pkg_resources'
```
Currently all `apache-flink` depends on `apache-beam <= 2.61.0`, which is affected.
### Current Workaround
We added `setuptools<82` constraints in `pyproject.toml` to pin setuptools to a version
that still includes `pkg_resources`:
- `[build-system] requires`: `setuptools>=75.3,<82`
- `[project] dependencies`: `setuptools>=75.3,<82`
- `[tool.uv.extra-build-dependencies]`: `apache-beam = ["setuptools<82"]`
PR: https://github.com/apache/flink-agents/pull/526
### Long Term Solution
`apache-beam>=2.66.0` removed `pkg_resources` usage from `setup.py`([PR #35153](https://github.com/apache/beam/pull/35153)).
Once `apache-flink` upgrades its `apache-beam` dependency to `>=2.66.0`, we can remove all `setuptools<82` constraints.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start in pyproject.toml, reviewing the apache-flink dependency and the three setuptools<82 constraints under [build-system], [project], and [tool.uv.extra-build-dependencies]. Confirm apache-flink uses apache-beam>=2.66.0, then remove the constraints and verify that the dependency build no longer requires the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100