Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ed30199e
Kaydet (Commit)
ed30199e
authored
Ara 24, 2012
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix issue16713 - tel url parsing with params
üst
08bab072
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
test_urlparse.py
Lib/test/test_urlparse.py
+29
-0
parse.py
Lib/urllib/parse.py
+1
-1
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_urlparse.py
Dosyayı görüntüle @
ed30199e
...
@@ -818,6 +818,35 @@ class UrlParseTestCase(unittest.TestCase):
...
@@ -818,6 +818,35 @@ class UrlParseTestCase(unittest.TestCase):
p2
=
urllib
.
parse
.
urlsplit
(
'tel:+31641044153'
)
p2
=
urllib
.
parse
.
urlsplit
(
'tel:+31641044153'
)
self
.
assertEqual
(
p2
.
scheme
,
'tel'
)
self
.
assertEqual
(
p2
.
scheme
,
'tel'
)
self
.
assertEqual
(
p2
.
path
,
'+31641044153'
)
self
.
assertEqual
(
p2
.
path
,
'+31641044153'
)
# assert the behavior for urlparse
p1
=
urllib
.
parse
.
urlparse
(
'tel:+31-641044153'
)
self
.
assertEqual
(
p1
.
scheme
,
'tel'
)
self
.
assertEqual
(
p1
.
path
,
'+31-641044153'
)
p2
=
urllib
.
parse
.
urlparse
(
'tel:+31641044153'
)
self
.
assertEqual
(
p2
.
scheme
,
'tel'
)
self
.
assertEqual
(
p2
.
path
,
'+31641044153'
)
def
test_telurl_params
(
self
):
p1
=
urllib
.
parse
.
urlparse
(
'tel:123-4;phone-context=+1-650-516'
)
self
.
assertEqual
(
p1
.
scheme
,
'tel'
)
self
.
assertEqual
(
p1
.
path
,
'123-4'
)
self
.
assertEqual
(
p1
.
params
,
'phone-context=+1-650-516'
)
p1
=
urllib
.
parse
.
urlparse
(
'tel:+1-201-555-0123'
)
self
.
assertEqual
(
p1
.
scheme
,
'tel'
)
self
.
assertEqual
(
p1
.
path
,
'+1-201-555-0123'
)
self
.
assertEqual
(
p1
.
params
,
''
)
p1
=
urllib
.
parse
.
urlparse
(
'tel:7042;phone-context=example.com'
)
self
.
assertEqual
(
p1
.
scheme
,
'tel'
)
self
.
assertEqual
(
p1
.
path
,
'7042'
)
self
.
assertEqual
(
p1
.
params
,
'phone-context=example.com'
)
p1
=
urllib
.
parse
.
urlparse
(
'tel:863-1234;phone-context=+1-914-555'
)
self
.
assertEqual
(
p1
.
scheme
,
'tel'
)
self
.
assertEqual
(
p1
.
path
,
'863-1234'
)
self
.
assertEqual
(
p1
.
params
,
'phone-context=+1-914-555'
)
def
test_main
():
def
test_main
():
support
.
run_unittest
(
UrlParseTestCase
)
support
.
run_unittest
(
UrlParseTestCase
)
...
...
Lib/urllib/parse.py
Dosyayı görüntüle @
ed30199e
...
@@ -46,7 +46,7 @@ uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
...
@@ -46,7 +46,7 @@ uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
'svn'
,
'svn+ssh'
,
'sftp'
,
'nfs'
,
'git'
,
'git+ssh'
]
'svn'
,
'svn+ssh'
,
'sftp'
,
'nfs'
,
'git'
,
'git+ssh'
]
uses_params
=
[
'ftp'
,
'hdl'
,
'prospero'
,
'http'
,
'imap'
,
uses_params
=
[
'ftp'
,
'hdl'
,
'prospero'
,
'http'
,
'imap'
,
'https'
,
'shttp'
,
'rtsp'
,
'rtspu'
,
'sip'
,
'sips'
,
'https'
,
'shttp'
,
'rtsp'
,
'rtspu'
,
'sip'
,
'sips'
,
'mms'
,
''
,
'sftp'
]
'mms'
,
''
,
'sftp'
,
'tel'
]
# These are not actually used anymore, but should stay for backwards
# These are not actually used anymore, but should stay for backwards
# compatibility. (They are undocumented, but have a public-looking name.)
# compatibility. (They are undocumented, but have a public-looking name.)
...
...
Misc/NEWS
Dosyayı görüntüle @
ed30199e
...
@@ -182,6 +182,9 @@ Library
...
@@ -182,6 +182,9 @@ Library
- Issue #16511: Use default IDLE width and height if config param is not valid.
- Issue #16511: Use default IDLE width and height if config param is not valid.
Patch Serhiy Storchaka.
Patch Serhiy Storchaka.
- Issue #16713: Parsing of 'tel' urls using urlparse separates params from
path.
- Issue #16443: Add docstrings to regular expression match objects.
- Issue #16443: Add docstrings to regular expression match objects.
Patch by Anton Kasyanov.
Patch by Anton Kasyanov.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment