Files
zeekay 75dd1132bd rename: zero ClickHouse — datastore_connect speaks X-Datastore-*
The wire protocol was the last holdout and it was not cosmetic: the Hanzo
Datastore server reads X-Datastore-User, and answers a request bearing
X-ClickHouse-User with 401. Verified against the live server, both directions.
So a client still sending the old headers is not merely off-brand, it cannot
authenticate over HTTP.

Everything else follows: types, dialects, error modules, docstrings and doc
links now name Datastore, and doc URLs point at docs.hanzo.ai/datastore rather
than the upstream vendor's site. Zero occurrences of the old name remain.

Still cut from the pinned upstream version, so behaviour is unchanged.
2026-07-26 11:06:05 -07:00

39 lines
1.1 KiB
Python
Executable File

#!/usr/bin/env python3
# This script is used for validating installed entrypoints. Note that it fails on Python 3.7
import sys
from importlib.metadata import PackageNotFoundError, distribution
EXPECTED_EPS = {'sqlalchemy.dialects:datastoredb',
'sqlalchemy.dialects:datastoredb.connect'}
def validate_entrypoints():
expected_eps = EXPECTED_EPS.copy()
try:
dist = distribution('datastore-connect')
except PackageNotFoundError:
print ('\nDatastore Connect package not found in this Python installation')
return -1
print()
for entry_point in dist.entry_points:
name = f'{entry_point.group}:{entry_point.name}'
print(f' {name}={entry_point.value}')
try:
expected_eps.remove(name)
except KeyError:
print (f'\nUnexpected entry point {name} found')
return -1
if expected_eps:
print()
for name in expected_eps:
print (f'Did not find expected ep {name}')
return -1
print ('\nEntrypoints correctly installed')
return 0
if __name__ == '__main__':
sys.exit(validate_entrypoints())