Skip to content

Conversation

@Dev-iL
Copy link

@Dev-iL Dev-iL commented Feb 9, 2026

Summary

Remove the legacy ez_setup.py bootstrap script to fix build failures with setuptools >= 82.

  • Delete ez_setup.py: This 249-line script was a setuptools bootstrapper from circa 2013 that attempted to download setuptools 0.9.6 if not present. It imported pkg_resources, which was removed in setuptools v82 (2026-02-08), causing ModuleNotFoundError during builds.
  • Remove ez_setup.py from MANIFEST.in: Stop including the deleted file in source distributions.

The script was already dead code — setup.py does not import or call it. The project's pyproject.toml (added in CASSPYTHON-3) declares setuptools as a build dependency, so any PEP 517-compliant build frontend (pip, uv, build) installs setuptools automatically, making ez_setup.py unnecessary.

Build failure before this change

$ uv pip install cassandra-driver
  × Failed to build `cassandra-driver==3.29.3`

      Traceback (most recent call last):
        File ".../ez_setup.py", line 115, in use_setuptools
          import pkg_resources
      ModuleNotFoundError: No module named 'pkg_resources'

Test plan

  • uv pip install -e . succeeds and compiles all C/Cython extensions
  • python -c 'import cassandra; print(cassandra.__version__)' prints 3.30.0

Generated-by: Claude Opus 4.6

Copy link

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is breaking opentelemetry-python-contrib CI, a release with this would be appreciated.

@tommystendahl
Copy link

I also noticed this problem in our CI fro the ericsson/ecchronos project, if a quick release of this is possible it would be very much appreciated.

tommystendahl added a commit to Ericsson/ecchronos that referenced this pull request Feb 9, 2026
@absurdfarce
Copy link
Contributor

Oh Claude, once again your directions confuse me. The build failure snippet above references 3.29.3 suggesting that the issue applies to installs of a version already deployed on pypi while your test plan references 3.30.0 suggesting that it only applies to what's in git. 🤦

I've confirmed that package installs are only failing on Python 3.14. The following sequence works without issue on everything exception that version:

$ uv venv --python 3.14 test-venv
$ . ./test-venv/bin/activate
$ uv pip install --upgrade setuptools # confirm this gives you 82.0.0
$ uv pip install cassandra-driver

Presumably 3.14 fails because we don't have wheels for 3.14 so you're forced to actually do a source build on package install. It's relevant here that 3.29.3 doesn't include 3.14 as a supported platform.

sdist builds look like they might be a different story. Still doing some digging on that.

@potiuk
Copy link
Member

potiuk commented Feb 9, 2026

I've confirmed that package installs are only failing on Python 3.14. The following sequence works without issue on everything exception that version:

Yeah. It's not a huge problem - in our case it also failed for 3.13 when we installed 3.29.1 - see for example https://github.com/apache/airflow/actions/runs/21804090800/job/62904899230#step:8:1365 - mostly because there were no 3.13 wheels in this version (and it did not support it "officially" - yet we we have >=3.29.1 as minimum specified as airlfow dependencies.

The test where it failed was the "lowest dependency" test - so the test when we attempt to bring all dependencies to their minimum specified versions and we want to check that our tests are still passing with them. So even if 3.29.1 did not support 3.13 officially, we got it working there because we built it from sdist and ... it worked.

I guess other people might have similar issues when they are installing older versions.

Sadly - indeed - there is not much you can do for already released versions. They are immutable and they are what they are - and if people will want to use sdist to build "unsupported" version for 3.13 with sdist - they are able to do it and it will work as long as they apply workarounds.

So, this is true that there is no urgency here, some CI failures will happen in edge cases here, most installations will work with binary wheels and there is already a workaround - especially if you use modern tool versions - like 25.3+ of pip that supports --build-constraints, people can specify constraints to not install newer setuptools version.

It would however be great to get it fixed for the next release :)

@potiuk
Copy link
Member

potiuk commented Feb 9, 2026

I updated Airflow provider spec to better support version/whl availability apache/airflow#61685

@xrmx
Copy link

xrmx commented Feb 10, 2026

On top of the pkg_resources requirement this script is broken anyway:

      "/home/runner/.cache/uv/sdists-v9/pypi/cassandra-driver/3.29.3/8B-7iB8YnvcAwKBrY0GDo/src/ez_setup.py",
      line 203, in _extractall
          self.chown(tarinfo, dirpath)
      TypeError: chown() missing 1 required positional argument:
      'numeric_owner'

@aarena-domotz
Copy link

aarena-domotz commented Feb 10, 2026

Hello, we see this failing when installing cassandra driver with poetry (python 3.11, poetry 2.3.0, poetry-core 2.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants