python-trio / trio

Trio – a friendly Python library for async concurrency and I/O
https://trio.readthedocs.io
Other
5.98k stars 325 forks source link

Use `abc.ABC` rather than `abc.ABCMeta` #3018

Closed A5rocks closed 2 weeks ago

A5rocks commented 2 weeks ago

Since 3.7, CPython provides slots for abc.ABC. I'm not sure about pypy but a) they use the same stdlib so probably and b) slots on pypy don't mean anything.

This means trio can use abc.ABC instead of abc.ABCMeta.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.63%. Comparing base (10139b2) to head (23941e1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3018 +/- ## ======================================= Coverage 99.63% 99.63% ======================================= Files 120 120 Lines 17855 17857 +2 Branches 3212 3212 ======================================= + Hits 17790 17792 +2 Misses 46 46 Partials 19 19 ``` | [Files](https://app.codecov.io/gh/python-trio/trio/pull/3018?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio) | Coverage Δ | | |---|---|---| | [src/trio/\_abc.py](https://app.codecov.io/gh/python-trio/trio/pull/3018?src=pr&el=tree&filepath=src%2Ftrio%2F_abc.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX2FiYy5weQ==) | `100.00% <100.00%> (ø)` | |