treewide: remove unreferenced patch files

This commit is contained in:
Peder Bergebakken Sundt 2025-05-25 00:46:15 +02:00
parent 43e18bf80d
commit 851756b3af
12 changed files with 0 additions and 2269 deletions

View file

@ -1,112 +0,0 @@
diff --git a/Makefile.in b/Makefile.in
index 8f33aa2ff4..39928382da 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4358,7 +4358,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS = \
monodll_msw_utils.o \
monodll_utilsexc.o \
monodll_fswatcher.o \
- monodll_msw_secretstore.o
+ monodll_msw_secretstore.o \
monodll_msw_uilocale.o
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
@COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS \
@@ -5284,7 +5284,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS = \
monodll_uuid.o \
monodll_msw_evtloop.o \
monodll_access.o \
- monodll_dark_mode.o
+ monodll_dark_mode.o \
monodll_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS = \
@@ -6196,7 +6196,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1 = \
monodll_uuid.o \
monodll_msw_evtloop.o \
monodll_access.o \
- monodll_dark_mode.o
+ monodll_dark_mode.o \
monodll_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_1 = \
@@ -6371,7 +6371,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 = \
monolib_msw_utils.o \
monolib_utilsexc.o \
monolib_fswatcher.o \
- monolib_msw_secretstore.o
+ monolib_msw_secretstore.o \
monolib_msw_uilocale.o
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
@COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_1 \
@@ -7297,7 +7297,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2 = \
monolib_uuid.o \
monolib_msw_evtloop.o \
monolib_access.o \
- monolib_dark_mode.o
+ monolib_dark_mode.o \
monolib_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_2 = \
@@ -8209,7 +8209,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3 = \
monolib_uuid.o \
monolib_msw_evtloop.o \
monolib_access.o \
- monolib_dark_mode.o
+ monolib_dark_mode.o \
monolib_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_3 = \
@@ -8436,7 +8436,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2 = \
basedll_msw_utils.o \
basedll_utilsexc.o \
basedll_fswatcher.o \
- basedll_msw_secretstore.o
+ basedll_msw_secretstore.o \
basedll_msw_uilocale.o
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
@COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_2 \
@@ -8523,7 +8523,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3 = \
baselib_msw_utils.o \
baselib_utilsexc.o \
baselib_fswatcher.o \
- baselib_msw_secretstore.o
+ baselib_msw_secretstore.o \
baselib_msw_uilocale.o
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
@COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_3 \
@@ -9464,7 +9464,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4 = \
coredll_uuid.o \
coredll_msw_evtloop.o \
coredll_access.o \
- coredll_dark_mode.o
+ coredll_dark_mode.o \
coredll_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_4 = \
@@ -10376,7 +10376,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5 = \
coredll_uuid.o \
coredll_msw_evtloop.o \
coredll_access.o \
- coredll_dark_mode.o
+ coredll_dark_mode.o \
coredll_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_5 = \
@@ -11204,7 +11204,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6 = \
corelib_uuid.o \
corelib_msw_evtloop.o \
corelib_access.o \
- corelib_dark_mode.o
+ corelib_dark_mode.o \
corelib_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_6 = \
@@ -12116,7 +12116,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7 = \
corelib_uuid.o \
corelib_msw_evtloop.o \
corelib_access.o \
- corelib_dark_mode.o
+ corelib_dark_mode.o \
corelib_msw_bmpbndl.o
@COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
@COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_7 = \

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
From 41e750142b44465f3af197b7e2f0d6f54fc48c2d Mon Sep 17 00:00:00 2001
From: OPNA2608 <opna2608@protonmail.com>
Date: Mon, 21 Oct 2024 17:42:24 +0200
Subject: [PATCH] Mark Lua symbols as C symbols
Otherwise linking against our Lua built by a C-compiler fails due to the symbols being resolved as C++ symbols.
---
interpreter.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/interpreter.h b/interpreter.h
index 6c405a1..c471ecb 100644
--- a/interpreter.h
+++ b/interpreter.h
@@ -9,9 +9,11 @@
#define INTERPRETER_H_
// Due to longjmp behaviour, we must build Lua as C++ to avoid UB
+extern "C" {
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
+}
#include "common.h"
#include <unordered_map>
--
2.44.1

