PyAPNs2 icon indicating copy to clipboard operation
PyAPNs2 copied to clipboard

Feature/replace hyper with httpx

Open paulskeie opened this issue 11 months ago • 0 comments

Replace hyper with httpx for HTTP/2 client

This PR replaces the hyper HTTP/2 client library with httpx. The main changes are:

Changes

  • Replace hyper dependency with httpx (>=0.24.0)
  • Update client connection handling to use httpx Client
  • Update credentials module to use httpx for connections
  • Update tests to mock httpx instead of hyper
  • Add Python 3.10-3.12 support
  • Set explicit Python version range (>=3.7,<4.0)

Testing

All tests pass with the new httpx implementation:

  • Unit tests updated to mock httpx client
  • Integration tests working with APNs sandbox
  • Token and certificate auth both functional

Migration Notes

  • No API changes required for users
  • Same functionality maintained
  • Better HTTP/2 support through httpx
  • Improved connection handling
  • More robust error handling

Dependencies

  • Added httpx>=0.24.0
  • Removed hyper
  • Updated Python version support (3.7-3.12)

paulskeie avatar Feb 02 '25 08:02 paulskeie