Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [0.6.0] -

### Breaking changes :wrench:

#### Object store methods

No breaking changes.

#### Store constructors

- In the `AzureStore` constructor, the `container` positional argument was renamed to `container_name` to match the `container_name` key in `AzureConfig`.

This is a breaking change if you had been calling `AzureStore(container="my container name")`. This is not breaking if you had been using it as a positional argument `AzureStore("my container name")` or if you had already been using `AzureStore(container_name="my container name")`.

The idea here is that we want one and only one argument name for each underlying config parameter. Most of these breaking changes took place in 0.5.0, but this was overlooked.


## [0.5.1] - 2025-03-17

### Bug fixes :bug:
Expand Down
6 changes: 3 additions & 3 deletions obstore/python/obstore/_store/_azure.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -326,19 +326,19 @@ class AzureStore:

def __init__(
self,
container: str | None = None,
container_name: str | None = None,
*,
prefix: str | None = None,
config: AzureConfig | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
credential_provider: AzureCredentialProvider | None = None,
**kwargs: Unpack[AzureConfig],
**kwargs: Unpack[AzureConfig], # type: ignore[GeneralTypeIssues] (container_name key overlaps with positional arg)
) -> None:
"""Construct a new AzureStore.

Args:
container: the name of the container.
container_name: the name of the container.

Keyword Args:
prefix: A prefix within the bucket to use for all operations.
Expand Down
14 changes: 14 additions & 0 deletions pyo3-object_store/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [0.3.0] -

### Breaking changes :wrench:

#### Store constructors

- In the `AzureStore` constructor, the `container` positional argument was renamed to `container_name` to match the `container_name` key in `AzureConfig`.

This is a breaking change if you had been calling `AzureStore(container="my container name")`. This is not breaking if you had been using it as a positional argument `AzureStore("my container name")` or if you had already been using `AzureStore(container_name="my container name")`.

## [0.2.0] - 2025-03-14

- Bump to pyo3 0.24.

## [0.1.0] - 2025-03-14

- Initial release.
8 changes: 4 additions & 4 deletions pyo3-object_store/src/azure/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ impl PyAzureStore {
impl PyAzureStore {
// Create from parameters
#[new]
#[pyo3(signature = (container=None, *, prefix=None, config=None, client_options=None, retry_config=None, credential_provider=None, **kwargs))]
#[pyo3(signature = (container_name=None, *, prefix=None, config=None, client_options=None, retry_config=None, credential_provider=None, **kwargs))]
fn new(
container: Option<String>,
container_name: Option<String>,
prefix: Option<PyPath>,
config: Option<PyAzureConfig>,
client_options: Option<PyClientOptions>,
Expand All @@ -95,10 +95,10 @@ impl PyAzureStore {
) -> PyObjectStoreResult<Self> {
let mut builder = MicrosoftAzureBuilder::from_env();
let mut config = config.unwrap_or_default();
if let Some(container) = container.clone() {
if let Some(container_name) = container_name {
// Note: we apply the bucket to the config, not directly to the builder, so they stay
// in sync.
config.insert_raising_if_exists(AzureConfigKey::ContainerName, container)?;
config.insert_raising_if_exists(AzureConfigKey::ContainerName, container_name)?;
}
let combined_config = combine_config_kwargs(Some(config), kwargs)?;
builder = combined_config.clone().apply_config(builder);
Expand Down
Loading