View file

@ -1,14 +0,0 @@
diff --git a/setup.py b/setup.py
index 9351fc9..75dfb2c 100644
--- a/setup.py
+++ b/setup.py
@@ -66,9 +66,6 @@
"solidpython>=1.1.2",
"commentjson>=0.9"
],
- setup_requires=[
- "versioneer"
- ],
extras_require={
"dev": ["pytest"],
},

View file

@ -1,19 +0,0 @@
--- a/src/gui/utility/Options.cpp
+++ b/src/gui/utility/Options.cpp
@@ -13,15 +13,7 @@
QSettings* opts = nullptr;
bool Options::isStandalone() {
-#ifdef VPKEDIT_BUILD_FOR_STRATA_SOURCE
- // Standalone mode is only used to check if we should write a physical config file.
- // If we're building for a Strata Source game, we should just use the system registry.
- // No need to pollute the bin folder!
- return false;
-#else
- QFileInfo nonportable(QApplication::applicationDirPath() + "/.nonportable");
- return !(nonportable.exists() && nonportable.isFile());
-#endif
+ return true;
}
void Options::setupOptions(QSettings& options) {

View file

@ -1,109 +0,0 @@
From 95ea43f1969d9f9ee50a701023b5f90cf36d3967 Mon Sep 17 00:00:00 2001
From: tranzystorekk <tranzystorek.io@protonmail.com>
Date: Thu, 3 Apr 2025 17:36:02 +0200
Subject: [PATCH] fix(deps): fix --locked build on rust 1.86
---
Cargo.lock | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 4b7bebbc67..83298ba165 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4084,7 +4084,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c17a3bd88f2155da63a1f2fcb8a56377a24f0b6dfed12733bb5f544e86f690c5"
dependencies = [
"leb128",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
]
[[package]]
@@ -4099,9 +4099,9 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.221.2"
+version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9845c470a2e10b61dd42c385839cdd6496363ed63b5c9e420b5488b77bd22083"
+checksum = "d06bfa36ab3ac2be0dee563380147a5b81ba10dd8885d7fbbc9eb574be67d185"
dependencies = [
"bitflags 2.5.0",
"hashbrown 0.15.2",
@@ -4129,7 +4129,7 @@ checksum = "a80742ff1b9e6d8c231ac7c7247782c6fc5bce503af760bca071811e5fc9ee56"
dependencies = [
"anyhow",
"termcolor",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
]
[[package]]
@@ -4172,7 +4172,7 @@ dependencies = [
"target-lexicon",
"trait-variant",
"wasm-encoder 0.221.2",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
"wasmtime-asm-macros",
"wasmtime-cache",
"wasmtime-component-macro",
@@ -4260,7 +4260,7 @@ dependencies = [
"smallvec",
"target-lexicon",
"thiserror 1.0.61",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
"wasmtime-environ",
"wasmtime-versioned-export-macros",
]
@@ -4287,7 +4287,7 @@ dependencies = [
"smallvec",
"target-lexicon",
"wasm-encoder 0.221.2",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
"wasmprinter",
"wasmtime-component-util",
]
@@ -4398,7 +4398,7 @@ dependencies = [
"gimli 0.31.1",
"object 0.36.7",
"target-lexicon",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
"wasmtime-cranelift",
"wasmtime-environ",
"winch-codegen",
@@ -4635,7 +4635,7 @@ dependencies = [
"smallvec",
"target-lexicon",
"thiserror 1.0.61",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
"wasmtime-cranelift",
"wasmtime-environ",
]
@@ -4893,9 +4893,9 @@ dependencies = [
[[package]]
name = "wit-parser"
-version = "0.221.2"
+version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbe1538eea6ea5ddbe5defd0dc82539ad7ba751e1631e9185d24a931f0a5adc8"
+checksum = "896112579ed56b4a538b07a3d16e562d101ff6265c46b515ce0c701eef16b2ac"
dependencies = [
"anyhow",
"id-arena",
@@ -4906,7 +4906,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-xid",
- "wasmparser 0.221.2",
+ "wasmparser 0.221.3",
]
[[package]]

View file

@ -1,200 +0,0 @@
From 6204ab9f989be3841c8c47e1e2cfe6a658fe16d5 Mon Sep 17 00:00:00 2001
From: Seth Michael Larson <seth@python.org>
Date: Tue, 28 Jan 2025 14:09:00 -0600
Subject: [PATCH 1/4] gh-105704: Disallow square brackets ( and ) in domain
names for parsed URLs
---
Lib/test/test_urlparse.py | 14 +++++++++++++
Lib/urllib/parse.py | 20 +++++++++++++++++--
...-01-28-14-08-03.gh-issue-105704.EnhHxu.rst | 4 ++++
3 files changed, 36 insertions(+), 2 deletions(-)
create mode 100644 Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 4516bdea6adb19..0f15a0998ff2ea 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1412,6 +1412,20 @@ def test_invalid_bracketed_hosts(self):
self.assertRaises(ValueError, urllib.parse.urlsplit, 'Scheme://user@[0439:23af::2309::fae7:1234]/Path?Query')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'Scheme://user@[0439:23af:2309::fae7:1234:2342:438e:192.0.2.146]/Path?Query')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'Scheme://user@]v6a.ip[/Path')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip]')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip].suffix')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip]/')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip].suffix/')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip]?')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip].suffix?')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]/')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix/')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]?')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix?')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@prefix.[v6a.ip]')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@[v6a.ip].suffix')
def test_splitting_bracketed_hosts(self):
p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]/path?query')
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index c412c729852272..9d51f4c6812b57 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -439,6 +439,23 @@ def _checknetloc(netloc):
raise ValueError("netloc '" + netloc + "' contains invalid " +
"characters under NFKC normalization")
+def _check_bracketed_netloc(netloc):
+ # Note that this function must mirror the splitting
+ # done in NetlocResultMixins._hostinfo().
+ hostname_and_port = netloc.rpartition('@')[2]
+ before_bracket, have_open_br, bracketed = hostname_and_port.partition('[')
+ if have_open_br:
+ # No data is allowed before a bracket.
+ if before_bracket:
+ raise ValueError("Invalid IPv6 URL")
+ hostname, _, port = bracketed.partition(']')
+ # No data is allowed after the bracket but before the port delimiter.
+ if port and not port.startswith(":"):
+ raise ValueError("Invalid IPv6 URL")
+ else:
+ hostname, _, port = hostname_and_port.partition(':')
+ _check_bracketed_host(hostname)
+
# Valid bracketed hosts are defined in
# https://www.rfc-editor.org/rfc/rfc3986#page-49 and https://url.spec.whatwg.org/
def _check_bracketed_host(hostname):
@@ -505,8 +522,7 @@ def _urlsplit(url, scheme=None, allow_fragments=True):
(']' in netloc and '[' not in netloc)):
raise ValueError("Invalid IPv6 URL")
if '[' in netloc and ']' in netloc:
- bracketed_host = netloc.partition('[')[2].partition(']')[0]
- _check_bracketed_host(bracketed_host)
+ _check_bracketed_netloc(netloc)
if allow_fragments and '#' in url:
url, fragment = url.split('#', 1)
if '?' in url:
diff --git a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
new file mode 100644
index 00000000000000..aaeac71678de87
--- /dev/null
+++ b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
@@ -0,0 +1,4 @@
+When using ``urllib.parse.urlsplit()`` and ``urlparse()`` host parsing would
+not reject domain names containing square brackets (``[`` and ``]``). Square
+brackets are only valid for IPv6 and IPvFuture hosts according to `RFC 3986
+Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
From 3ab35e8d890e2c5d4e6b0c0299f94775a3ded9ae Mon Sep 17 00:00:00 2001
From: Seth Michael Larson <sethmichaellarson@gmail.com>
Date: Thu, 30 Jan 2025 09:50:14 -0600
Subject: [PATCH 2/4] Use Sphinx references
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
---
.../Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
index aaeac71678de87..fb8674f558db59 100644
--- a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
+++ b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
@@ -1,4 +1,4 @@
-When using ``urllib.parse.urlsplit()`` and ``urlparse()`` host parsing would
+When using :func:`urllib.parse.urlsplit()` and :func:`urllib.parse.urlparse()` host parsing would
not reject domain names containing square brackets (``[`` and ``]``). Square
brackets are only valid for IPv6 and IPvFuture hosts according to `RFC 3986
Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
From ebf92bb4d323d41778e5de6df177b26f18ecf7f9 Mon Sep 17 00:00:00 2001
From: Seth Michael Larson <seth@python.org>
Date: Thu, 30 Jan 2025 11:10:35 -0600
Subject: [PATCH 3/4] Add mismatched bracket test cases, fix news format
---
Lib/test/test_urlparse.py | 10 ++++++++++
.../2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst | 8 ++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 0f15a0998ff2ea..f8ce61b2b49621 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1426,6 +1426,16 @@ def test_invalid_bracketed_hosts(self):
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix?')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@prefix.[v6a.ip]')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@[v6a.ip].suffix')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip]')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://]v6a.ip[')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://]v6a.ip')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip[')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[v6a.ip')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip].suffix')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix]v6a.ip[suffix')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix]v6a.ip')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip[suffix')
def test_splitting_bracketed_hosts(self):
p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]/path?query')
diff --git a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
index fb8674f558db59..bff1bc6b0d609c 100644
--- a/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
+++ b/Misc/NEWS.d/next/Security/2025-01-28-14-08-03.gh-issue-105704.EnhHxu.rst
@@ -1,4 +1,4 @@
-When using :func:`urllib.parse.urlsplit()` and :func:`urllib.parse.urlparse()` host parsing would
-not reject domain names containing square brackets (``[`` and ``]``). Square
-brackets are only valid for IPv6 and IPvFuture hosts according to `RFC 3986
-Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
+When using :func:`urllib.parse.urlsplit` and :func:`urllib.parse.urlparse` host
+parsing would not reject domain names containing square brackets (``[`` and
+``]``). Square brackets are only valid for IPv6 and IPvFuture hosts according to
+`RFC 3986 Section 3.2.2 <https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.
From 2817b2e29c8b28a24f9eb97abce1e1b60b1162fa Mon Sep 17 00:00:00 2001
From: Seth Michael Larson <seth@python.org>
Date: Thu, 30 Jan 2025 13:01:19 -0600
Subject: [PATCH 4/4] Add more test coverage for ports
---
Lib/test/test_urlparse.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index f8ce61b2b49621..b51cc006b73280 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1424,6 +1424,15 @@ def test_invalid_bracketed_hosts(self):
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix/')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]?')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix?')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:a')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:a')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:a1')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:a1')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:1a')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:1a')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[::1].suffix:/')
+ self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://prefix.[::1]:?')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@prefix.[v6a.ip]')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://user@[v6a.ip].suffix')
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://[v6a.ip')
@@ -1438,14 +1447,16 @@ def test_invalid_bracketed_hosts(self):
self.assertRaises(ValueError, urllib.parse.urlsplit, 'scheme://v6a.ip[suffix')
def test_splitting_bracketed_hosts(self):
- p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]/path?query')
+ p1 = urllib.parse.urlsplit('scheme://user@[v6a.ip]:1234/path?query')
self.assertEqual(p1.hostname, 'v6a.ip')
self.assertEqual(p1.username, 'user')
self.assertEqual(p1.path, '/path')
+ self.assertEqual(p1.port, 1234)
p2 = urllib.parse.urlsplit('scheme://user@[0439:23af:2309::fae7%test]/path?query')
self.assertEqual(p2.hostname, '0439:23af:2309::fae7%test')
self.assertEqual(p2.username, 'user')
self.assertEqual(p2.path, '/path')
+ self.assertIs(p2.port, None)
p3 = urllib.parse.urlsplit('scheme://user@[0439:23af:2309::fae7:1234:192.0.2.146%test]/path?query')
self.assertEqual(p3.hostname, '0439:23af:2309::fae7:1234:192.0.2.146%test')
self.assertEqual(p3.username, 'user')

