Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Doc/using/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ on using nuget. What follows is a summary that is sufficient for Python
developers.

The ``nuget.exe`` command line tool may be downloaded directly from
``https://aka.ms/nugetclidl``, for example, using curl or PowerShell. With the
``https://dist.nuget.org/win-x86-commandline/latest/nuget.exe``, for example,
using curl or PowerShell. With the
tool, the latest version of Python for 64-bit or 32-bit machines is installed
using::

Expand Down
21 changes: 20 additions & 1 deletion Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,25 @@ def _have_socket_bluetooth():
return True


def _have_udp_lite():
if not hasattr(socket, "IPPROTO_UDPLITE"):
return False
# Older Android versions block UDPLITE with SELinux.
if support.is_android and platform.android_ver().api_level < 29:
return False

try:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
except OSError as exc:
# Linux 7.1 removed UDP Lite support
if exc.errno == errno.EPROTONOSUPPORT:
return False
raise
sock.close()

return True


@contextlib.contextmanager
def socket_setdefaulttimeout(timeout):
old_timeout = socket.getdefaulttimeout()
Expand All @@ -166,7 +185,7 @@ def socket_setdefaulttimeout(timeout):

HAVE_SOCKET_VSOCK = _have_socket_vsock()

HAVE_SOCKET_UDPLITE = hasattr(socket, "IPPROTO_UDPLITE")
HAVE_SOCKET_UDPLITE = _have_udp_lite()

HAVE_SOCKET_BLUETOOTH = _have_socket_bluetooth()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update Windows build and installer tooling and documentation to use the
current download URL for ``nuget.exe``.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if it's
not supported. Patch by Victor Stinner.
2 changes: 1 addition & 1 deletion PCbuild/find_python.bat
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
@set _Py_HOST_PYTHON=%HOST_PYTHON%
@if "%_Py_HOST_PYTHON%"=="" set _Py_HOST_PYTHON=py
@if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe)
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl)
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe)
@if NOT exist "%_Py_NUGET%" (
@echo Downloading nuget...
@rem NB: Must use single quotes around NUGET here, NOT double!
Expand Down
2 changes: 1 addition & 1 deletion Tools/msi/get_externals.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set HERE=%~dp0
if "%PCBUILD%"=="" (set PCBUILD=%HERE%..\..\PCbuild\)
if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%HERE%..\..\externals\windows-installer)
if "%NUGET%"=="" (set NUGET=%EXTERNALS_DIR%\..\nuget.exe)
if "%NUGET_URL%"=="" (set NUGET_URL=https://aka.ms/nugetclidl)
if "%NUGET_URL%"=="" (set NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe)

set DO_FETCH=true
set DO_CLEAN=false
Expand Down
Loading