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
c2a0ac20
Kaydet (Commit)
c2a0ac20
authored
Şub 24, 2005
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #1049151: adding bool support to xdrlib.py.
Also add xdrlib._test into the test suite.
üst
bc2c21ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
6 deletions
+32
-6
test_xdrlib
Lib/test/output/test_xdrlib
+19
-0
test_sundry.py
Lib/test/test_sundry.py
+0
-1
test_xdrlib.py
Lib/test/test_xdrlib.py
+4
-0
xdrlib.py
Lib/xdrlib.py
+7
-5
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/output/test_xdrlib
0 → 100644
Dosyayı görüntüle @
c2a0ac20
test_xdrlib
pack test 0 succeeded
pack test 1 succeeded
pack test 2 succeeded
pack test 3 succeeded
pack test 4 succeeded
pack test 5 succeeded
pack test 6 succeeded
pack test 7 succeeded
pack test 8 succeeded
unpack test 0 succeeded : 9
unpack test 1 succeeded : True
unpack test 2 succeeded : False
unpack test 3 succeeded : 45
unpack test 4 succeeded : 1.89999997616
unpack test 5 succeeded : 1.9
unpack test 6 succeeded : hello world
unpack test 7 succeeded : [0, 1, 2, 3, 4]
unpack test 8 succeeded : ['what', 'is', 'hapnin', 'doctor']
Lib/test/test_sundry.py
Dosyayı görüntüle @
c2a0ac20
...
@@ -93,5 +93,4 @@ import urllib2
...
@@ -93,5 +93,4 @@ import urllib2
#import user
#import user
import
webbrowser
import
webbrowser
import
whichdb
import
whichdb
import
xdrlib
import
xml
import
xml
Lib/test/test_xdrlib.py
0 → 100644
Dosyayı görüntüle @
c2a0ac20
import
xdrlib
xdrlib
.
_test
()
Lib/xdrlib.py
Dosyayı görüntüle @
c2a0ac20
...
@@ -157,7 +157,9 @@ class Unpacker:
...
@@ -157,7 +157,9 @@ class Unpacker:
return
struct
.
unpack
(
'>l'
,
data
)[
0
]
return
struct
.
unpack
(
'>l'
,
data
)[
0
]
unpack_enum
=
unpack_int
unpack_enum
=
unpack_int
unpack_bool
=
unpack_int
def
unpack_bool
(
self
):
return
bool
(
self
.
unpack_int
())
def
unpack_uhyper
(
self
):
def
unpack_uhyper
(
self
):
hi
=
self
.
unpack_uint
()
hi
=
self
.
unpack_uint
()
...
@@ -232,8 +234,8 @@ def _test():
...
@@ -232,8 +234,8 @@ def _test():
p
=
Packer
()
p
=
Packer
()
packtest
=
[
packtest
=
[
(
p
.
pack_uint
,
(
9
,)),
(
p
.
pack_uint
,
(
9
,)),
(
p
.
pack_bool
,
(
Non
e
,)),
(
p
.
pack_bool
,
(
Tru
e
,)),
(
p
.
pack_bool
,
(
'hello'
,)),
(
p
.
pack_bool
,
(
False
,)),
(
p
.
pack_uhyper
,
(
45L
,)),
(
p
.
pack_uhyper
,
(
45L
,)),
(
p
.
pack_float
,
(
1.9
,)),
(
p
.
pack_float
,
(
1.9
,)),
(
p
.
pack_double
,
(
1.9
,)),
(
p
.
pack_double
,
(
1.9
,)),
...
@@ -257,8 +259,8 @@ def _test():
...
@@ -257,8 +259,8 @@ def _test():
up
=
Unpacker
(
data
)
up
=
Unpacker
(
data
)
unpacktest
=
[
unpacktest
=
[
(
up
.
unpack_uint
,
(),
lambda
x
:
x
==
9
),
(
up
.
unpack_uint
,
(),
lambda
x
:
x
==
9
),
(
up
.
unpack_bool
,
(),
lambda
x
:
not
x
),
(
up
.
unpack_bool
,
(),
lambda
x
:
x
is
True
),
(
up
.
unpack_bool
,
(),
lambda
x
:
x
),
(
up
.
unpack_bool
,
(),
lambda
x
:
x
is
False
),
(
up
.
unpack_uhyper
,
(),
lambda
x
:
x
==
45L
),
(
up
.
unpack_uhyper
,
(),
lambda
x
:
x
==
45L
),
(
up
.
unpack_float
,
(),
lambda
x
:
1.89
<
x
<
1.91
),
(
up
.
unpack_float
,
(),
lambda
x
:
1.89
<
x
<
1.91
),
(
up
.
unpack_double
,
(),
lambda
x
:
1.89
<
x
<
1.91
),
(
up
.
unpack_double
,
(),
lambda
x
:
1.89
<
x
<
1.91
),
...
...
Misc/NEWS
Dosyayı görüntüle @
c2a0ac20
...
@@ -54,6 +54,8 @@ Extension Modules
...
@@ -54,6 +54,8 @@ Extension Modules
Library
Library
-------
-------
- Patch #1049151: xdrlib now unpacks booleans as True or False.
- Fixed bug in a NameError bug in cookielib. Patch #1116583.
- Fixed bug in a NameError bug in cookielib. Patch #1116583.
- Applied a security fix to SimpleXMLRPCserver (PSF-2005-001). This
- Applied a security fix to SimpleXMLRPCserver (PSF-2005-001). This
...
...
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