Skip to content

Commit a0a62f8

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): use different 32bit detection method (#477)
1 parent 40d9aea commit a0a62f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/finch/_base_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import sys
34
import json
45
import time
56
import uuid
@@ -2011,7 +2012,6 @@ def get_python_version() -> str:
20112012

20122013
def get_architecture() -> Arch:
20132014
try:
2014-
python_bitness, _ = platform.architecture()
20152015
machine = platform.machine().lower()
20162016
except Exception:
20172017
return "unknown"
@@ -2027,7 +2027,7 @@ def get_architecture() -> Arch:
20272027
return "x64"
20282028

20292029
# TODO: untested
2030-
if python_bitness == "32bit":
2030+
if sys.maxsize <= 2**32:
20312031
return "x32"
20322032

20332033
if machine:

0 commit comments

Comments
 (0)