Skip to content

Commit

Permalink
use sys.version instead of signature inspection to check
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed May 10, 2024
1 parent 24671aa commit 8f27f16
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/python/vc_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def vc_handler(event, context):
# https://github.com/erm/mangum/blob/b4d21c8f5e304a3e17b88bc9fa345106acc50ad7/LICENSE
import asyncio
import enum
import inspect
from urllib.parse import urlparse
from werkzeug.datastructures import Headers

Expand All @@ -192,7 +191,7 @@ def __init__(self, scope):
self.state = ASGICycleState.REQUEST
self.app_queue = None
self.response = {}
self._legacy_asyncio = "loop" in inspect.signature(asyncio.Queue).parameters
self._legacy_asyncio = sys.version_info < (3, 10)

def __call__(self, app, body):
"""
Expand Down

0 comments on commit 8f27f16

Please sign in to comment.