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.

Author vinay.sajip
Recipients Claudiu.Popa, pitrou, vinay.sajip
Date 2013-11-04.14:29:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383575353.2.0.493839771866.issue18345@psf.upfronthosting.co.za>
In-reply-to
Content
This issue had dropped off my radar, thanks for bringing it back into view.

I see that the patch follows Antoine's suggestion of a "chown" parameter, but I'm not sure that's the best way to provide this functionality. What concerns me about a "chown" parameter:

1. It's POSIX only, which makes me not want to add it to the API for all users (even though they don't need to specify it, as it's defaulted). It's not a really common use case, even on POSIX.
2. It makes the argument list for the rotating handlers even more unwieldy than it is at present. While it's not pretty now, I don't want to make it uglier.
3. If other things like this are requested in the future (e.g. "chmod" as mentioned in the original post), then it makes the argument lists longer and longer if this approach is used to satisfy those requirements.

Instead, a mixin which redefined _open would seem to fulfil the requirements, and the same strategy could be used to cater for other requirements without any stdlib changes. Of course it requires the developer to do a little bit more work than having the work done for them in the stdlib, but I think it's reasonable to meet the requirement this way as it's relatively uncommon. I don't mind adding an working example of this to the cookbook, making it even less work for developers to adopt this approach. While the _open method is technically private as it begins with an underscore, I have no problem letting subclasses override it.

Also, ISTM that your patch would fail at the shutil.chown call if the log file didn't already exist, which is a not uncommon scenario.
History
Date User Action Args
2013-11-04 14:29:13vinay.sajipsetrecipients: + vinay.sajip, pitrou, Claudiu.Popa
2013-11-04 14:29:13vinay.sajipsetmessageid: <1383575353.2.0.493839771866.issue18345@psf.upfronthosting.co.za>
2013-11-04 14:29:13vinay.sajiplinkissue18345 messages
2013-11-04 14:29:12vinay.sajipcreate