mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 09:57:55 +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
 | 
			
		||||
    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=2.0 }
 | 
			
		||||
      - { python: "3.5", env: DJANGO=2.1 }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,7 +53,7 @@ There is a live example API for testing purposes, [available here][sandbox].
 | 
			
		|||
 | 
			
		||||
# 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)
 | 
			
		||||
 | 
			
		||||
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:
 | 
			
		||||
 | 
			
		||||
* 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)
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
if CURRENT_PYTHON < REQUIRED_PYTHON:
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ setup(
 | 
			
		|||
    packages=find_packages(exclude=['tests*']),
 | 
			
		||||
    include_package_data=True,
 | 
			
		||||
    install_requires=[],
 | 
			
		||||
    python_requires=">=3.4",
 | 
			
		||||
    python_requires=">=3.5",
 | 
			
		||||
    zip_safe=False,
 | 
			
		||||
    classifiers=[
 | 
			
		||||
        'Development Status :: 5 - Production/Stable',
 | 
			
		||||
| 
						 | 
				
			
			@ -94,7 +94,6 @@ setup(
 | 
			
		|||
        'Operating System :: OS Independent',
 | 
			
		||||
        'Programming Language :: Python',
 | 
			
		||||
        'Programming Language :: Python :: 3',
 | 
			
		||||
        'Programming Language :: Python :: 3.4',
 | 
			
		||||
        'Programming Language :: Python :: 3.5',
 | 
			
		||||
        'Programming Language :: Python :: 3.6',
 | 
			
		||||
        'Programming Language :: Python :: 3.7',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
import datetime
 | 
			
		||||
import os
 | 
			
		||||
import re
 | 
			
		||||
import unittest
 | 
			
		||||
import uuid
 | 
			
		||||
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.fields import DjangoImageField, is_simple_callable
 | 
			
		||||
 | 
			
		||||
try:
 | 
			
		||||
    import typing
 | 
			
		||||
except ImportError:
 | 
			
		||||
    typing = False
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Tests for helper functions.
 | 
			
		||||
# ---------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class TestIsSimpleCallable:
 | 
			
		||||
 | 
			
		||||
    def test_method(self):
 | 
			
		||||
| 
						 | 
				
			
			@ -92,7 +86,6 @@ class TestIsSimpleCallable:
 | 
			
		|||
 | 
			
		||||
        assert is_simple_callable(ChoiceModel().get_choice_field_display)
 | 
			
		||||
 | 
			
		||||
    @unittest.skipUnless(typing, 'requires python 3.5')
 | 
			
		||||
    def test_type_annotation(self):
 | 
			
		||||
        # The annotation will otherwise raise a syntax error in python < 3.5
 | 
			
		||||
        locals = {}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user