Pr0Ger / PyAPNs2

Python library for interacting with the Apple Push Notification service (APNs) via HTTP/2 protocol
MIT License
349 stars 179 forks source link

Python 3.10 compatibility #141

Closed to-bee closed 1 year ago

to-bee commented 2 years ago

Pyapns2 relies on hyper, hyperframe and h2. All of them currently not supporting python3.10. hyper is even an archived project. Are there any plans to further maintain those packages?

Tobi

daveisfera commented 2 years ago

This appears to be a duplicate of #74 and #126

alliefitter commented 2 years ago

Workaround for the meantime.

if version_info.major >= 3 and version_info.minor >= 10:
    """
    **************
    * WORKAROUND *
    **************

    The apns2 package is throwing errors because some aliases in collections were removed in 3.10. Specifically, the
    error is coming from a dependency of apns2 named hyper.  
    """
    import collections
    from collections import abc
    collections.Iterable = abc.Iterable
    collections.Mapping = abc.Mapping
    collections.MutableSet = abc.MutableSet
    collections.MutableMapping = abc.MutableMapping
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.