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
eba28bea
Kaydet (Commit)
eba28bea
authored
Mar 28, 2005
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
700f36c7
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
28 additions
and
30 deletions
+28
-30
UserString.py
Lib/UserString.py
+2
-2
upload.py
Lib/distutils/command/upload.py
+4
-5
test_dist.py
Lib/distutils/tests/test_dist.py
+1
-1
test_versionpredicate.py
Lib/distutils/tests/test_versionpredicate.py
+1
-1
versionpredicate.py
Lib/distutils/versionpredicate.py
+3
-3
gzip.py
Lib/gzip.py
+2
-2
subprocess.py
Lib/subprocess.py
+4
-4
tarfile.py
Lib/tarfile.py
+1
-1
regrtest.py
Lib/test/regrtest.py
+1
-1
test_functional.py
Lib/test/test_functional.py
+1
-1
test_mmap.py
Lib/test/test_mmap.py
+6
-6
test_subprocess.py
Lib/test/test_subprocess.py
+1
-1
test_xdrlib.py
Lib/test/test_xdrlib.py
+0
-1
msi.py
Tools/msi/msi.py
+1
-1
No files found.
Lib/UserString.py
Dosyayı görüntüle @
eba28bea
...
@@ -147,12 +147,12 @@ class MutableString(UserString):
...
@@ -147,12 +147,12 @@ class MutableString(UserString):
raise
TypeError
,
"unhashable type (it is mutable)"
raise
TypeError
,
"unhashable type (it is mutable)"
def
__setitem__
(
self
,
index
,
sub
):
def
__setitem__
(
self
,
index
,
sub
):
if
index
<
0
:
if
index
<
0
:
index
+=
len
(
self
.
data
)
index
+=
len
(
self
.
data
)
if
index
<
0
or
index
>=
len
(
self
.
data
):
raise
IndexError
if
index
<
0
or
index
>=
len
(
self
.
data
):
raise
IndexError
self
.
data
=
self
.
data
[:
index
]
+
sub
+
self
.
data
[
index
+
1
:]
self
.
data
=
self
.
data
[:
index
]
+
sub
+
self
.
data
[
index
+
1
:]
def
__delitem__
(
self
,
index
):
def
__delitem__
(
self
,
index
):
if
index
<
0
:
if
index
<
0
:
index
+=
len
(
self
.
data
)
index
+=
len
(
self
.
data
)
if
index
<
0
or
index
>=
len
(
self
.
data
):
raise
IndexError
if
index
<
0
or
index
>=
len
(
self
.
data
):
raise
IndexError
self
.
data
=
self
.
data
[:
index
]
+
self
.
data
[
index
+
1
:]
self
.
data
=
self
.
data
[:
index
]
+
self
.
data
[
index
+
1
:]
def
__setslice__
(
self
,
start
,
end
,
sub
):
def
__setslice__
(
self
,
start
,
end
,
sub
):
...
...
Lib/distutils/command/upload.py
Dosyayı görüntüle @
eba28bea
...
@@ -133,7 +133,7 @@ class upload(Command):
...
@@ -133,7 +133,7 @@ class upload(Command):
schema
,
netloc
,
url
,
params
,
query
,
fragments
=
\
schema
,
netloc
,
url
,
params
,
query
,
fragments
=
\
urlparse
.
urlparse
(
self
.
repository
)
urlparse
.
urlparse
(
self
.
repository
)
assert
not
params
and
not
query
and
not
fragments
assert
not
params
and
not
query
and
not
fragments
if
schema
==
'http'
:
if
schema
==
'http'
:
http
=
httplib
.
HTTPConnection
(
netloc
)
http
=
httplib
.
HTTPConnection
(
netloc
)
elif
schema
==
'https'
:
elif
schema
==
'https'
:
http
=
httplib
.
HTTPSConnection
(
netloc
)
http
=
httplib
.
HTTPSConnection
(
netloc
)
...
@@ -145,7 +145,7 @@ class upload(Command):
...
@@ -145,7 +145,7 @@ class upload(Command):
try
:
try
:
http
.
connect
()
http
.
connect
()
http
.
putrequest
(
"POST"
,
url
)
http
.
putrequest
(
"POST"
,
url
)
http
.
putheader
(
'Content-type'
,
http
.
putheader
(
'Content-type'
,
'multipart/form-data; boundary=
%
s'
%
boundary
)
'multipart/form-data; boundary=
%
s'
%
boundary
)
http
.
putheader
(
'Content-length'
,
str
(
len
(
body
)))
http
.
putheader
(
'Content-length'
,
str
(
len
(
body
)))
http
.
putheader
(
'Authorization'
,
auth
)
http
.
putheader
(
'Authorization'
,
auth
)
...
@@ -157,11 +157,10 @@ class upload(Command):
...
@@ -157,11 +157,10 @@ class upload(Command):
r
=
http
.
getresponse
()
r
=
http
.
getresponse
()
if
r
.
status
==
200
:
if
r
.
status
==
200
:
self
.
announce
(
'Server response (
%
s):
%
s'
%
(
r
.
status
,
r
.
reason
),
self
.
announce
(
'Server response (
%
s):
%
s'
%
(
r
.
status
,
r
.
reason
),
log
.
INFO
)
log
.
INFO
)
else
:
else
:
self
.
announce
(
'Upload failed (
%
s):
%
s'
%
(
r
.
status
,
r
.
reason
),
self
.
announce
(
'Upload failed (
%
s):
%
s'
%
(
r
.
status
,
r
.
reason
),
log
.
ERROR
)
log
.
ERROR
)
if
self
.
show_response
:
if
self
.
show_response
:
print
'-'
*
75
,
r
.
read
(),
'-'
*
75
print
'-'
*
75
,
r
.
read
(),
'-'
*
75
Lib/distutils/tests/test_dist.py
Dosyayı görüntüle @
eba28bea
...
@@ -175,7 +175,7 @@ class MetadataTestCase(unittest.TestCase):
...
@@ -175,7 +175,7 @@ class MetadataTestCase(unittest.TestCase):
{
"name"
:
"package"
,
{
"name"
:
"package"
,
"version"
:
"1.0"
,
"version"
:
"1.0"
,
"obsoletes"
:
[
"my.pkg (splat)"
]})
"obsoletes"
:
[
"my.pkg (splat)"
]})
def
format_metadata
(
self
,
dist
):
def
format_metadata
(
self
,
dist
):
sio
=
StringIO
.
StringIO
()
sio
=
StringIO
.
StringIO
()
dist
.
metadata
.
write_pkg_file
(
sio
)
dist
.
metadata
.
write_pkg_file
(
sio
)
...
...
Lib/distutils/tests/test_versionpredicate.py
Dosyayı görüntüle @
eba28bea
...
@@ -6,4 +6,4 @@ import distutils.versionpredicate
...
@@ -6,4 +6,4 @@ import distutils.versionpredicate
import
doctest
import
doctest
def
test_suite
():
def
test_suite
():
return
doctest
.
DocTestSuite
(
distutils
.
versionpredicate
)
return
doctest
.
DocTestSuite
(
distutils
.
versionpredicate
)
Lib/distutils/versionpredicate.py
Dosyayı görüntüle @
eba28bea
...
@@ -101,10 +101,10 @@ class VersionPredicate:
...
@@ -101,10 +101,10 @@ class VersionPredicate:
versionPredicateStr
=
versionPredicateStr
.
strip
()
versionPredicateStr
=
versionPredicateStr
.
strip
()
if
not
versionPredicateStr
:
if
not
versionPredicateStr
:
raise
ValueError
(
"empty package restriction"
)
raise
ValueError
(
"empty package restriction"
)
match
=
re_validPackage
.
match
(
versionPredicateStr
)
match
=
re_validPackage
.
match
(
versionPredicateStr
)
if
not
match
:
if
not
match
:
raise
ValueError
(
"bad package name in
%
r"
%
versionPredicateStr
)
raise
ValueError
(
"bad package name in
%
r"
%
versionPredicateStr
)
self
.
name
,
paren
=
match
.
groups
()
self
.
name
,
paren
=
match
.
groups
()
paren
=
paren
.
strip
()
paren
=
paren
.
strip
()
if
paren
:
if
paren
:
...
@@ -114,7 +114,7 @@ class VersionPredicate:
...
@@ -114,7 +114,7 @@ class VersionPredicate:
str
=
match
.
groups
()[
0
]
str
=
match
.
groups
()[
0
]
self
.
pred
=
[
splitUp
(
aPred
)
for
aPred
in
str
.
split
(
","
)]
self
.
pred
=
[
splitUp
(
aPred
)
for
aPred
in
str
.
split
(
","
)]
if
not
self
.
pred
:
if
not
self
.
pred
:
raise
ValueError
(
"empty parenthesized list in
%
r"
raise
ValueError
(
"empty parenthesized list in
%
r"
%
versionPredicateStr
)
%
versionPredicateStr
)
else
:
else
:
self
.
pred
=
[]
self
.
pred
=
[]
...
...
Lib/gzip.py
Dosyayı görüntüle @
eba28bea
...
@@ -333,8 +333,8 @@ class GzipFile:
...
@@ -333,8 +333,8 @@ class GzipFile:
def
flush
(
self
,
zlib_mode
=
zlib
.
Z_SYNC_FLUSH
):
def
flush
(
self
,
zlib_mode
=
zlib
.
Z_SYNC_FLUSH
):
if
self
.
mode
==
WRITE
:
if
self
.
mode
==
WRITE
:
# Ensure the compressor's buffer is flushed
# Ensure the compressor's buffer is flushed
self
.
fileobj
.
write
(
self
.
compress
.
flush
(
zlib_mode
))
self
.
fileobj
.
write
(
self
.
compress
.
flush
(
zlib_mode
))
self
.
fileobj
.
flush
()
self
.
fileobj
.
flush
()
def
fileno
(
self
):
def
fileno
(
self
):
...
...
Lib/subprocess.py
Dosyayı görüntüle @
eba28bea
...
@@ -626,14 +626,14 @@ class Popen(object):
...
@@ -626,14 +626,14 @@ class Popen(object):
process to terminate. The optional input argument should be a
process to terminate. The optional input argument should be a
string to be sent to the child process, or None, if no data
string to be sent to the child process, or None, if no data
should be sent to the child.
should be sent to the child.
communicate() returns a tuple (stdout, stderr)."""
communicate() returns a tuple (stdout, stderr)."""
# Optimization: If we are only using one pipe, or no pipe at
# Optimization: If we are only using one pipe, or no pipe at
# all, using select() or threads is unnecessary.
# all, using select() or threads is unnecessary.
if
[
self
.
stdin
,
self
.
stdout
,
self
.
stderr
]
.
count
(
None
)
>=
2
:
if
[
self
.
stdin
,
self
.
stdout
,
self
.
stderr
]
.
count
(
None
)
>=
2
:
stdout
=
None
stdout
=
None
stderr
=
None
stderr
=
None
if
self
.
stdin
:
if
self
.
stdin
:
if
input
:
if
input
:
self
.
stdin
.
write
(
input
)
self
.
stdin
.
write
(
input
)
...
@@ -644,7 +644,7 @@ class Popen(object):
...
@@ -644,7 +644,7 @@ class Popen(object):
stderr
=
self
.
stderr
.
read
()
stderr
=
self
.
stderr
.
read
()
self
.
wait
()
self
.
wait
()
return
(
stdout
,
stderr
)
return
(
stdout
,
stderr
)
return
self
.
_communicate
(
input
)
return
self
.
_communicate
(
input
)
...
...
Lib/tarfile.py
Dosyayı görüntüle @
eba28bea
...
@@ -665,7 +665,7 @@ class ExFileObject(object):
...
@@ -665,7 +665,7 @@ class ExFileObject(object):
if
not
result
:
if
not
result
:
raise
StopIteration
raise
StopIteration
return
result
return
result
#class ExFileObject
#class ExFileObject
#------------------
#------------------
...
...
Lib/test/regrtest.py
Dosyayı görüntüle @
eba28bea
...
@@ -93,7 +93,7 @@ resources to test. Currently only the following are defined:
...
@@ -93,7 +93,7 @@ resources to test. Currently only the following are defined:
in the standard library and test suite. This takes
in the standard library and test suite. This takes
a long time.
a long time.
subprocess Run all tests for the subprocess module.
subprocess Run all tests for the subprocess module.
To enable all resources except one, use '-uall,-<resource>'. For
To enable all resources except one, use '-uall,-<resource>'. For
example, to run all the tests except for the bsddb tests, give the
example, to run all the tests except for the bsddb tests, give the
...
...
Lib/test/test_functional.py
Dosyayı görüntüle @
eba28bea
...
@@ -139,7 +139,7 @@ class TestPartial(unittest.TestCase):
...
@@ -139,7 +139,7 @@ class TestPartial(unittest.TestCase):
self
.
assertEqual
(
join
(
data
),
'0123456789'
)
self
.
assertEqual
(
join
(
data
),
'0123456789'
)
join
=
self
.
thetype
(
''
.
join
)
join
=
self
.
thetype
(
''
.
join
)
self
.
assertEqual
(
join
(
data
),
'0123456789'
)
self
.
assertEqual
(
join
(
data
),
'0123456789'
)
class
PartialSubclass
(
functional
.
partial
):
class
PartialSubclass
(
functional
.
partial
):
pass
pass
...
...
Lib/test/test_mmap.py
Dosyayı görüntüle @
eba28bea
...
@@ -321,7 +321,7 @@ def test_both():
...
@@ -321,7 +321,7 @@ def test_both():
f
.
close
()
f
.
close
()
f
=
open
(
TESTFN
,
"rb+"
)
f
=
open
(
TESTFN
,
"rb+"
)
mf
=
mmap
.
mmap
(
f
.
fileno
(),
0
)
mf
=
mmap
.
mmap
(
f
.
fileno
(),
0
)
verify
(
len
(
mf
)
==
2
**
16
,
"Map size should equal file size."
)
verify
(
len
(
mf
)
==
2
**
16
,
"Map size should equal file size."
)
vereq
(
mf
.
read
(
2
**
16
),
2
**
16
*
"m"
)
vereq
(
mf
.
read
(
2
**
16
),
2
**
16
*
"m"
)
mf
.
close
()
mf
.
close
()
...
@@ -329,7 +329,7 @@ def test_both():
...
@@ -329,7 +329,7 @@ def test_both():
finally
:
finally
:
os
.
unlink
(
TESTFN
)
os
.
unlink
(
TESTFN
)
# test mapping of entire file by passing 0 for map length
# test mapping of entire file by passing 0 for map length
if
hasattr
(
os
,
"stat"
):
if
hasattr
(
os
,
"stat"
):
print
" Ensuring that passing 0 as map length sets map size to current file size."
print
" Ensuring that passing 0 as map length sets map size to current file size."
...
@@ -337,17 +337,17 @@ def test_both():
...
@@ -337,17 +337,17 @@ def test_both():
try
:
try
:
f
.
write
(
2
**
16
*
'm'
)
# Arbitrary character
f
.
write
(
2
**
16
*
'm'
)
# Arbitrary character
f
.
close
()
f
.
close
()
f
=
open
(
TESTFN
,
"rb+"
)
f
=
open
(
TESTFN
,
"rb+"
)
mf
=
mmap
.
mmap
(
f
.
fileno
(),
0
)
mf
=
mmap
.
mmap
(
f
.
fileno
(),
0
)
verify
(
len
(
mf
)
==
2
**
16
,
"Map size should equal file size."
)
verify
(
len
(
mf
)
==
2
**
16
,
"Map size should equal file size."
)
vereq
(
mf
.
read
(
2
**
16
),
2
**
16
*
"m"
)
vereq
(
mf
.
read
(
2
**
16
),
2
**
16
*
"m"
)
mf
.
close
()
mf
.
close
()
f
.
close
()
f
.
close
()
finally
:
finally
:
os
.
unlink
(
TESTFN
)
os
.
unlink
(
TESTFN
)
print
' Test passed'
print
' Test passed'
test_both
()
test_both
()
Lib/test/test_subprocess.py
Dosyayı görüntüle @
eba28bea
...
@@ -387,7 +387,7 @@ class ProcessTestCase(unittest.TestCase):
...
@@ -387,7 +387,7 @@ class ProcessTestCase(unittest.TestCase):
if
test_support
.
is_resource_enabled
(
"subprocess"
)
and
not
mswindows
:
if
test_support
.
is_resource_enabled
(
"subprocess"
)
and
not
mswindows
:
max_handles
=
1026
# too much for most UNIX systems
max_handles
=
1026
# too much for most UNIX systems
else
:
else
:
max_handles
=
65
max_handles
=
65
for
i
in
range
(
max_handles
):
for
i
in
range
(
max_handles
):
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
"import sys;sys.stdout.write(sys.stdin.read())"
],
"import sys;sys.stdout.write(sys.stdin.read())"
],
...
...
Lib/test/test_xdrlib.py
Dosyayı görüntüle @
eba28bea
import
xdrlib
import
xdrlib
xdrlib
.
_test
()
xdrlib
.
_test
()
Tools/msi/msi.py
Dosyayı görüntüle @
eba28bea
...
@@ -134,7 +134,7 @@ pythondll_uuid = {
...
@@ -134,7 +134,7 @@ pythondll_uuid = {
"24"
:
"{9B81E618-2301-4035-AC77-75D9ABEB7301}"
,
"24"
:
"{9B81E618-2301-4035-AC77-75D9ABEB7301}"
,
"25"
:
"{2e41b118-38bd-4c1b-a840-6977efd1b911}"
"25"
:
"{2e41b118-38bd-4c1b-a840-6977efd1b911}"
}
[
major
+
minor
]
}
[
major
+
minor
]
# Build the mingw import library, libpythonXY.a
# Build the mingw import library, libpythonXY.a
# This requires 'nm' and 'dlltool' executables on your PATH
# This requires 'nm' and 'dlltool' executables on your PATH
...
...
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