Skip to content

Commit 3f0aff8

Browse files
committed
deprecation warning for pypi page
1 parent 8d5e794 commit 3f0aff8

3 files changed

Lines changed: 29 additions & 15 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
SolveBio Python Client
55
======================
66

7+
# This package is deprecated. Please install and use quartzbio instead:
8+
9+
```bash
10+
pip install quartzbio
11+
```
12+
13+
**This package will no longer be maintained after March 31, 2026.**
14+
15+
**Migration guide: [https://github.com/quartzbio/quartzbio-python](https://github.com/quartzbio/quartzbio-python)**
16+
717
This is the SolveBio Python package and command-line interface (CLI).
818
This module is tested against Python 2.7, 3.6, 3.7, 3.8, 3.10, PyPy and PyPy3.
919

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
setup(
5656
name='solvebio',
5757
version=VERSION,
58-
description='The SolveBio Python client',
58+
description='The SolveBio Python client (DEPRECATED)',
5959
long_description=long_description,
6060
long_description_content_type='text/markdown',
6161
python_requires='>=3.8',
@@ -74,6 +74,7 @@
7474
'solvebio-recipes = recipes.sync_recipes:sync_recipes']
7575
},
7676
classifiers=[
77+
'Development Status :: 7 - Inactive',
7778
'Intended Audience :: Science/Research',
7879
'Operating System :: OS Independent',
7980
'Programming Language :: Python',

solvebio/__init__.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import os as _os
1515
import logging as _logging
16+
import warnings
1617
from typing import Literal
1718
from .help import open_help as _open_help
1819

@@ -101,39 +102,41 @@ def _set_cached_api_host(host):
101102
from .errors import SolveError
102103

103104

104-
_deprecation_notice_shown = False
105+
_deprecation_warning_shown = False
105106

106107

107108
def print_deprecation_notice():
108109
"""
109-
Prints the deprecation notice for the SolveBio Python client.
110+
Shows the deprecation warning for the SolveBio Python client.
110111
Only shows once per session to avoid repetition.
111112
"""
112-
global _deprecation_notice_shown
113+
global _deprecation_warning_shown
113114

114-
if _deprecation_notice_shown:
115+
if _deprecation_warning_shown:
115116
return
116117

117-
_deprecation_notice_shown = True
118+
_deprecation_warning_shown = True
118119

119-
print(
120-
"""
120+
message = """
121121
!!! Deprecation Notice
122122
123123
The SolveBio Python client is deprecated and will no longer be maintained after March 31, 2026.
124124
125125
We recommend migrating to the QuartzBio python client:
126126
https://github.com/quartzbio/quartzbio-python
127+
127128
"""
128-
)
129129

130130
if api_host is not None:
131-
print(
132-
f"""
133-
Or using the QuartzBio REST API:
134-
{api_host.replace(".api","")}/swagger
135-
"""
136-
)
131+
message += f"\nOr using the QuartzBio REST API: {api_host.replace('.api', '')}/swagger"
132+
133+
# Show warning and also print to ensure visibility
134+
warnings.warn(
135+
message,
136+
DeprecationWarning,
137+
stacklevel=2,
138+
)
139+
print(f"{message}")
137140

138141

139142
from .query import Query, BatchQuery, Filter, GenomicFilter

0 commit comments

Comments
 (0)