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 — locale support including _locale and time.tzname · Issue #3850 · RustPython/RustPython

locale support including _locale and time.tzname #3850

New issue
Copy link
New issue
Copy link
Closed
Closed
locale support including _locale and time.tzname#3850
Copy link
Labels
A-stdlib

Description

@youknowone
youknowone
opened on Jul 8, 2022
Issue body actions
  • _locale module Add localeconv function to locale module #4558
  • time.tzname

Activity

  1. youknowone
    added
    A-stdlib
    on Jul 8, 2022
  2. bongjunj commented on Nov 2, 2022

    @bongjunj
    bongjunj
    on Nov 2, 2022
    Contributor
    More actions

    https://docs.python.org/3/library/time.html#time.tzname

    The doc says tzname is determined at module load time. Does "module load time" mean those values to be initialized in the function below?

    RustPython/vm/src/stdlib/time.rs

    Lines 9 to 17 in 77b821a

    pub(crate) fn make_module(vm: &VirtualMachine) -> PyObjectRef {
    let module = time::make_module(vm);
    #[cfg(unix)]
    unix::extend_module(vm, &module);
    #[cfg(windows)]
    windows::extend_module(vm, &module);
    module
    }

  3. bongjunj commented on Nov 2, 2022

    @bongjunj
    bongjunj
    on Nov 2, 2022
    Contributor
    More actions

    #4054

    If we are talking about holding states such as tzname (which is initialized at module load time), this can be related.

  4. youknowone commented on Nov 5, 2022

    @youknowone
    youknowone
    on Nov 5, 2022
    MemberAuthor
    More actions

    The doc says tzname is determined at module load time. Does "module load time" mean those values to be initialized in the function below?

    It may not be exactly, but you can regard it is.

  5. youknowone commented on Nov 5, 2022

    @youknowone
    youknowone
    on Nov 5, 2022
    MemberAuthor
    More actions

    And yes. #4054 is generally related to module attributes and hidden data like Info types in sys module.

  6. JazzGlobal commented on Apr 18, 2023

    @JazzGlobal
    JazzGlobal
    on Apr 18, 2023
    Contributor
    More actions

    Noticed quite a few functions in CPython Locale are not implemented in locale.rs. I don't have much experience with this type of work but would the general idea be to write a wrapper for say: GetLocaleIInfoA since it is used throughout CPython's implementation of getdefaultlocale so it can be used in our implementation?

  7. DimitrisJim commented on Apr 18, 2023

    @DimitrisJim
    DimitrisJim
    on Apr 18, 2023
    Member
    More actions

    You are on Windows right? I haven't looked into how CPython does it (am out atm) but if this is calling some os provided function then yes, we typically wrap it and call into it after converting the args.

    The function to be wrapped should be in windows.rs?

    Reacted by Christopher Gambrell
  8. JazzGlobal commented on Apr 18, 2023

    @JazzGlobal
    JazzGlobal
    on Apr 18, 2023
    Contributor
    More actions

    That's right, and gotcha. Looks like libc has bindings for setlocale but that's all im seeing

    EDIT: Not all obviously, but no binding for getlocale .

  9. arihant2math commented on Mar 3, 2025

    @arihant2math
    arihant2math
    on Mar 3, 2025
    Contributor
    More actions

    time.tzname is now supported on all desktop platforms

  10. youknowone commented on Dec 25, 2025

    @youknowone
    youknowone
    on Dec 25, 2025
    MemberAuthor
    More actions

    Great, both of the list done

  11. youknowone
    closed this as completedon Dec 25, 2025
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

    A-stdlib

    Type

    No type

    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.