Skip to content

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Feb 15, 2025

  • Adds details on python-config and testbed
  • Adds a bare bones interpreter instantiation example
  • Clarifies the difference between instantiating the interpreter, and accessing the Python API with PythonKit

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@freakboy3742 freakboy3742 merged commit 2f2f220 into main Feb 17, 2025
5 checks passed
@freakboy3742 freakboy3742 deleted the pythonkit branch February 17, 2025 06:38
@frogcjn
Copy link

frogcjn commented Feb 17, 2025

date time should be explicit include as submodule, since the umbrella header did not import it, and most developer may need this datetime module.

datetime header error

If you add datetime in the module map, developers could import datetime as submodule like import Python.datetime to use it.

    explicit module datetime {
      header "datetime.h"
      export *
    }

datetime header content

I also suggest to include these submodules

    explicit module datetime {
      header "datetime.h"
      export *
    }

    explicit module errcode {
      header "errcode.h"
      export *
    }

    explicit module frameobject {
      header "frameobject.h"
      export *
    }

    explicit module marshal {
      header "marshal.h"
      export *
    }

    explicit module opcode {
      header "opcode.h"
      export *
    }

    explicit module osdefs {
      header "osdefs.h"
      export *
    }

    explicit module py_curses {
      header "py_curses.h"
      export *
    }

    explicit module pythread {
      header "pythread.h"
      export *
    }

    explicit module structmember {
      header "structmember.h"
      export *
    }

    explicit module structseq {
      header "structseq.h"
      export *
    }
    ```
    

@freakboy3742
Copy link
Member Author

Once again - commenting on a closed ticket doesn't really help move a discussion forward. If you think there is something additional required, please open a ticket and/or a pull request to add the change you are proposing.

In this specific case - you may also want to add why the change is needed. I understand that import Python.datetime won't be possible... but why should it be? What decision process has driven the 10 specific explicit exports you've added here?

freakboy3742 added a commit that referenced this pull request Feb 19, 2025
* Adds details on `python-config` and `testbed`
* Adds a bare bones interpreter instantiation example
* Clarifies the difference between instantiating the interpreter, and accessing the Python API with PythonKit
* Adds header exclusions to the modulemap to silence build warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants