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
a13cd395
Kaydet (Commit)
a13cd395
authored
Eyl 10, 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
0c400764
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
dist.py
Lib/distutils/dist.py
+2
-1
test_dist.py
Lib/distutils/tests/test_dist.py
+14
-0
NEWS
Misc/NEWS
+5
-1
No files found.
Lib/distutils/dist.py
Dosyayı görüntüle @
a13cd395
...
...
@@ -1111,7 +1111,8 @@ class DistributionMetadata:
"""Write the PKG-INFO format data to a file object.
"""
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'
self
.
_write_field
(
file
,
'Metadata-Version'
,
version
)
...
...
Lib/distutils/tests/test_dist.py
Dosyayı görüntüle @
a13cd395
...
...
@@ -245,6 +245,20 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
sys
.
argv
[:]
=
self
.
argv
[
1
]
super
(
MetadataTestCase
,
self
)
.
tearDown
()
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
):
long_desc
=
textwrap
.
dedent
(
"""
\
example::
...
...
Misc/NEWS
Dosyayı görüntüle @
a13cd395
...
...
@@ -39,7 +39,11 @@ Core and Builtins
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
#
8286
:
The
distutils
command
sdist
will
print
a
warning
message
instead
of
crashing
when
an
invalid
path
is
given
in
the
manifest
template
.
...
...
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