DiamondLightSource / DiamondLightSource/ispyb-api

Using `ispyb.open` causes ispyb.model deprecation warning

Open
#179 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
11
PR merge metrics
No merged PRs in 30d

Description

`ispyb.open` imports: https://github.com/DiamondLightSource/ispyb-api/blob/8c952b522622e29340ddafd7fb67161abaf72f0a/src/ispyb/__init__.py#L51

This imports `ispyb.interface.connection`:
https://github.com/DiamondLightSource/ispyb-api/blob/8c952b522622e29340ddafd7fb67161abaf72f0a/src/ispyb/connector/mysqlsp/main.py#L12

and this imports `ispyb.model`: https://github.com/DiamondLightSource/ispyb-api/blob/8c952b522622e29340ddafd7fb67161abaf72f0a/src/ispyb/interface/connection.py#L4

Thus, you cannot use `ispyb.open` without getting the warning:
https://github.com/DiamondLightSource/ispyb-api/blob/8c952b522622e29340ddafd7fb67161abaf72f0a/src/ispyb/model/__init__.py#L3-L8

Are _all_ non-sqlalchemy connection deprecated, or just `ispyb.model`? (AFAIK the sqlalchemy credentials don't have stored procedure access or insertion/update permissions, to get the same results - the credentials I am aware of can only see the `update_session_archived` procedure)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.