mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Drop Python 3.4 support (#6620)
This commit is contained in:
parent
0f819d844d
commit
50a24d6d7f
|
@ -5,9 +5,6 @@ matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
|
|
||||||
- { python: "3.4", env: DJANGO=1.11 }
|
|
||||||
- { python: "3.4", env: DJANGO=2.0 }
|
|
||||||
|
|
||||||
- { python: "3.5", env: DJANGO=1.11 }
|
- { python: "3.5", env: DJANGO=1.11 }
|
||||||
- { python: "3.5", env: DJANGO=2.0 }
|
- { python: "3.5", env: DJANGO=2.0 }
|
||||||
- { python: "3.5", env: DJANGO=2.1 }
|
- { python: "3.5", env: DJANGO=2.1 }
|
||||||
|
|
|
@ -53,7 +53,7 @@ There is a live example API for testing purposes, [available here][sandbox].
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
* Python (3.4, 3.5, 3.6, 3.7)
|
* Python (3.5, 3.6, 3.7)
|
||||||
* Django (1.11, 2.0, 2.1, 2.2)
|
* Django (1.11, 2.0, 2.1, 2.2)
|
||||||
|
|
||||||
We **highly recommend** and only officially support the latest patch release of
|
We **highly recommend** and only officially support the latest patch release of
|
||||||
|
|
|
@ -84,7 +84,7 @@ continued development by **[signing up for a paid plan][funding]**.
|
||||||
|
|
||||||
REST framework requires the following:
|
REST framework requires the following:
|
||||||
|
|
||||||
* Python (3.4, 3.5, 3.6, 3.7)
|
* Python (3.5, 3.6, 3.7)
|
||||||
* Django (1.11, 2.0, 2.1, 2.2)
|
* Django (1.11, 2.0, 2.1, 2.2)
|
||||||
|
|
||||||
We **highly recommend** and only officially support the latest patch release of
|
We **highly recommend** and only officially support the latest patch release of
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -8,7 +8,7 @@ from io import open
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
CURRENT_PYTHON = sys.version_info[:2]
|
CURRENT_PYTHON = sys.version_info[:2]
|
||||||
REQUIRED_PYTHON = (3, 4)
|
REQUIRED_PYTHON = (3, 5)
|
||||||
|
|
||||||
# This check and everything above must remain compatible with Python 2.7.
|
# This check and everything above must remain compatible with Python 2.7.
|
||||||
if CURRENT_PYTHON < REQUIRED_PYTHON:
|
if CURRENT_PYTHON < REQUIRED_PYTHON:
|
||||||
|
@ -79,7 +79,7 @@ setup(
|
||||||
packages=find_packages(exclude=['tests*']),
|
packages=find_packages(exclude=['tests*']),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=[],
|
install_requires=[],
|
||||||
python_requires=">=3.4",
|
python_requires=">=3.5",
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
@ -94,7 +94,6 @@ setup(
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'Programming Language :: Python :: 3.4',
|
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
'Programming Language :: Python :: 3.7',
|
'Programming Language :: Python :: 3.7',
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import unittest
|
|
||||||
import uuid
|
import uuid
|
||||||
from decimal import ROUND_DOWN, ROUND_UP, Decimal
|
from decimal import ROUND_DOWN, ROUND_UP, Decimal
|
||||||
|
|
||||||
|
@ -17,15 +16,10 @@ from rest_framework import exceptions, serializers
|
||||||
from rest_framework.compat import ProhibitNullCharactersValidator
|
from rest_framework.compat import ProhibitNullCharactersValidator
|
||||||
from rest_framework.fields import DjangoImageField, is_simple_callable
|
from rest_framework.fields import DjangoImageField, is_simple_callable
|
||||||
|
|
||||||
try:
|
|
||||||
import typing
|
|
||||||
except ImportError:
|
|
||||||
typing = False
|
|
||||||
|
|
||||||
|
|
||||||
# Tests for helper functions.
|
# Tests for helper functions.
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|
||||||
|
|
||||||
class TestIsSimpleCallable:
|
class TestIsSimpleCallable:
|
||||||
|
|
||||||
def test_method(self):
|
def test_method(self):
|
||||||
|
@ -92,7 +86,6 @@ class TestIsSimpleCallable:
|
||||||
|
|
||||||
assert is_simple_callable(ChoiceModel().get_choice_field_display)
|
assert is_simple_callable(ChoiceModel().get_choice_field_display)
|
||||||
|
|
||||||
@unittest.skipUnless(typing, 'requires python 3.5')
|
|
||||||
def test_type_annotation(self):
|
def test_type_annotation(self):
|
||||||
# The annotation will otherwise raise a syntax error in python < 3.5
|
# The annotation will otherwise raise a syntax error in python < 3.5
|
||||||
locals = {}
|
locals = {}
|
||||||
|
|
4
tox.ini
4
tox.ini
|
@ -1,7 +1,7 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
{py34,py35,py36}-django111,
|
{py35,py36}-django111,
|
||||||
{py34,py35,py36,py37}-django20,
|
{py35,py36,py37}-django20,
|
||||||
{py35,py36,py37}-django21
|
{py35,py36,py37}-django21
|
||||||
{py35,py36,py37}-django22
|
{py35,py36,py37}-django22
|
||||||
{py36,py37}-djangomaster,
|
{py36,py37}-djangomaster,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user