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
2f9ca29d
Kaydet (Commit)
2f9ca29d
authored
Ara 13, 2007
tarafından
Alexandre Vassalotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix issue #1313119: urlparse "caches" parses regardless of encoding
üst
adf9ffdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
test_urlparse.py
Lib/test/test_urlparse.py
+10
-0
urlparse.py
Lib/urlparse.py
+1
-1
No files found.
Lib/test/test_urlparse.py
Dosyayı görüntüle @
2f9ca29d
...
...
@@ -287,6 +287,16 @@ class UrlParseTestCase(unittest.TestCase):
self
.
assertEqual
(
p
.
port
,
None
)
self
.
assertEqual
(
p
.
geturl
(),
uri
)
def
test_caching
(
self
):
# Test case for bug #1313119
uri
=
"http://example.com/doc/"
unicode_uri
=
unicode
(
uri
)
urlparse
.
urlparse
(
unicode_uri
)
p
=
urlparse
.
urlparse
(
uri
)
self
.
assertEqual
(
type
(
p
.
scheme
),
type
(
uri
))
self
.
assertEqual
(
type
(
p
.
hostname
),
type
(
uri
))
self
.
assertEqual
(
type
(
p
.
path
),
type
(
uri
))
def
test_main
():
test_support
.
run_unittest
(
UrlParseTestCase
)
...
...
Lib/urlparse.py
Dosyayı görüntüle @
2f9ca29d
...
...
@@ -184,7 +184,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
Note that we don't break the components up in smaller bits
(e.g. netloc is a single string) and we don't expand
%
escapes."""
allow_fragments
=
bool
(
allow_fragments
)
key
=
url
,
scheme
,
allow_fragments
key
=
url
,
scheme
,
allow_fragments
,
type
(
url
),
type
(
scheme
)
cached
=
_parse_cache
.
get
(
key
,
None
)
if
cached
:
return
cached
...
...
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