git: ce879d543f8c - main - lang/python311: fix order of divert(4) commits

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Tue, 13 Oct 2026 20:10:33 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ce879d543f8cd1b0dd51eaeefa016a062746cf23

commit ce879d543f8cd1b0dd51eaeefa016a062746cf23
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2026-10-13 20:06:00 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2026-10-13 20:09:26 +0000

    lang/python311: fix order of divert(4) commits
    
    Use https://github.com/python/cpython/pull/96536 directly
    
    PR: 267648, 298106
---
 lang/python311/Makefile                            |  5 ++--
 lang/python311/distinfo                            |  4 ++-
 lang/python311/files/patch-Modules__socketmodule.c | 29 ----------------------
 3 files changed, 6 insertions(+), 32 deletions(-)

diff --git a/lang/python311/Makefile b/lang/python311/Makefile
index 30e88be732f6..ab5b0b2cd3aa 100644
--- a/lang/python311/Makefile
+++ b/lang/python311/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	python
 DISTVERSION=	${PYTHON_DISTVERSION}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	lang python
 MASTER_SITES=	PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//}
 PKGNAMESUFFIX=	${PYTHON_SUFFIX}
@@ -8,7 +8,8 @@ DISTNAME=	Python-${DISTVERSION}
 DIST_SUBDIR=	python
 
 PATCH_SITES=	https://github.com/python/cpython/commit/
-PATCHFILES=	7f936694dbc0dc0dbb07d98fa668776c4e4ca595.patch:-p1 \
+PATCHFILES=	b17d32c1142d16a5fea0c95bce185bf9be696491.patch:-p1 \
+		7f936694dbc0dc0dbb07d98fa668776c4e4ca595.patch:-p1 \
 		43e495d6f4e0efe6e7a54625d559f2f656f36916.patch:-p1
 
 MAINTAINER=	python@FreeBSD.org
diff --git a/lang/python311/distinfo b/lang/python311/distinfo
index 763d7e41745a..8223134637e6 100644
--- a/lang/python311/distinfo
+++ b/lang/python311/distinfo
@@ -1,6 +1,8 @@
-TIMESTAMP = 1791919996
+TIMESTAMP = 1791922082
 SHA256 (python/Python-3.11.16.tar.xz) = 91bcdebfdde239a003ae93738a7fce0f9230fee5c4bc2b86f6e6e8c6f98aabe8
 SIZE (python/Python-3.11.16.tar.xz) = 20328716
+SHA256 (python/b17d32c1142d16a5fea0c95bce185bf9be696491.patch) = 421ab0ff37cad6eaea382058e3de3641f6e9b34a4fc460005e4201215e605fcc
+SIZE (python/b17d32c1142d16a5fea0c95bce185bf9be696491.patch) = 2298
 SHA256 (python/7f936694dbc0dc0dbb07d98fa668776c4e4ca595.patch) = 489dcef57f3a208c4f5767bd5703b625f9f79248f69d207e101f31cb47b6cdbe
 SIZE (python/7f936694dbc0dc0dbb07d98fa668776c4e4ca595.patch) = 1757
 SHA256 (python/43e495d6f4e0efe6e7a54625d559f2f656f36916.patch) = 733978a65d2ef56ae0ec953a4f6130665090a266ec63b4c52ee9b3bd5263839f
diff --git a/lang/python311/files/patch-Modules__socketmodule.c b/lang/python311/files/patch-Modules__socketmodule.c
deleted file mode 100644
index 93ef3b785ab9..000000000000
--- a/lang/python311/files/patch-Modules__socketmodule.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- Modules/socketmodule.c
-+++ Modules/socketmodule.c
-@@ -1850,6 +1850,11 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
-         /* RDS sockets use sockaddr_in: fall-through */
- #endif /* AF_RDS */
- 
-+#ifdef AF_DIVERT
-+    case AF_DIVERT:
-+        /* FreeBSD divert(4) sockets use sockaddr_in: fall-through */
-+#endif /* AF_DIVERT */
-+
-     case AF_INET:
-     {
-         struct maybe_idna host = {NULL, NULL};
-@@ -7628,6 +7633,14 @@ PyInit__socket(void)
-     PyModule_AddIntMacro(m, AF_SYSTEM);
- #endif
- 
-+/* FreeBSD divert(4) */
-+#ifdef PF_DIVERT
-+    PyModule_AddIntMacro(m, PF_DIVERT);
-+#endif
-+#ifdef AF_DIVERT
-+    PyModule_AddIntMacro(m, AF_DIVERT);
-+#endif
-+
- #ifdef AF_PACKET
-     PyModule_AddIntMacro(m, AF_PACKET);
- #endif