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 to save with order
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: anadelonbrin, facundobatista, paul.moore
Priority: normal Keywords: patch

Created on 2006-01-07 18:11 by facundobatista, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ConfigParser.diff facundobatista, 2006-01-07 18:11 ConfigParser.py diff file
Messages (4)
msg49273 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2006-01-07 18:11
ConfigParser saves the data in a not-predefined order.
This is because it keeps, internally, the information
in dictionaries.

This patch orders the info to be saved in the file
through the ConfigParser write() method.

This patch does not let the user to specify the order.
msg49274 - (view) Author: Tony Meyer (anadelonbrin) Date: 2006-01-12 21:59
Logged In: YES 
user_id=552329

Note that the patch is backwards (new old instead of old new).

IMO the 'surgical' editing that has been proposed many times
on python-dev and c.l.p would be superior to this.  IOW, the
original order of the file should be retained (any new
entries could be added alphabetically, as here).
msg49275 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2007-03-07 13:47
This patch should probably be rejected now, as patch 1371075 (which seems to be a superset of this) has been accepted.
msg49276 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2007-03-07 13:55
Closing it, because after the patch 1371075, you can control ConfigParser behaviour regarding order.
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42773
2006-01-07 18:11:11facundobatistacreate