Skip to content

Commit

Permalink
More deprecations and several fixes for v1.5.1 (#318)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
hemidactylus authored Oct 8, 2024
1 parent ded2800 commit 37bd0ea
Show file tree
Hide file tree
Showing 27 changed files with 2,263 additions and 1,258 deletions.
25 changes: 22 additions & 3 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
master
======
v. 1.5.1
========
Switching to endpoint as the only/primary way of specifying databases:
- AstraDBClient tolerates (deprecated, removal in 2.0) id[/region] in get_database
- (internal-use constructors and utilities only accept API Endpoint)
- AstraDBAdmin is the only place where id[/region] will remain an allowed path in 2.0
- all tests adapted to reflect this simplification
Admins: resilience against DevOps responses omitting 'keyspace'/'keyspaces'
AstraDBAdmin: added filters and automatic pagination to [async_]list_databases
Consistent handling of deletedCount=-1 from the API (always returned as-is)
Cursors: alignment and rework
- states are an enum; state names reworked for clarity (better cursor `__repr__`)
- _copy and _to_sync methods always return a clean pristine cursor
- "retrieved" property deprecated (removal 2.0). Use `consumed`.
- "collection" property deprecated (removal 2.0). Use `data_source`.
Deprecation of all `set_caller` (=> to be set at constructor-time) (removal in 2.0)
Callers and user-agent string:
- remove RAGStack automatic detection
- Deprecate caller_name/caller_version parameters in favour of "callers" pair list
- (minor) breaking change: passing only one of caller_name/caller_version to _copy/with_options will override the whole one-item callers pair list
Repo housekeeping
- using ruff for imports and formatting (instead of isort+black) by @cbornet
- add ruff rules UP(pyupgrade)
- add ruff rules UP(pyupgrade) by @cbornet
- remove `cassio` unused dependency


v. 1.5.0
Expand Down
Loading

0 comments on commit 37bd0ea

Please sign in to comment.