python-trio / trio

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

Get rid of `signal_raise` #3126

Closed A5rocks closed 2 weeks ago

A5rocks commented 3 weeks ago

I noticed signal.raise_signal seems to do what signal_raise used to. Let's use that instead.

codecov[bot] commented 3 weeks ago

Codecov Report

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

Project coverage is 99.62%. Comparing base (c7801ae) to head (980bee0). Report is 20 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3126 +/- ## ========================================== - Coverage 99.63% 99.62% -0.01% ========================================== Files 122 122 Lines 18380 18357 -23 Branches 1222 1221 -1 ========================================== - Hits 18312 18289 -23 Misses 47 47 Partials 21 21 ``` | [Files with missing lines](https://app.codecov.io/gh/python-trio/trio/pull/3126?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/\_core/\_tests/test\_guest\_mode.py](https://app.codecov.io/gh/python-trio/trio/pull/3126?src=pr&el=tree&filepath=src%2Ftrio%2F_core%2F_tests%2Ftest_guest_mode.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX2NvcmUvX3Rlc3RzL3Rlc3RfZ3Vlc3RfbW9kZS5weQ==) | `100.00% <100.00%> (ø)` | | | [src/trio/\_core/\_tests/test\_ki.py](https://app.codecov.io/gh/python-trio/trio/pull/3126?src=pr&el=tree&filepath=src%2Ftrio%2F_core%2F_tests%2Ftest_ki.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX2NvcmUvX3Rlc3RzL3Rlc3Rfa2kucHk=) | `100.00% <100.00%> (ø)` | | | [src/trio/\_signals.py](https://app.codecov.io/gh/python-trio/trio/pull/3126?src=pr&el=tree&filepath=src%2Ftrio%2F_signals.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3NpZ25hbHMucHk=) | `100.00% <100.00%> (ø)` | | | [src/trio/\_tests/test\_repl.py](https://app.codecov.io/gh/python-trio/trio/pull/3126?src=pr&el=tree&filepath=src%2Ftrio%2F_tests%2Ftest_repl.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3Rlc3RzL3Rlc3RfcmVwbC5weQ==) | `100.00% <ø> (ø)` | | | [src/trio/\_tests/test\_signals.py](https://app.codecov.io/gh/python-trio/trio/pull/3126?src=pr&el=tree&filepath=src%2Ftrio%2F_tests%2Ftest_signals.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3Rlc3RzL3Rlc3Rfc2lnbmFscy5weQ==) | `100.00% <100.00%> (ø)` | | | [src/trio/\_tests/test\_util.py](https://app.codecov.io/gh/python-trio/trio/pull/3126?src=pr&el=tree&filepath=src%2Ftrio%2F_tests%2Ftest_util.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3Rlc3RzL3Rlc3RfdXRpbC5weQ==) | `100.00% <ø> (ø)` | | | [src/trio/\_util.py](https://app.codecov.io/gh/python-trio/trio/pull/3126?src=pr&el=tree&filepath=src%2Ftrio%2F_util.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3V0aWwucHk=) | `100.00% <ø> (ø)` | |
A5rocks commented 3 weeks ago

I assume the code was written pre-3.8

jakkdl commented 3 weeks ago

I assume the code was written pre-3.8

yep, 2017 - https://github.com/python-trio/trio/commit/300a19ddb3fc75aff4fe7e7b37957b655e54b995 3.7 hadn't even been released!

good find :+1: