Skip to content

Python35 support drop #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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