Skip to content

seaborn: mark simple deprecations with typing_extensions.deprecated - #11130

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

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

Conversation

@hamdanal

@hamdanal hamdanal commented Dec 9, 2023

Copy link
Copy Markdown
Contributor

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

hamdanal commented Dec 9, 2023

Copy link
Copy Markdown
Contributor Author

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

hamdanal commented Dec 9, 2023

Copy link
Copy Markdown
Contributor Author

See

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

@github-actions

github-actions Bot commented Dec 9, 2023

Copy link
Copy Markdown
Contributor

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

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

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