Skip to content

Commit 34ce9d5

Browse files
authored
Revert "[FIX] UrlReader: Support urls with special characters"
1 parent 2e2ca17 commit 34ce9d5

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

Orange/data/io.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
from os import path, remove
1515
from tempfile import NamedTemporaryFile
16-
from urllib.parse import urlparse, urlsplit, urlunsplit, \
17-
unquote as urlunquote, quote
16+
from urllib.parse import urlparse, urlsplit, urlunsplit, unquote as urlunquote
1817
from urllib.request import urlopen, Request
1918
from pathlib import Path
2019

@@ -406,7 +405,6 @@ def __init__(self, filename):
406405
filename = filename.strip()
407406
if not urlparse(filename).scheme:
408407
filename = 'http://' + filename
409-
filename = quote(filename, safe="/:")
410408
super().__init__(filename)
411409

412410
@staticmethod

Orange/tests/test_url_reader.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,3 @@ def test_zipped(self):
1717
"http://datasets.biolab.si/core/philadelphia-crime.csv.xz"
1818
).read()
1919
self.assertEqual(9666, len(data))
20-
21-
def test_special_characters(self):
22-
# TO-DO - replace this file with a more appropriate one (e.g. .csv)
23-
# and change the assertion accordingly
24-
path = "http://file.biolab.si/text-semantics/data/elektrotehniski-" \
25-
"vestnik-clanki/detektiranje-utrdb-v-šahu-.txt"
26-
self.assertRaises(OSError, UrlReader(path).read)
27-
28-
29-
if __name__ == "__main__":
30-
unittest.main()

0 commit comments

Comments
 (0)