Skip to content

Commit

Permalink
Merge pull request #86 from wildfoundry/fix-python-311
Browse files Browse the repository at this point in the history
fix python 3.11 deprecated function
  • Loading branch information
rkados authored Mar 17, 2023
2 parents fc9dd95 + efc0fa5 commit 8fd1e37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dataplicity/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@
from urllib2 import urlopen, HTTPError
import Queue as queue
from urllib2 import Request
from inspect import getargspec as getfullargspec
else:
from urllib.parse import urlparse, parse_qs, urlunparse
from urllib.parse import urlencode, quote
from itertools import zip_longest
from urllib.request import urlopen, HTTPError
import queue
from urllib.request import Request
from inspect import getfullargspec


# pickle is the C version on PY3
Expand Down
5 changes: 3 additions & 2 deletions dataplicity/m2m/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""


from ..compat import text_type
from ..compat import text_type, getfullargspec

import logging
import inspect
Expand Down Expand Up @@ -92,7 +92,8 @@ def dispatch_packet(self, packet):
self.on_missing_handler(packet)
return None

arg_spec = inspect.getargspec(method)
arg_spec = getfullargspec(method)

args, kwargs = packet.get_method_args(len(arg_spec[0]))

try:
Expand Down

0 comments on commit 8fd1e37

Please sign in to comment.