Skip to content

Commit

Permalink
Python35 support drop
Browse files Browse the repository at this point in the history
  • Loading branch information
p1c2u committed May 22, 2021
1 parent 512ff6b commit 80a11c4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9]
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: python
sudo: false
matrix:
include:
- python: 3.5
- python: 3.6
- python: 3.7
- python: 3.8
Expand Down
6 changes: 4 additions & 2 deletions openapi_core/deserializing/media_types/factories.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from json import loads

from openapi_core.deserializing.media_types.util import (
json_loads, urlencoded_form_loads, data_form_loads,
urlencoded_form_loads, data_form_loads,
)

from openapi_core.deserializing.media_types.deserializers import (
Expand All @@ -10,7 +12,7 @@
class MediaTypeDeserializersFactory(object):

MEDIA_TYPE_DESERIALIZERS = {
'application/json': json_loads,
'application/json': loads,
'application/x-www-form-urlencoded': urlencoded_form_loads,
'multipart/form-data': data_form_loads,
}
Expand Down
8 changes: 0 additions & 8 deletions openapi_core/deserializing/media_types/util.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
from email.parser import Parser
from json import loads
from urllib.parse import parse_qsl


def json_loads(value):
# python 3.5 doesn't support binary input fix
if isinstance(value, (bytes, )):
value = value.decode()
return loads(value)


def urlencoded_form_loads(value):
return dict(parse_qsl(value))

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ classifiers =
Intended Audience :: Developers
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: OS Independent
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Expand All @@ -21,7 +21,7 @@ include_package_data = True
packages = find:
zip_safe = False
test_suite = tests
python_requires = >= 3.5
python_requires = >= 3.6
setup_requires =
setuptools
install_requires =
Expand Down

0 comments on commit 80a11c4

Please sign in to comment.