Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat and encoding deprecation to 0.14 #3294

Merged
merged 4 commits into from
Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 4 additions & 2 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Breaking changes
- Any user code that defines custom subclasses of xarray classes must now explicitly
define ``__slots__`` itself. Subclasses that don't add any attributes must state so
by defining ``__slots__ = ()`` right after the class header.
Omitting ``__slots__`` will now cause a ``FutureWarning`` to be logged, and a hard
crash in a later release.
Omitting ``__slots__`` will now cause a ``FutureWarning`` to be logged, and will raise an
error in a later release.

(:issue:`3250`) by `Guido Imperiale <https://github.com/crusaderky>`_.
- :py:meth:`~Dataset.to_dataset` requires ``name`` to be passed as a kwarg (previously ambiguous
Expand All @@ -56,6 +56,8 @@ Breaking changes
:py:func:`~xarray.broadcast`)
- :py:meth:`~Variable.expand_dims` is removed (previously deprecated in favor of
:py:meth:`~Variable.set_dims`)
- :py:func:`~xarray.concat` now requries the ``dim`` argument (using ``'concat_dim'`` as a default
was previouly deprecated)

New functions/methods
~~~~~~~~~~~~~~~~~~~~~
Expand Down
9 changes: 1 addition & 8 deletions xarray/core/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,7 @@ def concat(
raise ValueError("must supply at least one object to concatenate")

if dim is None:
dcherian marked this conversation as resolved.
Show resolved Hide resolved
warnings.warn(
"the `dim` argument to `concat` will be required "
"in a future version of xarray; for now, setting it to "
"the old default of 'concat_dim'",
FutureWarning,
stacklevel=2,
)
dim = "concat_dims"
raise TypeError("the `dim` argument to `concat` is required")

if indexers is not None: # pragma: no cover
warnings.warn(
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def __init__(
if encoding is not None:
warnings.warn(
"The `encoding` argument to `DataArray` is deprecated, and . "
"will be removed in 0.13. "
"will be removed in 0.14. "
"Instead, specify the encoding when writing to disk or "
"set the `encoding` attribute directly.",
FutureWarning,
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def __init__(
if compat is not None:
warnings.warn(
"The `compat` argument to Dataset is deprecated and will be "
"removed in 0.13."
"removed in 0.14."
"Instead, use `merge` to control how variables are combined",
FutureWarning,
stacklevel=2,
Expand Down