@vercel/python 6.56.1 → 6.56.2

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 +24 -2
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -5032,7 +5032,7 @@ var import_fs20 = __toESM(require("fs"));
5032
5032
  var import_path21 = require("path");
5033
5033
 
5034
5034
  // src/package-versions.ts
5035
- var VERCEL_RUNTIME_VERSION = "0.19.0";
5035
+ var VERCEL_RUNTIME_VERSION = "0.20.0";
5036
5036
  var VERCEL_WORKERS_VERSION = "0.0.25";
5037
5037
 
5038
5038
  // src/conditional-vendoring.ts
@@ -6939,12 +6939,24 @@ functions.`,
6939
6939
  action: "Learn More"
6940
6940
  });
6941
6941
  }
6942
+ const toolingFiles = {};
6943
+ for (const key of [
6944
+ `${UV_BUNDLE_DIR}/uv`,
6945
+ `${UV_BUNDLE_DIR}/_runtime_config.json`,
6946
+ `${UV_BUNDLE_DIR}/pyproject.toml`,
6947
+ `${UV_BUNDLE_DIR}/uv.lock`
6948
+ ]) {
6949
+ if (files[key])
6950
+ toolingFiles[key] = files[key];
6951
+ }
6952
+ const runtimeToolingBytes = await calculateBundleSize(toolingFiles);
6942
6953
  return {
6943
6954
  fellBackToFullBundle: false,
6944
6955
  packingMode,
6945
6956
  alwaysBundledPackages: alwaysBundled,
6946
6957
  bundledPublicPackages: bundledPublic,
6947
- externalizedPublicPackages: externalizedPublic
6958
+ externalizedPublicPackages: externalizedPublic,
6959
+ runtimeToolingBytes
6948
6960
  };
6949
6961
  }
6950
6962
  /**
@@ -11232,10 +11244,15 @@ import os
11232
11244
  import os.path
11233
11245
  import site
11234
11246
  import sys
11247
+ import time
11248
+
11249
+ # Cold start baseline, read back by vercel_runtime.vc_init
11250
+ _vc_boot_start_ms = int(time.monotonic() * 1000)
11235
11251
 
11236
11252
  _here = os.path.dirname(__file__)
11237
11253
 
11238
11254
  os.environ.update({
11255
+ "__VC_PY_BOOT_START_MS": str(_vc_boot_start_ms),
11239
11256
  "__VC_HANDLER_MODULE_NAME": "${moduleName}",
11240
11257
  "__VC_HANDLER_ENTRYPOINT": "${entrypoint}",
11241
11258
  "__VC_HANDLER_ENTRYPOINT_ABS": os.path.join(_here, "${entrypoint}"),
@@ -12177,12 +12194,14 @@ var build = async ({
12177
12194
  `Function "${entrypoint ?? rawEntrypoint}" exceeds the standard size limit; enabling large functions (beta).`
12178
12195
  );
12179
12196
  let packingMode;
12197
+ let runtimeToolingBytes = 0;
12180
12198
  if (depAnalysis.runtimeInstallEnabled) {
12181
12199
  packingMode = "runtime-install";
12182
12200
  const bytecodeFirst = compileAllEnabled && pythonVersion.major != null && pythonVersion.minor != null;
12183
12201
  const bundleResult = await depExternalizer.generateBundle(files, {
12184
12202
  bytecodeFirst
12185
12203
  });
12204
+ runtimeToolingBytes = bundleResult.runtimeToolingBytes ?? 0;
12186
12205
  if (bundleResult.fellBackToFullBundle) {
12187
12206
  packingMode = "hive";
12188
12207
  announceLargeFunction();
@@ -12231,6 +12250,9 @@ var build = async ({
12231
12250
  }
12232
12251
  bundleSpan.setAttributes({
12233
12252
  "python.bundle.totalSizeBytes": String(
12253
+ depAnalysis.totalBundleSize + runtimeToolingBytes
12254
+ ),
12255
+ "python.bundle.shippedSizeBytes": String(
12234
12256
  await calculateBundleSize(files)
12235
12257
  ),
12236
12258
  "python.bundle.packingMode": packingMode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "6.56.1",
3
+ "version": "6.56.2",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -35,9 +35,9 @@
35
35
  "smol-toml": "1.5.2",
36
36
  "vitest": "4.1.10",
37
37
  "which": "3.0.0",
38
- "@vercel/build-utils": "14.0.5",
39
- "@vercel/python-runtime": "0.19.0",
40
- "@vercel/error-utils": "2.2.1"
38
+ "@vercel/error-utils": "2.2.1",
39
+ "@vercel/python-runtime": "0.20.0",
40
+ "@vercel/build-utils": "14.0.5"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "node ../../utils/build-builder.mjs",