-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Switch to TOML for configuration files #3809
Comments
@dholth Could you label this config? |
@pradyunsg this would be a massive compatibility breach - its not necessarily worth it |
Which configuration files? Uwsgi solves this problem by supporting all file formats |
Uwsgi is also notorious for its feature bloat. |
And I use uwsgi instead of 15 separate programs, saving tons of maintenance work. Notorious! |
Closed by mistake |
Not sure what you're trying to say here, but uWSGI's development style comes with a costly maintenance burden. We don't want pip to be another uWSGI. |
The answer to the original question is "no" because this has been untouched for six months. The answer to "is there interest" might change to "yes" if @pradyunsg can show how toml improves pip's configuration from the implementation and end-user sides. But it might be difficult to write an implementation that elegantly supports both the old and new file formats. IIUC pip already supports three configuration formats: environment variables, command line arguments, and the file. @agronholm You mean you don't think pip would be improved by hilarious documentation and sweary log messages? How about modes named after popular video games? I'm disappointed. We don't want pip to be hard to maintain but that is irrelevant to the end user. Without feature bloat there would be no features and no users. We wouldn't have to implement the features in the same style as uWSGI though. |
@dholth There is a middle ground between "no new features" and "features like in uWSGI". That's where we want to be. Given pip's importance to the Python community, we want to add features in a way that maximizes maintainability, and think hard about what to add and what not to. |
I'll respond to/randomly type about various comments:
The way I look at this is that TOML is already a part of PEP-518 - it is going to be a part of pip. So, it makes sense to switch to TOML for what it is actually meant for: configuration files.
I don't think so. massive compatibility breach is overstating the deal. The current
There's only INI format files which have a OS-dependant (and environment-dependant) path.
Yep! The overriding order is: cli -> environment -> subcommand config -> global config -> option defaults.
I see this as the said middle ground. And then I like TOML enough to want to see it be the Python Packaging Ecosystem as the configuration file. 😃
Feature Bloat != Having features. Feature bloat is useless features that add no value to end user or even affect UX negatively. Anyway, let's not fight on terminology. Also, I don't think uWSGI is a good example for this anyway. Let's not talk with that as a reference.
Yeah @dholth, please add the label |
FTR I think it makes sense to move our configuration over to using TOML, possibly deprecating the old configuration as well. |
Is this something that would be a nice-to-have in 10.0? |
It'd be nice to have, not sure I care about if it's in 10.0 or not though. |
Is somebody working on this? |
As of now, I'm don't think anyone is working on this.
It's on my personal roadmap but I don't think I would be getting to this in
the next 2 or even 3 months.
I guess anyone who wants to take this on can feel free to do so. :)
…On Sat, Jul 8, 2017, 17:32 Alex Grönholm ***@***.***> wrote:
Is somebody working on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3809 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADH7SWojxApJ_r45D0tmYNL4XH0SKANAks5sL2-5gaJpZM4I8qm1>
.
|
BTW: Would you add a sub-command
It means the variable
It is both on human and scripts friendly. |
that would depend on if there is a vendor-able toml library that supports editing without throwing away meta-data (else a serialize/de-serialize would just throw away comments and other things the user might have added manually |
Oh sorry, it's duplicated with #1736 |
There is a pip config command ready to ship for pip 10. =)
And the serializability that Ronny Pfannschmidt points out isn't needed
(pip config doesn't have it now) but is definitely something I want to add.
…On Thu, 8 Mar 2018, 15:53 Ronny Pfannschmidt, ***@***.***> wrote:
that would depend on if there is a vendor-able toml library that supports
editing without throwing away meta-data (else a serialize/de-serialize
would just throw away comments and other things the user might have added
manually
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3809 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADH7SV2A9-k6G1Id25wHv_uMn8BAxSLNks5tcQalgaJpZM4I8qm1>
.
|
This exists now: https://github.com/sdispater/tomlkit |
I have been working on this, I actually started working on it today, along with the guidance of @pradyunsg. I have gone through the discussion of this PR and decided upon the following:
Let me know if you have some concerns with this approach. |
Do you mean these files already exist? |
Ok, I was just being dumb and didn't cross-check, I thought the function would give out files which exist, none of them exist, so this can go as planned :D |
#3691 means pip will need to vendor some form of TOML library.
In view of consistency, is there any interest in shifting to the TOML format for configuration files?
The text was updated successfully, but these errors were encountered: