| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
`socket.getblocking()` and `socket.gettimeout()` (GH-105026) (#105284)
gh-104882: Docs: fix description of relationship between `socket.getblocking()` and `socket.gettimeout()` (GH-105026)
(cherry picked from commit 5a5ed7a3e616a372f054a1dd2e9a31ba32a87a67)
Co-authored-by: Joe Geisbauer <joegeisbauer@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH-97950: Use new-style index directive ('object') (GH-104158)
* Uncomment object removal in pairindextypes
* Use new-style index directive ('object') - C API
* Use new-style index directive ('object') - Library
* Use new-style index directive ('object') - Reference
* Use new-style index directive ('object') - Tutorial
(cherry picked from commit 6ab463684b9d79880d98cd1f1406aa86af65985e)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(cherry picked from commit bceb9e00ad2998e5193ad5b477e92a114dd31024)
Co-authored-by: Tim Burke <tim.burke@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 1d1480fefc6ae77d14d6eff007b180ff5d1cd5d4)
Co-authored-by: Mehrdad Moradizadeh <mhrddmoradii@gmail.com>
|
|
|
|
|
|
|
|
| |
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit fa2d43e5184f5eaf3391844ec2400342a1b2ead4)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
type>) (GH-97768) (#97924)
:c:type:`<C type>` -> :c:expr:`<C type>`
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 0031e62973801d34a9e19ab7bb199e9668e32d7b)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
|
|
|
|
|
| |
Use `c:struct`
(cherry picked from commit a0f5599aac2037da715d09733e0a83a9cba7c37a)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
HTTPS (GH-95527) (GH-95643)
If an HTTP link is redirected to a same looking HTTPS link, the latter can
be used directly without changes in readability and behavior.
It protects from a men-in-the-middle attack.
This change does not affect Python examples..
(cherry picked from commit f79547a429d5c90af83a0da821e082cba20d4712)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit e3b6ff19aaa318a813130ba9ad2ab0a332f27feb)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
| |
(GH-94551) (GH-94557)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
(cherry picked from commit 3440d197a55800ecceea3e115e44b4262411359c)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
|
|
|
| |
package => packet
Co-authored-by: Victor Norman
(cherry picked from commit cdd39843073fc27b8e4a887d5d3b7992cb2ced60)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
| |
(cherry picked from commit 5247389369ac3da35c44f7c0d8f4facc0300883a)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 639b62c9c479e38a6f91a80b261097574a1e7ac7)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
| |
Fixes GH-91498
|
| |
|
| |
|
|
|
| |
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
* bpo-45772: socket.socket should be a class instead of a function
Currently `socket.socket` is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate `socket.socket` as a type.
|
|
|
|
|
| |
* add availability info to AF_PACKET section
* add availability for AF_QIPCRTR as well
|
|
|
| |
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't.
|
|
|
|
|
|
|
| |
Replace old names when they refer to actual versions of macOS.
Keep historical names in references to older versions.
Co-authored-by: Patrick Reader <_@pxeger.com>
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
| |
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
| |
It should be PACKET_MULTICAST, not PACKET_MULTIHOST.
|
|
|
|
| |
section (GH-22608)
|
|
|
|
|
|
|
|
|
| |
* Enum: streamline repr() and str(); improve docs
- repr() is now ``enum_class.member_name``
- stdlib global enums are ``module_name.member_name``
- str() is now ``member_name``
- add HOW-TO section for ``Enum``
- change main documentation to be an API reference
|
|
|
| |
Add IPPROTO_MPTCP constant when defined in the system headers.
|
|
|
|
| |
socket.ntohs and socket.htons (GH-23980)
|
| |
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.
For example, fix this Sphinx 3 issue:
Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them
|
|
|
|
| |
Add support for CAN_J1939 sockets that wrap SAE J1939 protocol
functionality provided by Linux 5.4+ kernels.
|
|
|
| |
Co-Authored-By: Stefan Tatschner <stefan@rumpelsepp.org>
|
|
|
| |
Automerge-Triggered-By: @asvetlov
|
|
|
|
|
|
|
|
|
|
|
| |
The previous double colon was wrongly place directly after Therefore.
Which produced a block without syntax highlighting. This fixes it
by separating the double colon from the text. As a result, sphinx now
properly highlights the python code.
https://bugs.python.org/issue39348
|
| |
|
|
|
| |
Also fix some other formatting.
|
|
|
|
|
|
|
| |
The socket module now has the socket.send_fds() and socket.recv.fds() functions.
Contributed by Joannah Nanjekye, Shinya Okano (original patch)
and Victor Stinner.
Co-Authored-By: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose the CAN_BCM SocketCAN constants used in the bcm_msg_head struct
flags (provided by <linux/can/bcm.h>) under the socket library.
This adds the following constants with a CAN_BCM prefix:
* SETTIMER
* STARTTIMER
* TX_COUNTEVT
* TX_ANNOUNCE
* TX_CP_CAN_ID
* RX_FILTER_ID
* RX_CHECK_DLC
* RX_NO_AUTOTIMER
* RX_ANNOUNCE_RESUME
* TX_RESET_MULTI_IDX
* RX_RTR_FRAME
* CAN_FD_FRAME
The CAN_FD_FRAME flag was introduced in the 4.8 kernel, while the other
ones were present since SocketCAN drivers were mainlined in 2.6.25. As
such, it is probably unnecessary to guard against these constants being
missing.
|
|
|
| |
Also updates some (unreleased) event names to be consistent with the others.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment you can definitely use UDPLITE sockets on Linux systems, but it would be good if this support were formalized such that you can detect support at runtime easily.
At the moment, to make and use a UDPLITE socket requires something like the following code:
```
>>> import socket
>>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
>>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
>>> a.bind(('localhost', 44444))
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.setsockopt(136, 10, 16)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.setsockopt(136, 10, 32)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.setsockopt(136, 10, 64)
>>> b.sendto(b'test'*256, ('localhost', 44444))
```
If you look at this through Wireshark, you can see that the packets are different in that the checksums and checksum coverages change.
With the pull request that I am submitting momentarily, you could do the following code instead:
```
>>> import socket
>>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
>>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
>>> a.bind(('localhost', 44444))
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.set_send_checksum_coverage(16)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.set_send_checksum_coverage(32)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.set_send_checksum_coverage(64)
>>> b.sendto(b'test'*256, ('localhost', 44444))
```
One can also detect support for UDPLITE just by checking
```
>>> hasattr(socket, 'IPPROTO_UDPLITE')
```
https://bugs.python.org/issue37345
|
|
|
|
| |
if_nameindex() on Windows (GH-13522)
|
|
|
|
| |
There is an extra "one" in the text description for the constant
socket.CAN_RAW_FD_FRAMES
|