gh-94328: Update Windows installer to use SQLite 3.39.4 (GH-98640)

(cherry picked from commit 0c84593275969d9b8f42e75abb2638b69d5b5f4a)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
diff --git a/Misc/NEWS.d/next/Windows/2022-10-25-10-34-17.gh-issue-94328.19NhdU.rst b/Misc/NEWS.d/next/Windows/2022-10-25-10-34-17.gh-issue-94328.19NhdU.rst
new file mode 100644
index 0000000..eb48ff9
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2022-10-25-10-34-17.gh-issue-94328.19NhdU.rst
@@ -0,0 +1 @@
+Update Windows installer to use SQLite 3.39.4.
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
index 9c6bc4e..681c79f 100644
--- a/PCbuild/get_externals.bat
+++ b/PCbuild/get_externals.bat
@@ -54,7 +54,7 @@
 set libraries=%libraries%                                       bzip2-1.0.8
 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries%  libffi-3.4.3
 if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries%     openssl-1.1.1q
-set libraries=%libraries%                                       sqlite-3.38.4.0
+set libraries=%libraries%                                       sqlite-3.39.4.0
 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.12.1
 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.12.1
 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tix-8.4.3.6
diff --git a/PCbuild/python.props b/PCbuild/python.props
index c3ab12e..5fa32df 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -61,7 +61,7 @@
     <ExternalsDir>$(EXTERNALS_DIR)</ExternalsDir>
     <ExternalsDir Condition="$(ExternalsDir) == ''">$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))</ExternalsDir>
     <ExternalsDir Condition="!HasTrailingSlash($(ExternalsDir))">$(ExternalsDir)\</ExternalsDir>
-    <sqlite3Dir>$(ExternalsDir)sqlite-3.38.4.0\</sqlite3Dir>
+    <sqlite3Dir>$(ExternalsDir)sqlite-3.39.4.0\</sqlite3Dir>
     <bz2Dir>$(ExternalsDir)bzip2-1.0.8\</bz2Dir>
     <lzmaDir>$(ExternalsDir)xz-5.2.5\</lzmaDir>
     <libffiDir>$(ExternalsDir)libffi-3.4.3\</libffiDir>
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt
index c536fac..5ba3e39 100644
--- a/PCbuild/readme.txt
+++ b/PCbuild/readme.txt
@@ -187,7 +187,7 @@
     again when building.
 
 _sqlite3
-    Wraps SQLite 3.38.4, which is itself built by sqlite3.vcxproj
+    Wraps SQLite 3.39.4, which is itself built by sqlite3.vcxproj
     Homepage:
         https://www.sqlite.org/
 _tkinter