@vercel/python 33.0.0 → 35.0.0-snapshot-c9dfd83f2293

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +15 -3
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -5634,6 +5634,9 @@ var UvRunner = class {
5634
5634
  } else if ("signal" in err) {
5635
5635
  error.code = err.signal;
5636
5636
  }
5637
+ if ("stderr" in err && typeof err.stderr === "string") {
5638
+ error.stderr = err.stderr;
5639
+ }
5637
5640
  }
5638
5641
  throw error;
5639
5642
  }
@@ -9688,6 +9691,15 @@ async function introspectSchedules({
9688
9691
  }
9689
9692
  }));
9690
9693
  } catch (err) {
9694
+ const traceback = err?.stderr?.trim();
9695
+ const exception = traceback?.split("\n").at(-1)?.trim();
9696
+ if (traceback && exception) {
9697
+ console.error(traceback);
9698
+ throw scheduleError(
9699
+ service,
9700
+ `importing module "${moduleName}" raised ${exception}. Its traceback is above.`
9701
+ );
9702
+ }
9691
9703
  const message = err instanceof Error ? err.message : String(err);
9692
9704
  throw scheduleError(
9693
9705
  service,
@@ -12281,12 +12293,12 @@ var import_path20 = require("path");
12281
12293
  var COMPILEALL_TIMEOUT_MS = 5 * 60 * 1e3;
12282
12294
  var PYCACHE_PREFIX_DIR = "_vc_pycache";
12283
12295
  var RUNTIME_PYCACHE_PREFIX = `/var/task/${PYCACHE_PREFIX_DIR}`;
12284
- function isCompileAllFlagEnabled() {
12296
+ function isCompileAllDisabledByEnv() {
12285
12297
  const val = process.env.VERCEL_PYTHON_COMPILEALL;
12286
12298
  if (val === void 0 || val === "")
12287
12299
  return false;
12288
12300
  const lower = val.toLowerCase();
12289
- return lower === "1" || lower === "true";
12301
+ return lower === "0" || lower === "false";
12290
12302
  }
12291
12303
  function shouldCompileAll({
12292
12304
  isDev,
@@ -12299,7 +12311,7 @@ function shouldCompileAll({
12299
12311
  return false;
12300
12312
  if (hasPreDeployCommand)
12301
12313
  return false;
12302
- return isCompileAllFlagEnabled();
12314
+ return !isCompileAllDisabledByEnv();
12303
12315
  }
12304
12316
  async function runCompileAll({
12305
12317
  pythonBin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "33.0.0",
3
+ "version": "35.0.0-snapshot-c9dfd83f2293",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -14,10 +14,10 @@
14
14
  "directory": "packages/python"
15
15
  },
16
16
  "dependencies": {
17
- "@vercel/python-analysis": "0.15.3"
17
+ "@vercel/python-analysis": "0.15.4"
18
18
  },
19
19
  "peerDependencies": {
20
- "@vercel/build-utils": "15.5.0"
20
+ "@vercel/build-utils": "15.7.0-snapshot-c9dfd83f2293"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@renovatebot/pep440": "4.2.1",
@@ -37,7 +37,7 @@
37
37
  "smol-toml": "1.5.2",
38
38
  "vitest": "4.1.10",
39
39
  "which": "3.0.0",
40
- "@vercel/build-utils": "15.5.0",
40
+ "@vercel/build-utils": "15.7.0-snapshot-c9dfd83f2293",
41
41
  "@vercel/error-utils": "2.2.1",
42
42
  "@vercel/python-runtime": "0.26.0"
43
43
  },