GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Deprecate isdst argument in email.utils.localtime · Issue #72346 · python/cpython

Deprecate isdst argument in email.utils.localtime #72346

New issue
Copy link
New issue
Copy link
Closed
#91450
Closed
Deprecate isdst argument in email.utils.localtime#72346
#91450
Copy link
Labels
3.12only security fixesonly security fixeseasystdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-email

Description

@abalkin
abalkin
opened on Sep 14, 2016
Issue body actions
BPO 28159
Nosy @abalkin, @bitdancer, @aw1231, @Mariatta

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2016-09-14.21:55:13.766>
labels = ['easy', 'library', '3.11']
title = 'Deprecate isdst argument in email.utils.localtime'
updated_at = <Date 2022-02-08.16:46:38.005>
user = 'https://github.com/abalkin'

bugs.python.org fields:

activity = <Date 2022-02-08.16:46:38.005>
actor = 'Alan.Williams'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2016-09-14.21:55:13.766>
creator = 'belopolsky'
dependencies = []
files = []
hgrepos = []
issue_num = 28159
keywords = ['easy']
message_count = 7.0
messages = ['276492', '281078', '281125', '281127', '281139', '281161', '412846']
nosy_count = 4.0
nosy_names = ['belopolsky', 'r.david.murray', 'Alan.Williams', 'Mariatta']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue28159'
versions = ['Python 3.11']

Activity

Next
  1. abalkin commented on Sep 14, 2016

    @abalkin
    abalkin
    on Sep 14, 2016
    MemberAuthor
    More actions

    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.

  2. abalkin
    added
    3.7 (EOL)end of lifeend of life
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Sep 14, 2016
  3. Mariatta commented on Nov 18, 2016

    @Mariatta
    Mariatta
    on Nov 18, 2016
    Member
    More actions

    Hi Alexander,

    Is the idea here to raise deprecation warning starting in 3.6 and remove it by 3.8?

    Thanks :)

  4. bitdancer commented on Nov 18, 2016

    @bitdancer
    bitdancer
    on Nov 18, 2016
    Member
    More actions

    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 was the datetime method I needed to get localtime.

  5. Mariatta commented on Nov 18, 2016

    @Mariatta
    Mariatta
    on Nov 18, 2016
    Member
    More actions

    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, right? not the localtime().

    I can add a sentence in the docs indicating that we favor datetime.astimezone() instead of email.utils.localtime(), if that works for you. What do you think about this?

  6. bitdancer commented on Nov 18, 2016

    @bitdancer
    bitdancer
    on Nov 18, 2016
    Member
    More actions

    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().

  7. abalkin commented on Nov 18, 2016

    @abalkin
    abalkin
    on Nov 18, 2016
    MemberAuthor
    More actions

    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 the regions that do not have a dst regime at all. PEP-495 covers this in all the gory details.

  8. iritkatriel
    added
    easy
    3.11only security fixesonly security fixes
    and removed
    3.7 (EOL)end of lifeend of life
    on Jan 11, 2022
  9. aw1231 commented on Feb 8, 2022

    @aw1231
    aw1231mannequin
    on Feb 8, 2022
    Mannequin
    More actions

    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?

  10. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  11. zware
    linked a pull request that will close this issuegh-72346: Added isdst deprecation warning to email.utils.localtime #91450on Apr 12, 2022
  12. serhiy-storchaka
    added
    topic-email
    on May 21, 2022
  13. 2 remaining items

  14. alanfwilliams
    added 5 commits that reference this issue on Sep 7, 2022

    Merge branch 'main' into fix-pythongh-72346

    89eb11a

    Merge branch 'fix-pythongh-72346' of https://github.com/aw1231/cpython …

    672b5e5

    Merge branch 'fix-pythongh-72346' of https://github.com/aw1231/cpython …

    c2b4c94

    Merge branch 'main' into fix-pythongh-72346

    54596ef

    Merge branch 'fix-pythongh-72346' of https://github.com/aw1231/cpython …

    ecc3bff
  15. alanfwilliams
    added a commit that references this issue on Oct 7, 2022

    Merge branch 'main' into fix-pythongh-72346

    8151b5a
  16. alanfwilliams
    added a commit that references this issue on Oct 21, 2022

    Merge branch 'main' into fix-pythongh-72346

    7ff165e
  17. zware
    closed this as completedin #91450on Mar 20, 2023
  18. zware
    added a commit that references this issue on Mar 20, 2023

    gh-72346: Added isdst deprecation warning to email.utils.localtime (G…

    5e6661b
  19. zware
    added
    3.12only security fixesonly security fixes
    and removed
    3.11only security fixesonly security fixes
    on Mar 20, 2023
  20. terryjreedy commented on Mar 20, 2023

    @terryjreedy
    terryjreedy
    on Mar 20, 2023
    Member
    More actions

    @aw1231 Thank you for sticking with the review process for a year to get this old issue to completion. Next time, please do not put gh-###### in the branch title as it triggers an unneeded duplicate report of every commit here on the issue. I believe anything else without gh- or a literal # prefix would not do this.

  21. alanfwilliams commented on Mar 20, 2023

    @alanfwilliams
    alanfwilliams
    on Mar 20, 2023
    Contributor
    More actions

    Thanks to you both! I forgot about this! I'll be sure to format the branch properly next time. Thanks again!

  22. Fidget-Spinner
    added a commit that references this issue on Mar 27, 2023

    pythongh-72346: Added isdst deprecation warning to email.utils.localt…

    7dab359
  23. warsaw
    added a commit that references this issue on Apr 11, 2023

    pythongh-72346: Added isdst deprecation warning to email.utils.localt…

    a715639
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesonly security fixeseasystdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-email

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.