remove setup.py and migrate to a static pyproject.toml#388
Conversation
pyproject.toml
Outdated
| # What follows is an exact copy of the runtime dependencies, because (A) | ||
| # incremental needs to be able to import `treq` to be able to import | ||
| # `treq.__version__` (see `tools.setuptools.dynamic` below), and (B) the | ||
| # `treq` module is set up such that everything is eagerly imported into the | ||
| # top-level namespace and thus sucks in every other dependency that we | ||
| # require. |
There was a problem hiding this comment.
This is odd, because incremental exec()s the _version.py directly by my reading.
pyproject.toml
Outdated
| [tool.setuptools.dynamic] | ||
| version = {attr = "treq.__version__"} |
There was a problem hiding this comment.
Oh, I see, you've tried to use setuptools attr and it's falling back to importing the module.
I don't see anything here equivalent to the use_incremental=True argument to setup(). It looks like we need to add support to incremental for direct integration with setuptools, like setuptools_scm has:
There was a problem hiding this comment.
Filed twisted/incremental#90 for this so that we can fix it in incremental. Sad that this seems to be the main setuptools build extension entrypoint.
|
@glyph Do you have any plan to revive this now that Incremental supports |
Thanks for the heads up, I would definitely like for this to be landed. |
ed8109a to
3fea904
Compare
3fea904 to
630c06d
Compare
- Stop pinning an old Sphinx - Add project URLs based on twisted/twisted
|
Closing the circle here, I have further updated the package to use Incremental's Hatchling plugin. |
|
Thank you for the review @adiroiban! |
Bumps [treq](https://github.com/twisted/treq) from 24.9.1 to 25.5.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/twisted/treq/blob/trunk/CHANGELOG.rst">treq's changelog</a>.</em></p> <blockquote> <h1>25.5.0 (2025-05-31)</h1> <h2>Features</h2> <ul> <li>treq is packaged with Hatchling, and consequently no longer directly depends on setuptools. (<code>[#388](twisted/treq#388) <https://github.com/twisted/treq/issues/388></code>__)</li> </ul> <h2>Improved Documentation</h2> <ul> <li>Update documentation to use <code>async</code>/<code>await</code> syntax (<code>[#409](twisted/treq#409) <https://github.com/twisted/treq/issues/409></code>__)</li> </ul> <h2>Deprecations and Removals</h2> <ul> <li>Support for Python 3.8, which has reached end of support, is deprecated. This is the last release with support for Python 3.8. (<code>[#407](twisted/treq#407) <https://github.com/twisted/treq/issues/407></code>__)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/twisted/treq/commit/6869fa5d09f306e2fa225428516f947da0b8fae7"><code>6869fa5</code></a> Merge pull request <a href="https://redirect.github.com/twisted/treq/issues/410">#410</a> from twisted/release-25.5.0</li> <li><a href="https://github.com/twisted/treq/commit/56266566cfa71fc2a92ba5c9ace90c43ac774170"><code>5626656</code></a> Test with Python 3.13 final</li> <li><a href="https://github.com/twisted/treq/commit/f10185e4da4b404fa7592a7d948b6d573a9819da"><code>f10185e</code></a> Generate the changelog</li> <li><a href="https://github.com/twisted/treq/commit/4b846664f18261a666ad1bd6de4b59dd67db1fc5"><code>4b84666</code></a> Version 25.5.0</li> <li><a href="https://github.com/twisted/treq/commit/72a4441f599ac93c6a6a78a398366c103db6fb05"><code>72a4441</code></a> Merge pull request <a href="https://redirect.github.com/twisted/treq/issues/409">#409</a> from twisted/rtd-shiny</li> <li><a href="https://github.com/twisted/treq/commit/0a814edd8a6927e1c5288500ac98ee457cb53a9e"><code>0a814ed</code></a> Add changefragment</li> <li><a href="https://github.com/twisted/treq/commit/993cc47df5ae415dcb361f1215d9c50c31be6983"><code>993cc47</code></a> Fix changelog warnings</li> <li><a href="https://github.com/twisted/treq/commit/3992177456df67811d0960160ce0c343d1969926"><code>3992177</code></a> Link to CookieJar</li> <li><a href="https://github.com/twisted/treq/commit/cff43d93b6fbb6ce68f7721938906573b6ba55ad"><code>cff43d9</code></a> Update source_suffix conf</li> <li><a href="https://github.com/twisted/treq/commit/e39c8511b12c0cf809c6bc3e22f031597ad27067"><code>e39c851</code></a> async def print_response</li> <li>Additional commits viewable in <a href="https://github.com/twisted/treq/compare/treq-24.9.1...treq-25.5.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Remove
setup.pyand migrate project metadata to a staticpyproject.toml.