python-trio / trio-asyncio

a re-implementation of the asyncio mainloop on top of Trio
Other
188 stars 37 forks source link

Fix asyncio.get_running_loop() monkey-patching (#83) #99

Closed niklasf closed 3 years ago

niklasf commented 3 years ago

Since Python 3.7 asyncio.get_running_loop() is public, so we will have to monkey-patch that in addition to the already monkey-patched internal asyncio.events.get_running_loop().

Part of #83.

oremanj commented 3 years ago

Looks good. Please add newsfragments/99.bugfix.rst describing the user-visible impact of this change, e.g., "asyncio.get_running_loop() now knows how to return the running trio-asyncio event loop."

niklasf commented 3 years ago

News fragment added :+1:

codecov[bot] commented 3 years ago

Codecov Report

Merging #99 (ebf62ac) into master (9451387) will decrease coverage by 0.13%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
- Coverage   80.61%   80.48%   -0.14%     
==========================================
  Files          11       11              
  Lines        1238     1240       +2     
  Branches      172      172              
==========================================
  Hits          998      998              
- Misses        170      171       +1     
- Partials       70       71       +1     
Impacted Files Coverage Δ
trio_asyncio/_loop.py 78.69% <100.00%> (+0.18%) :arrow_up:
trio_asyncio/_base.py 84.23% <0.00%> (-0.55%) :arrow_down:
shamrin commented 3 years ago

I've tried rerunning the checks a few times, but at least one macOS test hangs due to GitHub Actions bug. Every time a different macOS hangs. For this reason I can't merge this PR :(

@oremanj could you please mark all macOS tests as non-required?

trio-bot[bot] commented 3 years ago

Hey @niklasf, it looks like that was the first time we merged one of your PRs! Thanks so much! :tada: :birthday:

If you want to keep contributing, we'd love to have you. So, I just sent you an invitation to join the python-trio organization on Github! If you accept, then here's what will happen:

If you want to read more, here's the relevant section in our contributing guide.

Alternatively, you're free to decline or ignore the invitation. You'll still be able to contribute as much or as little as you like, and I won't hassle you about joining again. But if you ever change your mind, just let us know and we'll send another invitation. We'd love to have you, but more importantly we want you to do whatever's best for you.

If you have any questions, well... I am just a humble Python script, so I probably can't help. But please do post a comment here, or in our chat, or on our forum, whatever's easiest, and someone will help you out!