Skip to content

Commit 2e58474

Browse files
committed
docs/usocket: Deconditionalize.
Notes on WiPy incompatibilities with the standard socket module API are moved under "Known issues" to its documentation.
1 parent 3acace5 commit 2e58474

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

docs/library/usocket.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ Functions
4141

4242
Create a new socket using the given address family, socket type and protocol number.
4343

44-
.. only:: port_wipy
45-
46-
.. note::
47-
48-
SSL sockets need to be created the following way before wrapping them with
49-
``ssl.wrap_socket``::
50-
51-
import socket
52-
import ssl
53-
s = socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC)
54-
ss = ssl.wrap_socket(s)
55-
5644
.. function:: socket.getaddrinfo(host, port)
5745

5846
Translate the host/port argument into a sequence of 5-tuples that contain all the

docs/wipy/general.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,17 @@ Additional Pin methods:
239239

240240
Returns a list of the alternate functions supported by the pin. List items are
241241
a tuple of the form: ``('ALT_FUN_NAME', ALT_FUN_INDEX)``
242+
243+
Known issues
244+
------------
245+
246+
Incompatible way to create SSL sockets
247+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
248+
249+
SSL sockets need to be created the following way before wrapping them with.
250+
``ssl.wrap_socket``::
251+
252+
import socket
253+
import ssl
254+
s = socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC)
255+
ss = ssl.wrap_socket(s)

0 commit comments

Comments
 (0)