Skip to content

Commit

Permalink
Updated dependencies based on version
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin-aguiar committed Nov 18, 2024
1 parent 7a1b995 commit da56762
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 deletions azure/functions/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import types
import typing

from multidict._multidict import MultiDict
import werkzeug.datastructures
from werkzeug import formparser as _wk_parser
from werkzeug import http as _wk_http
from werkzeug.datastructures import Headers, FileStorage
from werkzeug.datastructures import Headers, FileStorage, MultiDict

from . import _abc

Expand Down Expand Up @@ -175,8 +175,8 @@ def __init__(self,
self.__route_params = types.MappingProxyType(route_params or {})
self.__body_bytes = body
self.__form_parsed = False
self.__form: MultiDict[str, str] = None
self.__files:MultiDict[str, FileStorage] = None
self.__form: MultiDict[str, str]
self.__files: MultiDict[str, FileStorage]

@property
def url(self):
Expand Down Expand Up @@ -231,7 +231,8 @@ def _parse_form_data(self):
content_length = len(body)
mimetype, options = _wk_http.parse_options_header(content_type)
parser = _wk_parser.FormDataParser(
_wk_parser.default_stream_factory
_wk_parser.default_stream_factory, None, None,
werkzeug.datastructures.ImmutableMultiDict
)

body_stream = io.BytesIO(body)
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
from setuptools import find_packages, setup
from azure.functions import __version__

INSTALL_REQUIRES = ["werkzeug"]
if sys.version_info[:2] >= (3, 9):
INSTALL_REQUIRES = ["werkzeug~=3.1.3"]
elif sys.version_info[:2] == (3, 8):
INSTALL_REQUIRES = ["werkzeug~=3.0.6"]
else:
INSTALL_REQUIRES = ["werkzeug"]

EXTRA_REQUIRES = {
'dev': [
Expand Down

0 comments on commit da56762

Please sign in to comment.