From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124044 invoked by alias); 30 May 2016 14:53:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 124032 invoked by uid 89); 30 May 2016 14:53:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=anti-POSIX, antiposix, aposix, anti-posix X-HELO: csmail.cs.umass.edu Received: from mdc1.cs.umass.edu (HELO csmail.cs.umass.edu) (128.119.240.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 May 2016 14:53:13 +0000 Received: from [192.168.0.5] (c-24-62-203-86.hsd1.ma.comcast.net [24.62.203.86]) by csmail.cs.umass.edu (Postfix) with ESMTPSA id 6C4EDC8000294AB748; Mon, 30 May 2016 10:53:11 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: cygwin python os.stat gives wrong ctime References: <4026b0f6-0514-576e-def4-c5fcd79148b9@cs.umass.edu> <574B42EA.9060408@houseofpain.org> To: cygwin@cygwin.com From: Eliot Moss Message-ID: Date: Mon, 30 May 2016 17:00:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <574B42EA.9060408@houseofpain.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00406.txt.bz2 On 5/29/2016 3:28 PM, Mitch Deoudes wrote: > > > On 5/28/2016 10:35 PM, Eliot Moss wrote: >> On 5/28/2016 9:39 PM, Mitch Deoudes wrote: >>> According to the python docs, os.stat() gives the following for st_ctime: >>> >>> "|st_ctime| - platform dependent; time of most recent metadata change on Unix, or the time of >>> creation on Windows" >> >> cygwin emulates posix, so you should expect a posix-like result. > > I understand your argument, and offer the following, which is from the same section of the python docs: > > "On other Unix systems (such as FreeBSD), the following attributes may be available (but may be > only filled out if root tries to use them): > > * |st_birthtime| - time of file creation" > > Suggesting that it's not "anti-POSIX" (unPOSIX? aPOSIX?) to provide the information if it's available. > > Anyway, I've found a more or less suitable workaround for now, batching up the queries and calling > out to the shell - so I'll leave it at that. It appears, then, that the maintainer of cygwin's python could consider adjusting for this information to be returned, since cygwin provides it and it would be useful (at least sometimes). The python spec does say "may" (not "shall" or "must"), so it seems to me forgivable that it's not currently available. I'd say it's up to the maintainer to decide, and how to prioritize it. Regards -- EM -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple