Skip to content

Commit

Permalink
fields: replace IPy dependency with ipaddress module
Browse files Browse the repository at this point in the history
Resolves archlinux#229
  • Loading branch information
johnnyapol committed Aug 4, 2020
1 parent 259eea2 commit 10e97f1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions mirrors/fields.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 1 addition & 1 deletion mirrors/tests/test_mirrorrsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-e git+git://github.com/fredj/cssmin.git@master#egg=cssmin
Django==3.0.9
IPy==1.00
Markdown==3.2.1
bencode.py==2.0.0
django-countries==5.5
Expand Down

0 comments on commit 10e97f1

Please sign in to comment.