Skip to content

Commit

Permalink
Fully remove deprecated api_client instance
Browse files Browse the repository at this point in the history
This has been deprecated since v13.1.0, and all in-library references to
it have been cleaned up. No downstream code should be relying on this
instance.
  • Loading branch information
jacksonj04 committed Nov 28, 2023
1 parent 077b646 commit 00846de
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 34 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog 1.0.0].

## [Unreleased]

- **Breaking:**: Fully remove the deprecated `caselawclient.api_client` instance.

## [Release 17.3.0]

- **Feature:** `Document.enrich()` method will send a message to the announce SNS, requesting that a document be enriched.
Expand Down
14 changes: 0 additions & 14 deletions src/caselawclient/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,17 +951,3 @@ def get_combined_stats_table(self) -> list[list[Any]]:
)

return results


api_client = MarklogicApiClient(
host=env("MARKLOGIC_HOST", default=None),
username=env("MARKLOGIC_USER", default=None),
password=env("MARKLOGIC_PASSWORD", default=None),
use_https=env("MARKLOGIC_USE_HTTPS", default=False),
)
"""
An instance of the API client which is automatically initialised on importing the library.
.. deprecated:: 13.0.1
You should instead initialise your own instance of `MarklogicApiClient`
"""
20 changes: 0 additions & 20 deletions src/caselawclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,4 @@
```
## (Deprecated) Use in-library client instance
This library will automatically initialise an instance of the client. This functionality is deprecated, and will be
removed.
The client expects the following environment variables to be set or defined in a `.env` file:
```bash
MARKLOGIC_HOST
MARKLOGIC_USER
MARKLOGIC_PASSWORD
MARKLOGIC_USE_HTTPS # Optional, defaults to False
```
Then import `api_client` from `caselawclient.Client`:
```python
from caselawclient.Client import api_client
```
"""

0 comments on commit 00846de

Please sign in to comment.