Skip to content

seaborn: mark simple deprecations with typing_extensions.deprecated#11130

Merged
srittau merged 3 commits intopython:mainfrom
hamdanal:seaborn-deprecations
Dec 10, 2023
Merged

seaborn: mark simple deprecations with typing_extensions.deprecated#11130
srittau merged 3 commits intopython:mainfrom
hamdanal:seaborn-deprecations

Conversation

@hamdanal
Copy link
Copy Markdown
Contributor

@hamdanal hamdanal commented Dec 9, 2023

Note that I intentionally left out deprecated parameters of the big API functions as they would require overloads with very long signatures.

Comment thread stubs/seaborn/seaborn/algorithms.pyi Outdated
random_seed: _Seed | None = None, # deprecated
) -> NDArray[Any]: ...
@overload
@deprecated("Parameter `random_seed` is deprecated in favor of `seed`")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**kwargs: Any,
) -> Self: ...
@property
@deprecated("Attribute `fig` is deprecated in favor of `figure`")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**kwargs: Any,
) -> FacetGrid: ...
def distplot( # deprecated
@deprecated("Function `distplot` is deprecated and will be removed in seaborn v0.14.0")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# def set(*args, **kwargs) -> None: ... # deprecated alias for set_theme
set = set_theme

@deprecated("Function `set` is deprecated in favor of `set_theme`")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

color: ColorType, h: float | None = None, l: float | None = None, s: float | None = None
) -> tuple[float, float, float]: ...
def axlabel(xlabel: str, ylabel: str, **kwargs: Any) -> None: ... # deprecated
@deprecated("Function `axlabel` is deprecated and will be removed in a future version")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions

This comment has been minimized.

@hamdanal
Copy link
Copy Markdown
Contributor Author

hamdanal commented Dec 9, 2023

Is the stubtest crash a known issue?

@AlexWaygood
Copy link
Copy Markdown
Member

Is the stubtest crash a known issue?

Yeah, it's fixed on mypy master, the fix should be included as part of mypy 1.8 :)

@github-actions

This comment has been minimized.

@AlexWaygood
Copy link
Copy Markdown
Member

@hamdanal
Copy link
Copy Markdown
Contributor Author

hamdanal commented Dec 9, 2023

See

Thank you. I just confirmed that the change passes on mypy's release-1.8 branch.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 9, 2023

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Copy Markdown
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit 88193cd into python:main Dec 10, 2023
@hamdanal hamdanal deleted the seaborn-deprecations branch December 10, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants