Pin Psycopg Binary packages to 3.1.19 for the ARM64 MacOS platform wheel packages.

This commit is contained in:
Khushboo Vashi 2024-07-10 17:43:13 +05:30
parent cd6ff48cc0
commit 6b012193e3
2 changed files with 8 additions and 2 deletions

View File

@ -10,6 +10,7 @@
import builtins
import os
import sys
import platform
from codecs import open
from importlib.machinery import SourceFileLoader
@ -40,7 +41,13 @@ kerberos_extras = []
# gssapi in it's own list
for index, req in enumerate(all_requires):
if 'psycopg[c]' in req:
req = req.replace('psycopg[c]', 'psycopg[binary]')
# Starting from Psycopg 3.1.20, ARM64 macOS binary packages are no
# longer available for macOS versions before 14.0.
if platform.system() == 'Darwin' and 'arm' in platform.processor()\
and platform.mac_ver()[0] < '14.0':
req = 'psycopg[binary]==3.1.19'
else:
req.replace('psycopg[c]', 'psycopg[binary]')
if 'gssapi' in req:
kerberos_extras.append(req)

View File

@ -228,7 +228,6 @@ def validate_binary_path():
running the utilities with their versions.
"""
data = None
return precondition_required(gettext('Invalid binary path.'))
if hasattr(request.data, 'decode'):
data = request.data.decode('utf-8')