-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eventually deprecate setup.cfg
with automatic conversion to pyproject.toml
#3214
Comments
Thankyou for posting this issue. As someone tinkering on the bleeding edge of packaging tools I have been so confused by the various PEPs and documentation. I thought pyproject.toml was the future but could not find anything definitive to suggest setuptools were going to deprecate setup.cfg. |
Hi @thehappycheese please feel free to open a discussion if you still But meanwhile we are in no rush to deprecated |
Thanks @abravalheri I will take a look at the forums. Yes I understand setuptools has a big community to bring along for the journey when it happens :) I think it will be a great move though if it works out |
@abravalheri Is that milestone correctly named ( I suppose -- if Thanks! |
Sorry, @bskinn, the correct name should be |
The current documentation regarding `pyproject.toml` claims that support for using it to specify package metadata and build configuration options might be "completely removed" in a future release. However, nowadays it is clear (pypa#1688 (comment) and pypa#3214) that `pyproject.toml` is not going anywhere, is here to stay, and is in fact expected to be the preferred format in the future. This makes an incremental change toward that future by clarifying that `pyproject.toml` support will not be removed in a future release of setuptools.
Is it being considered that if I ask this because I extensively use
Without |
AFAIK the goal is to align on self references at a higher level, such that you don't have to depend on parser specific features like configparser's interpolation. Something like: [options.extras_require]
all =
- %(retrieval)s
- %(postprocessor)s
- %(api)s
- %(validation)s
+ self[retrieval]
+ self[postprocessor]
+ self[api]
+ self[validation]
retrieval =
- %(scipy)s
- %(numpy)s
+ self[scipy]
+ self[numpy]
pandas>=0.24.1
rapidfuzz>=0.14.1
postprocessor =
- %(pagexml)s
+ self[pagexml]
jsonschema>=2.6.0
api =
- %(postprocessor)s
+ self[postprocessor]
flask-restx>=1.0.3
validation =
- %(numpy)s
+ self[numpy]
schwifty>=2018.9.1
scipy =
scipy>=1.3.0
numpy =
numpy>=1.21.2
pagexml =
pagexml-slim>=2022.4.12 |
Is this already supported if using |
Did you try it? Works for me :) [project.optional-dependencies]
all = [
"foo[retrieval]",
"foo[postprocessor]",
"foo[api]",
"foo[validation]",
]
retrieval = [
"foo[scipy]",
"foo[numpy]",
"pandas>=0.24.1",
"rapidfuzz>=0.14.1",
]
postprocessor = [
"foo[pagexml]",
"jsonschema>=2.6.0",
]
api = [
"foo[postprocessor]",
"flask-restx>=1.0.3",
]
validation = [
"foo[numpy]",
"schwifty>=2018.9.1",
]
scipy = ["scipy>=1.3.0"]
numpy = ["numpy>=1.21.2"]
pagexml = ["pagexml-slim>=2022.4.12"] |
I haven't tried it yet, but I will with a real project when I have some time. Great to hear that this is possible. I did not see this in any documentation. |
I like having one configuration file per tool. I would be annoyed if/when I have to have the configuration of all tools in Maybe it would be nice if there was a convention like: |
@sinoroc you don't have to use pyproject.toml to configure all your tools. Most tools give you the option to use their own config file (e.g. mypy.ini, ruff.toml, .isort.cfg, .flake8, .coveragerc, pytest.ini, etc...) |
There's a trade-off between:
For most people, they rarely look at or change the settings, so gathering them into a single file and simplifying the project repo is the much more convenient. The idea of a pyproject.d might mitigate some of the disadvantages, but will also require a lot of design work to make it work as everyone expects for every project and would require adding more code to the tools that use pyproject.toml. For me, the best solution would be a pre-commit hook to reorder the tables in |
@jamesmyatt https://pyproject-fmt.readthedocs.io/en/latest/ 👀 |
@neutrinoceros Perfect. Thank you. |
For the sake of the argument...
This could be solved by something like But this is not going to happen. The current solution with tool tables in |
Hi @sinoroc thank you very much for expressing the concerns. Even if we eventually drop the custom parsing, chances are it will still keep working via "transpiling" it to
I personally share this opinion too, but I am afraid the standardisation efforts are going in the opposite direction.
Later, PEP 621 came along and added a new section ( Initially the spec even prevented this file from being used from other tools, but this position was modified once tools started pushing for
That is a good idea, maybe we could make |
In preparation for pypa/setuptools#3214
In preparation for pypa/setuptools#3214
In preparation for pypa/setuptools#3214
In preparation for pypa/setuptools#3214
In preparation for pypa/setuptools#3214
In preparation for pypa/setuptools#3214
Update to the modern practice of a using a single declarative pyproject.toml file for package configuration. `setup.cfg` is deprecated and is no longer necessary. Ref: pypa/setuptools#3214
Update to the modern practice of a using a single declarative pyproject.toml file for package configuration. `setup.cfg` is deprecated and is no longer necessary. Ref: pypa/setuptools#3214
Update to the modern practice of a using a single declarative pyproject.toml file for package configuration. `setup.cfg` is deprecated and is no longer necessary. Ref: pypa/setuptools#3214
Update to the modern practice of a using a single declarative pyproject.toml file for package configuration. `setup.cfg` is deprecated and is no longer necessary. Ref: pypa/setuptools#3214
Update to the modern practice of a using a single declarative pyproject.toml file for package configuration. `setup.cfg` is deprecated and is no longer necessary. Ref: pypa/setuptools#3214
Update to the modern practice of a using a single declarative pyproject.toml file for package configuration. `setup.cfg` is deprecated and is no longer necessary. Ref: pypa/setuptools#3214
Specify dev dependencies for testing with pytest. setup.cfg will be deprecated in the future. pypa/setuptools#3214
This is a follow up of #1688.
As discussed in the linked issue, the approach setuptools would like to take is to eventually use a single declarative format (
pyproject.toml
) instead of maintaining 2 (pyproject.toml
/setup.cfg
).Originally posted by Paul Ganssle in #1688 (comment):
Originally posted by Jason R. Coombs in #1688 (comment)
Originally posted by Paul Ganssle in #1688 (comment)
Relevant tool:
ini2toml
The text was updated successfully, but these errors were encountered: