This helps in handling certain types invalid urls in a conservative manner.
RobotTest(15, doc, good, bad)
+# 16. Empty query (issue #17403). Normalizing the url first.
+doc = """
+User-agent: *
+Allow: /some/path?
+Disallow: /another/path?
+"""
+
+good = ['/some/path?']
+bad = ['/another/path?']
+
+RobotTest(16, doc, good, bad)
+
class NetworkTestCase(unittest.TestCase):
if path == '' and not allowance:
# an empty value means allow all
allowance = True
+ path = urllib.parse.urlunparse(urllib.parse.urlparse(path))
self.path = urllib.parse.quote(path)
self.allowance = allowance
Library
-------
+- Issue #17403: urllib.parse.robotparser normalizes the urls before adding to
+ ruleline. This helps in handling certain types invalid urls in a conservative
+ manner.
+
- Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw
stream's read() returns more bytes than requested.