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 — [RFC] module state for PyModule or builtin module · Issue #4054 · RustPython/RustPython

[RFC] module state for PyModule or builtin module #4054

Copy link
Copy link
Open
Open
[RFC] module state for PyModule or builtin module#4054
Copy link
Assignees
youknowonecopilot-swe-agent
Labels
RFCRequest for commentsRequest for comments

Description

@youknowone
youknowone
opened on Aug 13, 2022
Issue body actions

Summary

related CPython function: PyModule_GetState
We are handling them with sometimes module attr and the other times static variable.

Detailed Explanation

Drawbacks, Rationale, and Alternatives

Unresolved Questions

Reacted by Copilot

Activity

  1. youknowone
    added
    RFCRequest for commentsRequest for comments
    on Aug 13, 2022
  2. bongjunj commented on Nov 3, 2022

    @bongjunj
    bongjunj
    on Nov 3, 2022
    Contributor
    More actions

    Related CPython implementations:

    https://github.com/python/cpython/blob/32f0c8271706550096c454eb512450b85fbfc320/Include/internal/pycore_moduleobject.h#L11-L29

    https://github.com/python/cpython/blob/5fd8c574e016aec85725ddc5ced8742267b0e1b3/Modules/_sha3/sha3module.c#L42-L57


    In C, module state are declared at each module as below:

    typedef struct {
      PyObject * some_state;
    } _module_state;

    And, a pointer to a module state is typically void *.

    Reacted by Jeong, YunWon
  3. youknowone
    assigned
    Copilot
    and
    youknowone
    on Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • Copilot
  • @youknowone
    youknowone

Labels

RFCRequest for commentsRequest for comments

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.