Skip to content

Commit

Permalink
Merge pull request #11 from sendbird/CPLAT-4632
Browse files Browse the repository at this point in the history
CPLAT-4632 Fix for python 3.12
  • Loading branch information
dlunch authored Nov 25, 2024
2 parents 6f441c7 + 4e4c8aa commit 3f9e426
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions django/utils/six.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ def find_module(self, fullname, path=None):
return self
return None

# For python 3.12
def find_spec(self, fullname, path, target=None):
from importlib.util import spec_from_loader
loader = self.find_module(fullname, path)
if loader is None:
return None

return spec_from_loader(fullname, loader)

def __get_module(self, fullname):
try:
return self.known_modules[fullname]
Expand Down

0 comments on commit 3f9e426

Please sign in to comment.