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
56abe390
Kaydet (Commit)
56abe390
authored
Şub 15, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge heads
üst
85c30336
3cd30c2c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
15 deletions
+39
-15
binascii.rst
Doc/library/binascii.rst
+0
-6
server.py
Lib/http/server.py
+4
-1
test_gdb.py
Lib/test/test_gdb.py
+2
-0
test_httpservers.py
Lib/test/test_httpservers.py
+14
-0
test_zipfile.py
Lib/test/test_zipfile.py
+8
-0
binascii.c
Modules/binascii.c
+2
-2
frozenmain.c
Python/frozenmain.c
+9
-6
No files found.
Doc/library/binascii.rst
Dosyayı görüntüle @
56abe390
...
@@ -65,9 +65,6 @@ The :mod:`binascii` module defines the following functions:
...
@@ -65,9 +65,6 @@ The :mod:`binascii` module defines the following functions:
data. More than one line may be passed at a time. If the optional argument
data. More than one line may be passed at a time. If the optional argument
*header* is present and true, underscores will be decoded as spaces.
*header* is present and true, underscores will be decoded as spaces.
.. versionchanged:: 3.2
Accept only bytestring or bytearray objects as input.
.. function:: b2a_qp(data, quotetabs=False, istext=True, header=False)
.. function:: b2a_qp(data, quotetabs=False, istext=True, header=False)
...
@@ -156,9 +153,6 @@ The :mod:`binascii` module defines the following functions:
...
@@ -156,9 +153,6 @@ The :mod:`binascii` module defines the following functions:
of hexadecimal digits (which can be upper or lower case), otherwise a
of hexadecimal digits (which can be upper or lower case), otherwise a
:exc:`TypeError` is raised.
:exc:`TypeError` is raised.
.. versionchanged:: 3.2
Accept only bytestring or bytearray objects as input.
.. exception:: Error
.. exception:: Error
...
...
Lib/http/server.py
Dosyayı görüntüle @
56abe390
...
@@ -82,7 +82,10 @@ XXX To do:
...
@@ -82,7 +82,10 @@ XXX To do:
__version__
=
"0.6"
__version__
=
"0.6"
__all__
=
[
"HTTPServer"
,
"BaseHTTPRequestHandler"
]
__all__
=
[
"HTTPServer"
,
"BaseHTTPRequestHandler"
,
"SimpleHTTPRequestHandler"
,
"CGIHTTPRequestHandler"
,
]
import
html
import
html
import
http.client
import
http.client
...
...
Lib/test/test_gdb.py
Dosyayı görüntüle @
56abe390
...
@@ -190,6 +190,8 @@ class DebuggerTests(unittest.TestCase):
...
@@ -190,6 +190,8 @@ class DebuggerTests(unittest.TestCase):
'linux-vdso.so'
,
'linux-vdso.so'
,
'warning: Could not load shared library symbols for '
'warning: Could not load shared library symbols for '
'linux-gate.so'
,
'linux-gate.so'
,
'warning: Could not load shared library symbols for '
'linux-vdso64.so'
,
'Do you need "set solib-search-path" or '
'Do you need "set solib-search-path" or '
'"set sysroot"?'
,
'"set sysroot"?'
,
'warning: Source file is more recent than executable.'
,
'warning: Source file is more recent than executable.'
,
...
...
Lib/test/test_httpservers.py
Dosyayı görüntüle @
56abe390
...
@@ -760,6 +760,19 @@ class SimpleHTTPRequestHandlerTestCase(unittest.TestCase):
...
@@ -760,6 +760,19 @@ class SimpleHTTPRequestHandlerTestCase(unittest.TestCase):
self
.
assertEqual
(
path
,
self
.
translated
)
self
.
assertEqual
(
path
,
self
.
translated
)
class
MiscTestCase
(
unittest
.
TestCase
):
def
test_all
(
self
):
expected
=
[]
blacklist
=
{
'executable'
,
'nobody_uid'
,
'test'
}
for
name
in
dir
(
server
):
if
name
.
startswith
(
'_'
)
or
name
in
blacklist
:
continue
module_object
=
getattr
(
server
,
name
)
if
getattr
(
module_object
,
'__module__'
,
None
)
==
'http.server'
:
expected
.
append
(
name
)
self
.
assertCountEqual
(
server
.
__all__
,
expected
)
def
test_main
(
verbose
=
None
):
def
test_main
(
verbose
=
None
):
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
try
:
try
:
...
@@ -769,6 +782,7 @@ def test_main(verbose=None):
...
@@ -769,6 +782,7 @@ def test_main(verbose=None):
SimpleHTTPServerTestCase
,
SimpleHTTPServerTestCase
,
CGIHTTPServerTestCase
,
CGIHTTPServerTestCase
,
SimpleHTTPRequestHandlerTestCase
,
SimpleHTTPRequestHandlerTestCase
,
MiscTestCase
,
)
)
finally
:
finally
:
os
.
chdir
(
cwd
)
os
.
chdir
(
cwd
)
...
...
Lib/test/test_zipfile.py
Dosyayı görüntüle @
56abe390
...
@@ -648,7 +648,12 @@ class PyZipFileTests(unittest.TestCase):
...
@@ -648,7 +648,12 @@ class PyZipFileTests(unittest.TestCase):
if
name
+
'o'
not
in
namelist
:
if
name
+
'o'
not
in
namelist
:
self
.
assertIn
(
name
+
'c'
,
namelist
)
self
.
assertIn
(
name
+
'c'
,
namelist
)
def
requiresWriteAccess
(
self
,
path
):
if
not
os
.
access
(
path
,
os
.
W_OK
,
effective_ids
=
True
):
self
.
skipTest
(
'requires write access to the installed location'
)
def
test_write_pyfile
(
self
):
def
test_write_pyfile
(
self
):
self
.
requiresWriteAccess
(
os
.
path
.
dirname
(
__file__
))
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
fn
=
__file__
fn
=
__file__
if
fn
.
endswith
(
'.pyc'
)
or
fn
.
endswith
(
'.pyo'
):
if
fn
.
endswith
(
'.pyc'
)
or
fn
.
endswith
(
'.pyo'
):
...
@@ -680,6 +685,7 @@ class PyZipFileTests(unittest.TestCase):
...
@@ -680,6 +685,7 @@ class PyZipFileTests(unittest.TestCase):
def
test_write_python_package
(
self
):
def
test_write_python_package
(
self
):
import
email
import
email
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
self
.
requiresWriteAccess
(
packagedir
)
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
zipfp
.
writepy
(
packagedir
)
zipfp
.
writepy
(
packagedir
)
...
@@ -693,6 +699,7 @@ class PyZipFileTests(unittest.TestCase):
...
@@ -693,6 +699,7 @@ class PyZipFileTests(unittest.TestCase):
def
test_write_filtered_python_package
(
self
):
def
test_write_filtered_python_package
(
self
):
import
test
import
test
packagedir
=
os
.
path
.
dirname
(
test
.
__file__
)
packagedir
=
os
.
path
.
dirname
(
test
.
__file__
)
self
.
requiresWriteAccess
(
packagedir
)
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
...
@@ -721,6 +728,7 @@ class PyZipFileTests(unittest.TestCase):
...
@@ -721,6 +728,7 @@ class PyZipFileTests(unittest.TestCase):
def
test_write_with_optimization
(
self
):
def
test_write_with_optimization
(
self
):
import
email
import
email
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
self
.
requiresWriteAccess
(
packagedir
)
# use .pyc if running test in optimization mode,
# use .pyc if running test in optimization mode,
# use .pyo if running test in debug mode
# use .pyo if running test in debug mode
optlevel
=
1
if
__debug__
else
0
optlevel
=
1
if
__debug__
else
0
...
...
Modules/binascii.c
Dosyayı görüntüle @
56abe390
...
@@ -228,13 +228,13 @@ ascii_buffer_converter(PyObject *arg, Py_buffer *buf)
...
@@ -228,13 +228,13 @@ ascii_buffer_converter(PyObject *arg, Py_buffer *buf)
if
(
PyObject_GetBuffer
(
arg
,
buf
,
PyBUF_SIMPLE
)
!=
0
)
{
if
(
PyObject_GetBuffer
(
arg
,
buf
,
PyBUF_SIMPLE
)
!=
0
)
{
PyErr_Format
(
PyExc_TypeError
,
PyErr_Format
(
PyExc_TypeError
,
"argument should be bytes, buffer or ASCII string, "
"argument should be bytes, buffer or ASCII string, "
"not
%R"
,
Py_TYPE
(
arg
)
);
"not
'%.100s'"
,
Py_TYPE
(
arg
)
->
tp_name
);
return
0
;
return
0
;
}
}
if
(
!
PyBuffer_IsContiguous
(
buf
,
'C'
))
{
if
(
!
PyBuffer_IsContiguous
(
buf
,
'C'
))
{
PyErr_Format
(
PyExc_TypeError
,
PyErr_Format
(
PyExc_TypeError
,
"argument should be a contiguous buffer, "
"argument should be a contiguous buffer, "
"not
%R"
,
Py_TYPE
(
arg
)
);
"not
'%.100s'"
,
Py_TYPE
(
arg
)
->
tp_name
);
PyBuffer_Release
(
buf
);
PyBuffer_Release
(
buf
);
return
0
;
return
0
;
}
}
...
...
Python/frozenmain.c
Dosyayı görüntüle @
56abe390
...
@@ -24,11 +24,13 @@ Py_FrozenMain(int argc, char **argv)
...
@@ -24,11 +24,13 @@ Py_FrozenMain(int argc, char **argv)
/* We need a second copies, as Python might modify the first one. */
/* We need a second copies, as Python might modify the first one. */
wchar_t
**
argv_copy2
=
NULL
;
wchar_t
**
argv_copy2
=
NULL
;
argv_copy
=
PyMem_RawMalloc
(
sizeof
(
wchar_t
*
)
*
argc
);
if
(
argc
>
0
)
{
argv_copy2
=
PyMem_RawMalloc
(
sizeof
(
wchar_t
*
)
*
argc
);
argv_copy
=
PyMem_RawMalloc
(
sizeof
(
wchar_t
*
)
*
argc
);
if
(
!
argv_copy
||
!
argv_copy2
)
{
argv_copy2
=
PyMem_RawMalloc
(
sizeof
(
wchar_t
*
)
*
argc
);
fprintf
(
stderr
,
"out of memory
\n
"
);
if
(
!
argv_copy
||
!
argv_copy2
)
{
goto
error
;
fprintf
(
stderr
,
"out of memory
\n
"
);
goto
error
;
}
}
}
Py_FrozenFlag
=
1
;
/* Suppress errors from getpath.c */
Py_FrozenFlag
=
1
;
/* Suppress errors from getpath.c */
...
@@ -68,7 +70,8 @@ Py_FrozenMain(int argc, char **argv)
...
@@ -68,7 +70,8 @@ Py_FrozenMain(int argc, char **argv)
#ifdef MS_WINDOWS
#ifdef MS_WINDOWS
PyInitFrozenExtensions
();
PyInitFrozenExtensions
();
#endif
/* MS_WINDOWS */
#endif
/* MS_WINDOWS */
Py_SetProgramName
(
argv_copy
[
0
]);
if
(
argc
>=
1
)
Py_SetProgramName
(
argv_copy
[
0
]);
Py_Initialize
();
Py_Initialize
();
#ifdef MS_WINDOWS
#ifdef MS_WINDOWS
PyWinFreeze_ExeInit
();
PyWinFreeze_ExeInit
();
...
...
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