Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the python api in order to release none alpha versions #18

Open
samwillis opened this issue Nov 10, 2022 · 0 comments
Open

Fix the python api in order to release none alpha versions #18

samwillis opened this issue Nov 10, 2022 · 0 comments

Comments

@samwillis
Copy link
Owner

As our release versions match that of the bundled node we can't 1 update the API after we realise a none alpha version.

Therefore we need to ensure the API is fixed and will never change. I want to address these concerns first:

  • We wrap the subprocess run, call, and Popen commands, do we want to wrap any others? Is there a way to make it forward compatible by inspecting and automatically wrapping the subprocess api?

  • The path of the main 'node' command is available as from nodejs import node; node.path, this is nicely forward compatible. The other commands (npm, npx, corepack) do not currently make their path available as there are two different ways they work.

    • On Windows these are executables, and so we could easily make the path available
    • On Linux/Unix they are a js script that is run by node, this isn't easily made available as a path.

    The question is, do we convert path to a tuple in all cases (including for node), so for a simple executable it's just ('path/of/bin'), but for scripts it would be ('path/to/node', 'script/to/run')?
    This would ensure it's possible to retrieve the path/script and run with any other execution api.
    If we do this is there a better name then path? path_args, paths?

Footnotes

  1. It is technically possible to update a package on PyPI with the same version by changing the build number, we should reserve this for replacing broken wheels.

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

No branches or pull requests

1 participant