pyee icon indicating copy to clipboard operation
pyee copied to clipboard

Introduce Self type

Open jfhbrook opened this issue 9 months ago • 3 comments

In #177, I stubbed out typing Self parameters, but I set Self = Any to maintain Python 3.8, 3.9 and 3.10 support. This PR closes the loop and uses typing.Self for that annotation. This yields a slight improvement in type safety.

This change does remove Python 3.8, 3.9 and 3.10 support.

jfhbrook avatar Mar 17 '25 18:03 jfhbrook

Google thinks these are the release dates for the relevant Python versions:

  • 3.8 (minimum previously) - October 2019, 5 1/2 years ago
  • 3.9 - October 2020, 4 1/2 years ago
  • 3.10 - October 2021, 3 1/2 years ago
  • 3.11 (minimum in this PR) - October 2022, 2 1/2 years ago

I'd be OK dropping 3.8 support - 2019 was a while ago! But dropping 3.10 might be a bridge too far. Dunno.

jfhbrook avatar Mar 17 '25 19:03 jfhbrook

The last version of Python which is currently supported is 3.9 - 3.9 EOL is 2025-10. e.g. Playwright tries to follow that support pattern for Python versions.

mxschmitt avatar Mar 27 '25 11:03 mxschmitt

Hi! In aiortc (which depends on pyee) we support all non-EOL Python versions, so we would like to retain Python 3.9 compatibility until October 2025 :)

jlaine avatar Mar 28 '25 09:03 jlaine