From 1112ffefe98d0b1f3300339705d51c2b9c0d015a Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Thu, 14 Dec 2023 19:06:00 +0800 Subject: [PATCH] Change affected django version to 5.1 --- rest_framework/compat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 5858042a6..472b8ad24 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -169,14 +169,14 @@ else: } -if django.VERSION >= (5, 0): - # Django 5.0+: use the stock ip_address_validators function - # Note: Before Django 5.0, ip_address_validators returns a tuple containing +if django.VERSION >= (5, 1): + # Django 5.1+: use the stock ip_address_validators function + # Note: Before Django 5.1, ip_address_validators returns a tuple containing # 1) the list of validators and 2) the error message. Starting from - # Django 5.0 ip_address_validators only returns the list of validators + # Django 5.1 ip_address_validators only returns the list of validators from django.core.validators import ip_address_validators else: - # Django <= 5.0: create a compatibility shim for ip_address_validators + # Django <= 5.1: create a compatibility shim for ip_address_validators from django.core.validators import \ ip_address_validators as _ip_address_validators