Skip to content

Commit

Permalink
docs: document when deprecated methods will be removed [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Sep 30, 2024
1 parent 49eddeb commit d31e001
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- DeprecationWarning messages now clearly say that the methods won't exist in v1.0.0

### Added

- it is now possible to extend the widget's height to 100% of its container. To do so,
Expand Down
15 changes: 10 additions & 5 deletions src/ipyaladin/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ def add_moc_from_URL(
"""
warnings.warn(
"add_moc_from_URL is replaced by add_moc that detects automatically"
"that the MOC was given as an URL.",
"that the MOC was given as an URL."
"This will be removed in version 1.0.0 (coming afer 0.5.1).",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -719,7 +720,8 @@ def add_moc_from_dict(
"""
warnings.warn(
"add_moc_from_dict is replaced by add_moc that detects automatically"
"that the MOC was given as a dictionary.",
"that the MOC was given as a dictionary."
"This will be removed in version 1.0.0 (coming afer 0.5.1).",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -850,7 +852,8 @@ def add_overlay_from_stcs(
"""
warnings.warn(
"'add_overlay_from_stcs' is deprecated, "
"use 'add_graphic_overlay_from_stcs' instead",
"use 'add_graphic_overlay_from_stcs' instead. "
"This will be removed in version 1.0.0 (coming afer 0.5.1).",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -930,7 +933,8 @@ def rectangular_selection(self) -> None:
This method is deprecated, use selection instead
"""
warnings.warn(
"rectangular_selection is deprecated, use selection('rectangle') instead",
"rectangular_selection is deprecated, use selection('rectangle') instead"
"This will be removed in version 1.0.0 (coming afer 0.5.1).",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -983,7 +987,8 @@ def add_listener(self, listener_type: str, callback: Callable) -> None:
"""
warnings.warn(
"add_listener is deprecated, use set_listener instead",
"add_listener is deprecated, use set_listener instead"
"This will be removed in version 1.0.0 (coming afer 0.5.1).",
DeprecationWarning,
stacklevel=2,
)
Expand Down

0 comments on commit d31e001

Please sign in to comment.