Skip to content

Commit dd4718b

Browse files
authored
Merge pull request #113 from cs50/develop
Update to 2.2.4
2 parents c98d13f + 22af96f commit dd4718b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

check50.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import argparse
77
import errno
88
import hashlib
9-
import imp
109
import inspect
1110
import json
1211
import os
@@ -21,8 +20,14 @@
2120
import time
2221
import traceback
2322
import unittest
23+
import warnings
2424
import xml.etree.cElementTree as ET
2525

26+
with warnings.catch_warnings():
27+
warnings.filterwarnings("ignore", category=DeprecationWarning)
28+
import imp
29+
30+
2631
from backports.shutil_which import which
2732
from bs4 import BeautifulSoup
2833
from contextlib import contextmanager
@@ -514,10 +519,14 @@ def content(self, output=None, str_output=None, **kwargs):
514519
raise Error("expected request to return HTML, but it returned {}".format(
515520
self.response.mimetype))
516521

522+
with warnings.catch_warnings():
523+
warnings.filterwarnings("ignore", category=DeprecationWarning)
524+
content = BeautifulSoup(self.response.data, "html.parser")
525+
517526
return self._search_page(
518527
output,
519528
str_output,
520-
BeautifulSoup(self.response.data, "html.parser"),
529+
content,
521530
lambda regex, content, **kwargs: any(regex.search(str(tag)) for tag in content.find_all(**kwargs)))
522531

523532
def _send(self, method, route, data, params, **kwargs):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ class CustomInstall(install):
5959
"console_scripts": ["check50=check50:main"]
6060
},
6161
url="https://github.com/cs50/check50",
62-
version="2.2.3"
62+
version="2.2.4"
6363
)

0 commit comments

Comments
 (0)