Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run synchronous code asynchronously #304

Merged
merged 6 commits into from
Sep 30, 2020
Merged

Conversation

raman325
Copy link
Contributor

@raman325 raman325 commented Sep 29, 2020

Description:

Related issue (if applicable): home-assistant/core#40184

As discussed in the thread, Home Assistant is detecting that synchronous I/O is being performed in the event loop (this is still occurring after this is still occurring after home-assistant/core#40213) which is not good for the reason highlighted here: home-assistant/core#40184 (comment)

This change prevents the error from my testing. I wasn't sure how to write a test for this so I didn't make any changes there but your existing tests should pass meaning worst case scenario, this is a no-op

New Service Completion Status

  • apprise/plugins/Notify.py
  • setup.py
    • add new service into the keywords section of the setup() declaration
  • README.md
    • add entry for new service to table (as a quick reference)
  • packaging/redhat/python-apprise.spec
    • add new service into the %global common_description

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2020

Codecov Report

Merging #304 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #304   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           83        83           
  Lines         9978     10033   +55     
  Branches      1626      1639   +13     
=========================================
+ Hits          9978     10033   +55     
Impacted Files Coverage Δ
apprise/py3compat/asyncio.py 100.00% <100.00%> (ø)
apprise/cli.py 100.00% <0.00%> (ø)
apprise/common.py 100.00% <0.00%> (ø)
apprise/Apprise.py 100.00% <0.00%> (ø)
apprise/__init__.py 100.00% <0.00%> (ø)
apprise/AppriseAttachment.py 100.00% <0.00%> (ø)
apprise/config/ConfigBase.py 100.00% <0.00%> (ø)
apprise/plugins/NotifyXML.py 100.00% <0.00%> (ø)
apprise/plugins/NotifyJSON.py 100.00% <0.00%> (ø)
apprise/plugins/NotifyEmail.py 100.00% <0.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 784e073...32f9c5e. Read the comment docs.

@caronc
Copy link
Owner

caronc commented Sep 30, 2020

Thank you for coming up with a work-around so fast, but I'm still confused why this is needed. 🤷‍♂️ 😕

I appreciate your hard work all the same and I see no problem with what you've done if you feel it's the solution.

Next step would be to push out out another release so it can be cross referenced in HA? I'd suggest we also undo my last merge request when bumping versions?

Thoughts?

@raman325
Copy link
Contributor Author

Agreed - at a minimum another release would be great, but I think you are right that we should undo the last merge request as well. I'm happy to test this and submit a PR if you could help me with a release!

@caronc
Copy link
Owner

caronc commented Sep 30, 2020

I'll get a release going by the weekend (worst case) if I can.

@caronc caronc merged commit 525f386 into caronc:master Sep 30, 2020
@raman325
Copy link
Contributor Author

@caronc mind tagging me when you do? That way I can get the other PR up

@caronc
Copy link
Owner

caronc commented Sep 30, 2020

Sure thing!🙂

@raman325 raman325 deleted the sync_from_async_2 branch September 30, 2020 04:30
@caronc
Copy link
Owner

caronc commented Oct 4, 2020

@raman325 Apprise v0.8.9 has been release and pushed to PyPi.

@raman325
Copy link
Contributor Author

raman325 commented Oct 5, 2020

Thanks! home-assistant/core#41253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants