summaryrefslogtreecommitdiff
path: root/bs4/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r--bs4/__init__.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py
index 2a436d3..2cdfed5 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -207,10 +207,10 @@ class BeautifulSoup(Tag):
if old_name in kwargs:
warnings.warn(
'The "%s" argument to the BeautifulSoup constructor '
- 'has been renamed to "%s."' % (old_name, new_name))
- value = kwargs[old_name]
- del kwargs[old_name]
- return value
+ 'has been renamed to "%s."' % (old_name, new_name),
+ DeprecationWarning
+ )
+ return kwargs.pop(old_name)
return None
parse_only = parse_only or deprecated_argument(
@@ -782,7 +782,9 @@ class BeautifulStoneSoup(BeautifulSoup):
kwargs['features'] = 'xml'
warnings.warn(
'The BeautifulStoneSoup class is deprecated. Instead of using '
- 'it, pass features="xml" into the BeautifulSoup constructor.')
+ 'it, pass features="xml" into the BeautifulSoup constructor.',
+ DeprecationWarning
+ )
super(BeautifulStoneSoup, self).__init__(*args, **kwargs)