Commit cd8c3a3d

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2024-08-16 04:19:37
chore(internal): use different 32bit detection method (#1652)
1 parent c58a0a4
Changed files (1)
src
src/openai/_base_client.py
@@ -1,5 +1,6 @@
 from __future__ import annotations
 
+import sys
 import json
 import time
 import uuid
@@ -2012,7 +2013,6 @@ def get_python_version() -> str:
 
 def get_architecture() -> Arch:
     try:
-        python_bitness, _ = platform.architecture()
         machine = platform.machine().lower()
     except Exception:
         return "unknown"
@@ -2028,7 +2028,7 @@ def get_architecture() -> Arch:
         return "x64"
 
     # TODO: untested
-    if python_bitness == "32bit":
+    if sys.maxsize <= 2**32:
         return "x32"
 
     if machine: