Skip to content

Commit

Permalink
Fail on client instantiation if base_url is None or empty string (#1536)
Browse files Browse the repository at this point in the history
  • Loading branch information
erlendvollset authored Dec 1, 2023
1 parent 296353c commit f147ab5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [7.5.1] - 2023-12-01
### Changed
- Raise an exception if `ClientConfig:base_url` is set to `None` or an empty string

## [7.5.0] - 2023-11-30
### Added
- `chain_to` to `NodeResultSetExpression` and `NodeResultSetExpression`, and `direction` to `NodeResultSetExpression`.
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__version__ = "7.5.0"
__version__ = "7.5.1"
__api_subversion__ = "V20220125"
2 changes: 2 additions & 0 deletions cognite/client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def debug(self, value: bool) -> None:
def _validate_config(self) -> None:
if not self.project:
raise ValueError(f"Invalid value for ClientConfig.project: <{self.project}>")
if not self.base_url:
raise ValueError(f"Invalid value for ClientConfig.base_url: <{self.base_url}>")

def __str__(self) -> str:
return pprint.pformat(self.__dict__, indent=4)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "cognite-sdk"

version = "7.5.0"
version = "7.5.1"
description = "Cognite Python SDK"
readme = "README.md"
documentation = "https://cognite-sdk-python.readthedocs-hosted.com"
Expand Down

0 comments on commit f147ab5

Please sign in to comment.