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
bb7da03f
Kaydet (Commit)
bb7da03f
authored
Ara 09, 2012
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge fixes for #13614, #13512 and #7719 from 3.3
üst
53f604c7
3f7c0e40
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
74 additions
and
34 deletions
+74
-34
apiref.rst
Doc/distutils/apiref.rst
+6
-0
abc.rst
Doc/library/abc.rst
+3
-3
io.rst
Doc/library/io.rst
+1
-1
sys.rst
Doc/library/sys.rst
+1
-1
check.py
Lib/distutils/command/check.py
+3
-0
config.py
Lib/distutils/config.py
+1
-10
dir_util.py
Lib/distutils/dir_util.py
+4
-0
test_dir_util.py
Lib/distutils/tests/test_dir_util.py
+16
-5
test_register.py
Lib/distutils/tests/test_register.py
+23
-11
test_sdist.py
Lib/distutils/tests/test_sdist.py
+4
-3
ACKS
Misc/ACKS
+3
-0
NEWS
Misc/NEWS
+9
-0
No files found.
Doc/distutils/apiref.rst
Dosyayı görüntüle @
bb7da03f
...
@@ -992,6 +992,12 @@ directories.
...
@@ -992,6 +992,12 @@ directories.
destination of the symlink will be copied. *update* and *verbose* are the same
destination of the symlink will be copied. *update* and *verbose* are the same
as for :func:`copy_file`.
as for :func:`copy_file`.
Files in *src* that begin with :file:`.nfs` are skipped (more information on
these files is available in answer D2 of the `NFS FAQ page
<http://nfs.sourceforge.net/#section_d>`_.
.. versionchanged:: 3.3.1
NFS files are ignored.
.. function:: remove_tree(directory[, verbose=0, dry_run=0])
.. function:: remove_tree(directory[, verbose=0, dry_run=0])
...
...
Doc/library/abc.rst
Dosyayı görüntüle @
bb7da03f
...
@@ -129,7 +129,7 @@ This module provides the following class:
...
@@ -129,7 +129,7 @@ This module provides the following class:
The :mod:`abc` module also provides the following decorators:
The :mod:`abc` module also provides the following decorators:
.. decorator:: abstractmethod
(function)
.. decorator:: abstractmethod
A decorator indicating abstract methods.
A decorator indicating abstract methods.
...
@@ -203,7 +203,7 @@ The :mod:`abc` module also provides the following decorators:
...
@@ -203,7 +203,7 @@ The :mod:`abc` module also provides the following decorators:
multiple-inheritance.
multiple-inheritance.
.. decorator:: abstractclassmethod
(function)
.. decorator:: abstractclassmethod
A subclass of the built-in :func:`classmethod`, indicating an abstract
A subclass of the built-in :func:`classmethod`, indicating an abstract
classmethod. Otherwise it is similar to :func:`abstractmethod`.
classmethod. Otherwise it is similar to :func:`abstractmethod`.
...
@@ -224,7 +224,7 @@ The :mod:`abc` module also provides the following decorators:
...
@@ -224,7 +224,7 @@ The :mod:`abc` module also provides the following decorators:
:func:`abstractmethod`, making this decorator redundant.
:func:`abstractmethod`, making this decorator redundant.
.. decorator:: abstractstaticmethod
(function)
.. decorator:: abstractstaticmethod
A subclass of the built-in :func:`staticmethod`, indicating an abstract
A subclass of the built-in :func:`staticmethod`, indicating an abstract
staticmethod. Otherwise it is similar to :func:`abstractmethod`.
staticmethod. Otherwise it is similar to :func:`abstractmethod`.
...
...
Doc/library/io.rst
Dosyayı görüntüle @
bb7da03f
...
@@ -232,7 +232,7 @@ I/O Base Classes
...
@@ -232,7 +232,7 @@ I/O Base Classes
Note that calling any method (even inquiries) on a closed stream is
Note that calling any method (even inquiries) on a closed stream is
undefined. Implementations may raise :exc:`ValueError` in this case.
undefined. Implementations may raise :exc:`ValueError` in this case.
:class:`IOBase` (and its subclasses) support the iterator protocol, meaning
:class:`IOBase` (and its subclasses) support
s
the iterator protocol, meaning
that an :class:`IOBase` object can be iterated over yielding the lines in a
that an :class:`IOBase` object can be iterated over yielding the lines in a
stream. Lines are defined slightly differently depending on whether the
stream. Lines are defined slightly differently depending on whether the
stream is a binary stream (yielding bytes), or a text stream (yielding
stream is a binary stream (yielding bytes), or a text stream (yielding
...
...
Doc/library/sys.rst
Dosyayı görüntüle @
bb7da03f
...
@@ -833,7 +833,7 @@ always available.
...
@@ -833,7 +833,7 @@ always available.
For other systems, the values are:
For other systems, the values are:
================ ===========================
================ ===========================
System
:data:`platform
` value
System
``platform`
` value
================ ===========================
================ ===========================
Linux ``'linux'``
Linux ``'linux'``
Windows ``'win32'``
Windows ``'win32'``
...
...
Lib/distutils/command/check.py
Dosyayı görüntüle @
bb7da03f
...
@@ -23,6 +23,9 @@ try:
...
@@ -23,6 +23,9 @@ try:
def
system_message
(
self
,
level
,
message
,
*
children
,
**
kwargs
):
def
system_message
(
self
,
level
,
message
,
*
children
,
**
kwargs
):
self
.
messages
.
append
((
level
,
message
,
children
,
kwargs
))
self
.
messages
.
append
((
level
,
message
,
children
,
kwargs
))
return
nodes
.
system_message
(
message
,
level
=
level
,
type
=
self
.
levels
[
level
],
*
children
,
**
kwargs
)
HAS_DOCUTILS
=
True
HAS_DOCUTILS
=
True
except
Exception
:
except
Exception
:
...
...
Lib/distutils/config.py
Dosyayı görüntüle @
bb7da03f
...
@@ -4,7 +4,6 @@ Provides the PyPIRCCommand class, the base class for the command classes
...
@@ -4,7 +4,6 @@ Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
that uses .pypirc in the distutils.command package.
"""
"""
import
os
import
os
import
sys
from
configparser
import
ConfigParser
from
configparser
import
ConfigParser
from
distutils.cmd
import
Command
from
distutils.cmd
import
Command
...
@@ -43,16 +42,8 @@ class PyPIRCCommand(Command):
...
@@ -43,16 +42,8 @@ class PyPIRCCommand(Command):
def
_store_pypirc
(
self
,
username
,
password
):
def
_store_pypirc
(
self
,
username
,
password
):
"""Creates a default .pypirc file."""
"""Creates a default .pypirc file."""
rc
=
self
.
_get_rc_file
()
rc
=
self
.
_get_rc_file
()
f
=
open
(
rc
,
'w'
)
with
os
.
fdopen
(
os
.
open
(
rc
,
os
.
O_CREAT
|
os
.
O_WRONLY
,
0
o600
),
'w'
)
as
f
:
try
:
f
.
write
(
DEFAULT_PYPIRC
%
(
username
,
password
))
f
.
write
(
DEFAULT_PYPIRC
%
(
username
,
password
))
finally
:
f
.
close
()
try
:
os
.
chmod
(
rc
,
0
o600
)
except
OSError
:
# should do something better here
pass
def
_read_pypirc
(
self
):
def
_read_pypirc
(
self
):
"""Reads the .pypirc file."""
"""Reads the .pypirc file."""
...
...
Lib/distutils/dir_util.py
Dosyayı görüntüle @
bb7da03f
...
@@ -141,6 +141,10 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1,
...
@@ -141,6 +141,10 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1,
src_name
=
os
.
path
.
join
(
src
,
n
)
src_name
=
os
.
path
.
join
(
src
,
n
)
dst_name
=
os
.
path
.
join
(
dst
,
n
)
dst_name
=
os
.
path
.
join
(
dst
,
n
)
if
n
.
startswith
(
'.nfs'
):
# skip NFS rename files
continue
if
preserve_symlinks
and
os
.
path
.
islink
(
src_name
):
if
preserve_symlinks
and
os
.
path
.
islink
(
src_name
):
link_dest
=
os
.
readlink
(
src_name
)
link_dest
=
os
.
readlink
(
src_name
)
if
verbose
>=
1
:
if
verbose
>=
1
:
...
...
Lib/distutils/tests/test_dir_util.py
Dosyayı görüntüle @
bb7da03f
...
@@ -76,7 +76,6 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
...
@@ -76,7 +76,6 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
remove_tree
(
self
.
root_target
,
verbose
=
0
)
remove_tree
(
self
.
root_target
,
verbose
=
0
)
def
test_copy_tree_verbosity
(
self
):
def
test_copy_tree_verbosity
(
self
):
mkpath
(
self
.
target
,
verbose
=
0
)
mkpath
(
self
.
target
,
verbose
=
0
)
...
@@ -88,11 +87,8 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
...
@@ -88,11 +87,8 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
mkpath
(
self
.
target
,
verbose
=
0
)
mkpath
(
self
.
target
,
verbose
=
0
)
a_file
=
os
.
path
.
join
(
self
.
target
,
'ok.txt'
)
a_file
=
os
.
path
.
join
(
self
.
target
,
'ok.txt'
)
f
=
open
(
a_file
,
'w'
)
with
open
(
a_file
,
'w'
)
as
f
:
try
:
f
.
write
(
'some content'
)
f
.
write
(
'some content'
)
finally
:
f
.
close
()
wanted
=
[
'copying
%
s ->
%
s'
%
(
a_file
,
self
.
target2
)]
wanted
=
[
'copying
%
s ->
%
s'
%
(
a_file
,
self
.
target2
)]
copy_tree
(
self
.
target
,
self
.
target2
,
verbose
=
1
)
copy_tree
(
self
.
target
,
self
.
target2
,
verbose
=
1
)
...
@@ -101,6 +97,21 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
...
@@ -101,6 +97,21 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
remove_tree
(
self
.
root_target
,
verbose
=
0
)
remove_tree
(
self
.
root_target
,
verbose
=
0
)
remove_tree
(
self
.
target2
,
verbose
=
0
)
remove_tree
(
self
.
target2
,
verbose
=
0
)
def
test_copy_tree_skips_nfs_temp_files
(
self
):
mkpath
(
self
.
target
,
verbose
=
0
)
a_file
=
os
.
path
.
join
(
self
.
target
,
'ok.txt'
)
nfs_file
=
os
.
path
.
join
(
self
.
target
,
'.nfs123abc'
)
for
f
in
a_file
,
nfs_file
:
with
open
(
f
,
'w'
)
as
fh
:
fh
.
write
(
'some content'
)
copy_tree
(
self
.
target
,
self
.
target2
)
self
.
assertEqual
(
os
.
listdir
(
self
.
target2
),
[
'ok.txt'
])
remove_tree
(
self
.
root_target
,
verbose
=
0
)
remove_tree
(
self
.
target2
,
verbose
=
0
)
def
test_ensure_relative
(
self
):
def
test_ensure_relative
(
self
):
if
os
.
sep
==
'/'
:
if
os
.
sep
==
'/'
:
self
.
assertEqual
(
ensure_relative
(
'/home/foo'
),
'home/foo'
)
self
.
assertEqual
(
ensure_relative
(
'/home/foo'
),
'home/foo'
)
...
...
Lib/distutils/tests/test_register.py
Dosyayı görüntüle @
bb7da03f
"""Tests for distutils.command.register."""
"""Tests for distutils.command.register."""
import
sys
import
os
import
os
import
unittest
import
unittest
import
getpass
import
getpass
...
@@ -10,11 +9,14 @@ from test.support import check_warnings, run_unittest
...
@@ -10,11 +9,14 @@ from test.support import check_warnings, run_unittest
from
distutils.command
import
register
as
register_module
from
distutils.command
import
register
as
register_module
from
distutils.command.register
import
register
from
distutils.command.register
import
register
from
distutils.core
import
Distribution
from
distutils.errors
import
DistutilsSetupError
from
distutils.errors
import
DistutilsSetupError
from
distutils.tests
import
support
from
distutils.tests.test_config
import
PyPIRCCommandTestCase
from
distutils.tests.test_config
import
PYPIRC
,
PyPIRCCommandTestCase
try
:
import
docutils
except
ImportError
:
docutils
=
None
PYPIRC_NOPASSWORD
=
"""
\
PYPIRC_NOPASSWORD
=
"""
\
[distutils]
[distutils]
...
@@ -193,6 +195,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
...
@@ -193,6 +195,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
self
.
assertEqual
(
headers
[
'Content-length'
],
'290'
)
self
.
assertEqual
(
headers
[
'Content-length'
],
'290'
)
self
.
assertTrue
((
b
'tarek'
)
in
req
.
data
)
self
.
assertTrue
((
b
'tarek'
)
in
req
.
data
)
@unittest.skipUnless
(
docutils
is
not
None
,
'needs docutils'
)
def
test_strict
(
self
):
def
test_strict
(
self
):
# testing the script option
# testing the script option
# when on, the register command stops if
# when on, the register command stops if
...
@@ -205,13 +208,6 @@ class RegisterTestCase(PyPIRCCommandTestCase):
...
@@ -205,13 +208,6 @@ class RegisterTestCase(PyPIRCCommandTestCase):
cmd
.
strict
=
1
cmd
.
strict
=
1
self
.
assertRaises
(
DistutilsSetupError
,
cmd
.
run
)
self
.
assertRaises
(
DistutilsSetupError
,
cmd
.
run
)
# we don't test the reSt feature if docutils
# is not installed
try
:
import
docutils
except
ImportError
:
return
# metadata are OK but long_description is broken
# metadata are OK but long_description is broken
metadata
=
{
'url'
:
'xxx'
,
'author'
:
'xxx'
,
metadata
=
{
'url'
:
'xxx'
,
'author'
:
'xxx'
,
'author_email'
:
'éxéxé'
,
'author_email'
:
'éxéxé'
,
...
@@ -265,6 +261,22 @@ class RegisterTestCase(PyPIRCCommandTestCase):
...
@@ -265,6 +261,22 @@ class RegisterTestCase(PyPIRCCommandTestCase):
finally
:
finally
:
del
register_module
.
input
del
register_module
.
input
@unittest.skipUnless
(
docutils
is
not
None
,
'needs docutils'
)
def
test_register_invalid_long_description
(
self
):
description
=
':funkie:`str`'
# mimic Sphinx-specific markup
metadata
=
{
'url'
:
'xxx'
,
'author'
:
'xxx'
,
'author_email'
:
'xxx'
,
'name'
:
'xxx'
,
'version'
:
'xxx'
,
'long_description'
:
description
}
cmd
=
self
.
_get_cmd
(
metadata
)
cmd
.
ensure_finalized
()
cmd
.
strict
=
True
inputs
=
Inputs
(
'2'
,
'tarek'
,
'tarek@ziade.org'
)
register_module
.
input
=
inputs
self
.
addCleanup
(
delattr
,
register_module
,
'input'
)
self
.
assertRaises
(
DistutilsSetupError
,
cmd
.
run
)
def
test_check_metadata_deprecated
(
self
):
def
test_check_metadata_deprecated
(
self
):
# makes sure make_metadata is deprecated
# makes sure make_metadata is deprecated
cmd
=
self
.
_get_cmd
()
cmd
=
self
.
_get_cmd
()
...
...
Lib/distutils/tests/test_sdist.py
Dosyayı görüntüle @
bb7da03f
...
@@ -83,9 +83,8 @@ class SDistTestCase(PyPIRCCommandTestCase):
...
@@ -83,9 +83,8 @@ class SDistTestCase(PyPIRCCommandTestCase):
@unittest.skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
@unittest.skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
def
test_prune_file_list
(
self
):
def
test_prune_file_list
(
self
):
# this test creates a package with some vcs dirs in it
# this test creates a project with some VCS dirs and an NFS rename
# and launch sdist to make sure they get pruned
# file, then launches sdist to check they get pruned on all systems
# on all systems
# creating VCS directories with some files in them
# creating VCS directories with some files in them
os
.
mkdir
(
join
(
self
.
tmp_dir
,
'somecode'
,
'.svn'
))
os
.
mkdir
(
join
(
self
.
tmp_dir
,
'somecode'
,
'.svn'
))
...
@@ -99,6 +98,8 @@ class SDistTestCase(PyPIRCCommandTestCase):
...
@@ -99,6 +98,8 @@ class SDistTestCase(PyPIRCCommandTestCase):
self
.
write_file
((
self
.
tmp_dir
,
'somecode'
,
'.git'
,
self
.
write_file
((
self
.
tmp_dir
,
'somecode'
,
'.git'
,
'ok'
),
'xxx'
)
'ok'
),
'xxx'
)
self
.
write_file
((
self
.
tmp_dir
,
'somecode'
,
'.nfs0001'
),
'xxx'
)
# now building a sdist
# now building a sdist
dist
,
cmd
=
self
.
get_cmd
()
dist
,
cmd
=
self
.
get_cmd
()
...
...
Misc/ACKS
Dosyayı görüntüle @
bb7da03f
...
@@ -243,6 +243,7 @@ David Costanzo
...
@@ -243,6 +243,7 @@ David Costanzo
Scott Cotton
Scott Cotton
Greg Couch
Greg Couch
David Cournapeau
David Cournapeau
Julien Courteau
Steve Cousins
Steve Cousins
Alex Coventry
Alex Coventry
Matthew Dixon Cowles
Matthew Dixon Cowles
...
@@ -566,6 +567,7 @@ Julien Jehannet
...
@@ -566,6 +567,7 @@ Julien Jehannet
Drew Jenkins
Drew Jenkins
Flemming Kjær Jensen
Flemming Kjær Jensen
Philip H. Jensen
Philip H. Jensen
Philip Jenvey
MunSic Jeong
MunSic Jeong
Chris Jerdonek
Chris Jerdonek
Jim Jewett
Jim Jewett
...
@@ -688,6 +690,7 @@ John J. Lee
...
@@ -688,6 +690,7 @@ John J. Lee
Thomas Lee
Thomas Lee
Tennessee Leeuwenburg
Tennessee Leeuwenburg
Luc Lefebvre
Luc Lefebvre
Pierre Paul Lefebvre
Glyph Lefkowitz
Glyph Lefkowitz
Vincent Legoll
Vincent Legoll
Kip Lehman
Kip Lehman
...
...
Misc/NEWS
Dosyayı görüntüle @
bb7da03f
...
@@ -165,6 +165,15 @@ Library
...
@@ -165,6 +165,15 @@ Library
- Issue #16628: Fix a memory leak in ctypes.resize().
- Issue #16628: Fix a memory leak in ctypes.resize().
- Issue #13614: Fix setup.py register failure with invalid rst in description.
Patch by Julien Courteau and Pierre Paul Lefebvre.
- Issue #13512: Create ~/.pypirc securely (CVE-2011-4944). Initial patch by
Philip Jenvey, tested by Mageia and Debian.
- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
on. Initial patch by SilentGhost and Jeff Ramnani.
- Issue #13120: Allow to call pdb.set_trace() from thread.
- Issue #13120: Allow to call pdb.set_trace() from thread.
Patch by Ilya Sandler.
Patch by Ilya Sandler.
...
...
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