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
6aca7652
Kaydet (Commit)
6aca7652
authored
May 04, 2013
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
üst
0801d73b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
mimetypes.py
Lib/mimetypes.py
+2
-0
test_mimetypes.py
Lib/test/test_mimetypes.py
+2
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/mimetypes.py
Dosyayı görüntüle @
6aca7652
...
...
@@ -386,12 +386,14 @@ def _default_mime_types():
'.taz'
:
'.tar.gz'
,
'.tz'
:
'.tar.gz'
,
'.tbz2'
:
'.tar.bz2'
,
'.txz'
:
'.tar.xz'
,
}
encodings_map
=
{
'.gz'
:
'gzip'
,
'.Z'
:
'compress'
,
'.bz2'
:
'bzip2'
,
'.xz'
:
'xz'
,
}
# Before adding new types, make sure they are either registered with IANA,
...
...
Lib/test/test_mimetypes.py
Dosyayı görüntüle @
6aca7652
...
...
@@ -21,6 +21,8 @@ class MimeTypesTestCase(unittest.TestCase):
eq
(
self
.
db
.
guess_type
(
"foo.tgz"
),
(
"application/x-tar"
,
"gzip"
))
eq
(
self
.
db
.
guess_type
(
"foo.tar.gz"
),
(
"application/x-tar"
,
"gzip"
))
eq
(
self
.
db
.
guess_type
(
"foo.tar.Z"
),
(
"application/x-tar"
,
"compress"
))
eq
(
self
.
db
.
guess_type
(
"foo.tar.bz2"
),
(
"application/x-tar"
,
"bzip2"
))
eq
(
self
.
db
.
guess_type
(
"foo.tar.xz"
),
(
"application/x-tar"
,
"xz"
))
def
test_data_urls
(
self
):
eq
=
self
.
assertEqual
...
...
Misc/NEWS
Dosyayı görüntüle @
6aca7652
...
...
@@ -34,6 +34,8 @@ Core and Builtins
Library
-------
-
Issue
#
16316
:
mimetypes
now
recognizes
the
.
xz
and
.
txz
(.
tar
.
xz
)
extensions
.
-
Issue
#
17192
:
Restore
the
patch
for
Issue
#
10309
which
was
ommitted
in
2.7.4
when
updating
the
bundled
version
of
libffi
used
by
ctypes
.
...
...
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