Skip to content

Commit d5e0e37

Browse files
committed
fixes #213
1 parent 0204823 commit d5e0e37

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

fastcore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.3.6"
1+
__version__ = "1.3.7"

fastcore/xtras.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,12 @@ def join_path_file(file, path, ext=''):
184184
# Cell
185185
def urlquote(url):
186186
"Update url's path with `urllib.parse.quote`"
187+
subdelims = "!$&'()*+,;="
188+
gendelims = ":?#[]@"
189+
safe = subdelims+gendelims+"%"
187190
p = list(urlparse(url))
188-
p[2] = urllib.parse.quote(p[2])
189-
for i in range(3,6): p[i] = urllib.parse.quote(p[i], safe="/=&")
191+
p[2] = urllib.parse.quote(p[2], safe=safe)
192+
for i in range(3,6): p[i] = urllib.parse.quote(p[i], safe=safe)
190193
return urlunparse(p)
191194

192195
# Cell

nbs/03_xtras.ipynb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@
588588
{
589589
"data": {
590590
"text/plain": [
591-
"['h', 'b', 'c', 'f', 'g', 'a', 'd', 'e']"
591+
"['e', 'c', 'h', 'a', 'f', 'g', 'b', 'd']"
592592
]
593593
},
594594
"execution_count": null,
@@ -1166,9 +1166,12 @@
11661166
"#export\n",
11671167
"def urlquote(url):\n",
11681168
" \"Update url's path with `urllib.parse.quote`\"\n",
1169+
" subdelims = \"!$&'()*+,;=\"\n",
1170+
" gendelims = \":?#[]@\"\n",
1171+
" safe = subdelims+gendelims+\"%\"\n",
11691172
" p = list(urlparse(url))\n",
1170-
" p[2] = urllib.parse.quote(p[2])\n",
1171-
" for i in range(3,6): p[i] = urllib.parse.quote(p[i], safe=\"/=&\")\n",
1173+
" p[2] = urllib.parse.quote(p[2], safe=safe)\n",
1174+
" for i in range(3,6): p[i] = urllib.parse.quote(p[i], safe=safe)\n",
11721175
" return urlunparse(p)"
11731176
]
11741177
},
@@ -1180,7 +1183,7 @@
11801183
{
11811184
"data": {
11821185
"text/plain": [
1183-
"'https://github.com/fastai/fastai/compare/master%40%7B1.day.ago%7D%E2%80%A6master'"
1186+
"'https://github.com/%2Ffastai%2Ffastai%2Fcompare%2Fmaster@%7B1.day.ago%7D%E2%80%A6master'"
11841187
]
11851188
},
11861189
"execution_count": null,
@@ -1200,7 +1203,7 @@
12001203
{
12011204
"data": {
12021205
"text/plain": [
1203-
"'https://www.google.com/search?q=%E4%BD%A0%E5%A5%BD'"
1206+
"'https://www.google.com/%2Fsearch?q=%E4%BD%A0%E5%A5%BD'"
12041207
]
12051208
},
12061209
"execution_count": null,

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author = Jeremy Howard and Sylvain Gugger
77
author_email = [email protected]
88
copyright = fast.ai
99
branch = master
10-
version = 1.3.6
10+
version = 1.3.7
1111
min_python = 3.6
1212
audience = Developers
1313
language = English

0 commit comments

Comments
 (0)