Comparing version 0.19.0-alpha.1 to 0.19.0
26
api.js
@@ -288,22 +288,22 @@ import { Module } from "./module.js"; | ||
* Imports a module and returns it. | ||
* Warning: this function has a completely different behavior than the old removed pyimport function! | ||
* ``pyimport`` is roughly equivalent to: | ||
* | ||
* .. code-block:: pyodide | ||
* .. admonition:: Warning | ||
* :class: warning | ||
* | ||
* This function has a completely different behavior than the old removed pyimport function! | ||
* | ||
* ``pyimport`` is roughly equivalent to: | ||
* | ||
* .. code-block:: js | ||
* | ||
* pyodide.runPython(`import ${pkgname}; ${pkgname}`); | ||
* | ||
* except that the global namespace will not change. | ||
* Example: | ||
* except that the global namespace will not change. | ||
* | ||
* .. code-block:: pyodide | ||
* Example: | ||
* | ||
* let sysmodule = pyodide.pyimport("sys"); | ||
* let recursionLimit = sys.getrecursionlimit(); | ||
* .. code-block:: js | ||
* | ||
* The best way to run Python code with Pyodide is | ||
* 1. write a Python package, | ||
* 2. load your Python package into the Pyodide (Emscripten) file system, | ||
* 3. import the package with `let mypkg = pyodide.pyimport("mypkgname")`, | ||
* 4. call into your package with `mypkg.some_api(some_args)`. | ||
* let sysmodule = pyodide.pyimport("sys"); | ||
* let recursionLimit = sys.getrecursionlimit(); | ||
* | ||
@@ -310,0 +310,0 @@ * @param {string} mod_name The name of the module to import |
{ | ||
"name": "pyodide", | ||
"version": "0.19.0-alpha.1", | ||
"version": "0.19.0", | ||
"description": "The Pyodide JavaScript package", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -107,5 +107,5 @@ /** | ||
/** | ||
* @private | ||
* Just like `runPython` except uses a different globals dict and gets | ||
* `eval_code` from `_pyodide` so that it can work before `pyodide` is imported. | ||
* @private | ||
*/ | ||
@@ -117,3 +117,2 @@ Module.runPythonInternal = function (code) { | ||
/** | ||
* @private | ||
* A proxy around globals that falls back to checking for a builtin if has or | ||
@@ -123,2 +122,3 @@ * get fails to find a global with the given key. Note that this proxy is | ||
* will translate this proxy to the globals dictionary. | ||
* @private | ||
*/ | ||
@@ -174,3 +174,2 @@ function wrapPythonGlobals(globals_dict, builtins_dict) { | ||
/** | ||
* @private | ||
* This function is called after the emscripten module is finished initializing, | ||
@@ -180,2 +179,3 @@ * so eval_code is newly available. | ||
* the core `pyodide` apis. (But package loading is not ready quite yet.) | ||
* @private | ||
*/ | ||
@@ -182,0 +182,0 @@ function finalizeBootstrap(config) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4
94318