Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d68690

Browse files
committed
Added notes about the eventual disappearance of two-parameter bind(),
connect(), and connect_ex(). I didn't make these deprecation notices since it was never a documented feature.
1 parent b49dc75 commit 7d68690

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Doc/lib/libsocket.tex

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,11 @@ \subsection{Socket Objects \label{socket-objects}}
247247

248248
\begin{methoddesc}[socket]{bind}{address}
249249
Bind the socket to \var{address}. The socket must not already be bound.
250-
(The format of \var{address} depends on the address family --- see above.)
250+
(The format of \var{address} depends on the address family --- see
251+
above.) \strong{Note:} This method has historically accepted a pair
252+
of parameters for \constant{AF_INET} addresses instead of only a
253+
tuple. This was never intentional and will no longer be available in
254+
Python 1.7.
251255
\end{methoddesc}
252256

253257
\begin{methoddesc}[socket]{close}{}
@@ -259,7 +263,10 @@ \subsection{Socket Objects \label{socket-objects}}
259263
\begin{methoddesc}[socket]{connect}{address}
260264
Connect to a remote socket at \var{address}.
261265
(The format of \var{address} depends on the address family --- see
262-
above.)
266+
above.) \strong{Note:} This method has historically accepted a pair
267+
of parameters for \constant{AF_INET} addresses instead of only a
268+
tuple. This was never intentional and will no longer be available in
269+
Python 1.7.
263270
\end{methoddesc}
264271

265272
\begin{methoddesc}[socket]{connect_ex}{address}
@@ -269,6 +276,10 @@ \subsection{Socket Objects \label{socket-objects}}
269276
can still raise exceptions). The error indicator is \code{0} if the
270277
operation succeeded, otherwise the value of the \cdata{errno}
271278
variable. This is useful, e.g., for asynchronous connects.
279+
\strong{Note:} This method has historically accepted a pair of
280+
parameters for \constant{AF_INET} addresses instead of only a tuple.
281+
This was never intentional and will no longer be available in Python
282+
1.7.
272283
\end{methoddesc}
273284

274285
\begin{methoddesc}[socket]{fileno}{}

0 commit comments

Comments
 (0)