Skip to content

Conversation

@dgw
Copy link
Member

@dgw dgw commented Jun 27, 2023

Description

It turns out that "where possible" is equivalent to "almost everywhere". There are a very few places where we still have to leave typing aliases in for compatibility with Python versions before 3.9.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
    • This also includes running mypy 1.4 under Python 3.8, to make sure none of the changes breaks that version. (I did not bother to test Python 3.7 since it's EOL any day now. Tentatively it's EOL today, but I haven't seen any formal announcement or update to the Python Versions page yet.)
  • I have tested the functionality of the things this change touches

Notes

Follow-up to #2471; prerequisite for finishing #2477 (so I can extract a very nice, clean file for packaging externally).

Haven't touched remind as it's due to be removed shortly (#2478, replaced by external package).

dgw added 27 commits June 21, 2023 17:39
@dgw dgw added the Housekeeping Code cleanup, removal of deprecated stuff, etc. label Jun 27, 2023
@dgw dgw added this to the 8.0.0 milestone Jun 27, 2023
@dgw dgw requested a review from a team June 27, 2023 10:00
Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

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

If mypy doesn't complain, I'm OK with that.

Copy link
Contributor

@SnoopJ SnoopJ left a comment

Choose a reason for hiding this comment

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

LGTM. I had forgotten that typing.Iterable, typing.Generator were deprecated and I'm annoyed that collections.abc is the "right" way to do it, but that's hardly this PR's fault, and using the generic forms of the built-ins is a huge win.

@dgw dgw merged commit 79b6bce into master Jun 28, 2023
@dgw dgw deleted the dgw/typing-generics branch June 28, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Housekeeping Code cleanup, removal of deprecated stuff, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants