@vercel/python 13.0.3 → 13.0.4

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 +8 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -5086,6 +5086,7 @@ var UPSTREAM_DEPENDENCY_ADAPTERS = /* @__PURE__ */ new Map([
5086
5086
  }
5087
5087
  ]
5088
5088
  ]);
5089
+ var QUEUE_ADAPTER_SHARED_VENDORED_DEPS_PIN = "vercel-internal-shared-vendored-deps==0.1.1";
5089
5090
  async function getQueueAdapterBootstrap({
5090
5091
  pythonPackage,
5091
5092
  env,
@@ -5115,6 +5116,7 @@ async function getQueueAdapterBootstrap({
5115
5116
  injectedPackages.push({
5116
5117
  name,
5117
5118
  requirement: name,
5119
+ extraRequirements: name.endsWith("-bundle") ? [QUEUE_ADAPTER_SHARED_VENDORED_DEPS_PIN] : [],
5118
5120
  envOverride: env[adapter.envOverride],
5119
5121
  allowLocalSource: false
5120
5122
  });
@@ -9170,11 +9172,13 @@ async function doInstallInjectedDevPackage(pkg, opts) {
9170
9172
  );
9171
9173
  const pip = uvPath ? { cmd: uvPath, prefix: ["pip", "install"] } : { cmd: pythonBin, prefix: ["-m", "pip", "install"] };
9172
9174
  const excludeOverride = uvPath ? ["--exclude-newer-package", `${pkg.name}=false`] : [];
9175
+ const extras = pkg.envOverride || isLocalDev ? [] : pkg.extraRequirements ?? [];
9173
9176
  const spawnArgs = [
9174
9177
  ...pip.prefix,
9175
9178
  "--target",
9176
9179
  targetDir,
9177
9180
  ...excludeOverride,
9181
+ ...extras,
9178
9182
  dep
9179
9183
  ];
9180
9184
  await new Promise((resolve4, reject) => {
@@ -9532,6 +9536,7 @@ If you are using a virtual environment, activate it before running "vercel dev",
9532
9536
  {
9533
9537
  name: injectedPackage.name,
9534
9538
  requirement: injectedPackage.requirement,
9539
+ extraRequirements: injectedPackage.extraRequirements,
9535
9540
  envOverride: injectedPackage.envOverride
9536
9541
  },
9537
9542
  devOpts
@@ -11611,6 +11616,7 @@ async function getPythonLambdaOptions({
11611
11616
  async function installInjectedPackage({
11612
11617
  name,
11613
11618
  requirement,
11619
+ extraRequirements = [],
11614
11620
  envOverride,
11615
11621
  allowLocalSource,
11616
11622
  uv,
@@ -11621,6 +11627,7 @@ async function installInjectedPackage({
11621
11627
  const localDir = (0, import_path21.join)(__dirname, "..", "..", "..", "python", name);
11622
11628
  const isLocalDev = allowLocalSource && import_fs20.default.existsSync((0, import_path21.join)(localDir, "pyproject.toml"));
11623
11629
  const dep = envOverride || (isLocalDev ? localDir : requirement);
11630
+ const extras = envOverride || isLocalDev ? [] : extraRequirements;
11624
11631
  const noExclude = ["--exclude-newer-package", `${name}=false`];
11625
11632
  (0, import_build_utils24.debug)(`Installing ${dep}`);
11626
11633
  await uv.pip({
@@ -11632,6 +11639,7 @@ async function installInjectedPackage({
11632
11639
  "copy",
11633
11640
  ...pipPlatformArgs,
11634
11641
  ...noExclude,
11642
+ ...extras,
11635
11643
  dep
11636
11644
  ]
11637
11645
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "13.0.3",
3
+ "version": "13.0.4",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -39,8 +39,8 @@
39
39
  "vitest": "4.1.10",
40
40
  "which": "3.0.0",
41
41
  "@vercel/build-utils": "14.9.3",
42
- "@vercel/python-runtime": "0.22.1",
43
- "@vercel/error-utils": "2.2.1"
42
+ "@vercel/error-utils": "2.2.1",
43
+ "@vercel/python-runtime": "0.22.1"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "node ../../utils/build-builder.mjs",