Skip to content

Update various references to deprecated type aliases in docs#17829

Merged
JukkaL merged 4 commits into
masterfrom
doc-collections-abc
Sep 26, 2024
Merged

Update various references to deprecated type aliases in docs#17829
JukkaL merged 4 commits into
masterfrom
doc-collections-abc

Conversation

@JukkaL

@JukkaL JukkaL commented Sep 25, 2024

Copy link
Copy Markdown
Collaborator

Use collections.abc.Iterable, for example, instead of typing.Iterable, unless we are discussing support for older Python versions. The latter has been deprecated since Python 3.9. Also update a few other out-of-date things that I happened to notice.

Part of the motivation is that Python 3.8 will reach end of life in October, so we can soon start mostly assuming that users are on 3.9 or newer (even if we'll continue supporting 3.8 for a while still).

Use `collections.abc.Iterable`, for example, instead of `typing.Iterable`,
unless we are discussing support for older Python versions. The latter
has been deprecated since Python 3.9. Also update a few other out-of-date
things that I happened to notice.
Comment thread docs/source/cheat_sheet_py3.rst Outdated

from typing import Callable, Iterator, Union, Optional
from collections.abc import Iterator
from typing import Callable, Union, Optional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Callable can also be imported from collections.abc

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ok, updated imports of Callables in examples as well.

Comment thread docs/source/runtime_troubles.rst Outdated
Comment thread docs/source/runtime_troubles.rst Outdated
@JukkaL JukkaL merged commit 0dfb718 into master Sep 26, 2024
@JukkaL JukkaL deleted the doc-collections-abc branch September 26, 2024 10:19
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