Skip to content

Commit

Permalink
Merge pull request #1 from Spomotion/fix/support-python-plus-10
Browse files Browse the repository at this point in the history
Support Python verion +10
  • Loading branch information
MahmoudFarid authored Dec 22, 2024
2 parents 587d01b + 0d87b12 commit 944fe8a
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions push_notifications/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
try:
# Python 3.8+
import importlib.metadata as importlib_metadata
# Python 3.8+
import importlib.metadata as importlib_metadata

try:
# Ugly hack for APNS sub-deps Python 3.10+
import collections
from collections.abc import Iterable, Mapping, MutableMapping, MutableSet

collections.Iterable = Iterable
collections.Mapping = Mapping
collections.MutableSet = MutableSet
collections.MutableMapping = MutableMapping
except ImportError:
pass

except ImportError:
# <Python 3.7 and lower
import importlib_metadata
# <Python 3.7 and lower
import importlib_metadata

__version__ = importlib_metadata.version("django-push-notifications")

0 comments on commit 944fe8a

Please sign in to comment.