remove ridiculous verify_exists option from URLField
This commit is contained in:
parent
fa9ca2555a
commit
a9c205bffe
@ -3,7 +3,6 @@ import decimal
|
||||
import itertools
|
||||
import re
|
||||
import time
|
||||
import urllib2
|
||||
import uuid
|
||||
import warnings
|
||||
from operator import itemgetter
|
||||
@ -148,17 +147,6 @@ class URLField(StringField):
|
||||
self.error('Invalid URL: {}'.format(value))
|
||||
return
|
||||
|
||||
if self.verify_exists:
|
||||
warnings.warn(
|
||||
'The URLField verify_exists argument has intractable security '
|
||||
'and performance issues. Accordingly, it has been deprecated.',
|
||||
DeprecationWarning)
|
||||
try:
|
||||
request = urllib2.Request(value)
|
||||
urllib2.urlopen(request)
|
||||
except Exception as e:
|
||||
self.error('This URL appears to be a broken link: %s' % e)
|
||||
|
||||
|
||||
class EmailField(StringField):
|
||||
"""A field that validates input as an email address.
|
||||
|
Loading…
x
Reference in New Issue
Block a user