diff --git a/mirrors/fields.py b/mirrors/fields.py index ceb20a7ec..985c11ec0 100644 --- a/mirrors/fields.py +++ b/mirrors/fields.py @@ -1,10 +1,9 @@ -from IPy import IP - from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.db import models +from ipaddress import ip_address as IP class IPNetworkFormField(forms.Field): def to_python(self, value): diff --git a/mirrors/tests/test_mirrorrsync.py b/mirrors/tests/test_mirrorrsync.py index 31dc325dd..13e682329 100644 --- a/mirrors/tests/test_mirrorrsync.py +++ b/mirrors/tests/test_mirrorrsync.py @@ -27,4 +27,4 @@ def test_ipv4(self): def test_invalid(self): with self.assertRaises(ValueError) as e: MirrorRsync.objects.create(ip="8.8.8.8.8", mirror=self.mirror) - self.assertIn('IPv4 Address with more than 4 bytes', str(e.exception)) + self.assertIn('does not appear to be an IPv4 or IPv6 address', str(e.exception)) diff --git a/requirements.txt b/requirements.txt index 548cba8b6..5a73f41e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin Django==3.0.7 -IPy==1.00 Markdown==3.2.1 bencode.py==2.0.0 django-countries==5.5