Skip to content

Use a copy of package_index.py from setuptools 80.2.0. - #712

Merged
mauritsvanrees merged 13 commits into
masterfrom
maurits-package-index
Jun 11, 2025
Merged

mauritsvanrees merged 13 commits into
masterfrom
maurits-package-index

Conversation

@mauritsvanrees

Copy link
Copy Markdown
Member

This fixes compatibility with setuptools 80.3.0 where this module was removed. Merged some of our patches into this copy.
This fixes issue #710.

This PR builds on my PR #708 which fixes unrelated errors in earlier setuptools 80 versions.

Some code of our copy of this module can probably be removed, as we don't use it. I may have a look at that still, simply removing definitions and seeing if it still works. The main thing we need, is the PackageIndex class.

This PR updates GitHub Actions to add setuptools 80.3.0 and latest 80.9.0 to the test matrix.

In later versions this is removed, but we need it.
I don't want to add a dependency just for one function.
Depending on your setuptools version, this may or may not be needed.
setuptools 57 vendorizes it.
But I see CI fail until setuptools 69, so likely this function does not exist in older versions.
setuptools 70 introduces these two functions that we need in `package_index.py`:

```
from setuptools.unicode_utils import _cfg_read_utf8_with_fallback
from setuptools.unicode_utils import _read_utf8_with_fallback
```
_package_index.py:1005:13: W504 line break after binary operator
The setuptools.warnings module was introduced later.
@dataflake

Copy link
Copy Markdown
Contributor

Just like #708 I have tested this PR's branch under Python 3.13 and Python 3.10 universal2 with the same buildout configurations from #711 and it worked.

Base automatically changed from setuptools-80 to master June 11, 2025 08:18
@mauritsvanrees
mauritsvanrees merged commit b9542e0 into master Jun 11, 2025
@mauritsvanrees
mauritsvanrees deleted the maurits-package-index branch June 11, 2025 08:19
@mauritsvanrees

Copy link
Copy Markdown
Member Author

I have released zc.buildout 4.1.11 with this.

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.

2 participants