Skip to content

Commit 80a11c4

Browse files
committed
Python35 support drop
1 parent 512ff6b commit 80a11c4

File tree

5 files changed

+7
-14
lines changed

5 files changed

+7
-14
lines changed

.github/workflows/python-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
16+
python-version: [3.6, 3.7, 3.8, 3.9]
1717
fail-fast: false
1818
steps:
1919
- uses: actions/checkout@v2

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: python
22
sudo: false
33
matrix:
44
include:
5-
- python: 3.5
65
- python: 3.6
76
- python: 3.7
87
- python: 3.8

openapi_core/deserializing/media_types/factories.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
from json import loads
2+
13
from openapi_core.deserializing.media_types.util import (
2-
json_loads, urlencoded_form_loads, data_form_loads,
4+
urlencoded_form_loads, data_form_loads,
35
)
46

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

1214
MEDIA_TYPE_DESERIALIZERS = {
13-
'application/json': json_loads,
15+
'application/json': loads,
1416
'application/x-www-form-urlencoded': urlencoded_form_loads,
1517
'multipart/form-data': data_form_loads,
1618
}

openapi_core/deserializing/media_types/util.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
from email.parser import Parser
2-
from json import loads
32
from urllib.parse import parse_qsl
43

54

6-
def json_loads(value):
7-
# python 3.5 doesn't support binary input fix
8-
if isinstance(value, (bytes, )):
9-
value = value.decode()
10-
return loads(value)
11-
12-
135
def urlencoded_form_loads(value):
146
return dict(parse_qsl(value))
157

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ classifiers =
99
Intended Audience :: Developers
1010
Topic :: Software Development :: Libraries :: Python Modules
1111
Operating System :: OS Independent
12-
Programming Language :: Python :: 3.5
12+
Programming Language :: Python :: 3
1313
Programming Language :: Python :: 3.6
1414
Programming Language :: Python :: 3.7
1515
Programming Language :: Python :: 3.8
@@ -21,7 +21,7 @@ include_package_data = True
2121
packages = find:
2222
zip_safe = False
2323
test_suite = tests
24-
python_requires = >= 3.5
24+
python_requires = >= 3.6
2525
setup_requires =
2626
setuptools
2727
install_requires =

0 commit comments

Comments
 (0)