Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Lennart Regebro
There is plenty of time to book an open space now. I would prefer sometime Saturday. Any wishes? ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/p

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Isaac Schwabacher
On 15-04-09, Alexander Belopolsky wrote: > > On Thu, Apr 9, 2015 at 3:39 PM, Isaac Schwabacher > wrote: > > > > Well, you are right, but at least we do have a localtime utility hidden > > > in the email package: > > > > > > >>> from datetime import * > > > >>> from email.utils import localtim

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Isaac Schwabacher
On 15-04-09, Alexander Belopolsky wrote: > > On Thu, Apr 9, 2015 at 3:07 PM, Isaac Schwabacher > wrote: > > > > No, it does not. Please read the documentation: "self must be aware > > > (self.tzinfo must not be None, and self.utcoffset() must not return > > > None)." > > > > Whoops, you're

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Isaac Schwabacher
On 15-04-09, Alexander Belopolsky wrote: > > On Thu, Apr 9, 2015 at 11:59 AM, Isaac Schwabacher > wrote: > > > > Storing isdst in the datetime object would allow utcoffset(dt) to > > > distinguish between 1:30AM before clock change and 1:30AM after. Where do > > > you propose to store the of

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Alexander Belopolsky
On Thu, Apr 9, 2015 at 3:39 PM, Isaac Schwabacher wrote: > > Well, you are right, but at least we do have a localtime utility hidden > in the email package: > > > > > > >>> from datetime import * > > >>> from email.utils import localtime > > >>> print(localtime(datetime.now())) > > 2015-04-09 15:

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Alexander Belopolsky
On Thu, Apr 9, 2015 at 3:07 PM, Isaac Schwabacher wrote: > > No, it does not. Please read the documentation: "self must be aware > (self.tzinfo must not be None, and self.utcoffset() must not return None)." > > Whoops, you're right. But that's even worse-- it doesn't give you a way to > convert a

Re: [Python-Dev] ctypes module

2015-04-09 Thread Cristi Fati
Sorry if i'm pushy Would it worth me to send a patch with the changes? (i mean, would it bring value to the product? were there requests for ctypes on WinIA64 ?) If the answer to the above question is not "No", since the changes are in libffi should i send patches to you or libffi guys? (i'm un

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Alexander Belopolsky
On Thu, Apr 9, 2015 at 12:49 PM, Isaac Schwabacher wrote: > > if someone passed you datetime(2013, 11, 3, 1, 30) without a time zone. astimezone assumes that the input naive time is UTC, which is not the case here. No, it does not. Please read the documentation: "self must be aware (self.tzinfo

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Alexander Belopolsky
On Thu, Apr 9, 2015 at 11:59 AM, Isaac Schwabacher wrote: > > Storing isdst in the datetime object would allow utcoffset(dt) to > distinguish between 1:30AM before clock change and 1:30AM after. Where do > you propose to store the offset? > > I propose to add an offset field to datetime.datetime.

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Isaac Schwabacher
On 15-04-09, Alexander Belopolsky wrote: > > On Thu, Apr 9, 2015 at 11:59 AM, Isaac Schwabacher > wrote: > > > I just looked through the datetime documentation, and it looks like the > > currently blessed way of creating an aware datetime from a naive local > > datetime and a tzinfo is datet

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Alexander Belopolsky
On Thu, Apr 9, 2015 at 11:59 AM, Isaac Schwabacher wrote: > I just looked through the datetime documentation, and it looks like the > currently blessed way of creating an aware datetime from a naive local > datetime and a tzinfo is datetime.replace, which is too low level to handle > the job. N

Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-09 Thread Isaac Schwabacher
On 15-04-08, Alexander Belopolsky wrote: > > On Wed, Apr 8, 2015 at 6:52 PM, Isaac Schwabacher > wrote: > > > > > So "storing the offset" and "storing a flag" are not two alternative > > > solutions to the same problem- these > > > are two solutions to two different problems. > > > > I'm viewin