PyAPNs2 icon indicating copy to clipboard operation
PyAPNs2 copied to clipboard

Switch from hyper to httpx (for Python 3.10 support)

Open salty-horse opened this issue 3 years ago • 2 comments

Hyper is unmaintained and no longer compatible with recent Python releases. This PR switches to the httpx library.

It's based on the work done in this PR, which only added support for certificate-based authentication, and adds support for credentials-based authentication.

I've only tested the credentials-based authentication, with Python 3.10 (not 3.11). I assume the certificate authentication is used by the original author. As mentioned in the other PR, request multiplexing isn't supported by httpx, so it was removed.

The tests has not been updated with the library switch, so they fail. If this is merged, I suggest squashing the commits.

salty-horse avatar Oct 29 '22 08:10 salty-horse

error msg -- KeyError: '{"reason":"MissingProviderToken"}'

CNKCQ avatar Nov 20 '22 13:11 CNKCQ

@CNKCQ Can you provide some more context? Can you share a code sample of how you're using the library? Does it work with the published version of the package?

salty-horse avatar Nov 20 '22 19:11 salty-horse