MINGW-packages/mingw-w64-python3.13/0174-Do-ne-sys-module-flags-underscored.patch
Christoph Reiter 04c9ed3700 python3.13: Add 3.13.7
* add libb2 as dep
* remove "-Wl,--large-address-aware", default now via makepkg
* remove 2to3 logic, no longer in Python
2025-09-08 22:02:30 +02:00

69 lines
2.5 KiB
Diff

From 381216bd42159bb073c74b011371641869f95976 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Sat, 6 Sep 2025 11:08:12 +0300
Subject: [PATCH 174/N] Do ne sys module flags underscored
---
Lib/ntpath.py | 2 +-
Python/sysmodule.c | 8 ++++----
mingw_smoketests.py | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 1064871..27c2d5d 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -20,7 +20,7 @@ import sys
import genericpath
from genericpath import *
-if sys.use_alt_sep:
+if sys._use_alt_sep:
sep = '/'
altsep = '\\'
else:
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 83a6d98..0296416 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -3163,13 +3163,13 @@ hash_info -- a named tuple with information about the hash algorithm.\n\
hexversion -- version information encoded as a single integer\n\
implementation -- Python implementation information.\n\
int_info -- a named tuple with information about the int implementation.\n\
-is_mingw -- integer value if Python builded with mingw-w64 toolchain\n\
+_is_mingw -- integer value if Python builded with mingw-w64 toolchain\n\
maxsize -- the largest supported length of containers.\n\
maxunicode -- the value of the largest Unicode code point\n\
platform -- platform identifier\n\
prefix -- prefix used to find the Python library\n\
thread_info -- a named tuple with information about the thread implementation.\n\
-use_alt_sep -- indicate if need use posix style path setparator for path normalize\n\
+_use_alt_sep -- indicate if need use posix style path setparator for path normalize\n\
version -- the version of this interpreter as a string\n\
version_info -- version information as a named tuple\n\
"
@@ -3647,8 +3647,8 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict)
SET_SYS_FROM_STRING("byteorder", "little");
#endif
- SET_SYS("is_mingw", PyLong_FromLong(is_mingw_platform()));
- SET_SYS("use_alt_sep", PyLong_FromLong(use_alt_sep()));
+ SET_SYS("_is_mingw", PyLong_FromLong(is_mingw_platform()));
+ SET_SYS("_use_alt_sep", PyLong_FromLong(use_alt_sep()));
#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED)
SET_SYS("dllhandle", PyLong_FromVoidPtr(PyWin_DLLhModule));
diff --git a/mingw_smoketests.py b/mingw_smoketests.py
index c8ba089..18db3b5 100644
--- a/mingw_smoketests.py
+++ b/mingw_smoketests.py
@@ -30,7 +30,7 @@ import os
import unittest
import sysconfig
-if sys.use_alt_sep:
+if sys._use_alt_sep:
SEP = "/"
else:
SEP = "\\"