-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
A deprecated module dependency in apns integration #47553
Comments
apns documentation |
Upstream issue: Pr0Ger/PyAPNs2#74 |
What is the possible path here? Is there any policy for deprecated libs or will deprecated lib block any new development undefined long unless the apns component will stop working entirely or will switch to a new lib? |
We don't really have a policy on this. I brought it up with other devs. And we usually push the maintainer to fix it. But this integration have no marked maintainer. So I'm somewhat at a loss on how to proceed. |
Thank you for the update @elupus . And thank you to bring this to devs. |
Has there been any progress on this issue? |
I didn't hear any news unfortunately. ;( |
@elupus Would it be possible to drop the APNS integration due to the deprecated dependency which is blocking other developments? I think that not that many users would be affected by this (if any), because the stats say that no person of the people contributing to the integration stats is using this integration (see https://analytics.home-assistant.io/#integrations). |
Another possibility would be to port the APNS integration to another APNS library. pyapns_client seems to be a possible replacement for PyAPNs2. It's dependencies can be seen in the project's setup.py. If I ported the APNS integration to another APNS library, I would not be able to test it, because I neither have an Apple developer account nor any Apple device to test it with. But frankly, I do want to work on the Matrix integration, and not on another random integration which blocks the work on the Matrix integration. |
I do not think that it helps with the overall issue, but we could adapt the APNS integration to use the latest version of PyAPNs2, as the used version 0.3.0 is quite outdated (version 0.3.0 has been released four years ago in 2017: https://github.com/Pr0Ger/PyAPNs2/releases/tag/0.3.0) |
@sam-io As you added APNS support back in 2016: What do you think about this issue? |
I've found this issue because I've been tracking the ongoing Matrix integration bugs and have just stumbled across @szimszon work to port the integration across to the matrix-nio library, kudos to you! The issue here has a couple of suggestions for forked PyAPNs2 version which have ported from hyper to httpx. Patching the APNS integration to use one of these forks should be less work than moving to an alternative library such as pyapns_client. I would like to try and bring @szimszon's matrix-nio branch up to date with home-assistant:dev and test it alongside a patched APNS integration which uses one of these forks. However I don't have an environment to test the functionality of the APNS integration unfortunately. Does anyone have access to an apple device and developer account and the knowledge required to test this functionality? |
You have my blessing ;) as I have no time right now to move this forward. |
I've brought @szimszon branch up to date with home-assistant:dev (or at least within a couple of weeks of latest). The updated matrix component still seems to be functional as far as I can tell, more informal testing needed though. You can follow my work here. And it looks like all apns tests are passing now! I think the previous test failures may have actually been unrelated to the matrix component. "pip check" will show that we don't have the versions of some of the underlying libraries that pyapns2 wants but the tests pass and I can still load the apns integration into home-assistant. This last point has a caveat that I don't have an apple testing environment so I can't load it in and have it functional, i have to spoof the certificate file check for example. I'm hoping we might be able to proceed from this point independently of the apns integration depreciated libraries issue. Having looked at the couple of branches that have ported pyapns2 to httpx neither have made any start of getting the parent library updated on PyPi. The alternative apns libraries on PyPi look like they would take a bit of work to port the apns integration across too. I have no desire and no testing environment to do this work. Instead I will try to bring this matrix integration up to date as much as possible by moving it up to the latest version of the matrix-nio library and make sure it is fully working though functional testing. I'll continue to at least check apns component tests pass as I make changes. I will also look at whether I can add basic tests for the matrix component. If I can get this all up to date I will reopen a PR against home-assistant:dev and see if I can get a review started with the core devs again. |
Any updates? |
I had been doing some longer term testing on the integration as is and have come across an issue I think I need to fix before opening a PR. The matrix component was not handling an exception being thrown from somewhere inside a dependency (off the top of my head I think it was a connection timeout). This was causing the bot to basically become disconnected and stop working. I think the best way to fix is to simply handle the exception and do re-initialise the connection. However, I had been testing against a personal instance of a matrix homeserver so i wanted to test against a public one too which might have a higher reliability to see if I could reproduce the same thing. |
I use it since I created it and never stopped working. ;) Still if it works for the creator doesn't mean it will work elsewhere too :-D |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
I try to send a PR about a matrix component (#47529) and test failed on apns component because:
Report from @elupus in discord devs_core:
...The apns project uses apns2 which uses hyper which uses h2... Hyper wants a less than 3.0 version of h2. Matrix wants a larger then 3. This they conflict...
...IMHO this is a bug in apns integration. Hyper is a deprecated package. We can't have core limited by that...
What is version of Home Assistant Core has the issue?
dev branch
What was the last working version of Home Assistant Core?
What type of installation are you running?
Home Assistant Core
Integration causing the issue
apns
Link to integration documentation on our website
No response
Example YAML snippet
# Put your YAML below this line
Anything in the logs that might be useful for us?
# Put your logs below this line
The text was updated successfully, but these errors were encountered: