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
13e8c8e7
Kaydet (Commit)
13e8c8e7
authored
Eyl 09, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix determination of Metadata version (#8933). Patch by Filip Gruszczyński.
üst
fce67fcd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
dist.py
Lib/distutils/dist.py
+2
-1
test_dist.py
Lib/distutils/tests/test_dist.py
+14
-0
NEWS
Misc/NEWS
+4
-0
No files found.
Lib/distutils/dist.py
Dosyayı görüntüle @
13e8c8e7
...
@@ -1018,7 +1018,8 @@ class DistributionMetadata:
...
@@ -1018,7 +1018,8 @@ class DistributionMetadata:
"""Write the PKG-INFO format data to a file object.
"""Write the PKG-INFO format data to a file object.
"""
"""
version
=
'1.0'
version
=
'1.0'
if
self
.
provides
or
self
.
requires
or
self
.
obsoletes
:
if
(
self
.
provides
or
self
.
requires
or
self
.
obsoletes
or
self
.
classifiers
or
self
.
download_url
):
version
=
'1.1'
version
=
'1.1'
file
.
write
(
'Metadata-Version:
%
s
\n
'
%
version
)
file
.
write
(
'Metadata-Version:
%
s
\n
'
%
version
)
...
...
Lib/distutils/tests/test_dist.py
Dosyayı görüntüle @
13e8c8e7
...
@@ -244,6 +244,20 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
...
@@ -244,6 +244,20 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
"version"
:
"1.0"
,
"version"
:
"1.0"
,
"obsoletes"
:
[
"my.pkg (splat)"
]})
"obsoletes"
:
[
"my.pkg (splat)"
]})
def
test_classifier
(
self
):
attrs
=
{
'name'
:
'Boa'
,
'version'
:
'3.0'
,
'classifiers'
:
[
'Programming Language :: Python :: 3'
]}
dist
=
Distribution
(
attrs
)
meta
=
self
.
format_metadata
(
dist
)
self
.
assertIn
(
'Metadata-Version: 1.1'
,
meta
)
def
test_download_url
(
self
):
attrs
=
{
'name'
:
'Boa'
,
'version'
:
'3.0'
,
'download_url'
:
'http://example.org/boa'
}
dist
=
Distribution
(
attrs
)
meta
=
self
.
format_metadata
(
dist
)
self
.
assertIn
(
'Metadata-Version: 1.1'
,
meta
)
def
test_long_description
(
self
):
def
test_long_description
(
self
):
long_desc
=
textwrap
.
dedent
(
"""
\
long_desc
=
textwrap
.
dedent
(
"""
\
example::
example::
...
...
Misc/NEWS
Dosyayı görüntüle @
13e8c8e7
...
@@ -25,6 +25,10 @@ Core and Builtins
...
@@ -25,6 +25,10 @@ Core and Builtins
Library
Library
-------
-------
- Issue #8933: distutils' PKG-INFO files will now correctly report
Metadata-Version: 1.1 instead of 1.0 if a Classifier or Download-URL field is
present.
- Issue #9561: distutils now reads and writes egg-info files using UTF-8,
- Issue #9561: distutils now reads and writes egg-info files using UTF-8,
instead of the locale encoding.
instead of the locale encoding.
...
...
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