View file

@ -1,143 +0,0 @@
From c1d1eed00099af8d858536b659864b7ccea41974 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul@city-fan.org>
Date: Sat, 13 Mar 2021 17:46:57 +0000
Subject: [PATCH 1/2] Update for Getopt-Long-Descriptive 0.106
GLD is now outputting text with wrapping depending on the terminal
width. This update is enough to get the tests to pass when running
within "expect", which provides a PTY. It's almost certainly not
enough for general use.
---
t/104_override_usage.t | 8 ++++++++
t/107_no_auto_help.t | 2 +-
t/109_help_flag.t | 2 +-
t/110_sort_usage_by_attr_order.t | 12 ++++++++++++
4 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/t/104_override_usage.t b/t/104_override_usage.t
index bc45029..6641540 100644
--- a/t/104_override_usage.t
+++ b/t/104_override_usage.t
@@ -61,9 +61,17 @@ use Test::Exception;
\t--foo INT A foo
}
:
+ $Getopt::Long::Descriptive::VERSION < 0.106 ?
qq{usage: 104_override_usage.t [-?] [long options...]
\t-? --[no-]usage --[no-]help Prints this usage information.
\t--foo INT A foo
+}
+ :
+ qq{usage: 104_override_usage.t [-?] [long options...]
+\t--[no-]help (or -?) Prints
+\t this usage information.
+\t aka --usage
+\t--foo INT A foo
}
];
diff --git a/t/107_no_auto_help.t b/t/107_no_auto_help.t
index 27f87f5..103df43 100644
--- a/t/107_no_auto_help.t
+++ b/t/107_no_auto_help.t
@@ -60,7 +60,7 @@ END {
warning_like {
throws_ok { Class->new_with_options }
#usage: 107_no_auto_help.t [-?] [long options...]
- qr/^usage: [\d\w]+\Q.t [-?] [long options...]\E.\s+\Q-? --\E(\[no-\])?usage --(\[no-\])?\Qhelp\E\s+\QPrints this usage information.\E.\s+--configfile/ms,
+ qr/^usage: [\d\w]+\Q.t [-?] [long options...]\E.\s+(\Q-? --\E(\[no-\])?usage )?--(\[no-\])?\Qhelp\E(\Q (or -?)\E)?\s+\QPrints this usage information.\E.(\s+\Qaka --usage\E.)?\s+--configfile/ms,
'usage information looks good';
}
qr/^Specified configfile \'this_value_unimportant\' does not exist, is empty, or is not readable$/,
diff --git a/t/109_help_flag.t b/t/109_help_flag.t
index 8c658e2..58dbca6 100644
--- a/t/109_help_flag.t
+++ b/t/109_help_flag.t
@@ -40,7 +40,7 @@ foreach my $args ( ['--help'], ['--usage'], ['--?'], ['-?'] )
local @ARGV = @$args;
throws_ok { MyClass->new_with_options() }
- qr/^usage: (?:[\d\w]+)\Q.t [-?] [long options...]\E.^\t\Q-? --\E(\[no-\])?usage --(\[no-\])?help\s+\QPrints this usage information.\E$/ms,
+ qr/^usage: (?:[\d\w]+)\Q.t [-?] [long options...]\E.^\s+(\Q-? --\E(\[no-\])?usage )?--(\[no-\])?help(\Q (or -?)\E)?\s+Prints ?(.\s+)?\Qthis usage information.\E.(\s+\Qaka --usage\E.)?$/ms,
'Help request detected; usage information properly printed';
}
diff --git a/t/110_sort_usage_by_attr_order.t b/t/110_sort_usage_by_attr_order.t
index e7dd177..7ec0c99 100644
--- a/t/110_sort_usage_by_attr_order.t
+++ b/t/110_sort_usage_by_attr_order.t
@@ -64,6 +64,18 @@ usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
--baz STR Documentation for "baz"
USAGE
}
+if ( $Getopt::Long::Descriptive::VERSION >= 0.106 )
+{
+$expected = <<'USAGE';
+usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
+ --[no-]help (or -?) Prints
+ this usage information.
+ aka --usage
+ --foo STR Documentation for "foo"
+ --bar STR Documentation for "bar"
+ --baz STR Documentation for "baz"
+USAGE
+}
$expected =~ s/^[ ]{4}/\t/xmsg;
is($obj->usage->text, $expected, 'Usage text has nicely sorted options');
From 45ae6aaabc5413e985860fbfcc8da3bdc929a054 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul@city-fan.org>
Date: Mon, 15 Mar 2021 10:43:14 +0000
Subject: [PATCH 2/2] Update for Getopt-Long-Descriptive 0.107
GLD's use of Term::ReadKey has been reverted, so this update should now
work reliably. Use with GLD 0.106 is not supported.
---
t/104_override_usage.t | 6 +++---
t/110_sort_usage_by_attr_order.t | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/104_override_usage.t b/t/104_override_usage.t
index 6641540..f7c6a31 100644
--- a/t/104_override_usage.t
+++ b/t/104_override_usage.t
@@ -61,15 +61,15 @@ use Test::Exception;
\t--foo INT A foo
}
:
- $Getopt::Long::Descriptive::VERSION < 0.106 ?
+ # Note: Getopt::Long::Descriptive 0.106 not supported
+ $Getopt::Long::Descriptive::VERSION < 0.107 ?
qq{usage: 104_override_usage.t [-?] [long options...]
\t-? --[no-]usage --[no-]help Prints this usage information.
\t--foo INT A foo
}
:
qq{usage: 104_override_usage.t [-?] [long options...]
-\t--[no-]help (or -?) Prints
-\t this usage information.
+\t--[no-]help (or -?) Prints this usage information.
\t aka --usage
\t--foo INT A foo
}
diff --git a/t/110_sort_usage_by_attr_order.t b/t/110_sort_usage_by_attr_order.t
index 7ec0c99..16cdaa1 100644
--- a/t/110_sort_usage_by_attr_order.t
+++ b/t/110_sort_usage_by_attr_order.t
@@ -64,12 +64,12 @@ usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
--baz STR Documentation for "baz"
USAGE
}
-if ( $Getopt::Long::Descriptive::VERSION >= 0.106 )
+# Note: Getopt::Long::Descriptive 0.106 not supported
+if ( $Getopt::Long::Descriptive::VERSION >= 0.107 )
{
$expected = <<'USAGE';
usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
- --[no-]help (or -?) Prints
- this usage information.
+ --[no-]help (or -?) Prints this usage information.
aka --usage
--foo STR Documentation for "foo"
--bar STR Documentation for "bar"

View file

@ -1,12 +0,0 @@
diff --git a/pyproject.toml b/pyproject.toml
index 107cab8..34cc544 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -66,7 +66,6 @@ long_description_content_type = "text/markdown"
addopts = "-v --doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE"
testpaths = [
- "docs",
"pysrc",
"pytests",
]

View file

@ -1,13 +0,0 @@
diff --git a/setupbase.py b/setupbase.py
index 0ce0ac8..7762e23 100644
--- a/setupbase.py
+++ b/setupbase.py
@@ -659,7 +659,7 @@ def _translate_glob(pat):
translated_parts.append(_translate_glob_part(part))
os_sep_class = '[%s]' % re.escape(SEPARATORS)
res = _join_translated(translated_parts, os_sep_class)
- return '{res}\\Z(?ms)'.format(res=res)
+ return '(?ms){res}\\Z'.format(res=res)
def _join_translated(translated_parts, os_sep_class):

View file

@ -1,79 +0,0 @@
Based on https://sourceforge.net/p/ruamel-yaml-clib/code/merge-requests/4/ with additions
for `input_handler` and `output_handler`.
--- a/_ruamel_yaml.pxd
+++ b/_ruamel_yaml.pxd
@@ -2,15 +2,15 @@
cdef extern from "_ruamel_yaml.h":
void malloc(int l)
- void memcpy(char *d, char *s, int l)
+ void memcpy(unsigned char *d, char *s, int l)
int strlen(char *s)
int PyString_CheckExact(object o)
int PyUnicode_CheckExact(object o)
char *PyString_AS_STRING(object o)
int PyString_GET_SIZE(object o)
- object PyString_FromStringAndSize(char *v, int l)
+ object PyString_FromStringAndSize(unsigned char *v, size_t l)
object PyUnicode_FromString(char *u)
- object PyUnicode_DecodeUTF8(char *u, int s, char *e)
+ object PyUnicode_DecodeUTF8(unsigned char *u, size_t s, char *e)
object PyUnicode_AsUTF8String(object o)
int PY_MAJOR_VERSION
@@ -85,11 +85,11 @@
YAML_MAPPING_START_EVENT
YAML_MAPPING_END_EVENT
- ctypedef int yaml_read_handler_t(void *data, char *buffer,
- int size, int *size_read) except 0
-
- ctypedef int yaml_write_handler_t(void *data, char *buffer,
- int size) except 0
+ ctypedef int yaml_read_handler_t(void *data, unsigned char *buffer,
+ size_t size, size_t *size_read) except 0
+
+ ctypedef int yaml_write_handler_t(void *data, unsigned char *buffer,
+ size_t size) except 0
ctypedef struct yaml_mark_t:
int index
@@ -112,7 +112,7 @@
char *handle
char *suffix
ctypedef struct _yaml_token_scalar_data_t:
- char *value
+ unsigned char *value
int length
yaml_scalar_style_t style
ctypedef struct _yaml_token_version_directive_data_t:
@@ -151,7 +151,7 @@
ctypedef struct _yaml_event_scalar_data_t:
char *anchor
char *tag
- char *value
+ unsigned char *value
int length
int plain_implicit
int quoted_implicit
--- a/_ruamel_yaml.pyx
+++ b/_ruamel_yaml.pyx
@@ -904,7 +904,7 @@
raise error
return 1
-cdef int input_handler(void *data, char *buffer, int size, int *read) except 0:
+cdef int input_handler(void *data, unsigned char *buffer, size_t size, size_t *read) except 0:
cdef CParser parser
parser = <CParser>data
if parser.stream_cache is None:
@@ -1514,7 +1514,7 @@
self.ascend_resolver()
return 1
-cdef int output_handler(void *data, char *buffer, int size) except 0:
+cdef int output_handler(void *data, unsigned char *buffer, size_t size) except 0:
cdef CEmitter emitter
emitter = <CEmitter>data
if emitter.dump_unicode == 0:

View file

@ -1,10 +0,0 @@
--- src/Makefile 2023-05-25 18:16:56.000296653 +0900
+++ src/Makefile 2023-05-25 18:17:00.772272861 +0900
@@ -23,7 +23,6 @@
EXTRA_TARGETS = libs/amiga/amiga.s libs/powzix/*.cpp
CFLAGS += -msse2
endif
-USE_OPENSSL = 1
endif
# -liconv and -fPIC are necessary on Android