[issue28159] Deprecate isdst argument in email.utils.localtime

2022-02-08 Thread Alan WiIliams
Alan WiIliams added the comment: Hi, I'd like to work on this issue. Based on the discussion, the main thing to do here is to raise a deprecation warning when isdst is used? -- nosy: +Alan.Williams ___ Python tracker

[issue28159] Deprecate isdst argument in email.utils.localtime

2022-01-11 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy versions: +Python 3.11 -Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-11-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Keeping localtime as a convenience function in email.util is fine, but isdst argument should be eliminated at some point. There is a fundamental problem with disambiguating fold times with isdst: some folds do not involve the change in dst or happen in

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-11-18 Thread R. David Murray
R. David Murray added the comment: No, localtime does something subtly different, in that it will accept a naive datetime add the local timezone to it. Calling localtime() is also more convenient/readable than calling datetime.now().astimezone(). --

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-11-18 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks David :) So, I found that isdst was never added as method signature in the docs, but it is mentioned in the paragraph. https://docs.python.org/3.7/library/email.util.html?#email.utils.localtime The intention is still just to deprecate isdst argument,

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-11-18 Thread R. David Murray
R. David Murray added the comment: At this point I think the deprecation warning will go into 3.7, but we should be able to remove it in 3.8. I think I'll probably keep the 'localtime' method and have it delegate it to astimezone, because frankly I would never be able to remember that that

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-11-17 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi Alexander, Is the idea here to raise deprecation warning starting in 3.6 and remove it by 3.8? Thanks :) -- nosy: +Mariatta ___ Python tracker

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-09-14 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: With the implementation of PEP 495, email.utils.localtime() does not need the isdst argument to disambiguate naive time. In fact the utility method itself is redundant given that astimezone() now works for naive instances. -- components: