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
e39bba2a
Kaydet (Commit)
e39bba2a
authored
Kas 30, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.4 (#22960)
üst
3a9c68e6
c1da3d1e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
xmlrpc.client.rst
Doc/library/xmlrpc.client.rst
+8
-3
client.py
Lib/xmlrpc/client.py
+12
-3
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/xmlrpc.client.rst
Dosyayı görüntüle @
e39bba2a
...
...
@@ -27,14 +27,14 @@ between conformable Python objects and XML on the wire.
constructed data. If you need to parse untrusted or unauthenticated data see
:ref:`xml-vulnerabilities`.
.. versionchanged:: 3.
4.3
.. versionchanged:: 3.
5
For https URIs, :mod:`xmlrpc.client` now performs all the necessary
certificate and hostname checks by default
.. class:: ServerProxy(uri, transport=None, encoding=None, verbose=False, \
allow_none=False, use_datetime=False, \
use_builtin_types=False)
use_builtin_types=False
, context=None
)
.. versionchanged:: 3.3
The *use_builtin_types* flag was added.
...
...
@@ -63,7 +63,9 @@ between conformable Python objects and XML on the wire.
portion will be base64-encoded as an HTTP 'Authorization' header, and sent to
the remote server as part of the connection process when invoking an XML-RPC
method. You only need to use this if the remote server requires a Basic
Authentication user and password.
Authentication user and password. If an HTTPS url is provided, *context* may
be :class:`ssl.SSLContext` and configures the SSL settings of the underlying
HTTPS connection.
The returned instance is a proxy object with methods that can be used to invoke
corresponding RPC calls on the remote server. If the remote server supports the
...
...
@@ -127,6 +129,9 @@ between conformable Python objects and XML on the wire.
:class:`Server` is retained as an alias for :class:`ServerProxy` for backwards
compatibility. New code should use :class:`ServerProxy`.
.. versionchanged:: 3.5
Added the *context* argument.
.. seealso::
...
...
Lib/xmlrpc/client.py
Dosyayı görüntüle @
e39bba2a
...
...
@@ -1324,6 +1324,11 @@ class Transport:
class
SafeTransport
(
Transport
):
"""Handles an HTTPS transaction to an XML-RPC server."""
def
__init__
(
self
,
use_datetime
=
False
,
use_builtin_types
=
False
,
*
,
context
=
None
):
super
()
.
__init__
(
use_datetime
=
use_datetime
,
use_builtin_types
=
use_builtin_types
)
self
.
context
=
context
# FIXME: mostly untested
def
make_connection
(
self
,
host
):
...
...
@@ -1337,7 +1342,7 @@ class SafeTransport(Transport):
# host may be a string, or a (host, x509-dict) tuple
chost
,
self
.
_extra_headers
,
x509
=
self
.
get_host_info
(
host
)
self
.
_connection
=
host
,
http
.
client
.
HTTPSConnection
(
chost
,
None
,
**
(
x509
or
{}))
None
,
context
=
self
.
context
,
**
(
x509
or
{}))
return
self
.
_connection
[
1
]
##
...
...
@@ -1380,7 +1385,8 @@ class ServerProxy:
"""
def
__init__
(
self
,
uri
,
transport
=
None
,
encoding
=
None
,
verbose
=
False
,
allow_none
=
False
,
use_datetime
=
False
,
use_builtin_types
=
False
):
allow_none
=
False
,
use_datetime
=
False
,
use_builtin_types
=
False
,
*
,
context
=
None
):
# establish a "logical" server connection
# get the url
...
...
@@ -1394,10 +1400,13 @@ class ServerProxy:
if
transport
is
None
:
if
type
==
"https"
:
handler
=
SafeTransport
extra_kwargs
=
{
"context"
:
context
}
else
:
handler
=
Transport
extra_kwargs
=
{}
transport
=
handler
(
use_datetime
=
use_datetime
,
use_builtin_types
=
use_builtin_types
)
use_builtin_types
=
use_builtin_types
,
**
extra_kwargs
)
self
.
__transport
=
transport
self
.
__encoding
=
encoding
or
'utf-8'
...
...
Misc/NEWS
Dosyayı görüntüle @
e39bba2a
...
...
@@ -191,6 +191,8 @@ Core and Builtins
Library
-------
-
Issue
#
22960
:
Add
a
context
argument
to
xmlrpclib
.
ServerProxy
constructor
.
-
Issue
#
22389
:
Add
contextlib
.
redirect_stderr
().
-
Issue
#
21356
:
Make
ssl
.
RAND_egd
()
optional
to
support
LibreSSL
.
The
...
...
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