This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: configparser: indentation
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Ido Michael, SilentGhost, eamanu, lukasz.langa, mrs.red, taleinat
Priority: normal Keywords: patch

Created on 2019-02-01 22:59 by mrs.red, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18522 closed Ido Michael, 2020-02-16 17:32
PR 18620 closed Ido Michael, 2020-02-23 14:04
PR 18621 closed Ido Michael, 2020-02-23 14:24
PR 18623 closed Ido Michael, 2020-02-23 14:41
Messages (11)
msg334729 - (view) Author: (mrs.red) Date: 2019-02-01 22:59
The configparser module does not have an option for indentation. I would like to indent the keys by tabs. Maybe we could implement an option for that?
I already have some example code for it.
msg336036 - (view) Author: Emmanuel Arias (eamanu) * Date: 2019-02-20 02:52
> I already have some example code for it

Do you have a patch?
msg361244 - (view) Author: Ido Michael (Ido Michael) * Date: 2020-02-02 15:42
Can I take this?
What needs to be done? adding an indent flag and if it's passed indent the keys?
msg361250 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2020-02-02 17:31
I would suggest adding indent parameter to the write method, it would default to an empty string and could be used directly in the formatting operation.
msg362086 - (view) Author: Ido Michael (Ido Michael) * Date: 2020-02-16 17:33
Created PR GH-18522
msg362514 - (view) Author: Ido Michael (Ido Michael) * Date: 2020-02-23 14:50
New PR: GH-18623
msg362516 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2020-02-23 15:01
Your PRs are missing documentation and tests.
msg364826 - (view) Author: Ido Michael (Ido Michael) * Date: 2020-03-22 22:01
@SilentGhost Added documentation to the module and a test for a give space indent in the module test.
msg365361 - (view) Author: Ido Michael (Ido Michael) * Date: 2020-03-30 23:31
ping
msg370974 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-08 11:33
I'm -1 on making this change. Frankly, I think there are many better modern alternatives to ConfigParser, and I think we should avoid complicating it any further.
msg371009 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2020-06-08 16:41
Thanks for your contribution Ido Michael but I'm also -1 on the feature. .ini is an underspecified format and it's supposed to be interoperable between applications. Indenting keys sounds like a compatibility challenge.
History
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 80066
2020-06-08 16:41:28lukasz.langasetstatus: open -> closed
resolution: wont fix
messages: + msg371009

stage: patch review -> resolved
2020-06-08 11:33:59taleinatsetnosy: + taleinat
messages: + msg370974
2020-03-30 23:31:18Ido Michaelsetmessages: + msg365361
2020-03-22 22:01:50Ido Michaelsetmessages: + msg364826
2020-02-23 15:01:13SilentGhostsetmessages: + msg362516
2020-02-23 14:50:45Ido Michaelsetmessages: + msg362514
2020-02-23 14:41:54Ido Michaelsetpull_requests: + pull_request17988
2020-02-23 14:24:33Ido Michaelsetpull_requests: + pull_request17986
2020-02-23 14:04:28Ido Michaelsetpull_requests: + pull_request17985
2020-02-16 17:33:02Ido Michaelsetmessages: + msg362086
2020-02-16 17:32:33Ido Michaelsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17899
2020-02-02 17:31:12SilentGhostsetnosy: + SilentGhost
messages: + msg361250
2020-02-02 15:42:59Ido Michaelsetnosy: + Ido Michael
messages: + msg361244
2019-02-20 02:52:33eamanusetnosy: + eamanu
messages: + msg336036
2019-02-02 08:46:14SilentGhostsetnosy: + lukasz.langa
2019-02-01 22:59:14mrs.redcreate