Title: Deprecated setuptools features are used · Issue #1653 · gitpython-developers/GitPython · GitHub
Open Graph Title: Deprecated setuptools features are used · Issue #1653 · gitpython-developers/GitPython
X Title: Deprecated setuptools features are used · Issue #1653 · gitpython-developers/GitPython
Description: This project currently uses deprecated features of setuptools, some of which may be removed in the future. Installing by running setup.py directly, as the instructions in README.md say to do and as is done in test_installation, is deprec...
Open Graph Description: This project currently uses deprecated features of setuptools, some of which may be removed in the future. Installing by running setup.py directly, as the instructions in README.md say to do and as...
X Description: This project currently uses deprecated features of setuptools, some of which may be removed in the future. Installing by running setup.py directly, as the instructions in README.md say to do and as...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1653
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deprecated setuptools features are used","articleBody":"This project currently uses deprecated features of `setuptools`, some of which may be removed in the future.\r\n\r\n- **Installing by running `setup.py` directly**, as the instructions in `README.md` say to do and as is done in `test_installation`, is deprecated. Actual breakage due to this begins in Python 3.12, where although `setuptools` is still supported as a build backend and nontrivial logic can still be used in `setup.py`, global and virtual environments do not automatically have the `setuptools` package. (See the `ensurepip` item in the [list of removals in 3.12](https://docs.python.org/3.12/whatsnew/3.12.html#removed).) This is the cause of #1640. But the deprecation is not new as of Python 3.12. The following message appears during installation (with any Python version provided the installed `setuptools` version is not very old, but I used Python 3.11.5):\r\n\r\n ```text\r\n /home/ek/repos-wsl/GitPython/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.\r\n !!\r\n \r\n ********************************************************************************\r\n Please avoid running ``setup.py`` directly.\r\n Instead, use pypa/build, pypa/installer or other\r\n standards-based tools.\r\n \r\n See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.\r\n ********************************************************************************\r\n \r\n !!\r\n ```\r\n\r\n This could be worked around without a fix by adding `setuptools` as a development dependency, but an actual fix is straightforward, and there are some further benefits to using `pip install .` to install locally, including that `-e` can easily be passed to make the installation editable.\r\n\r\n- **Building by running `setup.py` directly** is, if I understand correctly, also deprecated. This is a less serious problem, but a true fix for this is also straightforward: the `build` module can be added as a development dependency and used for building the sdist and wheel in `Makefile`. The `setuptools` documentation [recommends using `build`](https://setuptools.pypa.io/en/latest/userguide/quickstart.html).\r\n\r\n- **The `tests_require` keyword argument** is deprecated and intended for removal in a future version of `setuptools`, as noted in the [`setuptools.setup` keyword arguments documentation](https://setuptools.pypa.io/en/latest/references/keywords.html).\r\n\r\n This is already not achieving what appears intended or least hoped for (see #1652), and one reasonable way to fix this is to remove that argument altogether. But both the reliance on a deprecated feature and the absence of an automated way to install test dependencies as a group (without `pip install -r` commands) could be remedied by using a `test` *extra* rather than `tests_require`.\r\n\r\nAlthough I worry a bit about broad scope, it seems to me that it is natural to fix #1640, #1651, #1652, and this issue (which itself overlaps with #1640 and #1652, though is not limited to them) in a single pull request. I say this because there is significant overlap in the changes, and because decisions made in review should probably take the considerations of all these issues into account. I've opened #1654 for this.\r\n\r\nNote that while it is today discouraged to implement nontrivial logic in `setup.py`, and recommended to use `pyproject.toml` and/or `setup.cfg` for what has traditionally been done in `setup.py`, *I do not believe it is deprecated to make nontrivial use of `setup.py` as this project does*. Although it would be beneficial to define build and installation rules declaratively, I think that would be a much bigger change than needed to fix this issue. I have not attempted to do anything like that at this time.","author":{"url":"https://github.com/EliahKagan","@type":"Person","name":"EliahKagan"},"datePublished":"2023-09-10T18:40:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1653/GitPython/issues/1653"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ce782b5f-53cb-376d-fb79-97c382ee6d7e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94EC:1E9D45:443D13:5F40D7:69695DD5 |
| html-safe-nonce | f5e2c484816c79ce06fd7f24897439b7ac8641792cacf1d73f2713f3886800f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEVDOjFFOUQ0NTo0NDNEMTM6NUY0MEQ3OjY5Njk1REQ1IiwidmlzaXRvcl9pZCI6IjQ4NTc0NDY3MTE3NTI3NDQ0MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bcc6a79114219e6daca192121772f4ac4ffddc717529a444922a8ed5b54e5fbc |
| hovercard-subject-tag | issue:1889282750 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/1653/issue_layout |
| twitter:image | https://opengraph.githubassets.com/627e55515de7b365302632d194cbb09f1b71dcb718d89fa122452bd0f0a22e4a/gitpython-developers/GitPython/issues/1653 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/627e55515de7b365302632d194cbb09f1b71dcb718d89fa122452bd0f0a22e4a/gitpython-developers/GitPython/issues/1653 |
| og:image:alt | This project currently uses deprecated features of setuptools, some of which may be removed in the future. Installing by running setup.py directly, as the instructions in README.md say to do and as... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EliahKagan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9db5f28da7e24035385d7f349f17890cbe016a939ddd7952be0f07b862094f5a |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4e59fe66217d3c72925af2a341ae3a8f2b5b5b2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width