Ensure that the fix for #17269 also works on OSX 10.4

AI_NUMERICSERV isn't defined on OSX 10.4.
(3.3->default) Ensure that the fix for #17269 also works on OSX 10.4

AI_NUMERICSERV isn't defined on OSX 10.4.
fixd refleak
Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows().
Merge.
Issue #18174: Fix fd leaks in tests.
Merge.
remove MAX_MAXCHAR because it's unsafe for computing maximum codepoitn value (see #18183)
merge 3.3 (#18183)