Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'intermediate': 0.07; 'postgresql': 0.07; 'rename': 0.07; 'session.': 0.07; 'rejected': 0.09; 'subject:skip:c 10': 0.09; 'cc:addr:python-list': 0.11; 'changes': 0.15; '(when': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'presume': 0.16; 'uploading': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'directory.': 0.24; 'instance,': 0.24; 'connected': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'permission': 0.26; 'possibly': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'related': 0.29; 'message-id:@mail.gmail.com': 0.30; 'occurs': 0.31; 'file': 0.32; 'option': 0.32; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'too': 0.37; 'being': 0.38; 'connections': 0.38; 'files': 0.38; 'changed': 0.39; 'even': 0.60; 'new': 0.61; "you're": 0.61; 'more': 0.64; 'holding': 0.65; 'mar': 0.68; '2015': 0.84; 'activated': 0.84; 'atomic': 0.84; 'hassle': 0.84; 'implications': 0.84; "it'd": 0.84; 'edwards': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=UEkbEV5Jnw6ACtJthABT3/TgPsxQbzkCzt3wq6r+oUI=; b=JDUQ4vOmPTfrV3y4tU5je/sXYFIoBQklAsR+p/3BiudE/FZ423v0DuZcnfLKjE7GJU UVvHhe5vBY35pOCSY+lZE8rb0e1/CA7c9UiJSOn3sjTFyHO87yquGyYFh5bzPl0h9B1a 7JAjaegWvFg3/IzbHV4IrcBwhPwGvBbNm2nIznd/f90GIDtTlQV41WgMPdkkiPfdNsv2 fgMhi0qAXbQrMG7BCEFVh1TxKP8DJr7hZ7lrH/GSEJ3VzMzJEqMzKCK91BIC78TtU7gv y+JebpaOAcGImt39NGd+q8USeQ00ZJcvUhsUpbmu7QEaQOrPTIZxjo4B875MzJj2jJSj udJQ== MIME-Version: 1.0 X-Received: by 10.107.160.212 with SMTP id j203mr30742556ioe.43.1427474163792; Fri, 27 Mar 2015 09:36:03 -0700 (PDT) In-Reply-To: References: Date: Sat, 28 Mar 2015 03:36:03 +1100 Subject: Re: What is elegant way to do configuration on server app From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427474172 news.xs4all.nl 2897 [2001:888:2000:d::a6]:60868 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88173 On Sat, Mar 28, 2015 at 3:28 AM, Grant Edwards wrote: > I presume that automagically reading them any time they changed was > both too much hassle and possibly dangerous: if a file is being > edited, it might get saved in intermediate (broken) states during the > editing session. Even more so if you have multiple files (look, for instance, at PostgreSQL configs, where you might make simultaneous and connected changes to several related files); if you change one and it's activated before you change another, it might even have security implications - although more likely, it'd cause an outage (when legit connections get rejected because you haven't yet added the permission lines). The same problem occurs with PHP-based web sites, but there you don't get the option of holding over for a SIGHUP, so you're just stuck with uploading a new version of your site file-by-file, or *maybe* attempting an atomic rename of a directory. If you're lucky. ChrisA