@vercel/python 2.0.6-canary.6 → 2.0.6-canary.7

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 +16 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3601,10 +3601,22 @@ const build = async ({ workPath, files: originalFiles, entrypoint, meta = {}, co
3601
3601
  try {
3602
3602
  const json = await readFile(path_1.join(pipfileLockDir, 'Pipfile.lock'), 'utf8');
3603
3603
  const obj = JSON.parse(json);
3604
- if (!meta.isDev && ((_b = (_a = obj === null || obj === void 0 ? void 0 : obj._meta) === null || _a === void 0 ? void 0 : _a.requires) === null || _b === void 0 ? void 0 : _b.python_version) === '3.6') {
3605
- pipPath = 'pip3.6';
3606
- pythonPath = 'python3.6';
3607
- pythonRuntime = 'python3.6';
3604
+ const version = (_b = (_a = obj === null || obj === void 0 ? void 0 : obj._meta) === null || _a === void 0 ? void 0 : _a.requires) === null || _b === void 0 ? void 0 : _b.python_version;
3605
+ if (!meta.isDev) {
3606
+ if (version === '3.6') {
3607
+ pipPath = 'pip3.6';
3608
+ pythonPath = 'python3.6';
3609
+ pythonRuntime = 'python3.6';
3610
+ console.warn(`Warning: Python version "${version}" detected in Pipfile.lock will reach End-Of-Life December 2021. Please upgrade. http://vercel.link/python-version`);
3611
+ }
3612
+ else if (version === '3.9') {
3613
+ pipPath = 'pip3.9';
3614
+ pythonPath = 'python3.9';
3615
+ pythonRuntime = 'python3.9';
3616
+ }
3617
+ else {
3618
+ console.warn(`Warning: Invalid Python version "${version}" detected in Pipfile.lock will be ignored. http://vercel.link/python-version`);
3619
+ }
3608
3620
  }
3609
3621
  }
3610
3622
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "2.0.6-canary.6",
3
+ "version": "2.0.6-canary.7",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -24,5 +24,5 @@
24
24
  "execa": "^1.0.0",
25
25
  "typescript": "4.3.4"
26
26
  },
27
- "gitHead": "4aa6a139127e4e57469d4b6785546ccb49ca188b"
27
+ "gitHead": "f4501433c85f3f16466ef7f450c6b9213d2e1ef7"
28
28
  }