@vercel/python 2.2.3-canary.1 → 2.2.3-canary.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.
package/dist/vc_init.py CHANGED
@@ -16,7 +16,7 @@ __vc_variables = dir(__vc_module)
16
16
  def format_headers(headers, decode=False):
17
17
  keyToList = {}
18
18
  for key, value in headers.items():
19
- if decode:
19
+ if decode and 'decode' in dir(key) and 'decode' in dir(value):
20
20
  key = key.decode()
21
21
  value = value.decode()
22
22
  if key not in keyToList:
@@ -102,7 +102,7 @@ elif 'app' in __vc_variables:
102
102
  if isinstance(s, str):
103
103
  s = s.encode(charset)
104
104
  return s.decode("latin1", errors)
105
-
105
+
106
106
  def vc_handler(event, context):
107
107
  payload = json.loads(event['body'])
108
108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "2.2.3-canary.1",
3
+ "version": "2.2.3-canary.4",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/execa": "^0.9.0",
23
- "@vercel/build-utils": "2.15.2-canary.1",
23
+ "@vercel/build-utils": "2.15.2-canary.4",
24
24
  "@vercel/ncc": "0.24.0",
25
25
  "execa": "^1.0.0",
26
26
  "typescript": "4.3.4"
27
27
  },
28
- "gitHead": "71b83d5587b549a1458697b50596a5534cb783d3"
28
+ "gitHead": "466135cf84d0346294645251034ad6aaf89928b8"
29
29
  }
package/vc_init.py CHANGED
@@ -16,7 +16,7 @@ __vc_variables = dir(__vc_module)
16
16
  def format_headers(headers, decode=False):
17
17
  keyToList = {}
18
18
  for key, value in headers.items():
19
- if decode:
19
+ if decode and 'decode' in dir(key) and 'decode' in dir(value):
20
20
  key = key.decode()
21
21
  value = value.decode()
22
22
  if key not in keyToList:
@@ -102,7 +102,7 @@ elif 'app' in __vc_variables:
102
102
  if isinstance(s, str):
103
103
  s = s.encode(charset)
104
104
  return s.decode("latin1", errors)
105
-
105
+
106
106
  def vc_handler(event, context):
107
107
  payload = json.loads(event['body'])
108
108