Skip to content

Commit 37bd0ea

Browse files
authored
More deprecations and several fixes for v1.5.1 (#318)
* resilience against devops api not returning keyspace/keyspaces in the GET databases/ID endpoint * changesfile * Consistent handling of deletedCount=-1 from the API (always returned as-is) * bump to 1.5.1 + deprecate all set_caller calls * remove ragstack detection * deprecate caller_name/_version in favor of callers everywhere; tests to augment still * callers is Sequence; adjusted test_admin_conversions * adapted test_collections x2 * split caller_x vs callers in all unit tests * callers deprecation and identity tests completed * docstring examples ditch caller_name/caller_version altogether * list_databases + async have options and pagination * remove stray comment * docstr and py3.8 compliant type * reshuffled client.py to endpoint-first/then id + code optimization * better handling of no-endpoint, no-id init params for client.py * WIP on reshuffling admin which retain id/region as a second option * admin reshuffled: get_db_admin, get[async]database allow endpt AND id * endpoint-first flows, remove constructor unwanted params; logic cleanup and adjust unit tests * client.py deprecates use of id in get[async]database * all tests pass * rework cursors: state is enum; aligned state names * deprecation of Cursor.retrieved * cursor: deprecate 'collection' property for 'data_source' * changesfile * take cassio dependency out (which also removes numpy)
1 parent ded2800 commit 37bd0ea

27 files changed

+2263
-1258
lines changed

CHANGES

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1-
master
2-
======
1+
v. 1.5.1
2+
========
3+
Switching to endpoint as the only/primary way of specifying databases:
4+
- AstraDBClient tolerates (deprecated, removal in 2.0) id[/region] in get_database
5+
- (internal-use constructors and utilities only accept API Endpoint)
6+
- AstraDBAdmin is the only place where id[/region] will remain an allowed path in 2.0
7+
- all tests adapted to reflect this simplification
8+
Admins: resilience against DevOps responses omitting 'keyspace'/'keyspaces'
9+
AstraDBAdmin: added filters and automatic pagination to [async_]list_databases
10+
Consistent handling of deletedCount=-1 from the API (always returned as-is)
11+
Cursors: alignment and rework
12+
- states are an enum; state names reworked for clarity (better cursor `__repr__`)
13+
- _copy and _to_sync methods always return a clean pristine cursor
14+
- "retrieved" property deprecated (removal 2.0). Use `consumed`.
15+
- "collection" property deprecated (removal 2.0). Use `data_source`.
16+
Deprecation of all `set_caller` (=> to be set at constructor-time) (removal in 2.0)
17+
Callers and user-agent string:
18+
- remove RAGStack automatic detection
19+
- Deprecate caller_name/caller_version parameters in favour of "callers" pair list
20+
- (minor) breaking change: passing only one of caller_name/caller_version to _copy/with_options will override the whole one-item callers pair list
321
Repo housekeeping
422
- using ruff for imports and formatting (instead of isort+black) by @cbornet
5-
- add ruff rules UP(pyupgrade)
23+
- add ruff rules UP(pyupgrade) by @cbornet
24+
- remove `cassio` unused dependency
625

726

827
v. 1.5.0

0 commit comments

Comments
 (0)