diff --git a/.github/workflows/build_test_cbsinit.yml b/.github/workflows/build_test_cbsinit.yml index 9ed555d68..ebbe152ed 100644 --- a/.github/workflows/build_test_cbsinit.yml +++ b/.github/workflows/build_test_cbsinit.yml @@ -13,7 +13,7 @@ jobs: max-parallel: 100 matrix: os: ['windows-2022'] - download_official_python_msi: ["true"] + download_official_python_msi: ["true", "false"] remove_python_pycs: ["true"] install_with_pymanager: ["true"] cbsinit_repo: ['https://github.com/cloudbase/cloudbase-init'] diff --git a/BuildAutomation/BuildCloudbaseInitSetup.ps1 b/BuildAutomation/BuildCloudbaseInitSetup.ps1 index 4f5a913d4..31fd8752a 100644 --- a/BuildAutomation/BuildCloudbaseInitSetup.ps1 +++ b/BuildAutomation/BuildCloudbaseInitSetup.ps1 @@ -12,7 +12,7 @@ Param( [string]$SignTimestampUrl = "http://timestamp.digicert.com?alg=sha256", [string]$VCVars = "2019", [switch]$InstallOfficialPythonMsi = $false, - [string]$OfficialPythonMsiChecksum = "C10234D0D9BD89F6F6DD55BAE28EDE0F97EE0DF4", + [string]$OfficialPythonMsiChecksum = "F95758C1FE6F75CC33D8E65640B074676AB88CB3", [switch]$RemovePythonPycs = $false, [switch]$InstallOfficialPythonUsingPyManager = $false ) diff --git a/Python314_4_x64_Template/DLLs/_asyncio.pyd b/Python314_4_x64_Template/DLLs/_asyncio.pyd deleted file mode 100644 index 53c9fabb4..000000000 Binary files a/Python314_4_x64_Template/DLLs/_asyncio.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_bz2.pyd b/Python314_4_x64_Template/DLLs/_bz2.pyd deleted file mode 100644 index 5b13a5a1c..000000000 Binary files a/Python314_4_x64_Template/DLLs/_bz2.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_ctypes.pyd b/Python314_4_x64_Template/DLLs/_ctypes.pyd deleted file mode 100644 index a91dc05be..000000000 Binary files a/Python314_4_x64_Template/DLLs/_ctypes.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_decimal.pyd b/Python314_4_x64_Template/DLLs/_decimal.pyd deleted file mode 100644 index a7f01b95d..000000000 Binary files a/Python314_4_x64_Template/DLLs/_decimal.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_elementtree.pyd b/Python314_4_x64_Template/DLLs/_elementtree.pyd deleted file mode 100644 index d940c438b..000000000 Binary files a/Python314_4_x64_Template/DLLs/_elementtree.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_hashlib.pyd b/Python314_4_x64_Template/DLLs/_hashlib.pyd deleted file mode 100644 index 64b1f256f..000000000 Binary files a/Python314_4_x64_Template/DLLs/_hashlib.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_overlapped.pyd b/Python314_4_x64_Template/DLLs/_overlapped.pyd deleted file mode 100644 index ee3aaa209..000000000 Binary files a/Python314_4_x64_Template/DLLs/_overlapped.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_queue.pyd b/Python314_4_x64_Template/DLLs/_queue.pyd deleted file mode 100644 index d7323ec63..000000000 Binary files a/Python314_4_x64_Template/DLLs/_queue.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_remote_debugging.pyd b/Python314_4_x64_Template/DLLs/_remote_debugging.pyd deleted file mode 100644 index c2ac66a65..000000000 Binary files a/Python314_4_x64_Template/DLLs/_remote_debugging.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_sqlite3.pyd b/Python314_4_x64_Template/DLLs/_sqlite3.pyd deleted file mode 100644 index 6cdef78d6..000000000 Binary files a/Python314_4_x64_Template/DLLs/_sqlite3.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_ssl.pyd b/Python314_4_x64_Template/DLLs/_ssl.pyd deleted file mode 100644 index 4b892ec7c..000000000 Binary files a/Python314_4_x64_Template/DLLs/_ssl.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/_uuid.pyd b/Python314_4_x64_Template/DLLs/_uuid.pyd deleted file mode 100644 index cc31d95db..000000000 Binary files a/Python314_4_x64_Template/DLLs/_uuid.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/libcrypto-3.dll b/Python314_4_x64_Template/DLLs/libcrypto-3.dll deleted file mode 100644 index cc05043df..000000000 Binary files a/Python314_4_x64_Template/DLLs/libcrypto-3.dll and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/libssl-3.dll b/Python314_4_x64_Template/DLLs/libssl-3.dll deleted file mode 100644 index 608fc42e8..000000000 Binary files a/Python314_4_x64_Template/DLLs/libssl-3.dll and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/pyexpat.pyd b/Python314_4_x64_Template/DLLs/pyexpat.pyd deleted file mode 100644 index c96cd0db1..000000000 Binary files a/Python314_4_x64_Template/DLLs/pyexpat.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/DLLs/winsound.pyd b/Python314_4_x64_Template/DLLs/winsound.pyd deleted file mode 100644 index 3d426f2c4..000000000 Binary files a/Python314_4_x64_Template/DLLs/winsound.pyd and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/annotationlib.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/annotationlib.cpython-314.pyc deleted file mode 100644 index 992393906..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/annotationlib.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/configparser.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/configparser.cpython-314.pyc deleted file mode 100644 index 6a93cd086..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/configparser.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/datetime.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/datetime.cpython-314.pyc deleted file mode 100644 index e40620d99..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/datetime.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/glob.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/glob.cpython-314.pyc deleted file mode 100644 index 99dcacffb..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/glob.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/inspect.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/inspect.cpython-314.pyc deleted file mode 100644 index 8bf6402d2..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/inspect.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/queue.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/queue.cpython-314.pyc deleted file mode 100644 index 77005b35b..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/queue.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/struct.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/struct.cpython-314.pyc deleted file mode 100644 index 358619ec8..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/struct.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/subprocess.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/subprocess.cpython-314.pyc deleted file mode 100644 index bf120722c..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/subprocess.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/token.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/token.cpython-314.pyc deleted file mode 100644 index 412a6b536..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/token.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/traceback.cpython-314.pyc b/Python314_4_x64_Template/Lib/__pycache__/traceback.cpython-314.pyc deleted file mode 100644 index e7140269f..000000000 Binary files a/Python314_4_x64_Template/Lib/__pycache__/traceback.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/asyncio/__main__.py b/Python314_4_x64_Template/Lib/asyncio/__main__.py deleted file mode 100644 index 0e1003580..000000000 --- a/Python314_4_x64_Template/Lib/asyncio/__main__.py +++ /dev/null @@ -1,241 +0,0 @@ -import argparse -import ast -import asyncio -import asyncio.tools -import concurrent.futures -import contextvars -import inspect -import os -import site -import sys -import threading -import types -import warnings - -from _colorize import get_theme -from _pyrepl.console import InteractiveColoredConsole - -from . import futures - - -class AsyncIOInteractiveConsole(InteractiveColoredConsole): - - def __init__(self, locals, loop): - super().__init__(locals, filename="") - self.compile.compiler.flags |= ast.PyCF_ALLOW_TOP_LEVEL_AWAIT - - self.loop = loop - self.context = contextvars.copy_context() - - def runcode(self, code): - global return_code - future = concurrent.futures.Future() - - def callback(): - global return_code - global repl_future - global keyboard_interrupted - - repl_future = None - keyboard_interrupted = False - - func = types.FunctionType(code, self.locals) - try: - coro = func() - except SystemExit as se: - return_code = se.code - self.loop.stop() - return - except KeyboardInterrupt as ex: - keyboard_interrupted = True - future.set_exception(ex) - return - except BaseException as ex: - future.set_exception(ex) - return - - if not inspect.iscoroutine(coro): - future.set_result(coro) - return - - try: - repl_future = self.loop.create_task(coro, context=self.context) - futures._chain_future(repl_future, future) - except BaseException as exc: - future.set_exception(exc) - - self.loop.call_soon_threadsafe(callback, context=self.context) - - try: - return future.result() - except SystemExit as se: - return_code = se.code - self.loop.stop() - return - except BaseException: - if keyboard_interrupted: - if not CAN_USE_PYREPL: - self.write("\nKeyboardInterrupt\n") - else: - self.showtraceback() - return self.STATEMENT_FAILED - -class REPLThread(threading.Thread): - - def run(self): - global return_code - - try: - if not sys.flags.quiet: - banner = ( - f'asyncio REPL {sys.version} on {sys.platform}\n' - f'Use "await" directly instead of "asyncio.run()".\n' - f'Type "help", "copyright", "credits" or "license" ' - f'for more information.\n' - ) - - console.write(banner) - - if not sys.flags.isolated and (startup_path := os.getenv("PYTHONSTARTUP")): - sys.audit("cpython.run_startup", startup_path) - - import tokenize - with tokenize.open(startup_path) as f: - startup_code = compile(f.read(), startup_path, "exec") - exec(startup_code, console.locals) - - ps1 = getattr(sys, "ps1", ">>> ") - if CAN_USE_PYREPL: - theme = get_theme().syntax - ps1 = f"{theme.prompt}{ps1}{theme.reset}" - console.write(f"{ps1}import asyncio\n") - - if CAN_USE_PYREPL: - from _pyrepl.simple_interact import ( - run_multiline_interactive_console, - ) - try: - run_multiline_interactive_console(console) - except SystemExit: - # expected via the `exit` and `quit` commands - pass - except BaseException: - # unexpected issue - console.showtraceback() - console.write("Internal error, ") - return_code = 1 - else: - console.interact(banner="", exitmsg="") - finally: - warnings.filterwarnings( - 'ignore', - message=r'^coroutine .* was never awaited$', - category=RuntimeWarning) - - loop.call_soon_threadsafe(loop.stop) - - def interrupt(self) -> None: - if not CAN_USE_PYREPL: - return - - from _pyrepl.simple_interact import _get_reader - r = _get_reader() - if r.threading_hook is not None: - r.threading_hook.add("") # type: ignore - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - prog="python3 -m asyncio", - description="Interactive asyncio shell and CLI tools", - color=True, - ) - subparsers = parser.add_subparsers(help="sub-commands", dest="command") - ps = subparsers.add_parser( - "ps", help="Display a table of all pending tasks in a process" - ) - ps.add_argument("pid", type=int, help="Process ID to inspect") - pstree = subparsers.add_parser( - "pstree", help="Display a tree of all pending tasks in a process" - ) - pstree.add_argument("pid", type=int, help="Process ID to inspect") - args = parser.parse_args() - match args.command: - case "ps": - asyncio.tools.display_awaited_by_tasks_table(args.pid) - sys.exit(0) - case "pstree": - asyncio.tools.display_awaited_by_tasks_tree(args.pid) - sys.exit(0) - case None: - pass # continue to the interactive shell - case _: - # shouldn't happen as an invalid command-line wouldn't parse - # but let's keep it for the next person adding a command - print(f"error: unhandled command {args.command}", file=sys.stderr) - parser.print_usage(file=sys.stderr) - sys.exit(1) - - sys.audit("cpython.run_stdin") - - if os.getenv('PYTHON_BASIC_REPL'): - CAN_USE_PYREPL = False - else: - from _pyrepl.main import CAN_USE_PYREPL - - return_code = 0 - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - - repl_locals = {'asyncio': asyncio} - for key in {'__name__', '__package__', - '__loader__', '__spec__', - '__builtins__', '__file__'}: - repl_locals[key] = locals()[key] - - console = AsyncIOInteractiveConsole(repl_locals, loop) - - repl_future = None - keyboard_interrupted = False - - try: - import readline # NoQA - except ImportError: - readline = None - - interactive_hook = getattr(sys, "__interactivehook__", None) - - if interactive_hook is not None: - sys.audit("cpython.run_interactivehook", interactive_hook) - interactive_hook() - - if interactive_hook is site.register_readline: - # Fix the completer function to use the interactive console locals - try: - import rlcompleter - except: - pass - else: - if readline is not None: - completer = rlcompleter.Completer(console.locals) - readline.set_completer(completer.complete) - - repl_thread = REPLThread(name="Interactive thread") - repl_thread.daemon = True - repl_thread.start() - - while True: - try: - loop.run_forever() - except KeyboardInterrupt: - keyboard_interrupted = True - if repl_future and not repl_future.done(): - repl_future.cancel() - repl_thread.interrupt() - continue - else: - break - - console.write('exiting asyncio REPL...\n') - loop.close() - sys.exit(return_code) diff --git a/Python314_4_x64_Template/Lib/collections/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/collections/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 16604cb95..000000000 Binary files a/Python314_4_x64_Template/Lib/collections/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/compression/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/compression/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 83dbdfe64..000000000 Binary files a/Python314_4_x64_Template/Lib/compression/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/compression/_common/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/compression/_common/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 9189e04c8..000000000 Binary files a/Python314_4_x64_Template/Lib/compression/_common/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/compression/zstd/__init__.py b/Python314_4_x64_Template/Lib/compression/zstd/__init__.py deleted file mode 100644 index 84b25914b..000000000 --- a/Python314_4_x64_Template/Lib/compression/zstd/__init__.py +++ /dev/null @@ -1,242 +0,0 @@ -"""Python bindings to the Zstandard (zstd) compression library (RFC-8878).""" - -__all__ = ( - # compression.zstd - 'COMPRESSION_LEVEL_DEFAULT', - 'compress', - 'CompressionParameter', - 'decompress', - 'DecompressionParameter', - 'finalize_dict', - 'get_frame_info', - 'Strategy', - 'train_dict', - - # compression.zstd._zstdfile - 'open', - 'ZstdFile', - - # _zstd - 'get_frame_size', - 'zstd_version', - 'zstd_version_info', - 'ZstdCompressor', - 'ZstdDecompressor', - 'ZstdDict', - 'ZstdError', -) - -import _zstd -import enum -from _zstd import (ZstdCompressor, ZstdDecompressor, ZstdDict, ZstdError, - get_frame_size, zstd_version) -from compression.zstd._zstdfile import ZstdFile, open, _nbytes - -# zstd_version_number is (MAJOR * 100 * 100 + MINOR * 100 + RELEASE) -zstd_version_info = (*divmod(_zstd.zstd_version_number // 100, 100), - _zstd.zstd_version_number % 100) -"""Version number of the runtime zstd library as a tuple of integers.""" - -COMPRESSION_LEVEL_DEFAULT = _zstd.ZSTD_CLEVEL_DEFAULT -"""The default compression level for Zstandard, currently '3'.""" - - -class FrameInfo: - """Information about a Zstandard frame.""" - - __slots__ = 'decompressed_size', 'dictionary_id' - - def __init__(self, decompressed_size, dictionary_id): - super().__setattr__('decompressed_size', decompressed_size) - super().__setattr__('dictionary_id', dictionary_id) - - def __repr__(self): - return (f'FrameInfo(decompressed_size={self.decompressed_size}, ' - f'dictionary_id={self.dictionary_id})') - - def __setattr__(self, name, _): - raise AttributeError(f"can't set attribute {name!r}") - - -def get_frame_info(frame_buffer): - """Get Zstandard frame information from a frame header. - - *frame_buffer* is a bytes-like object. It should start from the beginning - of a frame, and needs to include at least the frame header (6 to 18 bytes). - - The returned FrameInfo object has two attributes. - 'decompressed_size' is the size in bytes of the data in the frame when - decompressed, or None when the decompressed size is unknown. - 'dictionary_id' is an int in the range (0, 2**32). The special value 0 - means that the dictionary ID was not recorded in the frame header, - the frame may or may not need a dictionary to be decoded, - and the ID of such a dictionary is not specified. - """ - return FrameInfo(*_zstd.get_frame_info(frame_buffer)) - - -def train_dict(samples, dict_size): - """Return a ZstdDict representing a trained Zstandard dictionary. - - *samples* is an iterable of samples, where a sample is a bytes-like - object representing a file. - - *dict_size* is the dictionary's maximum size, in bytes. - """ - if not isinstance(dict_size, int): - ds_cls = type(dict_size).__qualname__ - raise TypeError(f'dict_size must be an int object, not {ds_cls!r}.') - - samples = tuple(samples) - chunks = b''.join(samples) - chunk_sizes = tuple(_nbytes(sample) for sample in samples) - if not chunks: - raise ValueError("samples contained no data; can't train dictionary.") - dict_content = _zstd.train_dict(chunks, chunk_sizes, dict_size) - return ZstdDict(dict_content) - - -def finalize_dict(zstd_dict, /, samples, dict_size, level): - """Return a ZstdDict representing a finalized Zstandard dictionary. - - Given a custom content as a basis for dictionary, and a set of samples, - finalize *zstd_dict* by adding headers and statistics according to the - Zstandard dictionary format. - - You may compose an effective dictionary content by hand, which is used as - basis dictionary, and use some samples to finalize a dictionary. The basis - dictionary may be a "raw content" dictionary. See *is_raw* in ZstdDict. - - *samples* is an iterable of samples, where a sample is a bytes-like object - representing a file. - *dict_size* is the dictionary's maximum size, in bytes. - *level* is the expected compression level. The statistics for each - compression level differ, so tuning the dictionary to the compression level - can provide improvements. - """ - - if not isinstance(zstd_dict, ZstdDict): - raise TypeError('zstd_dict argument should be a ZstdDict object.') - if not isinstance(dict_size, int): - raise TypeError('dict_size argument should be an int object.') - if not isinstance(level, int): - raise TypeError('level argument should be an int object.') - - samples = tuple(samples) - chunks = b''.join(samples) - chunk_sizes = tuple(_nbytes(sample) for sample in samples) - if not chunks: - raise ValueError("The samples are empty content, can't finalize the " - "dictionary.") - dict_content = _zstd.finalize_dict(zstd_dict.dict_content, chunks, - chunk_sizes, dict_size, level) - return ZstdDict(dict_content) - - -def compress(data, level=None, options=None, zstd_dict=None): - """Return Zstandard compressed *data* as bytes. - - *level* is an int specifying the compression level to use, defaulting to - COMPRESSION_LEVEL_DEFAULT ('3'). - *options* is a dict object that contains advanced compression - parameters. See CompressionParameter for more on options. - *zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary. See - the function train_dict for how to train a ZstdDict on sample data. - - For incremental compression, use a ZstdCompressor instead. - """ - comp = ZstdCompressor(level=level, options=options, zstd_dict=zstd_dict) - return comp.compress(data, mode=ZstdCompressor.FLUSH_FRAME) - - -def decompress(data, zstd_dict=None, options=None): - """Decompress one or more frames of Zstandard compressed *data*. - - *zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary. See - the function train_dict for how to train a ZstdDict on sample data. - *options* is a dict object that contains advanced compression - parameters. See DecompressionParameter for more on options. - - For incremental decompression, use a ZstdDecompressor instead. - """ - results = [] - while True: - decomp = ZstdDecompressor(options=options, zstd_dict=zstd_dict) - results.append(decomp.decompress(data)) - if not decomp.eof: - raise ZstdError('Compressed data ended before the ' - 'end-of-stream marker was reached') - data = decomp.unused_data - if not data: - break - return b''.join(results) - - -class CompressionParameter(enum.IntEnum): - """Compression parameters.""" - - compression_level = _zstd.ZSTD_c_compressionLevel - window_log = _zstd.ZSTD_c_windowLog - hash_log = _zstd.ZSTD_c_hashLog - chain_log = _zstd.ZSTD_c_chainLog - search_log = _zstd.ZSTD_c_searchLog - min_match = _zstd.ZSTD_c_minMatch - target_length = _zstd.ZSTD_c_targetLength - strategy = _zstd.ZSTD_c_strategy - - enable_long_distance_matching = _zstd.ZSTD_c_enableLongDistanceMatching - ldm_hash_log = _zstd.ZSTD_c_ldmHashLog - ldm_min_match = _zstd.ZSTD_c_ldmMinMatch - ldm_bucket_size_log = _zstd.ZSTD_c_ldmBucketSizeLog - ldm_hash_rate_log = _zstd.ZSTD_c_ldmHashRateLog - - content_size_flag = _zstd.ZSTD_c_contentSizeFlag - checksum_flag = _zstd.ZSTD_c_checksumFlag - dict_id_flag = _zstd.ZSTD_c_dictIDFlag - - nb_workers = _zstd.ZSTD_c_nbWorkers - job_size = _zstd.ZSTD_c_jobSize - overlap_log = _zstd.ZSTD_c_overlapLog - - def bounds(self): - """Return the (lower, upper) int bounds of a compression parameter. - - Both the lower and upper bounds are inclusive. - """ - return _zstd.get_param_bounds(self.value, is_compress=True) - - -class DecompressionParameter(enum.IntEnum): - """Decompression parameters.""" - - window_log_max = _zstd.ZSTD_d_windowLogMax - - def bounds(self): - """Return the (lower, upper) int bounds of a decompression parameter. - - Both the lower and upper bounds are inclusive. - """ - return _zstd.get_param_bounds(self.value, is_compress=False) - - -class Strategy(enum.IntEnum): - """Compression strategies, listed from fastest to strongest. - - Note that new strategies might be added in the future. - Only the order (from fast to strong) is guaranteed, - the numeric value might change. - """ - - fast = _zstd.ZSTD_fast - dfast = _zstd.ZSTD_dfast - greedy = _zstd.ZSTD_greedy - lazy = _zstd.ZSTD_lazy - lazy2 = _zstd.ZSTD_lazy2 - btlazy2 = _zstd.ZSTD_btlazy2 - btopt = _zstd.ZSTD_btopt - btultra = _zstd.ZSTD_btultra - btultra2 = _zstd.ZSTD_btultra2 - - -# Check validity of the CompressionParameter & DecompressionParameter types -_zstd.set_parameter_types(CompressionParameter, DecompressionParameter) diff --git a/Python314_4_x64_Template/Lib/compression/zstd/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/compression/zstd/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 272bda04b..000000000 Binary files a/Python314_4_x64_Template/Lib/compression/zstd/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/ctypes/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/ctypes/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 29731bb55..000000000 Binary files a/Python314_4_x64_Template/Lib/ctypes/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/email/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/email/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index be4ab8a42..000000000 Binary files a/Python314_4_x64_Template/Lib/email/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/email/__pycache__/charset.cpython-314.pyc b/Python314_4_x64_Template/Lib/email/__pycache__/charset.cpython-314.pyc deleted file mode 100644 index 564fd37f8..000000000 Binary files a/Python314_4_x64_Template/Lib/email/__pycache__/charset.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/email/__pycache__/errors.cpython-314.pyc b/Python314_4_x64_Template/Lib/email/__pycache__/errors.cpython-314.pyc deleted file mode 100644 index 7a11878f5..000000000 Binary files a/Python314_4_x64_Template/Lib/email/__pycache__/errors.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/email/__pycache__/parser.cpython-314.pyc b/Python314_4_x64_Template/Lib/email/__pycache__/parser.cpython-314.pyc deleted file mode 100644 index 2272fd68a..000000000 Binary files a/Python314_4_x64_Template/Lib/email/__pycache__/parser.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/email/__pycache__/utils.cpython-314.pyc b/Python314_4_x64_Template/Lib/email/__pycache__/utils.cpython-314.pyc deleted file mode 100644 index d7d43a11a..000000000 Binary files a/Python314_4_x64_Template/Lib/email/__pycache__/utils.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/encodings/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/encodings/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index d99366509..000000000 Binary files a/Python314_4_x64_Template/Lib/encodings/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/encodings/__pycache__/aliases.cpython-314.pyc b/Python314_4_x64_Template/Lib/encodings/__pycache__/aliases.cpython-314.pyc deleted file mode 100644 index 3b5d35012..000000000 Binary files a/Python314_4_x64_Template/Lib/encodings/__pycache__/aliases.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/encodings/__pycache__/utf_8.cpython-314.pyc b/Python314_4_x64_Template/Lib/encodings/__pycache__/utf_8.cpython-314.pyc deleted file mode 100644 index 2779c06f3..000000000 Binary files a/Python314_4_x64_Template/Lib/encodings/__pycache__/utf_8.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/ensurepip/__init__.py b/Python314_4_x64_Template/Lib/ensurepip/__init__.py deleted file mode 100644 index 715389ea6..000000000 --- a/Python314_4_x64_Template/Lib/ensurepip/__init__.py +++ /dev/null @@ -1,265 +0,0 @@ -import os -import subprocess -import sys -import sysconfig -import tempfile -from contextlib import nullcontext -from importlib import resources -from pathlib import Path -from shutil import copy2 - - -__all__ = ["version", "bootstrap"] -_PIP_VERSION = "26.0.1" - -# Directory of system wheel packages. Some Linux distribution packaging -# policies recommend against bundling dependencies. For example, Fedora -# installs wheel packages in the /usr/share/python-wheels/ directory and don't -# install the ensurepip._bundled package. -_pkg_dir = sysconfig.get_config_var('WHEEL_PKG_DIR') -if _pkg_dir: - _WHEEL_PKG_DIR = Path(_pkg_dir).resolve() -else: - _WHEEL_PKG_DIR = None - - -def _find_wheel_pkg_dir_pip(): - if _WHEEL_PKG_DIR is None: - # NOTE: The compile-time `WHEEL_PKG_DIR` is unset so there is no place - # NOTE: for looking up the wheels. - return None - - dist_matching_wheels = _WHEEL_PKG_DIR.glob('pip-*.whl') - try: - last_matching_dist_wheel = sorted(dist_matching_wheels)[-1] - except IndexError: - # NOTE: `WHEEL_PKG_DIR` does not contain any wheel files for `pip`. - return None - - return nullcontext(last_matching_dist_wheel) - - -def _get_pip_whl_path_ctx(): - # Prefer pip from the wheel package directory, if present. - if (alternative_pip_wheel_path := _find_wheel_pkg_dir_pip()) is not None: - return alternative_pip_wheel_path - - return resources.as_file( - resources.files('ensurepip') - / '_bundled' - / f'pip-{_PIP_VERSION}-py3-none-any.whl' - ) - - -def _get_pip_version(): - with _get_pip_whl_path_ctx() as bundled_wheel_path: - wheel_name = bundled_wheel_path.name - return ( - # Extract '21.2.4' from 'pip-21.2.4-py3-none-any.whl' - wheel_name. - removeprefix('pip-'). - partition('-')[0] - ) - - -def _run_pip(args, additional_paths=None): - # Run the bootstrapping in a subprocess to avoid leaking any state that happens - # after pip has executed. Particularly, this avoids the case when pip holds onto - # the files in *additional_paths*, preventing us to remove them at the end of the - # invocation. - code = f""" -import runpy -import sys -sys.path = {additional_paths or []} + sys.path -sys.argv[1:] = {args} -runpy.run_module("pip", run_name="__main__", alter_sys=True) -""" - - cmd = [ - sys.executable, - '-W', - 'ignore::DeprecationWarning', - '-c', - code, - ] - if sys.flags.isolated: - # run code in isolated mode if currently running isolated - cmd.insert(1, '-I') - return subprocess.run(cmd, check=True).returncode - - -def version(): - """ - Returns a string specifying the bundled version of pip. - """ - return _get_pip_version() - - -def _disable_pip_configuration_settings(): - # We deliberately ignore all pip environment variables - # when invoking pip - # See http://bugs.python.org/issue19734 for details - keys_to_remove = [k for k in os.environ if k.startswith("PIP_")] - for k in keys_to_remove: - del os.environ[k] - # We also ignore the settings in the default pip configuration file - # See http://bugs.python.org/issue20053 for details - os.environ['PIP_CONFIG_FILE'] = os.devnull - - -def bootstrap(*, root=None, upgrade=False, user=False, - altinstall=False, default_pip=False, - verbosity=0): - """ - Bootstrap pip into the current Python installation (or the given root - directory). - - Note that calling this function will alter both sys.path and os.environ. - """ - # Discard the return value - _bootstrap(root=root, upgrade=upgrade, user=user, - altinstall=altinstall, default_pip=default_pip, - verbosity=verbosity) - - -def _bootstrap(*, root=None, upgrade=False, user=False, - altinstall=False, default_pip=False, - verbosity=0): - """ - Bootstrap pip into the current Python installation (or the given root - directory). Returns pip command status code. - - Note that calling this function will alter both sys.path and os.environ. - """ - if altinstall and default_pip: - raise ValueError("Cannot use altinstall and default_pip together") - - sys.audit("ensurepip.bootstrap", root) - - _disable_pip_configuration_settings() - - # By default, installing pip installs all of the - # following scripts (X.Y == running Python version): - # - # pip, pipX, pipX.Y - # - # pip 1.5+ allows ensurepip to request that some of those be left out - if altinstall: - # omit pip, pipX - os.environ["ENSUREPIP_OPTIONS"] = "altinstall" - elif not default_pip: - # omit pip - os.environ["ENSUREPIP_OPTIONS"] = "install" - - with tempfile.TemporaryDirectory() as tmpdir: - # Put our bundled wheels into a temporary directory and construct the - # additional paths that need added to sys.path - tmpdir_path = Path(tmpdir) - with _get_pip_whl_path_ctx() as bundled_wheel_path: - tmp_wheel_path = tmpdir_path / bundled_wheel_path.name - copy2(bundled_wheel_path, tmp_wheel_path) - - # Construct the arguments to be passed to the pip command - args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir] - if root: - args += ["--root", root] - if upgrade: - args += ["--upgrade"] - if user: - args += ["--user"] - if verbosity: - args += ["-" + "v" * verbosity] - - return _run_pip([*args, "pip"], [os.fsdecode(tmp_wheel_path)]) - - -def _uninstall_helper(*, verbosity=0): - """Helper to support a clean default uninstall process on Windows - - Note that calling this function may alter os.environ. - """ - # Nothing to do if pip was never installed, or has been removed - try: - import pip - except ImportError: - return - - # If the installed pip version doesn't match the available one, - # leave it alone - available_version = version() - if pip.__version__ != available_version: - print(f"ensurepip will only uninstall a matching version " - f"({pip.__version__!r} installed, " - f"{available_version!r} available)", - file=sys.stderr) - return - - _disable_pip_configuration_settings() - - # Construct the arguments to be passed to the pip command - args = ["uninstall", "-y", "--disable-pip-version-check"] - if verbosity: - args += ["-" + "v" * verbosity] - - return _run_pip([*args, "pip"]) - - -def _main(argv=None): - import argparse - parser = argparse.ArgumentParser(color=True) - parser.add_argument( - "--version", - action="version", - version="pip {}".format(version()), - help="Show the version of pip that is bundled with this Python.", - ) - parser.add_argument( - "-v", "--verbose", - action="count", - default=0, - dest="verbosity", - help=("Give more output. Option is additive, and can be used up to 3 " - "times."), - ) - parser.add_argument( - "-U", "--upgrade", - action="store_true", - default=False, - help="Upgrade pip and dependencies, even if already installed.", - ) - parser.add_argument( - "--user", - action="store_true", - default=False, - help="Install using the user scheme.", - ) - parser.add_argument( - "--root", - default=None, - help="Install everything relative to this alternate root directory.", - ) - parser.add_argument( - "--altinstall", - action="store_true", - default=False, - help=("Make an alternate install, installing only the X.Y versioned " - "scripts (Default: pipX, pipX.Y)."), - ) - parser.add_argument( - "--default-pip", - action="store_true", - default=False, - help=("Make a default pip install, installing the unqualified pip " - "in addition to the versioned scripts."), - ) - - args = parser.parse_args(argv) - - return _bootstrap( - root=args.root, - upgrade=args.upgrade, - user=args.user, - verbosity=args.verbosity, - altinstall=args.altinstall, - default_pip=args.default_pip, - ) diff --git a/Python314_4_x64_Template/Lib/ensurepip/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/ensurepip/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 70cabd0f8..000000000 Binary files a/Python314_4_x64_Template/Lib/ensurepip/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/ensurepip/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/ensurepip/__pycache__/__main__.cpython-314.pyc deleted file mode 100644 index c80c91427..000000000 Binary files a/Python314_4_x64_Template/Lib/ensurepip/__pycache__/__main__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/ensurepip/_bundled/pip-26.0.1-py3-none-any.whl b/Python314_4_x64_Template/Lib/ensurepip/_bundled/pip-26.0.1-py3-none-any.whl deleted file mode 100644 index 580d09a92..000000000 Binary files a/Python314_4_x64_Template/Lib/ensurepip/_bundled/pip-26.0.1-py3-none-any.whl and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/html/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/html/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index c7a1d663d..000000000 Binary files a/Python314_4_x64_Template/Lib/html/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/html/__pycache__/parser.cpython-314.pyc b/Python314_4_x64_Template/Lib/html/__pycache__/parser.cpython-314.pyc deleted file mode 100644 index d47a20d58..000000000 Binary files a/Python314_4_x64_Template/Lib/html/__pycache__/parser.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/http/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/http/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 4649245ac..000000000 Binary files a/Python314_4_x64_Template/Lib/http/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/http/__pycache__/client.cpython-314.pyc b/Python314_4_x64_Template/Lib/http/__pycache__/client.cpython-314.pyc deleted file mode 100644 index 1e5f4d80e..000000000 Binary files a/Python314_4_x64_Template/Lib/http/__pycache__/client.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/http/__pycache__/cookies.cpython-314.pyc b/Python314_4_x64_Template/Lib/http/__pycache__/cookies.cpython-314.pyc deleted file mode 100644 index 48c6b3d8c..000000000 Binary files a/Python314_4_x64_Template/Lib/http/__pycache__/cookies.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/http/client.py b/Python314_4_x64_Template/Lib/http/client.py deleted file mode 100644 index 77f8d2629..000000000 --- a/Python314_4_x64_Template/Lib/http/client.py +++ /dev/null @@ -1,1570 +0,0 @@ -r"""HTTP/1.1 client library - - - - -HTTPConnection goes through a number of "states", which define when a client -may legally make another request or fetch the response for a particular -request. This diagram details these state transitions: - - (null) - | - | HTTPConnection() - v - Idle - | - | putrequest() - v - Request-started - | - | ( putheader() )* endheaders() - v - Request-sent - |\_____________________________ - | | getresponse() raises - | response = getresponse() | ConnectionError - v v - Unread-response Idle - [Response-headers-read] - |\____________________ - | | - | response.read() | putrequest() - v v - Idle Req-started-unread-response - ______/| - / | - response.read() | | ( putheader() )* endheaders() - v v - Request-started Req-sent-unread-response - | - | response.read() - v - Request-sent - -This diagram presents the following rules: - -- a second request may not be started until {response-headers-read} - -- a response [object] cannot be retrieved until {request-sent} - -- there is no differentiation between an unread response body and a - partially read response body - -Note: this enforcement is applied by the HTTPConnection class. The - HTTPResponse class does not enforce this state machine, which - implies sophisticated clients may accelerate the request/response - pipeline. Caution should be taken, though: accelerating the states - beyond the above pattern may imply knowledge of the server's - connection-close behavior for certain requests. For example, it - is impossible to tell whether the server will close the connection - UNTIL the response headers have been read; this means that further - requests cannot be placed into the pipeline until it is known that - the server will NOT be closing the connection. - -Logical State __state __response -------------- ------- ---------- -Idle _CS_IDLE None -Request-started _CS_REQ_STARTED None -Request-sent _CS_REQ_SENT None -Unread-response _CS_IDLE -Req-started-unread-response _CS_REQ_STARTED -Req-sent-unread-response _CS_REQ_SENT -""" - -import email.parser -import email.message -import errno -import http -import io -import re -import socket -import sys -import collections.abc -from urllib.parse import urlsplit - -# HTTPMessage, parse_headers(), and the HTTP status code constants are -# intentionally omitted for simplicity -__all__ = ["HTTPResponse", "HTTPConnection", - "HTTPException", "NotConnected", "UnknownProtocol", - "UnknownTransferEncoding", "UnimplementedFileMode", - "IncompleteRead", "InvalidURL", "ImproperConnectionState", - "CannotSendRequest", "CannotSendHeader", "ResponseNotReady", - "BadStatusLine", "LineTooLong", "RemoteDisconnected", "error", - "responses"] - -HTTP_PORT = 80 -HTTPS_PORT = 443 - -_UNKNOWN = 'UNKNOWN' - -# connection states -_CS_IDLE = 'Idle' -_CS_REQ_STARTED = 'Request-started' -_CS_REQ_SENT = 'Request-sent' - - -# hack to maintain backwards compatibility -globals().update(http.HTTPStatus.__members__) - -# another hack to maintain backwards compatibility -# Mapping status codes to official W3C names -responses = {v: v.phrase for v in http.HTTPStatus.__members__.values()} - -# maximal line length when calling readline(). -_MAXLINE = 65536 -_MAXHEADERS = 100 - -# Data larger than this will be read in chunks, to prevent extreme -# overallocation. -_MIN_READ_BUF_SIZE = 1 << 20 - - -# Header name/value ABNF (http://tools.ietf.org/html/rfc7230#section-3.2) -# -# VCHAR = %x21-7E -# obs-text = %x80-FF -# header-field = field-name ":" OWS field-value OWS -# field-name = token -# field-value = *( field-content / obs-fold ) -# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] -# field-vchar = VCHAR / obs-text -# -# obs-fold = CRLF 1*( SP / HTAB ) -# ; obsolete line folding -# ; see Section 3.2.4 - -# token = 1*tchar -# -# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" -# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" -# / DIGIT / ALPHA -# ; any VCHAR, except delimiters -# -# VCHAR defined in http://tools.ietf.org/html/rfc5234#appendix-B.1 - -# the patterns for both name and value are more lenient than RFC -# definitions to allow for backwards compatibility -_is_legal_header_name = re.compile(rb'[^:\s][^:\r\n]*').fullmatch -_is_illegal_header_value = re.compile(rb'\n(?![ \t])|\r(?![ \t\n])').search - -# These characters are not allowed within HTTP URL paths. -# See https://tools.ietf.org/html/rfc3986#section-3.3 and the -# https://tools.ietf.org/html/rfc3986#appendix-A pchar definition. -# Prevents CVE-2019-9740. Includes control characters such as \r\n. -# We don't restrict chars above \x7f as putrequest() limits us to ASCII. -_contains_disallowed_url_pchar_re = re.compile('[\x00-\x20\x7f]') -# Arguably only these _should_ allowed: -# _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$") -# We are more lenient for assumed real world compatibility purposes. - -# These characters are not allowed within HTTP method names -# to prevent http header injection. -_contains_disallowed_method_pchar_re = re.compile('[\x00-\x1f]') - -# We always set the Content-Length header for these methods because some -# servers will otherwise respond with a 411 -_METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'} - - -def _encode(data, name='data'): - """Call data.encode("latin-1") but show a better error message.""" - try: - return data.encode("latin-1") - except UnicodeEncodeError as err: - raise UnicodeEncodeError( - err.encoding, - err.object, - err.start, - err.end, - "%s (%.20r) is not valid Latin-1. Use %s.encode('utf-8') " - "if you want to send it encoded in UTF-8." % - (name.title(), data[err.start:err.end], name)) from None - -def _strip_ipv6_iface(enc_name: bytes) -> bytes: - """Remove interface scope from IPv6 address.""" - enc_name, percent, _ = enc_name.partition(b"%") - if percent: - assert enc_name.startswith(b'['), enc_name - enc_name += b']' - return enc_name - -class HTTPMessage(email.message.Message): - # XXX The only usage of this method is in - # http.server.CGIHTTPRequestHandler. Maybe move the code there so - # that it doesn't need to be part of the public API. The API has - # never been defined so this could cause backwards compatibility - # issues. - - def getallmatchingheaders(self, name): - """Find all header lines matching a given header name. - - Look through the list of headers and find all lines matching a given - header name (and their continuation lines). A list of the lines is - returned, without interpretation. If the header does not occur, an - empty list is returned. If the header occurs multiple times, all - occurrences are returned. Case is not important in the header name. - - """ - name = name.lower() + ':' - n = len(name) - lst = [] - hit = 0 - for line in self.keys(): - if line[:n].lower() == name: - hit = 1 - elif not line[:1].isspace(): - hit = 0 - if hit: - lst.append(line) - return lst - -def _read_headers(fp): - """Reads potential header lines into a list from a file pointer. - - Length of line is limited by _MAXLINE, and number of - headers is limited by _MAXHEADERS. - """ - headers = [] - while True: - line = fp.readline(_MAXLINE + 1) - if len(line) > _MAXLINE: - raise LineTooLong("header line") - headers.append(line) - if len(headers) > _MAXHEADERS: - raise HTTPException("got more than %d headers" % _MAXHEADERS) - if line in (b'\r\n', b'\n', b''): - break - return headers - -def _parse_header_lines(header_lines, _class=HTTPMessage): - """ - Parses only RFC 5322 headers from header lines. - - email Parser wants to see strings rather than bytes. - But a TextIOWrapper around self.rfile would buffer too many bytes - from the stream, bytes which we later need to read as bytes. - So we read the correct bytes here, as bytes, for email Parser - to parse. - - """ - hstring = b''.join(header_lines).decode('iso-8859-1') - return email.parser.Parser(_class=_class).parsestr(hstring) - -def parse_headers(fp, _class=HTTPMessage): - """Parses only RFC 5322 headers from a file pointer.""" - - headers = _read_headers(fp) - return _parse_header_lines(headers, _class) - - -class HTTPResponse(io.BufferedIOBase): - - # See RFC 2616 sec 19.6 and RFC 1945 sec 6 for details. - - # The bytes from the socket object are iso-8859-1 strings. - # See RFC 2616 sec 2.2 which notes an exception for MIME-encoded - # text following RFC 2047. The basic status line parsing only - # accepts iso-8859-1. - - def __init__(self, sock, debuglevel=0, method=None, url=None): - # If the response includes a content-length header, we need to - # make sure that the client doesn't read more than the - # specified number of bytes. If it does, it will block until - # the server times out and closes the connection. This will - # happen if a self.fp.read() is done (without a size) whether - # self.fp is buffered or not. So, no self.fp.read() by - # clients unless they know what they are doing. - self.fp = sock.makefile("rb") - self.debuglevel = debuglevel - self._method = method - - # The HTTPResponse object is returned via urllib. The clients - # of http and urllib expect different attributes for the - # headers. headers is used here and supports urllib. msg is - # provided as a backwards compatibility layer for http - # clients. - - self.headers = self.msg = None - - # from the Status-Line of the response - self.version = _UNKNOWN # HTTP-Version - self.status = _UNKNOWN # Status-Code - self.reason = _UNKNOWN # Reason-Phrase - - self.chunked = _UNKNOWN # is "chunked" being used? - self.chunk_left = _UNKNOWN # bytes left to read in current chunk - self.length = _UNKNOWN # number of bytes left in response - self.will_close = _UNKNOWN # conn will close at end of response - - def _read_status(self): - line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") - if len(line) > _MAXLINE: - raise LineTooLong("status line") - if self.debuglevel > 0: - print("reply:", repr(line)) - if not line: - # Presumably, the server closed the connection before - # sending a valid response. - raise RemoteDisconnected("Remote end closed connection without" - " response") - try: - version, status, reason = line.split(None, 2) - except ValueError: - try: - version, status = line.split(None, 1) - reason = "" - except ValueError: - # empty version will cause next test to fail. - version = "" - if not version.startswith("HTTP/"): - self._close_conn() - raise BadStatusLine(line) - - # The status code is a three-digit number - try: - status = int(status) - if status < 100 or status > 999: - raise BadStatusLine(line) - except ValueError: - raise BadStatusLine(line) - return version, status, reason - - def begin(self): - if self.headers is not None: - # we've already started reading the response - return - - # read until we get a non-100 response - while True: - version, status, reason = self._read_status() - if status != CONTINUE: - break - # skip the header from the 100 response - skipped_headers = _read_headers(self.fp) - if self.debuglevel > 0: - print("headers:", skipped_headers) - del skipped_headers - - self.code = self.status = status - self.reason = reason.strip() - if version in ("HTTP/1.0", "HTTP/0.9"): - # Some servers might still return "0.9", treat it as 1.0 anyway - self.version = 10 - elif version.startswith("HTTP/1."): - self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1 - else: - raise UnknownProtocol(version) - - self.headers = self.msg = parse_headers(self.fp) - - if self.debuglevel > 0: - for hdr, val in self.headers.items(): - print("header:", hdr + ":", val) - - # are we using the chunked-style of transfer encoding? - tr_enc = self.headers.get("transfer-encoding") - if tr_enc and tr_enc.lower() == "chunked": - self.chunked = True - self.chunk_left = None - else: - self.chunked = False - - # will the connection close at the end of the response? - self.will_close = self._check_close() - - # do we have a Content-Length? - # NOTE: RFC 2616, S4.4, #3 says we ignore this if tr_enc is "chunked" - self.length = None - length = self.headers.get("content-length") - if length and not self.chunked: - try: - self.length = int(length) - except ValueError: - self.length = None - else: - if self.length < 0: # ignore nonsensical negative lengths - self.length = None - else: - self.length = None - - # does the body have a fixed length? (of zero) - if (status == NO_CONTENT or status == NOT_MODIFIED or - 100 <= status < 200 or # 1xx codes - self._method == "HEAD"): - self.length = 0 - - # if the connection remains open, and we aren't using chunked, and - # a content-length was not provided, then assume that the connection - # WILL close. - if (not self.will_close and - not self.chunked and - self.length is None): - self.will_close = True - - def _check_close(self): - conn = self.headers.get("connection") - if self.version == 11: - # An HTTP/1.1 proxy is assumed to stay open unless - # explicitly closed. - if conn and "close" in conn.lower(): - return True - return False - - # Some HTTP/1.0 implementations have support for persistent - # connections, using rules different than HTTP/1.1. - - # For older HTTP, Keep-Alive indicates persistent connection. - if self.headers.get("keep-alive"): - return False - - # At least Akamai returns a "Connection: Keep-Alive" header, - # which was supposed to be sent by the client. - if conn and "keep-alive" in conn.lower(): - return False - - # Proxy-Connection is a netscape hack. - pconn = self.headers.get("proxy-connection") - if pconn and "keep-alive" in pconn.lower(): - return False - - # otherwise, assume it will close - return True - - def _close_conn(self): - fp = self.fp - self.fp = None - fp.close() - - def close(self): - try: - super().close() # set "closed" flag - finally: - if self.fp: - self._close_conn() - - # These implementations are for the benefit of io.BufferedReader. - - # XXX This class should probably be revised to act more like - # the "raw stream" that BufferedReader expects. - - def flush(self): - super().flush() - if self.fp: - self.fp.flush() - - def readable(self): - """Always returns True""" - return True - - # End of "raw stream" methods - - def isclosed(self): - """True if the connection is closed.""" - # NOTE: it is possible that we will not ever call self.close(). This - # case occurs when will_close is TRUE, length is None, and we - # read up to the last byte, but NOT past it. - # - # IMPLIES: if will_close is FALSE, then self.close() will ALWAYS be - # called, meaning self.isclosed() is meaningful. - return self.fp is None - - def read(self, amt=None): - """Read and return the response body, or up to the next amt bytes.""" - if self.fp is None: - return b"" - - if self._method == "HEAD": - self._close_conn() - return b"" - - if self.chunked: - return self._read_chunked(amt) - - if amt is not None and amt >= 0: - if self.length is not None and amt > self.length: - # clip the read to the "end of response" - amt = self.length - s = self.fp.read(amt) - if not s and amt: - # Ideally, we would raise IncompleteRead if the content-length - # wasn't satisfied, but it might break compatibility. - self._close_conn() - elif self.length is not None: - self.length -= len(s) - if not self.length: - self._close_conn() - return s - else: - # Amount is not given (unbounded read) so we must check self.length - if self.length is None: - s = self.fp.read() - else: - try: - s = self._safe_read(self.length) - except IncompleteRead: - self._close_conn() - raise - self.length = 0 - self._close_conn() # we read everything - return s - - def readinto(self, b): - """Read up to len(b) bytes into bytearray b and return the number - of bytes read. - """ - - if self.fp is None: - return 0 - - if self._method == "HEAD": - self._close_conn() - return 0 - - if self.chunked: - return self._readinto_chunked(b) - - if self.length is not None: - if len(b) > self.length: - # clip the read to the "end of response" - b = memoryview(b)[0:self.length] - - # we do not use _safe_read() here because this may be a .will_close - # connection, and the user is reading more bytes than will be provided - # (for example, reading in 1k chunks) - n = self.fp.readinto(b) - if not n and b: - # Ideally, we would raise IncompleteRead if the content-length - # wasn't satisfied, but it might break compatibility. - self._close_conn() - elif self.length is not None: - self.length -= n - if not self.length: - self._close_conn() - return n - - def _read_next_chunk_size(self): - # Read the next chunk size from the file - line = self.fp.readline(_MAXLINE + 1) - if len(line) > _MAXLINE: - raise LineTooLong("chunk size") - i = line.find(b";") - if i >= 0: - line = line[:i] # strip chunk-extensions - try: - return int(line, 16) - except ValueError: - # close the connection as protocol synchronisation is - # probably lost - self._close_conn() - raise - - def _read_and_discard_trailer(self): - # read and discard trailer up to the CRLF terminator - ### note: we shouldn't have any trailers! - while True: - line = self.fp.readline(_MAXLINE + 1) - if len(line) > _MAXLINE: - raise LineTooLong("trailer line") - if not line: - # a vanishingly small number of sites EOF without - # sending the trailer - break - if line in (b'\r\n', b'\n', b''): - break - - def _get_chunk_left(self): - # return self.chunk_left, reading a new chunk if necessary. - # chunk_left == 0: at the end of the current chunk, need to close it - # chunk_left == None: No current chunk, should read next. - # This function returns non-zero or None if the last chunk has - # been read. - chunk_left = self.chunk_left - if not chunk_left: # Can be 0 or None - if chunk_left is not None: - # We are at the end of chunk, discard chunk end - self._safe_read(2) # toss the CRLF at the end of the chunk - try: - chunk_left = self._read_next_chunk_size() - except ValueError: - raise IncompleteRead(b'') - if chunk_left == 0: - # last chunk: 1*("0") [ chunk-extension ] CRLF - self._read_and_discard_trailer() - # we read everything; close the "file" - self._close_conn() - chunk_left = None - self.chunk_left = chunk_left - return chunk_left - - def _read_chunked(self, amt=None): - assert self.chunked != _UNKNOWN - if amt is not None and amt < 0: - amt = None - value = [] - try: - while (chunk_left := self._get_chunk_left()) is not None: - if amt is not None and amt <= chunk_left: - value.append(self._safe_read(amt)) - self.chunk_left = chunk_left - amt - break - - value.append(self._safe_read(chunk_left)) - if amt is not None: - amt -= chunk_left - self.chunk_left = 0 - return b''.join(value) - except IncompleteRead as exc: - raise IncompleteRead(b''.join(value)) from exc - - def _readinto_chunked(self, b): - assert self.chunked != _UNKNOWN - total_bytes = 0 - mvb = memoryview(b) - try: - while True: - chunk_left = self._get_chunk_left() - if chunk_left is None: - return total_bytes - - if len(mvb) <= chunk_left: - n = self._safe_readinto(mvb) - self.chunk_left = chunk_left - n - return total_bytes + n - - temp_mvb = mvb[:chunk_left] - n = self._safe_readinto(temp_mvb) - mvb = mvb[n:] - total_bytes += n - self.chunk_left = 0 - - except IncompleteRead: - raise IncompleteRead(bytes(b[0:total_bytes])) - - def _safe_read(self, amt): - """Read the number of bytes requested. - - This function should be used when bytes "should" be present for - reading. If the bytes are truly not available (due to EOF), then the - IncompleteRead exception can be used to detect the problem. - """ - cursize = min(amt, _MIN_READ_BUF_SIZE) - data = self.fp.read(cursize) - if len(data) >= amt: - return data - if len(data) < cursize: - raise IncompleteRead(data, amt - len(data)) - - data = io.BytesIO(data) - data.seek(0, 2) - while True: - # This is a geometric increase in read size (never more than - # doubling out the current length of data per loop iteration). - delta = min(cursize, amt - cursize) - data.write(self.fp.read(delta)) - if data.tell() >= amt: - return data.getvalue() - cursize += delta - if data.tell() < cursize: - raise IncompleteRead(data.getvalue(), amt - data.tell()) - - def _safe_readinto(self, b): - """Same as _safe_read, but for reading into a buffer.""" - amt = len(b) - n = self.fp.readinto(b) - if n < amt: - raise IncompleteRead(bytes(b[:n]), amt-n) - return n - - def read1(self, n=-1): - """Read with at most one underlying system call. If at least one - byte is buffered, return that instead. - """ - if self.fp is None or self._method == "HEAD": - return b"" - if self.chunked: - return self._read1_chunked(n) - if self.length is not None and (n < 0 or n > self.length): - n = self.length - result = self.fp.read1(n) - if not result and n: - self._close_conn() - elif self.length is not None: - self.length -= len(result) - if not self.length: - self._close_conn() - return result - - def peek(self, n=-1): - # Having this enables IOBase.readline() to read more than one - # byte at a time - if self.fp is None or self._method == "HEAD": - return b"" - if self.chunked: - return self._peek_chunked(n) - return self.fp.peek(n) - - def readline(self, limit=-1): - if self.fp is None or self._method == "HEAD": - return b"" - if self.chunked: - # Fallback to IOBase readline which uses peek() and read() - return super().readline(limit) - if self.length is not None and (limit < 0 or limit > self.length): - limit = self.length - result = self.fp.readline(limit) - if not result and limit: - self._close_conn() - elif self.length is not None: - self.length -= len(result) - if not self.length: - self._close_conn() - return result - - def _read1_chunked(self, n): - # Strictly speaking, _get_chunk_left() may cause more than one read, - # but that is ok, since that is to satisfy the chunked protocol. - chunk_left = self._get_chunk_left() - if chunk_left is None or n == 0: - return b'' - if not (0 <= n <= chunk_left): - n = chunk_left # if n is negative or larger than chunk_left - read = self.fp.read1(n) - self.chunk_left -= len(read) - if not read: - raise IncompleteRead(b"") - return read - - def _peek_chunked(self, n): - # Strictly speaking, _get_chunk_left() may cause more than one read, - # but that is ok, since that is to satisfy the chunked protocol. - try: - chunk_left = self._get_chunk_left() - except IncompleteRead: - return b'' # peek doesn't worry about protocol - if chunk_left is None: - return b'' # eof - # peek is allowed to return more than requested. Just request the - # entire chunk, and truncate what we get. - return self.fp.peek(chunk_left)[:chunk_left] - - def fileno(self): - return self.fp.fileno() - - def getheader(self, name, default=None): - '''Returns the value of the header matching *name*. - - If there are multiple matching headers, the values are - combined into a single string separated by commas and spaces. - - If no matching header is found, returns *default* or None if - the *default* is not specified. - - If the headers are unknown, raises http.client.ResponseNotReady. - - ''' - if self.headers is None: - raise ResponseNotReady() - headers = self.headers.get_all(name) or default - if isinstance(headers, str) or not hasattr(headers, '__iter__'): - return headers - else: - return ', '.join(headers) - - def getheaders(self): - """Return list of (header, value) tuples.""" - if self.headers is None: - raise ResponseNotReady() - return list(self.headers.items()) - - # We override IOBase.__iter__ so that it doesn't check for closed-ness - - def __iter__(self): - return self - - # For compatibility with old-style urllib responses. - - def info(self): - '''Returns an instance of the class mimetools.Message containing - meta-information associated with the URL. - - When the method is HTTP, these headers are those returned by - the server at the head of the retrieved HTML page (including - Content-Length and Content-Type). - - When the method is FTP, a Content-Length header will be - present if (as is now usual) the server passed back a file - length in response to the FTP retrieval request. A - Content-Type header will be present if the MIME type can be - guessed. - - When the method is local-file, returned headers will include - a Date representing the file's last-modified time, a - Content-Length giving file size, and a Content-Type - containing a guess at the file's type. See also the - description of the mimetools module. - - ''' - return self.headers - - def geturl(self): - '''Return the real URL of the page. - - In some cases, the HTTP server redirects a client to another - URL. The urlopen() function handles this transparently, but in - some cases the caller needs to know which URL the client was - redirected to. The geturl() method can be used to get at this - redirected URL. - - ''' - return self.url - - def getcode(self): - '''Return the HTTP status code that was sent with the response, - or None if the URL is not an HTTP URL. - - ''' - return self.status - - -def _create_https_context(http_version): - # Function also used by urllib.request to be able to set the check_hostname - # attribute on a context object. - context = ssl._create_default_https_context() - # send ALPN extension to indicate HTTP/1.1 protocol - if http_version == 11: - context.set_alpn_protocols(['http/1.1']) - # enable PHA for TLS 1.3 connections if available - if context.post_handshake_auth is not None: - context.post_handshake_auth = True - return context - - -class HTTPConnection: - - _http_vsn = 11 - _http_vsn_str = 'HTTP/1.1' - - response_class = HTTPResponse - default_port = HTTP_PORT - auto_open = 1 - debuglevel = 0 - - @staticmethod - def _is_textIO(stream): - """Test whether a file-like object is a text or a binary stream. - """ - return isinstance(stream, io.TextIOBase) - - @staticmethod - def _get_content_length(body, method): - """Get the content-length based on the body. - - If the body is None, we set Content-Length: 0 for methods that expect - a body (RFC 7230, Section 3.3.2). We also set the Content-Length for - any method if the body is a str or bytes-like object and not a file. - """ - if body is None: - # do an explicit check for not None here to distinguish - # between unset and set but empty - if method.upper() in _METHODS_EXPECTING_BODY: - return 0 - else: - return None - - if hasattr(body, 'read'): - # file-like object. - return None - - try: - # does it implement the buffer protocol (bytes, bytearray, array)? - mv = memoryview(body) - return mv.nbytes - except TypeError: - pass - - if isinstance(body, str): - return len(body) - - return None - - def __init__(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, - source_address=None, blocksize=8192): - self.timeout = timeout - self.source_address = source_address - self.blocksize = blocksize - self.sock = None - self._buffer = [] - self.__response = None - self.__state = _CS_IDLE - self._method = None - self._tunnel_host = None - self._tunnel_port = None - self._tunnel_headers = {} - self._raw_proxy_headers = None - - (self.host, self.port) = self._get_hostport(host, port) - - self._validate_host(self.host) - - # This is stored as an instance variable to allow unit - # tests to replace it with a suitable mockup - self._create_connection = socket.create_connection - - def set_tunnel(self, host, port=None, headers=None): - """Set up host and port for HTTP CONNECT tunnelling. - - In a connection that uses HTTP CONNECT tunnelling, the host passed to - the constructor is used as a proxy server that relays all communication - to the endpoint passed to `set_tunnel`. This done by sending an HTTP - CONNECT request to the proxy server when the connection is established. - - This method must be called before the HTTP connection has been - established. - - The headers argument should be a mapping of extra HTTP headers to send - with the CONNECT request. - - As HTTP/1.1 is used for HTTP CONNECT tunnelling request, as per the RFC - (https://tools.ietf.org/html/rfc7231#section-4.3.6), a HTTP Host: - header must be provided, matching the authority-form of the request - target provided as the destination for the CONNECT request. If a - HTTP Host: header is not provided via the headers argument, one - is generated and transmitted automatically. - """ - - if self.sock: - raise RuntimeError("Can't set up tunnel for established connection") - - self._tunnel_host, self._tunnel_port = self._get_hostport(host, port) - if headers: - self._tunnel_headers = headers.copy() - else: - self._tunnel_headers.clear() - - if not any(header.lower() == "host" for header in self._tunnel_headers): - encoded_host = self._tunnel_host.encode("idna").decode("ascii") - self._tunnel_headers["Host"] = "%s:%d" % ( - encoded_host, self._tunnel_port) - - def _get_hostport(self, host, port): - if port is None: - i = host.rfind(':') - j = host.rfind(']') # ipv6 addresses have [...] - if i > j: - try: - port = int(host[i+1:]) - except ValueError: - if host[i+1:] == "": # http://foo.com:/ == http://foo.com/ - port = self.default_port - else: - raise InvalidURL("nonnumeric port: '%s'" % host[i+1:]) - host = host[:i] - else: - port = self.default_port - if host and host[0] == '[' and host[-1] == ']': - host = host[1:-1] - - return (host, port) - - def set_debuglevel(self, level): - self.debuglevel = level - - def _wrap_ipv6(self, ip): - if b':' in ip and ip[0] != b'['[0]: - return b"[" + ip + b"]" - return ip - - def _tunnel(self): - connect = b"CONNECT %s:%d %s\r\n" % ( - self._wrap_ipv6(self._tunnel_host.encode("idna")), - self._tunnel_port, - self._http_vsn_str.encode("ascii")) - headers = [connect] - for header, value in self._tunnel_headers.items(): - headers.append(f"{header}: {value}\r\n".encode("latin-1")) - headers.append(b"\r\n") - # Making a single send() call instead of one per line encourages - # the host OS to use a more optimal packet size instead of - # potentially emitting a series of small packets. - self.send(b"".join(headers)) - del headers - - response = self.response_class(self.sock, method=self._method) - try: - (version, code, message) = response._read_status() - - self._raw_proxy_headers = _read_headers(response.fp) - - if self.debuglevel > 0: - for header in self._raw_proxy_headers: - print('header:', header.decode()) - - if code != http.HTTPStatus.OK: - self.close() - raise OSError(f"Tunnel connection failed: {code} {message.strip()}") - - finally: - response.close() - - def get_proxy_response_headers(self): - """ - Returns a dictionary with the headers of the response - received from the proxy server to the CONNECT request - sent to set the tunnel. - - If the CONNECT request was not sent, the method returns None. - """ - return ( - _parse_header_lines(self._raw_proxy_headers) - if self._raw_proxy_headers is not None - else None - ) - - def connect(self): - """Connect to the host and port specified in __init__.""" - sys.audit("http.client.connect", self, self.host, self.port) - self.sock = self._create_connection( - (self.host,self.port), self.timeout, self.source_address) - # Might fail in OSs that don't implement TCP_NODELAY - try: - self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) - except OSError as e: - if e.errno != errno.ENOPROTOOPT: - raise - - if self._tunnel_host: - self._tunnel() - - def close(self): - """Close the connection to the HTTP server.""" - self.__state = _CS_IDLE - try: - sock = self.sock - if sock: - self.sock = None - sock.close() # close it manually... there may be other refs - finally: - response = self.__response - if response: - self.__response = None - response.close() - - def send(self, data): - """Send 'data' to the server. - ``data`` can be a string object, a bytes object, an array object, a - file-like object that supports a .read() method, or an iterable object. - """ - - if self.sock is None: - if self.auto_open: - self.connect() - else: - raise NotConnected() - - if self.debuglevel > 0: - print("send:", repr(data)) - if hasattr(data, "read") : - if self.debuglevel > 0: - print("sending a readable") - encode = self._is_textIO(data) - if encode and self.debuglevel > 0: - print("encoding file using iso-8859-1") - while datablock := data.read(self.blocksize): - if encode: - datablock = datablock.encode("iso-8859-1") - sys.audit("http.client.send", self, datablock) - self.sock.sendall(datablock) - return - sys.audit("http.client.send", self, data) - try: - self.sock.sendall(data) - except TypeError: - if isinstance(data, collections.abc.Iterable): - for d in data: - self.sock.sendall(d) - else: - raise TypeError("data should be a bytes-like object " - "or an iterable, got %r" % type(data)) - - def _output(self, s): - """Add a line of output to the current request buffer. - - Assumes that the line does *not* end with \\r\\n. - """ - self._buffer.append(s) - - def _read_readable(self, readable): - if self.debuglevel > 0: - print("reading a readable") - encode = self._is_textIO(readable) - if encode and self.debuglevel > 0: - print("encoding file using iso-8859-1") - while datablock := readable.read(self.blocksize): - if encode: - datablock = datablock.encode("iso-8859-1") - yield datablock - - def _send_output(self, message_body=None, encode_chunked=False): - """Send the currently buffered request and clear the buffer. - - Appends an extra \\r\\n to the buffer. - A message_body may be specified, to be appended to the request. - """ - self._buffer.extend((b"", b"")) - msg = b"\r\n".join(self._buffer) - del self._buffer[:] - self.send(msg) - - if message_body is not None: - - # create a consistent interface to message_body - if hasattr(message_body, 'read'): - # Let file-like take precedence over byte-like. This - # is needed to allow the current position of mmap'ed - # files to be taken into account. - chunks = self._read_readable(message_body) - else: - try: - # this is solely to check to see if message_body - # implements the buffer API. it /would/ be easier - # to capture if PyObject_CheckBuffer was exposed - # to Python. - memoryview(message_body) - except TypeError: - try: - chunks = iter(message_body) - except TypeError: - raise TypeError("message_body should be a bytes-like " - "object or an iterable, got %r" - % type(message_body)) - else: - # the object implements the buffer interface and - # can be passed directly into socket methods - chunks = (message_body,) - - for chunk in chunks: - if not chunk: - if self.debuglevel > 0: - print('Zero length chunk ignored') - continue - - if encode_chunked and self._http_vsn == 11: - # chunked encoding - chunk = f'{len(chunk):X}\r\n'.encode('ascii') + chunk \ - + b'\r\n' - self.send(chunk) - - if encode_chunked and self._http_vsn == 11: - # end chunked transfer - self.send(b'0\r\n\r\n') - - def putrequest(self, method, url, skip_host=False, - skip_accept_encoding=False): - """Send a request to the server. - - 'method' specifies an HTTP request method, e.g. 'GET'. - 'url' specifies the object being requested, e.g. '/index.html'. - 'skip_host' if True does not add automatically a 'Host:' header - 'skip_accept_encoding' if True does not add automatically an - 'Accept-Encoding:' header - """ - - # if a prior response has been completed, then forget about it. - if self.__response and self.__response.isclosed(): - self.__response = None - - - # in certain cases, we cannot issue another request on this connection. - # this occurs when: - # 1) we are in the process of sending a request. (_CS_REQ_STARTED) - # 2) a response to a previous request has signalled that it is going - # to close the connection upon completion. - # 3) the headers for the previous response have not been read, thus - # we cannot determine whether point (2) is true. (_CS_REQ_SENT) - # - # if there is no prior response, then we can request at will. - # - # if point (2) is true, then we will have passed the socket to the - # response (effectively meaning, "there is no prior response"), and - # will open a new one when a new request is made. - # - # Note: if a prior response exists, then we *can* start a new request. - # We are not allowed to begin fetching the response to this new - # request, however, until that prior response is complete. - # - if self.__state == _CS_IDLE: - self.__state = _CS_REQ_STARTED - else: - raise CannotSendRequest(self.__state) - - self._validate_method(method) - - # Save the method for use later in the response phase - self._method = method - - url = url or '/' - self._validate_path(url) - - request = '%s %s %s' % (method, url, self._http_vsn_str) - - self._output(self._encode_request(request)) - - if self._http_vsn == 11: - # Issue some standard headers for better HTTP/1.1 compliance - - if not skip_host: - # this header is issued *only* for HTTP/1.1 - # connections. more specifically, this means it is - # only issued when the client uses the new - # HTTPConnection() class. backwards-compat clients - # will be using HTTP/1.0 and those clients may be - # issuing this header themselves. we should NOT issue - # it twice; some web servers (such as Apache) barf - # when they see two Host: headers - - # If we need a non-standard port,include it in the - # header. If the request is going through a proxy, - # but the host of the actual URL, not the host of the - # proxy. - - netloc = '' - if url.startswith('http'): - nil, netloc, nil, nil, nil = urlsplit(url) - - if netloc: - try: - netloc_enc = netloc.encode("ascii") - except UnicodeEncodeError: - netloc_enc = netloc.encode("idna") - self.putheader('Host', _strip_ipv6_iface(netloc_enc)) - else: - if self._tunnel_host: - host = self._tunnel_host - port = self._tunnel_port - else: - host = self.host - port = self.port - - try: - host_enc = host.encode("ascii") - except UnicodeEncodeError: - host_enc = host.encode("idna") - - # As per RFC 273, IPv6 address should be wrapped with [] - # when used as Host header - host_enc = self._wrap_ipv6(host_enc) - if ":" in host: - host_enc = _strip_ipv6_iface(host_enc) - - if port == self.default_port: - self.putheader('Host', host_enc) - else: - host_enc = host_enc.decode("ascii") - self.putheader('Host', "%s:%s" % (host_enc, port)) - - # note: we are assuming that clients will not attempt to set these - # headers since *this* library must deal with the - # consequences. this also means that when the supporting - # libraries are updated to recognize other forms, then this - # code should be changed (removed or updated). - - # we only want a Content-Encoding of "identity" since we don't - # support encodings such as x-gzip or x-deflate. - if not skip_accept_encoding: - self.putheader('Accept-Encoding', 'identity') - - # we can accept "chunked" Transfer-Encodings, but no others - # NOTE: no TE header implies *only* "chunked" - #self.putheader('TE', 'chunked') - - # if TE is supplied in the header, then it must appear in a - # Connection header. - #self.putheader('Connection', 'TE') - - else: - # For HTTP/1.0, the server will assume "not chunked" - pass - - def _encode_request(self, request): - # ASCII also helps prevent CVE-2019-9740. - return request.encode('ascii') - - def _validate_method(self, method): - """Validate a method name for putrequest.""" - # prevent http header injection - match = _contains_disallowed_method_pchar_re.search(method) - if match: - raise ValueError( - f"method can't contain control characters. {method!r} " - f"(found at least {match.group()!r})") - - def _validate_path(self, url): - """Validate a url for putrequest.""" - # Prevent CVE-2019-9740. - match = _contains_disallowed_url_pchar_re.search(url) - if match: - raise InvalidURL(f"URL can't contain control characters. {url!r} " - f"(found at least {match.group()!r})") - - def _validate_host(self, host): - """Validate a host so it doesn't contain control characters.""" - # Prevent CVE-2019-18348. - match = _contains_disallowed_url_pchar_re.search(host) - if match: - raise InvalidURL(f"URL can't contain control characters. {host!r} " - f"(found at least {match.group()!r})") - - def putheader(self, header, *values): - """Send a request header line to the server. - - For example: h.putheader('Accept', 'text/html') - """ - if self.__state != _CS_REQ_STARTED: - raise CannotSendHeader() - - if hasattr(header, 'encode'): - header = header.encode('ascii') - - if not _is_legal_header_name(header): - raise ValueError('Invalid header name %r' % (header,)) - - values = list(values) - for i, one_value in enumerate(values): - if hasattr(one_value, 'encode'): - values[i] = one_value.encode('latin-1') - elif isinstance(one_value, int): - values[i] = str(one_value).encode('ascii') - - if _is_illegal_header_value(values[i]): - raise ValueError('Invalid header value %r' % (values[i],)) - - value = b'\r\n\t'.join(values) - header = header + b': ' + value - self._output(header) - - def endheaders(self, message_body=None, *, encode_chunked=False): - """Indicate that the last header line has been sent to the server. - - This method sends the request to the server. The optional message_body - argument can be used to pass a message body associated with the - request. - """ - if self.__state == _CS_REQ_STARTED: - self.__state = _CS_REQ_SENT - else: - raise CannotSendHeader() - self._send_output(message_body, encode_chunked=encode_chunked) - - def request(self, method, url, body=None, headers={}, *, - encode_chunked=False): - """Send a complete request to the server.""" - self._send_request(method, url, body, headers, encode_chunked) - - def _send_request(self, method, url, body, headers, encode_chunked): - # Honor explicitly requested Host: and Accept-Encoding: headers. - header_names = frozenset(k.lower() for k in headers) - skips = {} - if 'host' in header_names: - skips['skip_host'] = 1 - if 'accept-encoding' in header_names: - skips['skip_accept_encoding'] = 1 - - self.putrequest(method, url, **skips) - - # chunked encoding will happen if HTTP/1.1 is used and either - # the caller passes encode_chunked=True or the following - # conditions hold: - # 1. content-length has not been explicitly set - # 2. the body is a file or iterable, but not a str or bytes-like - # 3. Transfer-Encoding has NOT been explicitly set by the caller - - if 'content-length' not in header_names: - # only chunk body if not explicitly set for backwards - # compatibility, assuming the client code is already handling the - # chunking - if 'transfer-encoding' not in header_names: - # if content-length cannot be automatically determined, fall - # back to chunked encoding - encode_chunked = False - content_length = self._get_content_length(body, method) - if content_length is None: - if body is not None: - if self.debuglevel > 0: - print('Unable to determine size of %r' % body) - encode_chunked = True - self.putheader('Transfer-Encoding', 'chunked') - else: - self.putheader('Content-Length', str(content_length)) - else: - encode_chunked = False - - for hdr, value in headers.items(): - self.putheader(hdr, value) - if isinstance(body, str): - # RFC 2616 Section 3.7.1 says that text default has a - # default charset of iso-8859-1. - body = _encode(body, 'body') - self.endheaders(body, encode_chunked=encode_chunked) - - def getresponse(self): - """Get the response from the server. - - If the HTTPConnection is in the correct state, returns an - instance of HTTPResponse or of whatever object is returned by - the response_class variable. - - If a request has not been sent or if a previous response has - not be handled, ResponseNotReady is raised. If the HTTP - response indicates that the connection should be closed, then - it will be closed before the response is returned. When the - connection is closed, the underlying socket is closed. - """ - - # if a prior response has been completed, then forget about it. - if self.__response and self.__response.isclosed(): - self.__response = None - - # if a prior response exists, then it must be completed (otherwise, we - # cannot read this response's header to determine the connection-close - # behavior) - # - # note: if a prior response existed, but was connection-close, then the - # socket and response were made independent of this HTTPConnection - # object since a new request requires that we open a whole new - # connection - # - # this means the prior response had one of two states: - # 1) will_close: this connection was reset and the prior socket and - # response operate independently - # 2) persistent: the response was retained and we await its - # isclosed() status to become true. - # - if self.__state != _CS_REQ_SENT or self.__response: - raise ResponseNotReady(self.__state) - - if self.debuglevel > 0: - response = self.response_class(self.sock, self.debuglevel, - method=self._method) - else: - response = self.response_class(self.sock, method=self._method) - - try: - try: - response.begin() - except ConnectionError: - self.close() - raise - assert response.will_close != _UNKNOWN - self.__state = _CS_IDLE - - if response.will_close: - # this effectively passes the connection to the response - self.close() - else: - # remember this, so we can tell when it is complete - self.__response = response - - return response - except: - response.close() - raise - -try: - import ssl -except ImportError: - pass -else: - class HTTPSConnection(HTTPConnection): - "This class allows communication via SSL." - - default_port = HTTPS_PORT - - def __init__(self, host, port=None, - *, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, - source_address=None, context=None, blocksize=8192): - super(HTTPSConnection, self).__init__(host, port, timeout, - source_address, - blocksize=blocksize) - if context is None: - context = _create_https_context(self._http_vsn) - self._context = context - - def connect(self): - "Connect to a host on a given (SSL) port." - - super().connect() - - if self._tunnel_host: - server_hostname = self._tunnel_host - else: - server_hostname = self.host - - self.sock = self._context.wrap_socket(self.sock, - server_hostname=server_hostname) - - __all__.append("HTTPSConnection") - -class HTTPException(Exception): - # Subclasses that define an __init__ must call Exception.__init__ - # or define self.args. Otherwise, str() will fail. - pass - -class NotConnected(HTTPException): - pass - -class InvalidURL(HTTPException): - pass - -class UnknownProtocol(HTTPException): - def __init__(self, version): - self.args = version, - self.version = version - -class UnknownTransferEncoding(HTTPException): - pass - -class UnimplementedFileMode(HTTPException): - pass - -class IncompleteRead(HTTPException): - def __init__(self, partial, expected=None): - self.args = partial, - self.partial = partial - self.expected = expected - def __repr__(self): - if self.expected is not None: - e = ', %i more expected' % self.expected - else: - e = '' - return '%s(%i bytes read%s)' % (self.__class__.__name__, - len(self.partial), e) - __str__ = object.__str__ - -class ImproperConnectionState(HTTPException): - pass - -class CannotSendRequest(ImproperConnectionState): - pass - -class CannotSendHeader(ImproperConnectionState): - pass - -class ResponseNotReady(ImproperConnectionState): - pass - -class BadStatusLine(HTTPException): - def __init__(self, line): - if not line: - line = repr(line) - self.args = line, - self.line = line - -class LineTooLong(HTTPException): - def __init__(self, line_type): - HTTPException.__init__(self, "got more than %d bytes when reading %s" - % (_MAXLINE, line_type)) - -class RemoteDisconnected(ConnectionResetError, BadStatusLine): - def __init__(self, *pos, **kw): - BadStatusLine.__init__(self, "") - ConnectionResetError.__init__(self, *pos, **kw) - -# for backwards compatibility -error = HTTPException diff --git a/Python314_4_x64_Template/Lib/importlib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 5da3dcf7f..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/__pycache__/abc.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/__pycache__/abc.cpython-314.pyc deleted file mode 100644 index 75ac42580..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/__pycache__/abc.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/__pycache__/readers.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/__pycache__/readers.cpython-314.pyc deleted file mode 100644 index 62c734aaf..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/__pycache__/readers.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index eafb07077..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_adapters.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_adapters.cpython-314.pyc deleted file mode 100644 index 86a33230b..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_adapters.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_collections.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_collections.cpython-314.pyc deleted file mode 100644 index ac44c18e5..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_collections.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_itertools.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_itertools.cpython-314.pyc deleted file mode 100644 index b94cd1a91..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_itertools.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_meta.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_meta.cpython-314.pyc deleted file mode 100644 index 733851743..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/metadata/__pycache__/_meta.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 69ce4c3b1..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/_adapters.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/_adapters.cpython-314.pyc deleted file mode 100644 index 17e3c272b..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/_adapters.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/_itertools.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/_itertools.cpython-314.pyc deleted file mode 100644 index ad4bbf6d3..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/_itertools.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/abc.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/abc.cpython-314.pyc deleted file mode 100644 index 1627c2bc0..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/abc.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/readers.cpython-314.pyc b/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/readers.cpython-314.pyc deleted file mode 100644 index e294fe470..000000000 Binary files a/Python314_4_x64_Template/Lib/importlib/resources/__pycache__/readers.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/inspect.py b/Python314_4_x64_Template/Lib/inspect.py deleted file mode 100644 index 2d229051b..000000000 --- a/Python314_4_x64_Template/Lib/inspect.py +++ /dev/null @@ -1,3409 +0,0 @@ -"""Get useful information from live Python objects. - -This module encapsulates the interface provided by the internal special -attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. -It also provides some help for examining source code and class layout. - -Here are some of the useful functions provided by this module: - - ismodule(), isclass(), ismethod(), ispackage(), isfunction(), - isgeneratorfunction(), isgenerator(), istraceback(), isframe(), - iscode(), isbuiltin(), isroutine() - check object types - getmembers() - get members of an object that satisfy a given condition - - getfile(), getsourcefile(), getsource() - find an object's source code - getdoc(), getcomments() - get documentation on an object - getmodule() - determine the module that an object came from - getclasstree() - arrange classes so as to represent their hierarchy - - getargvalues(), getcallargs() - get info about function arguments - getfullargspec() - same, with support for Python 3 features - formatargvalues() - format an argument spec - getouterframes(), getinnerframes() - get info about frames - currentframe() - get the current stack frame - stack(), trace() - get info about frames on the stack or in a traceback - - signature() - get a Signature object for the callable -""" - -# This module is in the public domain. No warranties. - -__author__ = ('Ka-Ping Yee ', - 'Yury Selivanov ') - -__all__ = [ - "AGEN_CLOSED", - "AGEN_CREATED", - "AGEN_RUNNING", - "AGEN_SUSPENDED", - "ArgInfo", - "Arguments", - "Attribute", - "BlockFinder", - "BoundArguments", - "BufferFlags", - "CORO_CLOSED", - "CORO_CREATED", - "CORO_RUNNING", - "CORO_SUSPENDED", - "CO_ASYNC_GENERATOR", - "CO_COROUTINE", - "CO_GENERATOR", - "CO_ITERABLE_COROUTINE", - "CO_NESTED", - "CO_NEWLOCALS", - "CO_NOFREE", - "CO_OPTIMIZED", - "CO_VARARGS", - "CO_VARKEYWORDS", - "CO_HAS_DOCSTRING", - "CO_METHOD", - "ClassFoundException", - "ClosureVars", - "EndOfBlock", - "FrameInfo", - "FullArgSpec", - "GEN_CLOSED", - "GEN_CREATED", - "GEN_RUNNING", - "GEN_SUSPENDED", - "Parameter", - "Signature", - "TPFLAGS_IS_ABSTRACT", - "Traceback", - "classify_class_attrs", - "cleandoc", - "currentframe", - "findsource", - "formatannotation", - "formatannotationrelativeto", - "formatargvalues", - "get_annotations", - "getabsfile", - "getargs", - "getargvalues", - "getasyncgenlocals", - "getasyncgenstate", - "getattr_static", - "getblock", - "getcallargs", - "getclasstree", - "getclosurevars", - "getcomments", - "getcoroutinelocals", - "getcoroutinestate", - "getdoc", - "getfile", - "getframeinfo", - "getfullargspec", - "getgeneratorlocals", - "getgeneratorstate", - "getinnerframes", - "getlineno", - "getmembers", - "getmembers_static", - "getmodule", - "getmodulename", - "getmro", - "getouterframes", - "getsource", - "getsourcefile", - "getsourcelines", - "indentsize", - "isabstract", - "isasyncgen", - "isasyncgenfunction", - "isawaitable", - "isbuiltin", - "isclass", - "iscode", - "iscoroutine", - "iscoroutinefunction", - "isdatadescriptor", - "isframe", - "isfunction", - "isgenerator", - "isgeneratorfunction", - "isgetsetdescriptor", - "ismemberdescriptor", - "ismethod", - "ismethoddescriptor", - "ismethodwrapper", - "ismodule", - "ispackage", - "isroutine", - "istraceback", - "markcoroutinefunction", - "signature", - "stack", - "trace", - "unwrap", - "walktree", -] - - -import abc -from annotationlib import Format, ForwardRef -from annotationlib import get_annotations # re-exported -import ast -import dis -import collections.abc -import enum -import importlib.machinery -import itertools -import linecache -import os -import re -import sys -import tokenize -import token -import types -import functools -import builtins -from keyword import iskeyword -from operator import attrgetter -from collections import namedtuple, OrderedDict -from weakref import ref as make_weakref - -# Create constants for the compiler flags in Include/code.h -# We try to get them from dis to avoid duplication -mod_dict = globals() -for k, v in dis.COMPILER_FLAG_NAMES.items(): - mod_dict["CO_" + v] = k -del k, v, mod_dict - -# See Include/object.h -TPFLAGS_IS_ABSTRACT = 1 << 20 - - -# ----------------------------------------------------------- type-checking -def ismodule(object): - """Return true if the object is a module.""" - return isinstance(object, types.ModuleType) - -def isclass(object): - """Return true if the object is a class.""" - return isinstance(object, type) - -def ismethod(object): - """Return true if the object is an instance method.""" - return isinstance(object, types.MethodType) - -def ispackage(object): - """Return true if the object is a package.""" - return ismodule(object) and hasattr(object, "__path__") - -def ismethoddescriptor(object): - """Return true if the object is a method descriptor. - - But not if ismethod() or isclass() or isfunction() are true. - - This is new in Python 2.2, and, for example, is true of int.__add__. - An object passing this test has a __get__ attribute, but not a - __set__ attribute or a __delete__ attribute. Beyond that, the set - of attributes varies; __name__ is usually sensible, and __doc__ - often is. - - Methods implemented via descriptors that also pass one of the other - tests return false from the ismethoddescriptor() test, simply because - the other tests promise more -- you can, e.g., count on having the - __func__ attribute (etc) when an object passes ismethod().""" - if isclass(object) or ismethod(object) or isfunction(object): - # mutual exclusion - return False - tp = type(object) - return (hasattr(tp, "__get__") - and not hasattr(tp, "__set__") - and not hasattr(tp, "__delete__")) - -def isdatadescriptor(object): - """Return true if the object is a data descriptor. - - Data descriptors have a __set__ or a __delete__ attribute. Examples are - properties (defined in Python) and getsets and members (defined in C). - Typically, data descriptors will also have __name__ and __doc__ attributes - (properties, getsets, and members have both of these attributes), but this - is not guaranteed.""" - if isclass(object) or ismethod(object) or isfunction(object): - # mutual exclusion - return False - tp = type(object) - return hasattr(tp, "__set__") or hasattr(tp, "__delete__") - -if hasattr(types, 'MemberDescriptorType'): - # CPython and equivalent - def ismemberdescriptor(object): - """Return true if the object is a member descriptor. - - Member descriptors are specialized descriptors defined in extension - modules.""" - return isinstance(object, types.MemberDescriptorType) -else: - # Other implementations - def ismemberdescriptor(object): - """Return true if the object is a member descriptor. - - Member descriptors are specialized descriptors defined in extension - modules.""" - return False - -if hasattr(types, 'GetSetDescriptorType'): - # CPython and equivalent - def isgetsetdescriptor(object): - """Return true if the object is a getset descriptor. - - getset descriptors are specialized descriptors defined in extension - modules.""" - return isinstance(object, types.GetSetDescriptorType) -else: - # Other implementations - def isgetsetdescriptor(object): - """Return true if the object is a getset descriptor. - - getset descriptors are specialized descriptors defined in extension - modules.""" - return False - -def isfunction(object): - """Return true if the object is a user-defined function. - - Function objects provide these attributes: - __doc__ documentation string - __name__ name with which this function was defined - __qualname__ qualified name of this function - __module__ name of the module the function was defined in or None - __code__ code object containing compiled function bytecode - __defaults__ tuple of any default values for arguments - __globals__ global namespace in which this function was defined - __annotations__ dict of parameter annotations - __kwdefaults__ dict of keyword only parameters with defaults - __dict__ namespace which is supporting arbitrary function attributes - __closure__ a tuple of cells or None - __type_params__ tuple of type parameters""" - return isinstance(object, types.FunctionType) - -def _has_code_flag(f, flag): - """Return true if ``f`` is a function (or a method or functools.partial - wrapper wrapping a function or a functools.partialmethod wrapping a - function) whose code object has the given ``flag`` - set in its flags.""" - f = functools._unwrap_partialmethod(f) - while ismethod(f): - f = f.__func__ - f = functools._unwrap_partial(f) - if not (isfunction(f) or _signature_is_functionlike(f)): - return False - return bool(f.__code__.co_flags & flag) - -def isgeneratorfunction(obj): - """Return true if the object is a user-defined generator function. - - Generator function objects provide the same attributes as functions. - See help(isfunction) for a list of attributes.""" - return _has_code_flag(obj, CO_GENERATOR) - -# A marker for markcoroutinefunction and iscoroutinefunction. -_is_coroutine_mark = object() - -def _has_coroutine_mark(f): - while ismethod(f): - f = f.__func__ - f = functools._unwrap_partial(f) - return getattr(f, "_is_coroutine_marker", None) is _is_coroutine_mark - -def markcoroutinefunction(func): - """ - Decorator to ensure callable is recognised as a coroutine function. - """ - if hasattr(func, '__func__'): - func = func.__func__ - func._is_coroutine_marker = _is_coroutine_mark - return func - -def iscoroutinefunction(obj): - """Return true if the object is a coroutine function. - - Coroutine functions are normally defined with "async def" syntax, but may - be marked via markcoroutinefunction. - """ - return _has_code_flag(obj, CO_COROUTINE) or _has_coroutine_mark(obj) - -def isasyncgenfunction(obj): - """Return true if the object is an asynchronous generator function. - - Asynchronous generator functions are defined with "async def" - syntax and have "yield" expressions in their body. - """ - return _has_code_flag(obj, CO_ASYNC_GENERATOR) - -def isasyncgen(object): - """Return true if the object is an asynchronous generator.""" - return isinstance(object, types.AsyncGeneratorType) - -def isgenerator(object): - """Return true if the object is a generator. - - Generator objects provide these attributes: - gi_code code object - gi_frame frame object or possibly None once the generator has - been exhausted - gi_running set to 1 when generator is executing, 0 otherwise - gi_suspended set to 1 when the generator is suspended at a yield point, 0 otherwise - gi_yieldfrom object being iterated by yield from or None - - __iter__() defined to support iteration over container - close() raises a new GeneratorExit exception inside the - generator to terminate the iteration - send() resumes the generator and "sends" a value that becomes - the result of the current yield-expression - throw() used to raise an exception inside the generator""" - return isinstance(object, types.GeneratorType) - -def iscoroutine(object): - """Return true if the object is a coroutine.""" - return isinstance(object, types.CoroutineType) - -def isawaitable(object): - """Return true if object can be passed to an ``await`` expression.""" - return (isinstance(object, types.CoroutineType) or - isinstance(object, types.GeneratorType) and - bool(object.gi_code.co_flags & CO_ITERABLE_COROUTINE) or - isinstance(object, collections.abc.Awaitable)) - -def istraceback(object): - """Return true if the object is a traceback. - - Traceback objects provide these attributes: - tb_frame frame object at this level - tb_lasti index of last attempted instruction in bytecode - tb_lineno current line number in Python source code - tb_next next inner traceback object (called by this level)""" - return isinstance(object, types.TracebackType) - -def isframe(object): - """Return true if the object is a frame object. - - Frame objects provide these attributes: - f_back next outer frame object (this frame's caller) - f_builtins built-in namespace seen by this frame - f_code code object being executed in this frame - f_globals global namespace seen by this frame - f_lasti index of last attempted instruction in bytecode - f_lineno current line number in Python source code - f_locals local namespace seen by this frame - f_trace tracing function for this frame, or None - f_trace_lines is a tracing event triggered for each source line? - f_trace_opcodes are per-opcode events being requested? - - clear() used to clear all references to local variables""" - return isinstance(object, types.FrameType) - -def iscode(object): - """Return true if the object is a code object. - - Code objects provide these attributes: - co_argcount number of arguments (not including *, ** args - or keyword only arguments) - co_code string of raw compiled bytecode - co_cellvars tuple of names of cell variables - co_consts tuple of constants used in the bytecode - co_filename name of file in which this code object was created - co_firstlineno number of first line in Python source code - co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg - | 16=nested | 32=generator | 64=nofree | 128=coroutine - | 256=iterable_coroutine | 512=async_generator - | 0x4000000=has_docstring - co_freevars tuple of names of free variables - co_posonlyargcount number of positional only arguments - co_kwonlyargcount number of keyword only arguments (not including ** arg) - co_lnotab encoded mapping of line numbers to bytecode indices - co_name name with which this code object was defined - co_names tuple of names other than arguments and function locals - co_nlocals number of local variables - co_stacksize virtual machine stack space required - co_varnames tuple of names of arguments and local variables - co_qualname fully qualified function name - - co_lines() returns an iterator that yields successive bytecode ranges - co_positions() returns an iterator of source code positions for each bytecode instruction - replace() returns a copy of the code object with a new values""" - return isinstance(object, types.CodeType) - -def isbuiltin(object): - """Return true if the object is a built-in function or method. - - Built-in functions and methods provide these attributes: - __doc__ documentation string - __name__ original name of this function or method - __self__ instance to which a method is bound, or None""" - return isinstance(object, types.BuiltinFunctionType) - -def ismethodwrapper(object): - """Return true if the object is a method wrapper.""" - return isinstance(object, types.MethodWrapperType) - -def isroutine(object): - """Return true if the object is any kind of function or method.""" - return (isbuiltin(object) - or isfunction(object) - or ismethod(object) - or ismethoddescriptor(object) - or ismethodwrapper(object) - or isinstance(object, functools._singledispatchmethod_get)) - -def isabstract(object): - """Return true if the object is an abstract base class (ABC).""" - if not isinstance(object, type): - return False - if object.__flags__ & TPFLAGS_IS_ABSTRACT: - return True - if not issubclass(type(object), abc.ABCMeta): - return False - if hasattr(object, '__abstractmethods__'): - # It looks like ABCMeta.__new__ has finished running; - # TPFLAGS_IS_ABSTRACT should have been accurate. - return False - # It looks like ABCMeta.__new__ has not finished running yet; we're - # probably in __init_subclass__. We'll look for abstractmethods manually. - for name, value in object.__dict__.items(): - if getattr(value, "__isabstractmethod__", False): - return True - for base in object.__bases__: - for name in getattr(base, "__abstractmethods__", ()): - value = getattr(object, name, None) - if getattr(value, "__isabstractmethod__", False): - return True - return False - -def _getmembers(object, predicate, getter): - results = [] - processed = set() - names = dir(object) - if isclass(object): - mro = getmro(object) - # add any DynamicClassAttributes to the list of names if object is a class; - # this may result in duplicate entries if, for example, a virtual - # attribute with the same name as a DynamicClassAttribute exists - try: - for base in object.__bases__: - for k, v in base.__dict__.items(): - if isinstance(v, types.DynamicClassAttribute): - names.append(k) - except AttributeError: - pass - else: - mro = () - for key in names: - # First try to get the value via getattr. Some descriptors don't - # like calling their __get__ (see bug #1785), so fall back to - # looking in the __dict__. - try: - value = getter(object, key) - # handle the duplicate key - if key in processed: - raise AttributeError - except AttributeError: - for base in mro: - if key in base.__dict__: - value = base.__dict__[key] - break - else: - # could be a (currently) missing slot member, or a buggy - # __dir__; discard and move on - continue - if not predicate or predicate(value): - results.append((key, value)) - processed.add(key) - results.sort(key=lambda pair: pair[0]) - return results - -def getmembers(object, predicate=None): - """Return all members of an object as (name, value) pairs sorted by name. - Optionally, only return members that satisfy a given predicate.""" - return _getmembers(object, predicate, getattr) - -def getmembers_static(object, predicate=None): - """Return all members of an object as (name, value) pairs sorted by name - without triggering dynamic lookup via the descriptor protocol, - __getattr__ or __getattribute__. Optionally, only return members that - satisfy a given predicate. - - Note: this function may not be able to retrieve all members - that getmembers can fetch (like dynamically created attributes) - and may find members that getmembers can't (like descriptors - that raise AttributeError). It can also return descriptor objects - instead of instance members in some cases. - """ - return _getmembers(object, predicate, getattr_static) - -Attribute = namedtuple('Attribute', 'name kind defining_class object') - -def classify_class_attrs(cls): - """Return list of attribute-descriptor tuples. - - For each name in dir(cls), the return list contains a 4-tuple - with these elements: - - 0. The name (a string). - - 1. The kind of attribute this is, one of these strings: - 'class method' created via classmethod() - 'static method' created via staticmethod() - 'property' created via property() - 'method' any other flavor of method or descriptor - 'data' not a method - - 2. The class which defined this attribute (a class). - - 3. The object as obtained by calling getattr; if this fails, or if the - resulting object does not live anywhere in the class' mro (including - metaclasses) then the object is looked up in the defining class's - dict (found by walking the mro). - - If one of the items in dir(cls) is stored in the metaclass it will now - be discovered and not have None be listed as the class in which it was - defined. Any items whose home class cannot be discovered are skipped. - """ - - mro = getmro(cls) - metamro = getmro(type(cls)) # for attributes stored in the metaclass - metamro = tuple(cls for cls in metamro if cls not in (type, object)) - class_bases = (cls,) + mro - all_bases = class_bases + metamro - names = dir(cls) - # :dd any DynamicClassAttributes to the list of names; - # this may result in duplicate entries if, for example, a virtual - # attribute with the same name as a DynamicClassAttribute exists. - for base in mro: - for k, v in base.__dict__.items(): - if isinstance(v, types.DynamicClassAttribute) and v.fget is not None: - names.append(k) - result = [] - processed = set() - - for name in names: - # Get the object associated with the name, and where it was defined. - # Normal objects will be looked up with both getattr and directly in - # its class' dict (in case getattr fails [bug #1785], and also to look - # for a docstring). - # For DynamicClassAttributes on the second pass we only look in the - # class's dict. - # - # Getting an obj from the __dict__ sometimes reveals more than - # using getattr. Static and class methods are dramatic examples. - homecls = None - get_obj = None - dict_obj = None - if name not in processed: - try: - if name == '__dict__': - raise Exception("__dict__ is special, don't want the proxy") - get_obj = getattr(cls, name) - except Exception: - pass - else: - homecls = getattr(get_obj, "__objclass__", homecls) - if homecls not in class_bases: - # if the resulting object does not live somewhere in the - # mro, drop it and search the mro manually - homecls = None - last_cls = None - # first look in the classes - for srch_cls in class_bases: - srch_obj = getattr(srch_cls, name, None) - if srch_obj is get_obj: - last_cls = srch_cls - # then check the metaclasses - for srch_cls in metamro: - try: - srch_obj = srch_cls.__getattr__(cls, name) - except AttributeError: - continue - if srch_obj is get_obj: - last_cls = srch_cls - if last_cls is not None: - homecls = last_cls - for base in all_bases: - if name in base.__dict__: - dict_obj = base.__dict__[name] - if homecls not in metamro: - homecls = base - break - if homecls is None: - # unable to locate the attribute anywhere, most likely due to - # buggy custom __dir__; discard and move on - continue - obj = get_obj if get_obj is not None else dict_obj - # Classify the object or its descriptor. - if isinstance(dict_obj, (staticmethod, types.BuiltinMethodType)): - kind = "static method" - obj = dict_obj - elif isinstance(dict_obj, (classmethod, types.ClassMethodDescriptorType)): - kind = "class method" - obj = dict_obj - elif isinstance(dict_obj, property): - kind = "property" - obj = dict_obj - elif isroutine(obj): - kind = "method" - else: - kind = "data" - result.append(Attribute(name, kind, homecls, obj)) - processed.add(name) - return result - -# ----------------------------------------------------------- class helpers - -def getmro(cls): - "Return tuple of base classes (including cls) in method resolution order." - return cls.__mro__ - -# -------------------------------------------------------- function helpers - -def unwrap(func, *, stop=None): - """Get the object wrapped by *func*. - - Follows the chain of :attr:`__wrapped__` attributes returning the last - object in the chain. - - *stop* is an optional callback accepting an object in the wrapper chain - as its sole argument that allows the unwrapping to be terminated early if - the callback returns a true value. If the callback never returns a true - value, the last object in the chain is returned as usual. For example, - :func:`signature` uses this to stop unwrapping if any object in the - chain has a ``__signature__`` attribute defined. - - :exc:`ValueError` is raised if a cycle is encountered. - - """ - f = func # remember the original func for error reporting - # Memoise by id to tolerate non-hashable objects, but store objects to - # ensure they aren't destroyed, which would allow their IDs to be reused. - memo = {id(f): f} - recursion_limit = sys.getrecursionlimit() - while not isinstance(func, type) and hasattr(func, '__wrapped__'): - if stop is not None and stop(func): - break - func = func.__wrapped__ - id_func = id(func) - if (id_func in memo) or (len(memo) >= recursion_limit): - raise ValueError('wrapper loop when unwrapping {!r}'.format(f)) - memo[id_func] = func - return func - -# -------------------------------------------------- source code extraction -def indentsize(line): - """Return the indent size, in spaces, at the start of a line of text.""" - expline = line.expandtabs() - return len(expline) - len(expline.lstrip()) - -def _findclass(func): - cls = sys.modules.get(func.__module__) - if cls is None: - return None - for name in func.__qualname__.split('.')[:-1]: - cls = getattr(cls, name) - if not isclass(cls): - return None - return cls - -def _finddoc(obj): - if isclass(obj): - for base in obj.__mro__: - if base is not object: - try: - doc = base.__doc__ - except AttributeError: - continue - if doc is not None: - return doc - return None - - if ismethod(obj): - name = obj.__func__.__name__ - self = obj.__self__ - if (isclass(self) and - getattr(getattr(self, name, None), '__func__') is obj.__func__): - # classmethod - cls = self - else: - cls = self.__class__ - elif isfunction(obj): - name = obj.__name__ - cls = _findclass(obj) - if cls is None or getattr(cls, name) is not obj: - return None - elif isbuiltin(obj): - name = obj.__name__ - self = obj.__self__ - if (isclass(self) and - self.__qualname__ + '.' + name == obj.__qualname__): - # classmethod - cls = self - else: - cls = self.__class__ - # Should be tested before isdatadescriptor(). - elif isinstance(obj, property): - name = obj.__name__ - cls = _findclass(obj.fget) - if cls is None or getattr(cls, name) is not obj: - return None - elif ismethoddescriptor(obj) or isdatadescriptor(obj): - name = obj.__name__ - cls = obj.__objclass__ - if getattr(cls, name) is not obj: - return None - if ismemberdescriptor(obj): - slots = getattr(cls, '__slots__', None) - if isinstance(slots, dict) and name in slots: - return slots[name] - else: - return None - for base in cls.__mro__: - try: - doc = getattr(base, name).__doc__ - except AttributeError: - continue - if doc is not None: - return doc - return None - -def getdoc(object): - """Get the documentation string for an object. - - All tabs are expanded to spaces. To clean up docstrings that are - indented to line up with blocks of code, any whitespace than can be - uniformly removed from the second line onwards is removed.""" - try: - doc = object.__doc__ - except AttributeError: - return None - if doc is None: - try: - doc = _finddoc(object) - except (AttributeError, TypeError): - return None - if not isinstance(doc, str): - return None - return cleandoc(doc) - -def cleandoc(doc): - """Clean up indentation from docstrings. - - Any whitespace that can be uniformly removed from the second line - onwards is removed.""" - lines = doc.expandtabs().split('\n') - - # Find minimum indentation of any non-blank lines after first line. - margin = sys.maxsize - for line in lines[1:]: - content = len(line.lstrip(' ')) - if content: - indent = len(line) - content - margin = min(margin, indent) - # Remove indentation. - if lines: - lines[0] = lines[0].lstrip(' ') - if margin < sys.maxsize: - for i in range(1, len(lines)): - lines[i] = lines[i][margin:] - # Remove any trailing or leading blank lines. - while lines and not lines[-1]: - lines.pop() - while lines and not lines[0]: - lines.pop(0) - return '\n'.join(lines) - - -def getfile(object): - """Work out which source or compiled file an object was defined in.""" - if ismodule(object): - if getattr(object, '__file__', None): - return object.__file__ - raise TypeError('{!r} is a built-in module'.format(object)) - if isclass(object): - if hasattr(object, '__module__'): - module = sys.modules.get(object.__module__) - if getattr(module, '__file__', None): - return module.__file__ - if object.__module__ == '__main__': - raise OSError('source code not available') - raise TypeError('{!r} is a built-in class'.format(object)) - if ismethod(object): - object = object.__func__ - if isfunction(object): - object = object.__code__ - if istraceback(object): - object = object.tb_frame - if isframe(object): - object = object.f_code - if iscode(object): - return object.co_filename - raise TypeError('module, class, method, function, traceback, frame, or ' - 'code object was expected, got {}'.format( - type(object).__name__)) - -def getmodulename(path): - """Return the module name for a given file, or None.""" - fname = os.path.basename(path) - # Check for paths that look like an actual module file - suffixes = [(-len(suffix), suffix) - for suffix in importlib.machinery.all_suffixes()] - suffixes.sort() # try longest suffixes first, in case they overlap - for neglen, suffix in suffixes: - if fname.endswith(suffix): - return fname[:neglen] - return None - -def getsourcefile(object): - """Return the filename that can be used to locate an object's source. - Return None if no way can be identified to get the source. - """ - filename = getfile(object) - all_bytecode_suffixes = importlib.machinery.BYTECODE_SUFFIXES[:] - if any(filename.endswith(s) for s in all_bytecode_suffixes): - filename = (os.path.splitext(filename)[0] + - importlib.machinery.SOURCE_SUFFIXES[0]) - elif any(filename.endswith(s) for s in - importlib.machinery.EXTENSION_SUFFIXES): - return None - elif filename.endswith(".fwork"): - # Apple mobile framework markers are another type of non-source file - return None - - # return a filename found in the linecache even if it doesn't exist on disk - if filename in linecache.cache: - return filename - if os.path.exists(filename): - return filename - # only return a non-existent filename if the module has a PEP 302 loader - module = getmodule(object, filename) - if getattr(module, '__loader__', None) is not None: - return filename - elif getattr(getattr(module, "__spec__", None), "loader", None) is not None: - return filename - -def getabsfile(object, _filename=None): - """Return an absolute path to the source or compiled file for an object. - - The idea is for each object to have a unique origin, so this routine - normalizes the result as much as possible.""" - if _filename is None: - _filename = getsourcefile(object) or getfile(object) - return os.path.normcase(os.path.abspath(_filename)) - -modulesbyfile = {} -_filesbymodname = {} - -def getmodule(object, _filename=None): - """Return the module an object was defined in, or None if not found.""" - if ismodule(object): - return object - if hasattr(object, '__module__'): - return sys.modules.get(object.__module__) - - # Try the filename to modulename cache - if _filename is not None and _filename in modulesbyfile: - return sys.modules.get(modulesbyfile[_filename]) - # Try the cache again with the absolute file name - try: - file = getabsfile(object, _filename) - except (TypeError, FileNotFoundError): - return None - if file in modulesbyfile: - return sys.modules.get(modulesbyfile[file]) - # Update the filename to module name cache and check yet again - # Copy sys.modules in order to cope with changes while iterating - for modname, module in sys.modules.copy().items(): - if ismodule(module) and hasattr(module, '__file__'): - f = module.__file__ - if f == _filesbymodname.get(modname, None): - # Have already mapped this module, so skip it - continue - _filesbymodname[modname] = f - f = getabsfile(module) - # Always map to the name the module knows itself by - modulesbyfile[f] = modulesbyfile[ - os.path.realpath(f)] = module.__name__ - if file in modulesbyfile: - return sys.modules.get(modulesbyfile[file]) - # Check the main module - main = sys.modules['__main__'] - if not hasattr(object, '__name__'): - return None - if hasattr(main, object.__name__): - mainobject = getattr(main, object.__name__) - if mainobject is object: - return main - # Check builtins - builtin = sys.modules['builtins'] - if hasattr(builtin, object.__name__): - builtinobject = getattr(builtin, object.__name__) - if builtinobject is object: - return builtin - - -class ClassFoundException(Exception): - pass - - -def findsource(object): - """Return the entire source file and starting line number for an object. - - The argument may be a module, class, method, function, traceback, frame, - or code object. The source code is returned as a list of all the lines - in the file and the line number indexes a line in that list. An OSError - is raised if the source code cannot be retrieved.""" - - file = getsourcefile(object) - if file: - # Invalidate cache if needed. - linecache.checkcache(file) - else: - file = getfile(object) - # Allow filenames in form of "" to pass through. - # `doctest` monkeypatches `linecache` module to enable - # inspection, so let `linecache.getlines` to be called. - if (not (file.startswith('<') and file.endswith('>'))) or file.endswith('.fwork'): - raise OSError('source code not available') - - module = getmodule(object, file) - if module: - lines = linecache.getlines(file, module.__dict__) - if not lines and file.startswith('<') and hasattr(object, "__code__"): - lines = linecache._getlines_from_code(object.__code__) - else: - lines = linecache.getlines(file) - if not lines: - raise OSError('could not get source code') - - if ismodule(object): - return lines, 0 - - if isclass(object): - try: - lnum = vars(object)['__firstlineno__'] - 1 - except (TypeError, KeyError): - raise OSError('source code not available') - if lnum >= len(lines): - raise OSError('lineno is out of bounds') - return lines, lnum - - if ismethod(object): - object = object.__func__ - if isfunction(object): - object = object.__code__ - if istraceback(object): - object = object.tb_frame - if isframe(object): - object = object.f_code - if iscode(object): - if not hasattr(object, 'co_firstlineno'): - raise OSError('could not find function definition') - lnum = object.co_firstlineno - 1 - if lnum >= len(lines): - raise OSError('lineno is out of bounds') - return lines, lnum - raise OSError('could not find code object') - -def getcomments(object): - """Get lines of comments immediately preceding an object's source code. - - Returns None when source can't be found. - """ - try: - lines, lnum = findsource(object) - except (OSError, TypeError): - return None - - if ismodule(object): - # Look for a comment block at the top of the file. - start = 0 - if lines and lines[0][:2] == '#!': start = 1 - while start < len(lines) and lines[start].strip() in ('', '#'): - start = start + 1 - if start < len(lines) and lines[start][:1] == '#': - comments = [] - end = start - while end < len(lines) and lines[end][:1] == '#': - comments.append(lines[end].expandtabs()) - end = end + 1 - return ''.join(comments) - - # Look for a preceding block of comments at the same indentation. - elif lnum > 0: - indent = indentsize(lines[lnum]) - end = lnum - 1 - if end >= 0 and lines[end].lstrip()[:1] == '#' and \ - indentsize(lines[end]) == indent: - comments = [lines[end].expandtabs().lstrip()] - if end > 0: - end = end - 1 - comment = lines[end].expandtabs().lstrip() - while comment[:1] == '#' and indentsize(lines[end]) == indent: - comments[:0] = [comment] - end = end - 1 - if end < 0: break - comment = lines[end].expandtabs().lstrip() - while comments and comments[0].strip() == '#': - comments[:1] = [] - while comments and comments[-1].strip() == '#': - comments[-1:] = [] - return ''.join(comments) - -class EndOfBlock(Exception): pass - -class BlockFinder: - """Provide a tokeneater() method to detect the end of a code block.""" - def __init__(self): - self.indent = 0 - self.singleline = False - self.started = False - self.passline = False - self.indecorator = False - self.last = 1 - self.body_col0 = None - - def tokeneater(self, type, token, srowcol, erowcol, line): - if not self.started and not self.indecorator: - if type in (tokenize.INDENT, tokenize.COMMENT, tokenize.NL): - pass - elif token == "async": - pass - # skip any decorators - elif token == "@": - self.indecorator = True - else: - # For "def" and "class" scan to the end of the block. - # For "lambda" and generator expression scan to - # the end of the logical line. - self.singleline = token not in ("def", "class") - self.started = True - self.passline = True # skip to the end of the line - elif type == tokenize.NEWLINE: - self.passline = False # stop skipping when a NEWLINE is seen - self.last = srowcol[0] - if self.singleline: - raise EndOfBlock - # hitting a NEWLINE when in a decorator without args - # ends the decorator - if self.indecorator: - self.indecorator = False - elif self.passline: - pass - elif type == tokenize.INDENT: - if self.body_col0 is None and self.started: - self.body_col0 = erowcol[1] - self.indent = self.indent + 1 - self.passline = True - elif type == tokenize.DEDENT: - self.indent = self.indent - 1 - # the end of matching indent/dedent pairs end a block - # (note that this only works for "def"/"class" blocks, - # not e.g. for "if: else:" or "try: finally:" blocks) - if self.indent <= 0: - raise EndOfBlock - elif type == tokenize.COMMENT: - if self.body_col0 is not None and srowcol[1] >= self.body_col0: - # Include comments if indented at least as much as the block - self.last = srowcol[0] - elif self.indent == 0 and type not in (tokenize.COMMENT, tokenize.NL): - # any other token on the same indentation level end the previous - # block as well, except the pseudo-tokens COMMENT and NL. - raise EndOfBlock - -def getblock(lines): - """Extract the block of code at the top of the given list of lines.""" - blockfinder = BlockFinder() - try: - tokens = tokenize.generate_tokens(iter(lines).__next__) - for _token in tokens: - blockfinder.tokeneater(*_token) - except (EndOfBlock, IndentationError): - pass - except SyntaxError as e: - if "unmatched" not in e.msg: - raise e from None - _, *_token_info = _token - try: - blockfinder.tokeneater(tokenize.NEWLINE, *_token_info) - except (EndOfBlock, IndentationError): - pass - return lines[:blockfinder.last] - -def getsourcelines(object): - """Return a list of source lines and starting line number for an object. - - The argument may be a module, class, method, function, traceback, frame, - or code object. The source code is returned as a list of the lines - corresponding to the object and the line number indicates where in the - original source file the first line of code was found. An OSError is - raised if the source code cannot be retrieved.""" - object = unwrap(object) - lines, lnum = findsource(object) - - if istraceback(object): - object = object.tb_frame - - # for module or frame that corresponds to module, return all source lines - if (ismodule(object) or - (isframe(object) and object.f_code.co_name == "")): - return lines, 0 - else: - return getblock(lines[lnum:]), lnum + 1 - -def getsource(object): - """Return the text of the source code for an object. - - The argument may be a module, class, method, function, traceback, frame, - or code object. The source code is returned as a single string. An - OSError is raised if the source code cannot be retrieved.""" - lines, lnum = getsourcelines(object) - return ''.join(lines) - -# --------------------------------------------------- class tree extraction -def walktree(classes, children, parent): - """Recursive helper function for getclasstree().""" - results = [] - classes.sort(key=attrgetter('__module__', '__name__')) - for c in classes: - results.append((c, c.__bases__)) - if c in children: - results.append(walktree(children[c], children, c)) - return results - -def getclasstree(classes, unique=False): - """Arrange the given list of classes into a hierarchy of nested lists. - - Where a nested list appears, it contains classes derived from the class - whose entry immediately precedes the list. Each entry is a 2-tuple - containing a class and a tuple of its base classes. If the 'unique' - argument is true, exactly one entry appears in the returned structure - for each class in the given list. Otherwise, classes using multiple - inheritance and their descendants will appear multiple times.""" - children = {} - roots = [] - for c in classes: - if c.__bases__: - for parent in c.__bases__: - if parent not in children: - children[parent] = [] - if c not in children[parent]: - children[parent].append(c) - if unique and parent in classes: break - elif c not in roots: - roots.append(c) - for parent in children: - if parent not in classes: - roots.append(parent) - return walktree(roots, children, None) - -# ------------------------------------------------ argument list extraction -Arguments = namedtuple('Arguments', 'args, varargs, varkw') - -def getargs(co): - """Get information about the arguments accepted by a code object. - - Three things are returned: (args, varargs, varkw), where - 'args' is the list of argument names. Keyword-only arguments are - appended. 'varargs' and 'varkw' are the names of the * and ** - arguments or None.""" - if not iscode(co): - raise TypeError('{!r} is not a code object'.format(co)) - - names = co.co_varnames - nargs = co.co_argcount - nkwargs = co.co_kwonlyargcount - args = list(names[:nargs]) - kwonlyargs = list(names[nargs:nargs+nkwargs]) - - nargs += nkwargs - varargs = None - if co.co_flags & CO_VARARGS: - varargs = co.co_varnames[nargs] - nargs = nargs + 1 - varkw = None - if co.co_flags & CO_VARKEYWORDS: - varkw = co.co_varnames[nargs] - return Arguments(args + kwonlyargs, varargs, varkw) - - -FullArgSpec = namedtuple('FullArgSpec', - 'args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations') - -def getfullargspec(func): - """Get the names and default values of a callable object's parameters. - - A tuple of seven things is returned: - (args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations). - 'args' is a list of the parameter names. - 'varargs' and 'varkw' are the names of the * and ** parameters or None. - 'defaults' is an n-tuple of the default values of the last n parameters. - 'kwonlyargs' is a list of keyword-only parameter names. - 'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults. - 'annotations' is a dictionary mapping parameter names to annotations. - - Notable differences from inspect.signature(): - - the "self" parameter is always reported, even for bound methods - - wrapper chains defined by __wrapped__ *not* unwrapped automatically - """ - try: - # Re: `skip_bound_arg=False` - # - # There is a notable difference in behaviour between getfullargspec - # and Signature: the former always returns 'self' parameter for bound - # methods, whereas the Signature always shows the actual calling - # signature of the passed object. - # - # To simulate this behaviour, we "unbind" bound methods, to trick - # inspect.signature to always return their first parameter ("self", - # usually) - - # Re: `follow_wrapper_chains=False` - # - # getfullargspec() historically ignored __wrapped__ attributes, - # so we ensure that remains the case in 3.3+ - - sig = _signature_from_callable(func, - follow_wrapper_chains=False, - skip_bound_arg=False, - sigcls=Signature, - eval_str=False) - except Exception as ex: - # Most of the times 'signature' will raise ValueError. - # But, it can also raise AttributeError, and, maybe something - # else. So to be fully backwards compatible, we catch all - # possible exceptions here, and reraise a TypeError. - raise TypeError('unsupported callable') from ex - - args = [] - varargs = None - varkw = None - posonlyargs = [] - kwonlyargs = [] - annotations = {} - defaults = () - kwdefaults = {} - - if sig.return_annotation is not sig.empty: - annotations['return'] = sig.return_annotation - - for param in sig.parameters.values(): - kind = param.kind - name = param.name - - if kind is _POSITIONAL_ONLY: - posonlyargs.append(name) - if param.default is not param.empty: - defaults += (param.default,) - elif kind is _POSITIONAL_OR_KEYWORD: - args.append(name) - if param.default is not param.empty: - defaults += (param.default,) - elif kind is _VAR_POSITIONAL: - varargs = name - elif kind is _KEYWORD_ONLY: - kwonlyargs.append(name) - if param.default is not param.empty: - kwdefaults[name] = param.default - elif kind is _VAR_KEYWORD: - varkw = name - - if param.annotation is not param.empty: - annotations[name] = param.annotation - - if not kwdefaults: - # compatibility with 'func.__kwdefaults__' - kwdefaults = None - - if not defaults: - # compatibility with 'func.__defaults__' - defaults = None - - return FullArgSpec(posonlyargs + args, varargs, varkw, defaults, - kwonlyargs, kwdefaults, annotations) - - -ArgInfo = namedtuple('ArgInfo', 'args varargs keywords locals') - -def getargvalues(frame): - """Get information about arguments passed into a particular frame. - - A tuple of four things is returned: (args, varargs, varkw, locals). - 'args' is a list of the argument names. - 'varargs' and 'varkw' are the names of the * and ** arguments or None. - 'locals' is the locals dictionary of the given frame.""" - args, varargs, varkw = getargs(frame.f_code) - return ArgInfo(args, varargs, varkw, frame.f_locals) - -def formatannotation(annotation, base_module=None, *, quote_annotation_strings=True): - if not quote_annotation_strings and isinstance(annotation, str): - return annotation - if getattr(annotation, '__module__', None) == 'typing': - def repl(match): - text = match.group() - return text.removeprefix('typing.') - return re.sub(r'[\w\.]+', repl, repr(annotation)) - if isinstance(annotation, types.GenericAlias): - return str(annotation) - if isinstance(annotation, type): - if annotation.__module__ in ('builtins', base_module): - return annotation.__qualname__ - return annotation.__module__+'.'+annotation.__qualname__ - if isinstance(annotation, ForwardRef): - return annotation.__forward_arg__ - return repr(annotation) - -def formatannotationrelativeto(object): - module = getattr(object, '__module__', None) - def _formatannotation(annotation): - return formatannotation(annotation, module) - return _formatannotation - - -def formatargvalues(args, varargs, varkw, locals, - formatarg=str, - formatvarargs=lambda name: '*' + name, - formatvarkw=lambda name: '**' + name, - formatvalue=lambda value: '=' + repr(value)): - """Format an argument spec from the 4 values returned by getargvalues. - - The first four arguments are (args, varargs, varkw, locals). The - next four arguments are the corresponding optional formatting functions - that are called to turn names and values into strings. The ninth - argument is an optional function to format the sequence of arguments.""" - def convert(name, locals=locals, - formatarg=formatarg, formatvalue=formatvalue): - return formatarg(name) + formatvalue(locals[name]) - specs = [] - for i in range(len(args)): - specs.append(convert(args[i])) - if varargs: - specs.append(formatvarargs(varargs) + formatvalue(locals[varargs])) - if varkw: - specs.append(formatvarkw(varkw) + formatvalue(locals[varkw])) - return '(' + ', '.join(specs) + ')' - -def _missing_arguments(f_name, argnames, pos, values): - names = [repr(name) for name in argnames if name not in values] - missing = len(names) - if missing == 1: - s = names[0] - elif missing == 2: - s = "{} and {}".format(*names) - else: - tail = ", {} and {}".format(*names[-2:]) - del names[-2:] - s = ", ".join(names) + tail - raise TypeError("%s() missing %i required %s argument%s: %s" % - (f_name, missing, - "positional" if pos else "keyword-only", - "" if missing == 1 else "s", s)) - -def _too_many(f_name, args, kwonly, varargs, defcount, given, values): - atleast = len(args) - defcount - kwonly_given = len([arg for arg in kwonly if arg in values]) - if varargs: - plural = atleast != 1 - sig = "at least %d" % (atleast,) - elif defcount: - plural = True - sig = "from %d to %d" % (atleast, len(args)) - else: - plural = len(args) != 1 - sig = str(len(args)) - kwonly_sig = "" - if kwonly_given: - msg = " positional argument%s (and %d keyword-only argument%s)" - kwonly_sig = (msg % ("s" if given != 1 else "", kwonly_given, - "s" if kwonly_given != 1 else "")) - raise TypeError("%s() takes %s positional argument%s but %d%s %s given" % - (f_name, sig, "s" if plural else "", given, kwonly_sig, - "was" if given == 1 and not kwonly_given else "were")) - -def getcallargs(func, /, *positional, **named): - """Get the mapping of arguments to values. - - A dict is returned, with keys the function argument names (including the - names of the * and ** arguments, if any), and values the respective bound - values from 'positional' and 'named'.""" - spec = getfullargspec(func) - args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = spec - f_name = func.__name__ - arg2value = {} - - - if ismethod(func) and func.__self__ is not None: - # implicit 'self' (or 'cls' for classmethods) argument - positional = (func.__self__,) + positional - num_pos = len(positional) - num_args = len(args) - num_defaults = len(defaults) if defaults else 0 - - n = min(num_pos, num_args) - for i in range(n): - arg2value[args[i]] = positional[i] - if varargs: - arg2value[varargs] = tuple(positional[n:]) - possible_kwargs = set(args + kwonlyargs) - if varkw: - arg2value[varkw] = {} - for kw, value in named.items(): - if kw not in possible_kwargs: - if not varkw: - raise TypeError("%s() got an unexpected keyword argument %r" % - (f_name, kw)) - arg2value[varkw][kw] = value - continue - if kw in arg2value: - raise TypeError("%s() got multiple values for argument %r" % - (f_name, kw)) - arg2value[kw] = value - if num_pos > num_args and not varargs: - _too_many(f_name, args, kwonlyargs, varargs, num_defaults, - num_pos, arg2value) - if num_pos < num_args: - req = args[:num_args - num_defaults] - for arg in req: - if arg not in arg2value: - _missing_arguments(f_name, req, True, arg2value) - for i, arg in enumerate(args[num_args - num_defaults:]): - if arg not in arg2value: - arg2value[arg] = defaults[i] - missing = 0 - for kwarg in kwonlyargs: - if kwarg not in arg2value: - if kwonlydefaults and kwarg in kwonlydefaults: - arg2value[kwarg] = kwonlydefaults[kwarg] - else: - missing += 1 - if missing: - _missing_arguments(f_name, kwonlyargs, False, arg2value) - return arg2value - -ClosureVars = namedtuple('ClosureVars', 'nonlocals globals builtins unbound') - -def getclosurevars(func): - """ - Get the mapping of free variables to their current values. - - Returns a named tuple of dicts mapping the current nonlocal, global - and builtin references as seen by the body of the function. A final - set of unbound names that could not be resolved is also provided. - """ - - if ismethod(func): - func = func.__func__ - - if not isfunction(func): - raise TypeError("{!r} is not a Python function".format(func)) - - code = func.__code__ - # Nonlocal references are named in co_freevars and resolved - # by looking them up in __closure__ by positional index - if func.__closure__ is None: - nonlocal_vars = {} - else: - nonlocal_vars = { - var : cell.cell_contents - for var, cell in zip(code.co_freevars, func.__closure__) - } - - # Global and builtin references are named in co_names and resolved - # by looking them up in __globals__ or __builtins__ - global_ns = func.__globals__ - builtin_ns = global_ns.get("__builtins__", builtins.__dict__) - if ismodule(builtin_ns): - builtin_ns = builtin_ns.__dict__ - global_vars = {} - builtin_vars = {} - unbound_names = set() - global_names = set() - for instruction in dis.get_instructions(code): - opname = instruction.opname - name = instruction.argval - if opname == "LOAD_ATTR": - unbound_names.add(name) - elif opname == "LOAD_GLOBAL": - global_names.add(name) - for name in global_names: - try: - global_vars[name] = global_ns[name] - except KeyError: - try: - builtin_vars[name] = builtin_ns[name] - except KeyError: - unbound_names.add(name) - - return ClosureVars(nonlocal_vars, global_vars, - builtin_vars, unbound_names) - -# -------------------------------------------------- stack frame extraction - -_Traceback = namedtuple('_Traceback', 'filename lineno function code_context index') - -class Traceback(_Traceback): - def __new__(cls, filename, lineno, function, code_context, index, *, positions=None): - instance = super().__new__(cls, filename, lineno, function, code_context, index) - instance.positions = positions - return instance - - def __repr__(self): - return ('Traceback(filename={!r}, lineno={!r}, function={!r}, ' - 'code_context={!r}, index={!r}, positions={!r})'.format( - self.filename, self.lineno, self.function, self.code_context, - self.index, self.positions)) - -def _get_code_position_from_tb(tb): - code, instruction_index = tb.tb_frame.f_code, tb.tb_lasti - return _get_code_position(code, instruction_index) - -def _get_code_position(code, instruction_index): - if instruction_index < 0: - return (None, None, None, None) - positions_gen = code.co_positions() - # The nth entry in code.co_positions() corresponds to instruction (2*n)th since Python 3.10+ - return next(itertools.islice(positions_gen, instruction_index // 2, None)) - -def getframeinfo(frame, context=1): - """Get information about a frame or traceback object. - - A tuple of five things is returned: the filename, the line number of - the current line, the function name, a list of lines of context from - the source code, and the index of the current line within that list. - The optional second argument specifies the number of lines of context - to return, which are centered around the current line.""" - if istraceback(frame): - positions = _get_code_position_from_tb(frame) - lineno = frame.tb_lineno - frame = frame.tb_frame - else: - lineno = frame.f_lineno - positions = _get_code_position(frame.f_code, frame.f_lasti) - - if positions[0] is None: - frame, *positions = (frame, lineno, *positions[1:]) - else: - frame, *positions = (frame, *positions) - - lineno = positions[0] - - if not isframe(frame): - raise TypeError('{!r} is not a frame or traceback object'.format(frame)) - - filename = getsourcefile(frame) or getfile(frame) - if context > 0: - start = lineno - 1 - context//2 - try: - lines, lnum = findsource(frame) - except OSError: - lines = index = None - else: - start = max(0, min(start, len(lines) - context)) - lines = lines[start:start+context] - index = lineno - 1 - start - else: - lines = index = None - - return Traceback(filename, lineno, frame.f_code.co_name, lines, - index, positions=dis.Positions(*positions)) - -def getlineno(frame): - """Get the line number from a frame object, allowing for optimization.""" - # FrameType.f_lineno is now a descriptor that grovels co_lnotab - return frame.f_lineno - -_FrameInfo = namedtuple('_FrameInfo', ('frame',) + Traceback._fields) -class FrameInfo(_FrameInfo): - def __new__(cls, frame, filename, lineno, function, code_context, index, *, positions=None): - instance = super().__new__(cls, frame, filename, lineno, function, code_context, index) - instance.positions = positions - return instance - - def __repr__(self): - return ('FrameInfo(frame={!r}, filename={!r}, lineno={!r}, function={!r}, ' - 'code_context={!r}, index={!r}, positions={!r})'.format( - self.frame, self.filename, self.lineno, self.function, - self.code_context, self.index, self.positions)) - -def getouterframes(frame, context=1): - """Get a list of records for a frame and all higher (calling) frames. - - Each record contains a frame object, filename, line number, function - name, a list of lines of context, and index within the context.""" - framelist = [] - while frame: - traceback_info = getframeinfo(frame, context) - frameinfo = (frame,) + traceback_info - framelist.append(FrameInfo(*frameinfo, positions=traceback_info.positions)) - frame = frame.f_back - return framelist - -def getinnerframes(tb, context=1): - """Get a list of records for a traceback's frame and all lower frames. - - Each record contains a frame object, filename, line number, function - name, a list of lines of context, and index within the context.""" - framelist = [] - while tb: - traceback_info = getframeinfo(tb, context) - frameinfo = (tb.tb_frame,) + traceback_info - framelist.append(FrameInfo(*frameinfo, positions=traceback_info.positions)) - tb = tb.tb_next - return framelist - -def currentframe(): - """Return the frame of the caller or None if this is not possible.""" - return sys._getframe(1) if hasattr(sys, "_getframe") else None - -def stack(context=1): - """Return a list of records for the stack above the caller's frame.""" - return getouterframes(sys._getframe(1), context) - -def trace(context=1): - """Return a list of records for the stack below the current exception.""" - exc = sys.exception() - tb = None if exc is None else exc.__traceback__ - return getinnerframes(tb, context) - - -# ------------------------------------------------ static version of getattr - -_sentinel = object() -_static_getmro = type.__dict__['__mro__'].__get__ -_get_dunder_dict_of_class = type.__dict__["__dict__"].__get__ - - -def _check_instance(obj, attr): - instance_dict = {} - try: - instance_dict = object.__getattribute__(obj, "__dict__") - except AttributeError: - pass - return dict.get(instance_dict, attr, _sentinel) - - -def _check_class(klass, attr): - for entry in _static_getmro(klass): - if _shadowed_dict(type(entry)) is _sentinel and attr in entry.__dict__: - return entry.__dict__[attr] - return _sentinel - - -@functools.lru_cache() -def _shadowed_dict_from_weakref_mro_tuple(*weakref_mro): - for weakref_entry in weakref_mro: - # Normally we'd have to check whether the result of weakref_entry() - # is None here, in case the object the weakref is pointing to has died. - # In this specific case, however, we know that the only caller of this - # function is `_shadowed_dict()`, and that therefore this weakref is - # guaranteed to point to an object that is still alive. - entry = weakref_entry() - dunder_dict = _get_dunder_dict_of_class(entry) - if '__dict__' in dunder_dict: - class_dict = dunder_dict['__dict__'] - if not (type(class_dict) is types.GetSetDescriptorType and - class_dict.__name__ == "__dict__" and - class_dict.__objclass__ is entry): - return class_dict - return _sentinel - - -def _shadowed_dict(klass): - # gh-118013: the inner function here is decorated with lru_cache for - # performance reasons, *but* make sure not to pass strong references - # to the items in the mro. Doing so can lead to unexpected memory - # consumption in cases where classes are dynamically created and - # destroyed, and the dynamically created classes happen to be the only - # objects that hold strong references to other objects that take up a - # significant amount of memory. - return _shadowed_dict_from_weakref_mro_tuple( - *[make_weakref(entry) for entry in _static_getmro(klass)] - ) - - -def getattr_static(obj, attr, default=_sentinel): - """Retrieve attributes without triggering dynamic lookup via the - descriptor protocol, __getattr__ or __getattribute__. - - Note: this function may not be able to retrieve all attributes - that getattr can fetch (like dynamically created attributes) - and may find attributes that getattr can't (like descriptors - that raise AttributeError). It can also return descriptor objects - instead of instance members in some cases. See the - documentation for details. - """ - instance_result = _sentinel - - objtype = type(obj) - if type not in _static_getmro(objtype): - klass = objtype - dict_attr = _shadowed_dict(klass) - if (dict_attr is _sentinel or - type(dict_attr) is types.MemberDescriptorType): - instance_result = _check_instance(obj, attr) - else: - klass = obj - - klass_result = _check_class(klass, attr) - - if instance_result is not _sentinel and klass_result is not _sentinel: - if _check_class(type(klass_result), "__get__") is not _sentinel and ( - _check_class(type(klass_result), "__set__") is not _sentinel - or _check_class(type(klass_result), "__delete__") is not _sentinel - ): - return klass_result - - if instance_result is not _sentinel: - return instance_result - if klass_result is not _sentinel: - return klass_result - - if obj is klass: - # for types we check the metaclass too - for entry in _static_getmro(type(klass)): - if ( - _shadowed_dict(type(entry)) is _sentinel - and attr in entry.__dict__ - ): - return entry.__dict__[attr] - if default is not _sentinel: - return default - raise AttributeError(attr) - - -# ------------------------------------------------ generator introspection - -GEN_CREATED = 'GEN_CREATED' -GEN_RUNNING = 'GEN_RUNNING' -GEN_SUSPENDED = 'GEN_SUSPENDED' -GEN_CLOSED = 'GEN_CLOSED' - -def getgeneratorstate(generator): - """Get current state of a generator-iterator. - - Possible states are: - GEN_CREATED: Waiting to start execution. - GEN_RUNNING: Currently being executed by the interpreter. - GEN_SUSPENDED: Currently suspended at a yield expression. - GEN_CLOSED: Execution has completed. - """ - if generator.gi_running: - return GEN_RUNNING - if generator.gi_suspended: - return GEN_SUSPENDED - if generator.gi_frame is None: - return GEN_CLOSED - return GEN_CREATED - - -def getgeneratorlocals(generator): - """ - Get the mapping of generator local variables to their current values. - - A dict is returned, with the keys the local variable names and values the - bound values.""" - - if not isgenerator(generator): - raise TypeError("{!r} is not a Python generator".format(generator)) - - frame = getattr(generator, "gi_frame", None) - if frame is not None: - return generator.gi_frame.f_locals - else: - return {} - - -# ------------------------------------------------ coroutine introspection - -CORO_CREATED = 'CORO_CREATED' -CORO_RUNNING = 'CORO_RUNNING' -CORO_SUSPENDED = 'CORO_SUSPENDED' -CORO_CLOSED = 'CORO_CLOSED' - -def getcoroutinestate(coroutine): - """Get current state of a coroutine object. - - Possible states are: - CORO_CREATED: Waiting to start execution. - CORO_RUNNING: Currently being executed by the interpreter. - CORO_SUSPENDED: Currently suspended at an await expression. - CORO_CLOSED: Execution has completed. - """ - if coroutine.cr_running: - return CORO_RUNNING - if coroutine.cr_suspended: - return CORO_SUSPENDED - if coroutine.cr_frame is None: - return CORO_CLOSED - return CORO_CREATED - - -def getcoroutinelocals(coroutine): - """ - Get the mapping of coroutine local variables to their current values. - - A dict is returned, with the keys the local variable names and values the - bound values.""" - frame = getattr(coroutine, "cr_frame", None) - if frame is not None: - return frame.f_locals - else: - return {} - - -# ----------------------------------- asynchronous generator introspection - -AGEN_CREATED = 'AGEN_CREATED' -AGEN_RUNNING = 'AGEN_RUNNING' -AGEN_SUSPENDED = 'AGEN_SUSPENDED' -AGEN_CLOSED = 'AGEN_CLOSED' - - -def getasyncgenstate(agen): - """Get current state of an asynchronous generator object. - - Possible states are: - AGEN_CREATED: Waiting to start execution. - AGEN_RUNNING: Currently being executed by the interpreter. - AGEN_SUSPENDED: Currently suspended at a yield expression. - AGEN_CLOSED: Execution has completed. - """ - if agen.ag_running: - return AGEN_RUNNING - if agen.ag_suspended: - return AGEN_SUSPENDED - if agen.ag_frame is None: - return AGEN_CLOSED - return AGEN_CREATED - - -def getasyncgenlocals(agen): - """ - Get the mapping of asynchronous generator local variables to their current - values. - - A dict is returned, with the keys the local variable names and values the - bound values.""" - - if not isasyncgen(agen): - raise TypeError(f"{agen!r} is not a Python async generator") - - frame = getattr(agen, "ag_frame", None) - if frame is not None: - return agen.ag_frame.f_locals - else: - return {} - - -############################################################################### -### Function Signature Object (PEP 362) -############################################################################### - - -_NonUserDefinedCallables = (types.WrapperDescriptorType, - types.MethodWrapperType, - types.ClassMethodDescriptorType, - types.BuiltinFunctionType) - - -def _signature_get_user_defined_method(cls, method_name, *, follow_wrapper_chains=True): - """Private helper. Checks if ``cls`` has an attribute - named ``method_name`` and returns it only if it is a - pure python function. - """ - if method_name == '__new__': - meth = getattr(cls, method_name, None) - else: - meth = getattr_static(cls, method_name, None) - if meth is None: - return None - - # NOTE: The meth may wraps a non-user-defined callable. - # In this case, we treat the meth as non-user-defined callable too. - # (e.g. cls.__new__ generated by @warnings.deprecated) - unwrapped_meth = None - if follow_wrapper_chains: - unwrapped_meth = unwrap(meth, stop=(lambda m: hasattr(m, "__signature__") - or _signature_is_builtin(m))) - - if (isinstance(meth, _NonUserDefinedCallables) - or isinstance(unwrapped_meth, _NonUserDefinedCallables)): - # Once '__signature__' will be added to 'C'-level - # callables, this check won't be necessary - return None - if method_name != '__new__': - meth = _descriptor_get(meth, cls) - return meth - - -def _signature_get_partial(wrapped_sig, partial, extra_args=()): - """Private helper to calculate how 'wrapped_sig' signature will - look like after applying a 'functools.partial' object (or alike) - on it. - """ - - old_params = wrapped_sig.parameters - new_params = OrderedDict(old_params.items()) - - partial_args = partial.args or () - partial_keywords = partial.keywords or {} - - if extra_args: - partial_args = extra_args + partial_args - - try: - ba = wrapped_sig.bind_partial(*partial_args, **partial_keywords) - except TypeError as ex: - msg = 'partial object {!r} has incorrect arguments'.format(partial) - raise ValueError(msg) from ex - - - transform_to_kwonly = False - for param_name, param in old_params.items(): - try: - arg_value = ba.arguments[param_name] - except KeyError: - pass - else: - if param.kind is _POSITIONAL_ONLY: - # If positional-only parameter is bound by partial, - # it effectively disappears from the signature - # However, if it is a Placeholder it is not removed - # And also looses default value - if arg_value is functools.Placeholder: - new_params[param_name] = param.replace(default=_empty) - else: - new_params.pop(param_name) - continue - - if param.kind is _POSITIONAL_OR_KEYWORD: - if param_name in partial_keywords: - # This means that this parameter, and all parameters - # after it should be keyword-only (and var-positional - # should be removed). Here's why. Consider the following - # function: - # foo(a, b, *args, c): - # pass - # - # "partial(foo, a='spam')" will have the following - # signature: "(*, a='spam', b, c)". Because attempting - # to call that partial with "(10, 20)" arguments will - # raise a TypeError, saying that "a" argument received - # multiple values. - transform_to_kwonly = True - # Set the new default value - new_params[param_name] = param.replace(default=arg_value) - else: - # was passed as a positional argument - # Do not pop if it is a Placeholder - # also change kind to positional only - # and remove default - if arg_value is functools.Placeholder: - new_param = param.replace( - kind=_POSITIONAL_ONLY, - default=_empty - ) - new_params[param_name] = new_param - else: - new_params.pop(param_name) - continue - - if param.kind is _KEYWORD_ONLY: - # Set the new default value - new_params[param_name] = param.replace(default=arg_value) - - if transform_to_kwonly: - assert param.kind is not _POSITIONAL_ONLY - - if param.kind is _POSITIONAL_OR_KEYWORD: - new_param = new_params[param_name].replace(kind=_KEYWORD_ONLY) - new_params[param_name] = new_param - new_params.move_to_end(param_name) - elif param.kind in (_KEYWORD_ONLY, _VAR_KEYWORD): - new_params.move_to_end(param_name) - elif param.kind is _VAR_POSITIONAL: - new_params.pop(param.name) - - return wrapped_sig.replace(parameters=new_params.values()) - - -def _signature_bound_method(sig): - """Private helper to transform signatures for unbound - functions to bound methods. - """ - - params = tuple(sig.parameters.values()) - - if not params or params[0].kind in (_VAR_KEYWORD, _KEYWORD_ONLY): - raise ValueError('invalid method signature') - - kind = params[0].kind - if kind in (_POSITIONAL_OR_KEYWORD, _POSITIONAL_ONLY): - # Drop first parameter: - # '(p1, p2[, ...])' -> '(p2[, ...])' - params = params[1:] - else: - if kind is not _VAR_POSITIONAL: - # Unless we add a new parameter type we never - # get here - raise ValueError('invalid argument type') - # It's a var-positional parameter. - # Do nothing. '(*args[, ...])' -> '(*args[, ...])' - - return sig.replace(parameters=params) - - -def _signature_is_builtin(obj): - """Private helper to test if `obj` is a callable that might - support Argument Clinic's __text_signature__ protocol. - """ - return (isbuiltin(obj) or - ismethoddescriptor(obj) or - isinstance(obj, _NonUserDefinedCallables) or - # Can't test 'isinstance(type)' here, as it would - # also be True for regular python classes. - # Can't use the `in` operator here, as it would - # invoke the custom __eq__ method. - obj is type or obj is object) - - -def _signature_is_functionlike(obj): - """Private helper to test if `obj` is a duck type of FunctionType. - A good example of such objects are functions compiled with - Cython, which have all attributes that a pure Python function - would have, but have their code statically compiled. - """ - - if not callable(obj) or isclass(obj): - # All function-like objects are obviously callables, - # and not classes. - return False - - name = getattr(obj, '__name__', None) - code = getattr(obj, '__code__', None) - defaults = getattr(obj, '__defaults__', _void) # Important to use _void ... - kwdefaults = getattr(obj, '__kwdefaults__', _void) # ... and not None here - - return (isinstance(code, types.CodeType) and - isinstance(name, str) and - (defaults is None or isinstance(defaults, tuple)) and - (kwdefaults is None or isinstance(kwdefaults, dict))) - - -def _signature_strip_non_python_syntax(signature): - """ - Private helper function. Takes a signature in Argument Clinic's - extended signature format. - - Returns a tuple of two things: - * that signature re-rendered in standard Python syntax, and - * the index of the "self" parameter (generally 0), or None if - the function does not have a "self" parameter. - """ - - if not signature: - return signature, None - - self_parameter = None - - lines = [l.encode('ascii') for l in signature.split('\n') if l] - generator = iter(lines).__next__ - token_stream = tokenize.tokenize(generator) - - text = [] - add = text.append - - current_parameter = 0 - OP = token.OP - ERRORTOKEN = token.ERRORTOKEN - - # token stream always starts with ENCODING token, skip it - t = next(token_stream) - assert t.type == tokenize.ENCODING - - for t in token_stream: - type, string = t.type, t.string - - if type == OP: - if string == ',': - current_parameter += 1 - - if (type == OP) and (string == '$'): - assert self_parameter is None - self_parameter = current_parameter - continue - - add(string) - if (string == ','): - add(' ') - clean_signature = ''.join(text).strip().replace("\n", "") - return clean_signature, self_parameter - - -def _signature_fromstr(cls, obj, s, skip_bound_arg=True): - """Private helper to parse content of '__text_signature__' - and return a Signature based on it. - """ - Parameter = cls._parameter_cls - - clean_signature, self_parameter = _signature_strip_non_python_syntax(s) - - program = "def foo" + clean_signature + ": pass" - - try: - module = ast.parse(program) - except SyntaxError: - module = None - - if not isinstance(module, ast.Module): - raise ValueError("{!r} builtin has invalid signature".format(obj)) - - f = module.body[0] - - parameters = [] - empty = Parameter.empty - - module = None - module_dict = {} - - module_name = getattr(obj, '__module__', None) - if not module_name: - objclass = getattr(obj, '__objclass__', None) - module_name = getattr(objclass, '__module__', None) - - if module_name: - module = sys.modules.get(module_name, None) - if module: - module_dict = module.__dict__ - sys_module_dict = sys.modules.copy() - - def parse_name(node): - assert isinstance(node, ast.arg) - if node.annotation is not None: - raise ValueError("Annotations are not currently supported") - return node.arg - - def wrap_value(s): - try: - value = eval(s, module_dict) - except NameError: - try: - value = eval(s, sys_module_dict) - except NameError: - raise ValueError - - if isinstance(value, (str, int, float, bytes, bool, type(None))): - return ast.Constant(value) - raise ValueError - - class RewriteSymbolics(ast.NodeTransformer): - def visit_Attribute(self, node): - a = [] - n = node - while isinstance(n, ast.Attribute): - a.append(n.attr) - n = n.value - if not isinstance(n, ast.Name): - raise ValueError - a.append(n.id) - value = ".".join(reversed(a)) - return wrap_value(value) - - def visit_Name(self, node): - if not isinstance(node.ctx, ast.Load): - raise ValueError() - return wrap_value(node.id) - - def visit_BinOp(self, node): - # Support constant folding of a couple simple binary operations - # commonly used to define default values in text signatures - left = self.visit(node.left) - right = self.visit(node.right) - if not isinstance(left, ast.Constant) or not isinstance(right, ast.Constant): - raise ValueError - if isinstance(node.op, ast.Add): - return ast.Constant(left.value + right.value) - elif isinstance(node.op, ast.Sub): - return ast.Constant(left.value - right.value) - elif isinstance(node.op, ast.BitOr): - return ast.Constant(left.value | right.value) - raise ValueError - - def p(name_node, default_node, default=empty): - name = parse_name(name_node) - if default_node and default_node is not _empty: - try: - default_node = RewriteSymbolics().visit(default_node) - default = ast.literal_eval(default_node) - except ValueError: - raise ValueError("{!r} builtin has invalid signature".format(obj)) from None - parameters.append(Parameter(name, kind, default=default, annotation=empty)) - - # non-keyword-only parameters - total_non_kw_args = len(f.args.posonlyargs) + len(f.args.args) - required_non_kw_args = total_non_kw_args - len(f.args.defaults) - defaults = itertools.chain(itertools.repeat(None, required_non_kw_args), f.args.defaults) - - kind = Parameter.POSITIONAL_ONLY - for (name, default) in zip(f.args.posonlyargs, defaults): - p(name, default) - - kind = Parameter.POSITIONAL_OR_KEYWORD - for (name, default) in zip(f.args.args, defaults): - p(name, default) - - # *args - if f.args.vararg: - kind = Parameter.VAR_POSITIONAL - p(f.args.vararg, empty) - - # keyword-only arguments - kind = Parameter.KEYWORD_ONLY - for name, default in zip(f.args.kwonlyargs, f.args.kw_defaults): - p(name, default) - - # **kwargs - if f.args.kwarg: - kind = Parameter.VAR_KEYWORD - p(f.args.kwarg, empty) - - if self_parameter is not None: - # Possibly strip the bound argument: - # - We *always* strip first bound argument if - # it is a module. - # - We don't strip first bound argument if - # skip_bound_arg is False. - assert parameters - _self = getattr(obj, '__self__', None) - self_isbound = _self is not None - self_ismodule = ismodule(_self) - if self_isbound and (self_ismodule or skip_bound_arg): - parameters.pop(0) - else: - # for builtins, self parameter is always positional-only! - p = parameters[0].replace(kind=Parameter.POSITIONAL_ONLY) - parameters[0] = p - - return cls(parameters, return_annotation=cls.empty) - - -def _signature_from_builtin(cls, func, skip_bound_arg=True): - """Private helper function to get signature for - builtin callables. - """ - - if not _signature_is_builtin(func): - raise TypeError("{!r} is not a Python builtin " - "function".format(func)) - - s = getattr(func, "__text_signature__", None) - if not s: - raise ValueError("no signature found for builtin {!r}".format(func)) - - return _signature_fromstr(cls, func, s, skip_bound_arg) - - -def _signature_from_function(cls, func, skip_bound_arg=True, - globals=None, locals=None, eval_str=False, - *, annotation_format=Format.VALUE): - """Private helper: constructs Signature for the given python function.""" - - is_duck_function = False - if not isfunction(func): - if _signature_is_functionlike(func): - is_duck_function = True - else: - # If it's not a pure Python function, and not a duck type - # of pure function: - raise TypeError('{!r} is not a Python function'.format(func)) - - s = getattr(func, "__text_signature__", None) - if s: - return _signature_fromstr(cls, func, s, skip_bound_arg) - - Parameter = cls._parameter_cls - - # Parameter information. - func_code = func.__code__ - pos_count = func_code.co_argcount - arg_names = func_code.co_varnames - posonly_count = func_code.co_posonlyargcount - positional = arg_names[:pos_count] - keyword_only_count = func_code.co_kwonlyargcount - keyword_only = arg_names[pos_count:pos_count + keyword_only_count] - annotations = get_annotations(func, globals=globals, locals=locals, eval_str=eval_str, - format=annotation_format) - defaults = func.__defaults__ - kwdefaults = func.__kwdefaults__ - - if defaults: - pos_default_count = len(defaults) - else: - pos_default_count = 0 - - parameters = [] - - non_default_count = pos_count - pos_default_count - posonly_left = posonly_count - - # Non-keyword-only parameters w/o defaults. - for name in positional[:non_default_count]: - kind = _POSITIONAL_ONLY if posonly_left else _POSITIONAL_OR_KEYWORD - annotation = annotations.get(name, _empty) - parameters.append(Parameter(name, annotation=annotation, - kind=kind)) - if posonly_left: - posonly_left -= 1 - - # ... w/ defaults. - for offset, name in enumerate(positional[non_default_count:]): - kind = _POSITIONAL_ONLY if posonly_left else _POSITIONAL_OR_KEYWORD - annotation = annotations.get(name, _empty) - parameters.append(Parameter(name, annotation=annotation, - kind=kind, - default=defaults[offset])) - if posonly_left: - posonly_left -= 1 - - # *args - if func_code.co_flags & CO_VARARGS: - name = arg_names[pos_count + keyword_only_count] - annotation = annotations.get(name, _empty) - parameters.append(Parameter(name, annotation=annotation, - kind=_VAR_POSITIONAL)) - - # Keyword-only parameters. - for name in keyword_only: - default = _empty - if kwdefaults is not None: - default = kwdefaults.get(name, _empty) - - annotation = annotations.get(name, _empty) - parameters.append(Parameter(name, annotation=annotation, - kind=_KEYWORD_ONLY, - default=default)) - # **kwargs - if func_code.co_flags & CO_VARKEYWORDS: - index = pos_count + keyword_only_count - if func_code.co_flags & CO_VARARGS: - index += 1 - - name = arg_names[index] - annotation = annotations.get(name, _empty) - parameters.append(Parameter(name, annotation=annotation, - kind=_VAR_KEYWORD)) - - # Is 'func' is a pure Python function - don't validate the - # parameters list (for correct order and defaults), it should be OK. - return cls(parameters, - return_annotation=annotations.get('return', _empty), - __validate_parameters__=is_duck_function) - - -def _descriptor_get(descriptor, obj): - if isclass(descriptor): - return descriptor - get = getattr(type(descriptor), '__get__', _sentinel) - if get is _sentinel: - return descriptor - return get(descriptor, obj, type(obj)) - - -def _signature_from_callable(obj, *, - follow_wrapper_chains=True, - skip_bound_arg=True, - globals=None, - locals=None, - eval_str=False, - sigcls, - annotation_format=Format.VALUE): - - """Private helper function to get signature for arbitrary - callable objects. - """ - - _get_signature_of = functools.partial(_signature_from_callable, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - globals=globals, - locals=locals, - sigcls=sigcls, - eval_str=eval_str, - annotation_format=annotation_format) - - if not callable(obj): - raise TypeError('{!r} is not a callable object'.format(obj)) - - if isinstance(obj, types.MethodType): - # In this case we skip the first parameter of the underlying - # function (usually `self` or `cls`). - sig = _get_signature_of(obj.__func__) - - if skip_bound_arg: - return _signature_bound_method(sig) - else: - return sig - - # Was this function wrapped by a decorator? - if follow_wrapper_chains: - # Unwrap until we find an explicit signature or a MethodType (which will be - # handled explicitly below). - obj = unwrap(obj, stop=(lambda f: hasattr(f, "__signature__") - or isinstance(f, types.MethodType))) - if isinstance(obj, types.MethodType): - # If the unwrapped object is a *method*, we might want to - # skip its first parameter (self). - # See test_signature_wrapped_bound_method for details. - return _get_signature_of(obj) - - try: - sig = obj.__signature__ - except AttributeError: - pass - else: - if sig is not None: - if not isinstance(sig, Signature): - raise TypeError( - 'unexpected object {!r} in __signature__ ' - 'attribute'.format(sig)) - return sig - - try: - partialmethod = obj.__partialmethod__ - except AttributeError: - pass - else: - if isinstance(partialmethod, functools.partialmethod): - # Unbound partialmethod (see functools.partialmethod) - # This means, that we need to calculate the signature - # as if it's a regular partial object, but taking into - # account that the first positional argument - # (usually `self`, or `cls`) will not be passed - # automatically (as for boundmethods) - - wrapped_sig = _get_signature_of(partialmethod.func) - - sig = _signature_get_partial(wrapped_sig, partialmethod, (None,)) - first_wrapped_param = tuple(wrapped_sig.parameters.values())[0] - if first_wrapped_param.kind is Parameter.VAR_POSITIONAL: - # First argument of the wrapped callable is `*args`, as in - # `partialmethod(lambda *args)`. - return sig - else: - sig_params = tuple(sig.parameters.values()) - assert (not sig_params or - first_wrapped_param is not sig_params[0]) - # If there were placeholders set, - # first param is transformed to positional only - if partialmethod.args.count(functools.Placeholder): - first_wrapped_param = first_wrapped_param.replace( - kind=Parameter.POSITIONAL_ONLY) - new_params = (first_wrapped_param,) + sig_params - return sig.replace(parameters=new_params) - - if isinstance(obj, functools.partial): - wrapped_sig = _get_signature_of(obj.func) - return _signature_get_partial(wrapped_sig, obj) - - if isfunction(obj) or _signature_is_functionlike(obj): - # If it's a pure Python function, or an object that is duck type - # of a Python function (Cython functions, for instance), then: - return _signature_from_function(sigcls, obj, - skip_bound_arg=skip_bound_arg, - globals=globals, locals=locals, eval_str=eval_str, - annotation_format=annotation_format) - - if _signature_is_builtin(obj): - return _signature_from_builtin(sigcls, obj, - skip_bound_arg=skip_bound_arg) - - if isinstance(obj, type): - # obj is a class or a metaclass - - # First, let's see if it has an overloaded __call__ defined - # in its metaclass - call = _signature_get_user_defined_method( - type(obj), - '__call__', - follow_wrapper_chains=follow_wrapper_chains, - ) - if call is not None: - return _get_signature_of(call) - - # NOTE: The user-defined method can be a function with a thin wrapper - # around object.__new__ (e.g., generated by `@warnings.deprecated`) - new = _signature_get_user_defined_method( - obj, - '__new__', - follow_wrapper_chains=follow_wrapper_chains, - ) - init = _signature_get_user_defined_method( - obj, - '__init__', - follow_wrapper_chains=follow_wrapper_chains, - ) - - # Go through the MRO and see if any class has user-defined - # pure Python __new__ or __init__ method - for base in obj.__mro__: - # Now we check if the 'obj' class has an own '__new__' method - if new is not None and '__new__' in base.__dict__: - sig = _get_signature_of(new) - if skip_bound_arg: - sig = _signature_bound_method(sig) - return sig - # or an own '__init__' method - elif init is not None and '__init__' in base.__dict__: - return _get_signature_of(init) - - # At this point we know, that `obj` is a class, with no user- - # defined '__init__', '__new__', or class-level '__call__' - - for base in obj.__mro__[:-1]: - # Since '__text_signature__' is implemented as a - # descriptor that extracts text signature from the - # class docstring, if 'obj' is derived from a builtin - # class, its own '__text_signature__' may be 'None'. - # Therefore, we go through the MRO (except the last - # class in there, which is 'object') to find the first - # class with non-empty text signature. - try: - text_sig = base.__text_signature__ - except AttributeError: - pass - else: - if text_sig: - # If 'base' class has a __text_signature__ attribute: - # return a signature based on it - return _signature_fromstr(sigcls, base, text_sig) - - # No '__text_signature__' was found for the 'obj' class. - # Last option is to check if its '__init__' is - # object.__init__ or type.__init__. - if type not in obj.__mro__: - obj_init = obj.__init__ - obj_new = obj.__new__ - if follow_wrapper_chains: - obj_init = unwrap(obj_init) - obj_new = unwrap(obj_new) - # We have a class (not metaclass), but no user-defined - # __init__ or __new__ for it - if obj_init is object.__init__ and obj_new is object.__new__: - # Return a signature of 'object' builtin. - return sigcls.from_callable(object) - else: - raise ValueError( - 'no signature found for builtin type {!r}'.format(obj)) - - else: - # An object with __call__ - call = getattr_static(type(obj), '__call__', None) - if call is not None: - try: - text_sig = obj.__text_signature__ - except AttributeError: - pass - else: - if text_sig: - return _signature_fromstr(sigcls, obj, text_sig) - call = _descriptor_get(call, obj) - return _get_signature_of(call) - - raise ValueError('callable {!r} is not supported by signature'.format(obj)) - - -class _void: - """A private marker - used in Parameter & Signature.""" - - -class _empty: - """Marker object for Signature.empty and Parameter.empty.""" - - -class _ParameterKind(enum.IntEnum): - POSITIONAL_ONLY = 'positional-only' - POSITIONAL_OR_KEYWORD = 'positional or keyword' - VAR_POSITIONAL = 'variadic positional' - KEYWORD_ONLY = 'keyword-only' - VAR_KEYWORD = 'variadic keyword' - - def __new__(cls, description): - value = len(cls.__members__) - member = int.__new__(cls, value) - member._value_ = value - member.description = description - return member - - def __str__(self): - return self.name - -_POSITIONAL_ONLY = _ParameterKind.POSITIONAL_ONLY -_POSITIONAL_OR_KEYWORD = _ParameterKind.POSITIONAL_OR_KEYWORD -_VAR_POSITIONAL = _ParameterKind.VAR_POSITIONAL -_KEYWORD_ONLY = _ParameterKind.KEYWORD_ONLY -_VAR_KEYWORD = _ParameterKind.VAR_KEYWORD - - -class Parameter: - """Represents a parameter in a function signature. - - Has the following public attributes: - - * name : str - The name of the parameter as a string. - * default : object - The default value for the parameter if specified. If the - parameter has no default value, this attribute is set to - `Parameter.empty`. - * annotation - The annotation for the parameter if specified. If the - parameter has no annotation, this attribute is set to - `Parameter.empty`. - * kind - Describes how argument values are bound to the parameter. - Possible values: `Parameter.POSITIONAL_ONLY`, - `Parameter.POSITIONAL_OR_KEYWORD`, `Parameter.VAR_POSITIONAL`, - `Parameter.KEYWORD_ONLY`, `Parameter.VAR_KEYWORD`. - Every value has a `description` attribute describing meaning. - """ - - __slots__ = ('_name', '_kind', '_default', '_annotation') - - POSITIONAL_ONLY = _POSITIONAL_ONLY - POSITIONAL_OR_KEYWORD = _POSITIONAL_OR_KEYWORD - VAR_POSITIONAL = _VAR_POSITIONAL - KEYWORD_ONLY = _KEYWORD_ONLY - VAR_KEYWORD = _VAR_KEYWORD - - empty = _empty - - def __init__(self, name, kind, *, default=_empty, annotation=_empty): - try: - self._kind = _ParameterKind(kind) - except ValueError: - raise ValueError(f'value {kind!r} is not a valid Parameter.kind') - if default is not _empty: - if self._kind in (_VAR_POSITIONAL, _VAR_KEYWORD): - msg = '{} parameters cannot have default values' - msg = msg.format(self._kind.description) - raise ValueError(msg) - self._default = default - self._annotation = annotation - - if name is _empty: - raise ValueError('name is a required attribute for Parameter') - - if not isinstance(name, str): - msg = 'name must be a str, not a {}'.format(type(name).__name__) - raise TypeError(msg) - - if name[0] == '.' and name[1:].isdigit(): - # These are implicit arguments generated by comprehensions. In - # order to provide a friendlier interface to users, we recast - # their name as "implicitN" and treat them as positional-only. - # See issue 19611. - if self._kind != _POSITIONAL_OR_KEYWORD: - msg = ( - 'implicit arguments must be passed as ' - 'positional or keyword arguments, not {}' - ) - msg = msg.format(self._kind.description) - raise ValueError(msg) - self._kind = _POSITIONAL_ONLY - name = 'implicit{}'.format(name[1:]) - - # It's possible for C functions to have a positional-only parameter - # where the name is a keyword, so for compatibility we'll allow it. - is_keyword = iskeyword(name) and self._kind is not _POSITIONAL_ONLY - if is_keyword or not name.isidentifier(): - raise ValueError('{!r} is not a valid parameter name'.format(name)) - - self._name = name - - def __reduce__(self): - return (type(self), - (self._name, self._kind), - {'_default': self._default, - '_annotation': self._annotation}) - - def __setstate__(self, state): - self._default = state['_default'] - self._annotation = state['_annotation'] - - @property - def name(self): - return self._name - - @property - def default(self): - return self._default - - @property - def annotation(self): - return self._annotation - - @property - def kind(self): - return self._kind - - def replace(self, *, name=_void, kind=_void, - annotation=_void, default=_void): - """Creates a customized copy of the Parameter.""" - - if name is _void: - name = self._name - - if kind is _void: - kind = self._kind - - if annotation is _void: - annotation = self._annotation - - if default is _void: - default = self._default - - return type(self)(name, kind, default=default, annotation=annotation) - - def __str__(self): - return self._format() - - def _format(self, *, quote_annotation_strings=True): - kind = self.kind - formatted = self._name - - # Add annotation and default value - if self._annotation is not _empty: - annotation = formatannotation(self._annotation, - quote_annotation_strings=quote_annotation_strings) - formatted = '{}: {}'.format(formatted, annotation) - - if self._default is not _empty: - if self._annotation is not _empty: - formatted = '{} = {}'.format(formatted, repr(self._default)) - else: - formatted = '{}={}'.format(formatted, repr(self._default)) - - if kind == _VAR_POSITIONAL: - formatted = '*' + formatted - elif kind == _VAR_KEYWORD: - formatted = '**' + formatted - - return formatted - - __replace__ = replace - - def __repr__(self): - return '<{} "{}">'.format(self.__class__.__name__, self) - - def __hash__(self): - return hash((self._name, self._kind, self._annotation, self._default)) - - def __eq__(self, other): - if self is other: - return True - if not isinstance(other, Parameter): - return NotImplemented - return (self._name == other._name and - self._kind == other._kind and - self._default == other._default and - self._annotation == other._annotation) - - -class BoundArguments: - """Result of `Signature.bind` call. Holds the mapping of arguments - to the function's parameters. - - Has the following public attributes: - - * arguments : dict - An ordered mutable mapping of parameters' names to arguments' values. - Does not contain arguments' default values. - * signature : Signature - The Signature object that created this instance. - * args : tuple - Tuple of positional arguments values. - * kwargs : dict - Dict of keyword arguments values. - """ - - __slots__ = ('arguments', '_signature', '__weakref__') - - def __init__(self, signature, arguments): - self.arguments = arguments - self._signature = signature - - @property - def signature(self): - return self._signature - - @property - def args(self): - args = [] - for param_name, param in self._signature.parameters.items(): - if param.kind in (_VAR_KEYWORD, _KEYWORD_ONLY): - break - - try: - arg = self.arguments[param_name] - except KeyError: - # We're done here. Other arguments - # will be mapped in 'BoundArguments.kwargs' - break - else: - if param.kind == _VAR_POSITIONAL: - # *args - args.extend(arg) - else: - # plain argument - args.append(arg) - - return tuple(args) - - @property - def kwargs(self): - kwargs = {} - kwargs_started = False - for param_name, param in self._signature.parameters.items(): - if not kwargs_started: - if param.kind in (_VAR_KEYWORD, _KEYWORD_ONLY): - kwargs_started = True - else: - if param_name not in self.arguments: - kwargs_started = True - continue - - if not kwargs_started: - continue - - try: - arg = self.arguments[param_name] - except KeyError: - pass - else: - if param.kind == _VAR_KEYWORD: - # **kwargs - kwargs.update(arg) - else: - # plain keyword argument - kwargs[param_name] = arg - - return kwargs - - def apply_defaults(self): - """Set default values for missing arguments. - - For variable-positional arguments (*args) the default is an - empty tuple. - - For variable-keyword arguments (**kwargs) the default is an - empty dict. - """ - arguments = self.arguments - new_arguments = [] - for name, param in self._signature.parameters.items(): - try: - new_arguments.append((name, arguments[name])) - except KeyError: - if param.default is not _empty: - val = param.default - elif param.kind is _VAR_POSITIONAL: - val = () - elif param.kind is _VAR_KEYWORD: - val = {} - else: - # This BoundArguments was likely produced by - # Signature.bind_partial(). - continue - new_arguments.append((name, val)) - self.arguments = dict(new_arguments) - - def __eq__(self, other): - if self is other: - return True - if not isinstance(other, BoundArguments): - return NotImplemented - return (self.signature == other.signature and - self.arguments == other.arguments) - - def __setstate__(self, state): - self._signature = state['_signature'] - self.arguments = state['arguments'] - - def __getstate__(self): - return {'_signature': self._signature, 'arguments': self.arguments} - - def __repr__(self): - args = [] - for arg, value in self.arguments.items(): - args.append('{}={!r}'.format(arg, value)) - return '<{} ({})>'.format(self.__class__.__name__, ', '.join(args)) - - -class Signature: - """A Signature object represents the overall signature of a function. - It stores a Parameter object for each parameter accepted by the - function, as well as information specific to the function itself. - - A Signature object has the following public attributes and methods: - - * parameters : OrderedDict - An ordered mapping of parameters' names to the corresponding - Parameter objects (keyword-only arguments are in the same order - as listed in `code.co_varnames`). - * return_annotation : object - The annotation for the return type of the function if specified. - If the function has no annotation for its return type, this - attribute is set to `Signature.empty`. - * bind(*args, **kwargs) -> BoundArguments - Creates a mapping from positional and keyword arguments to - parameters. - * bind_partial(*args, **kwargs) -> BoundArguments - Creates a partial mapping from positional and keyword arguments - to parameters (simulating 'functools.partial' behavior.) - """ - - __slots__ = ('_return_annotation', '_parameters') - - _parameter_cls = Parameter - _bound_arguments_cls = BoundArguments - - empty = _empty - - def __init__(self, parameters=None, *, return_annotation=_empty, - __validate_parameters__=True): - """Constructs Signature from the given list of Parameter - objects and 'return_annotation'. All arguments are optional. - """ - - if parameters is None: - params = OrderedDict() - else: - if __validate_parameters__: - params = OrderedDict() - top_kind = _POSITIONAL_ONLY - seen_default = False - seen_var_parameters = set() - - for param in parameters: - kind = param.kind - name = param.name - - if kind in (_VAR_POSITIONAL, _VAR_KEYWORD): - if kind in seen_var_parameters: - msg = f'more than one {kind.description} parameter' - raise ValueError(msg) - - seen_var_parameters.add(kind) - - if kind < top_kind: - msg = ( - 'wrong parameter order: {} parameter before {} ' - 'parameter' - ) - msg = msg.format(top_kind.description, - kind.description) - raise ValueError(msg) - elif kind > top_kind: - top_kind = kind - - if kind in (_POSITIONAL_ONLY, _POSITIONAL_OR_KEYWORD): - if param.default is _empty: - if seen_default: - # No default for this parameter, but the - # previous parameter of had a default - msg = 'non-default argument follows default ' \ - 'argument' - raise ValueError(msg) - else: - # There is a default for this parameter. - seen_default = True - - if name in params: - msg = 'duplicate parameter name: {!r}'.format(name) - raise ValueError(msg) - - params[name] = param - else: - params = OrderedDict((param.name, param) for param in parameters) - - self._parameters = types.MappingProxyType(params) - self._return_annotation = return_annotation - - @classmethod - def from_callable(cls, obj, *, - follow_wrapped=True, globals=None, locals=None, eval_str=False, - annotation_format=Format.VALUE): - """Constructs Signature for the given callable object.""" - return _signature_from_callable(obj, sigcls=cls, - follow_wrapper_chains=follow_wrapped, - globals=globals, locals=locals, eval_str=eval_str, - annotation_format=annotation_format) - - @property - def parameters(self): - return self._parameters - - @property - def return_annotation(self): - return self._return_annotation - - def replace(self, *, parameters=_void, return_annotation=_void): - """Creates a customized copy of the Signature. - Pass 'parameters' and/or 'return_annotation' arguments - to override them in the new copy. - """ - - if parameters is _void: - parameters = self.parameters.values() - - if return_annotation is _void: - return_annotation = self._return_annotation - - return type(self)(parameters, - return_annotation=return_annotation) - - __replace__ = replace - - def _hash_basis(self): - params = tuple(param for param in self.parameters.values() - if param.kind != _KEYWORD_ONLY) - - kwo_params = {param.name: param for param in self.parameters.values() - if param.kind == _KEYWORD_ONLY} - - return params, kwo_params, self.return_annotation - - def __hash__(self): - params, kwo_params, return_annotation = self._hash_basis() - kwo_params = frozenset(kwo_params.values()) - return hash((params, kwo_params, return_annotation)) - - def __eq__(self, other): - if self is other: - return True - if not isinstance(other, Signature): - return NotImplemented - return self._hash_basis() == other._hash_basis() - - def _bind(self, args, kwargs, *, partial=False): - """Private method. Don't use directly.""" - - arguments = {} - - parameters = iter(self.parameters.values()) - parameters_ex = () - arg_vals = iter(args) - - pos_only_param_in_kwargs = [] - - while True: - # Let's iterate through the positional arguments and corresponding - # parameters - try: - arg_val = next(arg_vals) - except StopIteration: - # No more positional arguments - try: - param = next(parameters) - except StopIteration: - # No more parameters. That's it. Just need to check that - # we have no `kwargs` after this while loop - break - else: - if param.kind == _VAR_POSITIONAL: - # That's OK, just empty *args. Let's start parsing - # kwargs - break - elif param.name in kwargs: - if param.kind == _POSITIONAL_ONLY: - if param.default is _empty: - msg = f'missing a required positional-only argument: {param.name!r}' - raise TypeError(msg) - # Raise a TypeError once we are sure there is no - # **kwargs param later. - pos_only_param_in_kwargs.append(param) - continue - parameters_ex = (param,) - break - elif (param.kind == _VAR_KEYWORD or - param.default is not _empty): - # That's fine too - we have a default value for this - # parameter. So, lets start parsing `kwargs`, starting - # with the current parameter - parameters_ex = (param,) - break - else: - # No default, not VAR_KEYWORD, not VAR_POSITIONAL, - # not in `kwargs` - if partial: - parameters_ex = (param,) - break - else: - if param.kind == _KEYWORD_ONLY: - argtype = ' keyword-only' - else: - argtype = '' - msg = 'missing a required{argtype} argument: {arg!r}' - msg = msg.format(arg=param.name, argtype=argtype) - raise TypeError(msg) from None - else: - # We have a positional argument to process - try: - param = next(parameters) - except StopIteration: - raise TypeError('too many positional arguments') from None - else: - if param.kind in (_VAR_KEYWORD, _KEYWORD_ONLY): - # Looks like we have no parameter for this positional - # argument - raise TypeError( - 'too many positional arguments') from None - - if param.kind == _VAR_POSITIONAL: - # We have an '*args'-like argument, let's fill it with - # all positional arguments we have left and move on to - # the next phase - values = [arg_val] - values.extend(arg_vals) - arguments[param.name] = tuple(values) - break - - if param.name in kwargs and param.kind != _POSITIONAL_ONLY: - raise TypeError( - 'multiple values for argument {arg!r}'.format( - arg=param.name)) from None - - arguments[param.name] = arg_val - - # Now, we iterate through the remaining parameters to process - # keyword arguments - kwargs_param = None - for param in itertools.chain(parameters_ex, parameters): - if param.kind == _VAR_KEYWORD: - # Memorize that we have a '**kwargs'-like parameter - kwargs_param = param - continue - - if param.kind == _VAR_POSITIONAL: - # Named arguments don't refer to '*args'-like parameters. - # We only arrive here if the positional arguments ended - # before reaching the last parameter before *args. - continue - - param_name = param.name - try: - arg_val = kwargs.pop(param_name) - except KeyError: - # We have no value for this parameter. It's fine though, - # if it has a default value, or it is an '*args'-like - # parameter, left alone by the processing of positional - # arguments. - if (not partial and param.kind != _VAR_POSITIONAL and - param.default is _empty): - raise TypeError('missing a required argument: {arg!r}'. \ - format(arg=param_name)) from None - - else: - arguments[param_name] = arg_val - - if kwargs: - if kwargs_param is not None: - # Process our '**kwargs'-like parameter - arguments[kwargs_param.name] = kwargs - elif pos_only_param_in_kwargs: - raise TypeError( - 'got some positional-only arguments passed as ' - 'keyword arguments: {arg!r}'.format( - arg=', '.join( - param.name - for param in pos_only_param_in_kwargs - ), - ), - ) - else: - raise TypeError( - 'got an unexpected keyword argument {arg!r}'.format( - arg=next(iter(kwargs)))) - - return self._bound_arguments_cls(self, arguments) - - def bind(self, /, *args, **kwargs): - """Get a BoundArguments object, that maps the passed `args` - and `kwargs` to the function's signature. Raises `TypeError` - if the passed arguments can not be bound. - """ - return self._bind(args, kwargs) - - def bind_partial(self, /, *args, **kwargs): - """Get a BoundArguments object, that partially maps the - passed `args` and `kwargs` to the function's signature. - Raises `TypeError` if the passed arguments can not be bound. - """ - return self._bind(args, kwargs, partial=True) - - def __reduce__(self): - return (type(self), - (tuple(self._parameters.values()),), - {'_return_annotation': self._return_annotation}) - - def __setstate__(self, state): - self._return_annotation = state['_return_annotation'] - - def __repr__(self): - return '<{} {}>'.format(self.__class__.__name__, self) - - def __str__(self): - return self.format() - - def format(self, *, max_width=None, quote_annotation_strings=True): - """Create a string representation of the Signature object. - - If *max_width* integer is passed, - signature will try to fit into the *max_width*. - If signature is longer than *max_width*, - all parameters will be on separate lines. - - If *quote_annotation_strings* is False, annotations - in the signature are displayed without opening and closing quotation - marks. This is useful when the signature was created with the - STRING format or when ``from __future__ import annotations`` was used. - """ - result = [] - render_pos_only_separator = False - render_kw_only_separator = True - for param in self.parameters.values(): - formatted = param._format(quote_annotation_strings=quote_annotation_strings) - - kind = param.kind - - if kind == _POSITIONAL_ONLY: - render_pos_only_separator = True - elif render_pos_only_separator: - # It's not a positional-only parameter, and the flag - # is set to 'True' (there were pos-only params before.) - result.append('/') - render_pos_only_separator = False - - if kind == _VAR_POSITIONAL: - # OK, we have an '*args'-like parameter, so we won't need - # a '*' to separate keyword-only arguments - render_kw_only_separator = False - elif kind == _KEYWORD_ONLY and render_kw_only_separator: - # We have a keyword-only parameter to render and we haven't - # rendered an '*args'-like parameter before, so add a '*' - # separator to the parameters list ("foo(arg1, *, arg2)" case) - result.append('*') - # This condition should be only triggered once, so - # reset the flag - render_kw_only_separator = False - - result.append(formatted) - - if render_pos_only_separator: - # There were only positional-only parameters, hence the - # flag was not reset to 'False' - result.append('/') - - rendered = '({})'.format(', '.join(result)) - if max_width is not None and len(rendered) > max_width: - rendered = '(\n {}\n)'.format(',\n '.join(result)) - - if self.return_annotation is not _empty: - anno = formatannotation(self.return_annotation, - quote_annotation_strings=quote_annotation_strings) - rendered += ' -> {}'.format(anno) - - return rendered - - -def signature(obj, *, follow_wrapped=True, globals=None, locals=None, eval_str=False, - annotation_format=Format.VALUE): - """Get a signature object for the passed callable.""" - return Signature.from_callable(obj, follow_wrapped=follow_wrapped, - globals=globals, locals=locals, eval_str=eval_str, - annotation_format=annotation_format) - - -class BufferFlags(enum.IntFlag): - SIMPLE = 0x0 - WRITABLE = 0x1 - FORMAT = 0x4 - ND = 0x8 - STRIDES = 0x10 | ND - C_CONTIGUOUS = 0x20 | STRIDES - F_CONTIGUOUS = 0x40 | STRIDES - ANY_CONTIGUOUS = 0x80 | STRIDES - INDIRECT = 0x100 | STRIDES - CONTIG = ND | WRITABLE - CONTIG_RO = ND - STRIDED = STRIDES | WRITABLE - STRIDED_RO = STRIDES - RECORDS = STRIDES | WRITABLE | FORMAT - RECORDS_RO = STRIDES | FORMAT - FULL = INDIRECT | WRITABLE | FORMAT - FULL_RO = INDIRECT | FORMAT - READ = 0x100 - WRITE = 0x200 - - -def _main(): - """ Logic for inspecting an object given at command line """ - import argparse - import importlib - - parser = argparse.ArgumentParser(color=True) - parser.add_argument( - 'object', - help="The object to be analysed. " - "It supports the 'module:qualname' syntax") - parser.add_argument( - '-d', '--details', action='store_true', - help='Display info about the module rather than its source code') - - args = parser.parse_args() - - target = args.object - mod_name, has_attrs, attrs = target.partition(":") - try: - obj = module = importlib.import_module(mod_name) - except Exception as exc: - msg = "Failed to import {} ({}: {})".format(mod_name, - type(exc).__name__, - exc) - print(msg, file=sys.stderr) - sys.exit(2) - - if has_attrs: - parts = attrs.split(".") - obj = module - for part in parts: - obj = getattr(obj, part) - - if module.__name__ in sys.builtin_module_names: - print("Can't get info for builtin modules.", file=sys.stderr) - sys.exit(1) - - if args.details: - print('Target: {}'.format(target)) - print('Origin: {}'.format(getsourcefile(module))) - print('Cached: {}'.format(module.__cached__)) - if obj is module: - print('Loader: {}'.format(repr(module.__loader__))) - if hasattr(module, '__path__'): - print('Submodule search path: {}'.format(module.__path__)) - else: - try: - __, lineno = findsource(obj) - except Exception: - pass - else: - print('Line: {}'.format(lineno)) - - print('\n') - else: - print(getsource(obj)) - - -if __name__ == "__main__": - _main() diff --git a/Python314_4_x64_Template/Lib/json/__init__.py b/Python314_4_x64_Template/Lib/json/__init__.py deleted file mode 100644 index 9eaa4f3fb..000000000 --- a/Python314_4_x64_Template/Lib/json/__init__.py +++ /dev/null @@ -1,365 +0,0 @@ -r"""JSON (JavaScript Object Notation) is a subset of -JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data -interchange format. - -:mod:`json` exposes an API familiar to users of the standard library -:mod:`marshal` and :mod:`pickle` modules. It is derived from a -version of the externally maintained simplejson library. - -Encoding basic Python object hierarchies:: - - >>> import json - >>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]) - '["foo", {"bar": ["baz", null, 1.0, 2]}]' - >>> print(json.dumps("\"foo\bar")) - "\"foo\bar" - >>> print(json.dumps('\u1234')) - "\u1234" - >>> print(json.dumps('\\')) - "\\" - >>> print(json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True)) - {"a": 0, "b": 0, "c": 0} - >>> from io import StringIO - >>> io = StringIO() - >>> json.dump(['streaming API'], io) - >>> io.getvalue() - '["streaming API"]' - -Compact encoding:: - - >>> import json - >>> mydict = {'4': 5, '6': 7} - >>> json.dumps([1,2,3,mydict], separators=(',', ':')) - '[1,2,3,{"4":5,"6":7}]' - -Pretty printing:: - - >>> import json - >>> print(json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4)) - { - "4": 5, - "6": 7 - } - -Decoding JSON:: - - >>> import json - >>> obj = ['foo', {'bar': ['baz', None, 1.0, 2]}] - >>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') == obj - True - >>> json.loads('"\\"foo\\bar"') == '"foo\x08ar' - True - >>> from io import StringIO - >>> io = StringIO('["streaming API"]') - >>> json.load(io)[0] == 'streaming API' - True - -Specializing JSON object decoding:: - - >>> import json - >>> def as_complex(dct): - ... if '__complex__' in dct: - ... return complex(dct['real'], dct['imag']) - ... return dct - ... - >>> json.loads('{"__complex__": true, "real": 1, "imag": 2}', - ... object_hook=as_complex) - (1+2j) - >>> from decimal import Decimal - >>> json.loads('1.1', parse_float=Decimal) == Decimal('1.1') - True - -Specializing JSON object encoding:: - - >>> import json - >>> def encode_complex(obj): - ... if isinstance(obj, complex): - ... return [obj.real, obj.imag] - ... raise TypeError(f'Object of type {obj.__class__.__name__} ' - ... f'is not JSON serializable') - ... - >>> json.dumps(2 + 1j, default=encode_complex) - '[2.0, 1.0]' - >>> json.JSONEncoder(default=encode_complex).encode(2 + 1j) - '[2.0, 1.0]' - >>> ''.join(json.JSONEncoder(default=encode_complex).iterencode(2 + 1j)) - '[2.0, 1.0]' - - -Using json from the shell to validate and pretty-print:: - - $ echo '{"json":"obj"}' | python -m json - { - "json": "obj" - } - $ echo '{ 1.2:3.4}' | python -m json - Expecting property name enclosed in double quotes: line 1 column 3 (char 2) -""" -__version__ = '2.0.9' -__all__ = [ - 'dump', 'dumps', 'load', 'loads', - 'JSONDecoder', 'JSONDecodeError', 'JSONEncoder', -] - -__author__ = 'Bob Ippolito ' - -from .decoder import JSONDecoder, JSONDecodeError -from .encoder import JSONEncoder -import codecs - -_default_encoder = JSONEncoder( - skipkeys=False, - ensure_ascii=True, - check_circular=True, - allow_nan=True, - indent=None, - separators=None, - default=None, -) - -def dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, - allow_nan=True, cls=None, indent=None, separators=None, - default=None, sort_keys=False, **kw): - """Serialize ``obj`` as a JSON formatted stream to ``fp`` (a - ``.write()``-supporting file-like object). - - If ``skipkeys`` is true then ``dict`` keys that are not basic types - (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped - instead of raising a ``TypeError``. - - If ``ensure_ascii`` is false, then the strings written to ``fp`` can - contain non-ASCII and non-printable characters if they appear in strings - contained in ``obj``. Otherwise, all such characters are escaped in JSON - strings. - - If ``check_circular`` is false, then the circular reference check - for container types will be skipped and a circular reference will - result in an ``RecursionError`` (or worse). - - If ``allow_nan`` is false, then it will be a ``ValueError`` to - serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) - in strict compliance of the JSON specification, instead of using the - JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). - - If ``indent`` is a non-negative integer, then JSON array elements and - object members will be pretty-printed with that indent level. An indent - level of 0 will only insert newlines. ``None`` is the most compact - representation. - - If specified, ``separators`` should be an ``(item_separator, - key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is - ``None`` and ``(',', ': ')`` otherwise. To get the most compact JSON - representation, you should specify ``(',', ':')`` to eliminate - whitespace. - - ``default(obj)`` is a function that should return a serializable version - of obj or raise TypeError. The default simply raises TypeError. - - If *sort_keys* is true (default: ``False``), then the output of - dictionaries will be sorted by key. - - To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the - ``.default()`` method to serialize additional types), specify it with - the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. - - """ - # cached encoder - if (not skipkeys and ensure_ascii and - check_circular and allow_nan and - cls is None and indent is None and separators is None and - default is None and not sort_keys and not kw): - iterable = _default_encoder.iterencode(obj) - else: - if cls is None: - cls = JSONEncoder - iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii, - check_circular=check_circular, allow_nan=allow_nan, indent=indent, - separators=separators, - default=default, sort_keys=sort_keys, **kw).iterencode(obj) - # could accelerate with writelines in some versions of Python, at - # a debuggability cost - for chunk in iterable: - fp.write(chunk) - - -def dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, - allow_nan=True, cls=None, indent=None, separators=None, - default=None, sort_keys=False, **kw): - """Serialize ``obj`` to a JSON formatted ``str``. - - If ``skipkeys`` is true then ``dict`` keys that are not basic types - (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped - instead of raising a ``TypeError``. - - If ``ensure_ascii`` is false, then the return value can contain - non-ASCII and non-printable characters if they appear in strings - contained in ``obj``. Otherwise, all such characters are escaped in - JSON strings. - - If ``check_circular`` is false, then the circular reference check - for container types will be skipped and a circular reference will - result in an ``RecursionError`` (or worse). - - If ``allow_nan`` is false, then it will be a ``ValueError`` to - serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in - strict compliance of the JSON specification, instead of using the - JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). - - If ``indent`` is a non-negative integer, then JSON array elements and - object members will be pretty-printed with that indent level. An indent - level of 0 will only insert newlines. ``None`` is the most compact - representation. - - If specified, ``separators`` should be an ``(item_separator, - key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is - ``None`` and ``(',', ': ')`` otherwise. To get the most compact JSON - representation, you should specify ``(',', ':')`` to eliminate - whitespace. - - ``default(obj)`` is a function that should return a serializable version - of obj or raise TypeError. The default simply raises TypeError. - - If *sort_keys* is true (default: ``False``), then the output of - dictionaries will be sorted by key. - - To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the - ``.default()`` method to serialize additional types), specify it with - the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. - - """ - # cached encoder - if (not skipkeys and ensure_ascii and - check_circular and allow_nan and - cls is None and indent is None and separators is None and - default is None and not sort_keys and not kw): - return _default_encoder.encode(obj) - if cls is None: - cls = JSONEncoder - return cls( - skipkeys=skipkeys, ensure_ascii=ensure_ascii, - check_circular=check_circular, allow_nan=allow_nan, indent=indent, - separators=separators, default=default, sort_keys=sort_keys, - **kw).encode(obj) - - -_default_decoder = JSONDecoder(object_hook=None, object_pairs_hook=None) - - -def detect_encoding(b): - bstartswith = b.startswith - if bstartswith((codecs.BOM_UTF32_BE, codecs.BOM_UTF32_LE)): - return 'utf-32' - if bstartswith((codecs.BOM_UTF16_BE, codecs.BOM_UTF16_LE)): - return 'utf-16' - if bstartswith(codecs.BOM_UTF8): - return 'utf-8-sig' - - if len(b) >= 4: - if not b[0]: - # 00 00 -- -- - utf-32-be - # 00 XX -- -- - utf-16-be - return 'utf-16-be' if b[1] else 'utf-32-be' - if not b[1]: - # XX 00 00 00 - utf-32-le - # XX 00 00 XX - utf-16-le - # XX 00 XX -- - utf-16-le - return 'utf-16-le' if b[2] or b[3] else 'utf-32-le' - elif len(b) == 2: - if not b[0]: - # 00 XX - utf-16-be - return 'utf-16-be' - if not b[1]: - # XX 00 - utf-16-le - return 'utf-16-le' - # default - return 'utf-8' - - -def load(fp, *, cls=None, object_hook=None, parse_float=None, - parse_int=None, parse_constant=None, object_pairs_hook=None, **kw): - """Deserialize ``fp`` (a ``.read()``-supporting file-like object containing - a JSON document) to a Python object. - - ``object_hook`` is an optional function that will be called with the - result of any object literal decode (a ``dict``). The return value of - ``object_hook`` will be used instead of the ``dict``. This feature - can be used to implement custom decoders (e.g. JSON-RPC class hinting). - - ``object_pairs_hook`` is an optional function that will be called with - the result of any object literal decoded with an ordered list of pairs. - The return value of ``object_pairs_hook`` will be used instead of the - ``dict``. This feature can be used to implement custom decoders. If - ``object_hook`` is also defined, the ``object_pairs_hook`` takes - priority. - - To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` - kwarg; otherwise ``JSONDecoder`` is used. - """ - return loads(fp.read(), - cls=cls, object_hook=object_hook, - parse_float=parse_float, parse_int=parse_int, - parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) - - -def loads(s, *, cls=None, object_hook=None, parse_float=None, - parse_int=None, parse_constant=None, object_pairs_hook=None, **kw): - """Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance - containing a JSON document) to a Python object. - - ``object_hook`` is an optional function that will be called with the - result of any object literal decode (a ``dict``). The return value of - ``object_hook`` will be used instead of the ``dict``. This feature - can be used to implement custom decoders (e.g. JSON-RPC class hinting). - - ``object_pairs_hook`` is an optional function that will be called with - the result of any object literal decoded with an ordered list of pairs. - The return value of ``object_pairs_hook`` will be used instead of the - ``dict``. This feature can be used to implement custom decoders. If - ``object_hook`` is also defined, the ``object_pairs_hook`` takes - priority. - - ``parse_float``, if specified, will be called with the string - of every JSON float to be decoded. By default this is equivalent to - float(num_str). This can be used to use another datatype or parser - for JSON floats (e.g. decimal.Decimal). - - ``parse_int``, if specified, will be called with the string - of every JSON int to be decoded. By default this is equivalent to - int(num_str). This can be used to use another datatype or parser - for JSON integers (e.g. float). - - ``parse_constant``, if specified, will be called with one of the - following strings: -Infinity, Infinity, NaN. - This can be used to raise an exception if invalid JSON numbers - are encountered. - - To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` - kwarg; otherwise ``JSONDecoder`` is used. - """ - if isinstance(s, str): - if s.startswith('\ufeff'): - raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)", - s, 0) - else: - if not isinstance(s, (bytes, bytearray)): - raise TypeError(f'the JSON object must be str, bytes or bytearray, ' - f'not {s.__class__.__name__}') - s = s.decode(detect_encoding(s), 'surrogatepass') - - if (cls is None and object_hook is None and - parse_int is None and parse_float is None and - parse_constant is None and object_pairs_hook is None and not kw): - return _default_decoder.decode(s) - if cls is None: - cls = JSONDecoder - if object_hook is not None: - kw['object_hook'] = object_hook - if object_pairs_hook is not None: - kw['object_pairs_hook'] = object_pairs_hook - if parse_float is not None: - kw['parse_float'] = parse_float - if parse_int is not None: - kw['parse_int'] = parse_int - if parse_constant is not None: - kw['parse_constant'] = parse_constant - return cls(**kw).decode(s) diff --git a/Python314_4_x64_Template/Lib/json/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/json/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 865f33ba7..000000000 Binary files a/Python314_4_x64_Template/Lib/json/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/json/__pycache__/scanner.cpython-314.pyc b/Python314_4_x64_Template/Lib/json/__pycache__/scanner.cpython-314.pyc deleted file mode 100644 index 765deeb93..000000000 Binary files a/Python314_4_x64_Template/Lib/json/__pycache__/scanner.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/logging/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/logging/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index d3d5ff001..000000000 Binary files a/Python314_4_x64_Template/Lib/logging/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/multiprocessing/connection.py b/Python314_4_x64_Template/Lib/multiprocessing/connection.py deleted file mode 100644 index a6e1b0c78..000000000 --- a/Python314_4_x64_Template/Lib/multiprocessing/connection.py +++ /dev/null @@ -1,1229 +0,0 @@ -# -# A higher level module for using sockets (or Windows named pipes) -# -# multiprocessing/connection.py -# -# Copyright (c) 2006-2008, R Oudkerk -# Licensed to PSF under a Contributor Agreement. -# - -__all__ = [ 'Client', 'Listener', 'Pipe', 'wait' ] - -import errno -import io -import itertools -import os -import sys -import socket -import struct -import tempfile -import time - - -from . import util - -from . import AuthenticationError, BufferTooShort -from .context import reduction -_ForkingPickler = reduction.ForkingPickler - -try: - import _multiprocessing - import _winapi - from _winapi import WAIT_OBJECT_0, WAIT_ABANDONED_0, WAIT_TIMEOUT, INFINITE -except ImportError: - if sys.platform == 'win32': - raise - _winapi = None - -# -# -# - -# 64 KiB is the default PIPE buffer size of most POSIX platforms. -BUFSIZE = 64 * 1024 - -# A very generous timeout when it comes to local connections... -CONNECTION_TIMEOUT = 20. - -_mmap_counter = itertools.count() -_MAX_PIPE_ATTEMPTS = 100 - -default_family = 'AF_INET' -families = ['AF_INET'] - -if hasattr(socket, 'AF_UNIX'): - default_family = 'AF_UNIX' - families += ['AF_UNIX'] - -if sys.platform == 'win32': - default_family = 'AF_PIPE' - families += ['AF_PIPE'] - - -def _init_timeout(timeout=CONNECTION_TIMEOUT): - return time.monotonic() + timeout - -def _check_timeout(t): - return time.monotonic() > t - -# -# -# - -def arbitrary_address(family): - ''' - Return an arbitrary free address for the given family - ''' - if family == 'AF_INET': - return ('localhost', 0) - elif family == 'AF_UNIX': - return tempfile.mktemp(prefix='sock-', dir=util.get_temp_dir()) - elif family == 'AF_PIPE': - return (r'\\.\pipe\pyc-%d-%d-%s' % - (os.getpid(), next(_mmap_counter), os.urandom(8).hex())) - else: - raise ValueError('unrecognized family') - -def _validate_family(family): - ''' - Checks if the family is valid for the current environment. - ''' - if sys.platform != 'win32' and family == 'AF_PIPE': - raise ValueError('Family %s is not recognized.' % family) - - if sys.platform == 'win32' and family == 'AF_UNIX': - # double check - if not hasattr(socket, family): - raise ValueError('Family %s is not recognized.' % family) - -def address_type(address): - ''' - Return the types of the address - - This can be 'AF_INET', 'AF_UNIX', or 'AF_PIPE' - ''' - if type(address) == tuple: - return 'AF_INET' - elif type(address) is str and address.startswith('\\\\'): - return 'AF_PIPE' - elif type(address) is str or util.is_abstract_socket_namespace(address): - return 'AF_UNIX' - else: - raise ValueError('address type of %r unrecognized' % address) - -# -# Connection classes -# - -class _ConnectionBase: - _handle = None - - def __init__(self, handle, readable=True, writable=True): - handle = handle.__index__() - if handle < 0: - raise ValueError("invalid handle") - if not readable and not writable: - raise ValueError( - "at least one of `readable` and `writable` must be True") - self._handle = handle - self._readable = readable - self._writable = writable - - # XXX should we use util.Finalize instead of a __del__? - - def __del__(self): - if self._handle is not None: - self._close() - - def _check_closed(self): - if self._handle is None: - raise OSError("handle is closed") - - def _check_readable(self): - if not self._readable: - raise OSError("connection is write-only") - - def _check_writable(self): - if not self._writable: - raise OSError("connection is read-only") - - def _bad_message_length(self): - if self._writable: - self._readable = False - else: - self.close() - raise OSError("bad message length") - - @property - def closed(self): - """True if the connection is closed""" - return self._handle is None - - @property - def readable(self): - """True if the connection is readable""" - return self._readable - - @property - def writable(self): - """True if the connection is writable""" - return self._writable - - def fileno(self): - """File descriptor or handle of the connection""" - self._check_closed() - return self._handle - - def close(self): - """Close the connection""" - if self._handle is not None: - try: - self._close() - finally: - self._handle = None - - def _detach(self): - """Stop managing the underlying file descriptor or handle.""" - self._handle = None - - def send_bytes(self, buf, offset=0, size=None): - """Send the bytes data from a bytes-like object""" - self._check_closed() - self._check_writable() - m = memoryview(buf) - if m.itemsize > 1: - m = m.cast('B') - n = m.nbytes - if offset < 0: - raise ValueError("offset is negative") - if n < offset: - raise ValueError("buffer length < offset") - if size is None: - size = n - offset - elif size < 0: - raise ValueError("size is negative") - elif offset + size > n: - raise ValueError("buffer length < offset + size") - self._send_bytes(m[offset:offset + size]) - - def send(self, obj): - """Send a (picklable) object""" - self._check_closed() - self._check_writable() - self._send_bytes(_ForkingPickler.dumps(obj)) - - def recv_bytes(self, maxlength=None): - """ - Receive bytes data as a bytes object. - """ - self._check_closed() - self._check_readable() - if maxlength is not None and maxlength < 0: - raise ValueError("negative maxlength") - buf = self._recv_bytes(maxlength) - if buf is None: - self._bad_message_length() - return buf.getvalue() - - def recv_bytes_into(self, buf, offset=0): - """ - Receive bytes data into a writeable bytes-like object. - Return the number of bytes read. - """ - self._check_closed() - self._check_readable() - with memoryview(buf) as m: - # Get bytesize of arbitrary buffer - itemsize = m.itemsize - bytesize = itemsize * len(m) - if offset < 0: - raise ValueError("negative offset") - elif offset > bytesize: - raise ValueError("offset too large") - result = self._recv_bytes() - size = result.tell() - if bytesize < offset + size: - raise BufferTooShort(result.getvalue()) - # Message can fit in dest - result.seek(0) - result.readinto(m[offset // itemsize : - (offset + size) // itemsize]) - return size - - def recv(self): - """Receive a (picklable) object""" - self._check_closed() - self._check_readable() - buf = self._recv_bytes() - return _ForkingPickler.loads(buf.getbuffer()) - - def poll(self, timeout=0.0): - """Whether there is any input available to be read""" - self._check_closed() - self._check_readable() - return self._poll(timeout) - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, exc_tb): - self.close() - - -if _winapi: - - class PipeConnection(_ConnectionBase): - """ - Connection class based on a Windows named pipe. - Overlapped I/O is used, so the handles must have been created - with FILE_FLAG_OVERLAPPED. - """ - _got_empty_message = False - _send_ov = None - - def _close(self, _CloseHandle=_winapi.CloseHandle): - ov = self._send_ov - if ov is not None: - # Interrupt WaitForMultipleObjects() in _send_bytes() - ov.cancel() - _CloseHandle(self._handle) - - def _send_bytes(self, buf): - if self._send_ov is not None: - # A connection should only be used by a single thread - raise ValueError("concurrent send_bytes() calls " - "are not supported") - ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True) - self._send_ov = ov - try: - if err == _winapi.ERROR_IO_PENDING: - waitres = _winapi.WaitForMultipleObjects( - [ov.event], False, INFINITE) - assert waitres == WAIT_OBJECT_0 - except: - ov.cancel() - raise - finally: - self._send_ov = None - nwritten, err = ov.GetOverlappedResult(True) - if err == _winapi.ERROR_OPERATION_ABORTED: - # close() was called by another thread while - # WaitForMultipleObjects() was waiting for the overlapped - # operation. - raise OSError(errno.EPIPE, "handle is closed") - assert err == 0 - assert nwritten == len(buf) - - def _recv_bytes(self, maxsize=None): - if self._got_empty_message: - self._got_empty_message = False - return io.BytesIO() - else: - bsize = 128 if maxsize is None else min(maxsize, 128) - try: - ov, err = _winapi.ReadFile(self._handle, bsize, - overlapped=True) - - sentinel = object() - return_value = sentinel - try: - try: - if err == _winapi.ERROR_IO_PENDING: - waitres = _winapi.WaitForMultipleObjects( - [ov.event], False, INFINITE) - assert waitres == WAIT_OBJECT_0 - except: - ov.cancel() - raise - finally: - nread, err = ov.GetOverlappedResult(True) - if err == 0: - f = io.BytesIO() - f.write(ov.getbuffer()) - return_value = f - elif err == _winapi.ERROR_MORE_DATA: - return_value = self._get_more_data(ov, maxsize) - except: - if return_value is sentinel: - raise - - if return_value is not sentinel: - return return_value - except OSError as e: - if e.winerror == _winapi.ERROR_BROKEN_PIPE: - raise EOFError - else: - raise - raise RuntimeError("shouldn't get here; expected KeyboardInterrupt") - - def _poll(self, timeout): - if (self._got_empty_message or - _winapi.PeekNamedPipe(self._handle)[0] != 0): - return True - return bool(wait([self], timeout)) - - def _get_more_data(self, ov, maxsize): - buf = ov.getbuffer() - f = io.BytesIO() - f.write(buf) - left = _winapi.PeekNamedPipe(self._handle)[1] - assert left > 0 - if maxsize is not None and len(buf) + left > maxsize: - self._bad_message_length() - ov, err = _winapi.ReadFile(self._handle, left, overlapped=True) - rbytes, err = ov.GetOverlappedResult(True) - assert err == 0 - assert rbytes == left - f.write(ov.getbuffer()) - return f - - -class Connection(_ConnectionBase): - """ - Connection class based on an arbitrary file descriptor (Unix only), or - a socket handle (Windows). - """ - - if _winapi: - def _close(self, _close=_multiprocessing.closesocket): - _close(self._handle) - _write = _multiprocessing.send - _read = _multiprocessing.recv - else: - def _close(self, _close=os.close): - _close(self._handle) - _write = os.write - _read = os.read - - def _send(self, buf, write=_write): - remaining = len(buf) - while True: - n = write(self._handle, buf) - remaining -= n - if remaining == 0: - break - buf = buf[n:] - - def _recv(self, size, read=_read): - buf = io.BytesIO() - handle = self._handle - remaining = size - while remaining > 0: - to_read = min(BUFSIZE, remaining) - chunk = read(handle, to_read) - n = len(chunk) - if n == 0: - if remaining == size: - raise EOFError - else: - raise OSError("got end of file during message") - buf.write(chunk) - remaining -= n - return buf - - def _send_bytes(self, buf): - n = len(buf) - if n > 0x7fffffff: - pre_header = struct.pack("!i", -1) - header = struct.pack("!Q", n) - self._send(pre_header) - self._send(header) - self._send(buf) - else: - # For wire compatibility with 3.7 and lower - header = struct.pack("!i", n) - if n > 16384: - # The payload is large so Nagle's algorithm won't be triggered - # and we'd better avoid the cost of concatenation. - self._send(header) - self._send(buf) - else: - # Issue #20540: concatenate before sending, to avoid delays due - # to Nagle's algorithm on a TCP socket. - # Also note we want to avoid sending a 0-length buffer separately, - # to avoid "broken pipe" errors if the other end closed the pipe. - self._send(header + buf) - - def _recv_bytes(self, maxsize=None): - buf = self._recv(4) - size, = struct.unpack("!i", buf.getvalue()) - if size == -1: - buf = self._recv(8) - size, = struct.unpack("!Q", buf.getvalue()) - if maxsize is not None and size > maxsize: - return None - return self._recv(size) - - def _poll(self, timeout): - r = wait([self], timeout) - return bool(r) - - -# -# Public functions -# - -class Listener(object): - ''' - Returns a listener object. - - This is a wrapper for a bound socket which is 'listening' for - connections, or for a Windows named pipe. - ''' - def __init__(self, address=None, family=None, backlog=1, authkey=None): - family = family or (address and address_type(address)) \ - or default_family - _validate_family(family) - if authkey is not None and not isinstance(authkey, bytes): - raise TypeError('authkey should be a byte string') - - if family == 'AF_PIPE': - if address: - self._listener = PipeListener(address, backlog) - else: - for attempts in itertools.count(): - address = arbitrary_address(family) - try: - self._listener = PipeListener(address, backlog) - break - except OSError as e: - if attempts >= _MAX_PIPE_ATTEMPTS: - raise - if e.winerror not in (_winapi.ERROR_PIPE_BUSY, - _winapi.ERROR_ACCESS_DENIED): - raise - else: - address = address or arbitrary_address(family) - self._listener = SocketListener(address, family, backlog) - - self._authkey = authkey - - def accept(self): - ''' - Accept a connection on the bound socket or named pipe of `self`. - - Returns a `Connection` object. - ''' - if self._listener is None: - raise OSError('listener is closed') - - c = self._listener.accept() - if self._authkey is not None: - deliver_challenge(c, self._authkey) - answer_challenge(c, self._authkey) - return c - - def close(self): - ''' - Close the bound socket or named pipe of `self`. - ''' - listener = self._listener - if listener is not None: - self._listener = None - listener.close() - - @property - def address(self): - return self._listener._address - - @property - def last_accepted(self): - return self._listener._last_accepted - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, exc_tb): - self.close() - - -def Client(address, family=None, authkey=None): - ''' - Returns a connection to the address of a `Listener` - ''' - family = family or address_type(address) - _validate_family(family) - if family == 'AF_PIPE': - c = PipeClient(address) - else: - c = SocketClient(address) - - if authkey is not None and not isinstance(authkey, bytes): - raise TypeError('authkey should be a byte string') - - if authkey is not None: - answer_challenge(c, authkey) - deliver_challenge(c, authkey) - - return c - - -if sys.platform != 'win32': - - def Pipe(duplex=True): - ''' - Returns pair of connection objects at either end of a pipe - ''' - if duplex: - s1, s2 = socket.socketpair() - s1.setblocking(True) - s2.setblocking(True) - c1 = Connection(s1.detach()) - c2 = Connection(s2.detach()) - else: - fd1, fd2 = os.pipe() - c1 = Connection(fd1, writable=False) - c2 = Connection(fd2, readable=False) - - return c1, c2 - -else: - - def Pipe(duplex=True): - ''' - Returns pair of connection objects at either end of a pipe - ''' - if duplex: - openmode = _winapi.PIPE_ACCESS_DUPLEX - access = _winapi.GENERIC_READ | _winapi.GENERIC_WRITE - obsize, ibsize = BUFSIZE, BUFSIZE - else: - openmode = _winapi.PIPE_ACCESS_INBOUND - access = _winapi.GENERIC_WRITE - obsize, ibsize = 0, BUFSIZE - - for attempts in itertools.count(): - address = arbitrary_address('AF_PIPE') - try: - h1 = _winapi.CreateNamedPipe( - address, openmode | _winapi.FILE_FLAG_OVERLAPPED | - _winapi.FILE_FLAG_FIRST_PIPE_INSTANCE, - _winapi.PIPE_TYPE_MESSAGE | _winapi.PIPE_READMODE_MESSAGE | - _winapi.PIPE_WAIT, - 1, obsize, ibsize, _winapi.NMPWAIT_WAIT_FOREVER, - # default security descriptor: the handle cannot be inherited - _winapi.NULL - ) - break - except OSError as e: - if attempts >= _MAX_PIPE_ATTEMPTS: - raise - if e.winerror not in (_winapi.ERROR_PIPE_BUSY, - _winapi.ERROR_ACCESS_DENIED): - raise - h2 = _winapi.CreateFile( - address, access, 0, _winapi.NULL, _winapi.OPEN_EXISTING, - _winapi.FILE_FLAG_OVERLAPPED, _winapi.NULL - ) - _winapi.SetNamedPipeHandleState( - h2, _winapi.PIPE_READMODE_MESSAGE, None, None - ) - - overlapped = _winapi.ConnectNamedPipe(h1, overlapped=True) - _, err = overlapped.GetOverlappedResult(True) - assert err == 0 - - c1 = PipeConnection(h1, writable=duplex) - c2 = PipeConnection(h2, readable=duplex) - - return c1, c2 - -# -# Definitions for connections based on sockets -# - -class SocketListener(object): - ''' - Representation of a socket which is bound to an address and listening - ''' - def __init__(self, address, family, backlog=1): - self._socket = socket.socket(getattr(socket, family)) - try: - # SO_REUSEADDR has different semantics on Windows (issue #2550). - if os.name == 'posix': - self._socket.setsockopt(socket.SOL_SOCKET, - socket.SO_REUSEADDR, 1) - self._socket.setblocking(True) - self._socket.bind(address) - self._socket.listen(backlog) - self._address = self._socket.getsockname() - except OSError: - self._socket.close() - raise - self._family = family - self._last_accepted = None - - if family == 'AF_UNIX' and not util.is_abstract_socket_namespace(address): - # Linux abstract socket namespaces do not need to be explicitly unlinked - self._unlink = util.Finalize( - self, os.unlink, args=(address,), exitpriority=0 - ) - else: - self._unlink = None - - def accept(self): - s, self._last_accepted = self._socket.accept() - s.setblocking(True) - return Connection(s.detach()) - - def close(self): - try: - self._socket.close() - finally: - unlink = self._unlink - if unlink is not None: - self._unlink = None - unlink() - - -def SocketClient(address): - ''' - Return a connection object connected to the socket given by `address` - ''' - family = address_type(address) - with socket.socket( getattr(socket, family) ) as s: - s.setblocking(True) - s.connect(address) - return Connection(s.detach()) - -# -# Definitions for connections based on named pipes -# - -if sys.platform == 'win32': - - class PipeListener(object): - ''' - Representation of a named pipe - ''' - def __init__(self, address, backlog=None): - self._address = address - self._handle_queue = [self._new_handle(first=True)] - - self._last_accepted = None - util.sub_debug('listener created with address=%r', self._address) - self.close = util.Finalize( - self, PipeListener._finalize_pipe_listener, - args=(self._handle_queue, self._address), exitpriority=0 - ) - - def _new_handle(self, first=False): - flags = _winapi.PIPE_ACCESS_DUPLEX | _winapi.FILE_FLAG_OVERLAPPED - if first: - flags |= _winapi.FILE_FLAG_FIRST_PIPE_INSTANCE - return _winapi.CreateNamedPipe( - self._address, flags, - _winapi.PIPE_TYPE_MESSAGE | _winapi.PIPE_READMODE_MESSAGE | - _winapi.PIPE_WAIT, - _winapi.PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE, - _winapi.NMPWAIT_WAIT_FOREVER, _winapi.NULL - ) - - def accept(self): - self._handle_queue.append(self._new_handle()) - handle = self._handle_queue.pop(0) - try: - ov = _winapi.ConnectNamedPipe(handle, overlapped=True) - except OSError as e: - if e.winerror != _winapi.ERROR_NO_DATA: - raise - # ERROR_NO_DATA can occur if a client has already connected, - # written data and then disconnected -- see Issue 14725. - else: - try: - res = _winapi.WaitForMultipleObjects( - [ov.event], False, INFINITE) - except: - ov.cancel() - _winapi.CloseHandle(handle) - raise - finally: - _, err = ov.GetOverlappedResult(True) - assert err == 0 - return PipeConnection(handle) - - @staticmethod - def _finalize_pipe_listener(queue, address): - util.sub_debug('closing listener with address=%r', address) - for handle in queue: - _winapi.CloseHandle(handle) - - def PipeClient(address): - ''' - Return a connection object connected to the pipe given by `address` - ''' - t = _init_timeout() - while 1: - try: - _winapi.WaitNamedPipe(address, 1000) - h = _winapi.CreateFile( - address, _winapi.GENERIC_READ | _winapi.GENERIC_WRITE, - 0, _winapi.NULL, _winapi.OPEN_EXISTING, - _winapi.FILE_FLAG_OVERLAPPED, _winapi.NULL - ) - except OSError as e: - if e.winerror not in (_winapi.ERROR_SEM_TIMEOUT, - _winapi.ERROR_PIPE_BUSY) or _check_timeout(t): - raise - else: - break - else: - raise - - _winapi.SetNamedPipeHandleState( - h, _winapi.PIPE_READMODE_MESSAGE, None, None - ) - return PipeConnection(h) - -# -# Authentication stuff -# - -MESSAGE_LENGTH = 40 # MUST be > 20 - -_CHALLENGE = b'#CHALLENGE#' -_WELCOME = b'#WELCOME#' -_FAILURE = b'#FAILURE#' - -# multiprocessing.connection Authentication Handshake Protocol Description -# (as documented for reference after reading the existing code) -# ============================================================================= -# -# On Windows: native pipes with "overlapped IO" are used to send the bytes, -# instead of the length prefix SIZE scheme described below. (ie: the OS deals -# with message sizes for us) -# -# Protocol error behaviors: -# -# On POSIX, any failure to receive the length prefix into SIZE, for SIZE greater -# than the requested maxsize to receive, or receiving fewer than SIZE bytes -# results in the connection being closed and auth to fail. -# -# On Windows, receiving too few bytes is never a low level _recv_bytes read -# error, receiving too many will trigger an error only if receive maxsize -# value was larger than 128 OR the if the data arrived in smaller pieces. -# -# Serving side Client side -# ------------------------------ --------------------------------------- -# 0. Open a connection on the pipe. -# 1. Accept connection. -# 2. Random 20+ bytes -> MESSAGE -# Modern servers always send -# more than 20 bytes and include -# a {digest} prefix on it with -# their preferred HMAC digest. -# Legacy ones send ==20 bytes. -# 3. send 4 byte length (net order) -# prefix followed by: -# b'#CHALLENGE#' + MESSAGE -# 4. Receive 4 bytes, parse as network byte -# order integer. If it is -1, receive an -# additional 8 bytes, parse that as network -# byte order. The result is the length of -# the data that follows -> SIZE. -# 5. Receive min(SIZE, 256) bytes -> M1 -# 6. Assert that M1 starts with: -# b'#CHALLENGE#' -# 7. Strip that prefix from M1 into -> M2 -# 7.1. Parse M2: if it is exactly 20 bytes in -# length this indicates a legacy server -# supporting only HMAC-MD5. Otherwise the -# 7.2. preferred digest is looked up from an -# expected "{digest}" prefix on M2. No prefix -# or unsupported digest? <- AuthenticationError -# 7.3. Put divined algorithm name in -> D_NAME -# 8. Compute HMAC-D_NAME of AUTHKEY, M2 -> C_DIGEST -# 9. Send 4 byte length prefix (net order) -# followed by C_DIGEST bytes. -# 10. Receive 4 or 4+8 byte length -# prefix (#4 dance) -> SIZE. -# 11. Receive min(SIZE, 256) -> C_D. -# 11.1. Parse C_D: legacy servers -# accept it as is, "md5" -> D_NAME -# 11.2. modern servers check the length -# of C_D, IF it is 16 bytes? -# 11.2.1. "md5" -> D_NAME -# and skip to step 12. -# 11.3. longer? expect and parse a "{digest}" -# prefix into -> D_NAME. -# Strip the prefix and store remaining -# bytes in -> C_D. -# 11.4. Don't like D_NAME? <- AuthenticationError -# 12. Compute HMAC-D_NAME of AUTHKEY, -# MESSAGE into -> M_DIGEST. -# 13. Compare M_DIGEST == C_D: -# 14a: Match? Send length prefix & -# b'#WELCOME#' -# <- RETURN -# 14b: Mismatch? Send len prefix & -# b'#FAILURE#' -# <- CLOSE & AuthenticationError -# 15. Receive 4 or 4+8 byte length prefix (net -# order) again as in #4 into -> SIZE. -# 16. Receive min(SIZE, 256) bytes -> M3. -# 17. Compare M3 == b'#WELCOME#': -# 17a. Match? <- RETURN -# 17b. Mismatch? <- CLOSE & AuthenticationError -# -# If this RETURNed, the connection remains open: it has been authenticated. -# -# Length prefixes are used consistently. Even on the legacy protocol, this -# was good fortune and allowed us to evolve the protocol by using the length -# of the opening challenge or length of the returned digest as a signal as -# to which protocol the other end supports. - -_ALLOWED_DIGESTS = frozenset( - {b'md5', b'sha256', b'sha384', b'sha3_256', b'sha3_384'}) -_MAX_DIGEST_LEN = max(len(_) for _ in _ALLOWED_DIGESTS) - -# Old hmac-md5 only server versions from Python <=3.11 sent a message of this -# length. It happens to not match the length of any supported digest so we can -# use a message of this length to indicate that we should work in backwards -# compatible md5-only mode without a {digest_name} prefix on our response. -_MD5ONLY_MESSAGE_LENGTH = 20 -_MD5_DIGEST_LEN = 16 -_LEGACY_LENGTHS = (_MD5ONLY_MESSAGE_LENGTH, _MD5_DIGEST_LEN) - - -def _get_digest_name_and_payload(message): # type: (bytes) -> tuple[str, bytes] - """Returns a digest name and the payload for a response hash. - - If a legacy protocol is detected based on the message length - or contents the digest name returned will be empty to indicate - legacy mode where MD5 and no digest prefix should be sent. - """ - # modern message format: b"{digest}payload" longer than 20 bytes - # legacy message format: 16 or 20 byte b"payload" - if len(message) in _LEGACY_LENGTHS: - # Either this was a legacy server challenge, or we're processing - # a reply from a legacy client that sent an unprefixed 16-byte - # HMAC-MD5 response. All messages using the modern protocol will - # be longer than either of these lengths. - return '', message - if (message.startswith(b'{') and - (curly := message.find(b'}', 1, _MAX_DIGEST_LEN+2)) > 0): - digest = message[1:curly] - if digest in _ALLOWED_DIGESTS: - payload = message[curly+1:] - return digest.decode('ascii'), payload - raise AuthenticationError( - 'unsupported message length, missing digest prefix, ' - f'or unsupported digest: {message=}') - - -def _create_response(authkey, message): - """Create a MAC based on authkey and message - - The MAC algorithm defaults to HMAC-MD5, unless MD5 is not available or - the message has a '{digest_name}' prefix. For legacy HMAC-MD5, the response - is the raw MAC, otherwise the response is prefixed with '{digest_name}', - e.g. b'{sha256}abcdefg...' - - Note: The MAC protects the entire message including the digest_name prefix. - """ - import hmac - digest_name = _get_digest_name_and_payload(message)[0] - # The MAC protects the entire message: digest header and payload. - if not digest_name: - # Legacy server without a {digest} prefix on message. - # Generate a legacy non-prefixed HMAC-MD5 reply. - try: - return hmac.new(authkey, message, 'md5').digest() - except ValueError: - # HMAC-MD5 is not available (FIPS mode?), fall back to - # HMAC-SHA2-256 modern protocol. The legacy server probably - # doesn't support it and will reject us anyways. :shrug: - digest_name = 'sha256' - # Modern protocol, indicate the digest used in the reply. - response = hmac.new(authkey, message, digest_name).digest() - return b'{%s}%s' % (digest_name.encode('ascii'), response) - - -def _verify_challenge(authkey, message, response): - """Verify MAC challenge - - If our message did not include a digest_name prefix, the client is allowed - to select a stronger digest_name from _ALLOWED_DIGESTS. - - In case our message is prefixed, a client cannot downgrade to a weaker - algorithm, because the MAC is calculated over the entire message - including the '{digest_name}' prefix. - """ - import hmac - response_digest, response_mac = _get_digest_name_and_payload(response) - response_digest = response_digest or 'md5' - try: - expected = hmac.new(authkey, message, response_digest).digest() - except ValueError: - raise AuthenticationError(f'{response_digest=} unsupported') - if len(expected) != len(response_mac): - raise AuthenticationError( - f'expected {response_digest!r} of length {len(expected)} ' - f'got {len(response_mac)}') - if not hmac.compare_digest(expected, response_mac): - raise AuthenticationError('digest received was wrong') - - -def deliver_challenge(connection, authkey: bytes, digest_name='sha256'): - if not isinstance(authkey, bytes): - raise ValueError( - "Authkey must be bytes, not {0!s}".format(type(authkey))) - assert MESSAGE_LENGTH > _MD5ONLY_MESSAGE_LENGTH, "protocol constraint" - message = os.urandom(MESSAGE_LENGTH) - message = b'{%s}%s' % (digest_name.encode('ascii'), message) - # Even when sending a challenge to a legacy client that does not support - # digest prefixes, they'll take the entire thing as a challenge and - # respond to it with a raw HMAC-MD5. - connection.send_bytes(_CHALLENGE + message) - response = connection.recv_bytes(256) # reject large message - try: - _verify_challenge(authkey, message, response) - except AuthenticationError: - connection.send_bytes(_FAILURE) - raise - else: - connection.send_bytes(_WELCOME) - - -def answer_challenge(connection, authkey: bytes): - if not isinstance(authkey, bytes): - raise ValueError( - "Authkey must be bytes, not {0!s}".format(type(authkey))) - message = connection.recv_bytes(256) # reject large message - if not message.startswith(_CHALLENGE): - raise AuthenticationError( - f'Protocol error, expected challenge: {message=}') - message = message[len(_CHALLENGE):] - if len(message) < _MD5ONLY_MESSAGE_LENGTH: - raise AuthenticationError(f'challenge too short: {len(message)} bytes') - digest = _create_response(authkey, message) - connection.send_bytes(digest) - response = connection.recv_bytes(256) # reject large message - if response != _WELCOME: - raise AuthenticationError('digest sent was rejected') - -# -# Support for using xmlrpclib for serialization -# - -class ConnectionWrapper(object): - def __init__(self, conn, dumps, loads): - self._conn = conn - self._dumps = dumps - self._loads = loads - for attr in ('fileno', 'close', 'poll', 'recv_bytes', 'send_bytes'): - obj = getattr(conn, attr) - setattr(self, attr, obj) - def send(self, obj): - s = self._dumps(obj) - self._conn.send_bytes(s) - def recv(self): - s = self._conn.recv_bytes() - return self._loads(s) - -def _xml_dumps(obj): - return xmlrpclib.dumps((obj,), None, None, None, 1).encode('utf-8') - -def _xml_loads(s): - (obj,), method = xmlrpclib.loads(s.decode('utf-8')) - return obj - -class XmlListener(Listener): - def accept(self): - global xmlrpclib - import xmlrpc.client as xmlrpclib - obj = Listener.accept(self) - return ConnectionWrapper(obj, _xml_dumps, _xml_loads) - -def XmlClient(*args, **kwds): - global xmlrpclib - import xmlrpc.client as xmlrpclib - return ConnectionWrapper(Client(*args, **kwds), _xml_dumps, _xml_loads) - -# -# Wait -# - -if sys.platform == 'win32': - - def _exhaustive_wait(handles, timeout): - # Return ALL handles which are currently signalled. (Only - # returning the first signalled might create starvation issues.) - L = list(handles) - ready = [] - # Windows limits WaitForMultipleObjects at 64 handles, and we use a - # few for synchronisation, so we switch to batched waits at 60. - if len(L) > 60: - try: - res = _winapi.BatchedWaitForMultipleObjects(L, False, timeout) - except TimeoutError: - return [] - ready.extend(L[i] for i in res) - if res: - L = [h for i, h in enumerate(L) if i > res[0] & i not in res] - timeout = 0 - while L: - short_L = L[:60] if len(L) > 60 else L - res = _winapi.WaitForMultipleObjects(short_L, False, timeout) - if res == WAIT_TIMEOUT: - break - elif WAIT_OBJECT_0 <= res < WAIT_OBJECT_0 + len(L): - res -= WAIT_OBJECT_0 - elif WAIT_ABANDONED_0 <= res < WAIT_ABANDONED_0 + len(L): - res -= WAIT_ABANDONED_0 - else: - raise RuntimeError('Should not get here') - ready.append(L[res]) - L = L[res+1:] - timeout = 0 - return ready - - _ready_errors = {_winapi.ERROR_BROKEN_PIPE, _winapi.ERROR_NETNAME_DELETED} - - def wait(object_list, timeout=None): - ''' - Wait till an object in object_list is ready/readable. - - Returns list of those objects in object_list which are ready/readable. - ''' - if timeout is None: - timeout = INFINITE - elif timeout < 0: - timeout = 0 - else: - timeout = int(timeout * 1000 + 0.5) - - object_list = list(object_list) - waithandle_to_obj = {} - ov_list = [] - ready_objects = set() - ready_handles = set() - - try: - for o in object_list: - try: - fileno = getattr(o, 'fileno') - except AttributeError: - waithandle_to_obj[o.__index__()] = o - else: - # start an overlapped read of length zero - try: - ov, err = _winapi.ReadFile(fileno(), 0, True) - except OSError as e: - ov, err = None, e.winerror - if err not in _ready_errors: - raise - if err == _winapi.ERROR_IO_PENDING: - ov_list.append(ov) - waithandle_to_obj[ov.event] = o - else: - # If o.fileno() is an overlapped pipe handle and - # err == 0 then there is a zero length message - # in the pipe, but it HAS NOT been consumed... - if ov and sys.getwindowsversion()[:2] >= (6, 2): - # ... except on Windows 8 and later, where - # the message HAS been consumed. - try: - _, err = ov.GetOverlappedResult(False) - except OSError as e: - err = e.winerror - if not err and hasattr(o, '_got_empty_message'): - o._got_empty_message = True - ready_objects.add(o) - timeout = 0 - - ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout) - finally: - # request that overlapped reads stop - for ov in ov_list: - ov.cancel() - - # wait for all overlapped reads to stop - for ov in ov_list: - try: - _, err = ov.GetOverlappedResult(True) - except OSError as e: - err = e.winerror - if err not in _ready_errors: - raise - if err != _winapi.ERROR_OPERATION_ABORTED: - o = waithandle_to_obj[ov.event] - ready_objects.add(o) - if err == 0: - # If o.fileno() is an overlapped pipe handle then - # a zero length message HAS been consumed. - if hasattr(o, '_got_empty_message'): - o._got_empty_message = True - - ready_objects.update(waithandle_to_obj[h] for h in ready_handles) - return [o for o in object_list if o in ready_objects] - -else: - - import selectors - - # poll/select have the advantage of not requiring any extra file - # descriptor, contrarily to epoll/kqueue (also, they require a single - # syscall). - if hasattr(selectors, 'PollSelector'): - _WaitSelector = selectors.PollSelector - else: - _WaitSelector = selectors.SelectSelector - - def wait(object_list, timeout=None): - ''' - Wait till an object in object_list is ready/readable. - - Returns list of those objects in object_list which are ready/readable. - ''' - with _WaitSelector() as selector: - for obj in object_list: - selector.register(obj, selectors.EVENT_READ) - - if timeout is not None: - deadline = time.monotonic() + timeout - - while True: - ready = selector.select(timeout) - if ready: - return [key.fileobj for (key, events) in ready] - else: - if timeout is not None: - timeout = deadline - time.monotonic() - if timeout < 0: - return ready - -# -# Make connection and socket objects shareable if possible -# - -if sys.platform == 'win32': - def reduce_connection(conn): - handle = conn.fileno() - with socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM) as s: - from . import resource_sharer - ds = resource_sharer.DupSocket(s) - return rebuild_connection, (ds, conn.readable, conn.writable) - def rebuild_connection(ds, readable, writable): - sock = ds.detach() - return Connection(sock.detach(), readable, writable) - reduction.register(Connection, reduce_connection) - - def reduce_pipe_connection(conn): - access = ((_winapi.FILE_GENERIC_READ if conn.readable else 0) | - (_winapi.FILE_GENERIC_WRITE if conn.writable else 0)) - dh = reduction.DupHandle(conn.fileno(), access) - return rebuild_pipe_connection, (dh, conn.readable, conn.writable) - def rebuild_pipe_connection(dh, readable, writable): - handle = dh.detach() - return PipeConnection(handle, readable, writable) - reduction.register(PipeConnection, reduce_pipe_connection) - -else: - def reduce_connection(conn): - df = reduction.DupFd(conn.fileno()) - return rebuild_connection, (df, conn.readable, conn.writable) - def rebuild_connection(df, readable, writable): - fd = df.detach() - return Connection(fd, readable, writable) - reduction.register(Connection, reduce_connection) diff --git a/Python314_4_x64_Template/Lib/pathlib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/pathlib/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 62cfc0e3c..000000000 Binary files a/Python314_4_x64_Template/Lib/pathlib/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/re/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/re/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index ce0ccb502..000000000 Binary files a/Python314_4_x64_Template/Lib/re/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/re/__pycache__/_parser.cpython-314.pyc b/Python314_4_x64_Template/Lib/re/__pycache__/_parser.cpython-314.pyc deleted file mode 100644 index 0565794a8..000000000 Binary files a/Python314_4_x64_Template/Lib/re/__pycache__/_parser.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt b/Python314_4_x64_Template/Lib/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt deleted file mode 100644 index b9723b85e..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2024-present Stephen Rosen - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Python314_4_x64_Template/Lib/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt b/Python314_4_x64_Template/Lib/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt deleted file mode 100644 index 429a1767e..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2008-2020 Andrey Petrov and contributors (see CONTRIBUTORS.txt) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/__init__.py deleted file mode 100644 index 978b41292..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -from __future__ import annotations - -__version__ = "26.0.1" - - -def main(args: list[str] | None = None) -> int: - """This is an internal API only meant for use by pip's own console scripts. - - For additional details, see https://github.com/pypa/pip/issues/7498. - """ - from pip._internal.utils.entrypoints import _wrapper - - return _wrapper(args) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/__main__.py b/Python314_4_x64_Template/Lib/site-packages/pip/__main__.py deleted file mode 100644 index 599132611..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/__main__.py +++ /dev/null @@ -1,24 +0,0 @@ -import os -import sys - -# Remove '' and current working directory from the first entry -# of sys.path, if present to avoid using current directory -# in pip commands check, freeze, install, list and show, -# when invoked as python -m pip -if sys.path[0] in ("", os.getcwd()): - sys.path.pop(0) - -# If we are running from a wheel, add the wheel to sys.path -# This allows the usage python pip-*.whl/pip install pip-*.whl -if __package__ == "": - # __file__ is pip-*.whl/pip/__main__.py - # first dirname call strips of '/__main__.py', second strips off '/pip' - # Resulting path is the name of the wheel itself - # Add that to sys.path so we can import pip - path = os.path.dirname(os.path.dirname(__file__)) - sys.path.insert(0, path) - -if __name__ == "__main__": - from pip._internal.cli.main import main as _main - - sys.exit(_main()) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index d40b49838..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__main__.cpython-314.pyc deleted file mode 100644 index d9a1c52a4..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__main__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__pip-runner__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__pip-runner__.cpython-314.pyc deleted file mode 100644 index 80b69bb25..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/__pycache__/__pip-runner__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index df459bf26..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/cache.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/cache.cpython-314.pyc deleted file mode 100644 index e28b2fc2a..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/cache.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/configuration.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/configuration.cpython-314.pyc deleted file mode 100644 index fe4a4edcc..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/configuration.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/exceptions.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/exceptions.cpython-314.pyc deleted file mode 100644 index 951a25f28..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/exceptions.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/main.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/main.cpython-314.pyc deleted file mode 100644 index ec825c6a9..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/main.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-314.pyc deleted file mode 100644 index 156d6f2c4..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 42782d7dd..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-314.pyc deleted file mode 100644 index 8057681bf..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-314.pyc deleted file mode 100644 index 279dd42de..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-314.pyc deleted file mode 100644 index 08c8b907c..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-314.pyc deleted file mode 100644 index 89891b0fb..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/main.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/main.cpython-314.pyc deleted file mode 100644 index 44856bd49..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/main.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/parser.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/parser.cpython-314.pyc deleted file mode 100644 index fcc5937ed..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/parser.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-314.pyc deleted file mode 100644 index c443ec526..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-314.pyc deleted file mode 100644 index 26e431904..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 07ad6e7c7..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/cache.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/cache.cpython-314.pyc deleted file mode 100644 index 148d01ad7..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/cache.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/check.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/check.cpython-314.pyc deleted file mode 100644 index dc514730f..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/check.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-314.pyc deleted file mode 100644 index 6e88c7869..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/debug.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/debug.cpython-314.pyc deleted file mode 100644 index 6dded2413..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/debug.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/download.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/download.cpython-314.pyc deleted file mode 100644 index 6c16da718..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/download.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-314.pyc deleted file mode 100644 index 9af2305ed..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/help.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/help.cpython-314.pyc deleted file mode 100644 index ba0edef7d..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/help.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/index.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/index.cpython-314.pyc deleted file mode 100644 index fcc1af192..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/index.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-314.pyc deleted file mode 100644 index 13f3a0a16..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/install.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/install.cpython-314.pyc deleted file mode 100644 index 91f8ffdf0..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/install.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/list.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/list.cpython-314.pyc deleted file mode 100644 index c75272408..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/list.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-314.pyc deleted file mode 100644 index 8b2c7e7ab..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/inspect.py b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/inspect.py deleted file mode 100644 index e262012ee..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/commands/inspect.py +++ /dev/null @@ -1,92 +0,0 @@ -import logging -from optparse import Values -from typing import Any - -from pip._vendor.packaging.markers import default_environment -from pip._vendor.rich import print_json - -from pip import __version__ -from pip._internal.cli import cmdoptions -from pip._internal.cli.base_command import Command -from pip._internal.cli.status_codes import SUCCESS -from pip._internal.metadata import BaseDistribution, get_environment -from pip._internal.utils.compat import stdlib_pkgs -from pip._internal.utils.urls import path_to_url - -logger = logging.getLogger(__name__) - - -class InspectCommand(Command): - """ - Inspect the content of a Python environment and produce a report in JSON format. - """ - - ignore_require_venv = True - usage = """ - %prog [options]""" - - def add_options(self) -> None: - self.cmd_opts.add_option( - "--local", - action="store_true", - default=False, - help=( - "If in a virtualenv that has global access, do not list " - "globally-installed packages." - ), - ) - self.cmd_opts.add_option( - "--user", - dest="user", - action="store_true", - default=False, - help="Only output packages installed in user-site.", - ) - self.cmd_opts.add_option(cmdoptions.list_path()) - self.parser.insert_option_group(0, self.cmd_opts) - - def run(self, options: Values, args: list[str]) -> int: - cmdoptions.check_list_path_option(options) - dists = get_environment(options.path).iter_installed_distributions( - local_only=options.local, - user_only=options.user, - skip=set(stdlib_pkgs), - ) - output = { - "version": "1", - "pip_version": __version__, - "installed": [self._dist_to_dict(dist) for dist in dists], - "environment": default_environment(), - # TODO tags? scheme? - } - print_json(data=output) - return SUCCESS - - def _dist_to_dict(self, dist: BaseDistribution) -> dict[str, Any]: - res: dict[str, Any] = { - "metadata": dist.metadata_dict, - "metadata_location": dist.info_location, - } - # direct_url. Note that we don't have download_info (as in the installation - # report) since it is not recorded in installed metadata. - direct_url = dist.direct_url - if direct_url is not None: - res["direct_url"] = direct_url.to_dict() - else: - # Emulate direct_url for legacy editable installs. - editable_project_location = dist.editable_project_location - if editable_project_location is not None: - res["direct_url"] = { - "url": path_to_url(editable_project_location), - "dir_info": { - "editable": True, - }, - } - # installer - installer = dist.installer - if dist.installer: - res["installer"] = installer - # requested - if dist.installed_with_dist_info: - res["requested"] = dist.requested - return res diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 737c28e18..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/base.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/base.cpython-314.pyc deleted file mode 100644 index f98c7731a..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/base.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-314.pyc deleted file mode 100644 index c2b0722a2..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-314.pyc deleted file mode 100644 index d6d033899..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/exceptions.py b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/exceptions.py deleted file mode 100644 index 9ddda0e62..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/exceptions.py +++ /dev/null @@ -1,971 +0,0 @@ -"""Exceptions used throughout package. - -This module MUST NOT try to import from anything within `pip._internal` to -operate. This is expected to be importable from any/all files within the -subpackage and, thus, should not depend on them. -""" - -from __future__ import annotations - -import configparser -import contextlib -import locale -import logging -import pathlib -import re -import sys -import traceback -from collections.abc import Iterable, Iterator -from itertools import chain, groupby, repeat -from typing import TYPE_CHECKING, Literal - -from pip._vendor.packaging.requirements import InvalidRequirement -from pip._vendor.packaging.version import InvalidVersion -from pip._vendor.rich.console import Console, ConsoleOptions, RenderResult -from pip._vendor.rich.markup import escape -from pip._vendor.rich.text import Text - -if TYPE_CHECKING: - from hashlib import _Hash - - from pip._vendor.requests.models import PreparedRequest, Request, Response - - from pip._internal.metadata import BaseDistribution - from pip._internal.models.link import Link - from pip._internal.network.download import _FileDownload - from pip._internal.req.req_install import InstallRequirement - -logger = logging.getLogger(__name__) - - -# -# Scaffolding -# -def _is_kebab_case(s: str) -> bool: - return re.match(r"^[a-z]+(-[a-z]+)*$", s) is not None - - -def _prefix_with_indent( - s: Text | str, - console: Console, - *, - prefix: str, - indent: str, -) -> Text: - if isinstance(s, Text): - text = s - else: - text = console.render_str(s) - - return console.render_str(prefix, overflow="ignore") + console.render_str( - f"\n{indent}", overflow="ignore" - ).join(text.split(allow_blank=True)) - - -class PipError(Exception): - """The base pip error.""" - - -class DiagnosticPipError(PipError): - """An error, that presents diagnostic information to the user. - - This contains a bunch of logic, to enable pretty presentation of our error - messages. Each error gets a unique reference. Each error can also include - additional context, a hint and/or a note -- which are presented with the - main error message in a consistent style. - - This is adapted from the error output styling in `sphinx-theme-builder`. - """ - - reference: str - - def __init__( - self, - *, - kind: Literal["error", "warning"] = "error", - reference: str | None = None, - message: str | Text, - context: str | Text | None, - hint_stmt: str | Text | None, - note_stmt: str | Text | None = None, - link: str | None = None, - ) -> None: - # Ensure a proper reference is provided. - if reference is None: - assert hasattr(self, "reference"), "error reference not provided!" - reference = self.reference - assert _is_kebab_case(reference), "error reference must be kebab-case!" - - self.kind = kind - self.reference = reference - - self.message = message - self.context = context - - self.note_stmt = note_stmt - self.hint_stmt = hint_stmt - - self.link = link - - super().__init__(f"<{self.__class__.__name__}: {self.reference}>") - - def __repr__(self) -> str: - return ( - f"<{self.__class__.__name__}(" - f"reference={self.reference!r}, " - f"message={self.message!r}, " - f"context={self.context!r}, " - f"note_stmt={self.note_stmt!r}, " - f"hint_stmt={self.hint_stmt!r}" - ")>" - ) - - def __rich_console__( - self, - console: Console, - options: ConsoleOptions, - ) -> RenderResult: - colour = "red" if self.kind == "error" else "yellow" - - yield f"[{colour} bold]{self.kind}[/]: [bold]{self.reference}[/]" - yield "" - - if not options.ascii_only: - # Present the main message, with relevant context indented. - if self.context is not None: - yield _prefix_with_indent( - self.message, - console, - prefix=f"[{colour}]×[/] ", - indent=f"[{colour}]│[/] ", - ) - yield _prefix_with_indent( - self.context, - console, - prefix=f"[{colour}]╰─>[/] ", - indent=f"[{colour}] [/] ", - ) - else: - yield _prefix_with_indent( - self.message, - console, - prefix="[red]×[/] ", - indent=" ", - ) - else: - yield self.message - if self.context is not None: - yield "" - yield self.context - - if self.note_stmt is not None or self.hint_stmt is not None: - yield "" - - if self.note_stmt is not None: - yield _prefix_with_indent( - self.note_stmt, - console, - prefix="[magenta bold]note[/]: ", - indent=" ", - ) - if self.hint_stmt is not None: - yield _prefix_with_indent( - self.hint_stmt, - console, - prefix="[cyan bold]hint[/]: ", - indent=" ", - ) - - if self.link is not None: - yield "" - yield f"Link: {self.link}" - - -# -# Actual Errors -# -class ConfigurationError(PipError): - """General exception in configuration""" - - -class InstallationError(PipError): - """General exception during installation""" - - -class FailedToPrepareCandidate(InstallationError): - """Raised when we fail to prepare a candidate (i.e. fetch and generate metadata). - - This is intentionally not a diagnostic error, since the output will be presented - above this error, when this occurs. This should instead present information to the - user. - """ - - def __init__( - self, *, package_name: str, requirement_chain: str, failed_step: str - ) -> None: - super().__init__(f"Failed to build '{package_name}' when {failed_step.lower()}") - self.package_name = package_name - self.requirement_chain = requirement_chain - self.failed_step = failed_step - - -class MissingPyProjectBuildRequires(DiagnosticPipError): - """Raised when pyproject.toml has `build-system`, but no `build-system.requires`.""" - - reference = "missing-pyproject-build-system-requires" - - def __init__(self, *, package: str) -> None: - super().__init__( - message=f"Can not process {escape(package)}", - context=Text( - "This package has an invalid pyproject.toml file.\n" - "The [build-system] table is missing the mandatory `requires` key." - ), - note_stmt="This is an issue with the package mentioned above, not pip.", - hint_stmt=Text("See PEP 518 for the detailed specification."), - ) - - -class InvalidPyProjectBuildRequires(DiagnosticPipError): - """Raised when pyproject.toml an invalid `build-system.requires`.""" - - reference = "invalid-pyproject-build-system-requires" - - def __init__(self, *, package: str, reason: str) -> None: - super().__init__( - message=f"Can not process {escape(package)}", - context=Text( - "This package has an invalid `build-system.requires` key in " - f"pyproject.toml.\n{reason}" - ), - note_stmt="This is an issue with the package mentioned above, not pip.", - hint_stmt=Text("See PEP 518 for the detailed specification."), - ) - - -class NoneMetadataError(PipError): - """Raised when accessing a Distribution's "METADATA" or "PKG-INFO". - - This signifies an inconsistency, when the Distribution claims to have - the metadata file (if not, raise ``FileNotFoundError`` instead), but is - not actually able to produce its content. This may be due to permission - errors. - """ - - def __init__( - self, - dist: BaseDistribution, - metadata_name: str, - ) -> None: - """ - :param dist: A Distribution object. - :param metadata_name: The name of the metadata being accessed - (can be "METADATA" or "PKG-INFO"). - """ - self.dist = dist - self.metadata_name = metadata_name - - def __str__(self) -> str: - # Use `dist` in the error message because its stringification - # includes more information, like the version and location. - return f"None {self.metadata_name} metadata found for distribution: {self.dist}" - - -class UserInstallationInvalid(InstallationError): - """A --user install is requested on an environment without user site.""" - - def __str__(self) -> str: - return "User base directory is not specified" - - -class InvalidSchemeCombination(InstallationError): - def __str__(self) -> str: - before = ", ".join(str(a) for a in self.args[:-1]) - return f"Cannot set {before} and {self.args[-1]} together" - - -class DistributionNotFound(InstallationError): - """Raised when a distribution cannot be found to satisfy a requirement""" - - -class RequirementsFileParseError(InstallationError): - """Raised when a general error occurs parsing a requirements file line.""" - - -class BestVersionAlreadyInstalled(PipError): - """Raised when the most up-to-date version of a package is already - installed.""" - - -class BadCommand(PipError): - """Raised when virtualenv or a command is not found""" - - -class CommandError(PipError): - """Raised when there is an error in command-line arguments""" - - -class PreviousBuildDirError(PipError): - """Raised when there's a previous conflicting build directory""" - - -class NetworkConnectionError(PipError): - """HTTP connection error""" - - def __init__( - self, - error_msg: str, - response: Response | None = None, - request: Request | PreparedRequest | None = None, - ) -> None: - """ - Initialize NetworkConnectionError with `request` and `response` - objects. - """ - self.response = response - self.request = request - self.error_msg = error_msg - if ( - self.response is not None - and not self.request - and hasattr(response, "request") - ): - self.request = self.response.request - super().__init__(error_msg, response, request) - - def __str__(self) -> str: - return str(self.error_msg) - - -class InvalidWheelFilename(InstallationError): - """Invalid wheel filename.""" - - -class UnsupportedWheel(InstallationError): - """Unsupported wheel.""" - - -class InvalidWheel(InstallationError): - """Invalid (e.g. corrupt) wheel.""" - - def __init__(self, location: str, name: str): - self.location = location - self.name = name - - def __str__(self) -> str: - return f"Wheel '{self.name}' located at {self.location} is invalid." - - -class MetadataInconsistent(InstallationError): - """Built metadata contains inconsistent information. - - This is raised when the metadata contains values (e.g. name and version) - that do not match the information previously obtained from sdist filename, - user-supplied ``#egg=`` value, or an install requirement name. - """ - - def __init__( - self, ireq: InstallRequirement, field: str, f_val: str, m_val: str - ) -> None: - self.ireq = ireq - self.field = field - self.f_val = f_val - self.m_val = m_val - - def __str__(self) -> str: - return ( - f"Requested {self.ireq} has inconsistent {self.field}: " - f"expected {self.f_val!r}, but metadata has {self.m_val!r}" - ) - - -class MetadataInvalid(InstallationError): - """Metadata is invalid.""" - - def __init__(self, ireq: InstallRequirement, error: str) -> None: - self.ireq = ireq - self.error = error - - def __str__(self) -> str: - return f"Requested {self.ireq} has invalid metadata: {self.error}" - - -class InstallationSubprocessError(DiagnosticPipError, InstallationError): - """A subprocess call failed.""" - - reference = "subprocess-exited-with-error" - - def __init__( - self, - *, - command_description: str, - exit_code: int, - output_lines: list[str] | None, - ) -> None: - if output_lines is None: - output_prompt = Text("No available output.") - else: - output_prompt = ( - Text.from_markup(f"[red][{len(output_lines)} lines of output][/]\n") - + Text("".join(output_lines)) - + Text.from_markup(R"[red]\[end of output][/]") - ) - - super().__init__( - message=( - f"[green]{escape(command_description)}[/] did not run successfully.\n" - f"exit code: {exit_code}" - ), - context=output_prompt, - hint_stmt=None, - note_stmt=( - "This error originates from a subprocess, and is likely not a " - "problem with pip." - ), - ) - - self.command_description = command_description - self.exit_code = exit_code - - def __str__(self) -> str: - return f"{self.command_description} exited with {self.exit_code}" - - -class MetadataGenerationFailed(DiagnosticPipError, InstallationError): - reference = "metadata-generation-failed" - - def __init__( - self, - *, - package_details: str, - ) -> None: - super().__init__( - message="Encountered error while generating package metadata.", - context=escape(package_details), - hint_stmt="See above for details.", - note_stmt="This is an issue with the package mentioned above, not pip.", - ) - - def __str__(self) -> str: - return "metadata generation failed" - - -class HashErrors(InstallationError): - """Multiple HashError instances rolled into one for reporting""" - - def __init__(self) -> None: - self.errors: list[HashError] = [] - - def append(self, error: HashError) -> None: - self.errors.append(error) - - def __str__(self) -> str: - lines = [] - self.errors.sort(key=lambda e: e.order) - for cls, errors_of_cls in groupby(self.errors, lambda e: e.__class__): - lines.append(cls.head) - lines.extend(e.body() for e in errors_of_cls) - if lines: - return "\n".join(lines) - return "" - - def __bool__(self) -> bool: - return bool(self.errors) - - -class HashError(InstallationError): - """ - A failure to verify a package against known-good hashes - - :cvar order: An int sorting hash exception classes by difficulty of - recovery (lower being harder), so the user doesn't bother fretting - about unpinned packages when he has deeper issues, like VCS - dependencies, to deal with. Also keeps error reports in a - deterministic order. - :cvar head: A section heading for display above potentially many - exceptions of this kind - :ivar req: The InstallRequirement that triggered this error. This is - pasted on after the exception is instantiated, because it's not - typically available earlier. - - """ - - req: InstallRequirement | None = None - head = "" - order: int = -1 - - def body(self) -> str: - """Return a summary of me for display under the heading. - - This default implementation simply prints a description of the - triggering requirement. - - :param req: The InstallRequirement that provoked this error, with - its link already populated by the resolver's _populate_link(). - - """ - return f" {self._requirement_name()}" - - def __str__(self) -> str: - return f"{self.head}\n{self.body()}" - - def _requirement_name(self) -> str: - """Return a description of the requirement that triggered me. - - This default implementation returns long description of the req, with - line numbers - - """ - return str(self.req) if self.req else "unknown package" - - -class VcsHashUnsupported(HashError): - """A hash was provided for a version-control-system-based requirement, but - we don't have a method for hashing those.""" - - order = 0 - head = ( - "Can't verify hashes for these requirements because we don't " - "have a way to hash version control repositories:" - ) - - -class DirectoryUrlHashUnsupported(HashError): - """A hash was provided for a version-control-system-based requirement, but - we don't have a method for hashing those.""" - - order = 1 - head = ( - "Can't verify hashes for these file:// requirements because they " - "point to directories:" - ) - - -class HashMissing(HashError): - """A hash was needed for a requirement but is absent.""" - - order = 2 - head = ( - "Hashes are required in --require-hashes mode, but they are " - "missing from some requirements. Here is a list of those " - "requirements along with the hashes their downloaded archives " - "actually had. Add lines like these to your requirements files to " - "prevent tampering. (If you did not enable --require-hashes " - "manually, note that it turns on automatically when any package " - "has a hash.)" - ) - - def __init__(self, gotten_hash: str) -> None: - """ - :param gotten_hash: The hash of the (possibly malicious) archive we - just downloaded - """ - self.gotten_hash = gotten_hash - - def body(self) -> str: - # Dodge circular import. - from pip._internal.utils.hashes import FAVORITE_HASH - - package = None - if self.req: - # In the case of URL-based requirements, display the original URL - # seen in the requirements file rather than the package name, - # so the output can be directly copied into the requirements file. - package = ( - self.req.original_link - if self.req.is_direct - # In case someone feeds something downright stupid - # to InstallRequirement's constructor. - else getattr(self.req, "req", None) - ) - return " {} --hash={}:{}".format( - package or "unknown package", FAVORITE_HASH, self.gotten_hash - ) - - -class HashUnpinned(HashError): - """A requirement had a hash specified but was not pinned to a specific - version.""" - - order = 3 - head = ( - "In --require-hashes mode, all requirements must have their " - "versions pinned with ==. These do not:" - ) - - -class HashMismatch(HashError): - """ - Distribution file hash values don't match. - - :ivar package_name: The name of the package that triggered the hash - mismatch. Feel free to write to this after the exception is raise to - improve its error message. - - """ - - order = 4 - head = ( - "THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS " - "FILE. If you have updated the package versions, please update " - "the hashes. Otherwise, examine the package contents carefully; " - "someone may have tampered with them." - ) - - def __init__(self, allowed: dict[str, list[str]], gots: dict[str, _Hash]) -> None: - """ - :param allowed: A dict of algorithm names pointing to lists of allowed - hex digests - :param gots: A dict of algorithm names pointing to hashes we - actually got from the files under suspicion - """ - self.allowed = allowed - self.gots = gots - - def body(self) -> str: - return f" {self._requirement_name()}:\n{self._hash_comparison()}" - - def _hash_comparison(self) -> str: - """ - Return a comparison of actual and expected hash values. - - Example:: - - Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde - or 123451234512345123451234512345123451234512345 - Got bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef - - """ - - def hash_then_or(hash_name: str) -> chain[str]: - # For now, all the decent hashes have 6-char names, so we can get - # away with hard-coding space literals. - return chain([hash_name], repeat(" or")) - - lines: list[str] = [] - for hash_name, expecteds in self.allowed.items(): - prefix = hash_then_or(hash_name) - lines.extend((f" Expected {next(prefix)} {e}") for e in expecteds) - lines.append( - f" Got {self.gots[hash_name].hexdigest()}\n" - ) - return "\n".join(lines) - - -class UnsupportedPythonVersion(InstallationError): - """Unsupported python version according to Requires-Python package - metadata.""" - - -class ConfigurationFileCouldNotBeLoaded(ConfigurationError): - """When there are errors while loading a configuration file""" - - def __init__( - self, - reason: str = "could not be loaded", - fname: str | None = None, - error: configparser.Error | None = None, - ) -> None: - super().__init__(error) - self.reason = reason - self.fname = fname - self.error = error - - def __str__(self) -> str: - if self.fname is not None: - message_part = f" in {self.fname}." - else: - assert self.error is not None - message_part = f".\n{self.error}\n" - return f"Configuration file {self.reason}{message_part}" - - -_DEFAULT_EXTERNALLY_MANAGED_ERROR = f"""\ -The Python environment under {sys.prefix} is managed externally, and may not be -manipulated by the user. Please use specific tooling from the distributor of -the Python installation to interact with this environment instead. -""" - - -class ExternallyManagedEnvironment(DiagnosticPipError): - """The current environment is externally managed. - - This is raised when the current environment is externally managed, as - defined by `PEP 668`_. The ``EXTERNALLY-MANAGED`` configuration is checked - and displayed when the error is bubbled up to the user. - - :param error: The error message read from ``EXTERNALLY-MANAGED``. - """ - - reference = "externally-managed-environment" - - def __init__(self, error: str | None) -> None: - if error is None: - context = Text(_DEFAULT_EXTERNALLY_MANAGED_ERROR) - else: - context = Text(error) - super().__init__( - message="This environment is externally managed", - context=context, - note_stmt=( - "If you believe this is a mistake, please contact your " - "Python installation or OS distribution provider. " - "You can override this, at the risk of breaking your Python " - "installation or OS, by passing --break-system-packages." - ), - hint_stmt=Text("See PEP 668 for the detailed specification."), - ) - - @staticmethod - def _iter_externally_managed_error_keys() -> Iterator[str]: - # LC_MESSAGES is in POSIX, but not the C standard. The most common - # platform that does not implement this category is Windows, where - # using other categories for console message localization is equally - # unreliable, so we fall back to the locale-less vendor message. This - # can always be re-evaluated when a vendor proposes a new alternative. - try: - category = locale.LC_MESSAGES - except AttributeError: - lang: str | None = None - else: - lang, _ = locale.getlocale(category) - if lang is not None: - yield f"Error-{lang}" - for sep in ("-", "_"): - before, found, _ = lang.partition(sep) - if not found: - continue - yield f"Error-{before}" - yield "Error" - - @classmethod - def from_config( - cls, - config: pathlib.Path | str, - ) -> ExternallyManagedEnvironment: - parser = configparser.ConfigParser(interpolation=None) - try: - parser.read(config, encoding="utf-8") - section = parser["externally-managed"] - for key in cls._iter_externally_managed_error_keys(): - with contextlib.suppress(KeyError): - return cls(section[key]) - except KeyError: - pass - except (OSError, UnicodeDecodeError, configparser.ParsingError): - from pip._internal.utils._log import VERBOSE - - exc_info = logger.isEnabledFor(VERBOSE) - logger.warning("Failed to read %s", config, exc_info=exc_info) - return cls(None) - - -class UninstallMissingRecord(DiagnosticPipError): - reference = "uninstall-no-record-file" - - def __init__(self, *, distribution: BaseDistribution) -> None: - installer = distribution.installer - if not installer or installer == "pip": - dep = f"{distribution.raw_name}=={distribution.version}" - hint = Text.assemble( - "You might be able to recover from this via: ", - (f"pip install --force-reinstall --no-deps {dep}", "green"), - ) - else: - hint = Text( - f"The package was installed by {installer}. " - "You should check if it can uninstall the package." - ) - - super().__init__( - message=Text(f"Cannot uninstall {distribution}"), - context=( - "The package's contents are unknown: " - f"no RECORD file was found for {distribution.raw_name}." - ), - hint_stmt=hint, - ) - - -class LegacyDistutilsInstall(DiagnosticPipError): - reference = "uninstall-distutils-installed-package" - - def __init__(self, *, distribution: BaseDistribution) -> None: - super().__init__( - message=Text(f"Cannot uninstall {distribution}"), - context=( - "It is a distutils installed project and thus we cannot accurately " - "determine which files belong to it which would lead to only a partial " - "uninstall." - ), - hint_stmt=None, - ) - - -class InvalidInstalledPackage(DiagnosticPipError): - reference = "invalid-installed-package" - - def __init__( - self, - *, - dist: BaseDistribution, - invalid_exc: InvalidRequirement | InvalidVersion, - ) -> None: - installed_location = dist.installed_location - - if isinstance(invalid_exc, InvalidRequirement): - invalid_type = "requirement" - else: - invalid_type = "version" - - super().__init__( - message=Text( - f"Cannot process installed package {dist} " - + (f"in {installed_location!r} " if installed_location else "") - + f"because it has an invalid {invalid_type}:\n{invalid_exc.args[0]}" - ), - context=( - "Starting with pip 24.1, packages with invalid " - f"{invalid_type}s can not be processed." - ), - hint_stmt="To proceed this package must be uninstalled.", - ) - - -class IncompleteDownloadError(DiagnosticPipError): - """Raised when the downloader receives fewer bytes than advertised - in the Content-Length header.""" - - reference = "incomplete-download" - - def __init__(self, download: _FileDownload) -> None: - # Dodge circular import. - from pip._internal.utils.misc import format_size - - assert download.size is not None - download_status = ( - f"{format_size(download.bytes_received)}/{format_size(download.size)}" - ) - if download.reattempts: - retry_status = f"after {download.reattempts + 1} attempts " - hint = "Use --resume-retries to configure resume attempt limit." - else: - # Download retrying is not enabled. - retry_status = "" - hint = "Consider using --resume-retries to enable download resumption." - message = Text( - f"Download failed {retry_status}because not enough bytes " - f"were received ({download_status})" - ) - - super().__init__( - message=message, - context=f"URL: {download.link.redacted_url}", - hint_stmt=hint, - note_stmt="This is an issue with network connectivity, not pip.", - ) - - -class ResolutionTooDeepError(DiagnosticPipError): - """Raised when the dependency resolver exceeds the maximum recursion depth.""" - - reference = "resolution-too-deep" - - def __init__(self) -> None: - super().__init__( - message="Dependency resolution exceeded maximum depth", - context=( - "Pip cannot resolve the current dependencies as the dependency graph " - "is too complex for pip to solve efficiently." - ), - hint_stmt=( - "Try adding lower bounds to constrain your dependencies, " - "for example: 'package>=2.0.0' instead of just 'package'. " - ), - link="https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors", - ) - - -class InstallWheelBuildError(DiagnosticPipError): - reference = "failed-wheel-build-for-install" - - def __init__(self, failed: list[InstallRequirement]) -> None: - super().__init__( - message=( - "Failed to build installable wheels for some " - "pyproject.toml based projects" - ), - context=", ".join(r.name for r in failed), # type: ignore - hint_stmt=None, - ) - - -class InvalidEggFragment(DiagnosticPipError): - reference = "invalid-egg-fragment" - - def __init__(self, link: Link, fragment: str) -> None: - hint = "" - if ">" in fragment or "=" in fragment or "<" in fragment: - hint = ( - "Version specifiers are silently ignored for URL references. " - "Remove them. " - ) - if "[" in fragment and "]" in fragment: - hint += "Try using the Direct URL requirement syntax: 'name[extra] @ URL'" - - if not hint: - hint = "Egg fragments can only be a valid project name." - - super().__init__( - message=f"The '{escape(fragment)}' egg fragment is invalid", - context=f"from '{escape(str(link))}'", - hint_stmt=escape(hint), - ) - - -class BuildDependencyInstallError(DiagnosticPipError): - """Raised when build dependencies cannot be installed.""" - - reference = "failed-build-dependency-install" - - def __init__( - self, - req: InstallRequirement | None, - build_reqs: Iterable[str], - *, - cause: Exception, - log_lines: list[str] | None, - ) -> None: - if isinstance(cause, PipError): - note = "This is likely not a problem with pip." - else: - note = ( - "pip crashed unexpectedly. Please file an issue on pip's issue " - "tracker: https://github.com/pypa/pip/issues/new" - ) - - if log_lines is None: - # No logs are available, they must have been printed earlier. - context = Text("See above for more details.") - else: - if isinstance(cause, PipError): - log_lines.append(f"ERROR: {cause}") - else: - # Split rendered error into real lines without trailing newlines. - log_lines.extend( - "".join(traceback.format_exception(cause)).splitlines() - ) - - context = Text.assemble( - f"Installing {' '.join(build_reqs)}\n", - (f"[{len(log_lines)} lines of output]\n", "red"), - "\n".join(log_lines), - ("\n[end of output]", "red"), - ) - - message = Text("Cannot install build dependencies", "green") - if req: - message += Text(f" for {req}") - super().__init__( - message=message, context=context, hint_stmt=None, note_stmt=note - ) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/index/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/index/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index bc2b82b55..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/index/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-314.pyc deleted file mode 100644 index 08ce81c57..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__init__.py deleted file mode 100644 index c0b63205f..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__init__.py +++ /dev/null @@ -1,440 +0,0 @@ -from __future__ import annotations - -import functools -import logging -import os -import pathlib -import sys -import sysconfig - -from pip._internal.models.scheme import SCHEME_KEYS, Scheme -from pip._internal.utils.compat import WINDOWS -from pip._internal.utils.deprecation import deprecated -from pip._internal.utils.virtualenv import running_under_virtualenv - -from . import _sysconfig -from .base import ( - USER_CACHE_DIR, - get_major_minor_version, - get_src_prefix, - is_osx_framework, - site_packages, - user_site, -) - -__all__ = [ - "USER_CACHE_DIR", - "get_bin_prefix", - "get_bin_user", - "get_major_minor_version", - "get_platlib", - "get_purelib", - "get_scheme", - "get_src_prefix", - "site_packages", - "user_site", -] - - -logger = logging.getLogger(__name__) - - -_PLATLIBDIR: str = getattr(sys, "platlibdir", "lib") - -_USE_SYSCONFIG_DEFAULT = sys.version_info >= (3, 10) - - -def _should_use_sysconfig() -> bool: - """This function determines the value of _USE_SYSCONFIG. - - By default, pip uses sysconfig on Python 3.10+. - But Python distributors can override this decision by setting: - sysconfig._PIP_USE_SYSCONFIG = True / False - Rationale in https://github.com/pypa/pip/issues/10647 - - This is a function for testability, but should be constant during any one - run. - """ - return bool(getattr(sysconfig, "_PIP_USE_SYSCONFIG", _USE_SYSCONFIG_DEFAULT)) - - -_USE_SYSCONFIG = _should_use_sysconfig() - -if not _USE_SYSCONFIG: - # Import distutils lazily to avoid deprecation warnings, - # but import it soon enough that it is in memory and available during - # a pip reinstall. - from . import _distutils - -# Be noisy about incompatibilities if this platforms "should" be using -# sysconfig, but is explicitly opting out and using distutils instead. -if _USE_SYSCONFIG_DEFAULT and not _USE_SYSCONFIG: - _MISMATCH_LEVEL = logging.WARNING -else: - _MISMATCH_LEVEL = logging.DEBUG - - -def _looks_like_bpo_44860() -> bool: - """The resolution to bpo-44860 will change this incorrect platlib. - - See . - """ - from distutils.command.install import INSTALL_SCHEMES - - try: - unix_user_platlib = INSTALL_SCHEMES["unix_user"]["platlib"] - except KeyError: - return False - return unix_user_platlib == "$usersite" - - -def _looks_like_red_hat_patched_platlib_purelib(scheme: dict[str, str]) -> bool: - platlib = scheme["platlib"] - if "/$platlibdir/" in platlib: - platlib = platlib.replace("/$platlibdir/", f"/{_PLATLIBDIR}/") - if "/lib64/" not in platlib: - return False - unpatched = platlib.replace("/lib64/", "/lib/") - return unpatched.replace("$platbase/", "$base/") == scheme["purelib"] - - -@functools.cache -def _looks_like_red_hat_lib() -> bool: - """Red Hat patches platlib in unix_prefix and unix_home, but not purelib. - - This is the only way I can see to tell a Red Hat-patched Python. - """ - from distutils.command.install import INSTALL_SCHEMES - - return all( - k in INSTALL_SCHEMES - and _looks_like_red_hat_patched_platlib_purelib(INSTALL_SCHEMES[k]) - for k in ("unix_prefix", "unix_home") - ) - - -@functools.cache -def _looks_like_debian_scheme() -> bool: - """Debian adds two additional schemes.""" - from distutils.command.install import INSTALL_SCHEMES - - return "deb_system" in INSTALL_SCHEMES and "unix_local" in INSTALL_SCHEMES - - -@functools.cache -def _looks_like_red_hat_scheme() -> bool: - """Red Hat patches ``sys.prefix`` and ``sys.exec_prefix``. - - Red Hat's ``00251-change-user-install-location.patch`` changes the install - command's ``prefix`` and ``exec_prefix`` to append ``"/local"``. This is - (fortunately?) done quite unconditionally, so we create a default command - object without any configuration to detect this. - """ - from distutils.command.install import install - from distutils.dist import Distribution - - cmd = install(Distribution()) - cmd.finalize_options() - return ( - cmd.exec_prefix == f"{os.path.normpath(sys.exec_prefix)}/local" - and cmd.prefix == f"{os.path.normpath(sys.prefix)}/local" - ) - - -@functools.cache -def _looks_like_slackware_scheme() -> bool: - """Slackware patches sysconfig but fails to patch distutils and site. - - Slackware changes sysconfig's user scheme to use ``"lib64"`` for the lib - path, but does not do the same to the site module. - """ - if user_site is None: # User-site not available. - return False - try: - paths = sysconfig.get_paths(scheme="posix_user", expand=False) - except KeyError: # User-site not available. - return False - return "/lib64/" in paths["purelib"] and "/lib64/" not in user_site - - -@functools.cache -def _looks_like_msys2_mingw_scheme() -> bool: - """MSYS2 patches distutils and sysconfig to use a UNIX-like scheme. - - However, MSYS2 incorrectly patches sysconfig ``nt`` scheme. The fix is - likely going to be included in their 3.10 release, so we ignore the warning. - See msys2/MINGW-packages#9319. - - MSYS2 MINGW's patch uses lowercase ``"lib"`` instead of the usual uppercase, - and is missing the final ``"site-packages"``. - """ - paths = sysconfig.get_paths("nt", expand=False) - return all( - "Lib" not in p and "lib" in p and not p.endswith("site-packages") - for p in (paths[key] for key in ("platlib", "purelib")) - ) - - -@functools.cache -def _warn_mismatched(old: pathlib.Path, new: pathlib.Path, *, key: str) -> None: - issue_url = "https://github.com/pypa/pip/issues/10151" - message = ( - "Value for %s does not match. Please report this to <%s>" - "\ndistutils: %s" - "\nsysconfig: %s" - ) - logger.log(_MISMATCH_LEVEL, message, key, issue_url, old, new) - - -def _warn_if_mismatch(old: pathlib.Path, new: pathlib.Path, *, key: str) -> bool: - if old == new: - return False - _warn_mismatched(old, new, key=key) - return True - - -@functools.cache -def _log_context( - *, - user: bool = False, - home: str | None = None, - root: str | None = None, - prefix: str | None = None, -) -> None: - parts = [ - "Additional context:", - "user = %r", - "home = %r", - "root = %r", - "prefix = %r", - ] - - logger.log(_MISMATCH_LEVEL, "\n".join(parts), user, home, root, prefix) - - -def get_scheme( - dist_name: str, - user: bool = False, - home: str | None = None, - root: str | None = None, - isolated: bool = False, - prefix: str | None = None, -) -> Scheme: - new = _sysconfig.get_scheme( - dist_name, - user=user, - home=home, - root=root, - isolated=isolated, - prefix=prefix, - ) - if _USE_SYSCONFIG: - return new - - old = _distutils.get_scheme( - dist_name, - user=user, - home=home, - root=root, - isolated=isolated, - prefix=prefix, - ) - - warning_contexts = [] - for k in SCHEME_KEYS: - old_v = pathlib.Path(getattr(old, k)) - new_v = pathlib.Path(getattr(new, k)) - - if old_v == new_v: - continue - - # distutils incorrectly put PyPy packages under ``site-packages/python`` - # in the ``posix_home`` scheme, but PyPy devs said they expect the - # directory name to be ``pypy`` instead. So we treat this as a bug fix - # and not warn about it. See bpo-43307 and python/cpython#24628. - skip_pypy_special_case = ( - sys.implementation.name == "pypy" - and home is not None - and k in ("platlib", "purelib") - and old_v.parent == new_v.parent - and old_v.name.startswith("python") - and new_v.name.startswith("pypy") - ) - if skip_pypy_special_case: - continue - - # sysconfig's ``osx_framework_user`` does not include ``pythonX.Y`` in - # the ``include`` value, but distutils's ``headers`` does. We'll let - # CPython decide whether this is a bug or feature. See bpo-43948. - skip_osx_framework_user_special_case = ( - user - and is_osx_framework() - and k == "headers" - and old_v.parent.parent == new_v.parent - and old_v.parent.name.startswith("python") - ) - if skip_osx_framework_user_special_case: - continue - - # On Red Hat and derived Linux distributions, distutils is patched to - # use "lib64" instead of "lib" for platlib. - if k == "platlib" and _looks_like_red_hat_lib(): - continue - - # On Python 3.9+, sysconfig's posix_user scheme sets platlib against - # sys.platlibdir, but distutils's unix_user incorrectly continues - # using the same $usersite for both platlib and purelib. This creates a - # mismatch when sys.platlibdir is not "lib". - skip_bpo_44860 = ( - user - and k == "platlib" - and not WINDOWS - and _PLATLIBDIR != "lib" - and _looks_like_bpo_44860() - ) - if skip_bpo_44860: - continue - - # Slackware incorrectly patches posix_user to use lib64 instead of lib, - # but not usersite to match the location. - skip_slackware_user_scheme = ( - user - and k in ("platlib", "purelib") - and not WINDOWS - and _looks_like_slackware_scheme() - ) - if skip_slackware_user_scheme: - continue - - # Both Debian and Red Hat patch Python to place the system site under - # /usr/local instead of /usr. Debian also places lib in dist-packages - # instead of site-packages, but the /usr/local check should cover it. - skip_linux_system_special_case = ( - not (user or home or prefix or running_under_virtualenv()) - and old_v.parts[1:3] == ("usr", "local") - and len(new_v.parts) > 1 - and new_v.parts[1] == "usr" - and (len(new_v.parts) < 3 or new_v.parts[2] != "local") - and (_looks_like_red_hat_scheme() or _looks_like_debian_scheme()) - ) - if skip_linux_system_special_case: - continue - - # MSYS2 MINGW's sysconfig patch does not include the "site-packages" - # part of the path. This is incorrect and will be fixed in MSYS. - skip_msys2_mingw_bug = ( - WINDOWS and k in ("platlib", "purelib") and _looks_like_msys2_mingw_scheme() - ) - if skip_msys2_mingw_bug: - continue - - # CPython's POSIX install script invokes pip (via ensurepip) against the - # interpreter located in the source tree, not the install site. This - # triggers special logic in sysconfig that's not present in distutils. - # https://github.com/python/cpython/blob/8c21941ddaf/Lib/sysconfig.py#L178-L194 - skip_cpython_build = ( - sysconfig.is_python_build(check_home=True) - and not WINDOWS - and k in ("headers", "include", "platinclude") - ) - if skip_cpython_build: - continue - - warning_contexts.append((old_v, new_v, f"scheme.{k}")) - - if not warning_contexts: - return old - - # Check if this path mismatch is caused by distutils config files. Those - # files will no longer work once we switch to sysconfig, so this raises a - # deprecation message for them. - default_old = _distutils.distutils_scheme( - dist_name, - user, - home, - root, - isolated, - prefix, - ignore_config_files=True, - ) - if any(default_old[k] != getattr(old, k) for k in SCHEME_KEYS): - deprecated( - reason=( - "Configuring installation scheme with distutils config files " - "is deprecated and will no longer work in the near future. If you " - "are using a Homebrew or Linuxbrew Python, please see discussion " - "at https://github.com/Homebrew/homebrew-core/issues/76621" - ), - replacement=None, - gone_in=None, - ) - return old - - # Post warnings about this mismatch so user can report them back. - for old_v, new_v, key in warning_contexts: - _warn_mismatched(old_v, new_v, key=key) - _log_context(user=user, home=home, root=root, prefix=prefix) - - return old - - -def get_bin_prefix() -> str: - new = _sysconfig.get_bin_prefix() - if _USE_SYSCONFIG: - return new - - old = _distutils.get_bin_prefix() - if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="bin_prefix"): - _log_context() - return old - - -def get_bin_user() -> str: - return _sysconfig.get_scheme("", user=True).scripts - - -def _looks_like_deb_system_dist_packages(value: str) -> bool: - """Check if the value is Debian's APT-controlled dist-packages. - - Debian's ``distutils.sysconfig.get_python_lib()`` implementation returns the - default package path controlled by APT, but does not patch ``sysconfig`` to - do the same. This is similar to the bug worked around in ``get_scheme()``, - but here the default is ``deb_system`` instead of ``unix_local``. Ultimately - we can't do anything about this Debian bug, and this detection allows us to - skip the warning when needed. - """ - if not _looks_like_debian_scheme(): - return False - if value == "/usr/lib/python3/dist-packages": - return True - return False - - -def get_purelib() -> str: - """Return the default pure-Python lib location.""" - new = _sysconfig.get_purelib() - if _USE_SYSCONFIG: - return new - - old = _distutils.get_purelib() - if _looks_like_deb_system_dist_packages(old): - return old - if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="purelib"): - _log_context() - return old - - -def get_platlib() -> str: - """Return the default platform-shared lib location.""" - new = _sysconfig.get_platlib() - if _USE_SYSCONFIG: - return new - - from . import _distutils - - old = _distutils.get_platlib() - if _looks_like_deb_system_dist_packages(old): - return old - if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="platlib"): - _log_context() - return old diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 71b48c992..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__pycache__/base.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__pycache__/base.cpython-314.pyc deleted file mode 100644 index 2f104876c..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/locations/__pycache__/base.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 25b15303a..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/__pycache__/base.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/__pycache__/base.cpython-314.pyc deleted file mode 100644 index 8eda2b014..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/__pycache__/base.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 51ddb5a79..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 584ad3a24..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/candidate.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/candidate.cpython-314.pyc deleted file mode 100644 index bd80eac09..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/candidate.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-314.pyc deleted file mode 100644 index a66e2d796..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/index.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/index.cpython-314.pyc deleted file mode 100644 index fd01604e1..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/index.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-314.pyc deleted file mode 100644 index f093b1774..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/release_control.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/release_control.cpython-314.pyc deleted file mode 100644 index 53e9b9a84..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/release_control.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/scheme.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/scheme.cpython-314.pyc deleted file mode 100644 index de993772d..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/scheme.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-314.pyc deleted file mode 100644 index 258ce4304..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-314.pyc deleted file mode 100644 index 4a46459da..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/wheel.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/wheel.cpython-314.pyc deleted file mode 100644 index be550541b..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/__pycache__/wheel.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/direct_url.py b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/direct_url.py deleted file mode 100644 index aefc670cd..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/direct_url.py +++ /dev/null @@ -1,227 +0,0 @@ -"""PEP 610""" - -from __future__ import annotations - -import json -import re -import urllib.parse -from collections.abc import Iterable -from dataclasses import dataclass -from typing import Any, ClassVar, TypeVar, Union - -__all__ = [ - "DirectUrl", - "DirectUrlValidationError", - "DirInfo", - "ArchiveInfo", - "VcsInfo", -] - -T = TypeVar("T") - -DIRECT_URL_METADATA_NAME = "direct_url.json" -ENV_VAR_RE = re.compile(r"^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$") - - -class DirectUrlValidationError(Exception): - pass - - -def _get( - d: dict[str, Any], expected_type: type[T], key: str, default: T | None = None -) -> T | None: - """Get value from dictionary and verify expected type.""" - if key not in d: - return default - value = d[key] - if not isinstance(value, expected_type): - raise DirectUrlValidationError( - f"{value!r} has unexpected type for {key} (expected {expected_type})" - ) - return value - - -def _get_required( - d: dict[str, Any], expected_type: type[T], key: str, default: T | None = None -) -> T: - value = _get(d, expected_type, key, default) - if value is None: - raise DirectUrlValidationError(f"{key} must have a value") - return value - - -def _exactly_one_of(infos: Iterable[InfoType | None]) -> InfoType: - infos = [info for info in infos if info is not None] - if not infos: - raise DirectUrlValidationError( - "missing one of archive_info, dir_info, vcs_info" - ) - if len(infos) > 1: - raise DirectUrlValidationError( - "more than one of archive_info, dir_info, vcs_info" - ) - assert infos[0] is not None - return infos[0] - - -def _filter_none(**kwargs: Any) -> dict[str, Any]: - """Make dict excluding None values.""" - return {k: v for k, v in kwargs.items() if v is not None} - - -@dataclass -class VcsInfo: - name: ClassVar = "vcs_info" - - vcs: str - commit_id: str - requested_revision: str | None = None - - @classmethod - def _from_dict(cls, d: dict[str, Any] | None) -> VcsInfo | None: - if d is None: - return None - return cls( - vcs=_get_required(d, str, "vcs"), - commit_id=_get_required(d, str, "commit_id"), - requested_revision=_get(d, str, "requested_revision"), - ) - - def _to_dict(self) -> dict[str, Any]: - return _filter_none( - vcs=self.vcs, - requested_revision=self.requested_revision, - commit_id=self.commit_id, - ) - - -class ArchiveInfo: - name = "archive_info" - - def __init__( - self, - hash: str | None = None, - hashes: dict[str, str] | None = None, - ) -> None: - # set hashes before hash, since the hash setter will further populate hashes - self.hashes = hashes - self.hash = hash - - @property - def hash(self) -> str | None: - return self._hash - - @hash.setter - def hash(self, value: str | None) -> None: - if value is not None: - # Auto-populate the hashes key to upgrade to the new format automatically. - # We don't back-populate the legacy hash key from hashes. - try: - hash_name, hash_value = value.split("=", 1) - except ValueError: - raise DirectUrlValidationError( - f"invalid archive_info.hash format: {value!r}" - ) - if self.hashes is None: - self.hashes = {hash_name: hash_value} - elif hash_name not in self.hashes: - self.hashes = self.hashes.copy() - self.hashes[hash_name] = hash_value - self._hash = value - - @classmethod - def _from_dict(cls, d: dict[str, Any] | None) -> ArchiveInfo | None: - if d is None: - return None - return cls(hash=_get(d, str, "hash"), hashes=_get(d, dict, "hashes")) - - def _to_dict(self) -> dict[str, Any]: - return _filter_none(hash=self.hash, hashes=self.hashes) - - -@dataclass -class DirInfo: - name: ClassVar = "dir_info" - - editable: bool = False - - @classmethod - def _from_dict(cls, d: dict[str, Any] | None) -> DirInfo | None: - if d is None: - return None - return cls(editable=_get_required(d, bool, "editable", default=False)) - - def _to_dict(self) -> dict[str, Any]: - return _filter_none(editable=self.editable or None) - - -InfoType = Union[ArchiveInfo, DirInfo, VcsInfo] - - -@dataclass -class DirectUrl: - url: str - info: InfoType - subdirectory: str | None = None - - def _remove_auth_from_netloc(self, netloc: str) -> str: - if "@" not in netloc: - return netloc - user_pass, netloc_no_user_pass = netloc.split("@", 1) - if ( - isinstance(self.info, VcsInfo) - and self.info.vcs == "git" - and user_pass == "git" - ): - return netloc - if ENV_VAR_RE.match(user_pass): - return netloc - return netloc_no_user_pass - - @property - def redacted_url(self) -> str: - """url with user:password part removed unless it is formed with - environment variables as specified in PEP 610, or it is ``git`` - in the case of a git URL. - """ - purl = urllib.parse.urlsplit(self.url) - netloc = self._remove_auth_from_netloc(purl.netloc) - surl = urllib.parse.urlunsplit( - (purl.scheme, netloc, purl.path, purl.query, purl.fragment) - ) - return surl - - def validate(self) -> None: - self.from_dict(self.to_dict()) - - @classmethod - def from_dict(cls, d: dict[str, Any]) -> DirectUrl: - return DirectUrl( - url=_get_required(d, str, "url"), - subdirectory=_get(d, str, "subdirectory"), - info=_exactly_one_of( - [ - ArchiveInfo._from_dict(_get(d, dict, "archive_info")), - DirInfo._from_dict(_get(d, dict, "dir_info")), - VcsInfo._from_dict(_get(d, dict, "vcs_info")), - ] - ), - ) - - def to_dict(self) -> dict[str, Any]: - res = _filter_none( - url=self.redacted_url, - subdirectory=self.subdirectory, - ) - res[self.info.name] = self.info._to_dict() - return res - - @classmethod - def from_json(cls, s: str) -> DirectUrl: - return cls.from_dict(json.loads(s)) - - def to_json(self) -> str: - return json.dumps(self.to_dict(), sort_keys=True) - - def is_local_editable(self) -> bool: - return isinstance(self.info, DirInfo) and self.info.editable diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/selection_prefs.py b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/selection_prefs.py deleted file mode 100644 index 04ef63ab5..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/models/selection_prefs.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -from pip._internal.models.format_control import FormatControl -from pip._internal.models.release_control import ReleaseControl - - -# TODO: This needs Python 3.10's improved slots support for dataclasses -# to be converted into a dataclass. -class SelectionPreferences: - """ - Encapsulates the candidate selection preferences for downloading - and installing files. - """ - - __slots__ = [ - "allow_yanked", - "release_control", - "format_control", - "prefer_binary", - "ignore_requires_python", - ] - - # Don't include an allow_yanked default value to make sure each call - # site considers whether yanked releases are allowed. This also causes - # that decision to be made explicit in the calling code, which helps - # people when reading the code. - def __init__( - self, - allow_yanked: bool, - release_control: ReleaseControl | None = None, - format_control: FormatControl | None = None, - prefer_binary: bool = False, - ignore_requires_python: bool | None = None, - ) -> None: - """Create a SelectionPreferences object. - - :param allow_yanked: Whether files marked as yanked (in the sense - of PEP 592) are permitted to be candidates for install. - :param release_control: A ReleaseControl object or None. Used to control - whether pre-releases are allowed for specific packages. - :param format_control: A FormatControl object or None. Used to control - the selection of source packages / binary packages when consulting - the index and links. - :param prefer_binary: Whether to prefer an old, but valid, binary - dist over a new source dist. - :param ignore_requires_python: Whether to ignore incompatible - "Requires-Python" values in links. Defaults to False. - """ - if ignore_requires_python is None: - ignore_requires_python = False - - self.allow_yanked = allow_yanked - self.release_control = release_control - self.format_control = format_control - self.prefer_binary = prefer_binary - self.ignore_requires_python = ignore_requires_python diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index d4ca94926..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/auth.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/auth.cpython-314.pyc deleted file mode 100644 index 18eb8005f..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/auth.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/cache.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/cache.cpython-314.pyc deleted file mode 100644 index c052abee9..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/cache.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/download.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/download.cpython-314.pyc deleted file mode 100644 index d5efe7d72..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/download.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/utils.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/utils.cpython-314.pyc deleted file mode 100644 index f7fd64f46..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/__pycache__/utils.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/auth.py b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/auth.py deleted file mode 100644 index 4504f61a7..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/network/auth.py +++ /dev/null @@ -1,568 +0,0 @@ -"""Network Authentication Helpers - -Contains interface (MultiDomainBasicAuth) and associated glue code for -providing credentials in the context of network requests. -""" - -from __future__ import annotations - -import logging -import os -import shutil -import subprocess -import sysconfig -import typing -import urllib.parse -from abc import ABC, abstractmethod -from functools import cache -from os.path import commonprefix -from pathlib import Path -from typing import Any, NamedTuple - -from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth -from pip._vendor.requests.utils import get_netrc_auth - -from pip._internal.utils.logging import getLogger -from pip._internal.utils.misc import ( - ask, - ask_input, - ask_password, - remove_auth_from_url, - split_auth_netloc_from_url, -) -from pip._internal.vcs.versioncontrol import AuthInfo - -if typing.TYPE_CHECKING: - from pip._vendor.requests import PreparedRequest - from pip._vendor.requests.models import Response - -logger = getLogger(__name__) - -KEYRING_DISABLED = False - - -class Credentials(NamedTuple): - url: str - username: str - password: str - - -class KeyRingBaseProvider(ABC): - """Keyring base provider interface""" - - has_keyring: bool - - @abstractmethod - def get_auth_info(self, url: str, username: str | None) -> AuthInfo | None: ... - - @abstractmethod - def save_auth_info(self, url: str, username: str, password: str) -> None: ... - - -class KeyRingNullProvider(KeyRingBaseProvider): - """Keyring null provider""" - - has_keyring = False - - def get_auth_info(self, url: str, username: str | None) -> AuthInfo | None: - return None - - def save_auth_info(self, url: str, username: str, password: str) -> None: - return None - - -class KeyRingPythonProvider(KeyRingBaseProvider): - """Keyring interface which uses locally imported `keyring`""" - - has_keyring = True - - def __init__(self) -> None: - import keyring - - self.keyring = keyring - - def get_auth_info(self, url: str, username: str | None) -> AuthInfo | None: - # Support keyring's get_credential interface which supports getting - # credentials without a username. This is only available for - # keyring>=15.2.0. - if hasattr(self.keyring, "get_credential"): - logger.debug("Getting credentials from keyring for %s", url) - cred = self.keyring.get_credential(url, username) - if cred is not None: - return cred.username, cred.password - return None - - if username is not None: - logger.debug("Getting password from keyring for %s", url) - password = self.keyring.get_password(url, username) - if password: - return username, password - return None - - def save_auth_info(self, url: str, username: str, password: str) -> None: - self.keyring.set_password(url, username, password) - - -class KeyRingCliProvider(KeyRingBaseProvider): - """Provider which uses `keyring` cli - - Instead of calling the keyring package installed alongside pip - we call keyring on the command line which will enable pip to - use which ever installation of keyring is available first in - PATH. - """ - - has_keyring = True - - def __init__(self, cmd: str) -> None: - self.keyring = cmd - - def get_auth_info(self, url: str, username: str | None) -> AuthInfo | None: - # This is the default implementation of keyring.get_credential - # https://github.com/jaraco/keyring/blob/97689324abcf01bd1793d49063e7ca01e03d7d07/keyring/backend.py#L134-L139 - if username is not None: - password = self._get_password(url, username) - if password is not None: - return username, password - return None - - def save_auth_info(self, url: str, username: str, password: str) -> None: - return self._set_password(url, username, password) - - def _get_password(self, service_name: str, username: str) -> str | None: - """Mirror the implementation of keyring.get_password using cli""" - if self.keyring is None: - return None - - cmd = [self.keyring, "get", service_name, username] - env = os.environ.copy() - env["PYTHONIOENCODING"] = "utf-8" - res = subprocess.run( - cmd, - stdin=subprocess.DEVNULL, - stdout=subprocess.PIPE, - env=env, - ) - if res.returncode: - return None - return res.stdout.decode("utf-8").strip(os.linesep) - - def _set_password(self, service_name: str, username: str, password: str) -> None: - """Mirror the implementation of keyring.set_password using cli""" - if self.keyring is None: - return None - env = os.environ.copy() - env["PYTHONIOENCODING"] = "utf-8" - subprocess.run( - [self.keyring, "set", service_name, username], - input=f"{password}{os.linesep}".encode(), - env=env, - check=True, - ) - return None - - -@cache -def get_keyring_provider(provider: str) -> KeyRingBaseProvider: - logger.verbose("Keyring provider requested: %s", provider) - - # keyring has previously failed and been disabled - if KEYRING_DISABLED: - provider = "disabled" - if provider in ["import", "auto"]: - try: - impl = KeyRingPythonProvider() - logger.verbose("Keyring provider set: import") - return impl - except ImportError: - pass - except Exception as exc: - # In the event of an unexpected exception - # we should warn the user - msg = "Installed copy of keyring fails with exception %s" - if provider == "auto": - msg = msg + ", trying to find a keyring executable as a fallback" - logger.warning(msg, exc, exc_info=logger.isEnabledFor(logging.DEBUG)) - if provider in ["subprocess", "auto"]: - cli = shutil.which("keyring") - if cli and cli.startswith(sysconfig.get_path("scripts")): - # all code within this function is stolen from shutil.which implementation - @typing.no_type_check - def PATH_as_shutil_which_determines_it() -> str: - path = os.environ.get("PATH", None) - if path is None: - try: - path = os.confstr("CS_PATH") - except (AttributeError, ValueError): - # os.confstr() or CS_PATH is not available - path = os.defpath - # bpo-35755: Don't use os.defpath if the PATH environment variable is - # set to an empty string - - return path - - scripts = Path(sysconfig.get_path("scripts")) - - paths = [] - for path in PATH_as_shutil_which_determines_it().split(os.pathsep): - p = Path(path) - try: - if not p.samefile(scripts): - paths.append(path) - except FileNotFoundError: - pass - - path = os.pathsep.join(paths) - - cli = shutil.which("keyring", path=path) - - if cli: - logger.verbose("Keyring provider set: subprocess with executable %s", cli) - return KeyRingCliProvider(cli) - - logger.verbose("Keyring provider set: disabled") - return KeyRingNullProvider() - - -class MultiDomainBasicAuth(AuthBase): - def __init__( - self, - prompting: bool = True, - index_urls: list[str] | None = None, - keyring_provider: str = "auto", - ) -> None: - self.prompting = prompting - self.index_urls = index_urls - self.keyring_provider = keyring_provider - self.passwords: dict[str, AuthInfo] = {} - # When the user is prompted to enter credentials and keyring is - # available, we will offer to save them. If the user accepts, - # this value is set to the credentials they entered. After the - # request authenticates, the caller should call - # ``save_credentials`` to save these. - self._credentials_to_save: Credentials | None = None - - @property - def keyring_provider(self) -> KeyRingBaseProvider: - return get_keyring_provider(self._keyring_provider) - - @keyring_provider.setter - def keyring_provider(self, provider: str) -> None: - # The free function get_keyring_provider has been decorated with - # functools.cache. If an exception occurs in get_keyring_auth that - # cache will be cleared and keyring disabled, take that into account - # if you want to remove this indirection. - self._keyring_provider = provider - - @property - def use_keyring(self) -> bool: - # We won't use keyring when --no-input is passed unless - # a specific provider is requested because it might require - # user interaction - return self.prompting or self._keyring_provider not in ["auto", "disabled"] - - def _get_keyring_auth( - self, - url: str | None, - username: str | None, - ) -> AuthInfo | None: - """Return the tuple auth for a given url from keyring.""" - # Do nothing if no url was provided - if not url: - return None - - try: - return self.keyring_provider.get_auth_info(url, username) - except Exception as exc: - # Log the full exception (with stacktrace) at debug, so it'll only - # show up when running in verbose mode. - logger.debug("Keyring is skipped due to an exception", exc_info=True) - # Always log a shortened version of the exception. - logger.warning( - "Keyring is skipped due to an exception: %s", - str(exc), - ) - global KEYRING_DISABLED - KEYRING_DISABLED = True - get_keyring_provider.cache_clear() - return None - - def _get_index_url(self, url: str) -> str | None: - """Return the original index URL matching the requested URL. - - Cached or dynamically generated credentials may work against - the original index URL rather than just the netloc. - - The provided url should have had its username and password - removed already. If the original index url had credentials then - they will be included in the return value. - - Returns None if no matching index was found, or if --no-index - was specified by the user. - """ - if not url or not self.index_urls: - return None - - url = remove_auth_from_url(url).rstrip("/") + "/" - parsed_url = urllib.parse.urlsplit(url) - - candidates = [] - - for index in self.index_urls: - index = index.rstrip("/") + "/" - parsed_index = urllib.parse.urlsplit(remove_auth_from_url(index)) - if parsed_url == parsed_index: - return index - - if parsed_url.netloc != parsed_index.netloc: - continue - - candidate = urllib.parse.urlsplit(index) - candidates.append(candidate) - - if not candidates: - return None - - candidates.sort( - reverse=True, - key=lambda candidate: commonprefix( - [ - parsed_url.path, - candidate.path, - ] - ).rfind("/"), - ) - - return urllib.parse.urlunsplit(candidates[0]) - - def _get_new_credentials( - self, - original_url: str, - *, - allow_netrc: bool = True, - allow_keyring: bool = False, - ) -> AuthInfo: - """Find and return credentials for the specified URL.""" - # Split the credentials and netloc from the url. - url, netloc, url_user_password = split_auth_netloc_from_url( - original_url, - ) - - # Start with the credentials embedded in the url - username, password = url_user_password - if username is not None and password is not None: - logger.debug("Found credentials in url for %s", netloc) - return url_user_password - - # Find a matching index url for this request - index_url = self._get_index_url(url) - if index_url: - # Split the credentials from the url. - index_info = split_auth_netloc_from_url(index_url) - if index_info: - index_url, _, index_url_user_password = index_info - logger.debug("Found index url %s", index_url) - - # If an index URL was found, try its embedded credentials - if index_url and index_url_user_password[0] is not None: - username, password = index_url_user_password - if username is not None and password is not None: - logger.debug("Found credentials in index url for %s", netloc) - return index_url_user_password - - # Get creds from netrc if we still don't have them - if allow_netrc: - netrc_auth = get_netrc_auth(original_url) - if netrc_auth: - logger.debug("Found credentials in netrc for %s", netloc) - return netrc_auth - - # If we don't have a password and keyring is available, use it. - if allow_keyring: - # The index url is more specific than the netloc, so try it first - # fmt: off - kr_auth = ( - self._get_keyring_auth(index_url, username) or - self._get_keyring_auth(netloc, username) - ) - # fmt: on - if kr_auth: - logger.debug("Found credentials in keyring for %s", netloc) - return kr_auth - - return username, password - - def _get_url_and_credentials( - self, original_url: str - ) -> tuple[str, str | None, str | None]: - """Return the credentials to use for the provided URL. - - If allowed, netrc and keyring may be used to obtain the - correct credentials. - - Returns (url_without_credentials, username, password). Note - that even if the original URL contains credentials, this - function may return a different username and password. - """ - url, netloc, _ = split_auth_netloc_from_url(original_url) - - # Try to get credentials from original url - username, password = self._get_new_credentials(original_url) - - # If credentials not found, use any stored credentials for this netloc. - # Do this if either the username or the password is missing. - # This accounts for the situation in which the user has specified - # the username in the index url, but the password comes from keyring. - if (username is None or password is None) and netloc in self.passwords: - un, pw = self.passwords[netloc] - # It is possible that the cached credentials are for a different username, - # in which case the cache should be ignored. - if username is None or username == un: - username, password = un, pw - - if username is not None or password is not None: - # Convert the username and password if they're None, so that - # this netloc will show up as "cached" in the conditional above. - # Further, HTTPBasicAuth doesn't accept None, so it makes sense to - # cache the value that is going to be used. - username = username or "" - password = password or "" - - # Store any acquired credentials. - self.passwords[netloc] = (username, password) - - assert ( - # Credentials were found - (username is not None and password is not None) - # Credentials were not found - or (username is None and password is None) - ), f"Could not load credentials from url: {original_url}" - - return url, username, password - - def __call__(self, req: PreparedRequest) -> PreparedRequest: - # Get credentials for this request - assert req.url is not None - url, username, password = self._get_url_and_credentials(req.url) - - # Set the url of the request to the url without any credentials - req.url = url - - if username is not None and password is not None: - # Send the basic auth with this request - req = HTTPBasicAuth(username, password)(req) - - # Attach a hook to handle 401 responses - req.register_hook("response", self.handle_401) - - return req - - # Factored out to allow for easy patching in tests - def _prompt_for_password(self, netloc: str) -> tuple[str | None, str | None, bool]: - username = ask_input(f"User for {netloc}: ") if self.prompting else None - if not username: - return None, None, False - if self.use_keyring: - auth = self._get_keyring_auth(netloc, username) - if auth and auth[0] is not None and auth[1] is not None: - return auth[0], auth[1], False - password = ask_password("Password: ") - return username, password, True - - # Factored out to allow for easy patching in tests - def _should_save_password_to_keyring(self) -> bool: - if ( - not self.prompting - or not self.use_keyring - or not self.keyring_provider.has_keyring - ): - return False - return ask("Save credentials to keyring [y/N]: ", ["y", "n"]) == "y" - - def handle_401(self, resp: Response, **kwargs: Any) -> Response: - # We only care about 401 responses, anything else we want to just - # pass through the actual response - if resp.status_code != 401: - return resp - - username, password = None, None - - # Query the keyring for credentials: - if self.use_keyring: - username, password = self._get_new_credentials( - resp.url, - allow_netrc=False, - allow_keyring=True, - ) - - # We are not able to prompt the user so simply return the response - if not self.prompting and not username and not password: - return resp - - parsed = urllib.parse.urlparse(resp.url) - - # Prompt the user for a new username and password - save = False - if not username and not password: - username, password, save = self._prompt_for_password(parsed.netloc) - - # Store the new username and password to use for future requests - self._credentials_to_save = None - if username is not None and password is not None: - self.passwords[parsed.netloc] = (username, password) - - # Prompt to save the password to keyring - if save and self._should_save_password_to_keyring(): - self._credentials_to_save = Credentials( - url=parsed.netloc, - username=username, - password=password, - ) - - # Consume content and release the original connection to allow our new - # request to reuse the same one. - # The result of the assignment isn't used, it's just needed to consume - # the content. - _ = resp.content - resp.raw.release_conn() - - # Add our new username and password to the request - req = HTTPBasicAuth(username or "", password or "")(resp.request) - req.register_hook("response", self.warn_on_401) - - # On successful request, save the credentials that were used to - # keyring. (Note that if the user responded "no" above, this member - # is not set and nothing will be saved.) - if self._credentials_to_save: - req.register_hook("response", self.save_credentials) - - # Send our new request - new_resp = resp.connection.send(req, **kwargs) - new_resp.history.append(resp) - - return new_resp - - def warn_on_401(self, resp: Response, **kwargs: Any) -> None: - """Response callback to warn about incorrect credentials.""" - if resp.status_code == 401: - logger.warning( - "401 Error, Credentials not correct for %s", - resp.request.url, - ) - - def save_credentials(self, resp: Response, **kwargs: Any) -> None: - """Response callback to save credentials on success.""" - assert ( - self.keyring_provider.has_keyring - ), "should never reach here without keyring" - - creds = self._credentials_to_save - self._credentials_to_save = None - if creds and resp.status_code < 400: - try: - logger.info("Saving credentials to keyring") - self.keyring_provider.save_auth_info( - creds.url, creds.username, creds.password - ) - except Exception: - logger.exception("Failed to save credentials") diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index f96e1781f..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/check.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/check.cpython-314.pyc deleted file mode 100644 index 5e6e5c11b..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/check.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-314.pyc deleted file mode 100644 index 07c09692e..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-314.pyc deleted file mode 100644 index 395a440c2..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 731c7f96d..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-314.pyc deleted file mode 100644 index 8b4b4f82b..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-314.pyc deleted file mode 100644 index 4b084f552..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-314.pyc deleted file mode 100644 index 75f1722a8..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 81b4b8e08..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-314.pyc deleted file mode 100644 index b8d25e27b..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index a1354e90a..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/constructors.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/constructors.cpython-314.pyc deleted file mode 100644 index 4a204d4e8..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/constructors.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/pep723.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/pep723.cpython-314.pyc deleted file mode 100644 index 717e55e8a..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/pep723.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_dependency_group.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_dependency_group.cpython-314.pyc deleted file mode 100644 index c21ec7b66..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_dependency_group.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_file.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_file.cpython-314.pyc deleted file mode 100644 index 43daf2edd..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_file.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_install.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_install.cpython-314.pyc deleted file mode 100644 index ef7cb1460..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/req/__pycache__/req_install.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 397e1c9f3..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/__pycache__/base.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/__pycache__/base.cpython-314.pyc deleted file mode 100644 index 6c22bdf43..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/__pycache__/base.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 4341627c3..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-314.pyc deleted file mode 100644 index b128d583c..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 617bfb492..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-314.pyc deleted file mode 100644 index 43d1a7ff0..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-314.pyc deleted file mode 100644 index 81306fd7c..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-314.pyc deleted file mode 100644 index 860314482..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-314.pyc deleted file mode 100644 index e5fff52f5..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-314.pyc deleted file mode 100644 index 0712d2a95..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-314.pyc deleted file mode 100644 index 862783c8a..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 07af72916..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/compat.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/compat.cpython-314.pyc deleted file mode 100644 index 9331018f9..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/compat.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-314.pyc deleted file mode 100644 index f1d66be6b..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-314.pyc deleted file mode 100644 index 0a0c66807..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-314.pyc deleted file mode 100644 index c0d72bf2f..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-314.pyc deleted file mode 100644 index 7746f72e6..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-314.pyc deleted file mode 100644 index 9a3d39932..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-314.pyc deleted file mode 100644 index f43f6ad21..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/logging.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/logging.cpython-314.pyc deleted file mode 100644 index 39eff00f4..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/logging.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/pylock.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/pylock.cpython-314.pyc deleted file mode 100644 index d71c2e265..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/pylock.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/retry.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/retry.cpython-314.pyc deleted file mode 100644 index a29288488..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/retry.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-314.pyc deleted file mode 100644 index 87e5bd12e..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-314.pyc deleted file mode 100644 index ebb2932f5..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-314.pyc deleted file mode 100644 index 907278cf6..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/pylock.py b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/pylock.py deleted file mode 100644 index 0f7783522..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/utils/pylock.py +++ /dev/null @@ -1,116 +0,0 @@ -from collections.abc import Iterable -from pathlib import Path - -from pip._vendor.packaging.pylock import ( - Package, - PackageArchive, - PackageDirectory, - PackageSdist, - PackageVcs, - PackageWheel, - Pylock, -) -from pip._vendor.packaging.version import Version - -from pip._internal.models.direct_url import ArchiveInfo, DirInfo, VcsInfo -from pip._internal.models.link import Link -from pip._internal.req.req_install import InstallRequirement -from pip._internal.utils.urls import url_to_path - - -def _pylock_package_from_install_requirement( - ireq: InstallRequirement, base_dir: Path -) -> Package: - base_dir = base_dir.resolve() - dist = ireq.get_dist() - download_info = ireq.download_info - assert download_info - package_version = None - package_vcs = None - package_directory = None - package_archive = None - package_sdist = None - package_wheels = None - if ireq.is_direct: - if isinstance(download_info.info, VcsInfo): - package_vcs = PackageVcs( - type=download_info.info.vcs, - url=download_info.url, - path=None, - requested_revision=download_info.info.requested_revision, - commit_id=download_info.info.commit_id, - subdirectory=download_info.subdirectory, - ) - elif isinstance(download_info.info, DirInfo): - package_directory = PackageDirectory( - path=( - Path(url_to_path(download_info.url)) - .resolve() - .relative_to(base_dir) - .as_posix() - ), - editable=( - download_info.info.editable if download_info.info.editable else None - ), - subdirectory=download_info.subdirectory, - ) - elif isinstance(download_info.info, ArchiveInfo): - if not download_info.info.hashes: - raise NotImplementedError() - package_archive = PackageArchive( - url=download_info.url, - path=None, - hashes=download_info.info.hashes, - subdirectory=download_info.subdirectory, - ) - else: - # should never happen - raise NotImplementedError() - else: - package_version = dist.version - if isinstance(download_info.info, ArchiveInfo): - if not download_info.info.hashes: - raise NotImplementedError() - link = Link(download_info.url) - if link.is_wheel: - package_wheels = [ - PackageWheel( - name=link.filename, - url=download_info.url, - hashes=download_info.info.hashes, - ) - ] - else: - package_sdist = PackageSdist( - name=link.filename, - url=download_info.url, - hashes=download_info.info.hashes, - ) - else: - # should never happen - raise NotImplementedError() - return Package( - name=dist.canonical_name, - version=package_version, - vcs=package_vcs, - directory=package_directory, - archive=package_archive, - sdist=package_sdist, - wheels=package_wheels, - ) - - -def pylock_from_install_requirements( - install_requirements: Iterable[InstallRequirement], base_dir: Path -) -> Pylock: - return Pylock( - lock_version=Version("1.0"), - created_by="pip", - packages=sorted( - ( - _pylock_package_from_install_requirement(ireq, base_dir) - for ireq in install_requirements - ), - key=lambda p: p.name, - ), - ) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 5310d5545..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index d76320888..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 8794c93aa..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-314.pyc deleted file mode 100644 index cb311b823..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index af7e5bd8b..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-314.pyc deleted file mode 100644 index b1c6ff0de..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__init__.py deleted file mode 100644 index 090fd5848..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .core import contents, where - -__all__ = ["contents", "where"] -__version__ = "2026.01.04" diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index bc1e7eeb8..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-314.pyc deleted file mode 100644 index b4eb6454d..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-314.pyc deleted file mode 100644 index 24df3547a..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/LICENSE.txt b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/LICENSE.txt deleted file mode 100644 index b9723b85e..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/LICENSE.txt +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2024-present Stephen Rosen - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py deleted file mode 100644 index 9fec20299..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -from ._implementation import ( - CyclicDependencyError, - DependencyGroupInclude, - DependencyGroupResolver, - resolve, -) - -__all__ = ( - "CyclicDependencyError", - "DependencyGroupInclude", - "DependencyGroupResolver", - "resolve", -) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py deleted file mode 100644 index 48ebb0d41..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py +++ /dev/null @@ -1,65 +0,0 @@ -import argparse -import sys - -from ._implementation import resolve -from ._toml_compat import tomllib - - -def main() -> None: - if tomllib is None: - print( - "Usage error: dependency-groups CLI requires tomli or Python 3.11+", - file=sys.stderr, - ) - raise SystemExit(2) - - parser = argparse.ArgumentParser( - description=( - "A dependency-groups CLI. Prints out a resolved group, newline-delimited." - ) - ) - parser.add_argument( - "GROUP_NAME", nargs="*", help="The dependency group(s) to resolve." - ) - parser.add_argument( - "-f", - "--pyproject-file", - default="pyproject.toml", - help="The pyproject.toml file. Defaults to trying in the current directory.", - ) - parser.add_argument( - "-o", - "--output", - help="An output file. Defaults to stdout.", - ) - parser.add_argument( - "-l", - "--list", - action="store_true", - help="List the available dependency groups", - ) - args = parser.parse_args() - - with open(args.pyproject_file, "rb") as fp: - pyproject = tomllib.load(fp) - - dependency_groups_raw = pyproject.get("dependency-groups", {}) - - if args.list: - print(*dependency_groups_raw.keys()) - return - if not args.GROUP_NAME: - print("A GROUP_NAME is required", file=sys.stderr) - raise SystemExit(3) - - content = "\n".join(resolve(dependency_groups_raw, *args.GROUP_NAME)) - - if args.output is None or args.output == "-": - print(content) - else: - with open(args.output, "w", encoding="utf-8") as fp: - print(content, file=fp) - - -if __name__ == "__main__": - main() diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 101f93c60..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/__main__.cpython-314.pyc deleted file mode 100644 index 0d8956869..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/__main__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_implementation.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_implementation.cpython-314.pyc deleted file mode 100644 index c08bb01ed..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_implementation.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_lint_dependency_groups.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_lint_dependency_groups.cpython-314.pyc deleted file mode 100644 index 7672920dc..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_lint_dependency_groups.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_pip_wrapper.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_pip_wrapper.cpython-314.pyc deleted file mode 100644 index b3731428d..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_pip_wrapper.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_toml_compat.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_toml_compat.cpython-314.pyc deleted file mode 100644 index 97589415c..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/__pycache__/_toml_compat.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py deleted file mode 100644 index 64e314a63..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py +++ /dev/null @@ -1,209 +0,0 @@ -from __future__ import annotations - -import dataclasses -import re -from collections.abc import Mapping - -from pip._vendor.packaging.requirements import Requirement - - -def _normalize_name(name: str) -> str: - return re.sub(r"[-_.]+", "-", name).lower() - - -def _normalize_group_names( - dependency_groups: Mapping[str, str | Mapping[str, str]], -) -> Mapping[str, str | Mapping[str, str]]: - original_names: dict[str, list[str]] = {} - normalized_groups = {} - - for group_name, value in dependency_groups.items(): - normed_group_name = _normalize_name(group_name) - original_names.setdefault(normed_group_name, []).append(group_name) - normalized_groups[normed_group_name] = value - - errors = [] - for normed_name, names in original_names.items(): - if len(names) > 1: - errors.append(f"{normed_name} ({', '.join(names)})") - if errors: - raise ValueError(f"Duplicate dependency group names: {', '.join(errors)}") - - return normalized_groups - - -@dataclasses.dataclass -class DependencyGroupInclude: - include_group: str - - -class CyclicDependencyError(ValueError): - """ - An error representing the detection of a cycle. - """ - - def __init__(self, requested_group: str, group: str, include_group: str) -> None: - self.requested_group = requested_group - self.group = group - self.include_group = include_group - - if include_group == group: - reason = f"{group} includes itself" - else: - reason = f"{include_group} -> {group}, {group} -> {include_group}" - super().__init__( - "Cyclic dependency group include while resolving " - f"{requested_group}: {reason}" - ) - - -class DependencyGroupResolver: - """ - A resolver for Dependency Group data. - - This class handles caching, name normalization, cycle detection, and other - parsing requirements. There are only two public methods for exploring the data: - ``lookup()`` and ``resolve()``. - - :param dependency_groups: A mapping, as provided via pyproject - ``[dependency-groups]``. - """ - - def __init__( - self, - dependency_groups: Mapping[str, str | Mapping[str, str]], - ) -> None: - if not isinstance(dependency_groups, Mapping): - raise TypeError("Dependency Groups table is not a mapping") - self.dependency_groups = _normalize_group_names(dependency_groups) - # a map of group names to parsed data - self._parsed_groups: dict[ - str, tuple[Requirement | DependencyGroupInclude, ...] - ] = {} - # a map of group names to their ancestors, used for cycle detection - self._include_graph_ancestors: dict[str, tuple[str, ...]] = {} - # a cache of completed resolutions to Requirement lists - self._resolve_cache: dict[str, tuple[Requirement, ...]] = {} - - def lookup(self, group: str) -> tuple[Requirement | DependencyGroupInclude, ...]: - """ - Lookup a group name, returning the parsed dependency data for that group. - This will not resolve includes. - - :param group: the name of the group to lookup - - :raises ValueError: if the data does not appear to be valid dependency group - data - :raises TypeError: if the data is not a string - :raises LookupError: if group name is absent - :raises packaging.requirements.InvalidRequirement: if a specifier is not valid - """ - if not isinstance(group, str): - raise TypeError("Dependency group name is not a str") - group = _normalize_name(group) - return self._parse_group(group) - - def resolve(self, group: str) -> tuple[Requirement, ...]: - """ - Resolve a dependency group to a list of requirements. - - :param group: the name of the group to resolve - - :raises TypeError: if the inputs appear to be the wrong types - :raises ValueError: if the data does not appear to be valid dependency group - data - :raises LookupError: if group name is absent - :raises packaging.requirements.InvalidRequirement: if a specifier is not valid - """ - if not isinstance(group, str): - raise TypeError("Dependency group name is not a str") - group = _normalize_name(group) - return self._resolve(group, group) - - def _parse_group( - self, group: str - ) -> tuple[Requirement | DependencyGroupInclude, ...]: - # short circuit -- never do the work twice - if group in self._parsed_groups: - return self._parsed_groups[group] - - if group not in self.dependency_groups: - raise LookupError(f"Dependency group '{group}' not found") - - raw_group = self.dependency_groups[group] - if not isinstance(raw_group, list): - raise TypeError(f"Dependency group '{group}' is not a list") - - elements: list[Requirement | DependencyGroupInclude] = [] - for item in raw_group: - if isinstance(item, str): - # packaging.requirements.Requirement parsing ensures that this is a - # valid PEP 508 Dependency Specifier - # raises InvalidRequirement on failure - elements.append(Requirement(item)) - elif isinstance(item, dict): - if tuple(item.keys()) != ("include-group",): - raise ValueError(f"Invalid dependency group item: {item}") - - include_group = next(iter(item.values())) - elements.append(DependencyGroupInclude(include_group=include_group)) - else: - raise ValueError(f"Invalid dependency group item: {item}") - - self._parsed_groups[group] = tuple(elements) - return self._parsed_groups[group] - - def _resolve(self, group: str, requested_group: str) -> tuple[Requirement, ...]: - """ - This is a helper for cached resolution to strings. - - :param group: The name of the group to resolve. - :param requested_group: The group which was used in the original, user-facing - request. - """ - if group in self._resolve_cache: - return self._resolve_cache[group] - - parsed = self._parse_group(group) - - resolved_group = [] - for item in parsed: - if isinstance(item, Requirement): - resolved_group.append(item) - elif isinstance(item, DependencyGroupInclude): - include_group = _normalize_name(item.include_group) - if include_group in self._include_graph_ancestors.get(group, ()): - raise CyclicDependencyError( - requested_group, group, item.include_group - ) - self._include_graph_ancestors[include_group] = ( - *self._include_graph_ancestors.get(group, ()), - group, - ) - resolved_group.extend(self._resolve(include_group, requested_group)) - else: # unreachable - raise NotImplementedError( - f"Invalid dependency group item after parse: {item}" - ) - - self._resolve_cache[group] = tuple(resolved_group) - return self._resolve_cache[group] - - -def resolve( - dependency_groups: Mapping[str, str | Mapping[str, str]], /, *groups: str -) -> tuple[str, ...]: - """ - Resolve a dependency group to a tuple of requirements, as strings. - - :param dependency_groups: the parsed contents of the ``[dependency-groups]`` table - from ``pyproject.toml`` - :param groups: the name of the group(s) to resolve - - :raises TypeError: if the inputs appear to be the wrong types - :raises ValueError: if the data does not appear to be valid dependency group data - :raises LookupError: if group name is absent - :raises packaging.requirements.InvalidRequirement: if a specifier is not valid - """ - resolver = DependencyGroupResolver(dependency_groups) - return tuple(str(r) for group in groups for r in resolver.resolve(group)) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py deleted file mode 100644 index 09454bdc2..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py +++ /dev/null @@ -1,59 +0,0 @@ -from __future__ import annotations - -import argparse -import sys - -from ._implementation import DependencyGroupResolver -from ._toml_compat import tomllib - - -def main(*, argv: list[str] | None = None) -> None: - if tomllib is None: - print( - "Usage error: dependency-groups CLI requires tomli or Python 3.11+", - file=sys.stderr, - ) - raise SystemExit(2) - - parser = argparse.ArgumentParser( - description=( - "Lint Dependency Groups for validity. " - "This will eagerly load and check all of your Dependency Groups." - ) - ) - parser.add_argument( - "-f", - "--pyproject-file", - default="pyproject.toml", - help="The pyproject.toml file. Defaults to trying in the current directory.", - ) - args = parser.parse_args(argv if argv is not None else sys.argv[1:]) - - with open(args.pyproject_file, "rb") as fp: - pyproject = tomllib.load(fp) - dependency_groups_raw = pyproject.get("dependency-groups", {}) - - errors: list[str] = [] - try: - resolver = DependencyGroupResolver(dependency_groups_raw) - except (ValueError, TypeError) as e: - errors.append(f"{type(e).__name__}: {e}") - else: - for groupname in resolver.dependency_groups: - try: - resolver.resolve(groupname) - except (LookupError, ValueError, TypeError) as e: - errors.append(f"{type(e).__name__}: {e}") - - if errors: - print("errors encountered while examining dependency groups:") - for msg in errors: - print(f" {msg}") - sys.exit(1) - else: - print("ok") - sys.exit(0) - - -if __name__ == "__main__": - main() diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py deleted file mode 100644 index f86d8961b..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations - -import argparse -import subprocess -import sys - -from ._implementation import DependencyGroupResolver -from ._toml_compat import tomllib - - -def _invoke_pip(deps: list[str]) -> None: - subprocess.check_call([sys.executable, "-m", "pip", "install", *deps]) - - -def main(*, argv: list[str] | None = None) -> None: - if tomllib is None: - print( - "Usage error: dependency-groups CLI requires tomli or Python 3.11+", - file=sys.stderr, - ) - raise SystemExit(2) - - parser = argparse.ArgumentParser(description="Install Dependency Groups.") - parser.add_argument( - "DEPENDENCY_GROUP", nargs="+", help="The dependency groups to install." - ) - parser.add_argument( - "-f", - "--pyproject-file", - default="pyproject.toml", - help="The pyproject.toml file. Defaults to trying in the current directory.", - ) - args = parser.parse_args(argv if argv is not None else sys.argv[1:]) - - with open(args.pyproject_file, "rb") as fp: - pyproject = tomllib.load(fp) - dependency_groups_raw = pyproject.get("dependency-groups", {}) - - errors: list[str] = [] - resolved: list[str] = [] - try: - resolver = DependencyGroupResolver(dependency_groups_raw) - except (ValueError, TypeError) as e: - errors.append(f"{type(e).__name__}: {e}") - else: - for groupname in args.DEPENDENCY_GROUP: - try: - resolved.extend(str(r) for r in resolver.resolve(groupname)) - except (LookupError, ValueError, TypeError) as e: - errors.append(f"{type(e).__name__}: {e}") - - if errors: - print("errors encountered while examining dependency groups:") - for msg in errors: - print(f" {msg}") - sys.exit(1) - - _invoke_pip(resolved) - - -if __name__ == "__main__": - main() diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py deleted file mode 100644 index 8d6f921c2..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py +++ /dev/null @@ -1,9 +0,0 @@ -try: - import tomllib -except ImportError: - try: - from pip._vendor import tomli as tomllib # type: ignore[no-redef, unused-ignore] - except ModuleNotFoundError: # pragma: no cover - tomllib = None # type: ignore[assignment, unused-ignore] - -__all__ = ("tomllib",) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index f2f67af9e..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-314.pyc deleted file mode 100644 index 797eb9b61..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-314.pyc deleted file mode 100644 index 41fe0d9f6..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index ba445b927..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-314.pyc deleted file mode 100644 index b1e5ee899..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index a6f02651d..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-314.pyc deleted file mode 100644 index 440430156..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/core.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/core.cpython-314.pyc deleted file mode 100644 index e3a363ffa..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/core.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-314.pyc deleted file mode 100644 index c03b76b58..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index e5d230f4d..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-314.pyc deleted file mode 100644 index 72667e1b3..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__init__.py deleted file mode 100644 index 21695a74b..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -__title__ = "packaging" -__summary__ = "Core utilities for Python packages" -__uri__ = "https://github.com/pypa/packaging" - -__version__ = "26.0" - -__author__ = "Donald Stufft and individual contributors" -__email__ = "donald@stufft.io" - -__license__ = "BSD-2-Clause or Apache-2.0" -__copyright__ = f"2014 {__author__}" diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index fc40f12f0..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/_parser.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/_parser.cpython-314.pyc deleted file mode 100644 index d1c9a829f..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/_parser.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-314.pyc deleted file mode 100644 index a39c25e55..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-314.pyc deleted file mode 100644 index 9fb30007f..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/metadata.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/metadata.cpython-314.pyc deleted file mode 100644 index 0a6161dea..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/metadata.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/pylock.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/pylock.cpython-314.pyc deleted file mode 100644 index dd85eeac7..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/pylock.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-314.pyc deleted file mode 100644 index e6616eff4..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-314.pyc deleted file mode 100644 index cdfcacf91..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-314.pyc deleted file mode 100644 index e30e9efb1..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-314.pyc deleted file mode 100644 index 61c7aa048..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-314.pyc deleted file mode 100644 index 9b83ef807..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/_parser.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/_parser.py deleted file mode 100644 index f6c1f5cd2..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/_parser.py +++ /dev/null @@ -1,365 +0,0 @@ -"""Handwritten parser of dependency specifiers. - -The docstring for each __parse_* function contains EBNF-inspired grammar representing -the implementation. -""" - -from __future__ import annotations - -import ast -from typing import List, Literal, NamedTuple, Sequence, Tuple, Union - -from ._tokenizer import DEFAULT_RULES, Tokenizer - - -class Node: - __slots__ = ("value",) - - def __init__(self, value: str) -> None: - self.value = value - - def __str__(self) -> str: - return self.value - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}({self.value!r})>" - - def serialize(self) -> str: - raise NotImplementedError - - -class Variable(Node): - __slots__ = () - - def serialize(self) -> str: - return str(self) - - -class Value(Node): - __slots__ = () - - def serialize(self) -> str: - return f'"{self}"' - - -class Op(Node): - __slots__ = () - - def serialize(self) -> str: - return str(self) - - -MarkerLogical = Literal["and", "or"] -MarkerVar = Union[Variable, Value] -MarkerItem = Tuple[MarkerVar, Op, MarkerVar] -MarkerAtom = Union[MarkerItem, Sequence["MarkerAtom"]] -MarkerList = List[Union["MarkerList", MarkerAtom, MarkerLogical]] - - -class ParsedRequirement(NamedTuple): - name: str - url: str - extras: list[str] - specifier: str - marker: MarkerList | None - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for dependency specifier -# -------------------------------------------------------------------------------------- -def parse_requirement(source: str) -> ParsedRequirement: - return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement: - """ - requirement = WS? IDENTIFIER WS? extras WS? requirement_details - """ - tokenizer.consume("WS") - - name_token = tokenizer.expect( - "IDENTIFIER", expected="package name at the start of dependency specifier" - ) - name = name_token.text - tokenizer.consume("WS") - - extras = _parse_extras(tokenizer) - tokenizer.consume("WS") - - url, specifier, marker = _parse_requirement_details(tokenizer) - tokenizer.expect("END", expected="end of dependency specifier") - - return ParsedRequirement(name, url, extras, specifier, marker) - - -def _parse_requirement_details( - tokenizer: Tokenizer, -) -> tuple[str, str, MarkerList | None]: - """ - requirement_details = AT URL (WS requirement_marker?)? - | specifier WS? (requirement_marker)? - """ - - specifier = "" - url = "" - marker = None - - if tokenizer.check("AT"): - tokenizer.read() - tokenizer.consume("WS") - - url_start = tokenizer.position - url = tokenizer.expect("URL", expected="URL after @").text - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - tokenizer.expect("WS", expected="whitespace after URL") - - # The input might end after whitespace. - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, - span_start=url_start, - expected="semicolon (after URL and whitespace)", - ) - else: - specifier_start = tokenizer.position - specifier = _parse_specifier(tokenizer) - tokenizer.consume("WS") - - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, - span_start=specifier_start, - expected=( - "comma (within version specifier), semicolon (after version specifier)" - if specifier - else "semicolon (after name with no version specifier)" - ), - ) - - return (url, specifier, marker) - - -def _parse_requirement_marker( - tokenizer: Tokenizer, *, span_start: int, expected: str -) -> MarkerList: - """ - requirement_marker = SEMICOLON marker WS? - """ - - if not tokenizer.check("SEMICOLON"): - tokenizer.raise_syntax_error( - f"Expected {expected} or end", - span_start=span_start, - span_end=None, - ) - tokenizer.read() - - marker = _parse_marker(tokenizer) - tokenizer.consume("WS") - - return marker - - -def _parse_extras(tokenizer: Tokenizer) -> list[str]: - """ - extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)? - """ - if not tokenizer.check("LEFT_BRACKET", peek=True): - return [] - - with tokenizer.enclosing_tokens( - "LEFT_BRACKET", - "RIGHT_BRACKET", - around="extras", - ): - tokenizer.consume("WS") - extras = _parse_extras_list(tokenizer) - tokenizer.consume("WS") - - return extras - - -def _parse_extras_list(tokenizer: Tokenizer) -> list[str]: - """ - extras_list = identifier (wsp* ',' wsp* identifier)* - """ - extras: list[str] = [] - - if not tokenizer.check("IDENTIFIER"): - return extras - - extras.append(tokenizer.read().text) - - while True: - tokenizer.consume("WS") - if tokenizer.check("IDENTIFIER", peek=True): - tokenizer.raise_syntax_error("Expected comma between extra names") - elif not tokenizer.check("COMMA"): - break - - tokenizer.read() - tokenizer.consume("WS") - - extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma") - extras.append(extra_token.text) - - return extras - - -def _parse_specifier(tokenizer: Tokenizer) -> str: - """ - specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS - | WS? version_many WS? - """ - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="version specifier", - ): - tokenizer.consume("WS") - parsed_specifiers = _parse_version_many(tokenizer) - tokenizer.consume("WS") - - return parsed_specifiers - - -def _parse_version_many(tokenizer: Tokenizer) -> str: - """ - version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)? - """ - parsed_specifiers = "" - while tokenizer.check("SPECIFIER"): - span_start = tokenizer.position - parsed_specifiers += tokenizer.read().text - if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True): - tokenizer.raise_syntax_error( - ".* suffix can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position + 1, - ) - if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True): - tokenizer.raise_syntax_error( - "Local version label can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position, - ) - tokenizer.consume("WS") - if not tokenizer.check("COMMA"): - break - parsed_specifiers += tokenizer.read().text - tokenizer.consume("WS") - - return parsed_specifiers - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for marker expression -# -------------------------------------------------------------------------------------- -def parse_marker(source: str) -> MarkerList: - return _parse_full_marker(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_full_marker(tokenizer: Tokenizer) -> MarkerList: - retval = _parse_marker(tokenizer) - tokenizer.expect("END", expected="end of marker expression") - return retval - - -def _parse_marker(tokenizer: Tokenizer) -> MarkerList: - """ - marker = marker_atom (BOOLOP marker_atom)+ - """ - expression = [_parse_marker_atom(tokenizer)] - while tokenizer.check("BOOLOP"): - token = tokenizer.read() - expr_right = _parse_marker_atom(tokenizer) - expression.extend((token.text, expr_right)) - return expression - - -def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom: - """ - marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS? - | WS? marker_item WS? - """ - - tokenizer.consume("WS") - if tokenizer.check("LEFT_PARENTHESIS", peek=True): - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="marker expression", - ): - tokenizer.consume("WS") - marker: MarkerAtom = _parse_marker(tokenizer) - tokenizer.consume("WS") - else: - marker = _parse_marker_item(tokenizer) - tokenizer.consume("WS") - return marker - - -def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem: - """ - marker_item = WS? marker_var WS? marker_op WS? marker_var WS? - """ - tokenizer.consume("WS") - marker_var_left = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - marker_op = _parse_marker_op(tokenizer) - tokenizer.consume("WS") - marker_var_right = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - return (marker_var_left, marker_op, marker_var_right) - - -def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar: # noqa: RET503 - """ - marker_var = VARIABLE | QUOTED_STRING - """ - if tokenizer.check("VARIABLE"): - return process_env_var(tokenizer.read().text.replace(".", "_")) - elif tokenizer.check("QUOTED_STRING"): - return process_python_str(tokenizer.read().text) - else: - tokenizer.raise_syntax_error( - message="Expected a marker variable or quoted string" - ) - - -def process_env_var(env_var: str) -> Variable: - if env_var in ("platform_python_implementation", "python_implementation"): - return Variable("platform_python_implementation") - else: - return Variable(env_var) - - -def process_python_str(python_str: str) -> Value: - value = ast.literal_eval(python_str) - return Value(str(value)) - - -def _parse_marker_op(tokenizer: Tokenizer) -> Op: - """ - marker_op = IN | NOT IN | OP - """ - if tokenizer.check("IN"): - tokenizer.read() - return Op("in") - elif tokenizer.check("NOT"): - tokenizer.read() - tokenizer.expect("WS", expected="whitespace after 'not'") - tokenizer.expect("IN", expected="'in' after 'not'") - return Op("not in") - elif tokenizer.check("OP"): - return Op(tokenizer.read().text) - else: - return tokenizer.raise_syntax_error( - "Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in" - ) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/_structures.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/_structures.py deleted file mode 100644 index 225e2eee0..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/_structures.py +++ /dev/null @@ -1,69 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -import typing - - -@typing.final -class InfinityType: - __slots__ = () - - def __repr__(self) -> str: - return "Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return False - - def __le__(self, other: object) -> bool: - return False - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return True - - def __ge__(self, other: object) -> bool: - return True - - def __neg__(self: object) -> "NegativeInfinityType": - return NegativeInfinity - - -Infinity = InfinityType() - - -@typing.final -class NegativeInfinityType: - __slots__ = () - - def __repr__(self) -> str: - return "-Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return True - - def __le__(self, other: object) -> bool: - return True - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return False - - def __ge__(self, other: object) -> bool: - return False - - def __neg__(self: object) -> InfinityType: - return Infinity - - -NegativeInfinity = NegativeInfinityType() diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py deleted file mode 100644 index 335b275fa..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py +++ /dev/null @@ -1,147 +0,0 @@ -####################################################################################### -# -# Adapted from: -# https://github.com/pypa/hatch/blob/5352e44/backend/src/hatchling/licenses/parse.py -# -# MIT License -# -# Copyright (c) 2017-present Ofek Lev -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of this -# software and associated documentation files (the "Software"), to deal in the Software -# without restriction, including without limitation the rights to use, copy, modify, -# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be included in all copies -# or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# -# With additional allowance of arbitrary `LicenseRef-` identifiers, not just -# `LicenseRef-Public-Domain` and `LicenseRef-Proprietary`. -# -####################################################################################### -from __future__ import annotations - -import re -from typing import NewType, cast - -from ._spdx import EXCEPTIONS, LICENSES - -__all__ = [ - "InvalidLicenseExpression", - "NormalizedLicenseExpression", - "canonicalize_license_expression", -] - -license_ref_allowed = re.compile("^[A-Za-z0-9.-]*$") - -NormalizedLicenseExpression = NewType("NormalizedLicenseExpression", str) - - -class InvalidLicenseExpression(ValueError): - """Raised when a license-expression string is invalid - - >>> canonicalize_license_expression("invalid") - Traceback (most recent call last): - ... - packaging.licenses.InvalidLicenseExpression: Invalid license expression: 'invalid' - """ - - -def canonicalize_license_expression( - raw_license_expression: str, -) -> NormalizedLicenseExpression: - if not raw_license_expression: - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) - - # Pad any parentheses so tokenization can be achieved by merely splitting on - # whitespace. - license_expression = raw_license_expression.replace("(", " ( ").replace(")", " ) ") - licenseref_prefix = "LicenseRef-" - license_refs = { - ref.lower(): "LicenseRef-" + ref[len(licenseref_prefix) :] - for ref in license_expression.split() - if ref.lower().startswith(licenseref_prefix.lower()) - } - - # Normalize to lower case so we can look up licenses/exceptions - # and so boolean operators are Python-compatible. - license_expression = license_expression.lower() - - tokens = license_expression.split() - - # Rather than implementing a parenthesis/boolean logic parser, create an - # expression that Python can parse. Everything that is not involved with the - # grammar itself is replaced with the placeholder `False` and the resultant - # expression should become a valid Python expression. - python_tokens = [] - for token in tokens: - if token not in {"or", "and", "with", "(", ")"}: - python_tokens.append("False") - elif token == "with": - python_tokens.append("or") - elif ( - token == "(" - and python_tokens - and python_tokens[-1] not in {"or", "and", "("} - ) or (token == ")" and python_tokens and python_tokens[-1] == "("): - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) - else: - python_tokens.append(token) - - python_expression = " ".join(python_tokens) - try: - compile(python_expression, "", "eval") - except SyntaxError: - message = f"Invalid license expression: {raw_license_expression!r}" - raise InvalidLicenseExpression(message) from None - - # Take a final pass to check for unknown licenses/exceptions. - normalized_tokens = [] - for token in tokens: - if token in {"or", "and", "with", "(", ")"}: - normalized_tokens.append(token.upper()) - continue - - if normalized_tokens and normalized_tokens[-1] == "WITH": - if token not in EXCEPTIONS: - message = f"Unknown license exception: {token!r}" - raise InvalidLicenseExpression(message) - - normalized_tokens.append(EXCEPTIONS[token]["id"]) - else: - if token.endswith("+"): - final_token = token[:-1] - suffix = "+" - else: - final_token = token - suffix = "" - - if final_token.startswith("licenseref-"): - if not license_ref_allowed.match(final_token): - message = f"Invalid licenseref: {final_token!r}" - raise InvalidLicenseExpression(message) - normalized_tokens.append(license_refs[final_token] + suffix) - else: - if final_token not in LICENSES: - message = f"Unknown license: {final_token!r}" - raise InvalidLicenseExpression(message) - normalized_tokens.append(LICENSES[final_token]["id"] + suffix) - - normalized_expression = " ".join(normalized_tokens) - - return cast( - "NormalizedLicenseExpression", - normalized_expression.replace("( ", "(").replace(" )", ")"), - ) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 414874643..000000000 Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/markers.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/markers.py deleted file mode 100644 index ca3706fe4..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/markers.py +++ /dev/null @@ -1,388 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import operator -import os -import platform -import sys -from typing import AbstractSet, Callable, Literal, Mapping, TypedDict, Union, cast - -from ._parser import MarkerAtom, MarkerList, Op, Value, Variable -from ._parser import parse_marker as _parse_marker -from ._tokenizer import ParserSyntaxError -from .specifiers import InvalidSpecifier, Specifier -from .utils import canonicalize_name - -__all__ = [ - "Environment", - "EvaluateContext", - "InvalidMarker", - "Marker", - "UndefinedComparison", - "UndefinedEnvironmentName", - "default_environment", -] - -Operator = Callable[[str, Union[str, AbstractSet[str]]], bool] -EvaluateContext = Literal["metadata", "lock_file", "requirement"] -MARKERS_ALLOWING_SET = {"extras", "dependency_groups"} -MARKERS_REQUIRING_VERSION = { - "implementation_version", - "platform_release", - "python_full_version", - "python_version", -} - - -class InvalidMarker(ValueError): - """ - An invalid marker was found, users should refer to PEP 508. - """ - - -class UndefinedComparison(ValueError): - """ - An invalid operation was attempted on a value that doesn't support it. - """ - - -class UndefinedEnvironmentName(ValueError): - """ - A name was attempted to be used that does not exist inside of the - environment. - """ - - -class Environment(TypedDict): - implementation_name: str - """The implementation's identifier, e.g. ``'cpython'``.""" - - implementation_version: str - """ - The implementation's version, e.g. ``'3.13.0a2'`` for CPython 3.13.0a2, or - ``'7.3.13'`` for PyPy3.10 v7.3.13. - """ - - os_name: str - """ - The value of :py:data:`os.name`. The name of the operating system dependent module - imported, e.g. ``'posix'``. - """ - - platform_machine: str - """ - Returns the machine type, e.g. ``'i386'``. - - An empty string if the value cannot be determined. - """ - - platform_release: str - """ - The system's release, e.g. ``'2.2.0'`` or ``'NT'``. - - An empty string if the value cannot be determined. - """ - - platform_system: str - """ - The system/OS name, e.g. ``'Linux'``, ``'Windows'`` or ``'Java'``. - - An empty string if the value cannot be determined. - """ - - platform_version: str - """ - The system's release version, e.g. ``'#3 on degas'``. - - An empty string if the value cannot be determined. - """ - - python_full_version: str - """ - The Python version as string ``'major.minor.patchlevel'``. - - Note that unlike the Python :py:data:`sys.version`, this value will always include - the patchlevel (it defaults to 0). - """ - - platform_python_implementation: str - """ - A string identifying the Python implementation, e.g. ``'CPython'``. - """ - - python_version: str - """The Python version as string ``'major.minor'``.""" - - sys_platform: str - """ - This string contains a platform identifier that can be used to append - platform-specific components to :py:data:`sys.path`, for instance. - - For Unix systems, except on Linux and AIX, this is the lowercased OS name as - returned by ``uname -s`` with the first part of the version as returned by - ``uname -r`` appended, e.g. ``'sunos5'`` or ``'freebsd8'``, at the time when Python - was built. - """ - - -def _normalize_extras( - result: MarkerList | MarkerAtom | str, -) -> MarkerList | MarkerAtom | str: - if not isinstance(result, tuple): - return result - - lhs, op, rhs = result - if isinstance(lhs, Variable) and lhs.value == "extra": - normalized_extra = canonicalize_name(rhs.value) - rhs = Value(normalized_extra) - elif isinstance(rhs, Variable) and rhs.value == "extra": - normalized_extra = canonicalize_name(lhs.value) - lhs = Value(normalized_extra) - return lhs, op, rhs - - -def _normalize_extra_values(results: MarkerList) -> MarkerList: - """ - Normalize extra values. - """ - - return [_normalize_extras(r) for r in results] - - -def _format_marker( - marker: list[str] | MarkerAtom | str, first: bool | None = True -) -> str: - assert isinstance(marker, (list, tuple, str)) - - # Sometimes we have a structure like [[...]] which is a single item list - # where the single item is itself it's own list. In that case we want skip - # the rest of this function so that we don't get extraneous () on the - # outside. - if ( - isinstance(marker, list) - and len(marker) == 1 - and isinstance(marker[0], (list, tuple)) - ): - return _format_marker(marker[0]) - - if isinstance(marker, list): - inner = (_format_marker(m, first=False) for m in marker) - if first: - return " ".join(inner) - else: - return "(" + " ".join(inner) + ")" - elif isinstance(marker, tuple): - return " ".join([m.serialize() for m in marker]) - else: - return marker - - -_operators: dict[str, Operator] = { - "in": lambda lhs, rhs: lhs in rhs, - "not in": lambda lhs, rhs: lhs not in rhs, - "<": lambda _lhs, _rhs: False, - "<=": operator.eq, - "==": operator.eq, - "!=": operator.ne, - ">=": operator.eq, - ">": lambda _lhs, _rhs: False, -} - - -def _eval_op(lhs: str, op: Op, rhs: str | AbstractSet[str], *, key: str) -> bool: - op_str = op.serialize() - if key in MARKERS_REQUIRING_VERSION: - try: - spec = Specifier(f"{op_str}{rhs}") - except InvalidSpecifier: - pass - else: - return spec.contains(lhs, prereleases=True) - - oper: Operator | None = _operators.get(op_str) - if oper is None: - raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.") - - return oper(lhs, rhs) - - -def _normalize( - lhs: str, rhs: str | AbstractSet[str], key: str -) -> tuple[str, str | AbstractSet[str]]: - # PEP 685 - Comparison of extra names for optional distribution dependencies - # https://peps.python.org/pep-0685/ - # > When comparing extra names, tools MUST normalize the names being - # > compared using the semantics outlined in PEP 503 for names - if key == "extra": - assert isinstance(rhs, str), "extra value must be a string" - # Both sides are normalized at this point already - return (lhs, rhs) - if key in MARKERS_ALLOWING_SET: - if isinstance(rhs, str): # pragma: no cover - return (canonicalize_name(lhs), canonicalize_name(rhs)) - else: - return (canonicalize_name(lhs), {canonicalize_name(v) for v in rhs}) - - # other environment markers don't have such standards - return lhs, rhs - - -def _evaluate_markers( - markers: MarkerList, environment: dict[str, str | AbstractSet[str]] -) -> bool: - groups: list[list[bool]] = [[]] - - for marker in markers: - if isinstance(marker, list): - groups[-1].append(_evaluate_markers(marker, environment)) - elif isinstance(marker, tuple): - lhs, op, rhs = marker - - if isinstance(lhs, Variable): - environment_key = lhs.value - lhs_value = environment[environment_key] - rhs_value = rhs.value - else: - lhs_value = lhs.value - environment_key = rhs.value - rhs_value = environment[environment_key] - - assert isinstance(lhs_value, str), "lhs must be a string" - lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key) - groups[-1].append(_eval_op(lhs_value, op, rhs_value, key=environment_key)) - elif marker == "or": - groups.append([]) - elif marker == "and": - pass - else: # pragma: nocover - raise TypeError(f"Unexpected marker {marker!r}") - - return any(all(item) for item in groups) - - -def format_full_version(info: sys._version_info) -> str: - version = f"{info.major}.{info.minor}.{info.micro}" - kind = info.releaselevel - if kind != "final": - version += kind[0] + str(info.serial) - return version - - -def default_environment() -> Environment: - iver = format_full_version(sys.implementation.version) - implementation_name = sys.implementation.name - return { - "implementation_name": implementation_name, - "implementation_version": iver, - "os_name": os.name, - "platform_machine": platform.machine(), - "platform_release": platform.release(), - "platform_system": platform.system(), - "platform_version": platform.version(), - "python_full_version": platform.python_version(), - "platform_python_implementation": platform.python_implementation(), - "python_version": ".".join(platform.python_version_tuple()[:2]), - "sys_platform": sys.platform, - } - - -class Marker: - def __init__(self, marker: str) -> None: - # Note: We create a Marker object without calling this constructor in - # packaging.requirements.Requirement. If any additional logic is - # added here, make sure to mirror/adapt Requirement. - - # If this fails and throws an error, the repr still expects _markers to - # be defined. - self._markers: MarkerList = [] - - try: - self._markers = _normalize_extra_values(_parse_marker(marker)) - # The attribute `_markers` can be described in terms of a recursive type: - # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]] - # - # For example, the following expression: - # python_version > "3.6" or (python_version == "3.6" and os_name == "unix") - # - # is parsed into: - # [ - # (, ')>, ), - # 'and', - # [ - # (, , ), - # 'or', - # (, , ) - # ] - # ] - except ParserSyntaxError as e: - raise InvalidMarker(str(e)) from e - - def __str__(self) -> str: - return _format_marker(self._markers) - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}('{self}')>" - - def __hash__(self) -> int: - return hash(str(self)) - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Marker): - return NotImplemented - - return str(self) == str(other) - - def evaluate( - self, - environment: Mapping[str, str | AbstractSet[str]] | None = None, - context: EvaluateContext = "metadata", - ) -> bool: - """Evaluate a marker. - - Return the boolean from evaluating the given marker against the - environment. environment is an optional argument to override all or - part of the determined environment. The *context* parameter specifies what - context the markers are being evaluated for, which influences what markers - are considered valid. Acceptable values are "metadata" (for core metadata; - default), "lock_file", and "requirement" (i.e. all other situations). - - The environment is determined from the current Python process. - """ - current_environment = cast( - "dict[str, str | AbstractSet[str]]", default_environment() - ) - if context == "lock_file": - current_environment.update( - extras=frozenset(), dependency_groups=frozenset() - ) - elif context == "metadata": - current_environment["extra"] = "" - - if environment is not None: - current_environment.update(environment) - if "extra" in current_environment: - # The API used to allow setting extra to None. We need to handle - # this case for backwards compatibility. Also skip running - # normalize name if extra is empty. - extra = cast("str | None", current_environment["extra"]) - current_environment["extra"] = canonicalize_name(extra) if extra else "" - - return _evaluate_markers( - self._markers, _repair_python_full_version(current_environment) - ) - - -def _repair_python_full_version( - env: dict[str, str | AbstractSet[str]], -) -> dict[str, str | AbstractSet[str]]: - """ - Work around platform.python_version() returning something that is not PEP 440 - compliant for non-tagged Python builds. - """ - python_full_version = cast("str", env["python_full_version"]) - if python_full_version.endswith("+"): - env["python_full_version"] = f"{python_full_version}local" - return env diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/pylock.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/pylock.py deleted file mode 100644 index a564f1524..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/pylock.py +++ /dev/null @@ -1,635 +0,0 @@ -from __future__ import annotations - -import dataclasses -import logging -import re -from collections.abc import Mapping, Sequence -from dataclasses import dataclass -from datetime import datetime -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Protocol, - TypeVar, -) - -from .markers import Marker -from .specifiers import SpecifierSet -from .utils import NormalizedName, is_normalized_name -from .version import Version - -if TYPE_CHECKING: # pragma: no cover - from pathlib import Path - - from typing_extensions import Self - -_logger = logging.getLogger(__name__) - -__all__ = [ - "Package", - "PackageArchive", - "PackageDirectory", - "PackageSdist", - "PackageVcs", - "PackageWheel", - "Pylock", - "PylockUnsupportedVersionError", - "PylockValidationError", - "is_valid_pylock_path", -] - -_T = TypeVar("_T") -_T2 = TypeVar("_T2") - - -class _FromMappingProtocol(Protocol): # pragma: no cover - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: ... - - -_FromMappingProtocolT = TypeVar("_FromMappingProtocolT", bound=_FromMappingProtocol) - - -_PYLOCK_FILE_NAME_RE = re.compile(r"^pylock\.([^.]+)\.toml$") - - -def is_valid_pylock_path(path: Path) -> bool: - """Check if the given path is a valid pylock file path.""" - return path.name == "pylock.toml" or bool(_PYLOCK_FILE_NAME_RE.match(path.name)) - - -def _toml_key(key: str) -> str: - return key.replace("_", "-") - - -def _toml_value(key: str, value: Any) -> Any: # noqa: ANN401 - if isinstance(value, (Version, Marker, SpecifierSet)): - return str(value) - if isinstance(value, Sequence) and key == "environments": - return [str(v) for v in value] - return value - - -def _toml_dict_factory(data: list[tuple[str, Any]]) -> dict[str, Any]: - return { - _toml_key(key): _toml_value(key, value) - for key, value in data - if value is not None - } - - -def _get(d: Mapping[str, Any], expected_type: type[_T], key: str) -> _T | None: - """Get a value from the dictionary and verify it's the expected type.""" - if (value := d.get(key)) is None: - return None - if not isinstance(value, expected_type): - raise PylockValidationError( - f"Unexpected type {type(value).__name__} " - f"(expected {expected_type.__name__})", - context=key, - ) - return value - - -def _get_required(d: Mapping[str, Any], expected_type: type[_T], key: str) -> _T: - """Get a required value from the dictionary and verify it's the expected type.""" - if (value := _get(d, expected_type, key)) is None: - raise _PylockRequiredKeyError(key) - return value - - -def _get_sequence( - d: Mapping[str, Any], expected_item_type: type[_T], key: str -) -> Sequence[_T] | None: - """Get a list value from the dictionary and verify it's the expected items type.""" - if (value := _get(d, Sequence, key)) is None: # type: ignore[type-abstract] - return None - if isinstance(value, (str, bytes)): - # special case: str and bytes are Sequences, but we want to reject it - raise PylockValidationError( - f"Unexpected type {type(value).__name__} (expected Sequence)", - context=key, - ) - for i, item in enumerate(value): - if not isinstance(item, expected_item_type): - raise PylockValidationError( - f"Unexpected type {type(item).__name__} " - f"(expected {expected_item_type.__name__})", - context=f"{key}[{i}]", - ) - return value - - -def _get_as( - d: Mapping[str, Any], - expected_type: type[_T], - target_type: Callable[[_T], _T2], - key: str, -) -> _T2 | None: - """Get a value from the dictionary, verify it's the expected type, - and convert to the target type. - - This assumes the target_type constructor accepts the value. - """ - if (value := _get(d, expected_type, key)) is None: - return None - try: - return target_type(value) - except Exception as e: - raise PylockValidationError(e, context=key) from e - - -def _get_required_as( - d: Mapping[str, Any], - expected_type: type[_T], - target_type: Callable[[_T], _T2], - key: str, -) -> _T2: - """Get a required value from the dict, verify it's the expected type, - and convert to the target type.""" - if (value := _get_as(d, expected_type, target_type, key)) is None: - raise _PylockRequiredKeyError(key) - return value - - -def _get_sequence_as( - d: Mapping[str, Any], - expected_item_type: type[_T], - target_item_type: Callable[[_T], _T2], - key: str, -) -> list[_T2] | None: - """Get list value from dictionary and verify expected items type.""" - if (value := _get_sequence(d, expected_item_type, key)) is None: - return None - result = [] - try: - for item in value: - typed_item = target_item_type(item) - result.append(typed_item) - except Exception as e: - raise PylockValidationError(e, context=f"{key}[{len(result)}]") from e - return result - - -def _get_object( - d: Mapping[str, Any], target_type: type[_FromMappingProtocolT], key: str -) -> _FromMappingProtocolT | None: - """Get a dictionary value from the dictionary and convert it to a dataclass.""" - if (value := _get(d, Mapping, key)) is None: # type: ignore[type-abstract] - return None - try: - return target_type._from_dict(value) - except Exception as e: - raise PylockValidationError(e, context=key) from e - - -def _get_sequence_of_objects( - d: Mapping[str, Any], target_item_type: type[_FromMappingProtocolT], key: str -) -> list[_FromMappingProtocolT] | None: - """Get a list value from the dictionary and convert its items to a dataclass.""" - if (value := _get_sequence(d, Mapping, key)) is None: # type: ignore[type-abstract] - return None - result: list[_FromMappingProtocolT] = [] - try: - for item in value: - typed_item = target_item_type._from_dict(item) - result.append(typed_item) - except Exception as e: - raise PylockValidationError(e, context=f"{key}[{len(result)}]") from e - return result - - -def _get_required_sequence_of_objects( - d: Mapping[str, Any], target_item_type: type[_FromMappingProtocolT], key: str -) -> Sequence[_FromMappingProtocolT]: - """Get a required list value from the dictionary and convert its items to a - dataclass.""" - if (result := _get_sequence_of_objects(d, target_item_type, key)) is None: - raise _PylockRequiredKeyError(key) - return result - - -def _validate_normalized_name(name: str) -> NormalizedName: - """Validate that a string is a NormalizedName.""" - if not is_normalized_name(name): - raise PylockValidationError(f"Name {name!r} is not normalized") - return NormalizedName(name) - - -def _validate_path_url(path: str | None, url: str | None) -> None: - if not path and not url: - raise PylockValidationError("path or url must be provided") - - -def _validate_hashes(hashes: Mapping[str, Any]) -> Mapping[str, Any]: - if not hashes: - raise PylockValidationError("At least one hash must be provided") - if not all(isinstance(hash_val, str) for hash_val in hashes.values()): - raise PylockValidationError("Hash values must be strings") - return hashes - - -class PylockValidationError(Exception): - """Raised when when input data is not spec-compliant.""" - - context: str | None = None - message: str - - def __init__( - self, - cause: str | Exception, - *, - context: str | None = None, - ) -> None: - if isinstance(cause, PylockValidationError): - if cause.context: - self.context = ( - f"{context}.{cause.context}" if context else cause.context - ) - else: - self.context = context - self.message = cause.message - else: - self.context = context - self.message = str(cause) - - def __str__(self) -> str: - if self.context: - return f"{self.message} in {self.context!r}" - return self.message - - -class _PylockRequiredKeyError(PylockValidationError): - def __init__(self, key: str) -> None: - super().__init__("Missing required value", context=key) - - -class PylockUnsupportedVersionError(PylockValidationError): - """Raised when encountering an unsupported `lock_version`.""" - - -@dataclass(frozen=True, init=False) -class PackageVcs: - type: str - url: str | None = None - path: str | None = None - requested_revision: str | None = None - commit_id: str # type: ignore[misc] - subdirectory: str | None = None - - def __init__( - self, - *, - type: str, - url: str | None = None, - path: str | None = None, - requested_revision: str | None = None, - commit_id: str, - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "type", type) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "requested_revision", requested_revision) - object.__setattr__(self, "commit_id", commit_id) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_vcs = cls( - type=_get_required(d, str, "type"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - requested_revision=_get(d, str, "requested-revision"), - commit_id=_get_required(d, str, "commit-id"), - subdirectory=_get(d, str, "subdirectory"), - ) - _validate_path_url(package_vcs.path, package_vcs.url) - return package_vcs - - -@dataclass(frozen=True, init=False) -class PackageDirectory: - path: str - editable: bool | None = None - subdirectory: str | None = None - - def __init__( - self, - *, - path: str, - editable: bool | None = None, - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "path", path) - object.__setattr__(self, "editable", editable) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - return cls( - path=_get_required(d, str, "path"), - editable=_get(d, bool, "editable"), - subdirectory=_get(d, str, "subdirectory"), - ) - - -@dataclass(frozen=True, init=False) -class PackageArchive: - url: str | None = None - path: str | None = None - size: int | None = None - upload_time: datetime | None = None - hashes: Mapping[str, str] # type: ignore[misc] - subdirectory: str | None = None - - def __init__( - self, - *, - url: str | None = None, - path: str | None = None, - size: int | None = None, - upload_time: datetime | None = None, - hashes: Mapping[str, str], - subdirectory: str | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "hashes", hashes) - object.__setattr__(self, "subdirectory", subdirectory) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_archive = cls( - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - upload_time=_get(d, datetime, "upload-time"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - subdirectory=_get(d, str, "subdirectory"), - ) - _validate_path_url(package_archive.path, package_archive.url) - return package_archive - - -@dataclass(frozen=True, init=False) -class PackageSdist: - name: str | None = None - upload_time: datetime | None = None - url: str | None = None - path: str | None = None - size: int | None = None - hashes: Mapping[str, str] # type: ignore[misc] - - def __init__( - self, - *, - name: str | None = None, - upload_time: datetime | None = None, - url: str | None = None, - path: str | None = None, - size: int | None = None, - hashes: Mapping[str, str], - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "hashes", hashes) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_sdist = cls( - name=_get(d, str, "name"), - upload_time=_get(d, datetime, "upload-time"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - ) - _validate_path_url(package_sdist.path, package_sdist.url) - return package_sdist - - -@dataclass(frozen=True, init=False) -class PackageWheel: - name: str | None = None - upload_time: datetime | None = None - url: str | None = None - path: str | None = None - size: int | None = None - hashes: Mapping[str, str] # type: ignore[misc] - - def __init__( - self, - *, - name: str | None = None, - upload_time: datetime | None = None, - url: str | None = None, - path: str | None = None, - size: int | None = None, - hashes: Mapping[str, str], - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "upload_time", upload_time) - object.__setattr__(self, "url", url) - object.__setattr__(self, "path", path) - object.__setattr__(self, "size", size) - object.__setattr__(self, "hashes", hashes) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package_wheel = cls( - name=_get(d, str, "name"), - upload_time=_get(d, datetime, "upload-time"), - url=_get(d, str, "url"), - path=_get(d, str, "path"), - size=_get(d, int, "size"), - hashes=_get_required_as(d, Mapping, _validate_hashes, "hashes"), # type: ignore[type-abstract] - ) - _validate_path_url(package_wheel.path, package_wheel.url) - return package_wheel - - -@dataclass(frozen=True, init=False) -class Package: - name: NormalizedName - version: Version | None = None - marker: Marker | None = None - requires_python: SpecifierSet | None = None - dependencies: Sequence[Mapping[str, Any]] | None = None - vcs: PackageVcs | None = None - directory: PackageDirectory | None = None - archive: PackageArchive | None = None - index: str | None = None - sdist: PackageSdist | None = None - wheels: Sequence[PackageWheel] | None = None - attestation_identities: Sequence[Mapping[str, Any]] | None = None - tool: Mapping[str, Any] | None = None - - def __init__( - self, - *, - name: NormalizedName, - version: Version | None = None, - marker: Marker | None = None, - requires_python: SpecifierSet | None = None, - dependencies: Sequence[Mapping[str, Any]] | None = None, - vcs: PackageVcs | None = None, - directory: PackageDirectory | None = None, - archive: PackageArchive | None = None, - index: str | None = None, - sdist: PackageSdist | None = None, - wheels: Sequence[PackageWheel] | None = None, - attestation_identities: Sequence[Mapping[str, Any]] | None = None, - tool: Mapping[str, Any] | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "name", name) - object.__setattr__(self, "version", version) - object.__setattr__(self, "marker", marker) - object.__setattr__(self, "requires_python", requires_python) - object.__setattr__(self, "dependencies", dependencies) - object.__setattr__(self, "vcs", vcs) - object.__setattr__(self, "directory", directory) - object.__setattr__(self, "archive", archive) - object.__setattr__(self, "index", index) - object.__setattr__(self, "sdist", sdist) - object.__setattr__(self, "wheels", wheels) - object.__setattr__(self, "attestation_identities", attestation_identities) - object.__setattr__(self, "tool", tool) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - package = cls( - name=_get_required_as(d, str, _validate_normalized_name, "name"), - version=_get_as(d, str, Version, "version"), - requires_python=_get_as(d, str, SpecifierSet, "requires-python"), - dependencies=_get_sequence(d, Mapping, "dependencies"), # type: ignore[type-abstract] - marker=_get_as(d, str, Marker, "marker"), - vcs=_get_object(d, PackageVcs, "vcs"), - directory=_get_object(d, PackageDirectory, "directory"), - archive=_get_object(d, PackageArchive, "archive"), - index=_get(d, str, "index"), - sdist=_get_object(d, PackageSdist, "sdist"), - wheels=_get_sequence_of_objects(d, PackageWheel, "wheels"), - attestation_identities=_get_sequence(d, Mapping, "attestation-identities"), # type: ignore[type-abstract] - tool=_get(d, Mapping, "tool"), # type: ignore[type-abstract] - ) - distributions = bool(package.sdist) + len(package.wheels or []) - direct_urls = ( - bool(package.vcs) + bool(package.directory) + bool(package.archive) - ) - if distributions > 0 and direct_urls > 0: - raise PylockValidationError( - "None of vcs, directory, archive must be set if sdist or wheels are set" - ) - if distributions == 0 and direct_urls != 1: - raise PylockValidationError( - "Exactly one of vcs, directory, archive must be set " - "if sdist and wheels are not set" - ) - try: - for i, attestation_identity in enumerate( # noqa: B007 - package.attestation_identities or [] - ): - _get_required(attestation_identity, str, "kind") - except Exception as e: - raise PylockValidationError( - e, context=f"attestation-identities[{i}]" - ) from e - return package - - @property - def is_direct(self) -> bool: - return not (self.sdist or self.wheels) - - -@dataclass(frozen=True, init=False) -class Pylock: - """A class representing a pylock file.""" - - lock_version: Version - environments: Sequence[Marker] | None = None - requires_python: SpecifierSet | None = None - extras: Sequence[NormalizedName] | None = None - dependency_groups: Sequence[str] | None = None - default_groups: Sequence[str] | None = None - created_by: str # type: ignore[misc] - packages: Sequence[Package] # type: ignore[misc] - tool: Mapping[str, Any] | None = None - - def __init__( - self, - *, - lock_version: Version, - environments: Sequence[Marker] | None = None, - requires_python: SpecifierSet | None = None, - extras: Sequence[NormalizedName] | None = None, - dependency_groups: Sequence[str] | None = None, - default_groups: Sequence[str] | None = None, - created_by: str, - packages: Sequence[Package], - tool: Mapping[str, Any] | None = None, - ) -> None: - # In Python 3.10+ make dataclass kw_only=True and remove __init__ - object.__setattr__(self, "lock_version", lock_version) - object.__setattr__(self, "environments", environments) - object.__setattr__(self, "requires_python", requires_python) - object.__setattr__(self, "extras", extras) - object.__setattr__(self, "dependency_groups", dependency_groups) - object.__setattr__(self, "default_groups", default_groups) - object.__setattr__(self, "created_by", created_by) - object.__setattr__(self, "packages", packages) - object.__setattr__(self, "tool", tool) - - @classmethod - def _from_dict(cls, d: Mapping[str, Any]) -> Self: - pylock = cls( - lock_version=_get_required_as(d, str, Version, "lock-version"), - environments=_get_sequence_as(d, str, Marker, "environments"), - extras=_get_sequence_as(d, str, _validate_normalized_name, "extras"), - dependency_groups=_get_sequence(d, str, "dependency-groups"), - default_groups=_get_sequence(d, str, "default-groups"), - created_by=_get_required(d, str, "created-by"), - requires_python=_get_as(d, str, SpecifierSet, "requires-python"), - packages=_get_required_sequence_of_objects(d, Package, "packages"), - tool=_get(d, Mapping, "tool"), # type: ignore[type-abstract] - ) - if not Version("1") <= pylock.lock_version < Version("2"): - raise PylockUnsupportedVersionError( - f"pylock version {pylock.lock_version} is not supported" - ) - if pylock.lock_version > Version("1.0"): - _logger.warning( - "pylock minor version %s is not supported", pylock.lock_version - ) - return pylock - - @classmethod - def from_dict(cls, d: Mapping[str, Any], /) -> Self: - """Create and validate a Pylock instance from a TOML dictionary. - - Raises :class:`PylockValidationError` if the input data is not - spec-compliant. - """ - return cls._from_dict(d) - - def to_dict(self) -> Mapping[str, Any]: - """Convert the Pylock instance to a TOML dictionary.""" - return dataclasses.asdict(self, dict_factory=_toml_dict_factory) - - def validate(self) -> None: - """Validate the Pylock instance against the specification. - - Raises :class:`PylockValidationError` otherwise.""" - self.from_dict(self.to_dict()) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/requirements.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/requirements.py deleted file mode 100644 index 3079be69b..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/requirements.py +++ /dev/null @@ -1,86 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import annotations - -from typing import Iterator - -from ._parser import parse_requirement as _parse_requirement -from ._tokenizer import ParserSyntaxError -from .markers import Marker, _normalize_extra_values -from .specifiers import SpecifierSet -from .utils import canonicalize_name - - -class InvalidRequirement(ValueError): - """ - An invalid requirement was found, users should refer to PEP 508. - """ - - -class Requirement: - """Parse a requirement. - - Parse a given requirement string into its parts, such as name, specifier, - URL, and extras. Raises InvalidRequirement on a badly-formed requirement - string. - """ - - # TODO: Can we test whether something is contained within a requirement? - # If so how do we do that? Do we need to test against the _name_ of - # the thing as well as the version? What about the markers? - # TODO: Can we normalize the name and extra name? - - def __init__(self, requirement_string: str) -> None: - try: - parsed = _parse_requirement(requirement_string) - except ParserSyntaxError as e: - raise InvalidRequirement(str(e)) from e - - self.name: str = parsed.name - self.url: str | None = parsed.url or None - self.extras: set[str] = set(parsed.extras or []) - self.specifier: SpecifierSet = SpecifierSet(parsed.specifier) - self.marker: Marker | None = None - if parsed.marker is not None: - self.marker = Marker.__new__(Marker) - self.marker._markers = _normalize_extra_values(parsed.marker) - - def _iter_parts(self, name: str) -> Iterator[str]: - yield name - - if self.extras: - formatted_extras = ",".join(sorted(self.extras)) - yield f"[{formatted_extras}]" - - if self.specifier: - yield str(self.specifier) - - if self.url: - yield f" @ {self.url}" - if self.marker: - yield " " - - if self.marker: - yield f"; {self.marker}" - - def __str__(self) -> str: - return "".join(self._iter_parts(self.name)) - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}('{self}')>" - - def __hash__(self) -> int: - return hash(tuple(self._iter_parts(canonicalize_name(self.name)))) - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Requirement): - return NotImplemented - - return ( - canonicalize_name(self.name) == canonicalize_name(other.name) - and self.extras == other.extras - and self.specifier == other.specifier - and self.url == other.url - and self.marker == other.marker - ) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/specifiers.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/specifiers.py deleted file mode 100644 index e4b9c442e..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/specifiers.py +++ /dev/null @@ -1,1068 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from pip._vendor.packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier - from pip._vendor.packaging.version import Version -""" - -from __future__ import annotations - -import abc -import itertools -import re -from typing import Callable, Final, Iterable, Iterator, TypeVar, Union - -from .utils import canonicalize_version -from .version import InvalidVersion, Version - -UnparsedVersion = Union[Version, str] -UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion) -CallableOperator = Callable[[Version, str], bool] - - -def _coerce_version(version: UnparsedVersion) -> Version | None: - if not isinstance(version, Version): - try: - version = Version(version) - except InvalidVersion: - return None - return version - - -def _public_version(version: Version) -> Version: - return version.__replace__(local=None) - - -def _base_version(version: Version) -> Version: - return version.__replace__(pre=None, post=None, dev=None, local=None) - - -class InvalidSpecifier(ValueError): - """ - Raised when attempting to create a :class:`Specifier` with a specifier - string that is invalid. - - >>> Specifier("lolwat") - Traceback (most recent call last): - ... - packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat' - """ - - -class BaseSpecifier(metaclass=abc.ABCMeta): - __slots__ = () - __match_args__ = ("_str",) - - @property - def _str(self) -> str: - """Internal property for match_args""" - return str(self) - - @abc.abstractmethod - def __str__(self) -> str: - """ - Returns the str representation of this Specifier-like object. This - should be representative of the Specifier itself. - """ - - @abc.abstractmethod - def __hash__(self) -> int: - """ - Returns a hash value for this Specifier-like object. - """ - - @abc.abstractmethod - def __eq__(self, other: object) -> bool: - """ - Returns a boolean representing whether or not the two Specifier-like - objects are equal. - - :param other: The other object to check against. - """ - - @property - @abc.abstractmethod - def prereleases(self) -> bool | None: - """Whether or not pre-releases as a whole are allowed. - - This can be set to either ``True`` or ``False`` to explicitly enable or disable - prereleases or it can be set to ``None`` (the default) to use default semantics. - """ - - @prereleases.setter # noqa: B027 - def prereleases(self, value: bool) -> None: - """Setter for :attr:`prereleases`. - - :param value: The value to set. - """ - - @abc.abstractmethod - def contains(self, item: str, prereleases: bool | None = None) -> bool: - """ - Determines if the given item is contained within this specifier. - """ - - @abc.abstractmethod - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """ - Takes an iterable of items and filters them so that only items which - are contained within this specifier are allowed in it. - """ - - -class Specifier(BaseSpecifier): - """This class abstracts handling of version specifiers. - - .. tip:: - - It is generally not required to instantiate this manually. You should instead - prefer to work with :class:`SpecifierSet` instead, which can parse - comma-separated version specifiers (which is what package metadata contains). - """ - - __slots__ = ("_prereleases", "_spec", "_spec_version") - - _operator_regex_str = r""" - (?P(~=|==|!=|<=|>=|<|>|===)) - """ - _version_regex_str = r""" - (?P - (?: - # The identity operators allow for an escape hatch that will - # do an exact string match of the version you wish to install. - # This will not be parsed by PEP 440 and we cannot determine - # any semantic meaning from it. This operator is discouraged - # but included entirely as an escape hatch. - (?<====) # Only match for the identity operator - \s* - [^\s;)]* # The arbitrary version can be just about anything, - # we match everything except for whitespace, a - # semi-colon for marker support, and a closing paren - # since versions can be enclosed in them. - ) - | - (?: - # The (non)equality operators allow for wild card and local - # versions to be specified so we have to define these two - # operators separately to enable that. - (?<===|!=) # Only match for equals and not equals - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)* # release - - # You cannot use a wild card and a pre-release, post-release, a dev or - # local version together so group them with a | and make them optional. - (?: - \.\* # Wild card syntax of .* - | - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local - )? - ) - | - (?: - # The compatible operator requires at least two digits in the - # release segment. - (?<=~=) # Only match for the compatible operator - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - ) - | - (?: - # All other operators only allow a sub set of what the - # (non)equality operators do. Specifically they do not allow - # local versions to be specified nor do they allow the prefix - # matching wild cards. - (?=": "greater_than_equal", - "<": "less_than", - ">": "greater_than", - "===": "arbitrary", - } - - def __init__(self, spec: str = "", prereleases: bool | None = None) -> None: - """Initialize a Specifier instance. - - :param spec: - The string representation of a specifier which will be parsed and - normalized before use. - :param prereleases: - This tells the specifier if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - :raises InvalidSpecifier: - If the given specifier is invalid (i.e. bad syntax). - """ - match = self._regex.fullmatch(spec) - if not match: - raise InvalidSpecifier(f"Invalid specifier: {spec!r}") - - self._spec: tuple[str, str] = ( - match.group("operator").strip(), - match.group("version").strip(), - ) - - # Store whether or not this Specifier should accept prereleases - self._prereleases = prereleases - - # Specifier version cache - self._spec_version: tuple[str, Version] | None = None - - def _get_spec_version(self, version: str) -> Version | None: - """One element cache, as only one spec Version is needed per Specifier.""" - if self._spec_version is not None and self._spec_version[0] == version: - return self._spec_version[1] - - version_specifier = _coerce_version(version) - if version_specifier is None: - return None - - self._spec_version = (version, version_specifier) - return version_specifier - - def _require_spec_version(self, version: str) -> Version: - """Get spec version, asserting it's valid (not for === operator). - - This method should only be called for operators where version - strings are guaranteed to be valid PEP 440 versions (not ===). - """ - spec_version = self._get_spec_version(version) - assert spec_version is not None - return spec_version - - @property - def prereleases(self) -> bool | None: - # If there is an explicit prereleases set for this, then we'll just - # blindly use that. - if self._prereleases is not None: - return self._prereleases - - # Only the "!=" operator does not imply prereleases when - # the version in the specifier is a prerelease. - operator, version_str = self._spec - if operator != "!=": - # The == specifier with trailing .* cannot include prereleases - # e.g. "==1.0a1.*" is not valid. - if operator == "==" and version_str.endswith(".*"): - return False - - # "===" can have arbitrary string versions, so we cannot parse - # those, we take prereleases as unknown (None) for those. - version = self._get_spec_version(version_str) - if version is None: - return None - - # For all other operators, use the check if spec Version - # object implies pre-releases. - if version.is_prerelease: - return True - - return False - - @prereleases.setter - def prereleases(self, value: bool | None) -> None: - self._prereleases = value - - @property - def operator(self) -> str: - """The operator of this specifier. - - >>> Specifier("==1.2.3").operator - '==' - """ - return self._spec[0] - - @property - def version(self) -> str: - """The version of this specifier. - - >>> Specifier("==1.2.3").version - '1.2.3' - """ - return self._spec[1] - - def __repr__(self) -> str: - """A representation of the Specifier that shows all internal state. - - >>> Specifier('>=1.0.0') - =1.0.0')> - >>> Specifier('>=1.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> Specifier('>=1.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"<{self.__class__.__name__}({str(self)!r}{pre})>" - - def __str__(self) -> str: - """A string representation of the Specifier that can be round-tripped. - - >>> str(Specifier('>=1.0.0')) - '>=1.0.0' - >>> str(Specifier('>=1.0.0', prereleases=False)) - '>=1.0.0' - """ - return "{}{}".format(*self._spec) - - @property - def _canonical_spec(self) -> tuple[str, str]: - operator, version = self._spec - if operator == "===" or version.endswith(".*"): - return operator, version - - spec_version = self._require_spec_version(version) - - canonical_version = canonicalize_version( - spec_version, strip_trailing_zero=(operator != "~=") - ) - - return operator, canonical_version - - def __hash__(self) -> int: - return hash(self._canonical_spec) - - def __eq__(self, other: object) -> bool: - """Whether or not the two Specifier-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0") - True - >>> (Specifier("==1.2.3", prereleases=False) == - ... Specifier("==1.2.3", prereleases=True)) - True - >>> Specifier("==1.2.3") == "==1.2.3" - True - >>> Specifier("==1.2.3") == Specifier("==1.2.4") - False - >>> Specifier("==1.2.3") == Specifier("~=1.2.3") - False - """ - if isinstance(other, str): - try: - other = self.__class__(str(other)) - except InvalidSpecifier: - return NotImplemented - elif not isinstance(other, self.__class__): - return NotImplemented - - return self._canonical_spec == other._canonical_spec - - def _get_operator(self, op: str) -> CallableOperator: - operator_callable: CallableOperator = getattr( - self, f"_compare_{self._operators[op]}" - ) - return operator_callable - - def _compare_compatible(self, prospective: Version, spec: str) -> bool: - # Compatible releases have an equivalent combination of >= and ==. That - # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to - # implement this in terms of the other specifiers instead of - # implementing it ourselves. The only thing we need to do is construct - # the other specifiers. - - # We want everything but the last item in the version, but we want to - # ignore suffix segments. - prefix = _version_join( - list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1] - ) - - # Add the prefix notation to the end of our string - prefix += ".*" - - return self._get_operator(">=")(prospective, spec) and self._get_operator("==")( - prospective, prefix - ) - - def _compare_equal(self, prospective: Version, spec: str) -> bool: - # We need special logic to handle prefix matching - if spec.endswith(".*"): - # In the case of prefix matching we want to ignore local segment. - normalized_prospective = canonicalize_version( - _public_version(prospective), strip_trailing_zero=False - ) - # Get the normalized version string ignoring the trailing .* - normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False) - # Split the spec out by bangs and dots, and pretend that there is - # an implicit dot in between a release segment and a pre-release segment. - split_spec = _version_split(normalized_spec) - - # Split the prospective version out by bangs and dots, and pretend - # that there is an implicit dot in between a release segment and - # a pre-release segment. - split_prospective = _version_split(normalized_prospective) - - # 0-pad the prospective version before shortening it to get the correct - # shortened version. - padded_prospective, _ = _pad_version(split_prospective, split_spec) - - # Shorten the prospective version to be the same length as the spec - # so that we can determine if the specifier is a prefix of the - # prospective version or not. - shortened_prospective = padded_prospective[: len(split_spec)] - - return shortened_prospective == split_spec - else: - # Convert our spec string into a Version - spec_version = self._require_spec_version(spec) - - # If the specifier does not have a local segment, then we want to - # act as if the prospective version also does not have a local - # segment. - if not spec_version.local: - prospective = _public_version(prospective) - - return prospective == spec_version - - def _compare_not_equal(self, prospective: Version, spec: str) -> bool: - return not self._compare_equal(prospective, spec) - - def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool: - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return _public_version(prospective) <= self._require_spec_version(spec) - - def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool: - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return _public_version(prospective) >= self._require_spec_version(spec) - - def _compare_less_than(self, prospective: Version, spec_str: str) -> bool: - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = self._require_spec_version(spec_str) - - # Check to see if the prospective version is less than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective < spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a pre-release version, that we do not accept pre-release - # versions for the version mentioned in the specifier (e.g. <3.1 should - # not match 3.1.dev0, but should match 3.0.dev0). - if ( - not spec.is_prerelease - and prospective.is_prerelease - and _base_version(prospective) == _base_version(spec) - ): - return False - - # If we've gotten to here, it means that prospective version is both - # less than the spec version *and* it's not a pre-release of the same - # version in the spec. - return True - - def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool: - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = self._require_spec_version(spec_str) - - # Check to see if the prospective version is greater than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective > spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a post-release version, that we do not accept - # post-release versions for the version mentioned in the specifier - # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). - if ( - not spec.is_postrelease - and prospective.is_postrelease - and _base_version(prospective) == _base_version(spec) - ): - return False - - # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is technically greater than, to match. - if prospective.local is not None and _base_version( - prospective - ) == _base_version(spec): - return False - - # If we've gotten to here, it means that prospective version is both - # greater than the spec version *and* it's not a pre-release of the - # same version in the spec. - return True - - def _compare_arbitrary(self, prospective: Version | str, spec: str) -> bool: - return str(prospective).lower() == str(spec).lower() - - def __contains__(self, item: str | Version) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in Specifier(">=1.2.3") - True - >>> Version("1.2.3") in Specifier(">=1.2.3") - True - >>> "1.0.0" in Specifier(">=1.2.3") - False - >>> "1.3.0a1" in Specifier(">=1.2.3") - True - >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True) - True - """ - return self.contains(item) - - def contains(self, item: UnparsedVersion, prereleases: bool | None = None) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this Specifier. If set to - ``None`` (the default), it will follow the recommendation from - :pep:`440` and match prereleases, as there are no other versions. - - >>> Specifier(">=1.2.3").contains("1.2.3") - True - >>> Specifier(">=1.2.3").contains(Version("1.2.3")) - True - >>> Specifier(">=1.2.3").contains("1.0.0") - False - >>> Specifier(">=1.2.3").contains("1.3.0a1") - True - >>> Specifier(">=1.2.3", prereleases=False).contains("1.3.0a1") - False - >>> Specifier(">=1.2.3").contains("1.3.0a1") - True - """ - - return bool(list(self.filter([item], prereleases=prereleases))) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifier. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases if there are no other versions. - - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")])) - ['1.2.3', '1.3', ] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"])) - ['1.5a1'] - >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - """ - prereleases_versions = [] - found_non_prereleases = False - - # Determine if to include prereleases by default - include_prereleases = ( - prereleases if prereleases is not None else self.prereleases - ) - - # Get the matching operator - operator_callable = self._get_operator(self.operator) - - # Filter versions - for version in iterable: - parsed_version = _coerce_version(version) - if parsed_version is None: - # === operator can match arbitrary (non-version) strings - if self.operator == "===" and self._compare_arbitrary( - version, self.version - ): - yield version - elif operator_callable(parsed_version, self.version): - # If it's not a prerelease or prereleases are allowed, yield it directly - if not parsed_version.is_prerelease or include_prereleases: - found_non_prereleases = True - yield version - # Otherwise collect prereleases for potential later use - elif prereleases is None and self._prereleases is not False: - prereleases_versions.append(version) - - # If no non-prereleases were found and prereleases weren't - # explicitly forbidden, yield the collected prereleases - if ( - not found_non_prereleases - and prereleases is None - and self._prereleases is not False - ): - yield from prereleases_versions - - -_prefix_regex = re.compile(r"([0-9]+)((?:a|b|c|rc)[0-9]+)") - - -def _version_split(version: str) -> list[str]: - """Split version into components. - - The split components are intended for version comparison. The logic does - not attempt to retain the original version string, so joining the - components back with :func:`_version_join` may not produce the original - version string. - """ - result: list[str] = [] - - epoch, _, rest = version.rpartition("!") - result.append(epoch or "0") - - for item in rest.split("."): - match = _prefix_regex.fullmatch(item) - if match: - result.extend(match.groups()) - else: - result.append(item) - return result - - -def _version_join(components: list[str]) -> str: - """Join split version components into a version string. - - This function assumes the input came from :func:`_version_split`, where the - first component must be the epoch (either empty or numeric), and all other - components numeric. - """ - epoch, *rest = components - return f"{epoch}!{'.'.join(rest)}" - - -def _is_not_suffix(segment: str) -> bool: - return not any( - segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post") - ) - - -def _pad_version(left: list[str], right: list[str]) -> tuple[list[str], list[str]]: - left_split, right_split = [], [] - - # Get the release segment of our versions - left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) - right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) - - # Get the rest of our versions - left_split.append(left[len(left_split[0]) :]) - right_split.append(right[len(right_split[0]) :]) - - # Insert our padding - left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) - right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) - - return ( - list(itertools.chain.from_iterable(left_split)), - list(itertools.chain.from_iterable(right_split)), - ) - - -class SpecifierSet(BaseSpecifier): - """This class abstracts handling of a set of version specifiers. - - It can be passed a single specifier (``>=3.0``), a comma-separated list of - specifiers (``>=3.0,!=3.1``), or no specifier at all. - """ - - __slots__ = ("_prereleases", "_specs") - - def __init__( - self, - specifiers: str | Iterable[Specifier] = "", - prereleases: bool | None = None, - ) -> None: - """Initialize a SpecifierSet instance. - - :param specifiers: - The string representation of a specifier or a comma-separated list of - specifiers which will be parsed and normalized before use. - May also be an iterable of ``Specifier`` instances, which will be used - as is. - :param prereleases: - This tells the SpecifierSet if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - - :raises InvalidSpecifier: - If the given ``specifiers`` are not parseable than this exception will be - raised. - """ - - if isinstance(specifiers, str): - # Split on `,` to break each individual specifier into its own item, and - # strip each item to remove leading/trailing whitespace. - split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] - - # Make each individual specifier a Specifier and save in a frozen set - # for later. - self._specs = frozenset(map(Specifier, split_specifiers)) - else: - # Save the supplied specifiers in a frozen set. - self._specs = frozenset(specifiers) - - # Store our prereleases value so we can use it later to determine if - # we accept prereleases or not. - self._prereleases = prereleases - - @property - def prereleases(self) -> bool | None: - # If we have been given an explicit prerelease modifier, then we'll - # pass that through here. - if self._prereleases is not None: - return self._prereleases - - # If we don't have any specifiers, and we don't have a forced value, - # then we'll just return None since we don't know if this should have - # pre-releases or not. - if not self._specs: - return None - - # Otherwise we'll see if any of the given specifiers accept - # prereleases, if any of them do we'll return True, otherwise False. - if any(s.prereleases for s in self._specs): - return True - - return None - - @prereleases.setter - def prereleases(self, value: bool | None) -> None: - self._prereleases = value - - def __repr__(self) -> str: - """A representation of the specifier set that shows all internal state. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> SpecifierSet('>=1.0.0,!=2.0.0') - =1.0.0')> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"" - - def __str__(self) -> str: - """A string representation of the specifier set that can be round-tripped. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> str(SpecifierSet(">=1.0.0,!=1.0.1")) - '!=1.0.1,>=1.0.0' - >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False)) - '!=1.0.1,>=1.0.0' - """ - return ",".join(sorted(str(s) for s in self._specs)) - - def __hash__(self) -> int: - return hash(self._specs) - - def __and__(self, other: SpecifierSet | str) -> SpecifierSet: - """Return a SpecifierSet which is a combination of the two sets. - - :param other: The other object to combine with. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1' - =1.0.0')> - >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1') - =1.0.0')> - """ - if isinstance(other, str): - other = SpecifierSet(other) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - specifier = SpecifierSet() - specifier._specs = frozenset(self._specs | other._specs) - - if self._prereleases is None and other._prereleases is not None: - specifier._prereleases = other._prereleases - elif ( - self._prereleases is not None and other._prereleases is None - ) or self._prereleases == other._prereleases: - specifier._prereleases = self._prereleases - else: - raise ValueError( - "Cannot combine SpecifierSets with True and False prerelease overrides." - ) - - return specifier - - def __eq__(self, other: object) -> bool: - """Whether or not the two SpecifierSet-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) == - ... SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1" - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2") - False - """ - if isinstance(other, (str, Specifier)): - other = SpecifierSet(str(other)) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - return self._specs == other._specs - - def __len__(self) -> int: - """Returns the number of specifiers in this specifier set.""" - return len(self._specs) - - def __iter__(self) -> Iterator[Specifier]: - """ - Returns an iterator over all the underlying :class:`Specifier` instances - in this specifier set. - - >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str) - [, =1.0.0')>] - """ - return iter(self._specs) - - def __contains__(self, item: UnparsedVersion) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1") - False - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True) - True - """ - return self.contains(item) - - def contains( - self, - item: UnparsedVersion, - prereleases: bool | None = None, - installed: bool | None = None, - ) -> bool: - """Return whether or not the item is contained in this SpecifierSet. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this SpecifierSet. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases, as there are no other versions. - :param installed: - Whether or not the item is installed. If set to ``True``, it will - accept prerelease versions even if the specifier does not allow them. - - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3")) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False).contains("1.3.0a1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True) - True - """ - version = _coerce_version(item) - - if version is not None and installed and version.is_prerelease: - prereleases = True - - check_item = item if version is None else version - return bool(list(self.filter([check_item], prereleases=prereleases))) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifiers in this set. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will follow the recommendation from :pep:`440` - and match prereleases if there are no other versions. - - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")])) - ['1.3', ] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"])) - ['1.5a1'] - >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - - An "empty" SpecifierSet will filter items based on the presence of prerelease - versions in the set. - - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet("").filter(["1.5a1"])) - ['1.5a1'] - >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - """ - # Determine if we're forcing a prerelease or not, if we're not forcing - # one for this particular filter call, then we'll use whatever the - # SpecifierSet thinks for whether or not we should support prereleases. - if prereleases is None and self.prereleases is not None: - prereleases = self.prereleases - - # If we have any specifiers, then we want to wrap our iterable in the - # filter method for each one, this will act as a logical AND amongst - # each specifier. - if self._specs: - # When prereleases is None, we need to let all versions through - # the individual filters, then decide about prereleases at the end - # based on whether any non-prereleases matched ALL specs. - for spec in self._specs: - iterable = spec.filter( - iterable, prereleases=True if prereleases is None else prereleases - ) - - if prereleases is not None: - # If we have a forced prereleases value, - # we can immediately return the iterator. - return iter(iterable) - else: - # Handle empty SpecifierSet cases where prereleases is not None. - if prereleases is True: - return iter(iterable) - - if prereleases is False: - return ( - item - for item in iterable - if (version := _coerce_version(item)) is None - or not version.is_prerelease - ) - - # Finally if prereleases is None, apply PEP 440 logic: - # exclude prereleases unless there are no final releases that matched. - filtered_items: list[UnparsedVersionVar] = [] - found_prereleases: list[UnparsedVersionVar] = [] - found_final_release = False - - for item in iterable: - parsed_version = _coerce_version(item) - # Arbitrary strings are always included as it is not - # possible to determine if they are prereleases, - # and they have already passed all specifiers. - if parsed_version is None: - filtered_items.append(item) - found_prereleases.append(item) - elif parsed_version.is_prerelease: - found_prereleases.append(item) - else: - filtered_items.append(item) - found_final_release = True - - return iter(filtered_items if found_final_release else found_prereleases) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/tags.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/tags.py deleted file mode 100644 index 5ef27c897..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/tags.py +++ /dev/null @@ -1,651 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import logging -import platform -import re -import struct -import subprocess -import sys -import sysconfig -from importlib.machinery import EXTENSION_SUFFIXES -from typing import ( - Any, - Iterable, - Iterator, - Sequence, - Tuple, - cast, -) - -from . import _manylinux, _musllinux - -logger = logging.getLogger(__name__) - -PythonVersion = Sequence[int] -AppleVersion = Tuple[int, int] - -INTERPRETER_SHORT_NAMES: dict[str, str] = { - "python": "py", # Generic. - "cpython": "cp", - "pypy": "pp", - "ironpython": "ip", - "jython": "jy", -} - - -_32_BIT_INTERPRETER = struct.calcsize("P") == 4 - - -class Tag: - """ - A representation of the tag triple for a wheel. - - Instances are considered immutable and thus are hashable. Equality checking - is also supported. - """ - - __slots__ = ["_abi", "_hash", "_interpreter", "_platform"] - - def __init__(self, interpreter: str, abi: str, platform: str) -> None: - self._interpreter = interpreter.lower() - self._abi = abi.lower() - self._platform = platform.lower() - # The __hash__ of every single element in a Set[Tag] will be evaluated each time - # that a set calls its `.disjoint()` method, which may be called hundreds of - # times when scanning a page of links for packages with tags matching that - # Set[Tag]. Pre-computing the value here produces significant speedups for - # downstream consumers. - self._hash = hash((self._interpreter, self._abi, self._platform)) - - @property - def interpreter(self) -> str: - return self._interpreter - - @property - def abi(self) -> str: - return self._abi - - @property - def platform(self) -> str: - return self._platform - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Tag): - return NotImplemented - - return ( - (self._hash == other._hash) # Short-circuit ASAP for perf reasons. - and (self._platform == other._platform) - and (self._abi == other._abi) - and (self._interpreter == other._interpreter) - ) - - def __hash__(self) -> int: - return self._hash - - def __str__(self) -> str: - return f"{self._interpreter}-{self._abi}-{self._platform}" - - def __repr__(self) -> str: - return f"<{self} @ {id(self)}>" - - def __setstate__(self, state: tuple[None, dict[str, Any]]) -> None: - # The cached _hash is wrong when unpickling. - _, slots = state - for k, v in slots.items(): - setattr(self, k, v) - self._hash = hash((self._interpreter, self._abi, self._platform)) - - -def parse_tag(tag: str) -> frozenset[Tag]: - """ - Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances. - - Returning a set is required due to the possibility that the tag is a - compressed tag set. - """ - tags = set() - interpreters, abis, platforms = tag.split("-") - for interpreter in interpreters.split("."): - for abi in abis.split("."): - for platform_ in platforms.split("."): - tags.add(Tag(interpreter, abi, platform_)) - return frozenset(tags) - - -def _get_config_var(name: str, warn: bool = False) -> int | str | None: - value: int | str | None = sysconfig.get_config_var(name) - if value is None and warn: - logger.debug( - "Config variable '%s' is unset, Python ABI tag may be incorrect", name - ) - return value - - -def _normalize_string(string: str) -> str: - return string.replace(".", "_").replace("-", "_").replace(" ", "_") - - -def _is_threaded_cpython(abis: list[str]) -> bool: - """ - Determine if the ABI corresponds to a threaded (`--disable-gil`) build. - - The threaded builds are indicated by a "t" in the abiflags. - """ - if len(abis) == 0: - return False - # expect e.g., cp313 - m = re.match(r"cp\d+(.*)", abis[0]) - if not m: - return False - abiflags = m.group(1) - return "t" in abiflags - - -def _abi3_applies(python_version: PythonVersion, threading: bool) -> bool: - """ - Determine if the Python version supports abi3. - - PEP 384 was first implemented in Python 3.2. The threaded (`--disable-gil`) - builds do not support abi3. - """ - return len(python_version) > 1 and tuple(python_version) >= (3, 2) and not threading - - -def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> list[str]: - py_version = tuple(py_version) # To allow for version comparison. - abis = [] - version = _version_nodot(py_version[:2]) - threading = debug = pymalloc = ucs4 = "" - with_debug = _get_config_var("Py_DEBUG", warn) - has_refcount = hasattr(sys, "gettotalrefcount") - # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled - # extension modules is the best option. - # https://github.com/pypa/pip/issues/3383#issuecomment-173267692 - has_ext = "_d.pyd" in EXTENSION_SUFFIXES - if with_debug or (with_debug is None and (has_refcount or has_ext)): - debug = "d" - if py_version >= (3, 13) and _get_config_var("Py_GIL_DISABLED", warn): - threading = "t" - if py_version < (3, 8): - with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) - if with_pymalloc or with_pymalloc is None: - pymalloc = "m" - if py_version < (3, 3): - unicode_size = _get_config_var("Py_UNICODE_SIZE", warn) - if unicode_size == 4 or ( - unicode_size is None and sys.maxunicode == 0x10FFFF - ): - ucs4 = "u" - elif debug: - # Debug builds can also load "normal" extension modules. - # We can also assume no UCS-4 or pymalloc requirement. - abis.append(f"cp{version}{threading}") - abis.insert(0, f"cp{version}{threading}{debug}{pymalloc}{ucs4}") - return abis - - -def cpython_tags( - python_version: PythonVersion | None = None, - abis: Iterable[str] | None = None, - platforms: Iterable[str] | None = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a CPython interpreter. - - The tags consist of: - - cp-- - - cp-abi3- - - cp-none- - - cp-abi3- # Older Python versions down to 3.2. - - If python_version only specifies a major version then user-provided ABIs and - the 'none' ABItag will be used. - - If 'abi3' or 'none' are specified in 'abis' then they will be yielded at - their normal position and not at the beginning. - """ - if not python_version: - python_version = sys.version_info[:2] - - interpreter = f"cp{_version_nodot(python_version[:2])}" - - if abis is None: - abis = _cpython_abis(python_version, warn) if len(python_version) > 1 else [] - abis = list(abis) - # 'abi3' and 'none' are explicitly handled later. - for explicit_abi in ("abi3", "none"): - try: - abis.remove(explicit_abi) - except ValueError: # noqa: PERF203 - pass - - platforms = list(platforms or platform_tags()) - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - - threading = _is_threaded_cpython(abis) - use_abi3 = _abi3_applies(python_version, threading) - if use_abi3: - yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms) - yield from (Tag(interpreter, "none", platform_) for platform_ in platforms) - - if use_abi3: - for minor_version in range(python_version[1] - 1, 1, -1): - for platform_ in platforms: - version = _version_nodot((python_version[0], minor_version)) - interpreter = f"cp{version}" - yield Tag(interpreter, "abi3", platform_) - - -def _generic_abi() -> list[str]: - """ - Return the ABI tag based on EXT_SUFFIX. - """ - # The following are examples of `EXT_SUFFIX`. - # We want to keep the parts which are related to the ABI and remove the - # parts which are related to the platform: - # - linux: '.cpython-310-x86_64-linux-gnu.so' => cp310 - # - mac: '.cpython-310-darwin.so' => cp310 - # - win: '.cp310-win_amd64.pyd' => cp310 - # - win: '.pyd' => cp37 (uses _cpython_abis()) - # - pypy: '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73 - # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib' - # => graalpy_38_native - - ext_suffix = _get_config_var("EXT_SUFFIX", warn=True) - if not isinstance(ext_suffix, str) or ext_suffix[0] != ".": - raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')") - parts = ext_suffix.split(".") - if len(parts) < 3: - # CPython3.7 and earlier uses ".pyd" on Windows. - return _cpython_abis(sys.version_info[:2]) - soabi = parts[1] - if soabi.startswith("cpython"): - # non-windows - abi = "cp" + soabi.split("-")[1] - elif soabi.startswith("cp"): - # windows - abi = soabi.split("-")[0] - elif soabi.startswith("pypy"): - abi = "-".join(soabi.split("-")[:2]) - elif soabi.startswith("graalpy"): - abi = "-".join(soabi.split("-")[:3]) - elif soabi: - # pyston, ironpython, others? - abi = soabi - else: - return [] - return [_normalize_string(abi)] - - -def generic_tags( - interpreter: str | None = None, - abis: Iterable[str] | None = None, - platforms: Iterable[str] | None = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a generic interpreter. - - The tags consist of: - - -- - - The "none" ABI will be added if it was not explicitly provided. - """ - if not interpreter: - interp_name = interpreter_name() - interp_version = interpreter_version(warn=warn) - interpreter = f"{interp_name}{interp_version}" - abis = _generic_abi() if abis is None else list(abis) - platforms = list(platforms or platform_tags()) - if "none" not in abis: - abis.append("none") - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - - -def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]: - """ - Yields Python versions in descending order. - - After the latest version, the major-only version will be yielded, and then - all previous versions of that major version. - """ - if len(py_version) > 1: - yield f"py{_version_nodot(py_version[:2])}" - yield f"py{py_version[0]}" - if len(py_version) > 1: - for minor in range(py_version[1] - 1, -1, -1): - yield f"py{_version_nodot((py_version[0], minor))}" - - -def compatible_tags( - python_version: PythonVersion | None = None, - interpreter: str | None = None, - platforms: Iterable[str] | None = None, -) -> Iterator[Tag]: - """ - Yields the sequence of tags that are compatible with a specific version of Python. - - The tags consist of: - - py*-none- - - -none-any # ... if `interpreter` is provided. - - py*-none-any - """ - if not python_version: - python_version = sys.version_info[:2] - platforms = list(platforms or platform_tags()) - for version in _py_interpreter_range(python_version): - for platform_ in platforms: - yield Tag(version, "none", platform_) - if interpreter: - yield Tag(interpreter, "none", "any") - for version in _py_interpreter_range(python_version): - yield Tag(version, "none", "any") - - -def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str: - if not is_32bit: - return arch - - if arch.startswith("ppc"): - return "ppc" - - return "i386" - - -def _mac_binary_formats(version: AppleVersion, cpu_arch: str) -> list[str]: - formats = [cpu_arch] - if cpu_arch == "x86_64": - if version < (10, 4): - return [] - formats.extend(["intel", "fat64", "fat32"]) - - elif cpu_arch == "i386": - if version < (10, 4): - return [] - formats.extend(["intel", "fat32", "fat"]) - - elif cpu_arch == "ppc64": - # TODO: Need to care about 32-bit PPC for ppc64 through 10.2? - if version > (10, 5) or version < (10, 4): - return [] - formats.append("fat64") - - elif cpu_arch == "ppc": - if version > (10, 6): - return [] - formats.extend(["fat32", "fat"]) - - if cpu_arch in {"arm64", "x86_64"}: - formats.append("universal2") - - if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}: - formats.append("universal") - - return formats - - -def mac_platforms( - version: AppleVersion | None = None, arch: str | None = None -) -> Iterator[str]: - """ - Yields the platform tags for a macOS system. - - The `version` parameter is a two-item tuple specifying the macOS version to - generate platform tags for. The `arch` parameter is the CPU architecture to - generate platform tags for. Both parameters default to the appropriate value - for the current system. - """ - version_str, _, cpu_arch = platform.mac_ver() - if version is None: - version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) - if version == (10, 16): - # When built against an older macOS SDK, Python will report macOS 10.16 - # instead of the real version. - version_str = subprocess.run( - [ - sys.executable, - "-sS", - "-c", - "import platform; print(platform.mac_ver()[0])", - ], - check=True, - env={"SYSTEM_VERSION_COMPAT": "0"}, - stdout=subprocess.PIPE, - text=True, - ).stdout - version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) - - if arch is None: - arch = _mac_arch(cpu_arch) - - if (10, 0) <= version < (11, 0): - # Prior to Mac OS 11, each yearly release of Mac OS bumped the - # "minor" version number. The major version was always 10. - major_version = 10 - for minor_version in range(version[1], -1, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - if version >= (11, 0): - # Starting with Mac OS 11, each yearly release bumps the major version - # number. The minor versions are now the midyear updates. - minor_version = 0 - for major_version in range(version[0], 10, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - if version >= (11, 0): - # Mac OS 11 on x86_64 is compatible with binaries from previous releases. - # Arm64 support was introduced in 11.0, so no Arm binaries from previous - # releases exist. - # - # However, the "universal2" binary format can have a - # macOS version earlier than 11.0 when the x86_64 part of the binary supports - # that version of macOS. - major_version = 10 - if arch == "x86_64": - for minor_version in range(16, 3, -1): - compat_version = major_version, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - else: - for minor_version in range(16, 3, -1): - compat_version = major_version, minor_version - binary_format = "universal2" - yield f"macosx_{major_version}_{minor_version}_{binary_format}" - - -def ios_platforms( - version: AppleVersion | None = None, multiarch: str | None = None -) -> Iterator[str]: - """ - Yields the platform tags for an iOS system. - - :param version: A two-item tuple specifying the iOS version to generate - platform tags for. Defaults to the current iOS version. - :param multiarch: The CPU architecture+ABI to generate platform tags for - - (the value used by `sys.implementation._multiarch` e.g., - `arm64_iphoneos` or `x84_64_iphonesimulator`). Defaults to the current - multiarch value. - """ - if version is None: - # if iOS is the current platform, ios_ver *must* be defined. However, - # it won't exist for CPython versions before 3.13, which causes a mypy - # error. - _, release, _, _ = platform.ios_ver() # type: ignore[attr-defined, unused-ignore] - version = cast("AppleVersion", tuple(map(int, release.split(".")[:2]))) - - if multiarch is None: - multiarch = sys.implementation._multiarch - multiarch = multiarch.replace("-", "_") - - ios_platform_template = "ios_{major}_{minor}_{multiarch}" - - # Consider any iOS major.minor version from the version requested, down to - # 12.0. 12.0 is the first iOS version that is known to have enough features - # to support CPython. Consider every possible minor release up to X.9. There - # highest the minor has ever gone is 8 (14.8 and 15.8) but having some extra - # candidates that won't ever match doesn't really hurt, and it saves us from - # having to keep an explicit list of known iOS versions in the code. Return - # the results descending order of version number. - - # If the requested major version is less than 12, there won't be any matches. - if version[0] < 12: - return - - # Consider the actual X.Y version that was requested. - yield ios_platform_template.format( - major=version[0], minor=version[1], multiarch=multiarch - ) - - # Consider every minor version from X.0 to the minor version prior to the - # version requested by the platform. - for minor in range(version[1] - 1, -1, -1): - yield ios_platform_template.format( - major=version[0], minor=minor, multiarch=multiarch - ) - - for major in range(version[0] - 1, 11, -1): - for minor in range(9, -1, -1): - yield ios_platform_template.format( - major=major, minor=minor, multiarch=multiarch - ) - - -def android_platforms( - api_level: int | None = None, abi: str | None = None -) -> Iterator[str]: - """ - Yields the :attr:`~Tag.platform` tags for Android. If this function is invoked on - non-Android platforms, the ``api_level`` and ``abi`` arguments are required. - - :param int api_level: The maximum `API level - `__ to return. Defaults - to the current system's version, as returned by ``platform.android_ver``. - :param str abi: The `Android ABI `__, - e.g. ``arm64_v8a``. Defaults to the current system's ABI , as returned by - ``sysconfig.get_platform``. Hyphens and periods will be replaced with - underscores. - """ - if platform.system() != "Android" and (api_level is None or abi is None): - raise TypeError( - "on non-Android platforms, the api_level and abi arguments are required" - ) - - if api_level is None: - # Python 3.13 was the first version to return platform.system() == "Android", - # and also the first version to define platform.android_ver(). - api_level = platform.android_ver().api_level # type: ignore[attr-defined] - - if abi is None: - abi = sysconfig.get_platform().split("-")[-1] - abi = _normalize_string(abi) - - # 16 is the minimum API level known to have enough features to support CPython - # without major patching. Yield every API level from the maximum down to the - # minimum, inclusive. - min_api_level = 16 - for ver in range(api_level, min_api_level - 1, -1): - yield f"android_{ver}_{abi}" - - -def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]: - linux = _normalize_string(sysconfig.get_platform()) - if not linux.startswith("linux_"): - # we should never be here, just yield the sysconfig one and return - yield linux - return - if is_32bit: - if linux == "linux_x86_64": - linux = "linux_i686" - elif linux == "linux_aarch64": - linux = "linux_armv8l" - _, arch = linux.split("_", 1) - archs = {"armv8l": ["armv8l", "armv7l"]}.get(arch, [arch]) - yield from _manylinux.platform_tags(archs) - yield from _musllinux.platform_tags(archs) - for arch in archs: - yield f"linux_{arch}" - - -def _generic_platforms() -> Iterator[str]: - yield _normalize_string(sysconfig.get_platform()) - - -def platform_tags() -> Iterator[str]: - """ - Provides the platform tags for this installation. - """ - if platform.system() == "Darwin": - return mac_platforms() - elif platform.system() == "iOS": - return ios_platforms() - elif platform.system() == "Android": - return android_platforms() - elif platform.system() == "Linux": - return _linux_platforms() - else: - return _generic_platforms() - - -def interpreter_name() -> str: - """ - Returns the name of the running interpreter. - - Some implementations have a reserved, two-letter abbreviation which will - be returned when appropriate. - """ - name = sys.implementation.name - return INTERPRETER_SHORT_NAMES.get(name) or name - - -def interpreter_version(*, warn: bool = False) -> str: - """ - Returns the version of the running interpreter. - """ - version = _get_config_var("py_version_nodot", warn=warn) - return str(version) if version else _version_nodot(sys.version_info[:2]) - - -def _version_nodot(version: PythonVersion) -> str: - return "".join(map(str, version)) - - -def sys_tags(*, warn: bool = False) -> Iterator[Tag]: - """ - Returns the sequence of tag triples for the running interpreter. - - The order of the sequence corresponds to priority order for the - interpreter, from most to least important. - """ - - interp_name = interpreter_name() - if interp_name == "cp": - yield from cpython_tags(warn=warn) - else: - yield from generic_tags() - - if interp_name == "pp": - interp = "pp3" - elif interp_name == "cp": - interp = "cp" + interpreter_version(warn=warn) - else: - interp = None - yield from compatible_tags(interpreter=interp) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/utils.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/utils.py deleted file mode 100644 index c41c8137f..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/utils.py +++ /dev/null @@ -1,158 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import annotations - -import re -from typing import NewType, Tuple, Union, cast - -from .tags import Tag, parse_tag -from .version import InvalidVersion, Version, _TrimmedRelease - -BuildTag = Union[Tuple[()], Tuple[int, str]] -NormalizedName = NewType("NormalizedName", str) - - -class InvalidName(ValueError): - """ - An invalid distribution name; users should refer to the packaging user guide. - """ - - -class InvalidWheelFilename(ValueError): - """ - An invalid wheel filename was found, users should refer to PEP 427. - """ - - -class InvalidSdistFilename(ValueError): - """ - An invalid sdist filename was found, users should refer to the packaging user guide. - """ - - -# Core metadata spec for `Name` -_validate_regex = re.compile(r"[A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9]", re.IGNORECASE) -_normalized_regex = re.compile(r"[a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9]") -# PEP 427: The build number must start with a digit. -_build_tag_regex = re.compile(r"(\d+)(.*)") - - -def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName: - if validate and not _validate_regex.fullmatch(name): - raise InvalidName(f"name is invalid: {name!r}") - # Ensure all ``.`` and ``_`` are ``-`` - # Emulates ``re.sub(r"[-_.]+", "-", name).lower()`` from PEP 503 - # Much faster than re, and even faster than str.translate - value = name.lower().replace("_", "-").replace(".", "-") - # Condense repeats (faster than regex) - while "--" in value: - value = value.replace("--", "-") - return cast("NormalizedName", value) - - -def is_normalized_name(name: str) -> bool: - return _normalized_regex.fullmatch(name) is not None - - -def canonicalize_version( - version: Version | str, *, strip_trailing_zero: bool = True -) -> str: - """ - Return a canonical form of a version as a string. - - >>> canonicalize_version('1.0.1') - '1.0.1' - - Per PEP 625, versions may have multiple canonical forms, differing - only by trailing zeros. - - >>> canonicalize_version('1.0.0') - '1' - >>> canonicalize_version('1.0.0', strip_trailing_zero=False) - '1.0.0' - - Invalid versions are returned unaltered. - - >>> canonicalize_version('foo bar baz') - 'foo bar baz' - """ - if isinstance(version, str): - try: - version = Version(version) - except InvalidVersion: - return str(version) - return str(_TrimmedRelease(version) if strip_trailing_zero else version) - - -def parse_wheel_filename( - filename: str, -) -> tuple[NormalizedName, Version, BuildTag, frozenset[Tag]]: - if not filename.endswith(".whl"): - raise InvalidWheelFilename( - f"Invalid wheel filename (extension must be '.whl'): {filename!r}" - ) - - filename = filename[:-4] - dashes = filename.count("-") - if dashes not in (4, 5): - raise InvalidWheelFilename( - f"Invalid wheel filename (wrong number of parts): {filename!r}" - ) - - parts = filename.split("-", dashes - 2) - name_part = parts[0] - # See PEP 427 for the rules on escaping the project name. - if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None: - raise InvalidWheelFilename(f"Invalid project name: {filename!r}") - name = canonicalize_name(name_part) - - try: - version = Version(parts[1]) - except InvalidVersion as e: - raise InvalidWheelFilename( - f"Invalid wheel filename (invalid version): {filename!r}" - ) from e - - if dashes == 5: - build_part = parts[2] - build_match = _build_tag_regex.match(build_part) - if build_match is None: - raise InvalidWheelFilename( - f"Invalid build number: {build_part} in {filename!r}" - ) - build = cast("BuildTag", (int(build_match.group(1)), build_match.group(2))) - else: - build = () - tags = parse_tag(parts[-1]) - return (name, version, build, tags) - - -def parse_sdist_filename(filename: str) -> tuple[NormalizedName, Version]: - if filename.endswith(".tar.gz"): - file_stem = filename[: -len(".tar.gz")] - elif filename.endswith(".zip"): - file_stem = filename[: -len(".zip")] - else: - raise InvalidSdistFilename( - f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):" - f" {filename!r}" - ) - - # We are requiring a PEP 440 version, which cannot contain dashes, - # so we split on the last dash. - name_part, sep, version_part = file_stem.rpartition("-") - if not sep: - raise InvalidSdistFilename(f"Invalid sdist filename: {filename!r}") - - name = canonicalize_name(name_part) - - try: - version = Version(version_part) - except InvalidVersion as e: - raise InvalidSdistFilename( - f"Invalid sdist filename (invalid version): {filename!r}" - ) from e - - return (name, version) diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/version.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/version.py deleted file mode 100644 index d250a2627..000000000 --- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/version.py +++ /dev/null @@ -1,792 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from pip._vendor.packaging.version import parse, Version -""" - -from __future__ import annotations - -import re -import sys -import typing -from typing import ( - Any, - Callable, - Literal, - NamedTuple, - SupportsInt, - Tuple, - TypedDict, - Union, -) - -from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType - -if typing.TYPE_CHECKING: - from typing_extensions import Self, Unpack - -if sys.version_info >= (3, 13): # pragma: no cover - from warnings import deprecated as _deprecated -elif typing.TYPE_CHECKING: - from typing_extensions import deprecated as _deprecated -else: # pragma: no cover - import functools - import warnings - - def _deprecated(message: str) -> object: - def decorator(func: object) -> object: - @functools.wraps(func) - def wrapper(*args: object, **kwargs: object) -> object: - warnings.warn( - message, - category=DeprecationWarning, - stacklevel=2, - ) - return func(*args, **kwargs) - - return wrapper - - return decorator - - -_LETTER_NORMALIZATION = { - "alpha": "a", - "beta": "b", - "c": "rc", - "pre": "rc", - "preview": "rc", - "rev": "post", - "r": "post", -} - -__all__ = ["VERSION_PATTERN", "InvalidVersion", "Version", "parse"] - -LocalType = Tuple[Union[int, str], ...] - -CmpPrePostDevType = Union[InfinityType, NegativeInfinityType, Tuple[str, int]] -CmpLocalType = Union[ - NegativeInfinityType, - Tuple[Union[Tuple[int, str], Tuple[NegativeInfinityType, Union[int, str]]], ...], -] -CmpKey = Tuple[ - int, - Tuple[int, ...], - CmpPrePostDevType, - CmpPrePostDevType, - CmpPrePostDevType, - CmpLocalType, -] -VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool] - - -class _VersionReplace(TypedDict, total=False): - epoch: int | None - release: tuple[int, ...] | None - pre: tuple[Literal["a", "b", "rc"], int] | None - post: int | None - dev: int | None - local: str | None - - -def parse(version: str) -> Version: - """Parse the given version string. - - >>> parse('1.0.dev1') - - - :param version: The version string to parse. - :raises InvalidVersion: When the version string is not a valid version. - """ - return Version(version) - - -class InvalidVersion(ValueError): - """Raised when a version string is not a valid version. - - >>> Version("invalid") - Traceback (most recent call last): - ... - packaging.version.InvalidVersion: Invalid version: 'invalid' - """ - - -class _BaseVersion: - __slots__ = () - - # This can also be a normal member (see the packaging_legacy package); - # we are just requiring it to be readable. Actually defining a property - # has runtime effect on subclasses, so it's typing only. - if typing.TYPE_CHECKING: - - @property - def _key(self) -> tuple[Any, ...]: ... - - def __hash__(self) -> int: - return hash(self._key) - - # Please keep the duplicated `isinstance` check - # in the six comparisons hereunder - # unless you find a way to avoid adding overhead function calls. - def __lt__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key < other._key - - def __le__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key <= other._key - - def __eq__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key == other._key - - def __ge__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key >= other._key - - def __gt__(self, other: _BaseVersion) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key > other._key - - def __ne__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key != other._key - - -# Deliberately not anchored to the start and end of the string, to make it -# easier for 3rd party code to reuse - -# Note that ++ doesn't behave identically on CPython and PyPy, so not using it here -_VERSION_PATTERN = r""" - v?+ # optional leading v - (?: - (?:(?P[0-9]+)!)?+ # epoch - (?P[0-9]+(?:\.[0-9]+)*+) # release segment - (?P
                                          # pre-release
-            [._-]?+
-            (?Palpha|a|beta|b|preview|pre|c|rc)
-            [._-]?+
-            (?P[0-9]+)?
-        )?+
-        (?P                                         # post release
-            (?:-(?P[0-9]+))
-            |
-            (?:
-                [._-]?
-                (?Ppost|rev|r)
-                [._-]?
-                (?P[0-9]+)?
-            )
-        )?+
-        (?P                                          # dev release
-            [._-]?+
-            (?Pdev)
-            [._-]?+
-            (?P[0-9]+)?
-        )?+
-    )
-    (?:\+
-        (?P                                        # local version
-            [a-z0-9]+
-            (?:[._-][a-z0-9]+)*+
-        )
-    )?+
-"""
-
-_VERSION_PATTERN_OLD = _VERSION_PATTERN.replace("*+", "*").replace("?+", "?")
-
-# Possessive qualifiers were added in Python 3.11.
-# CPython 3.11.0-3.11.4 had a bug: https://github.com/python/cpython/pull/107795
-# Older PyPy also had a bug.
-VERSION_PATTERN = (
-    _VERSION_PATTERN_OLD
-    if (sys.implementation.name == "cpython" and sys.version_info < (3, 11, 5))
-    or (sys.implementation.name == "pypy" and sys.version_info < (3, 11, 13))
-    or sys.version_info < (3, 11)
-    else _VERSION_PATTERN
-)
-"""
-A string containing the regular expression used to match a valid version.
-
-The pattern is not anchored at either end, and is intended for embedding in larger
-expressions (for example, matching a version number as part of a file name). The
-regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
-flags set.
-
-:meta hide-value:
-"""
-
-
-# Validation pattern for local version in replace()
-_LOCAL_PATTERN = re.compile(r"[a-z0-9]+(?:[._-][a-z0-9]+)*", re.IGNORECASE)
-
-
-def _validate_epoch(value: object, /) -> int:
-    epoch = value or 0
-    if isinstance(epoch, int) and epoch >= 0:
-        return epoch
-    msg = f"epoch must be non-negative integer, got {epoch}"
-    raise InvalidVersion(msg)
-
-
-def _validate_release(value: object, /) -> tuple[int, ...]:
-    release = (0,) if value is None else value
-    if (
-        isinstance(release, tuple)
-        and len(release) > 0
-        and all(isinstance(i, int) and i >= 0 for i in release)
-    ):
-        return release
-    msg = f"release must be a non-empty tuple of non-negative integers, got {release}"
-    raise InvalidVersion(msg)
-
-
-def _validate_pre(value: object, /) -> tuple[Literal["a", "b", "rc"], int] | None:
-    if value is None:
-        return value
-    if (
-        isinstance(value, tuple)
-        and len(value) == 2
-        and value[0] in ("a", "b", "rc")
-        and isinstance(value[1], int)
-        and value[1] >= 0
-    ):
-        return value
-    msg = f"pre must be a tuple of ('a'|'b'|'rc', non-negative int), got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_post(value: object, /) -> tuple[Literal["post"], int] | None:
-    if value is None:
-        return value
-    if isinstance(value, int) and value >= 0:
-        return ("post", value)
-    msg = f"post must be non-negative integer, got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_dev(value: object, /) -> tuple[Literal["dev"], int] | None:
-    if value is None:
-        return value
-    if isinstance(value, int) and value >= 0:
-        return ("dev", value)
-    msg = f"dev must be non-negative integer, got {value}"
-    raise InvalidVersion(msg)
-
-
-def _validate_local(value: object, /) -> LocalType | None:
-    if value is None:
-        return value
-    if isinstance(value, str) and _LOCAL_PATTERN.fullmatch(value):
-        return _parse_local_version(value)
-    msg = f"local must be a valid version string, got {value!r}"
-    raise InvalidVersion(msg)
-
-
-# Backward compatibility for internals before 26.0. Do not use.
-class _Version(NamedTuple):
-    epoch: int
-    release: tuple[int, ...]
-    dev: tuple[str, int] | None
-    pre: tuple[str, int] | None
-    post: tuple[str, int] | None
-    local: LocalType | None
-
-
-class Version(_BaseVersion):
-    """This class abstracts handling of a project's versions.
-
-    A :class:`Version` instance is comparison aware and can be compared and
-    sorted using the standard Python interfaces.
-
-    >>> v1 = Version("1.0a5")
-    >>> v2 = Version("1.0")
-    >>> v1
-    
-    >>> v2
-    
-    >>> v1 < v2
-    True
-    >>> v1 == v2
-    False
-    >>> v1 > v2
-    False
-    >>> v1 >= v2
-    False
-    >>> v1 <= v2
-    True
-    """
-
-    __slots__ = ("_dev", "_epoch", "_key_cache", "_local", "_post", "_pre", "_release")
-    __match_args__ = ("_str",)
-
-    _regex = re.compile(r"\s*" + VERSION_PATTERN + r"\s*", re.VERBOSE | re.IGNORECASE)
-
-    _epoch: int
-    _release: tuple[int, ...]
-    _dev: tuple[str, int] | None
-    _pre: tuple[str, int] | None
-    _post: tuple[str, int] | None
-    _local: LocalType | None
-
-    _key_cache: CmpKey | None
-
-    def __init__(self, version: str) -> None:
-        """Initialize a Version object.
-
-        :param version:
-            The string representation of a version which will be parsed and normalized
-            before use.
-        :raises InvalidVersion:
-            If the ``version`` does not conform to PEP 440 in any way then this
-            exception will be raised.
-        """
-        # Validate the version and parse it into pieces
-        match = self._regex.fullmatch(version)
-        if not match:
-            raise InvalidVersion(f"Invalid version: {version!r}")
-        self._epoch = int(match.group("epoch")) if match.group("epoch") else 0
-        self._release = tuple(map(int, match.group("release").split(".")))
-        self._pre = _parse_letter_version(match.group("pre_l"), match.group("pre_n"))
-        self._post = _parse_letter_version(
-            match.group("post_l"), match.group("post_n1") or match.group("post_n2")
-        )
-        self._dev = _parse_letter_version(match.group("dev_l"), match.group("dev_n"))
-        self._local = _parse_local_version(match.group("local"))
-
-        # Key which will be used for sorting
-        self._key_cache = None
-
-    def __replace__(self, **kwargs: Unpack[_VersionReplace]) -> Self:
-        epoch = _validate_epoch(kwargs["epoch"]) if "epoch" in kwargs else self._epoch
-        release = (
-            _validate_release(kwargs["release"])
-            if "release" in kwargs
-            else self._release
-        )
-        pre = _validate_pre(kwargs["pre"]) if "pre" in kwargs else self._pre
-        post = _validate_post(kwargs["post"]) if "post" in kwargs else self._post
-        dev = _validate_dev(kwargs["dev"]) if "dev" in kwargs else self._dev
-        local = _validate_local(kwargs["local"]) if "local" in kwargs else self._local
-
-        if (
-            epoch == self._epoch
-            and release == self._release
-            and pre == self._pre
-            and post == self._post
-            and dev == self._dev
-            and local == self._local
-        ):
-            return self
-
-        new_version = self.__class__.__new__(self.__class__)
-        new_version._key_cache = None
-        new_version._epoch = epoch
-        new_version._release = release
-        new_version._pre = pre
-        new_version._post = post
-        new_version._dev = dev
-        new_version._local = local
-
-        return new_version
-
-    @property
-    def _key(self) -> CmpKey:
-        if self._key_cache is None:
-            self._key_cache = _cmpkey(
-                self._epoch,
-                self._release,
-                self._pre,
-                self._post,
-                self._dev,
-                self._local,
-            )
-        return self._key_cache
-
-    @property
-    @_deprecated("Version._version is private and will be removed soon")
-    def _version(self) -> _Version:
-        return _Version(
-            self._epoch, self._release, self._dev, self._pre, self._post, self._local
-        )
-
-    @_version.setter
-    @_deprecated("Version._version is private and will be removed soon")
-    def _version(self, value: _Version) -> None:
-        self._epoch = value.epoch
-        self._release = value.release
-        self._dev = value.dev
-        self._pre = value.pre
-        self._post = value.post
-        self._local = value.local
-        self._key_cache = None
-
-    def __repr__(self) -> str:
-        """A representation of the Version that shows all internal state.
-
-        >>> Version('1.0.0')
-        
-        """
-        return f""
-
-    def __str__(self) -> str:
-        """A string representation of the version that can be round-tripped.
-
-        >>> str(Version("1.0a5"))
-        '1.0a5'
-        """
-        # This is a hot function, so not calling self.base_version
-        version = ".".join(map(str, self.release))
-
-        # Epoch
-        if self.epoch:
-            version = f"{self.epoch}!{version}"
-
-        # Pre-release
-        if self.pre is not None:
-            version += "".join(map(str, self.pre))
-
-        # Post-release
-        if self.post is not None:
-            version += f".post{self.post}"
-
-        # Development release
-        if self.dev is not None:
-            version += f".dev{self.dev}"
-
-        # Local version segment
-        if self.local is not None:
-            version += f"+{self.local}"
-
-        return version
-
-    @property
-    def _str(self) -> str:
-        """Internal property for match_args"""
-        return str(self)
-
-    @property
-    def epoch(self) -> int:
-        """The epoch of the version.
-
-        >>> Version("2.0.0").epoch
-        0
-        >>> Version("1!2.0.0").epoch
-        1
-        """
-        return self._epoch
-
-    @property
-    def release(self) -> tuple[int, ...]:
-        """The components of the "release" segment of the version.
-
-        >>> Version("1.2.3").release
-        (1, 2, 3)
-        >>> Version("2.0.0").release
-        (2, 0, 0)
-        >>> Version("1!2.0.0.post0").release
-        (2, 0, 0)
-
-        Includes trailing zeroes but not the epoch or any pre-release / development /
-        post-release suffixes.
-        """
-        return self._release
-
-    @property
-    def pre(self) -> tuple[str, int] | None:
-        """The pre-release segment of the version.
-
-        >>> print(Version("1.2.3").pre)
-        None
-        >>> Version("1.2.3a1").pre
-        ('a', 1)
-        >>> Version("1.2.3b1").pre
-        ('b', 1)
-        >>> Version("1.2.3rc1").pre
-        ('rc', 1)
-        """
-        return self._pre
-
-    @property
-    def post(self) -> int | None:
-        """The post-release number of the version.
-
-        >>> print(Version("1.2.3").post)
-        None
-        >>> Version("1.2.3.post1").post
-        1
-        """
-        return self._post[1] if self._post else None
-
-    @property
-    def dev(self) -> int | None:
-        """The development number of the version.
-
-        >>> print(Version("1.2.3").dev)
-        None
-        >>> Version("1.2.3.dev1").dev
-        1
-        """
-        return self._dev[1] if self._dev else None
-
-    @property
-    def local(self) -> str | None:
-        """The local version segment of the version.
-
-        >>> print(Version("1.2.3").local)
-        None
-        >>> Version("1.2.3+abc").local
-        'abc'
-        """
-        if self._local:
-            return ".".join(str(x) for x in self._local)
-        else:
-            return None
-
-    @property
-    def public(self) -> str:
-        """The public portion of the version.
-
-        >>> Version("1.2.3").public
-        '1.2.3'
-        >>> Version("1.2.3+abc").public
-        '1.2.3'
-        >>> Version("1!1.2.3dev1+abc").public
-        '1!1.2.3.dev1'
-        """
-        return str(self).split("+", 1)[0]
-
-    @property
-    def base_version(self) -> str:
-        """The "base version" of the version.
-
-        >>> Version("1.2.3").base_version
-        '1.2.3'
-        >>> Version("1.2.3+abc").base_version
-        '1.2.3'
-        >>> Version("1!1.2.3dev1+abc").base_version
-        '1!1.2.3'
-
-        The "base version" is the public version of the project without any pre or post
-        release markers.
-        """
-        release_segment = ".".join(map(str, self.release))
-        return f"{self.epoch}!{release_segment}" if self.epoch else release_segment
-
-    @property
-    def is_prerelease(self) -> bool:
-        """Whether this version is a pre-release.
-
-        >>> Version("1.2.3").is_prerelease
-        False
-        >>> Version("1.2.3a1").is_prerelease
-        True
-        >>> Version("1.2.3b1").is_prerelease
-        True
-        >>> Version("1.2.3rc1").is_prerelease
-        True
-        >>> Version("1.2.3dev1").is_prerelease
-        True
-        """
-        return self.dev is not None or self.pre is not None
-
-    @property
-    def is_postrelease(self) -> bool:
-        """Whether this version is a post-release.
-
-        >>> Version("1.2.3").is_postrelease
-        False
-        >>> Version("1.2.3.post1").is_postrelease
-        True
-        """
-        return self.post is not None
-
-    @property
-    def is_devrelease(self) -> bool:
-        """Whether this version is a development release.
-
-        >>> Version("1.2.3").is_devrelease
-        False
-        >>> Version("1.2.3.dev1").is_devrelease
-        True
-        """
-        return self.dev is not None
-
-    @property
-    def major(self) -> int:
-        """The first item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").major
-        1
-        """
-        return self.release[0] if len(self.release) >= 1 else 0
-
-    @property
-    def minor(self) -> int:
-        """The second item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").minor
-        2
-        >>> Version("1").minor
-        0
-        """
-        return self.release[1] if len(self.release) >= 2 else 0
-
-    @property
-    def micro(self) -> int:
-        """The third item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").micro
-        3
-        >>> Version("1").micro
-        0
-        """
-        return self.release[2] if len(self.release) >= 3 else 0
-
-
-class _TrimmedRelease(Version):
-    __slots__ = ()
-
-    def __init__(self, version: str | Version) -> None:
-        if isinstance(version, Version):
-            self._epoch = version._epoch
-            self._release = version._release
-            self._dev = version._dev
-            self._pre = version._pre
-            self._post = version._post
-            self._local = version._local
-            self._key_cache = version._key_cache
-            return
-        super().__init__(version)  # pragma: no cover
-
-    @property
-    def release(self) -> tuple[int, ...]:
-        """
-        Release segment without any trailing zeros.
-
-        >>> _TrimmedRelease('1.0.0').release
-        (1,)
-        >>> _TrimmedRelease('0.0').release
-        (0,)
-        """
-        # This leaves one 0.
-        rel = super().release
-        len_release = len(rel)
-        i = len_release
-        while i > 1 and rel[i - 1] == 0:
-            i -= 1
-        return rel if i == len_release else rel[:i]
-
-
-def _parse_letter_version(
-    letter: str | None, number: str | bytes | SupportsInt | None
-) -> tuple[str, int] | None:
-    if letter:
-        # We normalize any letters to their lower case form
-        letter = letter.lower()
-
-        # We consider some words to be alternate spellings of other words and
-        # in those cases we want to normalize the spellings to our preferred
-        # spelling.
-        letter = _LETTER_NORMALIZATION.get(letter, letter)
-
-        # We consider there to be an implicit 0 in a pre-release if there is
-        # not a numeral associated with it.
-        return letter, int(number or 0)
-
-    if number:
-        # We assume if we are given a number, but we are not given a letter
-        # then this is using the implicit post release syntax (e.g. 1.0-1)
-        return "post", int(number)
-
-    return None
-
-
-_local_version_separators = re.compile(r"[\._-]")
-
-
-def _parse_local_version(local: str | None) -> LocalType | None:
-    """
-    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
-    """
-    if local is not None:
-        return tuple(
-            part.lower() if not part.isdigit() else int(part)
-            for part in _local_version_separators.split(local)
-        )
-    return None
-
-
-def _cmpkey(
-    epoch: int,
-    release: tuple[int, ...],
-    pre: tuple[str, int] | None,
-    post: tuple[str, int] | None,
-    dev: tuple[str, int] | None,
-    local: LocalType | None,
-) -> CmpKey:
-    # When we compare a release version, we want to compare it with all of the
-    # trailing zeros removed. We will use this for our sorting key.
-    len_release = len(release)
-    i = len_release
-    while i and release[i - 1] == 0:
-        i -= 1
-    _release = release if i == len_release else release[:i]
-
-    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
-    # We'll do this by abusing the pre segment, but we _only_ want to do this
-    # if there is not a pre or a post segment. If we have one of those then
-    # the normal sorting rules will handle this case correctly.
-    if pre is None and post is None and dev is not None:
-        _pre: CmpPrePostDevType = NegativeInfinity
-    # Versions without a pre-release (except as noted above) should sort after
-    # those with one.
-    elif pre is None:
-        _pre = Infinity
-    else:
-        _pre = pre
-
-    # Versions without a post segment should sort before those with one.
-    if post is None:
-        _post: CmpPrePostDevType = NegativeInfinity
-
-    else:
-        _post = post
-
-    # Versions without a development segment should sort after those with one.
-    if dev is None:
-        _dev: CmpPrePostDevType = Infinity
-
-    else:
-        _dev = dev
-
-    if local is None:
-        # Versions without a local segment should sort before those with one.
-        _local: CmpLocalType = NegativeInfinity
-    else:
-        # Versions with a local segment need that segment parsed to implement
-        # the sorting rules in PEP440.
-        # - Alpha numeric segments sort before numeric segments
-        # - Alpha numeric segments sort lexicographically
-        # - Numeric segments sort numerically
-        # - Shorter versions sort before longer versions when the prefixes
-        #   match exactly
-        _local = tuple(
-            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
-        )
-
-    return epoch, _release, _pre, _post, _dev, _local
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index d06c353bd..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index eced46c18..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-314.pyc
deleted file mode 100644
index f6c8900a9..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-314.pyc
deleted file mode 100644
index 7f0780e64..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-314.pyc
deleted file mode 100644
index 98fdcde67..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index da622252e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-314.pyc
deleted file mode 100644
index 27500d32c..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-314.pyc
deleted file mode 100644
index e1a698a21..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-314.pyc
deleted file mode 100644
index a1489f015..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-314.pyc
deleted file mode 100644
index 7647b7de3..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-314.pyc
deleted file mode 100644
index bd1ee4852..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-314.pyc
deleted file mode 100644
index 623bb1467..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index e723cf81a..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index af7f6948e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-314.pyc
deleted file mode 100644
index e3ed2c012..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 946017c6b..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-314.pyc
deleted file mode 100644
index 8daacc3c6..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 576b703c6..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-314.pyc
deleted file mode 100644
index a80274bfe..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 8a0e2da8a..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 3a0a2f8c9..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__init__.py
deleted file mode 100644
index 04230fc8d..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__init__.py
+++ /dev/null
@@ -1,179 +0,0 @@
-#   __
-#  /__)  _  _     _   _ _/   _
-# / (   (- (/ (/ (- _)  /  _)
-#          /
-
-"""
-Requests HTTP Library
-~~~~~~~~~~~~~~~~~~~~~
-
-Requests is an HTTP library, written in Python, for human beings.
-Basic GET usage:
-
-   >>> import requests
-   >>> r = requests.get('https://www.python.org')
-   >>> r.status_code
-   200
-   >>> b'Python is a programming language' in r.content
-   True
-
-... or POST:
-
-   >>> payload = dict(key1='value1', key2='value2')
-   >>> r = requests.post('https://httpbin.org/post', data=payload)
-   >>> print(r.text)
-   {
-     ...
-     "form": {
-       "key1": "value1",
-       "key2": "value2"
-     },
-     ...
-   }
-
-The other HTTP methods are supported - see `requests.api`. Full documentation
-is at .
-
-:copyright: (c) 2017 by Kenneth Reitz.
-:license: Apache 2.0, see LICENSE for more details.
-"""
-
-import warnings
-
-from pip._vendor import urllib3
-
-from .exceptions import RequestsDependencyWarning
-
-charset_normalizer_version = None
-chardet_version = None
-
-
-def check_compatibility(urllib3_version, chardet_version, charset_normalizer_version):
-    urllib3_version = urllib3_version.split(".")
-    assert urllib3_version != ["dev"]  # Verify urllib3 isn't installed from git.
-
-    # Sometimes, urllib3 only reports its version as 16.1.
-    if len(urllib3_version) == 2:
-        urllib3_version.append("0")
-
-    # Check urllib3 for compatibility.
-    major, minor, patch = urllib3_version  # noqa: F811
-    major, minor, patch = int(major), int(minor), int(patch)
-    # urllib3 >= 1.21.1
-    assert major >= 1
-    if major == 1:
-        assert minor >= 21
-
-    # Check charset_normalizer for compatibility.
-    if chardet_version:
-        major, minor, patch = chardet_version.split(".")[:3]
-        major, minor, patch = int(major), int(minor), int(patch)
-        # chardet_version >= 3.0.2, < 6.0.0
-        assert (3, 0, 2) <= (major, minor, patch) < (6, 0, 0)
-    elif charset_normalizer_version:
-        major, minor, patch = charset_normalizer_version.split(".")[:3]
-        major, minor, patch = int(major), int(minor), int(patch)
-        # charset_normalizer >= 2.0.0 < 4.0.0
-        assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0)
-    else:
-        # pip does not need or use character detection
-        pass
-
-
-def _check_cryptography(cryptography_version):
-    # cryptography < 1.3.4
-    try:
-        cryptography_version = list(map(int, cryptography_version.split(".")))
-    except ValueError:
-        return
-
-    if cryptography_version < [1, 3, 4]:
-        warning = "Old version of cryptography ({}) may cause slowdown.".format(
-            cryptography_version
-        )
-        warnings.warn(warning, RequestsDependencyWarning)
-
-
-# Check imported dependencies for compatibility.
-try:
-    check_compatibility(
-        urllib3.__version__, chardet_version, charset_normalizer_version
-    )
-except (AssertionError, ValueError):
-    warnings.warn(
-        "urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
-        "version!".format(
-            urllib3.__version__, chardet_version, charset_normalizer_version
-        ),
-        RequestsDependencyWarning,
-    )
-
-# Attempt to enable urllib3's fallback for SNI support
-# if the standard library doesn't support SNI or the
-# 'ssl' library isn't available.
-try:
-    # Note: This logic prevents upgrading cryptography on Windows, if imported
-    #       as part of pip.
-    from pip._internal.utils.compat import WINDOWS
-    if not WINDOWS:
-        raise ImportError("pip internals: don't import cryptography on Windows")
-    try:
-        import ssl
-    except ImportError:
-        ssl = None
-
-    if not getattr(ssl, "HAS_SNI", False):
-        from pip._vendor.urllib3.contrib import pyopenssl
-
-        pyopenssl.inject_into_urllib3()
-
-        # Check cryptography version
-        from cryptography import __version__ as cryptography_version
-
-        _check_cryptography(cryptography_version)
-except ImportError:
-    pass
-
-# urllib3's DependencyWarnings should be silenced.
-from pip._vendor.urllib3.exceptions import DependencyWarning
-
-warnings.simplefilter("ignore", DependencyWarning)
-
-# Set default logging handler to avoid "No handler found" warnings.
-import logging
-from logging import NullHandler
-
-from . import packages, utils
-from .__version__ import (
-    __author__,
-    __author_email__,
-    __build__,
-    __cake__,
-    __copyright__,
-    __description__,
-    __license__,
-    __title__,
-    __url__,
-    __version__,
-)
-from .api import delete, get, head, options, patch, post, put, request
-from .exceptions import (
-    ConnectionError,
-    ConnectTimeout,
-    FileModeWarning,
-    HTTPError,
-    JSONDecodeError,
-    ReadTimeout,
-    RequestException,
-    Timeout,
-    TooManyRedirects,
-    URLRequired,
-)
-from .models import PreparedRequest, Request, Response
-from .sessions import Session, session
-from .status_codes import codes
-
-logging.getLogger(__name__).addHandler(NullHandler())
-
-# FileModeWarnings go off per the default.
-warnings.simplefilter("default", FileModeWarning, append=True)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index b8cc7c702..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-314.pyc
deleted file mode 100644
index ca7a4e93b..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-314.pyc
deleted file mode 100644
index 3a9f77373..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-314.pyc
deleted file mode 100644
index 2aadbfb74..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/api.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/api.cpython-314.pyc
deleted file mode 100644
index 6db05f1f2..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/api.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-314.pyc
deleted file mode 100644
index 0a04e3364..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-314.pyc
deleted file mode 100644
index a10ca2d7d..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-314.pyc
deleted file mode 100644
index 104c94f67..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-314.pyc
deleted file mode 100644
index 44716dfa6..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-314.pyc
deleted file mode 100644
index 3aa95d4d3..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/help.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/help.cpython-314.pyc
deleted file mode 100644
index fe8272a92..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/help.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-314.pyc
deleted file mode 100644
index 10e7cfcee..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-314.pyc
deleted file mode 100644
index 40bf209e5..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-314.pyc
deleted file mode 100644
index 8d8e9924b..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-314.pyc
deleted file mode 100644
index c1078da04..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/auth.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/auth.py
deleted file mode 100644
index 4a7ce6dc1..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/auth.py
+++ /dev/null
@@ -1,314 +0,0 @@
-"""
-requests.auth
-~~~~~~~~~~~~~
-
-This module contains the authentication handlers for Requests.
-"""
-
-import hashlib
-import os
-import re
-import threading
-import time
-import warnings
-from base64 import b64encode
-
-from ._internal_utils import to_native_string
-from .compat import basestring, str, urlparse
-from .cookies import extract_cookies_to_jar
-from .utils import parse_dict_header
-
-CONTENT_TYPE_FORM_URLENCODED = "application/x-www-form-urlencoded"
-CONTENT_TYPE_MULTI_PART = "multipart/form-data"
-
-
-def _basic_auth_str(username, password):
-    """Returns a Basic Auth string."""
-
-    # "I want us to put a big-ol' comment on top of it that
-    # says that this behaviour is dumb but we need to preserve
-    # it because people are relying on it."
-    #    - Lukasa
-    #
-    # These are here solely to maintain backwards compatibility
-    # for things like ints. This will be removed in 3.0.0.
-    if not isinstance(username, basestring):
-        warnings.warn(
-            "Non-string usernames will no longer be supported in Requests "
-            "3.0.0. Please convert the object you've passed in ({!r}) to "
-            "a string or bytes object in the near future to avoid "
-            "problems.".format(username),
-            category=DeprecationWarning,
-        )
-        username = str(username)
-
-    if not isinstance(password, basestring):
-        warnings.warn(
-            "Non-string passwords will no longer be supported in Requests "
-            "3.0.0. Please convert the object you've passed in ({!r}) to "
-            "a string or bytes object in the near future to avoid "
-            "problems.".format(type(password)),
-            category=DeprecationWarning,
-        )
-        password = str(password)
-    # -- End Removal --
-
-    if isinstance(username, str):
-        username = username.encode("latin1")
-
-    if isinstance(password, str):
-        password = password.encode("latin1")
-
-    authstr = "Basic " + to_native_string(
-        b64encode(b":".join((username, password))).strip()
-    )
-
-    return authstr
-
-
-class AuthBase:
-    """Base class that all auth implementations derive from"""
-
-    def __call__(self, r):
-        raise NotImplementedError("Auth hooks must be callable.")
-
-
-class HTTPBasicAuth(AuthBase):
-    """Attaches HTTP Basic Authentication to the given Request object."""
-
-    def __init__(self, username, password):
-        self.username = username
-        self.password = password
-
-    def __eq__(self, other):
-        return all(
-            [
-                self.username == getattr(other, "username", None),
-                self.password == getattr(other, "password", None),
-            ]
-        )
-
-    def __ne__(self, other):
-        return not self == other
-
-    def __call__(self, r):
-        r.headers["Authorization"] = _basic_auth_str(self.username, self.password)
-        return r
-
-
-class HTTPProxyAuth(HTTPBasicAuth):
-    """Attaches HTTP Proxy Authentication to a given Request object."""
-
-    def __call__(self, r):
-        r.headers["Proxy-Authorization"] = _basic_auth_str(self.username, self.password)
-        return r
-
-
-class HTTPDigestAuth(AuthBase):
-    """Attaches HTTP Digest Authentication to the given Request object."""
-
-    def __init__(self, username, password):
-        self.username = username
-        self.password = password
-        # Keep state in per-thread local storage
-        self._thread_local = threading.local()
-
-    def init_per_thread_state(self):
-        # Ensure state is initialized just once per-thread
-        if not hasattr(self._thread_local, "init"):
-            self._thread_local.init = True
-            self._thread_local.last_nonce = ""
-            self._thread_local.nonce_count = 0
-            self._thread_local.chal = {}
-            self._thread_local.pos = None
-            self._thread_local.num_401_calls = None
-
-    def build_digest_header(self, method, url):
-        """
-        :rtype: str
-        """
-
-        realm = self._thread_local.chal["realm"]
-        nonce = self._thread_local.chal["nonce"]
-        qop = self._thread_local.chal.get("qop")
-        algorithm = self._thread_local.chal.get("algorithm")
-        opaque = self._thread_local.chal.get("opaque")
-        hash_utf8 = None
-
-        if algorithm is None:
-            _algorithm = "MD5"
-        else:
-            _algorithm = algorithm.upper()
-        # lambdas assume digest modules are imported at the top level
-        if _algorithm == "MD5" or _algorithm == "MD5-SESS":
-
-            def md5_utf8(x):
-                if isinstance(x, str):
-                    x = x.encode("utf-8")
-                return hashlib.md5(x).hexdigest()
-
-            hash_utf8 = md5_utf8
-        elif _algorithm == "SHA":
-
-            def sha_utf8(x):
-                if isinstance(x, str):
-                    x = x.encode("utf-8")
-                return hashlib.sha1(x).hexdigest()
-
-            hash_utf8 = sha_utf8
-        elif _algorithm == "SHA-256":
-
-            def sha256_utf8(x):
-                if isinstance(x, str):
-                    x = x.encode("utf-8")
-                return hashlib.sha256(x).hexdigest()
-
-            hash_utf8 = sha256_utf8
-        elif _algorithm == "SHA-512":
-
-            def sha512_utf8(x):
-                if isinstance(x, str):
-                    x = x.encode("utf-8")
-                return hashlib.sha512(x).hexdigest()
-
-            hash_utf8 = sha512_utf8
-
-        KD = lambda s, d: hash_utf8(f"{s}:{d}")  # noqa:E731
-
-        if hash_utf8 is None:
-            return None
-
-        # XXX not implemented yet
-        entdig = None
-        p_parsed = urlparse(url)
-        #: path is request-uri defined in RFC 2616 which should not be empty
-        path = p_parsed.path or "/"
-        if p_parsed.query:
-            path += f"?{p_parsed.query}"
-
-        A1 = f"{self.username}:{realm}:{self.password}"
-        A2 = f"{method}:{path}"
-
-        HA1 = hash_utf8(A1)
-        HA2 = hash_utf8(A2)
-
-        if nonce == self._thread_local.last_nonce:
-            self._thread_local.nonce_count += 1
-        else:
-            self._thread_local.nonce_count = 1
-        ncvalue = f"{self._thread_local.nonce_count:08x}"
-        s = str(self._thread_local.nonce_count).encode("utf-8")
-        s += nonce.encode("utf-8")
-        s += time.ctime().encode("utf-8")
-        s += os.urandom(8)
-
-        cnonce = hashlib.sha1(s).hexdigest()[:16]
-        if _algorithm == "MD5-SESS":
-            HA1 = hash_utf8(f"{HA1}:{nonce}:{cnonce}")
-
-        if not qop:
-            respdig = KD(HA1, f"{nonce}:{HA2}")
-        elif qop == "auth" or "auth" in qop.split(","):
-            noncebit = f"{nonce}:{ncvalue}:{cnonce}:auth:{HA2}"
-            respdig = KD(HA1, noncebit)
-        else:
-            # XXX handle auth-int.
-            return None
-
-        self._thread_local.last_nonce = nonce
-
-        # XXX should the partial digests be encoded too?
-        base = (
-            f'username="{self.username}", realm="{realm}", nonce="{nonce}", '
-            f'uri="{path}", response="{respdig}"'
-        )
-        if opaque:
-            base += f', opaque="{opaque}"'
-        if algorithm:
-            base += f', algorithm="{algorithm}"'
-        if entdig:
-            base += f', digest="{entdig}"'
-        if qop:
-            base += f', qop="auth", nc={ncvalue}, cnonce="{cnonce}"'
-
-        return f"Digest {base}"
-
-    def handle_redirect(self, r, **kwargs):
-        """Reset num_401_calls counter on redirects."""
-        if r.is_redirect:
-            self._thread_local.num_401_calls = 1
-
-    def handle_401(self, r, **kwargs):
-        """
-        Takes the given response and tries digest-auth, if needed.
-
-        :rtype: requests.Response
-        """
-
-        # If response is not 4xx, do not auth
-        # See https://github.com/psf/requests/issues/3772
-        if not 400 <= r.status_code < 500:
-            self._thread_local.num_401_calls = 1
-            return r
-
-        if self._thread_local.pos is not None:
-            # Rewind the file position indicator of the body to where
-            # it was to resend the request.
-            r.request.body.seek(self._thread_local.pos)
-        s_auth = r.headers.get("www-authenticate", "")
-
-        if "digest" in s_auth.lower() and self._thread_local.num_401_calls < 2:
-            self._thread_local.num_401_calls += 1
-            pat = re.compile(r"digest ", flags=re.IGNORECASE)
-            self._thread_local.chal = parse_dict_header(pat.sub("", s_auth, count=1))
-
-            # Consume content and release the original connection
-            # to allow our new request to reuse the same one.
-            r.content
-            r.close()
-            prep = r.request.copy()
-            extract_cookies_to_jar(prep._cookies, r.request, r.raw)
-            prep.prepare_cookies(prep._cookies)
-
-            prep.headers["Authorization"] = self.build_digest_header(
-                prep.method, prep.url
-            )
-            _r = r.connection.send(prep, **kwargs)
-            _r.history.append(r)
-            _r.request = prep
-
-            return _r
-
-        self._thread_local.num_401_calls = 1
-        return r
-
-    def __call__(self, r):
-        # Initialize per-thread state, if needed
-        self.init_per_thread_state()
-        # If we have a saved nonce, skip the 401
-        if self._thread_local.last_nonce:
-            r.headers["Authorization"] = self.build_digest_header(r.method, r.url)
-        try:
-            self._thread_local.pos = r.body.tell()
-        except AttributeError:
-            # In the case of HTTPDigestAuth being reused and the body of
-            # the previous request was a file-like object, pos has the
-            # file position of the previous body. Ensure it's set to
-            # None.
-            self._thread_local.pos = None
-        r.register_hook("response", self.handle_401)
-        r.register_hook("response", self.handle_redirect)
-        self._thread_local.num_401_calls = 1
-
-        return r
-
-    def __eq__(self, other):
-        return all(
-            [
-                self.username == getattr(other, "username", None),
-                self.password == getattr(other, "password", None),
-            ]
-        )
-
-    def __ne__(self, other):
-        return not self == other
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/exceptions.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/exceptions.py
deleted file mode 100644
index 7f3660f00..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/exceptions.py
+++ /dev/null
@@ -1,151 +0,0 @@
-"""
-requests.exceptions
-~~~~~~~~~~~~~~~~~~~
-
-This module contains the set of Requests' exceptions.
-"""
-from pip._vendor.urllib3.exceptions import HTTPError as BaseHTTPError
-
-from .compat import JSONDecodeError as CompatJSONDecodeError
-
-
-class RequestException(IOError):
-    """There was an ambiguous exception that occurred while handling your
-    request.
-    """
-
-    def __init__(self, *args, **kwargs):
-        """Initialize RequestException with `request` and `response` objects."""
-        response = kwargs.pop("response", None)
-        self.response = response
-        self.request = kwargs.pop("request", None)
-        if response is not None and not self.request and hasattr(response, "request"):
-            self.request = self.response.request
-        super().__init__(*args, **kwargs)
-
-
-class InvalidJSONError(RequestException):
-    """A JSON error occurred."""
-
-
-class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError):
-    """Couldn't decode the text into json"""
-
-    def __init__(self, *args, **kwargs):
-        """
-        Construct the JSONDecodeError instance first with all
-        args. Then use it's args to construct the IOError so that
-        the json specific args aren't used as IOError specific args
-        and the error message from JSONDecodeError is preserved.
-        """
-        CompatJSONDecodeError.__init__(self, *args)
-        InvalidJSONError.__init__(self, *self.args, **kwargs)
-
-    def __reduce__(self):
-        """
-        The __reduce__ method called when pickling the object must
-        be the one from the JSONDecodeError (be it json/simplejson)
-        as it expects all the arguments for instantiation, not just
-        one like the IOError, and the MRO would by default call the
-        __reduce__ method from the IOError due to the inheritance order.
-        """
-        return CompatJSONDecodeError.__reduce__(self)
-
-
-class HTTPError(RequestException):
-    """An HTTP error occurred."""
-
-
-class ConnectionError(RequestException):
-    """A Connection error occurred."""
-
-
-class ProxyError(ConnectionError):
-    """A proxy error occurred."""
-
-
-class SSLError(ConnectionError):
-    """An SSL error occurred."""
-
-
-class Timeout(RequestException):
-    """The request timed out.
-
-    Catching this error will catch both
-    :exc:`~requests.exceptions.ConnectTimeout` and
-    :exc:`~requests.exceptions.ReadTimeout` errors.
-    """
-
-
-class ConnectTimeout(ConnectionError, Timeout):
-    """The request timed out while trying to connect to the remote server.
-
-    Requests that produced this error are safe to retry.
-    """
-
-
-class ReadTimeout(Timeout):
-    """The server did not send any data in the allotted amount of time."""
-
-
-class URLRequired(RequestException):
-    """A valid URL is required to make a request."""
-
-
-class TooManyRedirects(RequestException):
-    """Too many redirects."""
-
-
-class MissingSchema(RequestException, ValueError):
-    """The URL scheme (e.g. http or https) is missing."""
-
-
-class InvalidSchema(RequestException, ValueError):
-    """The URL scheme provided is either invalid or unsupported."""
-
-
-class InvalidURL(RequestException, ValueError):
-    """The URL provided was somehow invalid."""
-
-
-class InvalidHeader(RequestException, ValueError):
-    """The header value provided was somehow invalid."""
-
-
-class InvalidProxyURL(InvalidURL):
-    """The proxy URL provided is invalid."""
-
-
-class ChunkedEncodingError(RequestException):
-    """The server declared chunked encoding but sent an invalid chunk."""
-
-
-class ContentDecodingError(RequestException, BaseHTTPError):
-    """Failed to decode response content."""
-
-
-class StreamConsumedError(RequestException, TypeError):
-    """The content for this response was already consumed."""
-
-
-class RetryError(RequestException):
-    """Custom retries logic failed"""
-
-
-class UnrewindableBodyError(RequestException):
-    """Requests encountered an error when trying to rewind a body."""
-
-
-# Warnings
-
-
-class RequestsWarning(Warning):
-    """Base warning for Requests."""
-
-
-class FileModeWarning(RequestsWarning, DeprecationWarning):
-    """A file was opened in text mode, but Requests determined its binary length."""
-
-
-class RequestsDependencyWarning(RequestsWarning):
-    """An imported dependency doesn't match the expected version range."""
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/utils.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/utils.py
deleted file mode 100644
index e8ea5ad36..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/utils.py
+++ /dev/null
@@ -1,1086 +0,0 @@
-"""
-requests.utils
-~~~~~~~~~~~~~~
-
-This module provides utility functions that are used within Requests
-that are also useful for external consumption.
-"""
-
-import codecs
-import contextlib
-import io
-import os
-import re
-import socket
-import struct
-import sys
-import tempfile
-import warnings
-import zipfile
-from collections import OrderedDict
-
-from pip._vendor.urllib3.util import make_headers, parse_url
-
-from . import certs
-from .__version__ import __version__
-
-# to_native_string is unused here, but imported here for backwards compatibility
-from ._internal_utils import (  # noqa: F401
-    _HEADER_VALIDATORS_BYTE,
-    _HEADER_VALIDATORS_STR,
-    HEADER_VALIDATORS,
-    to_native_string,
-)
-from .compat import (
-    Mapping,
-    basestring,
-    bytes,
-    getproxies,
-    getproxies_environment,
-    integer_types,
-    is_urllib3_1,
-)
-from .compat import parse_http_list as _parse_list_header
-from .compat import (
-    proxy_bypass,
-    proxy_bypass_environment,
-    quote,
-    str,
-    unquote,
-    urlparse,
-    urlunparse,
-)
-from .cookies import cookiejar_from_dict
-from .exceptions import (
-    FileModeWarning,
-    InvalidHeader,
-    InvalidURL,
-    UnrewindableBodyError,
-)
-from .structures import CaseInsensitiveDict
-
-NETRC_FILES = (".netrc", "_netrc")
-
-DEFAULT_CA_BUNDLE_PATH = certs.where()
-
-DEFAULT_PORTS = {"http": 80, "https": 443}
-
-# Ensure that ', ' is used to preserve previous delimiter behavior.
-DEFAULT_ACCEPT_ENCODING = ", ".join(
-    re.split(r",\s*", make_headers(accept_encoding=True)["accept-encoding"])
-)
-
-
-if sys.platform == "win32":
-    # provide a proxy_bypass version on Windows without DNS lookups
-
-    def proxy_bypass_registry(host):
-        try:
-            import winreg
-        except ImportError:
-            return False
-
-        try:
-            internetSettings = winreg.OpenKey(
-                winreg.HKEY_CURRENT_USER,
-                r"Software\Microsoft\Windows\CurrentVersion\Internet Settings",
-            )
-            # ProxyEnable could be REG_SZ or REG_DWORD, normalizing it
-            proxyEnable = int(winreg.QueryValueEx(internetSettings, "ProxyEnable")[0])
-            # ProxyOverride is almost always a string
-            proxyOverride = winreg.QueryValueEx(internetSettings, "ProxyOverride")[0]
-        except (OSError, ValueError):
-            return False
-        if not proxyEnable or not proxyOverride:
-            return False
-
-        # make a check value list from the registry entry: replace the
-        # '' string by the localhost entry and the corresponding
-        # canonical entry.
-        proxyOverride = proxyOverride.split(";")
-        # filter out empty strings to avoid re.match return true in the following code.
-        proxyOverride = filter(None, proxyOverride)
-        # now check if we match one of the registry values.
-        for test in proxyOverride:
-            if test == "":
-                if "." not in host:
-                    return True
-            test = test.replace(".", r"\.")  # mask dots
-            test = test.replace("*", r".*")  # change glob sequence
-            test = test.replace("?", r".")  # change glob char
-            if re.match(test, host, re.I):
-                return True
-        return False
-
-    def proxy_bypass(host):  # noqa
-        """Return True, if the host should be bypassed.
-
-        Checks proxy settings gathered from the environment, if specified,
-        or the registry.
-        """
-        if getproxies_environment():
-            return proxy_bypass_environment(host)
-        else:
-            return proxy_bypass_registry(host)
-
-
-def dict_to_sequence(d):
-    """Returns an internal sequence dictionary update."""
-
-    if hasattr(d, "items"):
-        d = d.items()
-
-    return d
-
-
-def super_len(o):
-    total_length = None
-    current_position = 0
-
-    if not is_urllib3_1 and isinstance(o, str):
-        # urllib3 2.x+ treats all strings as utf-8 instead
-        # of latin-1 (iso-8859-1) like http.client.
-        o = o.encode("utf-8")
-
-    if hasattr(o, "__len__"):
-        total_length = len(o)
-
-    elif hasattr(o, "len"):
-        total_length = o.len
-
-    elif hasattr(o, "fileno"):
-        try:
-            fileno = o.fileno()
-        except (io.UnsupportedOperation, AttributeError):
-            # AttributeError is a surprising exception, seeing as how we've just checked
-            # that `hasattr(o, 'fileno')`.  It happens for objects obtained via
-            # `Tarfile.extractfile()`, per issue 5229.
-            pass
-        else:
-            total_length = os.fstat(fileno).st_size
-
-            # Having used fstat to determine the file length, we need to
-            # confirm that this file was opened up in binary mode.
-            if "b" not in o.mode:
-                warnings.warn(
-                    (
-                        "Requests has determined the content-length for this "
-                        "request using the binary size of the file: however, the "
-                        "file has been opened in text mode (i.e. without the 'b' "
-                        "flag in the mode). This may lead to an incorrect "
-                        "content-length. In Requests 3.0, support will be removed "
-                        "for files in text mode."
-                    ),
-                    FileModeWarning,
-                )
-
-    if hasattr(o, "tell"):
-        try:
-            current_position = o.tell()
-        except OSError:
-            # This can happen in some weird situations, such as when the file
-            # is actually a special file descriptor like stdin. In this
-            # instance, we don't know what the length is, so set it to zero and
-            # let requests chunk it instead.
-            if total_length is not None:
-                current_position = total_length
-        else:
-            if hasattr(o, "seek") and total_length is None:
-                # StringIO and BytesIO have seek but no usable fileno
-                try:
-                    # seek to end of file
-                    o.seek(0, 2)
-                    total_length = o.tell()
-
-                    # seek back to current position to support
-                    # partially read file-like objects
-                    o.seek(current_position or 0)
-                except OSError:
-                    total_length = 0
-
-    if total_length is None:
-        total_length = 0
-
-    return max(0, total_length - current_position)
-
-
-def get_netrc_auth(url, raise_errors=False):
-    """Returns the Requests tuple auth for a given url from netrc."""
-
-    netrc_file = os.environ.get("NETRC")
-    if netrc_file is not None:
-        netrc_locations = (netrc_file,)
-    else:
-        netrc_locations = (f"~/{f}" for f in NETRC_FILES)
-
-    try:
-        from netrc import NetrcParseError, netrc
-
-        netrc_path = None
-
-        for f in netrc_locations:
-            loc = os.path.expanduser(f)
-            if os.path.exists(loc):
-                netrc_path = loc
-                break
-
-        # Abort early if there isn't one.
-        if netrc_path is None:
-            return
-
-        ri = urlparse(url)
-        host = ri.hostname
-
-        try:
-            _netrc = netrc(netrc_path).authenticators(host)
-            if _netrc:
-                # Return with login / password
-                login_i = 0 if _netrc[0] else 1
-                return (_netrc[login_i], _netrc[2])
-        except (NetrcParseError, OSError):
-            # If there was a parsing error or a permissions issue reading the file,
-            # we'll just skip netrc auth unless explicitly asked to raise errors.
-            if raise_errors:
-                raise
-
-    # App Engine hackiness.
-    except (ImportError, AttributeError):
-        pass
-
-
-def guess_filename(obj):
-    """Tries to guess the filename of the given object."""
-    name = getattr(obj, "name", None)
-    if name and isinstance(name, basestring) and name[0] != "<" and name[-1] != ">":
-        return os.path.basename(name)
-
-
-def extract_zipped_paths(path):
-    """Replace nonexistent paths that look like they refer to a member of a zip
-    archive with the location of an extracted copy of the target, or else
-    just return the provided path unchanged.
-    """
-    if os.path.exists(path):
-        # this is already a valid path, no need to do anything further
-        return path
-
-    # find the first valid part of the provided path and treat that as a zip archive
-    # assume the rest of the path is the name of a member in the archive
-    archive, member = os.path.split(path)
-    while archive and not os.path.exists(archive):
-        archive, prefix = os.path.split(archive)
-        if not prefix:
-            # If we don't check for an empty prefix after the split (in other words, archive remains unchanged after the split),
-            # we _can_ end up in an infinite loop on a rare corner case affecting a small number of users
-            break
-        member = "/".join([prefix, member])
-
-    if not zipfile.is_zipfile(archive):
-        return path
-
-    zip_file = zipfile.ZipFile(archive)
-    if member not in zip_file.namelist():
-        return path
-
-    # we have a valid zip archive and a valid member of that archive
-    tmp = tempfile.gettempdir()
-    extracted_path = os.path.join(tmp, member.split("/")[-1])
-    if not os.path.exists(extracted_path):
-        # use read + write to avoid the creating nested folders, we only want the file, avoids mkdir racing condition
-        with atomic_open(extracted_path) as file_handler:
-            file_handler.write(zip_file.read(member))
-    return extracted_path
-
-
-@contextlib.contextmanager
-def atomic_open(filename):
-    """Write a file to the disk in an atomic fashion"""
-    tmp_descriptor, tmp_name = tempfile.mkstemp(dir=os.path.dirname(filename))
-    try:
-        with os.fdopen(tmp_descriptor, "wb") as tmp_handler:
-            yield tmp_handler
-        os.replace(tmp_name, filename)
-    except BaseException:
-        os.remove(tmp_name)
-        raise
-
-
-def from_key_val_list(value):
-    """Take an object and test to see if it can be represented as a
-    dictionary. Unless it can not be represented as such, return an
-    OrderedDict, e.g.,
-
-    ::
-
-        >>> from_key_val_list([('key', 'val')])
-        OrderedDict([('key', 'val')])
-        >>> from_key_val_list('string')
-        Traceback (most recent call last):
-        ...
-        ValueError: cannot encode objects that are not 2-tuples
-        >>> from_key_val_list({'key': 'val'})
-        OrderedDict([('key', 'val')])
-
-    :rtype: OrderedDict
-    """
-    if value is None:
-        return None
-
-    if isinstance(value, (str, bytes, bool, int)):
-        raise ValueError("cannot encode objects that are not 2-tuples")
-
-    return OrderedDict(value)
-
-
-def to_key_val_list(value):
-    """Take an object and test to see if it can be represented as a
-    dictionary. If it can be, return a list of tuples, e.g.,
-
-    ::
-
-        >>> to_key_val_list([('key', 'val')])
-        [('key', 'val')]
-        >>> to_key_val_list({'key': 'val'})
-        [('key', 'val')]
-        >>> to_key_val_list('string')
-        Traceback (most recent call last):
-        ...
-        ValueError: cannot encode objects that are not 2-tuples
-
-    :rtype: list
-    """
-    if value is None:
-        return None
-
-    if isinstance(value, (str, bytes, bool, int)):
-        raise ValueError("cannot encode objects that are not 2-tuples")
-
-    if isinstance(value, Mapping):
-        value = value.items()
-
-    return list(value)
-
-
-# From mitsuhiko/werkzeug (used with permission).
-def parse_list_header(value):
-    """Parse lists as described by RFC 2068 Section 2.
-
-    In particular, parse comma-separated lists where the elements of
-    the list may include quoted-strings.  A quoted-string could
-    contain a comma.  A non-quoted string could have quotes in the
-    middle.  Quotes are removed automatically after parsing.
-
-    It basically works like :func:`parse_set_header` just that items
-    may appear multiple times and case sensitivity is preserved.
-
-    The return value is a standard :class:`list`:
-
-    >>> parse_list_header('token, "quoted value"')
-    ['token', 'quoted value']
-
-    To create a header from the :class:`list` again, use the
-    :func:`dump_header` function.
-
-    :param value: a string with a list header.
-    :return: :class:`list`
-    :rtype: list
-    """
-    result = []
-    for item in _parse_list_header(value):
-        if item[:1] == item[-1:] == '"':
-            item = unquote_header_value(item[1:-1])
-        result.append(item)
-    return result
-
-
-# From mitsuhiko/werkzeug (used with permission).
-def parse_dict_header(value):
-    """Parse lists of key, value pairs as described by RFC 2068 Section 2 and
-    convert them into a python dict:
-
-    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
-    >>> type(d) is dict
-    True
-    >>> sorted(d.items())
-    [('bar', 'as well'), ('foo', 'is a fish')]
-
-    If there is no value for a key it will be `None`:
-
-    >>> parse_dict_header('key_without_value')
-    {'key_without_value': None}
-
-    To create a header from the :class:`dict` again, use the
-    :func:`dump_header` function.
-
-    :param value: a string with a dict header.
-    :return: :class:`dict`
-    :rtype: dict
-    """
-    result = {}
-    for item in _parse_list_header(value):
-        if "=" not in item:
-            result[item] = None
-            continue
-        name, value = item.split("=", 1)
-        if value[:1] == value[-1:] == '"':
-            value = unquote_header_value(value[1:-1])
-        result[name] = value
-    return result
-
-
-# From mitsuhiko/werkzeug (used with permission).
-def unquote_header_value(value, is_filename=False):
-    r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
-    This does not use the real unquoting but what browsers are actually
-    using for quoting.
-
-    :param value: the header value to unquote.
-    :rtype: str
-    """
-    if value and value[0] == value[-1] == '"':
-        # this is not the real unquoting, but fixing this so that the
-        # RFC is met will result in bugs with internet explorer and
-        # probably some other browsers as well.  IE for example is
-        # uploading files with "C:\foo\bar.txt" as filename
-        value = value[1:-1]
-
-        # if this is a filename and the starting characters look like
-        # a UNC path, then just return the value without quotes.  Using the
-        # replace sequence below on a UNC path has the effect of turning
-        # the leading double slash into a single slash and then
-        # _fix_ie_filename() doesn't work correctly.  See #458.
-        if not is_filename or value[:2] != "\\\\":
-            return value.replace("\\\\", "\\").replace('\\"', '"')
-    return value
-
-
-def dict_from_cookiejar(cj):
-    """Returns a key/value dictionary from a CookieJar.
-
-    :param cj: CookieJar object to extract cookies from.
-    :rtype: dict
-    """
-
-    cookie_dict = {cookie.name: cookie.value for cookie in cj}
-    return cookie_dict
-
-
-def add_dict_to_cookiejar(cj, cookie_dict):
-    """Returns a CookieJar from a key/value dictionary.
-
-    :param cj: CookieJar to insert cookies into.
-    :param cookie_dict: Dict of key/values to insert into CookieJar.
-    :rtype: CookieJar
-    """
-
-    return cookiejar_from_dict(cookie_dict, cj)
-
-
-def get_encodings_from_content(content):
-    """Returns encodings from given content string.
-
-    :param content: bytestring to extract encodings from.
-    """
-    warnings.warn(
-        (
-            "In requests 3.0, get_encodings_from_content will be removed. For "
-            "more information, please see the discussion on issue #2266. (This"
-            " warning should only appear once.)"
-        ),
-        DeprecationWarning,
-    )
-
-    charset_re = re.compile(r']', flags=re.I)
-    pragma_re = re.compile(r']', flags=re.I)
-    xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')
-
-    return (
-        charset_re.findall(content)
-        + pragma_re.findall(content)
-        + xml_re.findall(content)
-    )
-
-
-def _parse_content_type_header(header):
-    """Returns content type and parameters from given header
-
-    :param header: string
-    :return: tuple containing content type and dictionary of
-         parameters
-    """
-
-    tokens = header.split(";")
-    content_type, params = tokens[0].strip(), tokens[1:]
-    params_dict = {}
-    items_to_strip = "\"' "
-
-    for param in params:
-        param = param.strip()
-        if param:
-            key, value = param, True
-            index_of_equals = param.find("=")
-            if index_of_equals != -1:
-                key = param[:index_of_equals].strip(items_to_strip)
-                value = param[index_of_equals + 1 :].strip(items_to_strip)
-            params_dict[key.lower()] = value
-    return content_type, params_dict
-
-
-def get_encoding_from_headers(headers):
-    """Returns encodings from given HTTP Header Dict.
-
-    :param headers: dictionary to extract encoding from.
-    :rtype: str
-    """
-
-    content_type = headers.get("content-type")
-
-    if not content_type:
-        return None
-
-    content_type, params = _parse_content_type_header(content_type)
-
-    if "charset" in params:
-        return params["charset"].strip("'\"")
-
-    if "text" in content_type:
-        return "ISO-8859-1"
-
-    if "application/json" in content_type:
-        # Assume UTF-8 based on RFC 4627: https://www.ietf.org/rfc/rfc4627.txt since the charset was unset
-        return "utf-8"
-
-
-def stream_decode_response_unicode(iterator, r):
-    """Stream decodes an iterator."""
-
-    if r.encoding is None:
-        yield from iterator
-        return
-
-    decoder = codecs.getincrementaldecoder(r.encoding)(errors="replace")
-    for chunk in iterator:
-        rv = decoder.decode(chunk)
-        if rv:
-            yield rv
-    rv = decoder.decode(b"", final=True)
-    if rv:
-        yield rv
-
-
-def iter_slices(string, slice_length):
-    """Iterate over slices of a string."""
-    pos = 0
-    if slice_length is None or slice_length <= 0:
-        slice_length = len(string)
-    while pos < len(string):
-        yield string[pos : pos + slice_length]
-        pos += slice_length
-
-
-def get_unicode_from_response(r):
-    """Returns the requested content back in unicode.
-
-    :param r: Response object to get unicode content from.
-
-    Tried:
-
-    1. charset from content-type
-    2. fall back and replace all unicode characters
-
-    :rtype: str
-    """
-    warnings.warn(
-        (
-            "In requests 3.0, get_unicode_from_response will be removed. For "
-            "more information, please see the discussion on issue #2266. (This"
-            " warning should only appear once.)"
-        ),
-        DeprecationWarning,
-    )
-
-    tried_encodings = []
-
-    # Try charset from content-type
-    encoding = get_encoding_from_headers(r.headers)
-
-    if encoding:
-        try:
-            return str(r.content, encoding)
-        except UnicodeError:
-            tried_encodings.append(encoding)
-
-    # Fall back:
-    try:
-        return str(r.content, encoding, errors="replace")
-    except TypeError:
-        return r.content
-
-
-# The unreserved URI characters (RFC 3986)
-UNRESERVED_SET = frozenset(
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789-._~"
-)
-
-
-def unquote_unreserved(uri):
-    """Un-escape any percent-escape sequences in a URI that are unreserved
-    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
-
-    :rtype: str
-    """
-    parts = uri.split("%")
-    for i in range(1, len(parts)):
-        h = parts[i][0:2]
-        if len(h) == 2 and h.isalnum():
-            try:
-                c = chr(int(h, 16))
-            except ValueError:
-                raise InvalidURL(f"Invalid percent-escape sequence: '{h}'")
-
-            if c in UNRESERVED_SET:
-                parts[i] = c + parts[i][2:]
-            else:
-                parts[i] = f"%{parts[i]}"
-        else:
-            parts[i] = f"%{parts[i]}"
-    return "".join(parts)
-
-
-def requote_uri(uri):
-    """Re-quote the given URI.
-
-    This function passes the given URI through an unquote/quote cycle to
-    ensure that it is fully and consistently quoted.
-
-    :rtype: str
-    """
-    safe_with_percent = "!#$%&'()*+,/:;=?@[]~"
-    safe_without_percent = "!#$&'()*+,/:;=?@[]~"
-    try:
-        # Unquote only the unreserved characters
-        # Then quote only illegal characters (do not quote reserved,
-        # unreserved, or '%')
-        return quote(unquote_unreserved(uri), safe=safe_with_percent)
-    except InvalidURL:
-        # We couldn't unquote the given URI, so let's try quoting it, but
-        # there may be unquoted '%'s in the URI. We need to make sure they're
-        # properly quoted so they do not cause issues elsewhere.
-        return quote(uri, safe=safe_without_percent)
-
-
-def address_in_network(ip, net):
-    """This function allows you to check if an IP belongs to a network subnet
-
-    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
-             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
-
-    :rtype: bool
-    """
-    ipaddr = struct.unpack("=L", socket.inet_aton(ip))[0]
-    netaddr, bits = net.split("/")
-    netmask = struct.unpack("=L", socket.inet_aton(dotted_netmask(int(bits))))[0]
-    network = struct.unpack("=L", socket.inet_aton(netaddr))[0] & netmask
-    return (ipaddr & netmask) == (network & netmask)
-
-
-def dotted_netmask(mask):
-    """Converts mask from /xx format to xxx.xxx.xxx.xxx
-
-    Example: if mask is 24 function returns 255.255.255.0
-
-    :rtype: str
-    """
-    bits = 0xFFFFFFFF ^ (1 << 32 - mask) - 1
-    return socket.inet_ntoa(struct.pack(">I", bits))
-
-
-def is_ipv4_address(string_ip):
-    """
-    :rtype: bool
-    """
-    try:
-        socket.inet_aton(string_ip)
-    except OSError:
-        return False
-    return True
-
-
-def is_valid_cidr(string_network):
-    """
-    Very simple check of the cidr format in no_proxy variable.
-
-    :rtype: bool
-    """
-    if string_network.count("/") == 1:
-        try:
-            mask = int(string_network.split("/")[1])
-        except ValueError:
-            return False
-
-        if mask < 1 or mask > 32:
-            return False
-
-        try:
-            socket.inet_aton(string_network.split("/")[0])
-        except OSError:
-            return False
-    else:
-        return False
-    return True
-
-
-@contextlib.contextmanager
-def set_environ(env_name, value):
-    """Set the environment variable 'env_name' to 'value'
-
-    Save previous value, yield, and then restore the previous value stored in
-    the environment variable 'env_name'.
-
-    If 'value' is None, do nothing"""
-    value_changed = value is not None
-    if value_changed:
-        old_value = os.environ.get(env_name)
-        os.environ[env_name] = value
-    try:
-        yield
-    finally:
-        if value_changed:
-            if old_value is None:
-                del os.environ[env_name]
-            else:
-                os.environ[env_name] = old_value
-
-
-def should_bypass_proxies(url, no_proxy):
-    """
-    Returns whether we should bypass proxies or not.
-
-    :rtype: bool
-    """
-
-    # Prioritize lowercase environment variables over uppercase
-    # to keep a consistent behaviour with other http projects (curl, wget).
-    def get_proxy(key):
-        return os.environ.get(key) or os.environ.get(key.upper())
-
-    # First check whether no_proxy is defined. If it is, check that the URL
-    # we're getting isn't in the no_proxy list.
-    no_proxy_arg = no_proxy
-    if no_proxy is None:
-        no_proxy = get_proxy("no_proxy")
-    parsed = urlparse(url)
-
-    if parsed.hostname is None:
-        # URLs don't always have hostnames, e.g. file:/// urls.
-        return True
-
-    if no_proxy:
-        # We need to check whether we match here. We need to see if we match
-        # the end of the hostname, both with and without the port.
-        no_proxy = (host for host in no_proxy.replace(" ", "").split(",") if host)
-
-        if is_ipv4_address(parsed.hostname):
-            for proxy_ip in no_proxy:
-                if is_valid_cidr(proxy_ip):
-                    if address_in_network(parsed.hostname, proxy_ip):
-                        return True
-                elif parsed.hostname == proxy_ip:
-                    # If no_proxy ip was defined in plain IP notation instead of cidr notation &
-                    # matches the IP of the index
-                    return True
-        else:
-            host_with_port = parsed.hostname
-            if parsed.port:
-                host_with_port += f":{parsed.port}"
-
-            for host in no_proxy:
-                if parsed.hostname.endswith(host) or host_with_port.endswith(host):
-                    # The URL does match something in no_proxy, so we don't want
-                    # to apply the proxies on this URL.
-                    return True
-
-    with set_environ("no_proxy", no_proxy_arg):
-        # parsed.hostname can be `None` in cases such as a file URI.
-        try:
-            bypass = proxy_bypass(parsed.hostname)
-        except (TypeError, socket.gaierror):
-            bypass = False
-
-    if bypass:
-        return True
-
-    return False
-
-
-def get_environ_proxies(url, no_proxy=None):
-    """
-    Return a dict of environment proxies.
-
-    :rtype: dict
-    """
-    if should_bypass_proxies(url, no_proxy=no_proxy):
-        return {}
-    else:
-        return getproxies()
-
-
-def select_proxy(url, proxies):
-    """Select a proxy for the url, if applicable.
-
-    :param url: The url being for the request
-    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
-    """
-    proxies = proxies or {}
-    urlparts = urlparse(url)
-    if urlparts.hostname is None:
-        return proxies.get(urlparts.scheme, proxies.get("all"))
-
-    proxy_keys = [
-        urlparts.scheme + "://" + urlparts.hostname,
-        urlparts.scheme,
-        "all://" + urlparts.hostname,
-        "all",
-    ]
-    proxy = None
-    for proxy_key in proxy_keys:
-        if proxy_key in proxies:
-            proxy = proxies[proxy_key]
-            break
-
-    return proxy
-
-
-def resolve_proxies(request, proxies, trust_env=True):
-    """This method takes proxy information from a request and configuration
-    input to resolve a mapping of target proxies. This will consider settings
-    such as NO_PROXY to strip proxy configurations.
-
-    :param request: Request or PreparedRequest
-    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
-    :param trust_env: Boolean declaring whether to trust environment configs
-
-    :rtype: dict
-    """
-    proxies = proxies if proxies is not None else {}
-    url = request.url
-    scheme = urlparse(url).scheme
-    no_proxy = proxies.get("no_proxy")
-    new_proxies = proxies.copy()
-
-    if trust_env and not should_bypass_proxies(url, no_proxy=no_proxy):
-        environ_proxies = get_environ_proxies(url, no_proxy=no_proxy)
-
-        proxy = environ_proxies.get(scheme, environ_proxies.get("all"))
-
-        if proxy:
-            new_proxies.setdefault(scheme, proxy)
-    return new_proxies
-
-
-def default_user_agent(name="python-requests"):
-    """
-    Return a string representing the default user agent.
-
-    :rtype: str
-    """
-    return f"{name}/{__version__}"
-
-
-def default_headers():
-    """
-    :rtype: requests.structures.CaseInsensitiveDict
-    """
-    return CaseInsensitiveDict(
-        {
-            "User-Agent": default_user_agent(),
-            "Accept-Encoding": DEFAULT_ACCEPT_ENCODING,
-            "Accept": "*/*",
-            "Connection": "keep-alive",
-        }
-    )
-
-
-def parse_header_links(value):
-    """Return a list of parsed link headers proxies.
-
-    i.e. Link: ; rel=front; type="image/jpeg",; rel=back;type="image/jpeg"
-
-    :rtype: list
-    """
-
-    links = []
-
-    replace_chars = " '\""
-
-    value = value.strip(replace_chars)
-    if not value:
-        return links
-
-    for val in re.split(", *<", value):
-        try:
-            url, params = val.split(";", 1)
-        except ValueError:
-            url, params = val, ""
-
-        link = {"url": url.strip("<> '\"")}
-
-        for param in params.split(";"):
-            try:
-                key, value = param.split("=")
-            except ValueError:
-                break
-
-            link[key.strip(replace_chars)] = value.strip(replace_chars)
-
-        links.append(link)
-
-    return links
-
-
-# Null bytes; no need to recreate these on each call to guess_json_utf
-_null = "\x00".encode("ascii")  # encoding to ASCII for Python 3
-_null2 = _null * 2
-_null3 = _null * 3
-
-
-def guess_json_utf(data):
-    """
-    :rtype: str
-    """
-    # JSON always starts with two ASCII characters, so detection is as
-    # easy as counting the nulls and from their location and count
-    # determine the encoding. Also detect a BOM, if present.
-    sample = data[:4]
-    if sample in (codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE):
-        return "utf-32"  # BOM included
-    if sample[:3] == codecs.BOM_UTF8:
-        return "utf-8-sig"  # BOM included, MS style (discouraged)
-    if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE):
-        return "utf-16"  # BOM included
-    nullcount = sample.count(_null)
-    if nullcount == 0:
-        return "utf-8"
-    if nullcount == 2:
-        if sample[::2] == _null2:  # 1st and 3rd are null
-            return "utf-16-be"
-        if sample[1::2] == _null2:  # 2nd and 4th are null
-            return "utf-16-le"
-        # Did not detect 2 valid UTF-16 ascii-range characters
-    if nullcount == 3:
-        if sample[:3] == _null3:
-            return "utf-32-be"
-        if sample[1:] == _null3:
-            return "utf-32-le"
-        # Did not detect a valid UTF-32 ascii-range character
-    return None
-
-
-def prepend_scheme_if_needed(url, new_scheme):
-    """Given a URL that may or may not have a scheme, prepend the given scheme.
-    Does not replace a present scheme with the one provided as an argument.
-
-    :rtype: str
-    """
-    parsed = parse_url(url)
-    scheme, auth, host, port, path, query, fragment = parsed
-
-    # A defect in urlparse determines that there isn't a netloc present in some
-    # urls. We previously assumed parsing was overly cautious, and swapped the
-    # netloc and path. Due to a lack of tests on the original defect, this is
-    # maintained with parse_url for backwards compatibility.
-    netloc = parsed.netloc
-    if not netloc:
-        netloc, path = path, netloc
-
-    if auth:
-        # parse_url doesn't provide the netloc with auth
-        # so we'll add it ourselves.
-        netloc = "@".join([auth, netloc])
-    if scheme is None:
-        scheme = new_scheme
-    if path is None:
-        path = ""
-
-    return urlunparse((scheme, netloc, path, "", query, fragment))
-
-
-def get_auth_from_url(url):
-    """Given a url with authentication components, extract them into a tuple of
-    username,password.
-
-    :rtype: (str,str)
-    """
-    parsed = urlparse(url)
-
-    try:
-        auth = (unquote(parsed.username), unquote(parsed.password))
-    except (AttributeError, TypeError):
-        auth = ("", "")
-
-    return auth
-
-
-def check_header_validity(header):
-    """Verifies that header parts don't contain leading whitespace
-    reserved characters, or return characters.
-
-    :param header: tuple, in the format (name, value).
-    """
-    name, value = header
-    _validate_header_part(header, name, 0)
-    _validate_header_part(header, value, 1)
-
-
-def _validate_header_part(header, header_part, header_validator_index):
-    if isinstance(header_part, str):
-        validator = _HEADER_VALIDATORS_STR[header_validator_index]
-    elif isinstance(header_part, bytes):
-        validator = _HEADER_VALIDATORS_BYTE[header_validator_index]
-    else:
-        raise InvalidHeader(
-            f"Header part ({header_part!r}) from {header} "
-            f"must be of type str or bytes, not {type(header_part)}"
-        )
-
-    if not validator.match(header_part):
-        header_kind = "name" if header_validator_index == 0 else "value"
-        raise InvalidHeader(
-            f"Invalid leading whitespace, reserved character(s), or return "
-            f"character(s) in header {header_kind}: {header_part!r}"
-        )
-
-
-def urldefragauth(url):
-    """
-    Given a url remove the fragment and the authentication part.
-
-    :rtype: str
-    """
-    scheme, netloc, path, params, query, fragment = urlparse(url)
-
-    # see func:`prepend_scheme_if_needed`
-    if not netloc:
-        netloc, path = path, netloc
-
-    netloc = netloc.rsplit("@", 1)[-1]
-
-    return urlunparse((scheme, netloc, path, params, query, ""))
-
-
-def rewind_body(prepared_request):
-    """Move file pointer back to its recorded starting position
-    so it can be read again on redirect.
-    """
-    body_seek = getattr(prepared_request.body, "seek", None)
-    if body_seek is not None and isinstance(
-        prepared_request._body_position, integer_types
-    ):
-        try:
-            body_seek(prepared_request._body_position)
-        except OSError:
-            raise UnrewindableBodyError(
-                "An error occurred when rewinding request body for redirect."
-            )
-    else:
-        raise UnrewindableBodyError("Unable to rewind request body for redirect.")
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 566a69a64..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 27f5e14fa..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/abstract.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/abstract.cpython-314.pyc
deleted file mode 100644
index 2c03199a2..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/abstract.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/exceptions.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/exceptions.cpython-314.pyc
deleted file mode 100644
index 0047e1e73..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/exceptions.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 1fddbe249..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-314.pyc
deleted file mode 100644
index ce189a98c..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-314.pyc
deleted file mode 100644
index 0e0cc4e8d..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-314.pyc
deleted file mode 100644
index 6dfd9bb95..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-314.pyc
deleted file mode 100644
index 3a7917f1c..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-314.pyc
deleted file mode 100644
index 927dda6bf..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-314.pyc
deleted file mode 100644
index e5458ae05..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-314.pyc
deleted file mode 100644
index f8e9c182e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-314.pyc
deleted file mode 100644
index aff763c31..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-314.pyc
deleted file mode 100644
index 586a4e14e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/console.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/console.cpython-314.pyc
deleted file mode 100644
index bcaac19e5..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/console.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-314.pyc
deleted file mode 100644
index 836e5ffa0..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-314.pyc
deleted file mode 100644
index 3c8d17bc6..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-314.pyc
deleted file mode 100644
index d4f25f033..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/region.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/region.cpython-314.pyc
deleted file mode 100644
index 9a2337b24..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/region.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/style.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/style.cpython-314.pyc
deleted file mode 100644
index 139fcf80c..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/style.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-314.pyc
deleted file mode 100644
index d212a7ba1..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-314.pyc
deleted file mode 100644
index 941438162..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__init__.py
deleted file mode 100644
index 9395b0438..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
-# Licensed to PSF under a Contributor Agreement.
-
-__all__ = ("loads", "load", "TOMLDecodeError")
-__version__ = "2.3.0"  # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
-
-from ._parser import TOMLDecodeError, load, loads
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index da10c7800..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-314.pyc
deleted file mode 100644
index 121b3a169..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-314.pyc
deleted file mode 100644
index 9bf2e7eac..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-314.pyc
deleted file mode 100644
index a349639d0..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/_parser.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/_parser.py
deleted file mode 100644
index 26170e8ed..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/_parser.py
+++ /dev/null
@@ -1,777 +0,0 @@
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
-# Licensed to PSF under a Contributor Agreement.
-
-from __future__ import annotations
-
-import sys
-from types import MappingProxyType
-
-from ._re import (
-    RE_DATETIME,
-    RE_LOCALTIME,
-    RE_NUMBER,
-    match_to_datetime,
-    match_to_localtime,
-    match_to_number,
-)
-
-TYPE_CHECKING = False
-if TYPE_CHECKING:
-    from collections.abc import Iterable
-    from typing import IO, Any, Final
-
-    from ._types import Key, ParseFloat, Pos
-
-# Inline tables/arrays are implemented using recursion. Pathologically
-# nested documents cause pure Python to raise RecursionError (which is OK),
-# but mypyc binary wheels will crash unrecoverably (not OK). According to
-# mypyc docs this will be fixed in the future:
-# https://mypyc.readthedocs.io/en/latest/differences_from_python.html#stack-overflows
-# Before mypyc's fix is in, recursion needs to be limited by this library.
-# Choosing `sys.getrecursionlimit()` as maximum inline table/array nesting
-# level, as it allows more nesting than pure Python, but still seems a far
-# lower number than where mypyc binaries crash.
-MAX_INLINE_NESTING: Final = sys.getrecursionlimit()
-
-ASCII_CTRL: Final = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
-
-# Neither of these sets include quotation mark or backslash. They are
-# currently handled as separate cases in the parser functions.
-ILLEGAL_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t")
-ILLEGAL_MULTILINE_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t\n")
-
-ILLEGAL_LITERAL_STR_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
-ILLEGAL_MULTILINE_LITERAL_STR_CHARS: Final = ILLEGAL_MULTILINE_BASIC_STR_CHARS
-
-ILLEGAL_COMMENT_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
-
-TOML_WS: Final = frozenset(" \t")
-TOML_WS_AND_NEWLINE: Final = TOML_WS | frozenset("\n")
-BARE_KEY_CHARS: Final = frozenset(
-    "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
-)
-KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'")
-HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789")
-
-BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType(
-    {
-        "\\b": "\u0008",  # backspace
-        "\\t": "\u0009",  # tab
-        "\\n": "\u000a",  # linefeed
-        "\\f": "\u000c",  # form feed
-        "\\r": "\u000d",  # carriage return
-        '\\"': "\u0022",  # quote
-        "\\\\": "\u005c",  # backslash
-    }
-)
-
-
-class DEPRECATED_DEFAULT:
-    """Sentinel to be used as default arg during deprecation
-    period of TOMLDecodeError's free-form arguments."""
-
-
-class TOMLDecodeError(ValueError):
-    """An error raised if a document is not valid TOML.
-
-    Adds the following attributes to ValueError:
-    msg: The unformatted error message
-    doc: The TOML document being parsed
-    pos: The index of doc where parsing failed
-    lineno: The line corresponding to pos
-    colno: The column corresponding to pos
-    """
-
-    def __init__(
-        self,
-        msg: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
-        doc: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
-        pos: Pos | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
-        *args: Any,
-    ):
-        if (
-            args
-            or not isinstance(msg, str)
-            or not isinstance(doc, str)
-            or not isinstance(pos, int)
-        ):
-            import warnings
-
-            warnings.warn(
-                "Free-form arguments for TOMLDecodeError are deprecated. "
-                "Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.",
-                DeprecationWarning,
-                stacklevel=2,
-            )
-            if pos is not DEPRECATED_DEFAULT:
-                args = pos, *args
-            if doc is not DEPRECATED_DEFAULT:
-                args = doc, *args
-            if msg is not DEPRECATED_DEFAULT:
-                args = msg, *args
-            ValueError.__init__(self, *args)
-            return
-
-        lineno = doc.count("\n", 0, pos) + 1
-        if lineno == 1:
-            colno = pos + 1
-        else:
-            colno = pos - doc.rindex("\n", 0, pos)
-
-        if pos >= len(doc):
-            coord_repr = "end of document"
-        else:
-            coord_repr = f"line {lineno}, column {colno}"
-        errmsg = f"{msg} (at {coord_repr})"
-        ValueError.__init__(self, errmsg)
-
-        self.msg = msg
-        self.doc = doc
-        self.pos = pos
-        self.lineno = lineno
-        self.colno = colno
-
-
-def load(__fp: IO[bytes], *, parse_float: ParseFloat = float) -> dict[str, Any]:
-    """Parse TOML from a binary file object."""
-    b = __fp.read()
-    try:
-        s = b.decode()
-    except AttributeError:
-        raise TypeError(
-            "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
-        ) from None
-    return loads(s, parse_float=parse_float)
-
-
-def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]:  # noqa: C901
-    """Parse TOML from a string."""
-
-    # The spec allows converting "\r\n" to "\n", even in string
-    # literals. Let's do so to simplify parsing.
-    try:
-        src = __s.replace("\r\n", "\n")
-    except (AttributeError, TypeError):
-        raise TypeError(
-            f"Expected str object, not '{type(__s).__qualname__}'"
-        ) from None
-    pos = 0
-    out = Output()
-    header: Key = ()
-    parse_float = make_safe_parse_float(parse_float)
-
-    # Parse one statement at a time
-    # (typically means one line in TOML source)
-    while True:
-        # 1. Skip line leading whitespace
-        pos = skip_chars(src, pos, TOML_WS)
-
-        # 2. Parse rules. Expect one of the following:
-        #    - end of file
-        #    - end of line
-        #    - comment
-        #    - key/value pair
-        #    - append dict to list (and move to its namespace)
-        #    - create dict (and move to its namespace)
-        # Skip trailing whitespace when applicable.
-        try:
-            char = src[pos]
-        except IndexError:
-            break
-        if char == "\n":
-            pos += 1
-            continue
-        if char in KEY_INITIAL_CHARS:
-            pos = key_value_rule(src, pos, out, header, parse_float)
-            pos = skip_chars(src, pos, TOML_WS)
-        elif char == "[":
-            try:
-                second_char: str | None = src[pos + 1]
-            except IndexError:
-                second_char = None
-            out.flags.finalize_pending()
-            if second_char == "[":
-                pos, header = create_list_rule(src, pos, out)
-            else:
-                pos, header = create_dict_rule(src, pos, out)
-            pos = skip_chars(src, pos, TOML_WS)
-        elif char != "#":
-            raise TOMLDecodeError("Invalid statement", src, pos)
-
-        # 3. Skip comment
-        pos = skip_comment(src, pos)
-
-        # 4. Expect end of line or end of file
-        try:
-            char = src[pos]
-        except IndexError:
-            break
-        if char != "\n":
-            raise TOMLDecodeError(
-                "Expected newline or end of document after a statement", src, pos
-            )
-        pos += 1
-
-    return out.data.dict
-
-
-class Flags:
-    """Flags that map to parsed keys/namespaces."""
-
-    # Marks an immutable namespace (inline array or inline table).
-    FROZEN: Final = 0
-    # Marks a nest that has been explicitly created and can no longer
-    # be opened using the "[table]" syntax.
-    EXPLICIT_NEST: Final = 1
-
-    def __init__(self) -> None:
-        self._flags: dict[str, dict[Any, Any]] = {}
-        self._pending_flags: set[tuple[Key, int]] = set()
-
-    def add_pending(self, key: Key, flag: int) -> None:
-        self._pending_flags.add((key, flag))
-
-    def finalize_pending(self) -> None:
-        for key, flag in self._pending_flags:
-            self.set(key, flag, recursive=False)
-        self._pending_flags.clear()
-
-    def unset_all(self, key: Key) -> None:
-        cont = self._flags
-        for k in key[:-1]:
-            if k not in cont:
-                return
-            cont = cont[k]["nested"]
-        cont.pop(key[-1], None)
-
-    def set(self, key: Key, flag: int, *, recursive: bool) -> None:  # noqa: A003
-        cont = self._flags
-        key_parent, key_stem = key[:-1], key[-1]
-        for k in key_parent:
-            if k not in cont:
-                cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
-            cont = cont[k]["nested"]
-        if key_stem not in cont:
-            cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
-        cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
-
-    def is_(self, key: Key, flag: int) -> bool:
-        if not key:
-            return False  # document root has no flags
-        cont = self._flags
-        for k in key[:-1]:
-            if k not in cont:
-                return False
-            inner_cont = cont[k]
-            if flag in inner_cont["recursive_flags"]:
-                return True
-            cont = inner_cont["nested"]
-        key_stem = key[-1]
-        if key_stem in cont:
-            inner_cont = cont[key_stem]
-            return flag in inner_cont["flags"] or flag in inner_cont["recursive_flags"]
-        return False
-
-
-class NestedDict:
-    def __init__(self) -> None:
-        # The parsed content of the TOML document
-        self.dict: dict[str, Any] = {}
-
-    def get_or_create_nest(
-        self,
-        key: Key,
-        *,
-        access_lists: bool = True,
-    ) -> dict[str, Any]:
-        cont: Any = self.dict
-        for k in key:
-            if k not in cont:
-                cont[k] = {}
-            cont = cont[k]
-            if access_lists and isinstance(cont, list):
-                cont = cont[-1]
-            if not isinstance(cont, dict):
-                raise KeyError("There is no nest behind this key")
-        return cont  # type: ignore[no-any-return]
-
-    def append_nest_to_list(self, key: Key) -> None:
-        cont = self.get_or_create_nest(key[:-1])
-        last_key = key[-1]
-        if last_key in cont:
-            list_ = cont[last_key]
-            if not isinstance(list_, list):
-                raise KeyError("An object other than list found behind this key")
-            list_.append({})
-        else:
-            cont[last_key] = [{}]
-
-
-class Output:
-    def __init__(self) -> None:
-        self.data = NestedDict()
-        self.flags = Flags()
-
-
-def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
-    try:
-        while src[pos] in chars:
-            pos += 1
-    except IndexError:
-        pass
-    return pos
-
-
-def skip_until(
-    src: str,
-    pos: Pos,
-    expect: str,
-    *,
-    error_on: frozenset[str],
-    error_on_eof: bool,
-) -> Pos:
-    try:
-        new_pos = src.index(expect, pos)
-    except ValueError:
-        new_pos = len(src)
-        if error_on_eof:
-            raise TOMLDecodeError(f"Expected {expect!r}", src, new_pos) from None
-
-    if not error_on.isdisjoint(src[pos:new_pos]):
-        while src[pos] not in error_on:
-            pos += 1
-        raise TOMLDecodeError(f"Found invalid character {src[pos]!r}", src, pos)
-    return new_pos
-
-
-def skip_comment(src: str, pos: Pos) -> Pos:
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char == "#":
-        return skip_until(
-            src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
-        )
-    return pos
-
-
-def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
-    while True:
-        pos_before_skip = pos
-        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
-        pos = skip_comment(src, pos)
-        if pos == pos_before_skip:
-            return pos
-
-
-def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
-    pos += 1  # Skip "["
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, key = parse_key(src, pos)
-
-    if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
-        raise TOMLDecodeError(f"Cannot declare {key} twice", src, pos)
-    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
-    try:
-        out.data.get_or_create_nest(key)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-
-    if not src.startswith("]", pos):
-        raise TOMLDecodeError(
-            "Expected ']' at the end of a table declaration", src, pos
-        )
-    return pos + 1, key
-
-
-def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
-    pos += 2  # Skip "[["
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, key = parse_key(src, pos)
-
-    if out.flags.is_(key, Flags.FROZEN):
-        raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
-    # Free the namespace now that it points to another empty list item...
-    out.flags.unset_all(key)
-    # ...but this key precisely is still prohibited from table declaration
-    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
-    try:
-        out.data.append_nest_to_list(key)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-
-    if not src.startswith("]]", pos):
-        raise TOMLDecodeError(
-            "Expected ']]' at the end of an array declaration", src, pos
-        )
-    return pos + 2, key
-
-
-def key_value_rule(
-    src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
-) -> Pos:
-    pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl=0)
-    key_parent, key_stem = key[:-1], key[-1]
-    abs_key_parent = header + key_parent
-
-    relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
-    for cont_key in relative_path_cont_keys:
-        # Check that dotted key syntax does not redefine an existing table
-        if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
-            raise TOMLDecodeError(f"Cannot redefine namespace {cont_key}", src, pos)
-        # Containers in the relative path can't be opened with the table syntax or
-        # dotted key/value syntax in following table sections.
-        out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)
-
-    if out.flags.is_(abs_key_parent, Flags.FROZEN):
-        raise TOMLDecodeError(
-            f"Cannot mutate immutable namespace {abs_key_parent}", src, pos
-        )
-
-    try:
-        nest = out.data.get_or_create_nest(abs_key_parent)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-    if key_stem in nest:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos)
-    # Mark inline table and array namespaces recursively immutable
-    if isinstance(value, (dict, list)):
-        out.flags.set(header + key, Flags.FROZEN, recursive=True)
-    nest[key_stem] = value
-    return pos
-
-
-def parse_key_value_pair(
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, Key, Any]:
-    pos, key = parse_key(src, pos)
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char != "=":
-        raise TOMLDecodeError("Expected '=' after a key in a key/value pair", src, pos)
-    pos += 1
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, value = parse_value(src, pos, parse_float, nest_lvl)
-    return pos, key, value
-
-
-def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
-    pos, key_part = parse_key_part(src, pos)
-    key: Key = (key_part,)
-    pos = skip_chars(src, pos, TOML_WS)
-    while True:
-        try:
-            char: str | None = src[pos]
-        except IndexError:
-            char = None
-        if char != ".":
-            return pos, key
-        pos += 1
-        pos = skip_chars(src, pos, TOML_WS)
-        pos, key_part = parse_key_part(src, pos)
-        key += (key_part,)
-        pos = skip_chars(src, pos, TOML_WS)
-
-
-def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char in BARE_KEY_CHARS:
-        start_pos = pos
-        pos = skip_chars(src, pos, BARE_KEY_CHARS)
-        return pos, src[start_pos:pos]
-    if char == "'":
-        return parse_literal_str(src, pos)
-    if char == '"':
-        return parse_one_line_basic_str(src, pos)
-    raise TOMLDecodeError("Invalid initial character for a key part", src, pos)
-
-
-def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
-    pos += 1
-    return parse_basic_str(src, pos, multiline=False)
-
-
-def parse_array(
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, list[Any]]:
-    pos += 1
-    array: list[Any] = []
-
-    pos = skip_comments_and_array_ws(src, pos)
-    if src.startswith("]", pos):
-        return pos + 1, array
-    while True:
-        pos, val = parse_value(src, pos, parse_float, nest_lvl)
-        array.append(val)
-        pos = skip_comments_and_array_ws(src, pos)
-
-        c = src[pos : pos + 1]
-        if c == "]":
-            return pos + 1, array
-        if c != ",":
-            raise TOMLDecodeError("Unclosed array", src, pos)
-        pos += 1
-
-        pos = skip_comments_and_array_ws(src, pos)
-        if src.startswith("]", pos):
-            return pos + 1, array
-
-
-def parse_inline_table(
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, dict[str, Any]]:
-    pos += 1
-    nested_dict = NestedDict()
-    flags = Flags()
-
-    pos = skip_chars(src, pos, TOML_WS)
-    if src.startswith("}", pos):
-        return pos + 1, nested_dict.dict
-    while True:
-        pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl)
-        key_parent, key_stem = key[:-1], key[-1]
-        if flags.is_(key, Flags.FROZEN):
-            raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
-        try:
-            nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
-        except KeyError:
-            raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-        if key_stem in nest:
-            raise TOMLDecodeError(f"Duplicate inline table key {key_stem!r}", src, pos)
-        nest[key_stem] = value
-        pos = skip_chars(src, pos, TOML_WS)
-        c = src[pos : pos + 1]
-        if c == "}":
-            return pos + 1, nested_dict.dict
-        if c != ",":
-            raise TOMLDecodeError("Unclosed inline table", src, pos)
-        if isinstance(value, (dict, list)):
-            flags.set(key, Flags.FROZEN, recursive=True)
-        pos += 1
-        pos = skip_chars(src, pos, TOML_WS)
-
-
-def parse_basic_str_escape(
-    src: str, pos: Pos, *, multiline: bool = False
-) -> tuple[Pos, str]:
-    escape_id = src[pos : pos + 2]
-    pos += 2
-    if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
-        # Skip whitespace until next non-whitespace character or end of
-        # the doc. Error if non-whitespace is found before newline.
-        if escape_id != "\\\n":
-            pos = skip_chars(src, pos, TOML_WS)
-            try:
-                char = src[pos]
-            except IndexError:
-                return pos, ""
-            if char != "\n":
-                raise TOMLDecodeError("Unescaped '\\' in a string", src, pos)
-            pos += 1
-        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
-        return pos, ""
-    if escape_id == "\\u":
-        return parse_hex_char(src, pos, 4)
-    if escape_id == "\\U":
-        return parse_hex_char(src, pos, 8)
-    try:
-        return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
-    except KeyError:
-        raise TOMLDecodeError("Unescaped '\\' in a string", src, pos) from None
-
-
-def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
-    return parse_basic_str_escape(src, pos, multiline=True)
-
-
-def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
-    hex_str = src[pos : pos + hex_len]
-    if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
-        raise TOMLDecodeError("Invalid hex value", src, pos)
-    pos += hex_len
-    hex_int = int(hex_str, 16)
-    if not is_unicode_scalar_value(hex_int):
-        raise TOMLDecodeError(
-            "Escaped character is not a Unicode scalar value", src, pos
-        )
-    return pos, chr(hex_int)
-
-
-def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
-    pos += 1  # Skip starting apostrophe
-    start_pos = pos
-    pos = skip_until(
-        src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
-    )
-    return pos + 1, src[start_pos:pos]  # Skip ending apostrophe
-
-
-def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
-    pos += 3
-    if src.startswith("\n", pos):
-        pos += 1
-
-    if literal:
-        delim = "'"
-        end_pos = skip_until(
-            src,
-            pos,
-            "'''",
-            error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
-            error_on_eof=True,
-        )
-        result = src[pos:end_pos]
-        pos = end_pos + 3
-    else:
-        delim = '"'
-        pos, result = parse_basic_str(src, pos, multiline=True)
-
-    # Add at maximum two extra apostrophes/quotes if the end sequence
-    # is 4 or 5 chars long instead of just 3.
-    if not src.startswith(delim, pos):
-        return pos, result
-    pos += 1
-    if not src.startswith(delim, pos):
-        return pos, result + delim
-    pos += 1
-    return pos, result + (delim * 2)
-
-
-def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
-    if multiline:
-        error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
-        parse_escapes = parse_basic_str_escape_multiline
-    else:
-        error_on = ILLEGAL_BASIC_STR_CHARS
-        parse_escapes = parse_basic_str_escape
-    result = ""
-    start_pos = pos
-    while True:
-        try:
-            char = src[pos]
-        except IndexError:
-            raise TOMLDecodeError("Unterminated string", src, pos) from None
-        if char == '"':
-            if not multiline:
-                return pos + 1, result + src[start_pos:pos]
-            if src.startswith('"""', pos):
-                return pos + 3, result + src[start_pos:pos]
-            pos += 1
-            continue
-        if char == "\\":
-            result += src[start_pos:pos]
-            pos, parsed_escape = parse_escapes(src, pos)
-            result += parsed_escape
-            start_pos = pos
-            continue
-        if char in error_on:
-            raise TOMLDecodeError(f"Illegal character {char!r}", src, pos)
-        pos += 1
-
-
-def parse_value(  # noqa: C901
-    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
-) -> tuple[Pos, Any]:
-    if nest_lvl > MAX_INLINE_NESTING:
-        # Pure Python should have raised RecursionError already.
-        # This ensures mypyc binaries eventually do the same.
-        raise RecursionError(  # pragma: no cover
-            "TOML inline arrays/tables are nested more than the allowed"
-            f" {MAX_INLINE_NESTING} levels"
-        )
-
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-
-    # IMPORTANT: order conditions based on speed of checking and likelihood
-
-    # Basic strings
-    if char == '"':
-        if src.startswith('"""', pos):
-            return parse_multiline_str(src, pos, literal=False)
-        return parse_one_line_basic_str(src, pos)
-
-    # Literal strings
-    if char == "'":
-        if src.startswith("'''", pos):
-            return parse_multiline_str(src, pos, literal=True)
-        return parse_literal_str(src, pos)
-
-    # Booleans
-    if char == "t":
-        if src.startswith("true", pos):
-            return pos + 4, True
-    if char == "f":
-        if src.startswith("false", pos):
-            return pos + 5, False
-
-    # Arrays
-    if char == "[":
-        return parse_array(src, pos, parse_float, nest_lvl + 1)
-
-    # Inline tables
-    if char == "{":
-        return parse_inline_table(src, pos, parse_float, nest_lvl + 1)
-
-    # Dates and times
-    datetime_match = RE_DATETIME.match(src, pos)
-    if datetime_match:
-        try:
-            datetime_obj = match_to_datetime(datetime_match)
-        except ValueError as e:
-            raise TOMLDecodeError("Invalid date or datetime", src, pos) from e
-        return datetime_match.end(), datetime_obj
-    localtime_match = RE_LOCALTIME.match(src, pos)
-    if localtime_match:
-        return localtime_match.end(), match_to_localtime(localtime_match)
-
-    # Integers and "normal" floats.
-    # The regex will greedily match any type starting with a decimal
-    # char, so needs to be located after handling of dates and times.
-    number_match = RE_NUMBER.match(src, pos)
-    if number_match:
-        return number_match.end(), match_to_number(number_match, parse_float)
-
-    # Special floats
-    first_three = src[pos : pos + 3]
-    if first_three in {"inf", "nan"}:
-        return pos + 3, parse_float(first_three)
-    first_four = src[pos : pos + 4]
-    if first_four in {"-inf", "+inf", "-nan", "+nan"}:
-        return pos + 4, parse_float(first_four)
-
-    raise TOMLDecodeError("Invalid value", src, pos)
-
-
-def is_unicode_scalar_value(codepoint: int) -> bool:
-    return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)
-
-
-def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
-    """A decorator to make `parse_float` safe.
-
-    `parse_float` must not return dicts or lists, because these types
-    would be mixed with parsed TOML tables and arrays, thus confusing
-    the parser. The returned decorated callable raises `ValueError`
-    instead of returning illegal types.
-    """
-    # The default `float` callable never returns illegal types. Optimize it.
-    if parse_float is float:
-        return float
-
-    def safe_parse_float(float_str: str) -> Any:
-        float_value = parse_float(float_str)
-        if isinstance(float_value, (dict, list)):
-            raise ValueError("parse_float must not return dicts or lists")
-        return float_value
-
-    return safe_parse_float
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 4f6c345c8..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index d936d7bb0..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-314.pyc
deleted file mode 100644
index 196ff820f..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-314.pyc
deleted file mode 100644
index b74fbc2db..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/py.typed b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/py.typed
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/LICENSE.txt b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/LICENSE.txt
deleted file mode 100644
index 429a1767e..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2008-2020 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__init__.py
deleted file mode 100644
index c6fa38212..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__init__.py
+++ /dev/null
@@ -1,102 +0,0 @@
-"""
-Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more
-"""
-from __future__ import absolute_import
-
-# Set default logging handler to avoid "No handler found" warnings.
-import logging
-import warnings
-from logging import NullHandler
-
-from . import exceptions
-from ._version import __version__
-from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
-from .filepost import encode_multipart_formdata
-from .poolmanager import PoolManager, ProxyManager, proxy_from_url
-from .response import HTTPResponse
-from .util.request import make_headers
-from .util.retry import Retry
-from .util.timeout import Timeout
-from .util.url import get_host
-
-# === NOTE TO REPACKAGERS AND VENDORS ===
-# Please delete this block, this logic is only
-# for urllib3 being distributed via PyPI.
-# See: https://github.com/urllib3/urllib3/issues/2680
-try:
-    import urllib3_secure_extra  # type: ignore # noqa: F401
-except ImportError:
-    pass
-else:
-    warnings.warn(
-        "'urllib3[secure]' extra is deprecated and will be removed "
-        "in a future release of urllib3 2.x. Read more in this issue: "
-        "https://github.com/urllib3/urllib3/issues/2680",
-        category=DeprecationWarning,
-        stacklevel=2,
-    )
-
-__author__ = "Andrey Petrov (andrey.petrov@shazow.net)"
-__license__ = "MIT"
-__version__ = __version__
-
-__all__ = (
-    "HTTPConnectionPool",
-    "HTTPSConnectionPool",
-    "PoolManager",
-    "ProxyManager",
-    "HTTPResponse",
-    "Retry",
-    "Timeout",
-    "add_stderr_logger",
-    "connection_from_url",
-    "disable_warnings",
-    "encode_multipart_formdata",
-    "get_host",
-    "make_headers",
-    "proxy_from_url",
-)
-
-logging.getLogger(__name__).addHandler(NullHandler())
-
-
-def add_stderr_logger(level=logging.DEBUG):
-    """
-    Helper for quickly adding a StreamHandler to the logger. Useful for
-    debugging.
-
-    Returns the handler after adding it.
-    """
-    # This method needs to be in this __init__.py to get the __name__ correct
-    # even if urllib3 is vendored within another package.
-    logger = logging.getLogger(__name__)
-    handler = logging.StreamHandler()
-    handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s"))
-    logger.addHandler(handler)
-    logger.setLevel(level)
-    logger.debug("Added a stderr logging handler to logger: %s", __name__)
-    return handler
-
-
-# ... Clean up.
-del NullHandler
-
-
-# All warning filters *must* be appended unless you're really certain that they
-# shouldn't be: otherwise, it's very hard for users to use most Python
-# mechanisms to silence them.
-# SecurityWarning's always go off by default.
-warnings.simplefilter("always", exceptions.SecurityWarning, append=True)
-# SubjectAltNameWarning's should go off once per host
-warnings.simplefilter("default", exceptions.SubjectAltNameWarning, append=True)
-# InsecurePlatformWarning's don't vary between requests, so we keep it default.
-warnings.simplefilter("default", exceptions.InsecurePlatformWarning, append=True)
-# SNIMissingWarnings should go off only once.
-warnings.simplefilter("default", exceptions.SNIMissingWarning, append=True)
-
-
-def disable_warnings(category=exceptions.HTTPWarning):
-    """
-    Helper for quickly disabling all urllib3 warnings.
-    """
-    warnings.simplefilter("ignore", category)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index de8f24ac6..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-314.pyc
deleted file mode 100644
index 87cba416e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-314.pyc
deleted file mode 100644
index fe44f5a42..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-314.pyc
deleted file mode 100644
index 2029805cd..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-314.pyc
deleted file mode 100644
index 1f652067f..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-314.pyc
deleted file mode 100644
index 7349389c7..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-314.pyc
deleted file mode 100644
index f942b547e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-314.pyc
deleted file mode 100644
index 6aca024a4..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-314.pyc
deleted file mode 100644
index a95fcc675..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/request.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/request.cpython-314.pyc
deleted file mode 100644
index a18347c1e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/request.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-314.pyc
deleted file mode 100644
index db3b649a6..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_collections.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_collections.py
deleted file mode 100644
index bceb8451f..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_collections.py
+++ /dev/null
@@ -1,355 +0,0 @@
-from __future__ import absolute_import
-
-try:
-    from collections.abc import Mapping, MutableMapping
-except ImportError:
-    from collections import Mapping, MutableMapping
-try:
-    from threading import RLock
-except ImportError:  # Platform-specific: No threads available
-
-    class RLock:
-        def __enter__(self):
-            pass
-
-        def __exit__(self, exc_type, exc_value, traceback):
-            pass
-
-
-from collections import OrderedDict
-
-from .exceptions import InvalidHeader
-from .packages import six
-from .packages.six import iterkeys, itervalues
-
-__all__ = ["RecentlyUsedContainer", "HTTPHeaderDict"]
-
-
-_Null = object()
-
-
-class RecentlyUsedContainer(MutableMapping):
-    """
-    Provides a thread-safe dict-like container which maintains up to
-    ``maxsize`` keys while throwing away the least-recently-used keys beyond
-    ``maxsize``.
-
-    :param maxsize:
-        Maximum number of recent elements to retain.
-
-    :param dispose_func:
-        Every time an item is evicted from the container,
-        ``dispose_func(value)`` is called.  Callback which will get called
-    """
-
-    ContainerCls = OrderedDict
-
-    def __init__(self, maxsize=10, dispose_func=None):
-        self._maxsize = maxsize
-        self.dispose_func = dispose_func
-
-        self._container = self.ContainerCls()
-        self.lock = RLock()
-
-    def __getitem__(self, key):
-        # Re-insert the item, moving it to the end of the eviction line.
-        with self.lock:
-            item = self._container.pop(key)
-            self._container[key] = item
-            return item
-
-    def __setitem__(self, key, value):
-        evicted_value = _Null
-        with self.lock:
-            # Possibly evict the existing value of 'key'
-            evicted_value = self._container.get(key, _Null)
-            self._container[key] = value
-
-            # If we didn't evict an existing value, we might have to evict the
-            # least recently used item from the beginning of the container.
-            if len(self._container) > self._maxsize:
-                _key, evicted_value = self._container.popitem(last=False)
-
-        if self.dispose_func and evicted_value is not _Null:
-            self.dispose_func(evicted_value)
-
-    def __delitem__(self, key):
-        with self.lock:
-            value = self._container.pop(key)
-
-        if self.dispose_func:
-            self.dispose_func(value)
-
-    def __len__(self):
-        with self.lock:
-            return len(self._container)
-
-    def __iter__(self):
-        raise NotImplementedError(
-            "Iteration over this class is unlikely to be threadsafe."
-        )
-
-    def clear(self):
-        with self.lock:
-            # Copy pointers to all values, then wipe the mapping
-            values = list(itervalues(self._container))
-            self._container.clear()
-
-        if self.dispose_func:
-            for value in values:
-                self.dispose_func(value)
-
-    def keys(self):
-        with self.lock:
-            return list(iterkeys(self._container))
-
-
-class HTTPHeaderDict(MutableMapping):
-    """
-    :param headers:
-        An iterable of field-value pairs. Must not contain multiple field names
-        when compared case-insensitively.
-
-    :param kwargs:
-        Additional field-value pairs to pass in to ``dict.update``.
-
-    A ``dict`` like container for storing HTTP Headers.
-
-    Field names are stored and compared case-insensitively in compliance with
-    RFC 7230. Iteration provides the first case-sensitive key seen for each
-    case-insensitive pair.
-
-    Using ``__setitem__`` syntax overwrites fields that compare equal
-    case-insensitively in order to maintain ``dict``'s api. For fields that
-    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
-    in a loop.
-
-    If multiple fields that are equal case-insensitively are passed to the
-    constructor or ``.update``, the behavior is undefined and some will be
-    lost.
-
-    >>> headers = HTTPHeaderDict()
-    >>> headers.add('Set-Cookie', 'foo=bar')
-    >>> headers.add('set-cookie', 'baz=quxx')
-    >>> headers['content-length'] = '7'
-    >>> headers['SET-cookie']
-    'foo=bar, baz=quxx'
-    >>> headers['Content-Length']
-    '7'
-    """
-
-    def __init__(self, headers=None, **kwargs):
-        super(HTTPHeaderDict, self).__init__()
-        self._container = OrderedDict()
-        if headers is not None:
-            if isinstance(headers, HTTPHeaderDict):
-                self._copy_from(headers)
-            else:
-                self.extend(headers)
-        if kwargs:
-            self.extend(kwargs)
-
-    def __setitem__(self, key, val):
-        self._container[key.lower()] = [key, val]
-        return self._container[key.lower()]
-
-    def __getitem__(self, key):
-        val = self._container[key.lower()]
-        return ", ".join(val[1:])
-
-    def __delitem__(self, key):
-        del self._container[key.lower()]
-
-    def __contains__(self, key):
-        return key.lower() in self._container
-
-    def __eq__(self, other):
-        if not isinstance(other, Mapping) and not hasattr(other, "keys"):
-            return False
-        if not isinstance(other, type(self)):
-            other = type(self)(other)
-        return dict((k.lower(), v) for k, v in self.itermerged()) == dict(
-            (k.lower(), v) for k, v in other.itermerged()
-        )
-
-    def __ne__(self, other):
-        return not self.__eq__(other)
-
-    if six.PY2:  # Python 2
-        iterkeys = MutableMapping.iterkeys
-        itervalues = MutableMapping.itervalues
-
-    __marker = object()
-
-    def __len__(self):
-        return len(self._container)
-
-    def __iter__(self):
-        # Only provide the originally cased names
-        for vals in self._container.values():
-            yield vals[0]
-
-    def pop(self, key, default=__marker):
-        """D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
-        If key is not found, d is returned if given, otherwise KeyError is raised.
-        """
-        # Using the MutableMapping function directly fails due to the private marker.
-        # Using ordinary dict.pop would expose the internal structures.
-        # So let's reinvent the wheel.
-        try:
-            value = self[key]
-        except KeyError:
-            if default is self.__marker:
-                raise
-            return default
-        else:
-            del self[key]
-            return value
-
-    def discard(self, key):
-        try:
-            del self[key]
-        except KeyError:
-            pass
-
-    def add(self, key, val):
-        """Adds a (name, value) pair, doesn't overwrite the value if it already
-        exists.
-
-        >>> headers = HTTPHeaderDict(foo='bar')
-        >>> headers.add('Foo', 'baz')
-        >>> headers['foo']
-        'bar, baz'
-        """
-        key_lower = key.lower()
-        new_vals = [key, val]
-        # Keep the common case aka no item present as fast as possible
-        vals = self._container.setdefault(key_lower, new_vals)
-        if new_vals is not vals:
-            vals.append(val)
-
-    def extend(self, *args, **kwargs):
-        """Generic import function for any type of header-like object.
-        Adapted version of MutableMapping.update in order to insert items
-        with self.add instead of self.__setitem__
-        """
-        if len(args) > 1:
-            raise TypeError(
-                "extend() takes at most 1 positional "
-                "arguments ({0} given)".format(len(args))
-            )
-        other = args[0] if len(args) >= 1 else ()
-
-        if isinstance(other, HTTPHeaderDict):
-            for key, val in other.iteritems():
-                self.add(key, val)
-        elif isinstance(other, Mapping):
-            for key in other:
-                self.add(key, other[key])
-        elif hasattr(other, "keys"):
-            for key in other.keys():
-                self.add(key, other[key])
-        else:
-            for key, value in other:
-                self.add(key, value)
-
-        for key, value in kwargs.items():
-            self.add(key, value)
-
-    def getlist(self, key, default=__marker):
-        """Returns a list of all the values for the named field. Returns an
-        empty list if the key doesn't exist."""
-        try:
-            vals = self._container[key.lower()]
-        except KeyError:
-            if default is self.__marker:
-                return []
-            return default
-        else:
-            return vals[1:]
-
-    def _prepare_for_method_change(self):
-        """
-        Remove content-specific header fields before changing the request
-        method to GET or HEAD according to RFC 9110, Section 15.4.
-        """
-        content_specific_headers = [
-            "Content-Encoding",
-            "Content-Language",
-            "Content-Location",
-            "Content-Type",
-            "Content-Length",
-            "Digest",
-            "Last-Modified",
-        ]
-        for header in content_specific_headers:
-            self.discard(header)
-        return self
-
-    # Backwards compatibility for httplib
-    getheaders = getlist
-    getallmatchingheaders = getlist
-    iget = getlist
-
-    # Backwards compatibility for http.cookiejar
-    get_all = getlist
-
-    def __repr__(self):
-        return "%s(%s)" % (type(self).__name__, dict(self.itermerged()))
-
-    def _copy_from(self, other):
-        for key in other:
-            val = other.getlist(key)
-            if isinstance(val, list):
-                # Don't need to convert tuples
-                val = list(val)
-            self._container[key.lower()] = [key] + val
-
-    def copy(self):
-        clone = type(self)()
-        clone._copy_from(self)
-        return clone
-
-    def iteritems(self):
-        """Iterate over all header lines, including duplicate ones."""
-        for key in self:
-            vals = self._container[key.lower()]
-            for val in vals[1:]:
-                yield vals[0], val
-
-    def itermerged(self):
-        """Iterate over all headers, merging duplicate ones together."""
-        for key in self:
-            val = self._container[key.lower()]
-            yield val[0], ", ".join(val[1:])
-
-    def items(self):
-        return list(self.iteritems())
-
-    @classmethod
-    def from_httplib(cls, message):  # Python 2
-        """Read headers from a Python 2 httplib message object."""
-        # python2.7 does not expose a proper API for exporting multiheaders
-        # efficiently. This function re-reads raw lines from the message
-        # object and extracts the multiheaders properly.
-        obs_fold_continued_leaders = (" ", "\t")
-        headers = []
-
-        for line in message.headers:
-            if line.startswith(obs_fold_continued_leaders):
-                if not headers:
-                    # We received a header line that starts with OWS as described
-                    # in RFC-7230 S3.2.4. This indicates a multiline header, but
-                    # there exists no previous header to which we can attach it.
-                    raise InvalidHeader(
-                        "Header continuation with no previous header: %s" % line
-                    )
-                else:
-                    key, value = headers[-1]
-                    headers[-1] = (key, value + " " + line.strip())
-                    continue
-
-            key, value = line.split(":", 1)
-            headers.append((key, value.strip()))
-
-        return cls(headers)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_version.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_version.py
deleted file mode 100644
index d49df2a0c..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_version.py
+++ /dev/null
@@ -1,2 +0,0 @@
-# This file is protected via CODEOWNERS
-__version__ = "1.26.20"
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connection.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connection.py
deleted file mode 100644
index de35b63d6..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connection.py
+++ /dev/null
@@ -1,572 +0,0 @@
-from __future__ import absolute_import
-
-import datetime
-import logging
-import os
-import re
-import socket
-import warnings
-from socket import error as SocketError
-from socket import timeout as SocketTimeout
-
-from .packages import six
-from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
-from .packages.six.moves.http_client import HTTPException  # noqa: F401
-from .util.proxy import create_proxy_ssl_context
-
-try:  # Compiled with SSL?
-    import ssl
-
-    BaseSSLError = ssl.SSLError
-except (ImportError, AttributeError):  # Platform-specific: No SSL.
-    ssl = None
-
-    class BaseSSLError(BaseException):
-        pass
-
-
-try:
-    # Python 3: not a no-op, we're adding this to the namespace so it can be imported.
-    ConnectionError = ConnectionError
-except NameError:
-    # Python 2
-    class ConnectionError(Exception):
-        pass
-
-
-try:  # Python 3:
-    # Not a no-op, we're adding this to the namespace so it can be imported.
-    BrokenPipeError = BrokenPipeError
-except NameError:  # Python 2:
-
-    class BrokenPipeError(Exception):
-        pass
-
-
-from ._collections import HTTPHeaderDict  # noqa (historical, removed in v2)
-from ._version import __version__
-from .exceptions import (
-    ConnectTimeoutError,
-    NewConnectionError,
-    SubjectAltNameWarning,
-    SystemTimeWarning,
-)
-from .util import SKIP_HEADER, SKIPPABLE_HEADERS, connection
-from .util.ssl_ import (
-    assert_fingerprint,
-    create_urllib3_context,
-    is_ipaddress,
-    resolve_cert_reqs,
-    resolve_ssl_version,
-    ssl_wrap_socket,
-)
-from .util.ssl_match_hostname import CertificateError, match_hostname
-
-log = logging.getLogger(__name__)
-
-port_by_scheme = {"http": 80, "https": 443}
-
-# When it comes time to update this value as a part of regular maintenance
-# (ie test_recent_date is failing) update it to ~6 months before the current date.
-RECENT_DATE = datetime.date(2024, 1, 1)
-
-_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
-
-
-class HTTPConnection(_HTTPConnection, object):
-    """
-    Based on :class:`http.client.HTTPConnection` but provides an extra constructor
-    backwards-compatibility layer between older and newer Pythons.
-
-    Additional keyword parameters are used to configure attributes of the connection.
-    Accepted parameters include:
-
-    - ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool`
-    - ``source_address``: Set the source address for the current connection.
-    - ``socket_options``: Set specific options on the underlying socket. If not specified, then
-      defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling
-      Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy.
-
-      For example, if you wish to enable TCP Keep Alive in addition to the defaults,
-      you might pass:
-
-      .. code-block:: python
-
-         HTTPConnection.default_socket_options + [
-             (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
-         ]
-
-      Or you may want to disable the defaults by passing an empty list (e.g., ``[]``).
-    """
-
-    default_port = port_by_scheme["http"]
-
-    #: Disable Nagle's algorithm by default.
-    #: ``[(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)]``
-    default_socket_options = [(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)]
-
-    #: Whether this connection verifies the host's certificate.
-    is_verified = False
-
-    #: Whether this proxy connection (if used) verifies the proxy host's
-    #: certificate.
-    proxy_is_verified = None
-
-    def __init__(self, *args, **kw):
-        if not six.PY2:
-            kw.pop("strict", None)
-
-        # Pre-set source_address.
-        self.source_address = kw.get("source_address")
-
-        #: The socket options provided by the user. If no options are
-        #: provided, we use the default options.
-        self.socket_options = kw.pop("socket_options", self.default_socket_options)
-
-        # Proxy options provided by the user.
-        self.proxy = kw.pop("proxy", None)
-        self.proxy_config = kw.pop("proxy_config", None)
-
-        _HTTPConnection.__init__(self, *args, **kw)
-
-    @property
-    def host(self):
-        """
-        Getter method to remove any trailing dots that indicate the hostname is an FQDN.
-
-        In general, SSL certificates don't include the trailing dot indicating a
-        fully-qualified domain name, and thus, they don't validate properly when
-        checked against a domain name that includes the dot. In addition, some
-        servers may not expect to receive the trailing dot when provided.
-
-        However, the hostname with trailing dot is critical to DNS resolution; doing a
-        lookup with the trailing dot will properly only resolve the appropriate FQDN,
-        whereas a lookup without a trailing dot will search the system's search domain
-        list. Thus, it's important to keep the original host around for use only in
-        those cases where it's appropriate (i.e., when doing DNS lookup to establish the
-        actual TCP connection across which we're going to send HTTP requests).
-        """
-        return self._dns_host.rstrip(".")
-
-    @host.setter
-    def host(self, value):
-        """
-        Setter for the `host` property.
-
-        We assume that only urllib3 uses the _dns_host attribute; httplib itself
-        only uses `host`, and it seems reasonable that other libraries follow suit.
-        """
-        self._dns_host = value
-
-    def _new_conn(self):
-        """Establish a socket connection and set nodelay settings on it.
-
-        :return: New socket connection.
-        """
-        extra_kw = {}
-        if self.source_address:
-            extra_kw["source_address"] = self.source_address
-
-        if self.socket_options:
-            extra_kw["socket_options"] = self.socket_options
-
-        try:
-            conn = connection.create_connection(
-                (self._dns_host, self.port), self.timeout, **extra_kw
-            )
-
-        except SocketTimeout:
-            raise ConnectTimeoutError(
-                self,
-                "Connection to %s timed out. (connect timeout=%s)"
-                % (self.host, self.timeout),
-            )
-
-        except SocketError as e:
-            raise NewConnectionError(
-                self, "Failed to establish a new connection: %s" % e
-            )
-
-        return conn
-
-    def _is_using_tunnel(self):
-        # Google App Engine's httplib does not define _tunnel_host
-        return getattr(self, "_tunnel_host", None)
-
-    def _prepare_conn(self, conn):
-        self.sock = conn
-        if self._is_using_tunnel():
-            # TODO: Fix tunnel so it doesn't depend on self.sock state.
-            self._tunnel()
-            # Mark this connection as not reusable
-            self.auto_open = 0
-
-    def connect(self):
-        conn = self._new_conn()
-        self._prepare_conn(conn)
-
-    def putrequest(self, method, url, *args, **kwargs):
-        """ """
-        # Empty docstring because the indentation of CPython's implementation
-        # is broken but we don't want this method in our documentation.
-        match = _CONTAINS_CONTROL_CHAR_RE.search(method)
-        if match:
-            raise ValueError(
-                "Method cannot contain non-token characters %r (found at least %r)"
-                % (method, match.group())
-            )
-
-        return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
-
-    def putheader(self, header, *values):
-        """ """
-        if not any(isinstance(v, str) and v == SKIP_HEADER for v in values):
-            _HTTPConnection.putheader(self, header, *values)
-        elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS:
-            raise ValueError(
-                "urllib3.util.SKIP_HEADER only supports '%s'"
-                % ("', '".join(map(str.title, sorted(SKIPPABLE_HEADERS))),)
-            )
-
-    def request(self, method, url, body=None, headers=None):
-        # Update the inner socket's timeout value to send the request.
-        # This only triggers if the connection is re-used.
-        if getattr(self, "sock", None) is not None:
-            self.sock.settimeout(self.timeout)
-
-        if headers is None:
-            headers = {}
-        else:
-            # Avoid modifying the headers passed into .request()
-            headers = headers.copy()
-        if "user-agent" not in (six.ensure_str(k.lower()) for k in headers):
-            headers["User-Agent"] = _get_default_user_agent()
-        super(HTTPConnection, self).request(method, url, body=body, headers=headers)
-
-    def request_chunked(self, method, url, body=None, headers=None):
-        """
-        Alternative to the common request method, which sends the
-        body with chunked encoding and not as one block
-        """
-        headers = headers or {}
-        header_keys = set([six.ensure_str(k.lower()) for k in headers])
-        skip_accept_encoding = "accept-encoding" in header_keys
-        skip_host = "host" in header_keys
-        self.putrequest(
-            method, url, skip_accept_encoding=skip_accept_encoding, skip_host=skip_host
-        )
-        if "user-agent" not in header_keys:
-            self.putheader("User-Agent", _get_default_user_agent())
-        for header, value in headers.items():
-            self.putheader(header, value)
-        if "transfer-encoding" not in header_keys:
-            self.putheader("Transfer-Encoding", "chunked")
-        self.endheaders()
-
-        if body is not None:
-            stringish_types = six.string_types + (bytes,)
-            if isinstance(body, stringish_types):
-                body = (body,)
-            for chunk in body:
-                if not chunk:
-                    continue
-                if not isinstance(chunk, bytes):
-                    chunk = chunk.encode("utf8")
-                len_str = hex(len(chunk))[2:]
-                to_send = bytearray(len_str.encode())
-                to_send += b"\r\n"
-                to_send += chunk
-                to_send += b"\r\n"
-                self.send(to_send)
-
-        # After the if clause, to always have a closed body
-        self.send(b"0\r\n\r\n")
-
-
-class HTTPSConnection(HTTPConnection):
-    """
-    Many of the parameters to this constructor are passed to the underlying SSL
-    socket by means of :py:func:`urllib3.util.ssl_wrap_socket`.
-    """
-
-    default_port = port_by_scheme["https"]
-
-    cert_reqs = None
-    ca_certs = None
-    ca_cert_dir = None
-    ca_cert_data = None
-    ssl_version = None
-    assert_fingerprint = None
-    tls_in_tls_required = False
-
-    def __init__(
-        self,
-        host,
-        port=None,
-        key_file=None,
-        cert_file=None,
-        key_password=None,
-        strict=None,
-        timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
-        ssl_context=None,
-        server_hostname=None,
-        **kw
-    ):
-
-        HTTPConnection.__init__(self, host, port, strict=strict, timeout=timeout, **kw)
-
-        self.key_file = key_file
-        self.cert_file = cert_file
-        self.key_password = key_password
-        self.ssl_context = ssl_context
-        self.server_hostname = server_hostname
-
-        # Required property for Google AppEngine 1.9.0 which otherwise causes
-        # HTTPS requests to go out as HTTP. (See Issue #356)
-        self._protocol = "https"
-
-    def set_cert(
-        self,
-        key_file=None,
-        cert_file=None,
-        cert_reqs=None,
-        key_password=None,
-        ca_certs=None,
-        assert_hostname=None,
-        assert_fingerprint=None,
-        ca_cert_dir=None,
-        ca_cert_data=None,
-    ):
-        """
-        This method should only be called once, before the connection is used.
-        """
-        # If cert_reqs is not provided we'll assume CERT_REQUIRED unless we also
-        # have an SSLContext object in which case we'll use its verify_mode.
-        if cert_reqs is None:
-            if self.ssl_context is not None:
-                cert_reqs = self.ssl_context.verify_mode
-            else:
-                cert_reqs = resolve_cert_reqs(None)
-
-        self.key_file = key_file
-        self.cert_file = cert_file
-        self.cert_reqs = cert_reqs
-        self.key_password = key_password
-        self.assert_hostname = assert_hostname
-        self.assert_fingerprint = assert_fingerprint
-        self.ca_certs = ca_certs and os.path.expanduser(ca_certs)
-        self.ca_cert_dir = ca_cert_dir and os.path.expanduser(ca_cert_dir)
-        self.ca_cert_data = ca_cert_data
-
-    def connect(self):
-        # Add certificate verification
-        self.sock = conn = self._new_conn()
-        hostname = self.host
-        tls_in_tls = False
-
-        if self._is_using_tunnel():
-            if self.tls_in_tls_required:
-                self.sock = conn = self._connect_tls_proxy(hostname, conn)
-                tls_in_tls = True
-
-            # Calls self._set_hostport(), so self.host is
-            # self._tunnel_host below.
-            self._tunnel()
-            # Mark this connection as not reusable
-            self.auto_open = 0
-
-            # Override the host with the one we're requesting data from.
-            hostname = self._tunnel_host
-
-        server_hostname = hostname
-        if self.server_hostname is not None:
-            server_hostname = self.server_hostname
-
-        is_time_off = datetime.date.today() < RECENT_DATE
-        if is_time_off:
-            warnings.warn(
-                (
-                    "System time is way off (before {0}). This will probably "
-                    "lead to SSL verification errors"
-                ).format(RECENT_DATE),
-                SystemTimeWarning,
-            )
-
-        # Wrap socket using verification with the root certs in
-        # trusted_root_certs
-        default_ssl_context = False
-        if self.ssl_context is None:
-            default_ssl_context = True
-            self.ssl_context = create_urllib3_context(
-                ssl_version=resolve_ssl_version(self.ssl_version),
-                cert_reqs=resolve_cert_reqs(self.cert_reqs),
-            )
-
-        context = self.ssl_context
-        context.verify_mode = resolve_cert_reqs(self.cert_reqs)
-
-        # Try to load OS default certs if none are given.
-        # Works well on Windows (requires Python3.4+)
-        if (
-            not self.ca_certs
-            and not self.ca_cert_dir
-            and not self.ca_cert_data
-            and default_ssl_context
-            and hasattr(context, "load_default_certs")
-        ):
-            context.load_default_certs()
-
-        self.sock = ssl_wrap_socket(
-            sock=conn,
-            keyfile=self.key_file,
-            certfile=self.cert_file,
-            key_password=self.key_password,
-            ca_certs=self.ca_certs,
-            ca_cert_dir=self.ca_cert_dir,
-            ca_cert_data=self.ca_cert_data,
-            server_hostname=server_hostname,
-            ssl_context=context,
-            tls_in_tls=tls_in_tls,
-        )
-
-        # If we're using all defaults and the connection
-        # is TLSv1 or TLSv1.1 we throw a DeprecationWarning
-        # for the host.
-        if (
-            default_ssl_context
-            and self.ssl_version is None
-            and hasattr(self.sock, "version")
-            and self.sock.version() in {"TLSv1", "TLSv1.1"}
-        ):  # Defensive:
-            warnings.warn(
-                "Negotiating TLSv1/TLSv1.1 by default is deprecated "
-                "and will be disabled in urllib3 v2.0.0. Connecting to "
-                "'%s' with '%s' can be enabled by explicitly opting-in "
-                "with 'ssl_version'" % (self.host, self.sock.version()),
-                DeprecationWarning,
-            )
-
-        if self.assert_fingerprint:
-            assert_fingerprint(
-                self.sock.getpeercert(binary_form=True), self.assert_fingerprint
-            )
-        elif (
-            context.verify_mode != ssl.CERT_NONE
-            and not getattr(context, "check_hostname", False)
-            and self.assert_hostname is not False
-        ):
-            # While urllib3 attempts to always turn off hostname matching from
-            # the TLS library, this cannot always be done. So we check whether
-            # the TLS Library still thinks it's matching hostnames.
-            cert = self.sock.getpeercert()
-            if not cert.get("subjectAltName", ()):
-                warnings.warn(
-                    (
-                        "Certificate for {0} has no `subjectAltName`, falling back to check for a "
-                        "`commonName` for now. This feature is being removed by major browsers and "
-                        "deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 "
-                        "for details.)".format(hostname)
-                    ),
-                    SubjectAltNameWarning,
-                )
-            _match_hostname(cert, self.assert_hostname or server_hostname)
-
-        self.is_verified = (
-            context.verify_mode == ssl.CERT_REQUIRED
-            or self.assert_fingerprint is not None
-        )
-
-    def _connect_tls_proxy(self, hostname, conn):
-        """
-        Establish a TLS connection to the proxy using the provided SSL context.
-        """
-        proxy_config = self.proxy_config
-        ssl_context = proxy_config.ssl_context
-        if ssl_context:
-            # If the user provided a proxy context, we assume CA and client
-            # certificates have already been set
-            return ssl_wrap_socket(
-                sock=conn,
-                server_hostname=hostname,
-                ssl_context=ssl_context,
-            )
-
-        ssl_context = create_proxy_ssl_context(
-            self.ssl_version,
-            self.cert_reqs,
-            self.ca_certs,
-            self.ca_cert_dir,
-            self.ca_cert_data,
-        )
-
-        # If no cert was provided, use only the default options for server
-        # certificate validation
-        socket = ssl_wrap_socket(
-            sock=conn,
-            ca_certs=self.ca_certs,
-            ca_cert_dir=self.ca_cert_dir,
-            ca_cert_data=self.ca_cert_data,
-            server_hostname=hostname,
-            ssl_context=ssl_context,
-        )
-
-        if ssl_context.verify_mode != ssl.CERT_NONE and not getattr(
-            ssl_context, "check_hostname", False
-        ):
-            # While urllib3 attempts to always turn off hostname matching from
-            # the TLS library, this cannot always be done. So we check whether
-            # the TLS Library still thinks it's matching hostnames.
-            cert = socket.getpeercert()
-            if not cert.get("subjectAltName", ()):
-                warnings.warn(
-                    (
-                        "Certificate for {0} has no `subjectAltName`, falling back to check for a "
-                        "`commonName` for now. This feature is being removed by major browsers and "
-                        "deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 "
-                        "for details.)".format(hostname)
-                    ),
-                    SubjectAltNameWarning,
-                )
-            _match_hostname(cert, hostname)
-
-        self.proxy_is_verified = ssl_context.verify_mode == ssl.CERT_REQUIRED
-        return socket
-
-
-def _match_hostname(cert, asserted_hostname):
-    # Our upstream implementation of ssl.match_hostname()
-    # only applies this normalization to IP addresses so it doesn't
-    # match DNS SANs so we do the same thing!
-    stripped_hostname = asserted_hostname.strip("u[]")
-    if is_ipaddress(stripped_hostname):
-        asserted_hostname = stripped_hostname
-
-    try:
-        match_hostname(cert, asserted_hostname)
-    except CertificateError as e:
-        log.warning(
-            "Certificate did not match expected hostname: %s. Certificate: %s",
-            asserted_hostname,
-            cert,
-        )
-        # Add cert to exception and reraise so client code can inspect
-        # the cert when catching the exception, if they want to
-        e._peer_cert = cert
-        raise
-
-
-def _get_default_user_agent():
-    return "python-urllib3/%s" % __version__
-
-
-class DummyConnection(object):
-    """Used to detect a failed ConnectionCls import."""
-
-    pass
-
-
-if not ssl:
-    HTTPSConnection = DummyConnection  # noqa: F811
-
-
-VerifiedHTTPSConnection = HTTPSConnection
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py
deleted file mode 100644
index 0872ed770..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py
+++ /dev/null
@@ -1,1140 +0,0 @@
-from __future__ import absolute_import
-
-import errno
-import logging
-import re
-import socket
-import sys
-import warnings
-from socket import error as SocketError
-from socket import timeout as SocketTimeout
-
-from ._collections import HTTPHeaderDict
-from .connection import (
-    BaseSSLError,
-    BrokenPipeError,
-    DummyConnection,
-    HTTPConnection,
-    HTTPException,
-    HTTPSConnection,
-    VerifiedHTTPSConnection,
-    port_by_scheme,
-)
-from .exceptions import (
-    ClosedPoolError,
-    EmptyPoolError,
-    HeaderParsingError,
-    HostChangedError,
-    InsecureRequestWarning,
-    LocationValueError,
-    MaxRetryError,
-    NewConnectionError,
-    ProtocolError,
-    ProxyError,
-    ReadTimeoutError,
-    SSLError,
-    TimeoutError,
-)
-from .packages import six
-from .packages.six.moves import queue
-from .request import RequestMethods
-from .response import HTTPResponse
-from .util.connection import is_connection_dropped
-from .util.proxy import connection_requires_http_tunnel
-from .util.queue import LifoQueue
-from .util.request import set_file_position
-from .util.response import assert_header_parsing
-from .util.retry import Retry
-from .util.ssl_match_hostname import CertificateError
-from .util.timeout import Timeout
-from .util.url import Url, _encode_target
-from .util.url import _normalize_host as normalize_host
-from .util.url import get_host, parse_url
-
-try:  # Platform-specific: Python 3
-    import weakref
-
-    weakref_finalize = weakref.finalize
-except AttributeError:  # Platform-specific: Python 2
-    from .packages.backports.weakref_finalize import weakref_finalize
-
-xrange = six.moves.xrange
-
-log = logging.getLogger(__name__)
-
-_Default = object()
-
-
-# Pool objects
-class ConnectionPool(object):
-    """
-    Base class for all connection pools, such as
-    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.
-
-    .. note::
-       ConnectionPool.urlopen() does not normalize or percent-encode target URIs
-       which is useful if your target server doesn't support percent-encoded
-       target URIs.
-    """
-
-    scheme = None
-    QueueCls = LifoQueue
-
-    def __init__(self, host, port=None):
-        if not host:
-            raise LocationValueError("No host specified.")
-
-        self.host = _normalize_host(host, scheme=self.scheme)
-        self._proxy_host = host.lower()
-        self.port = port
-
-    def __str__(self):
-        return "%s(host=%r, port=%r)" % (type(self).__name__, self.host, self.port)
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, exc_type, exc_val, exc_tb):
-        self.close()
-        # Return False to re-raise any potential exceptions
-        return False
-
-    def close(self):
-        """
-        Close all pooled connections and disable the pool.
-        """
-        pass
-
-
-# This is taken from http://hg.python.org/cpython/file/7aaba721ebc0/Lib/socket.py#l252
-_blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}
-
-
-class HTTPConnectionPool(ConnectionPool, RequestMethods):
-    """
-    Thread-safe connection pool for one host.
-
-    :param host:
-        Host used for this HTTP Connection (e.g. "localhost"), passed into
-        :class:`http.client.HTTPConnection`.
-
-    :param port:
-        Port used for this HTTP Connection (None is equivalent to 80), passed
-        into :class:`http.client.HTTPConnection`.
-
-    :param strict:
-        Causes BadStatusLine to be raised if the status line can't be parsed
-        as a valid HTTP/1.0 or 1.1 status line, passed into
-        :class:`http.client.HTTPConnection`.
-
-        .. note::
-           Only works in Python 2. This parameter is ignored in Python 3.
-
-    :param timeout:
-        Socket timeout in seconds for each individual connection. This can
-        be a float or integer, which sets the timeout for the HTTP request,
-        or an instance of :class:`urllib3.util.Timeout` which gives you more
-        fine-grained control over request timeouts. After the constructor has
-        been parsed, this is always a `urllib3.util.Timeout` object.
-
-    :param maxsize:
-        Number of connections to save that can be reused. More than 1 is useful
-        in multithreaded situations. If ``block`` is set to False, more
-        connections will be created but they will not be saved once they've
-        been used.
-
-    :param block:
-        If set to True, no more than ``maxsize`` connections will be used at
-        a time. When no free connections are available, the call will block
-        until a connection has been released. This is a useful side effect for
-        particular multithreaded situations where one does not want to use more
-        than maxsize connections per host to prevent flooding.
-
-    :param headers:
-        Headers to include with all requests, unless other headers are given
-        explicitly.
-
-    :param retries:
-        Retry configuration to use by default with requests in this pool.
-
-    :param _proxy:
-        Parsed proxy URL, should not be used directly, instead, see
-        :class:`urllib3.ProxyManager`
-
-    :param _proxy_headers:
-        A dictionary with proxy headers, should not be used directly,
-        instead, see :class:`urllib3.ProxyManager`
-
-    :param \\**conn_kw:
-        Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
-        :class:`urllib3.connection.HTTPSConnection` instances.
-    """
-
-    scheme = "http"
-    ConnectionCls = HTTPConnection
-    ResponseCls = HTTPResponse
-
-    def __init__(
-        self,
-        host,
-        port=None,
-        strict=False,
-        timeout=Timeout.DEFAULT_TIMEOUT,
-        maxsize=1,
-        block=False,
-        headers=None,
-        retries=None,
-        _proxy=None,
-        _proxy_headers=None,
-        _proxy_config=None,
-        **conn_kw
-    ):
-        ConnectionPool.__init__(self, host, port)
-        RequestMethods.__init__(self, headers)
-
-        self.strict = strict
-
-        if not isinstance(timeout, Timeout):
-            timeout = Timeout.from_float(timeout)
-
-        if retries is None:
-            retries = Retry.DEFAULT
-
-        self.timeout = timeout
-        self.retries = retries
-
-        self.pool = self.QueueCls(maxsize)
-        self.block = block
-
-        self.proxy = _proxy
-        self.proxy_headers = _proxy_headers or {}
-        self.proxy_config = _proxy_config
-
-        # Fill the queue up so that doing get() on it will block properly
-        for _ in xrange(maxsize):
-            self.pool.put(None)
-
-        # These are mostly for testing and debugging purposes.
-        self.num_connections = 0
-        self.num_requests = 0
-        self.conn_kw = conn_kw
-
-        if self.proxy:
-            # Enable Nagle's algorithm for proxies, to avoid packet fragmentation.
-            # We cannot know if the user has added default socket options, so we cannot replace the
-            # list.
-            self.conn_kw.setdefault("socket_options", [])
-
-            self.conn_kw["proxy"] = self.proxy
-            self.conn_kw["proxy_config"] = self.proxy_config
-
-        # Do not pass 'self' as callback to 'finalize'.
-        # Then the 'finalize' would keep an endless living (leak) to self.
-        # By just passing a reference to the pool allows the garbage collector
-        # to free self if nobody else has a reference to it.
-        pool = self.pool
-
-        # Close all the HTTPConnections in the pool before the
-        # HTTPConnectionPool object is garbage collected.
-        weakref_finalize(self, _close_pool_connections, pool)
-
-    def _new_conn(self):
-        """
-        Return a fresh :class:`HTTPConnection`.
-        """
-        self.num_connections += 1
-        log.debug(
-            "Starting new HTTP connection (%d): %s:%s",
-            self.num_connections,
-            self.host,
-            self.port or "80",
-        )
-
-        conn = self.ConnectionCls(
-            host=self.host,
-            port=self.port,
-            timeout=self.timeout.connect_timeout,
-            strict=self.strict,
-            **self.conn_kw
-        )
-        return conn
-
-    def _get_conn(self, timeout=None):
-        """
-        Get a connection. Will return a pooled connection if one is available.
-
-        If no connections are available and :prop:`.block` is ``False``, then a
-        fresh connection is returned.
-
-        :param timeout:
-            Seconds to wait before giving up and raising
-            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
-            :prop:`.block` is ``True``.
-        """
-        conn = None
-        try:
-            conn = self.pool.get(block=self.block, timeout=timeout)
-
-        except AttributeError:  # self.pool is None
-            raise ClosedPoolError(self, "Pool is closed.")
-
-        except queue.Empty:
-            if self.block:
-                raise EmptyPoolError(
-                    self,
-                    "Pool reached maximum size and no more connections are allowed.",
-                )
-            pass  # Oh well, we'll create a new connection then
-
-        # If this is a persistent connection, check if it got disconnected
-        if conn and is_connection_dropped(conn):
-            log.debug("Resetting dropped connection: %s", self.host)
-            conn.close()
-            if getattr(conn, "auto_open", 1) == 0:
-                # This is a proxied connection that has been mutated by
-                # http.client._tunnel() and cannot be reused (since it would
-                # attempt to bypass the proxy)
-                conn = None
-
-        return conn or self._new_conn()
-
-    def _put_conn(self, conn):
-        """
-        Put a connection back into the pool.
-
-        :param conn:
-            Connection object for the current host and port as returned by
-            :meth:`._new_conn` or :meth:`._get_conn`.
-
-        If the pool is already full, the connection is closed and discarded
-        because we exceeded maxsize. If connections are discarded frequently,
-        then maxsize should be increased.
-
-        If the pool is closed, then the connection will be closed and discarded.
-        """
-        try:
-            self.pool.put(conn, block=False)
-            return  # Everything is dandy, done.
-        except AttributeError:
-            # self.pool is None.
-            pass
-        except queue.Full:
-            # This should never happen if self.block == True
-            log.warning(
-                "Connection pool is full, discarding connection: %s. Connection pool size: %s",
-                self.host,
-                self.pool.qsize(),
-            )
-        # Connection never got put back into the pool, close it.
-        if conn:
-            conn.close()
-
-    def _validate_conn(self, conn):
-        """
-        Called right before a request is made, after the socket is created.
-        """
-        pass
-
-    def _prepare_proxy(self, conn):
-        # Nothing to do for HTTP connections.
-        pass
-
-    def _get_timeout(self, timeout):
-        """Helper that always returns a :class:`urllib3.util.Timeout`"""
-        if timeout is _Default:
-            return self.timeout.clone()
-
-        if isinstance(timeout, Timeout):
-            return timeout.clone()
-        else:
-            # User passed us an int/float. This is for backwards compatibility,
-            # can be removed later
-            return Timeout.from_float(timeout)
-
-    def _raise_timeout(self, err, url, timeout_value):
-        """Is the error actually a timeout? Will raise a ReadTimeout or pass"""
-
-        if isinstance(err, SocketTimeout):
-            raise ReadTimeoutError(
-                self, url, "Read timed out. (read timeout=%s)" % timeout_value
-            )
-
-        # See the above comment about EAGAIN in Python 3. In Python 2 we have
-        # to specifically catch it and throw the timeout error
-        if hasattr(err, "errno") and err.errno in _blocking_errnos:
-            raise ReadTimeoutError(
-                self, url, "Read timed out. (read timeout=%s)" % timeout_value
-            )
-
-        # Catch possible read timeouts thrown as SSL errors. If not the
-        # case, rethrow the original. We need to do this because of:
-        # http://bugs.python.org/issue10272
-        if "timed out" in str(err) or "did not complete (read)" in str(
-            err
-        ):  # Python < 2.7.4
-            raise ReadTimeoutError(
-                self, url, "Read timed out. (read timeout=%s)" % timeout_value
-            )
-
-    def _make_request(
-        self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw
-    ):
-        """
-        Perform a request on a given urllib connection object taken from our
-        pool.
-
-        :param conn:
-            a connection from one of our connection pools
-
-        :param timeout:
-            Socket timeout in seconds for the request. This can be a
-            float or integer, which will set the same timeout value for
-            the socket connect and the socket read, or an instance of
-            :class:`urllib3.util.Timeout`, which gives you more fine-grained
-            control over your timeouts.
-        """
-        self.num_requests += 1
-
-        timeout_obj = self._get_timeout(timeout)
-        timeout_obj.start_connect()
-        conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout)
-
-        # Trigger any extra validation we need to do.
-        try:
-            self._validate_conn(conn)
-        except (SocketTimeout, BaseSSLError) as e:
-            # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout.
-            self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
-            raise
-
-        # conn.request() calls http.client.*.request, not the method in
-        # urllib3.request. It also calls makefile (recv) on the socket.
-        try:
-            if chunked:
-                conn.request_chunked(method, url, **httplib_request_kw)
-            else:
-                conn.request(method, url, **httplib_request_kw)
-
-        # We are swallowing BrokenPipeError (errno.EPIPE) since the server is
-        # legitimately able to close the connection after sending a valid response.
-        # With this behaviour, the received response is still readable.
-        except BrokenPipeError:
-            # Python 3
-            pass
-        except IOError as e:
-            # Python 2 and macOS/Linux
-            # EPIPE and ESHUTDOWN are BrokenPipeError on Python 2, and EPROTOTYPE/ECONNRESET are needed on macOS
-            # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
-            if e.errno not in {
-                errno.EPIPE,
-                errno.ESHUTDOWN,
-                errno.EPROTOTYPE,
-                errno.ECONNRESET,
-            }:
-                raise
-
-        # Reset the timeout for the recv() on the socket
-        read_timeout = timeout_obj.read_timeout
-
-        # App Engine doesn't have a sock attr
-        if getattr(conn, "sock", None):
-            # In Python 3 socket.py will catch EAGAIN and return None when you
-            # try and read into the file pointer created by http.client, which
-            # instead raises a BadStatusLine exception. Instead of catching
-            # the exception and assuming all BadStatusLine exceptions are read
-            # timeouts, check for a zero timeout before making the request.
-            if read_timeout == 0:
-                raise ReadTimeoutError(
-                    self, url, "Read timed out. (read timeout=%s)" % read_timeout
-                )
-            if read_timeout is Timeout.DEFAULT_TIMEOUT:
-                conn.sock.settimeout(socket.getdefaulttimeout())
-            else:  # None or a value
-                conn.sock.settimeout(read_timeout)
-
-        # Receive the response from the server
-        try:
-            try:
-                # Python 2.7, use buffering of HTTP responses
-                httplib_response = conn.getresponse(buffering=True)
-            except TypeError:
-                # Python 3
-                try:
-                    httplib_response = conn.getresponse()
-                except BaseException as e:
-                    # Remove the TypeError from the exception chain in
-                    # Python 3 (including for exceptions like SystemExit).
-                    # Otherwise it looks like a bug in the code.
-                    six.raise_from(e, None)
-        except (SocketTimeout, BaseSSLError, SocketError) as e:
-            self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
-            raise
-
-        # AppEngine doesn't have a version attr.
-        http_version = getattr(conn, "_http_vsn_str", "HTTP/?")
-        log.debug(
-            '%s://%s:%s "%s %s %s" %s %s',
-            self.scheme,
-            self.host,
-            self.port,
-            method,
-            url,
-            http_version,
-            httplib_response.status,
-            httplib_response.length,
-        )
-
-        try:
-            assert_header_parsing(httplib_response.msg)
-        except (HeaderParsingError, TypeError) as hpe:  # Platform-specific: Python 3
-            log.warning(
-                "Failed to parse headers (url=%s): %s",
-                self._absolute_url(url),
-                hpe,
-                exc_info=True,
-            )
-
-        return httplib_response
-
-    def _absolute_url(self, path):
-        return Url(scheme=self.scheme, host=self.host, port=self.port, path=path).url
-
-    def close(self):
-        """
-        Close all pooled connections and disable the pool.
-        """
-        if self.pool is None:
-            return
-        # Disable access to the pool
-        old_pool, self.pool = self.pool, None
-
-        # Close all the HTTPConnections in the pool.
-        _close_pool_connections(old_pool)
-
-    def is_same_host(self, url):
-        """
-        Check if the given ``url`` is a member of the same host as this
-        connection pool.
-        """
-        if url.startswith("/"):
-            return True
-
-        # TODO: Add optional support for socket.gethostbyname checking.
-        scheme, host, port = get_host(url)
-        if host is not None:
-            host = _normalize_host(host, scheme=scheme)
-
-        # Use explicit default port for comparison when none is given
-        if self.port and not port:
-            port = port_by_scheme.get(scheme)
-        elif not self.port and port == port_by_scheme.get(scheme):
-            port = None
-
-        return (scheme, host, port) == (self.scheme, self.host, self.port)
-
-    def urlopen(
-        self,
-        method,
-        url,
-        body=None,
-        headers=None,
-        retries=None,
-        redirect=True,
-        assert_same_host=True,
-        timeout=_Default,
-        pool_timeout=None,
-        release_conn=None,
-        chunked=False,
-        body_pos=None,
-        **response_kw
-    ):
-        """
-        Get a connection from the pool and perform an HTTP request. This is the
-        lowest level call for making a request, so you'll need to specify all
-        the raw details.
-
-        .. note::
-
-           More commonly, it's appropriate to use a convenience method provided
-           by :class:`.RequestMethods`, such as :meth:`request`.
-
-        .. note::
-
-           `release_conn` will only behave as expected if
-           `preload_content=False` because we want to make
-           `preload_content=False` the default behaviour someday soon without
-           breaking backwards compatibility.
-
-        :param method:
-            HTTP request method (such as GET, POST, PUT, etc.)
-
-        :param url:
-            The URL to perform the request on.
-
-        :param body:
-            Data to send in the request body, either :class:`str`, :class:`bytes`,
-            an iterable of :class:`str`/:class:`bytes`, or a file-like object.
-
-        :param headers:
-            Dictionary of custom headers to send, such as User-Agent,
-            If-None-Match, etc. If None, pool headers are used. If provided,
-            these headers completely replace any pool-specific headers.
-
-        :param retries:
-            Configure the number of retries to allow before raising a
-            :class:`~urllib3.exceptions.MaxRetryError` exception.
-
-            Pass ``None`` to retry until you receive a response. Pass a
-            :class:`~urllib3.util.retry.Retry` object for fine-grained control
-            over different types of retries.
-            Pass an integer number to retry connection errors that many times,
-            but no other types of errors. Pass zero to never retry.
-
-            If ``False``, then retries are disabled and any exception is raised
-            immediately. Also, instead of raising a MaxRetryError on redirects,
-            the redirect response will be returned.
-
-        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.
-
-        :param redirect:
-            If True, automatically handle redirects (status codes 301, 302,
-            303, 307, 308). Each redirect counts as a retry. Disabling retries
-            will disable redirect, too.
-
-        :param assert_same_host:
-            If ``True``, will make sure that the host of the pool requests is
-            consistent else will raise HostChangedError. When ``False``, you can
-            use the pool on an HTTP proxy and request foreign hosts.
-
-        :param timeout:
-            If specified, overrides the default timeout for this one
-            request. It may be a float (in seconds) or an instance of
-            :class:`urllib3.util.Timeout`.
-
-        :param pool_timeout:
-            If set and the pool is set to block=True, then this method will
-            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
-            connection is available within the time period.
-
-        :param release_conn:
-            If False, then the urlopen call will not release the connection
-            back into the pool once a response is received (but will release if
-            you read the entire contents of the response such as when
-            `preload_content=True`). This is useful if you're not preloading
-            the response's content immediately. You will need to call
-            ``r.release_conn()`` on the response ``r`` to return the connection
-            back into the pool. If None, it takes the value of
-            ``response_kw.get('preload_content', True)``.
-
-        :param chunked:
-            If True, urllib3 will send the body using chunked transfer
-            encoding. Otherwise, urllib3 will send the body using the standard
-            content-length form. Defaults to False.
-
-        :param int body_pos:
-            Position to seek to in file-like body in the event of a retry or
-            redirect. Typically this won't need to be set because urllib3 will
-            auto-populate the value when needed.
-
-        :param \\**response_kw:
-            Additional parameters are passed to
-            :meth:`urllib3.response.HTTPResponse.from_httplib`
-        """
-
-        parsed_url = parse_url(url)
-        destination_scheme = parsed_url.scheme
-
-        if headers is None:
-            headers = self.headers
-
-        if not isinstance(retries, Retry):
-            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)
-
-        if release_conn is None:
-            release_conn = response_kw.get("preload_content", True)
-
-        # Check host
-        if assert_same_host and not self.is_same_host(url):
-            raise HostChangedError(self, url, retries)
-
-        # Ensure that the URL we're connecting to is properly encoded
-        if url.startswith("/"):
-            url = six.ensure_str(_encode_target(url))
-        else:
-            url = six.ensure_str(parsed_url.url)
-
-        conn = None
-
-        # Track whether `conn` needs to be released before
-        # returning/raising/recursing. Update this variable if necessary, and
-        # leave `release_conn` constant throughout the function. That way, if
-        # the function recurses, the original value of `release_conn` will be
-        # passed down into the recursive call, and its value will be respected.
-        #
-        # See issue #651 [1] for details.
-        #
-        # [1] 
-        release_this_conn = release_conn
-
-        http_tunnel_required = connection_requires_http_tunnel(
-            self.proxy, self.proxy_config, destination_scheme
-        )
-
-        # Merge the proxy headers. Only done when not using HTTP CONNECT. We
-        # have to copy the headers dict so we can safely change it without those
-        # changes being reflected in anyone else's copy.
-        if not http_tunnel_required:
-            headers = headers.copy()
-            headers.update(self.proxy_headers)
-
-        # Must keep the exception bound to a separate variable or else Python 3
-        # complains about UnboundLocalError.
-        err = None
-
-        # Keep track of whether we cleanly exited the except block. This
-        # ensures we do proper cleanup in finally.
-        clean_exit = False
-
-        # Rewind body position, if needed. Record current position
-        # for future rewinds in the event of a redirect/retry.
-        body_pos = set_file_position(body, body_pos)
-
-        try:
-            # Request a connection from the queue.
-            timeout_obj = self._get_timeout(timeout)
-            conn = self._get_conn(timeout=pool_timeout)
-
-            conn.timeout = timeout_obj.connect_timeout
-
-            is_new_proxy_conn = self.proxy is not None and not getattr(
-                conn, "sock", None
-            )
-            if is_new_proxy_conn and http_tunnel_required:
-                self._prepare_proxy(conn)
-
-            # Make the request on the httplib connection object.
-            httplib_response = self._make_request(
-                conn,
-                method,
-                url,
-                timeout=timeout_obj,
-                body=body,
-                headers=headers,
-                chunked=chunked,
-            )
-
-            # If we're going to release the connection in ``finally:``, then
-            # the response doesn't need to know about the connection. Otherwise
-            # it will also try to release it and we'll have a double-release
-            # mess.
-            response_conn = conn if not release_conn else None
-
-            # Pass method to Response for length checking
-            response_kw["request_method"] = method
-
-            # Import httplib's response into our own wrapper object
-            response = self.ResponseCls.from_httplib(
-                httplib_response,
-                pool=self,
-                connection=response_conn,
-                retries=retries,
-                **response_kw
-            )
-
-            # Everything went great!
-            clean_exit = True
-
-        except EmptyPoolError:
-            # Didn't get a connection from the pool, no need to clean up
-            clean_exit = True
-            release_this_conn = False
-            raise
-
-        except (
-            TimeoutError,
-            HTTPException,
-            SocketError,
-            ProtocolError,
-            BaseSSLError,
-            SSLError,
-            CertificateError,
-        ) as e:
-            # Discard the connection for these exceptions. It will be
-            # replaced during the next _get_conn() call.
-            clean_exit = False
-
-            def _is_ssl_error_message_from_http_proxy(ssl_error):
-                # We're trying to detect the message 'WRONG_VERSION_NUMBER' but
-                # SSLErrors are kinda all over the place when it comes to the message,
-                # so we try to cover our bases here!
-                message = " ".join(re.split("[^a-z]", str(ssl_error).lower()))
-                return (
-                    "wrong version number" in message
-                    or "unknown protocol" in message
-                    or "record layer failure" in message
-                )
-
-            # Try to detect a common user error with proxies which is to
-            # set an HTTP proxy to be HTTPS when it should be 'http://'
-            # (ie {'http': 'http://proxy', 'https': 'https://proxy'})
-            # Instead we add a nice error message and point to a URL.
-            if (
-                isinstance(e, BaseSSLError)
-                and self.proxy
-                and _is_ssl_error_message_from_http_proxy(e)
-                and conn.proxy
-                and conn.proxy.scheme == "https"
-            ):
-                e = ProxyError(
-                    "Your proxy appears to only use HTTP and not HTTPS, "
-                    "try changing your proxy URL to be HTTP. See: "
-                    "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
-                    "#https-proxy-error-http-proxy",
-                    SSLError(e),
-                )
-            elif isinstance(e, (BaseSSLError, CertificateError)):
-                e = SSLError(e)
-            elif isinstance(e, (SocketError, NewConnectionError)) and self.proxy:
-                e = ProxyError("Cannot connect to proxy.", e)
-            elif isinstance(e, (SocketError, HTTPException)):
-                e = ProtocolError("Connection aborted.", e)
-
-            retries = retries.increment(
-                method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
-            )
-            retries.sleep()
-
-            # Keep track of the error for the retry warning.
-            err = e
-
-        finally:
-            if not clean_exit:
-                # We hit some kind of exception, handled or otherwise. We need
-                # to throw the connection away unless explicitly told not to.
-                # Close the connection, set the variable to None, and make sure
-                # we put the None back in the pool to avoid leaking it.
-                conn = conn and conn.close()
-                release_this_conn = True
-
-            if release_this_conn:
-                # Put the connection back to be reused. If the connection is
-                # expired then it will be None, which will get replaced with a
-                # fresh connection during _get_conn.
-                self._put_conn(conn)
-
-        if not conn:
-            # Try again
-            log.warning(
-                "Retrying (%r) after connection broken by '%r': %s", retries, err, url
-            )
-            return self.urlopen(
-                method,
-                url,
-                body,
-                headers,
-                retries,
-                redirect,
-                assert_same_host,
-                timeout=timeout,
-                pool_timeout=pool_timeout,
-                release_conn=release_conn,
-                chunked=chunked,
-                body_pos=body_pos,
-                **response_kw
-            )
-
-        # Handle redirect?
-        redirect_location = redirect and response.get_redirect_location()
-        if redirect_location:
-            if response.status == 303:
-                # Change the method according to RFC 9110, Section 15.4.4.
-                method = "GET"
-                # And lose the body not to transfer anything sensitive.
-                body = None
-                headers = HTTPHeaderDict(headers)._prepare_for_method_change()
-
-            try:
-                retries = retries.increment(method, url, response=response, _pool=self)
-            except MaxRetryError:
-                if retries.raise_on_redirect:
-                    response.drain_conn()
-                    raise
-                return response
-
-            response.drain_conn()
-            retries.sleep_for_retry(response)
-            log.debug("Redirecting %s -> %s", url, redirect_location)
-            return self.urlopen(
-                method,
-                redirect_location,
-                body,
-                headers,
-                retries=retries,
-                redirect=redirect,
-                assert_same_host=assert_same_host,
-                timeout=timeout,
-                pool_timeout=pool_timeout,
-                release_conn=release_conn,
-                chunked=chunked,
-                body_pos=body_pos,
-                **response_kw
-            )
-
-        # Check if we should retry the HTTP response.
-        has_retry_after = bool(response.headers.get("Retry-After"))
-        if retries.is_retry(method, response.status, has_retry_after):
-            try:
-                retries = retries.increment(method, url, response=response, _pool=self)
-            except MaxRetryError:
-                if retries.raise_on_status:
-                    response.drain_conn()
-                    raise
-                return response
-
-            response.drain_conn()
-            retries.sleep(response)
-            log.debug("Retry: %s", url)
-            return self.urlopen(
-                method,
-                url,
-                body,
-                headers,
-                retries=retries,
-                redirect=redirect,
-                assert_same_host=assert_same_host,
-                timeout=timeout,
-                pool_timeout=pool_timeout,
-                release_conn=release_conn,
-                chunked=chunked,
-                body_pos=body_pos,
-                **response_kw
-            )
-
-        return response
-
-
-class HTTPSConnectionPool(HTTPConnectionPool):
-    """
-    Same as :class:`.HTTPConnectionPool`, but HTTPS.
-
-    :class:`.HTTPSConnection` uses one of ``assert_fingerprint``,
-    ``assert_hostname`` and ``host`` in this order to verify connections.
-    If ``assert_hostname`` is False, no verification is done.
-
-    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``,
-    ``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl`
-    is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
-    the connection socket into an SSL socket.
-    """
-
-    scheme = "https"
-    ConnectionCls = HTTPSConnection
-
-    def __init__(
-        self,
-        host,
-        port=None,
-        strict=False,
-        timeout=Timeout.DEFAULT_TIMEOUT,
-        maxsize=1,
-        block=False,
-        headers=None,
-        retries=None,
-        _proxy=None,
-        _proxy_headers=None,
-        key_file=None,
-        cert_file=None,
-        cert_reqs=None,
-        key_password=None,
-        ca_certs=None,
-        ssl_version=None,
-        assert_hostname=None,
-        assert_fingerprint=None,
-        ca_cert_dir=None,
-        **conn_kw
-    ):
-
-        HTTPConnectionPool.__init__(
-            self,
-            host,
-            port,
-            strict,
-            timeout,
-            maxsize,
-            block,
-            headers,
-            retries,
-            _proxy,
-            _proxy_headers,
-            **conn_kw
-        )
-
-        self.key_file = key_file
-        self.cert_file = cert_file
-        self.cert_reqs = cert_reqs
-        self.key_password = key_password
-        self.ca_certs = ca_certs
-        self.ca_cert_dir = ca_cert_dir
-        self.ssl_version = ssl_version
-        self.assert_hostname = assert_hostname
-        self.assert_fingerprint = assert_fingerprint
-
-    def _prepare_conn(self, conn):
-        """
-        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
-        and establish the tunnel if proxy is used.
-        """
-
-        if isinstance(conn, VerifiedHTTPSConnection):
-            conn.set_cert(
-                key_file=self.key_file,
-                key_password=self.key_password,
-                cert_file=self.cert_file,
-                cert_reqs=self.cert_reqs,
-                ca_certs=self.ca_certs,
-                ca_cert_dir=self.ca_cert_dir,
-                assert_hostname=self.assert_hostname,
-                assert_fingerprint=self.assert_fingerprint,
-            )
-            conn.ssl_version = self.ssl_version
-        return conn
-
-    def _prepare_proxy(self, conn):
-        """
-        Establishes a tunnel connection through HTTP CONNECT.
-
-        Tunnel connection is established early because otherwise httplib would
-        improperly set Host: header to proxy's IP:port.
-        """
-
-        conn.set_tunnel(self._proxy_host, self.port, self.proxy_headers)
-
-        if self.proxy.scheme == "https":
-            conn.tls_in_tls_required = True
-
-        conn.connect()
-
-    def _new_conn(self):
-        """
-        Return a fresh :class:`http.client.HTTPSConnection`.
-        """
-        self.num_connections += 1
-        log.debug(
-            "Starting new HTTPS connection (%d): %s:%s",
-            self.num_connections,
-            self.host,
-            self.port or "443",
-        )
-
-        if not self.ConnectionCls or self.ConnectionCls is DummyConnection:
-            raise SSLError(
-                "Can't connect to HTTPS URL because the SSL module is not available."
-            )
-
-        actual_host = self.host
-        actual_port = self.port
-        if self.proxy is not None:
-            actual_host = self.proxy.host
-            actual_port = self.proxy.port
-
-        conn = self.ConnectionCls(
-            host=actual_host,
-            port=actual_port,
-            timeout=self.timeout.connect_timeout,
-            strict=self.strict,
-            cert_file=self.cert_file,
-            key_file=self.key_file,
-            key_password=self.key_password,
-            **self.conn_kw
-        )
-
-        return self._prepare_conn(conn)
-
-    def _validate_conn(self, conn):
-        """
-        Called right before a request is made, after the socket is created.
-        """
-        super(HTTPSConnectionPool, self)._validate_conn(conn)
-
-        # Force connect early to allow us to validate the connection.
-        if not getattr(conn, "sock", None):  # AppEngine might not have  `.sock`
-            conn.connect()
-
-        if not conn.is_verified:
-            warnings.warn(
-                (
-                    "Unverified HTTPS request is being made to host '%s'. "
-                    "Adding certificate verification is strongly advised. See: "
-                    "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
-                    "#ssl-warnings" % conn.host
-                ),
-                InsecureRequestWarning,
-            )
-
-        if getattr(conn, "proxy_is_verified", None) is False:
-            warnings.warn(
-                (
-                    "Unverified HTTPS connection done to an HTTPS proxy. "
-                    "Adding certificate verification is strongly advised. See: "
-                    "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
-                    "#ssl-warnings"
-                ),
-                InsecureRequestWarning,
-            )
-
-
-def connection_from_url(url, **kw):
-    """
-    Given a url, return an :class:`.ConnectionPool` instance of its host.
-
-    This is a shortcut for not having to parse out the scheme, host, and port
-    of the url before creating an :class:`.ConnectionPool` instance.
-
-    :param url:
-        Absolute URL string that must include the scheme. Port is optional.
-
-    :param \\**kw:
-        Passes additional parameters to the constructor of the appropriate
-        :class:`.ConnectionPool`. Useful for specifying things like
-        timeout, maxsize, headers, etc.
-
-    Example::
-
-        >>> conn = connection_from_url('http://google.com/')
-        >>> r = conn.request('GET', '/')
-    """
-    scheme, host, port = get_host(url)
-    port = port or port_by_scheme.get(scheme, 80)
-    if scheme == "https":
-        return HTTPSConnectionPool(host, port=port, **kw)
-    else:
-        return HTTPConnectionPool(host, port=port, **kw)
-
-
-def _normalize_host(host, scheme):
-    """
-    Normalize hosts for comparisons and use with sockets.
-    """
-
-    host = normalize_host(host, scheme)
-
-    # httplib doesn't like it when we include brackets in IPv6 addresses
-    # Specifically, if we include brackets but also pass the port then
-    # httplib crazily doubles up the square brackets on the Host header.
-    # Instead, we need to make sure we never pass ``None`` as the port.
-    # However, for backward compatibility reasons we can't actually
-    # *assert* that.  See http://bugs.python.org/issue28539
-    if host.startswith("[") and host.endswith("]"):
-        host = host[1:-1]
-    return host
-
-
-def _close_pool_connections(pool):
-    """Drains a queue of connections and closes each one."""
-    try:
-        while True:
-            conn = pool.get(block=False)
-            if conn:
-                conn.close()
-    except queue.Empty:
-        pass  # Done.
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 94795d03f..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-314.pyc
deleted file mode 100644
index 4e84b1d13..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-314.pyc
deleted file mode 100644
index ce929629b..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-314.pyc
deleted file mode 100644
index 42bd98998..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-314.pyc
deleted file mode 100644
index ae32b02c2..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-314.pyc
deleted file mode 100644
index 4980af620..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-314.pyc
deleted file mode 100644
index 2f99b6d2e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py
deleted file mode 100644
index 8765b907d..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-This module provides means to detect the App Engine environment.
-"""
-
-import os
-
-
-def is_appengine():
-    return is_local_appengine() or is_prod_appengine()
-
-
-def is_appengine_sandbox():
-    """Reports if the app is running in the first generation sandbox.
-
-    The second generation runtimes are technically still in a sandbox, but it
-    is much less restrictive, so generally you shouldn't need to check for it.
-    see https://cloud.google.com/appengine/docs/standard/runtimes
-    """
-    return is_appengine() and os.environ["APPENGINE_RUNTIME"] == "python27"
-
-
-def is_local_appengine():
-    return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
-        "SERVER_SOFTWARE", ""
-    ).startswith("Development/")
-
-
-def is_prod_appengine():
-    return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
-        "SERVER_SOFTWARE", ""
-    ).startswith("Google App Engine/")
-
-
-def is_prod_appengine_mvms():
-    """Deprecated."""
-    return False
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 4b22d80c9..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-314.pyc
deleted file mode 100644
index 105c74915..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-314.pyc
deleted file mode 100644
index 62abfc04e..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py
deleted file mode 100644
index 264d564db..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py
+++ /dev/null
@@ -1,519 +0,0 @@
-"""
-This module uses ctypes to bind a whole bunch of functions and constants from
-SecureTransport. The goal here is to provide the low-level API to
-SecureTransport. These are essentially the C-level functions and constants, and
-they're pretty gross to work with.
-
-This code is a bastardised version of the code found in Will Bond's oscrypto
-library. An enormous debt is owed to him for blazing this trail for us. For
-that reason, this code should be considered to be covered both by urllib3's
-license and by oscrypto's:
-
-    Copyright (c) 2015-2016 Will Bond 
-
-    Permission is hereby granted, free of charge, to any person obtaining a
-    copy of this software and associated documentation files (the "Software"),
-    to deal in the Software without restriction, including without limitation
-    the rights to use, copy, modify, merge, publish, distribute, sublicense,
-    and/or sell copies of the Software, and to permit persons to whom the
-    Software is furnished to do so, subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be included in
-    all copies or substantial portions of the Software.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-    DEALINGS IN THE SOFTWARE.
-"""
-from __future__ import absolute_import
-
-import platform
-from ctypes import (
-    CDLL,
-    CFUNCTYPE,
-    POINTER,
-    c_bool,
-    c_byte,
-    c_char_p,
-    c_int32,
-    c_long,
-    c_size_t,
-    c_uint32,
-    c_ulong,
-    c_void_p,
-)
-from ctypes.util import find_library
-
-from ...packages.six import raise_from
-
-if platform.system() != "Darwin":
-    raise ImportError("Only macOS is supported")
-
-version = platform.mac_ver()[0]
-version_info = tuple(map(int, version.split(".")))
-if version_info < (10, 8):
-    raise OSError(
-        "Only OS X 10.8 and newer are supported, not %s.%s"
-        % (version_info[0], version_info[1])
-    )
-
-
-def load_cdll(name, macos10_16_path):
-    """Loads a CDLL by name, falling back to known path on 10.16+"""
-    try:
-        # Big Sur is technically 11 but we use 10.16 due to the Big Sur
-        # beta being labeled as 10.16.
-        if version_info >= (10, 16):
-            path = macos10_16_path
-        else:
-            path = find_library(name)
-        if not path:
-            raise OSError  # Caught and reraised as 'ImportError'
-        return CDLL(path, use_errno=True)
-    except OSError:
-        raise_from(ImportError("The library %s failed to load" % name), None)
-
-
-Security = load_cdll(
-    "Security", "/System/Library/Frameworks/Security.framework/Security"
-)
-CoreFoundation = load_cdll(
-    "CoreFoundation",
-    "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation",
-)
-
-
-Boolean = c_bool
-CFIndex = c_long
-CFStringEncoding = c_uint32
-CFData = c_void_p
-CFString = c_void_p
-CFArray = c_void_p
-CFMutableArray = c_void_p
-CFDictionary = c_void_p
-CFError = c_void_p
-CFType = c_void_p
-CFTypeID = c_ulong
-
-CFTypeRef = POINTER(CFType)
-CFAllocatorRef = c_void_p
-
-OSStatus = c_int32
-
-CFDataRef = POINTER(CFData)
-CFStringRef = POINTER(CFString)
-CFArrayRef = POINTER(CFArray)
-CFMutableArrayRef = POINTER(CFMutableArray)
-CFDictionaryRef = POINTER(CFDictionary)
-CFArrayCallBacks = c_void_p
-CFDictionaryKeyCallBacks = c_void_p
-CFDictionaryValueCallBacks = c_void_p
-
-SecCertificateRef = POINTER(c_void_p)
-SecExternalFormat = c_uint32
-SecExternalItemType = c_uint32
-SecIdentityRef = POINTER(c_void_p)
-SecItemImportExportFlags = c_uint32
-SecItemImportExportKeyParameters = c_void_p
-SecKeychainRef = POINTER(c_void_p)
-SSLProtocol = c_uint32
-SSLCipherSuite = c_uint32
-SSLContextRef = POINTER(c_void_p)
-SecTrustRef = POINTER(c_void_p)
-SSLConnectionRef = c_uint32
-SecTrustResultType = c_uint32
-SecTrustOptionFlags = c_uint32
-SSLProtocolSide = c_uint32
-SSLConnectionType = c_uint32
-SSLSessionOption = c_uint32
-
-
-try:
-    Security.SecItemImport.argtypes = [
-        CFDataRef,
-        CFStringRef,
-        POINTER(SecExternalFormat),
-        POINTER(SecExternalItemType),
-        SecItemImportExportFlags,
-        POINTER(SecItemImportExportKeyParameters),
-        SecKeychainRef,
-        POINTER(CFArrayRef),
-    ]
-    Security.SecItemImport.restype = OSStatus
-
-    Security.SecCertificateGetTypeID.argtypes = []
-    Security.SecCertificateGetTypeID.restype = CFTypeID
-
-    Security.SecIdentityGetTypeID.argtypes = []
-    Security.SecIdentityGetTypeID.restype = CFTypeID
-
-    Security.SecKeyGetTypeID.argtypes = []
-    Security.SecKeyGetTypeID.restype = CFTypeID
-
-    Security.SecCertificateCreateWithData.argtypes = [CFAllocatorRef, CFDataRef]
-    Security.SecCertificateCreateWithData.restype = SecCertificateRef
-
-    Security.SecCertificateCopyData.argtypes = [SecCertificateRef]
-    Security.SecCertificateCopyData.restype = CFDataRef
-
-    Security.SecCopyErrorMessageString.argtypes = [OSStatus, c_void_p]
-    Security.SecCopyErrorMessageString.restype = CFStringRef
-
-    Security.SecIdentityCreateWithCertificate.argtypes = [
-        CFTypeRef,
-        SecCertificateRef,
-        POINTER(SecIdentityRef),
-    ]
-    Security.SecIdentityCreateWithCertificate.restype = OSStatus
-
-    Security.SecKeychainCreate.argtypes = [
-        c_char_p,
-        c_uint32,
-        c_void_p,
-        Boolean,
-        c_void_p,
-        POINTER(SecKeychainRef),
-    ]
-    Security.SecKeychainCreate.restype = OSStatus
-
-    Security.SecKeychainDelete.argtypes = [SecKeychainRef]
-    Security.SecKeychainDelete.restype = OSStatus
-
-    Security.SecPKCS12Import.argtypes = [
-        CFDataRef,
-        CFDictionaryRef,
-        POINTER(CFArrayRef),
-    ]
-    Security.SecPKCS12Import.restype = OSStatus
-
-    SSLReadFunc = CFUNCTYPE(OSStatus, SSLConnectionRef, c_void_p, POINTER(c_size_t))
-    SSLWriteFunc = CFUNCTYPE(
-        OSStatus, SSLConnectionRef, POINTER(c_byte), POINTER(c_size_t)
-    )
-
-    Security.SSLSetIOFuncs.argtypes = [SSLContextRef, SSLReadFunc, SSLWriteFunc]
-    Security.SSLSetIOFuncs.restype = OSStatus
-
-    Security.SSLSetPeerID.argtypes = [SSLContextRef, c_char_p, c_size_t]
-    Security.SSLSetPeerID.restype = OSStatus
-
-    Security.SSLSetCertificate.argtypes = [SSLContextRef, CFArrayRef]
-    Security.SSLSetCertificate.restype = OSStatus
-
-    Security.SSLSetCertificateAuthorities.argtypes = [SSLContextRef, CFTypeRef, Boolean]
-    Security.SSLSetCertificateAuthorities.restype = OSStatus
-
-    Security.SSLSetConnection.argtypes = [SSLContextRef, SSLConnectionRef]
-    Security.SSLSetConnection.restype = OSStatus
-
-    Security.SSLSetPeerDomainName.argtypes = [SSLContextRef, c_char_p, c_size_t]
-    Security.SSLSetPeerDomainName.restype = OSStatus
-
-    Security.SSLHandshake.argtypes = [SSLContextRef]
-    Security.SSLHandshake.restype = OSStatus
-
-    Security.SSLRead.argtypes = [SSLContextRef, c_char_p, c_size_t, POINTER(c_size_t)]
-    Security.SSLRead.restype = OSStatus
-
-    Security.SSLWrite.argtypes = [SSLContextRef, c_char_p, c_size_t, POINTER(c_size_t)]
-    Security.SSLWrite.restype = OSStatus
-
-    Security.SSLClose.argtypes = [SSLContextRef]
-    Security.SSLClose.restype = OSStatus
-
-    Security.SSLGetNumberSupportedCiphers.argtypes = [SSLContextRef, POINTER(c_size_t)]
-    Security.SSLGetNumberSupportedCiphers.restype = OSStatus
-
-    Security.SSLGetSupportedCiphers.argtypes = [
-        SSLContextRef,
-        POINTER(SSLCipherSuite),
-        POINTER(c_size_t),
-    ]
-    Security.SSLGetSupportedCiphers.restype = OSStatus
-
-    Security.SSLSetEnabledCiphers.argtypes = [
-        SSLContextRef,
-        POINTER(SSLCipherSuite),
-        c_size_t,
-    ]
-    Security.SSLSetEnabledCiphers.restype = OSStatus
-
-    Security.SSLGetNumberEnabledCiphers.argtype = [SSLContextRef, POINTER(c_size_t)]
-    Security.SSLGetNumberEnabledCiphers.restype = OSStatus
-
-    Security.SSLGetEnabledCiphers.argtypes = [
-        SSLContextRef,
-        POINTER(SSLCipherSuite),
-        POINTER(c_size_t),
-    ]
-    Security.SSLGetEnabledCiphers.restype = OSStatus
-
-    Security.SSLGetNegotiatedCipher.argtypes = [SSLContextRef, POINTER(SSLCipherSuite)]
-    Security.SSLGetNegotiatedCipher.restype = OSStatus
-
-    Security.SSLGetNegotiatedProtocolVersion.argtypes = [
-        SSLContextRef,
-        POINTER(SSLProtocol),
-    ]
-    Security.SSLGetNegotiatedProtocolVersion.restype = OSStatus
-
-    Security.SSLCopyPeerTrust.argtypes = [SSLContextRef, POINTER(SecTrustRef)]
-    Security.SSLCopyPeerTrust.restype = OSStatus
-
-    Security.SecTrustSetAnchorCertificates.argtypes = [SecTrustRef, CFArrayRef]
-    Security.SecTrustSetAnchorCertificates.restype = OSStatus
-
-    Security.SecTrustSetAnchorCertificatesOnly.argstypes = [SecTrustRef, Boolean]
-    Security.SecTrustSetAnchorCertificatesOnly.restype = OSStatus
-
-    Security.SecTrustEvaluate.argtypes = [SecTrustRef, POINTER(SecTrustResultType)]
-    Security.SecTrustEvaluate.restype = OSStatus
-
-    Security.SecTrustGetCertificateCount.argtypes = [SecTrustRef]
-    Security.SecTrustGetCertificateCount.restype = CFIndex
-
-    Security.SecTrustGetCertificateAtIndex.argtypes = [SecTrustRef, CFIndex]
-    Security.SecTrustGetCertificateAtIndex.restype = SecCertificateRef
-
-    Security.SSLCreateContext.argtypes = [
-        CFAllocatorRef,
-        SSLProtocolSide,
-        SSLConnectionType,
-    ]
-    Security.SSLCreateContext.restype = SSLContextRef
-
-    Security.SSLSetSessionOption.argtypes = [SSLContextRef, SSLSessionOption, Boolean]
-    Security.SSLSetSessionOption.restype = OSStatus
-
-    Security.SSLSetProtocolVersionMin.argtypes = [SSLContextRef, SSLProtocol]
-    Security.SSLSetProtocolVersionMin.restype = OSStatus
-
-    Security.SSLSetProtocolVersionMax.argtypes = [SSLContextRef, SSLProtocol]
-    Security.SSLSetProtocolVersionMax.restype = OSStatus
-
-    try:
-        Security.SSLSetALPNProtocols.argtypes = [SSLContextRef, CFArrayRef]
-        Security.SSLSetALPNProtocols.restype = OSStatus
-    except AttributeError:
-        # Supported only in 10.12+
-        pass
-
-    Security.SecCopyErrorMessageString.argtypes = [OSStatus, c_void_p]
-    Security.SecCopyErrorMessageString.restype = CFStringRef
-
-    Security.SSLReadFunc = SSLReadFunc
-    Security.SSLWriteFunc = SSLWriteFunc
-    Security.SSLContextRef = SSLContextRef
-    Security.SSLProtocol = SSLProtocol
-    Security.SSLCipherSuite = SSLCipherSuite
-    Security.SecIdentityRef = SecIdentityRef
-    Security.SecKeychainRef = SecKeychainRef
-    Security.SecTrustRef = SecTrustRef
-    Security.SecTrustResultType = SecTrustResultType
-    Security.SecExternalFormat = SecExternalFormat
-    Security.OSStatus = OSStatus
-
-    Security.kSecImportExportPassphrase = CFStringRef.in_dll(
-        Security, "kSecImportExportPassphrase"
-    )
-    Security.kSecImportItemIdentity = CFStringRef.in_dll(
-        Security, "kSecImportItemIdentity"
-    )
-
-    # CoreFoundation time!
-    CoreFoundation.CFRetain.argtypes = [CFTypeRef]
-    CoreFoundation.CFRetain.restype = CFTypeRef
-
-    CoreFoundation.CFRelease.argtypes = [CFTypeRef]
-    CoreFoundation.CFRelease.restype = None
-
-    CoreFoundation.CFGetTypeID.argtypes = [CFTypeRef]
-    CoreFoundation.CFGetTypeID.restype = CFTypeID
-
-    CoreFoundation.CFStringCreateWithCString.argtypes = [
-        CFAllocatorRef,
-        c_char_p,
-        CFStringEncoding,
-    ]
-    CoreFoundation.CFStringCreateWithCString.restype = CFStringRef
-
-    CoreFoundation.CFStringGetCStringPtr.argtypes = [CFStringRef, CFStringEncoding]
-    CoreFoundation.CFStringGetCStringPtr.restype = c_char_p
-
-    CoreFoundation.CFStringGetCString.argtypes = [
-        CFStringRef,
-        c_char_p,
-        CFIndex,
-        CFStringEncoding,
-    ]
-    CoreFoundation.CFStringGetCString.restype = c_bool
-
-    CoreFoundation.CFDataCreate.argtypes = [CFAllocatorRef, c_char_p, CFIndex]
-    CoreFoundation.CFDataCreate.restype = CFDataRef
-
-    CoreFoundation.CFDataGetLength.argtypes = [CFDataRef]
-    CoreFoundation.CFDataGetLength.restype = CFIndex
-
-    CoreFoundation.CFDataGetBytePtr.argtypes = [CFDataRef]
-    CoreFoundation.CFDataGetBytePtr.restype = c_void_p
-
-    CoreFoundation.CFDictionaryCreate.argtypes = [
-        CFAllocatorRef,
-        POINTER(CFTypeRef),
-        POINTER(CFTypeRef),
-        CFIndex,
-        CFDictionaryKeyCallBacks,
-        CFDictionaryValueCallBacks,
-    ]
-    CoreFoundation.CFDictionaryCreate.restype = CFDictionaryRef
-
-    CoreFoundation.CFDictionaryGetValue.argtypes = [CFDictionaryRef, CFTypeRef]
-    CoreFoundation.CFDictionaryGetValue.restype = CFTypeRef
-
-    CoreFoundation.CFArrayCreate.argtypes = [
-        CFAllocatorRef,
-        POINTER(CFTypeRef),
-        CFIndex,
-        CFArrayCallBacks,
-    ]
-    CoreFoundation.CFArrayCreate.restype = CFArrayRef
-
-    CoreFoundation.CFArrayCreateMutable.argtypes = [
-        CFAllocatorRef,
-        CFIndex,
-        CFArrayCallBacks,
-    ]
-    CoreFoundation.CFArrayCreateMutable.restype = CFMutableArrayRef
-
-    CoreFoundation.CFArrayAppendValue.argtypes = [CFMutableArrayRef, c_void_p]
-    CoreFoundation.CFArrayAppendValue.restype = None
-
-    CoreFoundation.CFArrayGetCount.argtypes = [CFArrayRef]
-    CoreFoundation.CFArrayGetCount.restype = CFIndex
-
-    CoreFoundation.CFArrayGetValueAtIndex.argtypes = [CFArrayRef, CFIndex]
-    CoreFoundation.CFArrayGetValueAtIndex.restype = c_void_p
-
-    CoreFoundation.kCFAllocatorDefault = CFAllocatorRef.in_dll(
-        CoreFoundation, "kCFAllocatorDefault"
-    )
-    CoreFoundation.kCFTypeArrayCallBacks = c_void_p.in_dll(
-        CoreFoundation, "kCFTypeArrayCallBacks"
-    )
-    CoreFoundation.kCFTypeDictionaryKeyCallBacks = c_void_p.in_dll(
-        CoreFoundation, "kCFTypeDictionaryKeyCallBacks"
-    )
-    CoreFoundation.kCFTypeDictionaryValueCallBacks = c_void_p.in_dll(
-        CoreFoundation, "kCFTypeDictionaryValueCallBacks"
-    )
-
-    CoreFoundation.CFTypeRef = CFTypeRef
-    CoreFoundation.CFArrayRef = CFArrayRef
-    CoreFoundation.CFStringRef = CFStringRef
-    CoreFoundation.CFDictionaryRef = CFDictionaryRef
-
-except (AttributeError):
-    raise ImportError("Error initializing ctypes")
-
-
-class CFConst(object):
-    """
-    A class object that acts as essentially a namespace for CoreFoundation
-    constants.
-    """
-
-    kCFStringEncodingUTF8 = CFStringEncoding(0x08000100)
-
-
-class SecurityConst(object):
-    """
-    A class object that acts as essentially a namespace for Security constants.
-    """
-
-    kSSLSessionOptionBreakOnServerAuth = 0
-
-    kSSLProtocol2 = 1
-    kSSLProtocol3 = 2
-    kTLSProtocol1 = 4
-    kTLSProtocol11 = 7
-    kTLSProtocol12 = 8
-    # SecureTransport does not support TLS 1.3 even if there's a constant for it
-    kTLSProtocol13 = 10
-    kTLSProtocolMaxSupported = 999
-
-    kSSLClientSide = 1
-    kSSLStreamType = 0
-
-    kSecFormatPEMSequence = 10
-
-    kSecTrustResultInvalid = 0
-    kSecTrustResultProceed = 1
-    # This gap is present on purpose: this was kSecTrustResultConfirm, which
-    # is deprecated.
-    kSecTrustResultDeny = 3
-    kSecTrustResultUnspecified = 4
-    kSecTrustResultRecoverableTrustFailure = 5
-    kSecTrustResultFatalTrustFailure = 6
-    kSecTrustResultOtherError = 7
-
-    errSSLProtocol = -9800
-    errSSLWouldBlock = -9803
-    errSSLClosedGraceful = -9805
-    errSSLClosedNoNotify = -9816
-    errSSLClosedAbort = -9806
-
-    errSSLXCertChainInvalid = -9807
-    errSSLCrypto = -9809
-    errSSLInternal = -9810
-    errSSLCertExpired = -9814
-    errSSLCertNotYetValid = -9815
-    errSSLUnknownRootCert = -9812
-    errSSLNoRootCert = -9813
-    errSSLHostNameMismatch = -9843
-    errSSLPeerHandshakeFail = -9824
-    errSSLPeerUserCancelled = -9839
-    errSSLWeakPeerEphemeralDHKey = -9850
-    errSSLServerAuthCompleted = -9841
-    errSSLRecordOverflow = -9847
-
-    errSecVerifyFailed = -67808
-    errSecNoTrustSettings = -25263
-    errSecItemNotFound = -25300
-    errSecInvalidTrustSettings = -25262
-
-    # Cipher suites. We only pick the ones our default cipher string allows.
-    # Source: https://developer.apple.com/documentation/security/1550981-ssl_cipher_suite_values
-    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C
-    TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030
-    TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B
-    TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F
-    TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9
-    TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8
-    TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x009F
-    TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x009E
-    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 0xC024
-    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = 0xC028
-    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A
-    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014
-    TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x006B
-    TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x0039
-    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0xC023
-    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0xC027
-    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009
-    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013
-    TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x0067
-    TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033
-    TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D
-    TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C
-    TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x003D
-    TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x003C
-    TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035
-    TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F
-    TLS_AES_128_GCM_SHA256 = 0x1301
-    TLS_AES_256_GCM_SHA384 = 0x1302
-    TLS_AES_128_CCM_8_SHA256 = 0x1305
-    TLS_AES_128_CCM_SHA256 = 0x1304
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py
deleted file mode 100644
index fa0b245d2..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py
+++ /dev/null
@@ -1,397 +0,0 @@
-"""
-Low-level helpers for the SecureTransport bindings.
-
-These are Python functions that are not directly related to the high-level APIs
-but are necessary to get them to work. They include a whole bunch of low-level
-CoreFoundation messing about and memory management. The concerns in this module
-are almost entirely about trying to avoid memory leaks and providing
-appropriate and useful assistance to the higher-level code.
-"""
-import base64
-import ctypes
-import itertools
-import os
-import re
-import ssl
-import struct
-import tempfile
-
-from .bindings import CFConst, CoreFoundation, Security
-
-# This regular expression is used to grab PEM data out of a PEM bundle.
-_PEM_CERTS_RE = re.compile(
-    b"-----BEGIN CERTIFICATE-----\n(.*?)\n-----END CERTIFICATE-----", re.DOTALL
-)
-
-
-def _cf_data_from_bytes(bytestring):
-    """
-    Given a bytestring, create a CFData object from it. This CFData object must
-    be CFReleased by the caller.
-    """
-    return CoreFoundation.CFDataCreate(
-        CoreFoundation.kCFAllocatorDefault, bytestring, len(bytestring)
-    )
-
-
-def _cf_dictionary_from_tuples(tuples):
-    """
-    Given a list of Python tuples, create an associated CFDictionary.
-    """
-    dictionary_size = len(tuples)
-
-    # We need to get the dictionary keys and values out in the same order.
-    keys = (t[0] for t in tuples)
-    values = (t[1] for t in tuples)
-    cf_keys = (CoreFoundation.CFTypeRef * dictionary_size)(*keys)
-    cf_values = (CoreFoundation.CFTypeRef * dictionary_size)(*values)
-
-    return CoreFoundation.CFDictionaryCreate(
-        CoreFoundation.kCFAllocatorDefault,
-        cf_keys,
-        cf_values,
-        dictionary_size,
-        CoreFoundation.kCFTypeDictionaryKeyCallBacks,
-        CoreFoundation.kCFTypeDictionaryValueCallBacks,
-    )
-
-
-def _cfstr(py_bstr):
-    """
-    Given a Python binary data, create a CFString.
-    The string must be CFReleased by the caller.
-    """
-    c_str = ctypes.c_char_p(py_bstr)
-    cf_str = CoreFoundation.CFStringCreateWithCString(
-        CoreFoundation.kCFAllocatorDefault,
-        c_str,
-        CFConst.kCFStringEncodingUTF8,
-    )
-    return cf_str
-
-
-def _create_cfstring_array(lst):
-    """
-    Given a list of Python binary data, create an associated CFMutableArray.
-    The array must be CFReleased by the caller.
-
-    Raises an ssl.SSLError on failure.
-    """
-    cf_arr = None
-    try:
-        cf_arr = CoreFoundation.CFArrayCreateMutable(
-            CoreFoundation.kCFAllocatorDefault,
-            0,
-            ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
-        )
-        if not cf_arr:
-            raise MemoryError("Unable to allocate memory!")
-        for item in lst:
-            cf_str = _cfstr(item)
-            if not cf_str:
-                raise MemoryError("Unable to allocate memory!")
-            try:
-                CoreFoundation.CFArrayAppendValue(cf_arr, cf_str)
-            finally:
-                CoreFoundation.CFRelease(cf_str)
-    except BaseException as e:
-        if cf_arr:
-            CoreFoundation.CFRelease(cf_arr)
-        raise ssl.SSLError("Unable to allocate array: %s" % (e,))
-    return cf_arr
-
-
-def _cf_string_to_unicode(value):
-    """
-    Creates a Unicode string from a CFString object. Used entirely for error
-    reporting.
-
-    Yes, it annoys me quite a lot that this function is this complex.
-    """
-    value_as_void_p = ctypes.cast(value, ctypes.POINTER(ctypes.c_void_p))
-
-    string = CoreFoundation.CFStringGetCStringPtr(
-        value_as_void_p, CFConst.kCFStringEncodingUTF8
-    )
-    if string is None:
-        buffer = ctypes.create_string_buffer(1024)
-        result = CoreFoundation.CFStringGetCString(
-            value_as_void_p, buffer, 1024, CFConst.kCFStringEncodingUTF8
-        )
-        if not result:
-            raise OSError("Error copying C string from CFStringRef")
-        string = buffer.value
-    if string is not None:
-        string = string.decode("utf-8")
-    return string
-
-
-def _assert_no_error(error, exception_class=None):
-    """
-    Checks the return code and throws an exception if there is an error to
-    report
-    """
-    if error == 0:
-        return
-
-    cf_error_string = Security.SecCopyErrorMessageString(error, None)
-    output = _cf_string_to_unicode(cf_error_string)
-    CoreFoundation.CFRelease(cf_error_string)
-
-    if output is None or output == u"":
-        output = u"OSStatus %s" % error
-
-    if exception_class is None:
-        exception_class = ssl.SSLError
-
-    raise exception_class(output)
-
-
-def _cert_array_from_pem(pem_bundle):
-    """
-    Given a bundle of certs in PEM format, turns them into a CFArray of certs
-    that can be used to validate a cert chain.
-    """
-    # Normalize the PEM bundle's line endings.
-    pem_bundle = pem_bundle.replace(b"\r\n", b"\n")
-
-    der_certs = [
-        base64.b64decode(match.group(1)) for match in _PEM_CERTS_RE.finditer(pem_bundle)
-    ]
-    if not der_certs:
-        raise ssl.SSLError("No root certificates specified")
-
-    cert_array = CoreFoundation.CFArrayCreateMutable(
-        CoreFoundation.kCFAllocatorDefault,
-        0,
-        ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
-    )
-    if not cert_array:
-        raise ssl.SSLError("Unable to allocate memory!")
-
-    try:
-        for der_bytes in der_certs:
-            certdata = _cf_data_from_bytes(der_bytes)
-            if not certdata:
-                raise ssl.SSLError("Unable to allocate memory!")
-            cert = Security.SecCertificateCreateWithData(
-                CoreFoundation.kCFAllocatorDefault, certdata
-            )
-            CoreFoundation.CFRelease(certdata)
-            if not cert:
-                raise ssl.SSLError("Unable to build cert object!")
-
-            CoreFoundation.CFArrayAppendValue(cert_array, cert)
-            CoreFoundation.CFRelease(cert)
-    except Exception:
-        # We need to free the array before the exception bubbles further.
-        # We only want to do that if an error occurs: otherwise, the caller
-        # should free.
-        CoreFoundation.CFRelease(cert_array)
-        raise
-
-    return cert_array
-
-
-def _is_cert(item):
-    """
-    Returns True if a given CFTypeRef is a certificate.
-    """
-    expected = Security.SecCertificateGetTypeID()
-    return CoreFoundation.CFGetTypeID(item) == expected
-
-
-def _is_identity(item):
-    """
-    Returns True if a given CFTypeRef is an identity.
-    """
-    expected = Security.SecIdentityGetTypeID()
-    return CoreFoundation.CFGetTypeID(item) == expected
-
-
-def _temporary_keychain():
-    """
-    This function creates a temporary Mac keychain that we can use to work with
-    credentials. This keychain uses a one-time password and a temporary file to
-    store the data. We expect to have one keychain per socket. The returned
-    SecKeychainRef must be freed by the caller, including calling
-    SecKeychainDelete.
-
-    Returns a tuple of the SecKeychainRef and the path to the temporary
-    directory that contains it.
-    """
-    # Unfortunately, SecKeychainCreate requires a path to a keychain. This
-    # means we cannot use mkstemp to use a generic temporary file. Instead,
-    # we're going to create a temporary directory and a filename to use there.
-    # This filename will be 8 random bytes expanded into base64. We also need
-    # some random bytes to password-protect the keychain we're creating, so we
-    # ask for 40 random bytes.
-    random_bytes = os.urandom(40)
-    filename = base64.b16encode(random_bytes[:8]).decode("utf-8")
-    password = base64.b16encode(random_bytes[8:])  # Must be valid UTF-8
-    tempdirectory = tempfile.mkdtemp()
-
-    keychain_path = os.path.join(tempdirectory, filename).encode("utf-8")
-
-    # We now want to create the keychain itself.
-    keychain = Security.SecKeychainRef()
-    status = Security.SecKeychainCreate(
-        keychain_path, len(password), password, False, None, ctypes.byref(keychain)
-    )
-    _assert_no_error(status)
-
-    # Having created the keychain, we want to pass it off to the caller.
-    return keychain, tempdirectory
-
-
-def _load_items_from_file(keychain, path):
-    """
-    Given a single file, loads all the trust objects from it into arrays and
-    the keychain.
-    Returns a tuple of lists: the first list is a list of identities, the
-    second a list of certs.
-    """
-    certificates = []
-    identities = []
-    result_array = None
-
-    with open(path, "rb") as f:
-        raw_filedata = f.read()
-
-    try:
-        filedata = CoreFoundation.CFDataCreate(
-            CoreFoundation.kCFAllocatorDefault, raw_filedata, len(raw_filedata)
-        )
-        result_array = CoreFoundation.CFArrayRef()
-        result = Security.SecItemImport(
-            filedata,  # cert data
-            None,  # Filename, leaving it out for now
-            None,  # What the type of the file is, we don't care
-            None,  # what's in the file, we don't care
-            0,  # import flags
-            None,  # key params, can include passphrase in the future
-            keychain,  # The keychain to insert into
-            ctypes.byref(result_array),  # Results
-        )
-        _assert_no_error(result)
-
-        # A CFArray is not very useful to us as an intermediary
-        # representation, so we are going to extract the objects we want
-        # and then free the array. We don't need to keep hold of keys: the
-        # keychain already has them!
-        result_count = CoreFoundation.CFArrayGetCount(result_array)
-        for index in range(result_count):
-            item = CoreFoundation.CFArrayGetValueAtIndex(result_array, index)
-            item = ctypes.cast(item, CoreFoundation.CFTypeRef)
-
-            if _is_cert(item):
-                CoreFoundation.CFRetain(item)
-                certificates.append(item)
-            elif _is_identity(item):
-                CoreFoundation.CFRetain(item)
-                identities.append(item)
-    finally:
-        if result_array:
-            CoreFoundation.CFRelease(result_array)
-
-        CoreFoundation.CFRelease(filedata)
-
-    return (identities, certificates)
-
-
-def _load_client_cert_chain(keychain, *paths):
-    """
-    Load certificates and maybe keys from a number of files. Has the end goal
-    of returning a CFArray containing one SecIdentityRef, and then zero or more
-    SecCertificateRef objects, suitable for use as a client certificate trust
-    chain.
-    """
-    # Ok, the strategy.
-    #
-    # This relies on knowing that macOS will not give you a SecIdentityRef
-    # unless you have imported a key into a keychain. This is a somewhat
-    # artificial limitation of macOS (for example, it doesn't necessarily
-    # affect iOS), but there is nothing inside Security.framework that lets you
-    # get a SecIdentityRef without having a key in a keychain.
-    #
-    # So the policy here is we take all the files and iterate them in order.
-    # Each one will use SecItemImport to have one or more objects loaded from
-    # it. We will also point at a keychain that macOS can use to work with the
-    # private key.
-    #
-    # Once we have all the objects, we'll check what we actually have. If we
-    # already have a SecIdentityRef in hand, fab: we'll use that. Otherwise,
-    # we'll take the first certificate (which we assume to be our leaf) and
-    # ask the keychain to give us a SecIdentityRef with that cert's associated
-    # key.
-    #
-    # We'll then return a CFArray containing the trust chain: one
-    # SecIdentityRef and then zero-or-more SecCertificateRef objects. The
-    # responsibility for freeing this CFArray will be with the caller. This
-    # CFArray must remain alive for the entire connection, so in practice it
-    # will be stored with a single SSLSocket, along with the reference to the
-    # keychain.
-    certificates = []
-    identities = []
-
-    # Filter out bad paths.
-    paths = (path for path in paths if path)
-
-    try:
-        for file_path in paths:
-            new_identities, new_certs = _load_items_from_file(keychain, file_path)
-            identities.extend(new_identities)
-            certificates.extend(new_certs)
-
-        # Ok, we have everything. The question is: do we have an identity? If
-        # not, we want to grab one from the first cert we have.
-        if not identities:
-            new_identity = Security.SecIdentityRef()
-            status = Security.SecIdentityCreateWithCertificate(
-                keychain, certificates[0], ctypes.byref(new_identity)
-            )
-            _assert_no_error(status)
-            identities.append(new_identity)
-
-            # We now want to release the original certificate, as we no longer
-            # need it.
-            CoreFoundation.CFRelease(certificates.pop(0))
-
-        # We now need to build a new CFArray that holds the trust chain.
-        trust_chain = CoreFoundation.CFArrayCreateMutable(
-            CoreFoundation.kCFAllocatorDefault,
-            0,
-            ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks),
-        )
-        for item in itertools.chain(identities, certificates):
-            # ArrayAppendValue does a CFRetain on the item. That's fine,
-            # because the finally block will release our other refs to them.
-            CoreFoundation.CFArrayAppendValue(trust_chain, item)
-
-        return trust_chain
-    finally:
-        for obj in itertools.chain(identities, certificates):
-            CoreFoundation.CFRelease(obj)
-
-
-TLS_PROTOCOL_VERSIONS = {
-    "SSLv2": (0, 2),
-    "SSLv3": (3, 0),
-    "TLSv1": (3, 1),
-    "TLSv1.1": (3, 2),
-    "TLSv1.2": (3, 3),
-}
-
-
-def _build_tls_unknown_ca_alert(version):
-    """
-    Builds a TLS alert record for an unknown CA.
-    """
-    ver_maj, ver_min = TLS_PROTOCOL_VERSIONS[version]
-    severity_fatal = 0x02
-    description_unknown_ca = 0x30
-    msg = struct.pack(">BB", severity_fatal, description_unknown_ca)
-    msg_len = len(msg)
-    record_type_alert = 0x15
-    record = struct.pack(">BBBH", record_type_alert, ver_maj, ver_min, msg_len) + msg
-    return record
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py
deleted file mode 100644
index 1717ee22c..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py
+++ /dev/null
@@ -1,314 +0,0 @@
-"""
-This module provides a pool manager that uses Google App Engine's
-`URLFetch Service `_.
-
-Example usage::
-
-    from pip._vendor.urllib3 import PoolManager
-    from pip._vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox
-
-    if is_appengine_sandbox():
-        # AppEngineManager uses AppEngine's URLFetch API behind the scenes
-        http = AppEngineManager()
-    else:
-        # PoolManager uses a socket-level API behind the scenes
-        http = PoolManager()
-
-    r = http.request('GET', 'https://google.com/')
-
-There are `limitations `_ to the URLFetch service and it may not be
-the best choice for your application. There are three options for using
-urllib3 on Google App Engine:
-
-1. You can use :class:`AppEngineManager` with URLFetch. URLFetch is
-   cost-effective in many circumstances as long as your usage is within the
-   limitations.
-2. You can use a normal :class:`~urllib3.PoolManager` by enabling sockets.
-   Sockets also have `limitations and restrictions
-   `_ and have a lower free quota than URLFetch.
-   To use sockets, be sure to specify the following in your ``app.yaml``::
-
-        env_variables:
-            GAE_USE_SOCKETS_HTTPLIB : 'true'
-
-3. If you are using `App Engine Flexible
-`_, you can use the standard
-:class:`PoolManager` without any configuration or special environment variables.
-"""
-
-from __future__ import absolute_import
-
-import io
-import logging
-import warnings
-
-from ..exceptions import (
-    HTTPError,
-    HTTPWarning,
-    MaxRetryError,
-    ProtocolError,
-    SSLError,
-    TimeoutError,
-)
-from ..packages.six.moves.urllib.parse import urljoin
-from ..request import RequestMethods
-from ..response import HTTPResponse
-from ..util.retry import Retry
-from ..util.timeout import Timeout
-from . import _appengine_environ
-
-try:
-    from google.appengine.api import urlfetch
-except ImportError:
-    urlfetch = None
-
-
-log = logging.getLogger(__name__)
-
-
-class AppEnginePlatformWarning(HTTPWarning):
-    pass
-
-
-class AppEnginePlatformError(HTTPError):
-    pass
-
-
-class AppEngineManager(RequestMethods):
-    """
-    Connection manager for Google App Engine sandbox applications.
-
-    This manager uses the URLFetch service directly instead of using the
-    emulated httplib, and is subject to URLFetch limitations as described in
-    the App Engine documentation `here
-    `_.
-
-    Notably it will raise an :class:`AppEnginePlatformError` if:
-        * URLFetch is not available.
-        * If you attempt to use this on App Engine Flexible, as full socket
-          support is available.
-        * If a request size is more than 10 megabytes.
-        * If a response size is more than 32 megabytes.
-        * If you use an unsupported request method such as OPTIONS.
-
-    Beyond those cases, it will raise normal urllib3 errors.
-    """
-
-    def __init__(
-        self,
-        headers=None,
-        retries=None,
-        validate_certificate=True,
-        urlfetch_retries=True,
-    ):
-        if not urlfetch:
-            raise AppEnginePlatformError(
-                "URLFetch is not available in this environment."
-            )
-
-        warnings.warn(
-            "urllib3 is using URLFetch on Google App Engine sandbox instead "
-            "of sockets. To use sockets directly instead of URLFetch see "
-            "https://urllib3.readthedocs.io/en/1.26.x/reference/urllib3.contrib.html.",
-            AppEnginePlatformWarning,
-        )
-
-        RequestMethods.__init__(self, headers)
-        self.validate_certificate = validate_certificate
-        self.urlfetch_retries = urlfetch_retries
-
-        self.retries = retries or Retry.DEFAULT
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, exc_type, exc_val, exc_tb):
-        # Return False to re-raise any potential exceptions
-        return False
-
-    def urlopen(
-        self,
-        method,
-        url,
-        body=None,
-        headers=None,
-        retries=None,
-        redirect=True,
-        timeout=Timeout.DEFAULT_TIMEOUT,
-        **response_kw
-    ):
-
-        retries = self._get_retries(retries, redirect)
-
-        try:
-            follow_redirects = redirect and retries.redirect != 0 and retries.total
-            response = urlfetch.fetch(
-                url,
-                payload=body,
-                method=method,
-                headers=headers or {},
-                allow_truncated=False,
-                follow_redirects=self.urlfetch_retries and follow_redirects,
-                deadline=self._get_absolute_timeout(timeout),
-                validate_certificate=self.validate_certificate,
-            )
-        except urlfetch.DeadlineExceededError as e:
-            raise TimeoutError(self, e)
-
-        except urlfetch.InvalidURLError as e:
-            if "too large" in str(e):
-                raise AppEnginePlatformError(
-                    "URLFetch request too large, URLFetch only "
-                    "supports requests up to 10mb in size.",
-                    e,
-                )
-            raise ProtocolError(e)
-
-        except urlfetch.DownloadError as e:
-            if "Too many redirects" in str(e):
-                raise MaxRetryError(self, url, reason=e)
-            raise ProtocolError(e)
-
-        except urlfetch.ResponseTooLargeError as e:
-            raise AppEnginePlatformError(
-                "URLFetch response too large, URLFetch only supports"
-                "responses up to 32mb in size.",
-                e,
-            )
-
-        except urlfetch.SSLCertificateError as e:
-            raise SSLError(e)
-
-        except urlfetch.InvalidMethodError as e:
-            raise AppEnginePlatformError(
-                "URLFetch does not support method: %s" % method, e
-            )
-
-        http_response = self._urlfetch_response_to_http_response(
-            response, retries=retries, **response_kw
-        )
-
-        # Handle redirect?
-        redirect_location = redirect and http_response.get_redirect_location()
-        if redirect_location:
-            # Check for redirect response
-            if self.urlfetch_retries and retries.raise_on_redirect:
-                raise MaxRetryError(self, url, "too many redirects")
-            else:
-                if http_response.status == 303:
-                    method = "GET"
-
-                try:
-                    retries = retries.increment(
-                        method, url, response=http_response, _pool=self
-                    )
-                except MaxRetryError:
-                    if retries.raise_on_redirect:
-                        raise MaxRetryError(self, url, "too many redirects")
-                    return http_response
-
-                retries.sleep_for_retry(http_response)
-                log.debug("Redirecting %s -> %s", url, redirect_location)
-                redirect_url = urljoin(url, redirect_location)
-                return self.urlopen(
-                    method,
-                    redirect_url,
-                    body,
-                    headers,
-                    retries=retries,
-                    redirect=redirect,
-                    timeout=timeout,
-                    **response_kw
-                )
-
-        # Check if we should retry the HTTP response.
-        has_retry_after = bool(http_response.headers.get("Retry-After"))
-        if retries.is_retry(method, http_response.status, has_retry_after):
-            retries = retries.increment(method, url, response=http_response, _pool=self)
-            log.debug("Retry: %s", url)
-            retries.sleep(http_response)
-            return self.urlopen(
-                method,
-                url,
-                body=body,
-                headers=headers,
-                retries=retries,
-                redirect=redirect,
-                timeout=timeout,
-                **response_kw
-            )
-
-        return http_response
-
-    def _urlfetch_response_to_http_response(self, urlfetch_resp, **response_kw):
-
-        if is_prod_appengine():
-            # Production GAE handles deflate encoding automatically, but does
-            # not remove the encoding header.
-            content_encoding = urlfetch_resp.headers.get("content-encoding")
-
-            if content_encoding == "deflate":
-                del urlfetch_resp.headers["content-encoding"]
-
-        transfer_encoding = urlfetch_resp.headers.get("transfer-encoding")
-        # We have a full response's content,
-        # so let's make sure we don't report ourselves as chunked data.
-        if transfer_encoding == "chunked":
-            encodings = transfer_encoding.split(",")
-            encodings.remove("chunked")
-            urlfetch_resp.headers["transfer-encoding"] = ",".join(encodings)
-
-        original_response = HTTPResponse(
-            # In order for decoding to work, we must present the content as
-            # a file-like object.
-            body=io.BytesIO(urlfetch_resp.content),
-            msg=urlfetch_resp.header_msg,
-            headers=urlfetch_resp.headers,
-            status=urlfetch_resp.status_code,
-            **response_kw
-        )
-
-        return HTTPResponse(
-            body=io.BytesIO(urlfetch_resp.content),
-            headers=urlfetch_resp.headers,
-            status=urlfetch_resp.status_code,
-            original_response=original_response,
-            **response_kw
-        )
-
-    def _get_absolute_timeout(self, timeout):
-        if timeout is Timeout.DEFAULT_TIMEOUT:
-            return None  # Defer to URLFetch's default.
-        if isinstance(timeout, Timeout):
-            if timeout._read is not None or timeout._connect is not None:
-                warnings.warn(
-                    "URLFetch does not support granular timeout settings, "
-                    "reverting to total or default URLFetch timeout.",
-                    AppEnginePlatformWarning,
-                )
-            return timeout.total
-        return timeout
-
-    def _get_retries(self, retries, redirect):
-        if not isinstance(retries, Retry):
-            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)
-
-        if retries.connect or retries.read or retries.redirect:
-            warnings.warn(
-                "URLFetch only supports total retries and does not "
-                "recognize connect, read, or redirect retry parameters.",
-                AppEnginePlatformWarning,
-            )
-
-        return retries
-
-
-# Alias methods from _appengine_environ to maintain public API interface.
-
-is_appengine = _appengine_environ.is_appengine
-is_appengine_sandbox = _appengine_environ.is_appengine_sandbox
-is_local_appengine = _appengine_environ.is_local_appengine
-is_prod_appengine = _appengine_environ.is_prod_appengine
-is_prod_appengine_mvms = _appengine_environ.is_prod_appengine_mvms
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py
deleted file mode 100644
index 471665754..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py
+++ /dev/null
@@ -1,130 +0,0 @@
-"""
-NTLM authenticating pool, contributed by erikcederstran
-
-Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
-"""
-from __future__ import absolute_import
-
-import warnings
-from logging import getLogger
-
-from ntlm import ntlm
-
-from .. import HTTPSConnectionPool
-from ..packages.six.moves.http_client import HTTPSConnection
-
-warnings.warn(
-    "The 'urllib3.contrib.ntlmpool' module is deprecated and will be removed "
-    "in urllib3 v2.0 release, urllib3 is not able to support it properly due "
-    "to reasons listed in issue: https://github.com/urllib3/urllib3/issues/2282. "
-    "If you are a user of this module please comment in the mentioned issue.",
-    DeprecationWarning,
-)
-
-log = getLogger(__name__)
-
-
-class NTLMConnectionPool(HTTPSConnectionPool):
-    """
-    Implements an NTLM authentication version of an urllib3 connection pool
-    """
-
-    scheme = "https"
-
-    def __init__(self, user, pw, authurl, *args, **kwargs):
-        """
-        authurl is a random URL on the server that is protected by NTLM.
-        user is the Windows user, probably in the DOMAIN\\username format.
-        pw is the password for the user.
-        """
-        super(NTLMConnectionPool, self).__init__(*args, **kwargs)
-        self.authurl = authurl
-        self.rawuser = user
-        user_parts = user.split("\\", 1)
-        self.domain = user_parts[0].upper()
-        self.user = user_parts[1]
-        self.pw = pw
-
-    def _new_conn(self):
-        # Performs the NTLM handshake that secures the connection. The socket
-        # must be kept open while requests are performed.
-        self.num_connections += 1
-        log.debug(
-            "Starting NTLM HTTPS connection no. %d: https://%s%s",
-            self.num_connections,
-            self.host,
-            self.authurl,
-        )
-
-        headers = {"Connection": "Keep-Alive"}
-        req_header = "Authorization"
-        resp_header = "www-authenticate"
-
-        conn = HTTPSConnection(host=self.host, port=self.port)
-
-        # Send negotiation message
-        headers[req_header] = "NTLM %s" % ntlm.create_NTLM_NEGOTIATE_MESSAGE(
-            self.rawuser
-        )
-        log.debug("Request headers: %s", headers)
-        conn.request("GET", self.authurl, None, headers)
-        res = conn.getresponse()
-        reshdr = dict(res.headers)
-        log.debug("Response status: %s %s", res.status, res.reason)
-        log.debug("Response headers: %s", reshdr)
-        log.debug("Response data: %s [...]", res.read(100))
-
-        # Remove the reference to the socket, so that it can not be closed by
-        # the response object (we want to keep the socket open)
-        res.fp = None
-
-        # Server should respond with a challenge message
-        auth_header_values = reshdr[resp_header].split(", ")
-        auth_header_value = None
-        for s in auth_header_values:
-            if s[:5] == "NTLM ":
-                auth_header_value = s[5:]
-        if auth_header_value is None:
-            raise Exception(
-                "Unexpected %s response header: %s" % (resp_header, reshdr[resp_header])
-            )
-
-        # Send authentication message
-        ServerChallenge, NegotiateFlags = ntlm.parse_NTLM_CHALLENGE_MESSAGE(
-            auth_header_value
-        )
-        auth_msg = ntlm.create_NTLM_AUTHENTICATE_MESSAGE(
-            ServerChallenge, self.user, self.domain, self.pw, NegotiateFlags
-        )
-        headers[req_header] = "NTLM %s" % auth_msg
-        log.debug("Request headers: %s", headers)
-        conn.request("GET", self.authurl, None, headers)
-        res = conn.getresponse()
-        log.debug("Response status: %s %s", res.status, res.reason)
-        log.debug("Response headers: %s", dict(res.headers))
-        log.debug("Response data: %s [...]", res.read()[:100])
-        if res.status != 200:
-            if res.status == 401:
-                raise Exception("Server rejected request: wrong username or password")
-            raise Exception("Wrong server response: %s %s" % (res.status, res.reason))
-
-        res.fp = None
-        log.debug("Connection established")
-        return conn
-
-    def urlopen(
-        self,
-        method,
-        url,
-        body=None,
-        headers=None,
-        retries=3,
-        redirect=True,
-        assert_same_host=True,
-    ):
-        if headers is None:
-            headers = {}
-        headers["Connection"] = "Keep-Alive"
-        return super(NTLMConnectionPool, self).urlopen(
-            method, url, body, headers, retries, redirect, assert_same_host
-        )
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py
deleted file mode 100644
index 19e4aa97c..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py
+++ /dev/null
@@ -1,518 +0,0 @@
-"""
-TLS with SNI_-support for Python 2. Follow these instructions if you would
-like to verify TLS certificates in Python 2. Note, the default libraries do
-*not* do certificate checking; you need to do additional work to validate
-certificates yourself.
-
-This needs the following packages installed:
-
-* `pyOpenSSL`_ (tested with 16.0.0)
-* `cryptography`_ (minimum 1.3.4, from pyopenssl)
-* `idna`_ (minimum 2.0, from cryptography)
-
-However, pyopenssl depends on cryptography, which depends on idna, so while we
-use all three directly here we end up having relatively few packages required.
-
-You can install them with the following command:
-
-.. code-block:: bash
-
-    $ python -m pip install pyopenssl cryptography idna
-
-To activate certificate checking, call
-:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
-before you begin making HTTP requests. This can be done in a ``sitecustomize``
-module, or at any other time before your application begins using ``urllib3``,
-like this:
-
-.. code-block:: python
-
-    try:
-        import pip._vendor.urllib3.contrib.pyopenssl as pyopenssl
-        pyopenssl.inject_into_urllib3()
-    except ImportError:
-        pass
-
-Now you can use :mod:`urllib3` as you normally would, and it will support SNI
-when the required modules are installed.
-
-Activating this module also has the positive side effect of disabling SSL/TLS
-compression in Python 2 (see `CRIME attack`_).
-
-.. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
-.. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)
-.. _pyopenssl: https://www.pyopenssl.org
-.. _cryptography: https://cryptography.io
-.. _idna: https://github.com/kjd/idna
-"""
-from __future__ import absolute_import
-
-import OpenSSL.crypto
-import OpenSSL.SSL
-from cryptography import x509
-from cryptography.hazmat.backends.openssl import backend as openssl_backend
-
-try:
-    from cryptography.x509 import UnsupportedExtension
-except ImportError:
-    # UnsupportedExtension is gone in cryptography >= 2.1.0
-    class UnsupportedExtension(Exception):
-        pass
-
-
-from io import BytesIO
-from socket import error as SocketError
-from socket import timeout
-
-try:  # Platform-specific: Python 2
-    from socket import _fileobject
-except ImportError:  # Platform-specific: Python 3
-    _fileobject = None
-    from ..packages.backports.makefile import backport_makefile
-
-import logging
-import ssl
-import sys
-import warnings
-
-from .. import util
-from ..packages import six
-from ..util.ssl_ import PROTOCOL_TLS_CLIENT
-
-warnings.warn(
-    "'urllib3.contrib.pyopenssl' module is deprecated and will be removed "
-    "in a future release of urllib3 2.x. Read more in this issue: "
-    "https://github.com/urllib3/urllib3/issues/2680",
-    category=DeprecationWarning,
-    stacklevel=2,
-)
-
-__all__ = ["inject_into_urllib3", "extract_from_urllib3"]
-
-# SNI always works.
-HAS_SNI = True
-
-# Map from urllib3 to PyOpenSSL compatible parameter-values.
-_openssl_versions = {
-    util.PROTOCOL_TLS: OpenSSL.SSL.SSLv23_METHOD,
-    PROTOCOL_TLS_CLIENT: OpenSSL.SSL.SSLv23_METHOD,
-    ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
-}
-
-if hasattr(ssl, "PROTOCOL_SSLv3") and hasattr(OpenSSL.SSL, "SSLv3_METHOD"):
-    _openssl_versions[ssl.PROTOCOL_SSLv3] = OpenSSL.SSL.SSLv3_METHOD
-
-if hasattr(ssl, "PROTOCOL_TLSv1_1") and hasattr(OpenSSL.SSL, "TLSv1_1_METHOD"):
-    _openssl_versions[ssl.PROTOCOL_TLSv1_1] = OpenSSL.SSL.TLSv1_1_METHOD
-
-if hasattr(ssl, "PROTOCOL_TLSv1_2") and hasattr(OpenSSL.SSL, "TLSv1_2_METHOD"):
-    _openssl_versions[ssl.PROTOCOL_TLSv1_2] = OpenSSL.SSL.TLSv1_2_METHOD
-
-
-_stdlib_to_openssl_verify = {
-    ssl.CERT_NONE: OpenSSL.SSL.VERIFY_NONE,
-    ssl.CERT_OPTIONAL: OpenSSL.SSL.VERIFY_PEER,
-    ssl.CERT_REQUIRED: OpenSSL.SSL.VERIFY_PEER
-    + OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT,
-}
-_openssl_to_stdlib_verify = dict((v, k) for k, v in _stdlib_to_openssl_verify.items())
-
-# OpenSSL will only write 16K at a time
-SSL_WRITE_BLOCKSIZE = 16384
-
-orig_util_HAS_SNI = util.HAS_SNI
-orig_util_SSLContext = util.ssl_.SSLContext
-
-
-log = logging.getLogger(__name__)
-
-
-def inject_into_urllib3():
-    "Monkey-patch urllib3 with PyOpenSSL-backed SSL-support."
-
-    _validate_dependencies_met()
-
-    util.SSLContext = PyOpenSSLContext
-    util.ssl_.SSLContext = PyOpenSSLContext
-    util.HAS_SNI = HAS_SNI
-    util.ssl_.HAS_SNI = HAS_SNI
-    util.IS_PYOPENSSL = True
-    util.ssl_.IS_PYOPENSSL = True
-
-
-def extract_from_urllib3():
-    "Undo monkey-patching by :func:`inject_into_urllib3`."
-
-    util.SSLContext = orig_util_SSLContext
-    util.ssl_.SSLContext = orig_util_SSLContext
-    util.HAS_SNI = orig_util_HAS_SNI
-    util.ssl_.HAS_SNI = orig_util_HAS_SNI
-    util.IS_PYOPENSSL = False
-    util.ssl_.IS_PYOPENSSL = False
-
-
-def _validate_dependencies_met():
-    """
-    Verifies that PyOpenSSL's package-level dependencies have been met.
-    Throws `ImportError` if they are not met.
-    """
-    # Method added in `cryptography==1.1`; not available in older versions
-    from cryptography.x509.extensions import Extensions
-
-    if getattr(Extensions, "get_extension_for_class", None) is None:
-        raise ImportError(
-            "'cryptography' module missing required functionality.  "
-            "Try upgrading to v1.3.4 or newer."
-        )
-
-    # pyOpenSSL 0.14 and above use cryptography for OpenSSL bindings. The _x509
-    # attribute is only present on those versions.
-    from OpenSSL.crypto import X509
-
-    x509 = X509()
-    if getattr(x509, "_x509", None) is None:
-        raise ImportError(
-            "'pyOpenSSL' module missing required functionality. "
-            "Try upgrading to v0.14 or newer."
-        )
-
-
-def _dnsname_to_stdlib(name):
-    """
-    Converts a dNSName SubjectAlternativeName field to the form used by the
-    standard library on the given Python version.
-
-    Cryptography produces a dNSName as a unicode string that was idna-decoded
-    from ASCII bytes. We need to idna-encode that string to get it back, and
-    then on Python 3 we also need to convert to unicode via UTF-8 (the stdlib
-    uses PyUnicode_FromStringAndSize on it, which decodes via UTF-8).
-
-    If the name cannot be idna-encoded then we return None signalling that
-    the name given should be skipped.
-    """
-
-    def idna_encode(name):
-        """
-        Borrowed wholesale from the Python Cryptography Project. It turns out
-        that we can't just safely call `idna.encode`: it can explode for
-        wildcard names. This avoids that problem.
-        """
-        from pip._vendor import idna
-
-        try:
-            for prefix in [u"*.", u"."]:
-                if name.startswith(prefix):
-                    name = name[len(prefix) :]
-                    return prefix.encode("ascii") + idna.encode(name)
-            return idna.encode(name)
-        except idna.core.IDNAError:
-            return None
-
-    # Don't send IPv6 addresses through the IDNA encoder.
-    if ":" in name:
-        return name
-
-    name = idna_encode(name)
-    if name is None:
-        return None
-    elif sys.version_info >= (3, 0):
-        name = name.decode("utf-8")
-    return name
-
-
-def get_subj_alt_name(peer_cert):
-    """
-    Given an PyOpenSSL certificate, provides all the subject alternative names.
-    """
-    # Pass the cert to cryptography, which has much better APIs for this.
-    if hasattr(peer_cert, "to_cryptography"):
-        cert = peer_cert.to_cryptography()
-    else:
-        der = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, peer_cert)
-        cert = x509.load_der_x509_certificate(der, openssl_backend)
-
-    # We want to find the SAN extension. Ask Cryptography to locate it (it's
-    # faster than looping in Python)
-    try:
-        ext = cert.extensions.get_extension_for_class(x509.SubjectAlternativeName).value
-    except x509.ExtensionNotFound:
-        # No such extension, return the empty list.
-        return []
-    except (
-        x509.DuplicateExtension,
-        UnsupportedExtension,
-        x509.UnsupportedGeneralNameType,
-        UnicodeError,
-    ) as e:
-        # A problem has been found with the quality of the certificate. Assume
-        # no SAN field is present.
-        log.warning(
-            "A problem was encountered with the certificate that prevented "
-            "urllib3 from finding the SubjectAlternativeName field. This can "
-            "affect certificate validation. The error was %s",
-            e,
-        )
-        return []
-
-    # We want to return dNSName and iPAddress fields. We need to cast the IPs
-    # back to strings because the match_hostname function wants them as
-    # strings.
-    # Sadly the DNS names need to be idna encoded and then, on Python 3, UTF-8
-    # decoded. This is pretty frustrating, but that's what the standard library
-    # does with certificates, and so we need to attempt to do the same.
-    # We also want to skip over names which cannot be idna encoded.
-    names = [
-        ("DNS", name)
-        for name in map(_dnsname_to_stdlib, ext.get_values_for_type(x509.DNSName))
-        if name is not None
-    ]
-    names.extend(
-        ("IP Address", str(name)) for name in ext.get_values_for_type(x509.IPAddress)
-    )
-
-    return names
-
-
-class WrappedSocket(object):
-    """API-compatibility wrapper for Python OpenSSL's Connection-class.
-
-    Note: _makefile_refs, _drop() and _reuse() are needed for the garbage
-    collector of pypy.
-    """
-
-    def __init__(self, connection, socket, suppress_ragged_eofs=True):
-        self.connection = connection
-        self.socket = socket
-        self.suppress_ragged_eofs = suppress_ragged_eofs
-        self._makefile_refs = 0
-        self._closed = False
-
-    def fileno(self):
-        return self.socket.fileno()
-
-    # Copy-pasted from Python 3.5 source code
-    def _decref_socketios(self):
-        if self._makefile_refs > 0:
-            self._makefile_refs -= 1
-        if self._closed:
-            self.close()
-
-    def recv(self, *args, **kwargs):
-        try:
-            data = self.connection.recv(*args, **kwargs)
-        except OpenSSL.SSL.SysCallError as e:
-            if self.suppress_ragged_eofs and e.args == (-1, "Unexpected EOF"):
-                return b""
-            else:
-                raise SocketError(str(e))
-        except OpenSSL.SSL.ZeroReturnError:
-            if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
-                return b""
-            else:
-                raise
-        except OpenSSL.SSL.WantReadError:
-            if not util.wait_for_read(self.socket, self.socket.gettimeout()):
-                raise timeout("The read operation timed out")
-            else:
-                return self.recv(*args, **kwargs)
-
-        # TLS 1.3 post-handshake authentication
-        except OpenSSL.SSL.Error as e:
-            raise ssl.SSLError("read error: %r" % e)
-        else:
-            return data
-
-    def recv_into(self, *args, **kwargs):
-        try:
-            return self.connection.recv_into(*args, **kwargs)
-        except OpenSSL.SSL.SysCallError as e:
-            if self.suppress_ragged_eofs and e.args == (-1, "Unexpected EOF"):
-                return 0
-            else:
-                raise SocketError(str(e))
-        except OpenSSL.SSL.ZeroReturnError:
-            if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
-                return 0
-            else:
-                raise
-        except OpenSSL.SSL.WantReadError:
-            if not util.wait_for_read(self.socket, self.socket.gettimeout()):
-                raise timeout("The read operation timed out")
-            else:
-                return self.recv_into(*args, **kwargs)
-
-        # TLS 1.3 post-handshake authentication
-        except OpenSSL.SSL.Error as e:
-            raise ssl.SSLError("read error: %r" % e)
-
-    def settimeout(self, timeout):
-        return self.socket.settimeout(timeout)
-
-    def _send_until_done(self, data):
-        while True:
-            try:
-                return self.connection.send(data)
-            except OpenSSL.SSL.WantWriteError:
-                if not util.wait_for_write(self.socket, self.socket.gettimeout()):
-                    raise timeout()
-                continue
-            except OpenSSL.SSL.SysCallError as e:
-                raise SocketError(str(e))
-
-    def sendall(self, data):
-        total_sent = 0
-        while total_sent < len(data):
-            sent = self._send_until_done(
-                data[total_sent : total_sent + SSL_WRITE_BLOCKSIZE]
-            )
-            total_sent += sent
-
-    def shutdown(self):
-        # FIXME rethrow compatible exceptions should we ever use this
-        self.connection.shutdown()
-
-    def close(self):
-        if self._makefile_refs < 1:
-            try:
-                self._closed = True
-                return self.connection.close()
-            except OpenSSL.SSL.Error:
-                return
-        else:
-            self._makefile_refs -= 1
-
-    def getpeercert(self, binary_form=False):
-        x509 = self.connection.get_peer_certificate()
-
-        if not x509:
-            return x509
-
-        if binary_form:
-            return OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, x509)
-
-        return {
-            "subject": ((("commonName", x509.get_subject().CN),),),
-            "subjectAltName": get_subj_alt_name(x509),
-        }
-
-    def version(self):
-        return self.connection.get_protocol_version_name()
-
-    def _reuse(self):
-        self._makefile_refs += 1
-
-    def _drop(self):
-        if self._makefile_refs < 1:
-            self.close()
-        else:
-            self._makefile_refs -= 1
-
-
-if _fileobject:  # Platform-specific: Python 2
-
-    def makefile(self, mode, bufsize=-1):
-        self._makefile_refs += 1
-        return _fileobject(self, mode, bufsize, close=True)
-
-else:  # Platform-specific: Python 3
-    makefile = backport_makefile
-
-WrappedSocket.makefile = makefile
-
-
-class PyOpenSSLContext(object):
-    """
-    I am a wrapper class for the PyOpenSSL ``Context`` object. I am responsible
-    for translating the interface of the standard library ``SSLContext`` object
-    to calls into PyOpenSSL.
-    """
-
-    def __init__(self, protocol):
-        self.protocol = _openssl_versions[protocol]
-        self._ctx = OpenSSL.SSL.Context(self.protocol)
-        self._options = 0
-        self.check_hostname = False
-
-    @property
-    def options(self):
-        return self._options
-
-    @options.setter
-    def options(self, value):
-        self._options = value
-        self._ctx.set_options(value)
-
-    @property
-    def verify_mode(self):
-        return _openssl_to_stdlib_verify[self._ctx.get_verify_mode()]
-
-    @verify_mode.setter
-    def verify_mode(self, value):
-        self._ctx.set_verify(_stdlib_to_openssl_verify[value], _verify_callback)
-
-    def set_default_verify_paths(self):
-        self._ctx.set_default_verify_paths()
-
-    def set_ciphers(self, ciphers):
-        if isinstance(ciphers, six.text_type):
-            ciphers = ciphers.encode("utf-8")
-        self._ctx.set_cipher_list(ciphers)
-
-    def load_verify_locations(self, cafile=None, capath=None, cadata=None):
-        if cafile is not None:
-            cafile = cafile.encode("utf-8")
-        if capath is not None:
-            capath = capath.encode("utf-8")
-        try:
-            self._ctx.load_verify_locations(cafile, capath)
-            if cadata is not None:
-                self._ctx.load_verify_locations(BytesIO(cadata))
-        except OpenSSL.SSL.Error as e:
-            raise ssl.SSLError("unable to load trusted certificates: %r" % e)
-
-    def load_cert_chain(self, certfile, keyfile=None, password=None):
-        self._ctx.use_certificate_chain_file(certfile)
-        if password is not None:
-            if not isinstance(password, six.binary_type):
-                password = password.encode("utf-8")
-            self._ctx.set_passwd_cb(lambda *_: password)
-        self._ctx.use_privatekey_file(keyfile or certfile)
-
-    def set_alpn_protocols(self, protocols):
-        protocols = [six.ensure_binary(p) for p in protocols]
-        return self._ctx.set_alpn_protos(protocols)
-
-    def wrap_socket(
-        self,
-        sock,
-        server_side=False,
-        do_handshake_on_connect=True,
-        suppress_ragged_eofs=True,
-        server_hostname=None,
-    ):
-        cnx = OpenSSL.SSL.Connection(self._ctx, sock)
-
-        if isinstance(server_hostname, six.text_type):  # Platform-specific: Python 3
-            server_hostname = server_hostname.encode("utf-8")
-
-        if server_hostname is not None:
-            cnx.set_tlsext_host_name(server_hostname)
-
-        cnx.set_connect_state()
-
-        while True:
-            try:
-                cnx.do_handshake()
-            except OpenSSL.SSL.WantReadError:
-                if not util.wait_for_read(sock, sock.gettimeout()):
-                    raise timeout("select timed out")
-                continue
-            except OpenSSL.SSL.Error as e:
-                raise ssl.SSLError("bad handshake: %r" % e)
-            break
-
-        return WrappedSocket(cnx, sock)
-
-
-def _verify_callback(cnx, x509, err_no, err_depth, return_code):
-    return err_no == 0
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py
deleted file mode 100644
index 722ee4e12..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py
+++ /dev/null
@@ -1,920 +0,0 @@
-"""
-SecureTranport support for urllib3 via ctypes.
-
-This makes platform-native TLS available to urllib3 users on macOS without the
-use of a compiler. This is an important feature because the Python Package
-Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
-that ships with macOS is not capable of doing TLSv1.2. The only way to resolve
-this is to give macOS users an alternative solution to the problem, and that
-solution is to use SecureTransport.
-
-We use ctypes here because this solution must not require a compiler. That's
-because pip is not allowed to require a compiler either.
-
-This is not intended to be a seriously long-term solution to this problem.
-The hope is that PEP 543 will eventually solve this issue for us, at which
-point we can retire this contrib module. But in the short term, we need to
-solve the impending tire fire that is Python on Mac without this kind of
-contrib module. So...here we are.
-
-To use this module, simply import and inject it::
-
-    import pip._vendor.urllib3.contrib.securetransport as securetransport
-    securetransport.inject_into_urllib3()
-
-Happy TLSing!
-
-This code is a bastardised version of the code found in Will Bond's oscrypto
-library. An enormous debt is owed to him for blazing this trail for us. For
-that reason, this code should be considered to be covered both by urllib3's
-license and by oscrypto's:
-
-.. code-block::
-
-    Copyright (c) 2015-2016 Will Bond 
-
-    Permission is hereby granted, free of charge, to any person obtaining a
-    copy of this software and associated documentation files (the "Software"),
-    to deal in the Software without restriction, including without limitation
-    the rights to use, copy, modify, merge, publish, distribute, sublicense,
-    and/or sell copies of the Software, and to permit persons to whom the
-    Software is furnished to do so, subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be included in
-    all copies or substantial portions of the Software.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-    DEALINGS IN THE SOFTWARE.
-"""
-from __future__ import absolute_import
-
-import contextlib
-import ctypes
-import errno
-import os.path
-import shutil
-import socket
-import ssl
-import struct
-import threading
-import weakref
-
-from .. import util
-from ..packages import six
-from ..util.ssl_ import PROTOCOL_TLS_CLIENT
-from ._securetransport.bindings import CoreFoundation, Security, SecurityConst
-from ._securetransport.low_level import (
-    _assert_no_error,
-    _build_tls_unknown_ca_alert,
-    _cert_array_from_pem,
-    _create_cfstring_array,
-    _load_client_cert_chain,
-    _temporary_keychain,
-)
-
-try:  # Platform-specific: Python 2
-    from socket import _fileobject
-except ImportError:  # Platform-specific: Python 3
-    _fileobject = None
-    from ..packages.backports.makefile import backport_makefile
-
-__all__ = ["inject_into_urllib3", "extract_from_urllib3"]
-
-# SNI always works
-HAS_SNI = True
-
-orig_util_HAS_SNI = util.HAS_SNI
-orig_util_SSLContext = util.ssl_.SSLContext
-
-# This dictionary is used by the read callback to obtain a handle to the
-# calling wrapped socket. This is a pretty silly approach, but for now it'll
-# do. I feel like I should be able to smuggle a handle to the wrapped socket
-# directly in the SSLConnectionRef, but for now this approach will work I
-# guess.
-#
-# We need to lock around this structure for inserts, but we don't do it for
-# reads/writes in the callbacks. The reasoning here goes as follows:
-#
-#    1. It is not possible to call into the callbacks before the dictionary is
-#       populated, so once in the callback the id must be in the dictionary.
-#    2. The callbacks don't mutate the dictionary, they only read from it, and
-#       so cannot conflict with any of the insertions.
-#
-# This is good: if we had to lock in the callbacks we'd drastically slow down
-# the performance of this code.
-_connection_refs = weakref.WeakValueDictionary()
-_connection_ref_lock = threading.Lock()
-
-# Limit writes to 16kB. This is OpenSSL's limit, but we'll cargo-cult it over
-# for no better reason than we need *a* limit, and this one is right there.
-SSL_WRITE_BLOCKSIZE = 16384
-
-# This is our equivalent of util.ssl_.DEFAULT_CIPHERS, but expanded out to
-# individual cipher suites. We need to do this because this is how
-# SecureTransport wants them.
-CIPHER_SUITES = [
-    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
-    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
-    SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
-    SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
-    SecurityConst.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
-    SecurityConst.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
-    SecurityConst.TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
-    SecurityConst.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
-    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
-    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
-    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
-    SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
-    SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
-    SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
-    SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
-    SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
-    SecurityConst.TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
-    SecurityConst.TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
-    SecurityConst.TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
-    SecurityConst.TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
-    SecurityConst.TLS_AES_256_GCM_SHA384,
-    SecurityConst.TLS_AES_128_GCM_SHA256,
-    SecurityConst.TLS_RSA_WITH_AES_256_GCM_SHA384,
-    SecurityConst.TLS_RSA_WITH_AES_128_GCM_SHA256,
-    SecurityConst.TLS_AES_128_CCM_8_SHA256,
-    SecurityConst.TLS_AES_128_CCM_SHA256,
-    SecurityConst.TLS_RSA_WITH_AES_256_CBC_SHA256,
-    SecurityConst.TLS_RSA_WITH_AES_128_CBC_SHA256,
-    SecurityConst.TLS_RSA_WITH_AES_256_CBC_SHA,
-    SecurityConst.TLS_RSA_WITH_AES_128_CBC_SHA,
-]
-
-# Basically this is simple: for PROTOCOL_SSLv23 we turn it into a low of
-# TLSv1 and a high of TLSv1.2. For everything else, we pin to that version.
-# TLSv1 to 1.2 are supported on macOS 10.8+
-_protocol_to_min_max = {
-    util.PROTOCOL_TLS: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12),
-    PROTOCOL_TLS_CLIENT: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12),
-}
-
-if hasattr(ssl, "PROTOCOL_SSLv2"):
-    _protocol_to_min_max[ssl.PROTOCOL_SSLv2] = (
-        SecurityConst.kSSLProtocol2,
-        SecurityConst.kSSLProtocol2,
-    )
-if hasattr(ssl, "PROTOCOL_SSLv3"):
-    _protocol_to_min_max[ssl.PROTOCOL_SSLv3] = (
-        SecurityConst.kSSLProtocol3,
-        SecurityConst.kSSLProtocol3,
-    )
-if hasattr(ssl, "PROTOCOL_TLSv1"):
-    _protocol_to_min_max[ssl.PROTOCOL_TLSv1] = (
-        SecurityConst.kTLSProtocol1,
-        SecurityConst.kTLSProtocol1,
-    )
-if hasattr(ssl, "PROTOCOL_TLSv1_1"):
-    _protocol_to_min_max[ssl.PROTOCOL_TLSv1_1] = (
-        SecurityConst.kTLSProtocol11,
-        SecurityConst.kTLSProtocol11,
-    )
-if hasattr(ssl, "PROTOCOL_TLSv1_2"):
-    _protocol_to_min_max[ssl.PROTOCOL_TLSv1_2] = (
-        SecurityConst.kTLSProtocol12,
-        SecurityConst.kTLSProtocol12,
-    )
-
-
-def inject_into_urllib3():
-    """
-    Monkey-patch urllib3 with SecureTransport-backed SSL-support.
-    """
-    util.SSLContext = SecureTransportContext
-    util.ssl_.SSLContext = SecureTransportContext
-    util.HAS_SNI = HAS_SNI
-    util.ssl_.HAS_SNI = HAS_SNI
-    util.IS_SECURETRANSPORT = True
-    util.ssl_.IS_SECURETRANSPORT = True
-
-
-def extract_from_urllib3():
-    """
-    Undo monkey-patching by :func:`inject_into_urllib3`.
-    """
-    util.SSLContext = orig_util_SSLContext
-    util.ssl_.SSLContext = orig_util_SSLContext
-    util.HAS_SNI = orig_util_HAS_SNI
-    util.ssl_.HAS_SNI = orig_util_HAS_SNI
-    util.IS_SECURETRANSPORT = False
-    util.ssl_.IS_SECURETRANSPORT = False
-
-
-def _read_callback(connection_id, data_buffer, data_length_pointer):
-    """
-    SecureTransport read callback. This is called by ST to request that data
-    be returned from the socket.
-    """
-    wrapped_socket = None
-    try:
-        wrapped_socket = _connection_refs.get(connection_id)
-        if wrapped_socket is None:
-            return SecurityConst.errSSLInternal
-        base_socket = wrapped_socket.socket
-
-        requested_length = data_length_pointer[0]
-
-        timeout = wrapped_socket.gettimeout()
-        error = None
-        read_count = 0
-
-        try:
-            while read_count < requested_length:
-                if timeout is None or timeout >= 0:
-                    if not util.wait_for_read(base_socket, timeout):
-                        raise socket.error(errno.EAGAIN, "timed out")
-
-                remaining = requested_length - read_count
-                buffer = (ctypes.c_char * remaining).from_address(
-                    data_buffer + read_count
-                )
-                chunk_size = base_socket.recv_into(buffer, remaining)
-                read_count += chunk_size
-                if not chunk_size:
-                    if not read_count:
-                        return SecurityConst.errSSLClosedGraceful
-                    break
-        except (socket.error) as e:
-            error = e.errno
-
-            if error is not None and error != errno.EAGAIN:
-                data_length_pointer[0] = read_count
-                if error == errno.ECONNRESET or error == errno.EPIPE:
-                    return SecurityConst.errSSLClosedAbort
-                raise
-
-        data_length_pointer[0] = read_count
-
-        if read_count != requested_length:
-            return SecurityConst.errSSLWouldBlock
-
-        return 0
-    except Exception as e:
-        if wrapped_socket is not None:
-            wrapped_socket._exception = e
-        return SecurityConst.errSSLInternal
-
-
-def _write_callback(connection_id, data_buffer, data_length_pointer):
-    """
-    SecureTransport write callback. This is called by ST to request that data
-    actually be sent on the network.
-    """
-    wrapped_socket = None
-    try:
-        wrapped_socket = _connection_refs.get(connection_id)
-        if wrapped_socket is None:
-            return SecurityConst.errSSLInternal
-        base_socket = wrapped_socket.socket
-
-        bytes_to_write = data_length_pointer[0]
-        data = ctypes.string_at(data_buffer, bytes_to_write)
-
-        timeout = wrapped_socket.gettimeout()
-        error = None
-        sent = 0
-
-        try:
-            while sent < bytes_to_write:
-                if timeout is None or timeout >= 0:
-                    if not util.wait_for_write(base_socket, timeout):
-                        raise socket.error(errno.EAGAIN, "timed out")
-                chunk_sent = base_socket.send(data)
-                sent += chunk_sent
-
-                # This has some needless copying here, but I'm not sure there's
-                # much value in optimising this data path.
-                data = data[chunk_sent:]
-        except (socket.error) as e:
-            error = e.errno
-
-            if error is not None and error != errno.EAGAIN:
-                data_length_pointer[0] = sent
-                if error == errno.ECONNRESET or error == errno.EPIPE:
-                    return SecurityConst.errSSLClosedAbort
-                raise
-
-        data_length_pointer[0] = sent
-
-        if sent != bytes_to_write:
-            return SecurityConst.errSSLWouldBlock
-
-        return 0
-    except Exception as e:
-        if wrapped_socket is not None:
-            wrapped_socket._exception = e
-        return SecurityConst.errSSLInternal
-
-
-# We need to keep these two objects references alive: if they get GC'd while
-# in use then SecureTransport could attempt to call a function that is in freed
-# memory. That would be...uh...bad. Yeah, that's the word. Bad.
-_read_callback_pointer = Security.SSLReadFunc(_read_callback)
-_write_callback_pointer = Security.SSLWriteFunc(_write_callback)
-
-
-class WrappedSocket(object):
-    """
-    API-compatibility wrapper for Python's OpenSSL wrapped socket object.
-
-    Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage
-    collector of PyPy.
-    """
-
-    def __init__(self, socket):
-        self.socket = socket
-        self.context = None
-        self._makefile_refs = 0
-        self._closed = False
-        self._exception = None
-        self._keychain = None
-        self._keychain_dir = None
-        self._client_cert_chain = None
-
-        # We save off the previously-configured timeout and then set it to
-        # zero. This is done because we use select and friends to handle the
-        # timeouts, but if we leave the timeout set on the lower socket then
-        # Python will "kindly" call select on that socket again for us. Avoid
-        # that by forcing the timeout to zero.
-        self._timeout = self.socket.gettimeout()
-        self.socket.settimeout(0)
-
-    @contextlib.contextmanager
-    def _raise_on_error(self):
-        """
-        A context manager that can be used to wrap calls that do I/O from
-        SecureTransport. If any of the I/O callbacks hit an exception, this
-        context manager will correctly propagate the exception after the fact.
-        This avoids silently swallowing those exceptions.
-
-        It also correctly forces the socket closed.
-        """
-        self._exception = None
-
-        # We explicitly don't catch around this yield because in the unlikely
-        # event that an exception was hit in the block we don't want to swallow
-        # it.
-        yield
-        if self._exception is not None:
-            exception, self._exception = self._exception, None
-            self.close()
-            raise exception
-
-    def _set_ciphers(self):
-        """
-        Sets up the allowed ciphers. By default this matches the set in
-        util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done
-        custom and doesn't allow changing at this time, mostly because parsing
-        OpenSSL cipher strings is going to be a freaking nightmare.
-        """
-        ciphers = (Security.SSLCipherSuite * len(CIPHER_SUITES))(*CIPHER_SUITES)
-        result = Security.SSLSetEnabledCiphers(
-            self.context, ciphers, len(CIPHER_SUITES)
-        )
-        _assert_no_error(result)
-
-    def _set_alpn_protocols(self, protocols):
-        """
-        Sets up the ALPN protocols on the context.
-        """
-        if not protocols:
-            return
-        protocols_arr = _create_cfstring_array(protocols)
-        try:
-            result = Security.SSLSetALPNProtocols(self.context, protocols_arr)
-            _assert_no_error(result)
-        finally:
-            CoreFoundation.CFRelease(protocols_arr)
-
-    def _custom_validate(self, verify, trust_bundle):
-        """
-        Called when we have set custom validation. We do this in two cases:
-        first, when cert validation is entirely disabled; and second, when
-        using a custom trust DB.
-        Raises an SSLError if the connection is not trusted.
-        """
-        # If we disabled cert validation, just say: cool.
-        if not verify:
-            return
-
-        successes = (
-            SecurityConst.kSecTrustResultUnspecified,
-            SecurityConst.kSecTrustResultProceed,
-        )
-        try:
-            trust_result = self._evaluate_trust(trust_bundle)
-            if trust_result in successes:
-                return
-            reason = "error code: %d" % (trust_result,)
-        except Exception as e:
-            # Do not trust on error
-            reason = "exception: %r" % (e,)
-
-        # SecureTransport does not send an alert nor shuts down the connection.
-        rec = _build_tls_unknown_ca_alert(self.version())
-        self.socket.sendall(rec)
-        # close the connection immediately
-        # l_onoff = 1, activate linger
-        # l_linger = 0, linger for 0 seoncds
-        opts = struct.pack("ii", 1, 0)
-        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, opts)
-        self.close()
-        raise ssl.SSLError("certificate verify failed, %s" % reason)
-
-    def _evaluate_trust(self, trust_bundle):
-        # We want data in memory, so load it up.
-        if os.path.isfile(trust_bundle):
-            with open(trust_bundle, "rb") as f:
-                trust_bundle = f.read()
-
-        cert_array = None
-        trust = Security.SecTrustRef()
-
-        try:
-            # Get a CFArray that contains the certs we want.
-            cert_array = _cert_array_from_pem(trust_bundle)
-
-            # Ok, now the hard part. We want to get the SecTrustRef that ST has
-            # created for this connection, shove our CAs into it, tell ST to
-            # ignore everything else it knows, and then ask if it can build a
-            # chain. This is a buuuunch of code.
-            result = Security.SSLCopyPeerTrust(self.context, ctypes.byref(trust))
-            _assert_no_error(result)
-            if not trust:
-                raise ssl.SSLError("Failed to copy trust reference")
-
-            result = Security.SecTrustSetAnchorCertificates(trust, cert_array)
-            _assert_no_error(result)
-
-            result = Security.SecTrustSetAnchorCertificatesOnly(trust, True)
-            _assert_no_error(result)
-
-            trust_result = Security.SecTrustResultType()
-            result = Security.SecTrustEvaluate(trust, ctypes.byref(trust_result))
-            _assert_no_error(result)
-        finally:
-            if trust:
-                CoreFoundation.CFRelease(trust)
-
-            if cert_array is not None:
-                CoreFoundation.CFRelease(cert_array)
-
-        return trust_result.value
-
-    def handshake(
-        self,
-        server_hostname,
-        verify,
-        trust_bundle,
-        min_version,
-        max_version,
-        client_cert,
-        client_key,
-        client_key_passphrase,
-        alpn_protocols,
-    ):
-        """
-        Actually performs the TLS handshake. This is run automatically by
-        wrapped socket, and shouldn't be needed in user code.
-        """
-        # First, we do the initial bits of connection setup. We need to create
-        # a context, set its I/O funcs, and set the connection reference.
-        self.context = Security.SSLCreateContext(
-            None, SecurityConst.kSSLClientSide, SecurityConst.kSSLStreamType
-        )
-        result = Security.SSLSetIOFuncs(
-            self.context, _read_callback_pointer, _write_callback_pointer
-        )
-        _assert_no_error(result)
-
-        # Here we need to compute the handle to use. We do this by taking the
-        # id of self modulo 2**31 - 1. If this is already in the dictionary, we
-        # just keep incrementing by one until we find a free space.
-        with _connection_ref_lock:
-            handle = id(self) % 2147483647
-            while handle in _connection_refs:
-                handle = (handle + 1) % 2147483647
-            _connection_refs[handle] = self
-
-        result = Security.SSLSetConnection(self.context, handle)
-        _assert_no_error(result)
-
-        # If we have a server hostname, we should set that too.
-        if server_hostname:
-            if not isinstance(server_hostname, bytes):
-                server_hostname = server_hostname.encode("utf-8")
-
-            result = Security.SSLSetPeerDomainName(
-                self.context, server_hostname, len(server_hostname)
-            )
-            _assert_no_error(result)
-
-        # Setup the ciphers.
-        self._set_ciphers()
-
-        # Setup the ALPN protocols.
-        self._set_alpn_protocols(alpn_protocols)
-
-        # Set the minimum and maximum TLS versions.
-        result = Security.SSLSetProtocolVersionMin(self.context, min_version)
-        _assert_no_error(result)
-
-        result = Security.SSLSetProtocolVersionMax(self.context, max_version)
-        _assert_no_error(result)
-
-        # If there's a trust DB, we need to use it. We do that by telling
-        # SecureTransport to break on server auth. We also do that if we don't
-        # want to validate the certs at all: we just won't actually do any
-        # authing in that case.
-        if not verify or trust_bundle is not None:
-            result = Security.SSLSetSessionOption(
-                self.context, SecurityConst.kSSLSessionOptionBreakOnServerAuth, True
-            )
-            _assert_no_error(result)
-
-        # If there's a client cert, we need to use it.
-        if client_cert:
-            self._keychain, self._keychain_dir = _temporary_keychain()
-            self._client_cert_chain = _load_client_cert_chain(
-                self._keychain, client_cert, client_key
-            )
-            result = Security.SSLSetCertificate(self.context, self._client_cert_chain)
-            _assert_no_error(result)
-
-        while True:
-            with self._raise_on_error():
-                result = Security.SSLHandshake(self.context)
-
-                if result == SecurityConst.errSSLWouldBlock:
-                    raise socket.timeout("handshake timed out")
-                elif result == SecurityConst.errSSLServerAuthCompleted:
-                    self._custom_validate(verify, trust_bundle)
-                    continue
-                else:
-                    _assert_no_error(result)
-                    break
-
-    def fileno(self):
-        return self.socket.fileno()
-
-    # Copy-pasted from Python 3.5 source code
-    def _decref_socketios(self):
-        if self._makefile_refs > 0:
-            self._makefile_refs -= 1
-        if self._closed:
-            self.close()
-
-    def recv(self, bufsiz):
-        buffer = ctypes.create_string_buffer(bufsiz)
-        bytes_read = self.recv_into(buffer, bufsiz)
-        data = buffer[:bytes_read]
-        return data
-
-    def recv_into(self, buffer, nbytes=None):
-        # Read short on EOF.
-        if self._closed:
-            return 0
-
-        if nbytes is None:
-            nbytes = len(buffer)
-
-        buffer = (ctypes.c_char * nbytes).from_buffer(buffer)
-        processed_bytes = ctypes.c_size_t(0)
-
-        with self._raise_on_error():
-            result = Security.SSLRead(
-                self.context, buffer, nbytes, ctypes.byref(processed_bytes)
-            )
-
-        # There are some result codes that we want to treat as "not always
-        # errors". Specifically, those are errSSLWouldBlock,
-        # errSSLClosedGraceful, and errSSLClosedNoNotify.
-        if result == SecurityConst.errSSLWouldBlock:
-            # If we didn't process any bytes, then this was just a time out.
-            # However, we can get errSSLWouldBlock in situations when we *did*
-            # read some data, and in those cases we should just read "short"
-            # and return.
-            if processed_bytes.value == 0:
-                # Timed out, no data read.
-                raise socket.timeout("recv timed out")
-        elif result in (
-            SecurityConst.errSSLClosedGraceful,
-            SecurityConst.errSSLClosedNoNotify,
-        ):
-            # The remote peer has closed this connection. We should do so as
-            # well. Note that we don't actually return here because in
-            # principle this could actually be fired along with return data.
-            # It's unlikely though.
-            self.close()
-        else:
-            _assert_no_error(result)
-
-        # Ok, we read and probably succeeded. We should return whatever data
-        # was actually read.
-        return processed_bytes.value
-
-    def settimeout(self, timeout):
-        self._timeout = timeout
-
-    def gettimeout(self):
-        return self._timeout
-
-    def send(self, data):
-        processed_bytes = ctypes.c_size_t(0)
-
-        with self._raise_on_error():
-            result = Security.SSLWrite(
-                self.context, data, len(data), ctypes.byref(processed_bytes)
-            )
-
-        if result == SecurityConst.errSSLWouldBlock and processed_bytes.value == 0:
-            # Timed out
-            raise socket.timeout("send timed out")
-        else:
-            _assert_no_error(result)
-
-        # We sent, and probably succeeded. Tell them how much we sent.
-        return processed_bytes.value
-
-    def sendall(self, data):
-        total_sent = 0
-        while total_sent < len(data):
-            sent = self.send(data[total_sent : total_sent + SSL_WRITE_BLOCKSIZE])
-            total_sent += sent
-
-    def shutdown(self):
-        with self._raise_on_error():
-            Security.SSLClose(self.context)
-
-    def close(self):
-        # TODO: should I do clean shutdown here? Do I have to?
-        if self._makefile_refs < 1:
-            self._closed = True
-            if self.context:
-                CoreFoundation.CFRelease(self.context)
-                self.context = None
-            if self._client_cert_chain:
-                CoreFoundation.CFRelease(self._client_cert_chain)
-                self._client_cert_chain = None
-            if self._keychain:
-                Security.SecKeychainDelete(self._keychain)
-                CoreFoundation.CFRelease(self._keychain)
-                shutil.rmtree(self._keychain_dir)
-                self._keychain = self._keychain_dir = None
-            return self.socket.close()
-        else:
-            self._makefile_refs -= 1
-
-    def getpeercert(self, binary_form=False):
-        # Urgh, annoying.
-        #
-        # Here's how we do this:
-        #
-        # 1. Call SSLCopyPeerTrust to get hold of the trust object for this
-        #    connection.
-        # 2. Call SecTrustGetCertificateAtIndex for index 0 to get the leaf.
-        # 3. To get the CN, call SecCertificateCopyCommonName and process that
-        #    string so that it's of the appropriate type.
-        # 4. To get the SAN, we need to do something a bit more complex:
-        #    a. Call SecCertificateCopyValues to get the data, requesting
-        #       kSecOIDSubjectAltName.
-        #    b. Mess about with this dictionary to try to get the SANs out.
-        #
-        # This is gross. Really gross. It's going to be a few hundred LoC extra
-        # just to repeat something that SecureTransport can *already do*. So my
-        # operating assumption at this time is that what we want to do is
-        # instead to just flag to urllib3 that it shouldn't do its own hostname
-        # validation when using SecureTransport.
-        if not binary_form:
-            raise ValueError("SecureTransport only supports dumping binary certs")
-        trust = Security.SecTrustRef()
-        certdata = None
-        der_bytes = None
-
-        try:
-            # Grab the trust store.
-            result = Security.SSLCopyPeerTrust(self.context, ctypes.byref(trust))
-            _assert_no_error(result)
-            if not trust:
-                # Probably we haven't done the handshake yet. No biggie.
-                return None
-
-            cert_count = Security.SecTrustGetCertificateCount(trust)
-            if not cert_count:
-                # Also a case that might happen if we haven't handshaked.
-                # Handshook? Handshaken?
-                return None
-
-            leaf = Security.SecTrustGetCertificateAtIndex(trust, 0)
-            assert leaf
-
-            # Ok, now we want the DER bytes.
-            certdata = Security.SecCertificateCopyData(leaf)
-            assert certdata
-
-            data_length = CoreFoundation.CFDataGetLength(certdata)
-            data_buffer = CoreFoundation.CFDataGetBytePtr(certdata)
-            der_bytes = ctypes.string_at(data_buffer, data_length)
-        finally:
-            if certdata:
-                CoreFoundation.CFRelease(certdata)
-            if trust:
-                CoreFoundation.CFRelease(trust)
-
-        return der_bytes
-
-    def version(self):
-        protocol = Security.SSLProtocol()
-        result = Security.SSLGetNegotiatedProtocolVersion(
-            self.context, ctypes.byref(protocol)
-        )
-        _assert_no_error(result)
-        if protocol.value == SecurityConst.kTLSProtocol13:
-            raise ssl.SSLError("SecureTransport does not support TLS 1.3")
-        elif protocol.value == SecurityConst.kTLSProtocol12:
-            return "TLSv1.2"
-        elif protocol.value == SecurityConst.kTLSProtocol11:
-            return "TLSv1.1"
-        elif protocol.value == SecurityConst.kTLSProtocol1:
-            return "TLSv1"
-        elif protocol.value == SecurityConst.kSSLProtocol3:
-            return "SSLv3"
-        elif protocol.value == SecurityConst.kSSLProtocol2:
-            return "SSLv2"
-        else:
-            raise ssl.SSLError("Unknown TLS version: %r" % protocol)
-
-    def _reuse(self):
-        self._makefile_refs += 1
-
-    def _drop(self):
-        if self._makefile_refs < 1:
-            self.close()
-        else:
-            self._makefile_refs -= 1
-
-
-if _fileobject:  # Platform-specific: Python 2
-
-    def makefile(self, mode, bufsize=-1):
-        self._makefile_refs += 1
-        return _fileobject(self, mode, bufsize, close=True)
-
-else:  # Platform-specific: Python 3
-
-    def makefile(self, mode="r", buffering=None, *args, **kwargs):
-        # We disable buffering with SecureTransport because it conflicts with
-        # the buffering that ST does internally (see issue #1153 for more).
-        buffering = 0
-        return backport_makefile(self, mode, buffering, *args, **kwargs)
-
-
-WrappedSocket.makefile = makefile
-
-
-class SecureTransportContext(object):
-    """
-    I am a wrapper class for the SecureTransport library, to translate the
-    interface of the standard library ``SSLContext`` object to calls into
-    SecureTransport.
-    """
-
-    def __init__(self, protocol):
-        self._min_version, self._max_version = _protocol_to_min_max[protocol]
-        self._options = 0
-        self._verify = False
-        self._trust_bundle = None
-        self._client_cert = None
-        self._client_key = None
-        self._client_key_passphrase = None
-        self._alpn_protocols = None
-
-    @property
-    def check_hostname(self):
-        """
-        SecureTransport cannot have its hostname checking disabled. For more,
-        see the comment on getpeercert() in this file.
-        """
-        return True
-
-    @check_hostname.setter
-    def check_hostname(self, value):
-        """
-        SecureTransport cannot have its hostname checking disabled. For more,
-        see the comment on getpeercert() in this file.
-        """
-        pass
-
-    @property
-    def options(self):
-        # TODO: Well, crap.
-        #
-        # So this is the bit of the code that is the most likely to cause us
-        # trouble. Essentially we need to enumerate all of the SSL options that
-        # users might want to use and try to see if we can sensibly translate
-        # them, or whether we should just ignore them.
-        return self._options
-
-    @options.setter
-    def options(self, value):
-        # TODO: Update in line with above.
-        self._options = value
-
-    @property
-    def verify_mode(self):
-        return ssl.CERT_REQUIRED if self._verify else ssl.CERT_NONE
-
-    @verify_mode.setter
-    def verify_mode(self, value):
-        self._verify = True if value == ssl.CERT_REQUIRED else False
-
-    def set_default_verify_paths(self):
-        # So, this has to do something a bit weird. Specifically, what it does
-        # is nothing.
-        #
-        # This means that, if we had previously had load_verify_locations
-        # called, this does not undo that. We need to do that because it turns
-        # out that the rest of the urllib3 code will attempt to load the
-        # default verify paths if it hasn't been told about any paths, even if
-        # the context itself was sometime earlier. We resolve that by just
-        # ignoring it.
-        pass
-
-    def load_default_certs(self):
-        return self.set_default_verify_paths()
-
-    def set_ciphers(self, ciphers):
-        # For now, we just require the default cipher string.
-        if ciphers != util.ssl_.DEFAULT_CIPHERS:
-            raise ValueError("SecureTransport doesn't support custom cipher strings")
-
-    def load_verify_locations(self, cafile=None, capath=None, cadata=None):
-        # OK, we only really support cadata and cafile.
-        if capath is not None:
-            raise ValueError("SecureTransport does not support cert directories")
-
-        # Raise if cafile does not exist.
-        if cafile is not None:
-            with open(cafile):
-                pass
-
-        self._trust_bundle = cafile or cadata
-
-    def load_cert_chain(self, certfile, keyfile=None, password=None):
-        self._client_cert = certfile
-        self._client_key = keyfile
-        self._client_cert_passphrase = password
-
-    def set_alpn_protocols(self, protocols):
-        """
-        Sets the ALPN protocols that will later be set on the context.
-
-        Raises a NotImplementedError if ALPN is not supported.
-        """
-        if not hasattr(Security, "SSLSetALPNProtocols"):
-            raise NotImplementedError(
-                "SecureTransport supports ALPN only in macOS 10.12+"
-            )
-        self._alpn_protocols = [six.ensure_binary(p) for p in protocols]
-
-    def wrap_socket(
-        self,
-        sock,
-        server_side=False,
-        do_handshake_on_connect=True,
-        suppress_ragged_eofs=True,
-        server_hostname=None,
-    ):
-        # So, what do we do here? Firstly, we assert some properties. This is a
-        # stripped down shim, so there is some functionality we don't support.
-        # See PEP 543 for the real deal.
-        assert not server_side
-        assert do_handshake_on_connect
-        assert suppress_ragged_eofs
-
-        # Ok, we're good to go. Now we want to create the wrapped socket object
-        # and store it in the appropriate place.
-        wrapped_socket = WrappedSocket(sock)
-
-        # Now we can handshake
-        wrapped_socket.handshake(
-            server_hostname,
-            self._verify,
-            self._trust_bundle,
-            self._min_version,
-            self._max_version,
-            self._client_cert,
-            self._client_key,
-            self._client_key_passphrase,
-            self._alpn_protocols,
-        )
-        return wrapped_socket
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/exceptions.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/exceptions.py
deleted file mode 100644
index cba6f3f56..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/exceptions.py
+++ /dev/null
@@ -1,323 +0,0 @@
-from __future__ import absolute_import
-
-from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
-
-# Base Exceptions
-
-
-class HTTPError(Exception):
-    """Base exception used by this module."""
-
-    pass
-
-
-class HTTPWarning(Warning):
-    """Base warning used by this module."""
-
-    pass
-
-
-class PoolError(HTTPError):
-    """Base exception for errors caused within a pool."""
-
-    def __init__(self, pool, message):
-        self.pool = pool
-        HTTPError.__init__(self, "%s: %s" % (pool, message))
-
-    def __reduce__(self):
-        # For pickling purposes.
-        return self.__class__, (None, None)
-
-
-class RequestError(PoolError):
-    """Base exception for PoolErrors that have associated URLs."""
-
-    def __init__(self, pool, url, message):
-        self.url = url
-        PoolError.__init__(self, pool, message)
-
-    def __reduce__(self):
-        # For pickling purposes.
-        return self.__class__, (None, self.url, None)
-
-
-class SSLError(HTTPError):
-    """Raised when SSL certificate fails in an HTTPS connection."""
-
-    pass
-
-
-class ProxyError(HTTPError):
-    """Raised when the connection to a proxy fails."""
-
-    def __init__(self, message, error, *args):
-        super(ProxyError, self).__init__(message, error, *args)
-        self.original_error = error
-
-
-class DecodeError(HTTPError):
-    """Raised when automatic decoding based on Content-Type fails."""
-
-    pass
-
-
-class ProtocolError(HTTPError):
-    """Raised when something unexpected happens mid-request/response."""
-
-    pass
-
-
-#: Renamed to ProtocolError but aliased for backwards compatibility.
-ConnectionError = ProtocolError
-
-
-# Leaf Exceptions
-
-
-class MaxRetryError(RequestError):
-    """Raised when the maximum number of retries is exceeded.
-
-    :param pool: The connection pool
-    :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool`
-    :param string url: The requested Url
-    :param exceptions.Exception reason: The underlying error
-
-    """
-
-    def __init__(self, pool, url, reason=None):
-        self.reason = reason
-
-        message = "Max retries exceeded with url: %s (Caused by %r)" % (url, reason)
-
-        RequestError.__init__(self, pool, url, message)
-
-
-class HostChangedError(RequestError):
-    """Raised when an existing pool gets a request for a foreign host."""
-
-    def __init__(self, pool, url, retries=3):
-        message = "Tried to open a foreign host with url: %s" % url
-        RequestError.__init__(self, pool, url, message)
-        self.retries = retries
-
-
-class TimeoutStateError(HTTPError):
-    """Raised when passing an invalid state to a timeout"""
-
-    pass
-
-
-class TimeoutError(HTTPError):
-    """Raised when a socket timeout error occurs.
-
-    Catching this error will catch both :exc:`ReadTimeoutErrors
-    ` and :exc:`ConnectTimeoutErrors `.
-    """
-
-    pass
-
-
-class ReadTimeoutError(TimeoutError, RequestError):
-    """Raised when a socket timeout occurs while receiving data from a server"""
-
-    pass
-
-
-# This timeout error does not have a URL attached and needs to inherit from the
-# base HTTPError
-class ConnectTimeoutError(TimeoutError):
-    """Raised when a socket timeout occurs while connecting to a server"""
-
-    pass
-
-
-class NewConnectionError(ConnectTimeoutError, PoolError):
-    """Raised when we fail to establish a new connection. Usually ECONNREFUSED."""
-
-    pass
-
-
-class EmptyPoolError(PoolError):
-    """Raised when a pool runs out of connections and no more are allowed."""
-
-    pass
-
-
-class ClosedPoolError(PoolError):
-    """Raised when a request enters a pool after the pool has been closed."""
-
-    pass
-
-
-class LocationValueError(ValueError, HTTPError):
-    """Raised when there is something wrong with a given URL input."""
-
-    pass
-
-
-class LocationParseError(LocationValueError):
-    """Raised when get_host or similar fails to parse the URL input."""
-
-    def __init__(self, location):
-        message = "Failed to parse: %s" % location
-        HTTPError.__init__(self, message)
-
-        self.location = location
-
-
-class URLSchemeUnknown(LocationValueError):
-    """Raised when a URL input has an unsupported scheme."""
-
-    def __init__(self, scheme):
-        message = "Not supported URL scheme %s" % scheme
-        super(URLSchemeUnknown, self).__init__(message)
-
-        self.scheme = scheme
-
-
-class ResponseError(HTTPError):
-    """Used as a container for an error reason supplied in a MaxRetryError."""
-
-    GENERIC_ERROR = "too many error responses"
-    SPECIFIC_ERROR = "too many {status_code} error responses"
-
-
-class SecurityWarning(HTTPWarning):
-    """Warned when performing security reducing actions"""
-
-    pass
-
-
-class SubjectAltNameWarning(SecurityWarning):
-    """Warned when connecting to a host with a certificate missing a SAN."""
-
-    pass
-
-
-class InsecureRequestWarning(SecurityWarning):
-    """Warned when making an unverified HTTPS request."""
-
-    pass
-
-
-class SystemTimeWarning(SecurityWarning):
-    """Warned when system time is suspected to be wrong"""
-
-    pass
-
-
-class InsecurePlatformWarning(SecurityWarning):
-    """Warned when certain TLS/SSL configuration is not available on a platform."""
-
-    pass
-
-
-class SNIMissingWarning(HTTPWarning):
-    """Warned when making a HTTPS request without SNI available."""
-
-    pass
-
-
-class DependencyWarning(HTTPWarning):
-    """
-    Warned when an attempt is made to import a module with missing optional
-    dependencies.
-    """
-
-    pass
-
-
-class ResponseNotChunked(ProtocolError, ValueError):
-    """Response needs to be chunked in order to read it as chunks."""
-
-    pass
-
-
-class BodyNotHttplibCompatible(HTTPError):
-    """
-    Body should be :class:`http.client.HTTPResponse` like
-    (have an fp attribute which returns raw chunks) for read_chunked().
-    """
-
-    pass
-
-
-class IncompleteRead(HTTPError, httplib_IncompleteRead):
-    """
-    Response length doesn't match expected Content-Length
-
-    Subclass of :class:`http.client.IncompleteRead` to allow int value
-    for ``partial`` to avoid creating large objects on streamed reads.
-    """
-
-    def __init__(self, partial, expected):
-        super(IncompleteRead, self).__init__(partial, expected)
-
-    def __repr__(self):
-        return "IncompleteRead(%i bytes read, %i more expected)" % (
-            self.partial,
-            self.expected,
-        )
-
-
-class InvalidChunkLength(HTTPError, httplib_IncompleteRead):
-    """Invalid chunk length in a chunked response."""
-
-    def __init__(self, response, length):
-        super(InvalidChunkLength, self).__init__(
-            response.tell(), response.length_remaining
-        )
-        self.response = response
-        self.length = length
-
-    def __repr__(self):
-        return "InvalidChunkLength(got length %r, %i bytes read)" % (
-            self.length,
-            self.partial,
-        )
-
-
-class InvalidHeader(HTTPError):
-    """The header provided was somehow invalid."""
-
-    pass
-
-
-class ProxySchemeUnknown(AssertionError, URLSchemeUnknown):
-    """ProxyManager does not support the supplied scheme"""
-
-    # TODO(t-8ch): Stop inheriting from AssertionError in v2.0.
-
-    def __init__(self, scheme):
-        # 'localhost' is here because our URL parser parses
-        # localhost:8080 -> scheme=localhost, remove if we fix this.
-        if scheme == "localhost":
-            scheme = None
-        if scheme is None:
-            message = "Proxy URL had no scheme, should start with http:// or https://"
-        else:
-            message = (
-                "Proxy URL had unsupported scheme %s, should use http:// or https://"
-                % scheme
-            )
-        super(ProxySchemeUnknown, self).__init__(message)
-
-
-class ProxySchemeUnsupported(ValueError):
-    """Fetching HTTPS resources through HTTPS proxies is unsupported"""
-
-    pass
-
-
-class HeaderParsingError(HTTPError):
-    """Raised by assert_header_parsing, but we convert it to a log.warning statement."""
-
-    def __init__(self, defects, unparsed_data):
-        message = "%s, unparsed data: %r" % (defects or "Unknown", unparsed_data)
-        super(HeaderParsingError, self).__init__(message)
-
-
-class UnrewindableBodyError(HTTPError):
-    """urllib3 encountered an error when trying to rewind a body"""
-
-    pass
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/fields.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/fields.py
deleted file mode 100644
index 9d630f491..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/fields.py
+++ /dev/null
@@ -1,274 +0,0 @@
-from __future__ import absolute_import
-
-import email.utils
-import mimetypes
-import re
-
-from .packages import six
-
-
-def guess_content_type(filename, default="application/octet-stream"):
-    """
-    Guess the "Content-Type" of a file.
-
-    :param filename:
-        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
-    :param default:
-        If no "Content-Type" can be guessed, default to `default`.
-    """
-    if filename:
-        return mimetypes.guess_type(filename)[0] or default
-    return default
-
-
-def format_header_param_rfc2231(name, value):
-    """
-    Helper function to format and quote a single header parameter using the
-    strategy defined in RFC 2231.
-
-    Particularly useful for header parameters which might contain
-    non-ASCII values, like file names. This follows
-    `RFC 2388 Section 4.4 `_.
-
-    :param name:
-        The name of the parameter, a string expected to be ASCII only.
-    :param value:
-        The value of the parameter, provided as ``bytes`` or `str``.
-    :ret:
-        An RFC-2231-formatted unicode string.
-    """
-    if isinstance(value, six.binary_type):
-        value = value.decode("utf-8")
-
-    if not any(ch in value for ch in '"\\\r\n'):
-        result = u'%s="%s"' % (name, value)
-        try:
-            result.encode("ascii")
-        except (UnicodeEncodeError, UnicodeDecodeError):
-            pass
-        else:
-            return result
-
-    if six.PY2:  # Python 2:
-        value = value.encode("utf-8")
-
-    # encode_rfc2231 accepts an encoded string and returns an ascii-encoded
-    # string in Python 2 but accepts and returns unicode strings in Python 3
-    value = email.utils.encode_rfc2231(value, "utf-8")
-    value = "%s*=%s" % (name, value)
-
-    if six.PY2:  # Python 2:
-        value = value.decode("utf-8")
-
-    return value
-
-
-_HTML5_REPLACEMENTS = {
-    u"\u0022": u"%22",
-    # Replace "\" with "\\".
-    u"\u005C": u"\u005C\u005C",
-}
-
-# All control characters from 0x00 to 0x1F *except* 0x1B.
-_HTML5_REPLACEMENTS.update(
-    {
-        six.unichr(cc): u"%{:02X}".format(cc)
-        for cc in range(0x00, 0x1F + 1)
-        if cc not in (0x1B,)
-    }
-)
-
-
-def _replace_multiple(value, needles_and_replacements):
-    def replacer(match):
-        return needles_and_replacements[match.group(0)]
-
-    pattern = re.compile(
-        r"|".join([re.escape(needle) for needle in needles_and_replacements.keys()])
-    )
-
-    result = pattern.sub(replacer, value)
-
-    return result
-
-
-def format_header_param_html5(name, value):
-    """
-    Helper function to format and quote a single header parameter using the
-    HTML5 strategy.
-
-    Particularly useful for header parameters which might contain
-    non-ASCII values, like file names. This follows the `HTML5 Working Draft
-    Section 4.10.22.7`_ and matches the behavior of curl and modern browsers.
-
-    .. _HTML5 Working Draft Section 4.10.22.7:
-        https://w3c.github.io/html/sec-forms.html#multipart-form-data
-
-    :param name:
-        The name of the parameter, a string expected to be ASCII only.
-    :param value:
-        The value of the parameter, provided as ``bytes`` or `str``.
-    :ret:
-        A unicode string, stripped of troublesome characters.
-    """
-    if isinstance(value, six.binary_type):
-        value = value.decode("utf-8")
-
-    value = _replace_multiple(value, _HTML5_REPLACEMENTS)
-
-    return u'%s="%s"' % (name, value)
-
-
-# For backwards-compatibility.
-format_header_param = format_header_param_html5
-
-
-class RequestField(object):
-    """
-    A data container for request body parameters.
-
-    :param name:
-        The name of this request field. Must be unicode.
-    :param data:
-        The data/value body.
-    :param filename:
-        An optional filename of the request field. Must be unicode.
-    :param headers:
-        An optional dict-like object of headers to initially use for the field.
-    :param header_formatter:
-        An optional callable that is used to encode and format the headers. By
-        default, this is :func:`format_header_param_html5`.
-    """
-
-    def __init__(
-        self,
-        name,
-        data,
-        filename=None,
-        headers=None,
-        header_formatter=format_header_param_html5,
-    ):
-        self._name = name
-        self._filename = filename
-        self.data = data
-        self.headers = {}
-        if headers:
-            self.headers = dict(headers)
-        self.header_formatter = header_formatter
-
-    @classmethod
-    def from_tuples(cls, fieldname, value, header_formatter=format_header_param_html5):
-        """
-        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.
-
-        Supports constructing :class:`~urllib3.fields.RequestField` from
-        parameter of key/value strings AND key/filetuple. A filetuple is a
-        (filename, data, MIME type) tuple where the MIME type is optional.
-        For example::
-
-            'foo': 'bar',
-            'fakefile': ('foofile.txt', 'contents of foofile'),
-            'realfile': ('barfile.txt', open('realfile').read()),
-            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
-            'nonamefile': 'contents of nonamefile field',
-
-        Field names and filenames must be unicode.
-        """
-        if isinstance(value, tuple):
-            if len(value) == 3:
-                filename, data, content_type = value
-            else:
-                filename, data = value
-                content_type = guess_content_type(filename)
-        else:
-            filename = None
-            content_type = None
-            data = value
-
-        request_param = cls(
-            fieldname, data, filename=filename, header_formatter=header_formatter
-        )
-        request_param.make_multipart(content_type=content_type)
-
-        return request_param
-
-    def _render_part(self, name, value):
-        """
-        Overridable helper function to format a single header parameter. By
-        default, this calls ``self.header_formatter``.
-
-        :param name:
-            The name of the parameter, a string expected to be ASCII only.
-        :param value:
-            The value of the parameter, provided as a unicode string.
-        """
-
-        return self.header_formatter(name, value)
-
-    def _render_parts(self, header_parts):
-        """
-        Helper function to format and quote a single header.
-
-        Useful for single headers that are composed of multiple items. E.g.,
-        'Content-Disposition' fields.
-
-        :param header_parts:
-            A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
-            as `k1="v1"; k2="v2"; ...`.
-        """
-        parts = []
-        iterable = header_parts
-        if isinstance(header_parts, dict):
-            iterable = header_parts.items()
-
-        for name, value in iterable:
-            if value is not None:
-                parts.append(self._render_part(name, value))
-
-        return u"; ".join(parts)
-
-    def render_headers(self):
-        """
-        Renders the headers for this request field.
-        """
-        lines = []
-
-        sort_keys = ["Content-Disposition", "Content-Type", "Content-Location"]
-        for sort_key in sort_keys:
-            if self.headers.get(sort_key, False):
-                lines.append(u"%s: %s" % (sort_key, self.headers[sort_key]))
-
-        for header_name, header_value in self.headers.items():
-            if header_name not in sort_keys:
-                if header_value:
-                    lines.append(u"%s: %s" % (header_name, header_value))
-
-        lines.append(u"\r\n")
-        return u"\r\n".join(lines)
-
-    def make_multipart(
-        self, content_disposition=None, content_type=None, content_location=None
-    ):
-        """
-        Makes this request field into a multipart request field.
-
-        This method overrides "Content-Disposition", "Content-Type" and
-        "Content-Location" headers to the request parameter.
-
-        :param content_type:
-            The 'Content-Type' of the request body.
-        :param content_location:
-            The 'Content-Location' of the request body.
-
-        """
-        self.headers["Content-Disposition"] = content_disposition or u"form-data"
-        self.headers["Content-Disposition"] += u"; ".join(
-            [
-                u"",
-                self._render_parts(
-                    ((u"name", self._name), (u"filename", self._filename))
-                ),
-            ]
-        )
-        self.headers["Content-Type"] = content_type
-        self.headers["Content-Location"] = content_location
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/filepost.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/filepost.py
deleted file mode 100644
index 36c9252c6..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/filepost.py
+++ /dev/null
@@ -1,98 +0,0 @@
-from __future__ import absolute_import
-
-import binascii
-import codecs
-import os
-from io import BytesIO
-
-from .fields import RequestField
-from .packages import six
-from .packages.six import b
-
-writer = codecs.lookup("utf-8")[3]
-
-
-def choose_boundary():
-    """
-    Our embarrassingly-simple replacement for mimetools.choose_boundary.
-    """
-    boundary = binascii.hexlify(os.urandom(16))
-    if not six.PY2:
-        boundary = boundary.decode("ascii")
-    return boundary
-
-
-def iter_field_objects(fields):
-    """
-    Iterate over fields.
-
-    Supports list of (k, v) tuples and dicts, and lists of
-    :class:`~urllib3.fields.RequestField`.
-
-    """
-    if isinstance(fields, dict):
-        i = six.iteritems(fields)
-    else:
-        i = iter(fields)
-
-    for field in i:
-        if isinstance(field, RequestField):
-            yield field
-        else:
-            yield RequestField.from_tuples(*field)
-
-
-def iter_fields(fields):
-    """
-    .. deprecated:: 1.6
-
-    Iterate over fields.
-
-    The addition of :class:`~urllib3.fields.RequestField` makes this function
-    obsolete. Instead, use :func:`iter_field_objects`, which returns
-    :class:`~urllib3.fields.RequestField` objects.
-
-    Supports list of (k, v) tuples and dicts.
-    """
-    if isinstance(fields, dict):
-        return ((k, v) for k, v in six.iteritems(fields))
-
-    return ((k, v) for k, v in fields)
-
-
-def encode_multipart_formdata(fields, boundary=None):
-    """
-    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.
-
-    :param fields:
-        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).
-
-    :param boundary:
-        If not specified, then a random boundary will be generated using
-        :func:`urllib3.filepost.choose_boundary`.
-    """
-    body = BytesIO()
-    if boundary is None:
-        boundary = choose_boundary()
-
-    for field in iter_field_objects(fields):
-        body.write(b("--%s\r\n" % (boundary)))
-
-        writer(body).write(field.render_headers())
-        data = field.data
-
-        if isinstance(data, int):
-            data = str(data)  # Backwards compatibility
-
-        if isinstance(data, six.text_type):
-            writer(body).write(data)
-        else:
-            body.write(data)
-
-        body.write(b"\r\n")
-
-    body.write(b("--%s--\r\n" % (boundary)))
-
-    content_type = str("multipart/form-data; boundary=%s" % boundary)
-
-    return body.getvalue(), content_type
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index b1e8a1c56..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__pycache__/six.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__pycache__/six.cpython-314.pyc
deleted file mode 100644
index fcb3918ca..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/__pycache__/six.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 692204c62..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-314.pyc
deleted file mode 100644
index 1968e2d61..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/weakref_finalize.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/weakref_finalize.cpython-314.pyc
deleted file mode 100644
index d5abbb94b..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/weakref_finalize.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py
deleted file mode 100644
index b8fb2154b..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-backports.makefile
-~~~~~~~~~~~~~~~~~~
-
-Backports the Python 3 ``socket.makefile`` method for use with anything that
-wants to create a "fake" socket object.
-"""
-import io
-from socket import SocketIO
-
-
-def backport_makefile(
-    self, mode="r", buffering=None, encoding=None, errors=None, newline=None
-):
-    """
-    Backport of ``socket.makefile`` from Python 3.5.
-    """
-    if not set(mode) <= {"r", "w", "b"}:
-        raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,))
-    writing = "w" in mode
-    reading = "r" in mode or not writing
-    assert reading or writing
-    binary = "b" in mode
-    rawmode = ""
-    if reading:
-        rawmode += "r"
-    if writing:
-        rawmode += "w"
-    raw = SocketIO(self, rawmode)
-    self._makefile_refs += 1
-    if buffering is None:
-        buffering = -1
-    if buffering < 0:
-        buffering = io.DEFAULT_BUFFER_SIZE
-    if buffering == 0:
-        if not binary:
-            raise ValueError("unbuffered streams must be binary")
-        return raw
-    if reading and writing:
-        buffer = io.BufferedRWPair(raw, raw, buffering)
-    elif reading:
-        buffer = io.BufferedReader(raw, buffering)
-    else:
-        assert writing
-        buffer = io.BufferedWriter(raw, buffering)
-    if binary:
-        return buffer
-    text = io.TextIOWrapper(buffer, encoding, errors, newline)
-    text.mode = mode
-    return text
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py
deleted file mode 100644
index a2f2966e5..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py
+++ /dev/null
@@ -1,155 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-backports.weakref_finalize
-~~~~~~~~~~~~~~~~~~
-
-Backports the Python 3 ``weakref.finalize`` method.
-"""
-from __future__ import absolute_import
-
-import itertools
-import sys
-from weakref import ref
-
-__all__ = ["weakref_finalize"]
-
-
-class weakref_finalize(object):
-    """Class for finalization of weakrefable objects
-    finalize(obj, func, *args, **kwargs) returns a callable finalizer
-    object which will be called when obj is garbage collected. The
-    first time the finalizer is called it evaluates func(*arg, **kwargs)
-    and returns the result. After this the finalizer is dead, and
-    calling it just returns None.
-    When the program exits any remaining finalizers for which the
-    atexit attribute is true will be run in reverse order of creation.
-    By default atexit is true.
-    """
-
-    # Finalizer objects don't have any state of their own.  They are
-    # just used as keys to lookup _Info objects in the registry.  This
-    # ensures that they cannot be part of a ref-cycle.
-
-    __slots__ = ()
-    _registry = {}
-    _shutdown = False
-    _index_iter = itertools.count()
-    _dirty = False
-    _registered_with_atexit = False
-
-    class _Info(object):
-        __slots__ = ("weakref", "func", "args", "kwargs", "atexit", "index")
-
-    def __init__(self, obj, func, *args, **kwargs):
-        if not self._registered_with_atexit:
-            # We may register the exit function more than once because
-            # of a thread race, but that is harmless
-            import atexit
-
-            atexit.register(self._exitfunc)
-            weakref_finalize._registered_with_atexit = True
-        info = self._Info()
-        info.weakref = ref(obj, self)
-        info.func = func
-        info.args = args
-        info.kwargs = kwargs or None
-        info.atexit = True
-        info.index = next(self._index_iter)
-        self._registry[self] = info
-        weakref_finalize._dirty = True
-
-    def __call__(self, _=None):
-        """If alive then mark as dead and return func(*args, **kwargs);
-        otherwise return None"""
-        info = self._registry.pop(self, None)
-        if info and not self._shutdown:
-            return info.func(*info.args, **(info.kwargs or {}))
-
-    def detach(self):
-        """If alive then mark as dead and return (obj, func, args, kwargs);
-        otherwise return None"""
-        info = self._registry.get(self)
-        obj = info and info.weakref()
-        if obj is not None and self._registry.pop(self, None):
-            return (obj, info.func, info.args, info.kwargs or {})
-
-    def peek(self):
-        """If alive then return (obj, func, args, kwargs);
-        otherwise return None"""
-        info = self._registry.get(self)
-        obj = info and info.weakref()
-        if obj is not None:
-            return (obj, info.func, info.args, info.kwargs or {})
-
-    @property
-    def alive(self):
-        """Whether finalizer is alive"""
-        return self in self._registry
-
-    @property
-    def atexit(self):
-        """Whether finalizer should be called at exit"""
-        info = self._registry.get(self)
-        return bool(info) and info.atexit
-
-    @atexit.setter
-    def atexit(self, value):
-        info = self._registry.get(self)
-        if info:
-            info.atexit = bool(value)
-
-    def __repr__(self):
-        info = self._registry.get(self)
-        obj = info and info.weakref()
-        if obj is None:
-            return "<%s object at %#x; dead>" % (type(self).__name__, id(self))
-        else:
-            return "<%s object at %#x; for %r at %#x>" % (
-                type(self).__name__,
-                id(self),
-                type(obj).__name__,
-                id(obj),
-            )
-
-    @classmethod
-    def _select_for_exit(cls):
-        # Return live finalizers marked for exit, oldest first
-        L = [(f, i) for (f, i) in cls._registry.items() if i.atexit]
-        L.sort(key=lambda item: item[1].index)
-        return [f for (f, i) in L]
-
-    @classmethod
-    def _exitfunc(cls):
-        # At shutdown invoke finalizers for which atexit is true.
-        # This is called once all other non-daemonic threads have been
-        # joined.
-        reenable_gc = False
-        try:
-            if cls._registry:
-                import gc
-
-                if gc.isenabled():
-                    reenable_gc = True
-                    gc.disable()
-                pending = None
-                while True:
-                    if pending is None or weakref_finalize._dirty:
-                        pending = cls._select_for_exit()
-                        weakref_finalize._dirty = False
-                    if not pending:
-                        break
-                    f = pending.pop()
-                    try:
-                        # gc is disabled, so (assuming no daemonic
-                        # threads) the following is the only line in
-                        # this function which might trigger creation
-                        # of a new finalizer
-                        f()
-                    except Exception:
-                        sys.excepthook(*sys.exc_info())
-                    assert f not in cls._registry
-        finally:
-            # prevent any more finalizers from executing during shutdown
-            weakref_finalize._shutdown = True
-            if reenable_gc:
-                gc.enable()
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/six.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/six.py
deleted file mode 100644
index f099a3dcd..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/packages/six.py
+++ /dev/null
@@ -1,1076 +0,0 @@
-# Copyright (c) 2010-2020 Benjamin Peterson
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-"""Utilities for writing code that runs on Python 2 and 3"""
-
-from __future__ import absolute_import
-
-import functools
-import itertools
-import operator
-import sys
-import types
-
-__author__ = "Benjamin Peterson "
-__version__ = "1.16.0"
-
-
-# Useful for very coarse version differentiation.
-PY2 = sys.version_info[0] == 2
-PY3 = sys.version_info[0] == 3
-PY34 = sys.version_info[0:2] >= (3, 4)
-
-if PY3:
-    string_types = (str,)
-    integer_types = (int,)
-    class_types = (type,)
-    text_type = str
-    binary_type = bytes
-
-    MAXSIZE = sys.maxsize
-else:
-    string_types = (basestring,)
-    integer_types = (int, long)
-    class_types = (type, types.ClassType)
-    text_type = unicode
-    binary_type = str
-
-    if sys.platform.startswith("java"):
-        # Jython always uses 32 bits.
-        MAXSIZE = int((1 << 31) - 1)
-    else:
-        # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
-        class X(object):
-            def __len__(self):
-                return 1 << 31
-
-        try:
-            len(X())
-        except OverflowError:
-            # 32-bit
-            MAXSIZE = int((1 << 31) - 1)
-        else:
-            # 64-bit
-            MAXSIZE = int((1 << 63) - 1)
-        del X
-
-if PY34:
-    from importlib.util import spec_from_loader
-else:
-    spec_from_loader = None
-
-
-def _add_doc(func, doc):
-    """Add documentation to a function."""
-    func.__doc__ = doc
-
-
-def _import_module(name):
-    """Import module, returning the module after the last dot."""
-    __import__(name)
-    return sys.modules[name]
-
-
-class _LazyDescr(object):
-    def __init__(self, name):
-        self.name = name
-
-    def __get__(self, obj, tp):
-        result = self._resolve()
-        setattr(obj, self.name, result)  # Invokes __set__.
-        try:
-            # This is a bit ugly, but it avoids running this again by
-            # removing this descriptor.
-            delattr(obj.__class__, self.name)
-        except AttributeError:
-            pass
-        return result
-
-
-class MovedModule(_LazyDescr):
-    def __init__(self, name, old, new=None):
-        super(MovedModule, self).__init__(name)
-        if PY3:
-            if new is None:
-                new = name
-            self.mod = new
-        else:
-            self.mod = old
-
-    def _resolve(self):
-        return _import_module(self.mod)
-
-    def __getattr__(self, attr):
-        _module = self._resolve()
-        value = getattr(_module, attr)
-        setattr(self, attr, value)
-        return value
-
-
-class _LazyModule(types.ModuleType):
-    def __init__(self, name):
-        super(_LazyModule, self).__init__(name)
-        self.__doc__ = self.__class__.__doc__
-
-    def __dir__(self):
-        attrs = ["__doc__", "__name__"]
-        attrs += [attr.name for attr in self._moved_attributes]
-        return attrs
-
-    # Subclasses should override this
-    _moved_attributes = []
-
-
-class MovedAttribute(_LazyDescr):
-    def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
-        super(MovedAttribute, self).__init__(name)
-        if PY3:
-            if new_mod is None:
-                new_mod = name
-            self.mod = new_mod
-            if new_attr is None:
-                if old_attr is None:
-                    new_attr = name
-                else:
-                    new_attr = old_attr
-            self.attr = new_attr
-        else:
-            self.mod = old_mod
-            if old_attr is None:
-                old_attr = name
-            self.attr = old_attr
-
-    def _resolve(self):
-        module = _import_module(self.mod)
-        return getattr(module, self.attr)
-
-
-class _SixMetaPathImporter(object):
-
-    """
-    A meta path importer to import six.moves and its submodules.
-
-    This class implements a PEP302 finder and loader. It should be compatible
-    with Python 2.5 and all existing versions of Python3
-    """
-
-    def __init__(self, six_module_name):
-        self.name = six_module_name
-        self.known_modules = {}
-
-    def _add_module(self, mod, *fullnames):
-        for fullname in fullnames:
-            self.known_modules[self.name + "." + fullname] = mod
-
-    def _get_module(self, fullname):
-        return self.known_modules[self.name + "." + fullname]
-
-    def find_module(self, fullname, path=None):
-        if fullname in self.known_modules:
-            return self
-        return None
-
-    def find_spec(self, fullname, path, target=None):
-        if fullname in self.known_modules:
-            return spec_from_loader(fullname, self)
-        return None
-
-    def __get_module(self, fullname):
-        try:
-            return self.known_modules[fullname]
-        except KeyError:
-            raise ImportError("This loader does not know module " + fullname)
-
-    def load_module(self, fullname):
-        try:
-            # in case of a reload
-            return sys.modules[fullname]
-        except KeyError:
-            pass
-        mod = self.__get_module(fullname)
-        if isinstance(mod, MovedModule):
-            mod = mod._resolve()
-        else:
-            mod.__loader__ = self
-        sys.modules[fullname] = mod
-        return mod
-
-    def is_package(self, fullname):
-        """
-        Return true, if the named module is a package.
-
-        We need this method to get correct spec objects with
-        Python 3.4 (see PEP451)
-        """
-        return hasattr(self.__get_module(fullname), "__path__")
-
-    def get_code(self, fullname):
-        """Return None
-
-        Required, if is_package is implemented"""
-        self.__get_module(fullname)  # eventually raises ImportError
-        return None
-
-    get_source = get_code  # same as get_code
-
-    def create_module(self, spec):
-        return self.load_module(spec.name)
-
-    def exec_module(self, module):
-        pass
-
-
-_importer = _SixMetaPathImporter(__name__)
-
-
-class _MovedItems(_LazyModule):
-
-    """Lazy loading of moved objects"""
-
-    __path__ = []  # mark as package
-
-
-_moved_attributes = [
-    MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
-    MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
-    MovedAttribute(
-        "filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"
-    ),
-    MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
-    MovedAttribute("intern", "__builtin__", "sys"),
-    MovedAttribute("map", "itertools", "builtins", "imap", "map"),
-    MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
-    MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
-    MovedAttribute("getoutput", "commands", "subprocess"),
-    MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
-    MovedAttribute(
-        "reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"
-    ),
-    MovedAttribute("reduce", "__builtin__", "functools"),
-    MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
-    MovedAttribute("StringIO", "StringIO", "io"),
-    MovedAttribute("UserDict", "UserDict", "collections"),
-    MovedAttribute("UserList", "UserList", "collections"),
-    MovedAttribute("UserString", "UserString", "collections"),
-    MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
-    MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
-    MovedAttribute(
-        "zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"
-    ),
-    MovedModule("builtins", "__builtin__"),
-    MovedModule("configparser", "ConfigParser"),
-    MovedModule(
-        "collections_abc",
-        "collections",
-        "collections.abc" if sys.version_info >= (3, 3) else "collections",
-    ),
-    MovedModule("copyreg", "copy_reg"),
-    MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
-    MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
-    MovedModule(
-        "_dummy_thread",
-        "dummy_thread",
-        "_dummy_thread" if sys.version_info < (3, 9) else "_thread",
-    ),
-    MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
-    MovedModule("http_cookies", "Cookie", "http.cookies"),
-    MovedModule("html_entities", "htmlentitydefs", "html.entities"),
-    MovedModule("html_parser", "HTMLParser", "html.parser"),
-    MovedModule("http_client", "httplib", "http.client"),
-    MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
-    MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"),
-    MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
-    MovedModule(
-        "email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"
-    ),
-    MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
-    MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
-    MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
-    MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
-    MovedModule("cPickle", "cPickle", "pickle"),
-    MovedModule("queue", "Queue"),
-    MovedModule("reprlib", "repr"),
-    MovedModule("socketserver", "SocketServer"),
-    MovedModule("_thread", "thread", "_thread"),
-    MovedModule("tkinter", "Tkinter"),
-    MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
-    MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
-    MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
-    MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
-    MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
-    MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
-    MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
-    MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
-    MovedModule("tkinter_colorchooser", "tkColorChooser", "tkinter.colorchooser"),
-    MovedModule("tkinter_commondialog", "tkCommonDialog", "tkinter.commondialog"),
-    MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
-    MovedModule("tkinter_font", "tkFont", "tkinter.font"),
-    MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
-    MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", "tkinter.simpledialog"),
-    MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
-    MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
-    MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
-    MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
-    MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
-    MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
-]
-# Add windows specific modules.
-if sys.platform == "win32":
-    _moved_attributes += [
-        MovedModule("winreg", "_winreg"),
-    ]
-
-for attr in _moved_attributes:
-    setattr(_MovedItems, attr.name, attr)
-    if isinstance(attr, MovedModule):
-        _importer._add_module(attr, "moves." + attr.name)
-del attr
-
-_MovedItems._moved_attributes = _moved_attributes
-
-moves = _MovedItems(__name__ + ".moves")
-_importer._add_module(moves, "moves")
-
-
-class Module_six_moves_urllib_parse(_LazyModule):
-
-    """Lazy loading of moved objects in six.moves.urllib_parse"""
-
-
-_urllib_parse_moved_attributes = [
-    MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
-    MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
-    MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
-    MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
-    MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
-    MovedAttribute("urljoin", "urlparse", "urllib.parse"),
-    MovedAttribute("urlparse", "urlparse", "urllib.parse"),
-    MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
-    MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
-    MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
-    MovedAttribute("quote", "urllib", "urllib.parse"),
-    MovedAttribute("quote_plus", "urllib", "urllib.parse"),
-    MovedAttribute("unquote", "urllib", "urllib.parse"),
-    MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
-    MovedAttribute(
-        "unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"
-    ),
-    MovedAttribute("urlencode", "urllib", "urllib.parse"),
-    MovedAttribute("splitquery", "urllib", "urllib.parse"),
-    MovedAttribute("splittag", "urllib", "urllib.parse"),
-    MovedAttribute("splituser", "urllib", "urllib.parse"),
-    MovedAttribute("splitvalue", "urllib", "urllib.parse"),
-    MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
-    MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
-    MovedAttribute("uses_params", "urlparse", "urllib.parse"),
-    MovedAttribute("uses_query", "urlparse", "urllib.parse"),
-    MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
-]
-for attr in _urllib_parse_moved_attributes:
-    setattr(Module_six_moves_urllib_parse, attr.name, attr)
-del attr
-
-Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes
-
-_importer._add_module(
-    Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
-    "moves.urllib_parse",
-    "moves.urllib.parse",
-)
-
-
-class Module_six_moves_urllib_error(_LazyModule):
-
-    """Lazy loading of moved objects in six.moves.urllib_error"""
-
-
-_urllib_error_moved_attributes = [
-    MovedAttribute("URLError", "urllib2", "urllib.error"),
-    MovedAttribute("HTTPError", "urllib2", "urllib.error"),
-    MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
-]
-for attr in _urllib_error_moved_attributes:
-    setattr(Module_six_moves_urllib_error, attr.name, attr)
-del attr
-
-Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes
-
-_importer._add_module(
-    Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
-    "moves.urllib_error",
-    "moves.urllib.error",
-)
-
-
-class Module_six_moves_urllib_request(_LazyModule):
-
-    """Lazy loading of moved objects in six.moves.urllib_request"""
-
-
-_urllib_request_moved_attributes = [
-    MovedAttribute("urlopen", "urllib2", "urllib.request"),
-    MovedAttribute("install_opener", "urllib2", "urllib.request"),
-    MovedAttribute("build_opener", "urllib2", "urllib.request"),
-    MovedAttribute("pathname2url", "urllib", "urllib.request"),
-    MovedAttribute("url2pathname", "urllib", "urllib.request"),
-    MovedAttribute("getproxies", "urllib", "urllib.request"),
-    MovedAttribute("Request", "urllib2", "urllib.request"),
-    MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
-    MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
-    MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
-    MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
-    MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
-    MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
-    MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
-    MovedAttribute("FileHandler", "urllib2", "urllib.request"),
-    MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
-    MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
-    MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
-    MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
-    MovedAttribute("urlretrieve", "urllib", "urllib.request"),
-    MovedAttribute("urlcleanup", "urllib", "urllib.request"),
-    MovedAttribute("URLopener", "urllib", "urllib.request"),
-    MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
-    MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
-    MovedAttribute("parse_http_list", "urllib2", "urllib.request"),
-    MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"),
-]
-for attr in _urllib_request_moved_attributes:
-    setattr(Module_six_moves_urllib_request, attr.name, attr)
-del attr
-
-Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes
-
-_importer._add_module(
-    Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
-    "moves.urllib_request",
-    "moves.urllib.request",
-)
-
-
-class Module_six_moves_urllib_response(_LazyModule):
-
-    """Lazy loading of moved objects in six.moves.urllib_response"""
-
-
-_urllib_response_moved_attributes = [
-    MovedAttribute("addbase", "urllib", "urllib.response"),
-    MovedAttribute("addclosehook", "urllib", "urllib.response"),
-    MovedAttribute("addinfo", "urllib", "urllib.response"),
-    MovedAttribute("addinfourl", "urllib", "urllib.response"),
-]
-for attr in _urllib_response_moved_attributes:
-    setattr(Module_six_moves_urllib_response, attr.name, attr)
-del attr
-
-Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes
-
-_importer._add_module(
-    Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
-    "moves.urllib_response",
-    "moves.urllib.response",
-)
-
-
-class Module_six_moves_urllib_robotparser(_LazyModule):
-
-    """Lazy loading of moved objects in six.moves.urllib_robotparser"""
-
-
-_urllib_robotparser_moved_attributes = [
-    MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
-]
-for attr in _urllib_robotparser_moved_attributes:
-    setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
-del attr
-
-Module_six_moves_urllib_robotparser._moved_attributes = (
-    _urllib_robotparser_moved_attributes
-)
-
-_importer._add_module(
-    Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
-    "moves.urllib_robotparser",
-    "moves.urllib.robotparser",
-)
-
-
-class Module_six_moves_urllib(types.ModuleType):
-
-    """Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
-
-    __path__ = []  # mark as package
-    parse = _importer._get_module("moves.urllib_parse")
-    error = _importer._get_module("moves.urllib_error")
-    request = _importer._get_module("moves.urllib_request")
-    response = _importer._get_module("moves.urllib_response")
-    robotparser = _importer._get_module("moves.urllib_robotparser")
-
-    def __dir__(self):
-        return ["parse", "error", "request", "response", "robotparser"]
-
-
-_importer._add_module(
-    Module_six_moves_urllib(__name__ + ".moves.urllib"), "moves.urllib"
-)
-
-
-def add_move(move):
-    """Add an item to six.moves."""
-    setattr(_MovedItems, move.name, move)
-
-
-def remove_move(name):
-    """Remove item from six.moves."""
-    try:
-        delattr(_MovedItems, name)
-    except AttributeError:
-        try:
-            del moves.__dict__[name]
-        except KeyError:
-            raise AttributeError("no such move, %r" % (name,))
-
-
-if PY3:
-    _meth_func = "__func__"
-    _meth_self = "__self__"
-
-    _func_closure = "__closure__"
-    _func_code = "__code__"
-    _func_defaults = "__defaults__"
-    _func_globals = "__globals__"
-else:
-    _meth_func = "im_func"
-    _meth_self = "im_self"
-
-    _func_closure = "func_closure"
-    _func_code = "func_code"
-    _func_defaults = "func_defaults"
-    _func_globals = "func_globals"
-
-
-try:
-    advance_iterator = next
-except NameError:
-
-    def advance_iterator(it):
-        return it.next()
-
-
-next = advance_iterator
-
-
-try:
-    callable = callable
-except NameError:
-
-    def callable(obj):
-        return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
-
-
-if PY3:
-
-    def get_unbound_function(unbound):
-        return unbound
-
-    create_bound_method = types.MethodType
-
-    def create_unbound_method(func, cls):
-        return func
-
-    Iterator = object
-else:
-
-    def get_unbound_function(unbound):
-        return unbound.im_func
-
-    def create_bound_method(func, obj):
-        return types.MethodType(func, obj, obj.__class__)
-
-    def create_unbound_method(func, cls):
-        return types.MethodType(func, None, cls)
-
-    class Iterator(object):
-        def next(self):
-            return type(self).__next__(self)
-
-    callable = callable
-_add_doc(
-    get_unbound_function, """Get the function out of a possibly unbound function"""
-)
-
-
-get_method_function = operator.attrgetter(_meth_func)
-get_method_self = operator.attrgetter(_meth_self)
-get_function_closure = operator.attrgetter(_func_closure)
-get_function_code = operator.attrgetter(_func_code)
-get_function_defaults = operator.attrgetter(_func_defaults)
-get_function_globals = operator.attrgetter(_func_globals)
-
-
-if PY3:
-
-    def iterkeys(d, **kw):
-        return iter(d.keys(**kw))
-
-    def itervalues(d, **kw):
-        return iter(d.values(**kw))
-
-    def iteritems(d, **kw):
-        return iter(d.items(**kw))
-
-    def iterlists(d, **kw):
-        return iter(d.lists(**kw))
-
-    viewkeys = operator.methodcaller("keys")
-
-    viewvalues = operator.methodcaller("values")
-
-    viewitems = operator.methodcaller("items")
-else:
-
-    def iterkeys(d, **kw):
-        return d.iterkeys(**kw)
-
-    def itervalues(d, **kw):
-        return d.itervalues(**kw)
-
-    def iteritems(d, **kw):
-        return d.iteritems(**kw)
-
-    def iterlists(d, **kw):
-        return d.iterlists(**kw)
-
-    viewkeys = operator.methodcaller("viewkeys")
-
-    viewvalues = operator.methodcaller("viewvalues")
-
-    viewitems = operator.methodcaller("viewitems")
-
-_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
-_add_doc(itervalues, "Return an iterator over the values of a dictionary.")
-_add_doc(iteritems, "Return an iterator over the (key, value) pairs of a dictionary.")
-_add_doc(
-    iterlists, "Return an iterator over the (key, [values]) pairs of a dictionary."
-)
-
-
-if PY3:
-
-    def b(s):
-        return s.encode("latin-1")
-
-    def u(s):
-        return s
-
-    unichr = chr
-    import struct
-
-    int2byte = struct.Struct(">B").pack
-    del struct
-    byte2int = operator.itemgetter(0)
-    indexbytes = operator.getitem
-    iterbytes = iter
-    import io
-
-    StringIO = io.StringIO
-    BytesIO = io.BytesIO
-    del io
-    _assertCountEqual = "assertCountEqual"
-    if sys.version_info[1] <= 1:
-        _assertRaisesRegex = "assertRaisesRegexp"
-        _assertRegex = "assertRegexpMatches"
-        _assertNotRegex = "assertNotRegexpMatches"
-    else:
-        _assertRaisesRegex = "assertRaisesRegex"
-        _assertRegex = "assertRegex"
-        _assertNotRegex = "assertNotRegex"
-else:
-
-    def b(s):
-        return s
-
-    # Workaround for standalone backslash
-
-    def u(s):
-        return unicode(s.replace(r"\\", r"\\\\"), "unicode_escape")
-
-    unichr = unichr
-    int2byte = chr
-
-    def byte2int(bs):
-        return ord(bs[0])
-
-    def indexbytes(buf, i):
-        return ord(buf[i])
-
-    iterbytes = functools.partial(itertools.imap, ord)
-    import StringIO
-
-    StringIO = BytesIO = StringIO.StringIO
-    _assertCountEqual = "assertItemsEqual"
-    _assertRaisesRegex = "assertRaisesRegexp"
-    _assertRegex = "assertRegexpMatches"
-    _assertNotRegex = "assertNotRegexpMatches"
-_add_doc(b, """Byte literal""")
-_add_doc(u, """Text literal""")
-
-
-def assertCountEqual(self, *args, **kwargs):
-    return getattr(self, _assertCountEqual)(*args, **kwargs)
-
-
-def assertRaisesRegex(self, *args, **kwargs):
-    return getattr(self, _assertRaisesRegex)(*args, **kwargs)
-
-
-def assertRegex(self, *args, **kwargs):
-    return getattr(self, _assertRegex)(*args, **kwargs)
-
-
-def assertNotRegex(self, *args, **kwargs):
-    return getattr(self, _assertNotRegex)(*args, **kwargs)
-
-
-if PY3:
-    exec_ = getattr(moves.builtins, "exec")
-
-    def reraise(tp, value, tb=None):
-        try:
-            if value is None:
-                value = tp()
-            if value.__traceback__ is not tb:
-                raise value.with_traceback(tb)
-            raise value
-        finally:
-            value = None
-            tb = None
-
-else:
-
-    def exec_(_code_, _globs_=None, _locs_=None):
-        """Execute code in a namespace."""
-        if _globs_ is None:
-            frame = sys._getframe(1)
-            _globs_ = frame.f_globals
-            if _locs_ is None:
-                _locs_ = frame.f_locals
-            del frame
-        elif _locs_ is None:
-            _locs_ = _globs_
-        exec ("""exec _code_ in _globs_, _locs_""")
-
-    exec_(
-        """def reraise(tp, value, tb=None):
-    try:
-        raise tp, value, tb
-    finally:
-        tb = None
-"""
-    )
-
-
-if sys.version_info[:2] > (3,):
-    exec_(
-        """def raise_from(value, from_value):
-    try:
-        raise value from from_value
-    finally:
-        value = None
-"""
-    )
-else:
-
-    def raise_from(value, from_value):
-        raise value
-
-
-print_ = getattr(moves.builtins, "print", None)
-if print_ is None:
-
-    def print_(*args, **kwargs):
-        """The new-style print function for Python 2.4 and 2.5."""
-        fp = kwargs.pop("file", sys.stdout)
-        if fp is None:
-            return
-
-        def write(data):
-            if not isinstance(data, basestring):
-                data = str(data)
-            # If the file has an encoding, encode unicode with it.
-            if (
-                isinstance(fp, file)
-                and isinstance(data, unicode)
-                and fp.encoding is not None
-            ):
-                errors = getattr(fp, "errors", None)
-                if errors is None:
-                    errors = "strict"
-                data = data.encode(fp.encoding, errors)
-            fp.write(data)
-
-        want_unicode = False
-        sep = kwargs.pop("sep", None)
-        if sep is not None:
-            if isinstance(sep, unicode):
-                want_unicode = True
-            elif not isinstance(sep, str):
-                raise TypeError("sep must be None or a string")
-        end = kwargs.pop("end", None)
-        if end is not None:
-            if isinstance(end, unicode):
-                want_unicode = True
-            elif not isinstance(end, str):
-                raise TypeError("end must be None or a string")
-        if kwargs:
-            raise TypeError("invalid keyword arguments to print()")
-        if not want_unicode:
-            for arg in args:
-                if isinstance(arg, unicode):
-                    want_unicode = True
-                    break
-        if want_unicode:
-            newline = unicode("\n")
-            space = unicode(" ")
-        else:
-            newline = "\n"
-            space = " "
-        if sep is None:
-            sep = space
-        if end is None:
-            end = newline
-        for i, arg in enumerate(args):
-            if i:
-                write(sep)
-            write(arg)
-        write(end)
-
-
-if sys.version_info[:2] < (3, 3):
-    _print = print_
-
-    def print_(*args, **kwargs):
-        fp = kwargs.get("file", sys.stdout)
-        flush = kwargs.pop("flush", False)
-        _print(*args, **kwargs)
-        if flush and fp is not None:
-            fp.flush()
-
-
-_add_doc(reraise, """Reraise an exception.""")
-
-if sys.version_info[0:2] < (3, 4):
-    # This does exactly the same what the :func:`py3:functools.update_wrapper`
-    # function does on Python versions after 3.2. It sets the ``__wrapped__``
-    # attribute on ``wrapper`` object and it doesn't raise an error if any of
-    # the attributes mentioned in ``assigned`` and ``updated`` are missing on
-    # ``wrapped`` object.
-    def _update_wrapper(
-        wrapper,
-        wrapped,
-        assigned=functools.WRAPPER_ASSIGNMENTS,
-        updated=functools.WRAPPER_UPDATES,
-    ):
-        for attr in assigned:
-            try:
-                value = getattr(wrapped, attr)
-            except AttributeError:
-                continue
-            else:
-                setattr(wrapper, attr, value)
-        for attr in updated:
-            getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
-        wrapper.__wrapped__ = wrapped
-        return wrapper
-
-    _update_wrapper.__doc__ = functools.update_wrapper.__doc__
-
-    def wraps(
-        wrapped,
-        assigned=functools.WRAPPER_ASSIGNMENTS,
-        updated=functools.WRAPPER_UPDATES,
-    ):
-        return functools.partial(
-            _update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated
-        )
-
-    wraps.__doc__ = functools.wraps.__doc__
-
-else:
-    wraps = functools.wraps
-
-
-def with_metaclass(meta, *bases):
-    """Create a base class with a metaclass."""
-    # This requires a bit of explanation: the basic idea is to make a dummy
-    # metaclass for one level of class instantiation that replaces itself with
-    # the actual metaclass.
-    class metaclass(type):
-        def __new__(cls, name, this_bases, d):
-            if sys.version_info[:2] >= (3, 7):
-                # This version introduced PEP 560 that requires a bit
-                # of extra care (we mimic what is done by __build_class__).
-                resolved_bases = types.resolve_bases(bases)
-                if resolved_bases is not bases:
-                    d["__orig_bases__"] = bases
-            else:
-                resolved_bases = bases
-            return meta(name, resolved_bases, d)
-
-        @classmethod
-        def __prepare__(cls, name, this_bases):
-            return meta.__prepare__(name, bases)
-
-    return type.__new__(metaclass, "temporary_class", (), {})
-
-
-def add_metaclass(metaclass):
-    """Class decorator for creating a class with a metaclass."""
-
-    def wrapper(cls):
-        orig_vars = cls.__dict__.copy()
-        slots = orig_vars.get("__slots__")
-        if slots is not None:
-            if isinstance(slots, str):
-                slots = [slots]
-            for slots_var in slots:
-                orig_vars.pop(slots_var)
-        orig_vars.pop("__dict__", None)
-        orig_vars.pop("__weakref__", None)
-        if hasattr(cls, "__qualname__"):
-            orig_vars["__qualname__"] = cls.__qualname__
-        return metaclass(cls.__name__, cls.__bases__, orig_vars)
-
-    return wrapper
-
-
-def ensure_binary(s, encoding="utf-8", errors="strict"):
-    """Coerce **s** to six.binary_type.
-
-    For Python 2:
-      - `unicode` -> encoded to `str`
-      - `str` -> `str`
-
-    For Python 3:
-      - `str` -> encoded to `bytes`
-      - `bytes` -> `bytes`
-    """
-    if isinstance(s, binary_type):
-        return s
-    if isinstance(s, text_type):
-        return s.encode(encoding, errors)
-    raise TypeError("not expecting type '%s'" % type(s))
-
-
-def ensure_str(s, encoding="utf-8", errors="strict"):
-    """Coerce *s* to `str`.
-
-    For Python 2:
-      - `unicode` -> encoded to `str`
-      - `str` -> `str`
-
-    For Python 3:
-      - `str` -> `str`
-      - `bytes` -> decoded to `str`
-    """
-    # Optimization: Fast return for the common case.
-    if type(s) is str:
-        return s
-    if PY2 and isinstance(s, text_type):
-        return s.encode(encoding, errors)
-    elif PY3 and isinstance(s, binary_type):
-        return s.decode(encoding, errors)
-    elif not isinstance(s, (text_type, binary_type)):
-        raise TypeError("not expecting type '%s'" % type(s))
-    return s
-
-
-def ensure_text(s, encoding="utf-8", errors="strict"):
-    """Coerce *s* to six.text_type.
-
-    For Python 2:
-      - `unicode` -> `unicode`
-      - `str` -> `unicode`
-
-    For Python 3:
-      - `str` -> `str`
-      - `bytes` -> decoded to `str`
-    """
-    if isinstance(s, binary_type):
-        return s.decode(encoding, errors)
-    elif isinstance(s, text_type):
-        return s
-    else:
-        raise TypeError("not expecting type '%s'" % type(s))
-
-
-def python_2_unicode_compatible(klass):
-    """
-    A class decorator that defines __unicode__ and __str__ methods under Python 2.
-    Under Python 3 it does nothing.
-
-    To support Python 2 and 3 with a single code base, define a __str__ method
-    returning text and apply this decorator to the class.
-    """
-    if PY2:
-        if "__str__" not in klass.__dict__:
-            raise ValueError(
-                "@python_2_unicode_compatible cannot be applied "
-                "to %s because it doesn't define __str__()." % klass.__name__
-            )
-        klass.__unicode__ = klass.__str__
-        klass.__str__ = lambda self: self.__unicode__().encode("utf-8")
-    return klass
-
-
-# Complete the moves implementation.
-# This code is at the end of this module to speed up module loading.
-# Turn this module into a package.
-__path__ = []  # required for PEP 302 and PEP 451
-__package__ = __name__  # see PEP 366 @ReservedAssignment
-if globals().get("__spec__") is not None:
-    __spec__.submodule_search_locations = []  # PEP 451 @UndefinedVariable
-# Remove other six meta path importers, since they cause problems. This can
-# happen if six is removed from sys.modules and then reloaded. (Setuptools does
-# this for some reason.)
-if sys.meta_path:
-    for i, importer in enumerate(sys.meta_path):
-        # Here's some real nastiness: Another "instance" of the six module might
-        # be floating around. Therefore, we can't use isinstance() to check for
-        # the six meta path importer, since the other six instance will have
-        # inserted an importer with different class.
-        if (
-            type(importer).__name__ == "_SixMetaPathImporter"
-            and importer.name == __name__
-        ):
-            del sys.meta_path[i]
-            break
-    del i, importer
-# Finally, add the importer to the meta path import hook.
-sys.meta_path.append(_importer)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py
deleted file mode 100644
index fb51bf7d9..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py
+++ /dev/null
@@ -1,540 +0,0 @@
-from __future__ import absolute_import
-
-import collections
-import functools
-import logging
-
-from ._collections import HTTPHeaderDict, RecentlyUsedContainer
-from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
-from .exceptions import (
-    LocationValueError,
-    MaxRetryError,
-    ProxySchemeUnknown,
-    ProxySchemeUnsupported,
-    URLSchemeUnknown,
-)
-from .packages import six
-from .packages.six.moves.urllib.parse import urljoin
-from .request import RequestMethods
-from .util.proxy import connection_requires_http_tunnel
-from .util.retry import Retry
-from .util.url import parse_url
-
-__all__ = ["PoolManager", "ProxyManager", "proxy_from_url"]
-
-
-log = logging.getLogger(__name__)
-
-SSL_KEYWORDS = (
-    "key_file",
-    "cert_file",
-    "cert_reqs",
-    "ca_certs",
-    "ssl_version",
-    "ca_cert_dir",
-    "ssl_context",
-    "key_password",
-    "server_hostname",
-)
-
-# All known keyword arguments that could be provided to the pool manager, its
-# pools, or the underlying connections. This is used to construct a pool key.
-_key_fields = (
-    "key_scheme",  # str
-    "key_host",  # str
-    "key_port",  # int
-    "key_timeout",  # int or float or Timeout
-    "key_retries",  # int or Retry
-    "key_strict",  # bool
-    "key_block",  # bool
-    "key_source_address",  # str
-    "key_key_file",  # str
-    "key_key_password",  # str
-    "key_cert_file",  # str
-    "key_cert_reqs",  # str
-    "key_ca_certs",  # str
-    "key_ssl_version",  # str
-    "key_ca_cert_dir",  # str
-    "key_ssl_context",  # instance of ssl.SSLContext or urllib3.util.ssl_.SSLContext
-    "key_maxsize",  # int
-    "key_headers",  # dict
-    "key__proxy",  # parsed proxy url
-    "key__proxy_headers",  # dict
-    "key__proxy_config",  # class
-    "key_socket_options",  # list of (level (int), optname (int), value (int or str)) tuples
-    "key__socks_options",  # dict
-    "key_assert_hostname",  # bool or string
-    "key_assert_fingerprint",  # str
-    "key_server_hostname",  # str
-)
-
-#: The namedtuple class used to construct keys for the connection pool.
-#: All custom key schemes should include the fields in this key at a minimum.
-PoolKey = collections.namedtuple("PoolKey", _key_fields)
-
-_proxy_config_fields = ("ssl_context", "use_forwarding_for_https")
-ProxyConfig = collections.namedtuple("ProxyConfig", _proxy_config_fields)
-
-
-def _default_key_normalizer(key_class, request_context):
-    """
-    Create a pool key out of a request context dictionary.
-
-    According to RFC 3986, both the scheme and host are case-insensitive.
-    Therefore, this function normalizes both before constructing the pool
-    key for an HTTPS request. If you wish to change this behaviour, provide
-    alternate callables to ``key_fn_by_scheme``.
-
-    :param key_class:
-        The class to use when constructing the key. This should be a namedtuple
-        with the ``scheme`` and ``host`` keys at a minimum.
-    :type  key_class: namedtuple
-    :param request_context:
-        A dictionary-like object that contain the context for a request.
-    :type  request_context: dict
-
-    :return: A namedtuple that can be used as a connection pool key.
-    :rtype:  PoolKey
-    """
-    # Since we mutate the dictionary, make a copy first
-    context = request_context.copy()
-    context["scheme"] = context["scheme"].lower()
-    context["host"] = context["host"].lower()
-
-    # These are both dictionaries and need to be transformed into frozensets
-    for key in ("headers", "_proxy_headers", "_socks_options"):
-        if key in context and context[key] is not None:
-            context[key] = frozenset(context[key].items())
-
-    # The socket_options key may be a list and needs to be transformed into a
-    # tuple.
-    socket_opts = context.get("socket_options")
-    if socket_opts is not None:
-        context["socket_options"] = tuple(socket_opts)
-
-    # Map the kwargs to the names in the namedtuple - this is necessary since
-    # namedtuples can't have fields starting with '_'.
-    for key in list(context.keys()):
-        context["key_" + key] = context.pop(key)
-
-    # Default to ``None`` for keys missing from the context
-    for field in key_class._fields:
-        if field not in context:
-            context[field] = None
-
-    return key_class(**context)
-
-
-#: A dictionary that maps a scheme to a callable that creates a pool key.
-#: This can be used to alter the way pool keys are constructed, if desired.
-#: Each PoolManager makes a copy of this dictionary so they can be configured
-#: globally here, or individually on the instance.
-key_fn_by_scheme = {
-    "http": functools.partial(_default_key_normalizer, PoolKey),
-    "https": functools.partial(_default_key_normalizer, PoolKey),
-}
-
-pool_classes_by_scheme = {"http": HTTPConnectionPool, "https": HTTPSConnectionPool}
-
-
-class PoolManager(RequestMethods):
-    """
-    Allows for arbitrary requests while transparently keeping track of
-    necessary connection pools for you.
-
-    :param num_pools:
-        Number of connection pools to cache before discarding the least
-        recently used pool.
-
-    :param headers:
-        Headers to include with all requests, unless other headers are given
-        explicitly.
-
-    :param \\**connection_pool_kw:
-        Additional parameters are used to create fresh
-        :class:`urllib3.connectionpool.ConnectionPool` instances.
-
-    Example::
-
-        >>> manager = PoolManager(num_pools=2)
-        >>> r = manager.request('GET', 'http://google.com/')
-        >>> r = manager.request('GET', 'http://google.com/mail')
-        >>> r = manager.request('GET', 'http://yahoo.com/')
-        >>> len(manager.pools)
-        2
-
-    """
-
-    proxy = None
-    proxy_config = None
-
-    def __init__(self, num_pools=10, headers=None, **connection_pool_kw):
-        RequestMethods.__init__(self, headers)
-        self.connection_pool_kw = connection_pool_kw
-        self.pools = RecentlyUsedContainer(num_pools)
-
-        # Locally set the pool classes and keys so other PoolManagers can
-        # override them.
-        self.pool_classes_by_scheme = pool_classes_by_scheme
-        self.key_fn_by_scheme = key_fn_by_scheme.copy()
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, exc_type, exc_val, exc_tb):
-        self.clear()
-        # Return False to re-raise any potential exceptions
-        return False
-
-    def _new_pool(self, scheme, host, port, request_context=None):
-        """
-        Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
-        any additional pool keyword arguments.
-
-        If ``request_context`` is provided, it is provided as keyword arguments
-        to the pool class used. This method is used to actually create the
-        connection pools handed out by :meth:`connection_from_url` and
-        companion methods. It is intended to be overridden for customization.
-        """
-        pool_cls = self.pool_classes_by_scheme[scheme]
-        if request_context is None:
-            request_context = self.connection_pool_kw.copy()
-
-        # Although the context has everything necessary to create the pool,
-        # this function has historically only used the scheme, host, and port
-        # in the positional args. When an API change is acceptable these can
-        # be removed.
-        for key in ("scheme", "host", "port"):
-            request_context.pop(key, None)
-
-        if scheme == "http":
-            for kw in SSL_KEYWORDS:
-                request_context.pop(kw, None)
-
-        return pool_cls(host, port, **request_context)
-
-    def clear(self):
-        """
-        Empty our store of pools and direct them all to close.
-
-        This will not affect in-flight connections, but they will not be
-        re-used after completion.
-        """
-        self.pools.clear()
-
-    def connection_from_host(self, host, port=None, scheme="http", pool_kwargs=None):
-        """
-        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.
-
-        If ``port`` isn't given, it will be derived from the ``scheme`` using
-        ``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
-        provided, it is merged with the instance's ``connection_pool_kw``
-        variable and used to create the new connection pool, if one is
-        needed.
-        """
-
-        if not host:
-            raise LocationValueError("No host specified.")
-
-        request_context = self._merge_pool_kwargs(pool_kwargs)
-        request_context["scheme"] = scheme or "http"
-        if not port:
-            port = port_by_scheme.get(request_context["scheme"].lower(), 80)
-        request_context["port"] = port
-        request_context["host"] = host
-
-        return self.connection_from_context(request_context)
-
-    def connection_from_context(self, request_context):
-        """
-        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.
-
-        ``request_context`` must at least contain the ``scheme`` key and its
-        value must be a key in ``key_fn_by_scheme`` instance variable.
-        """
-        scheme = request_context["scheme"].lower()
-        pool_key_constructor = self.key_fn_by_scheme.get(scheme)
-        if not pool_key_constructor:
-            raise URLSchemeUnknown(scheme)
-        pool_key = pool_key_constructor(request_context)
-
-        return self.connection_from_pool_key(pool_key, request_context=request_context)
-
-    def connection_from_pool_key(self, pool_key, request_context=None):
-        """
-        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.
-
-        ``pool_key`` should be a namedtuple that only contains immutable
-        objects. At a minimum it must have the ``scheme``, ``host``, and
-        ``port`` fields.
-        """
-        with self.pools.lock:
-            # If the scheme, host, or port doesn't match existing open
-            # connections, open a new ConnectionPool.
-            pool = self.pools.get(pool_key)
-            if pool:
-                return pool
-
-            # Make a fresh ConnectionPool of the desired type
-            scheme = request_context["scheme"]
-            host = request_context["host"]
-            port = request_context["port"]
-            pool = self._new_pool(scheme, host, port, request_context=request_context)
-            self.pools[pool_key] = pool
-
-        return pool
-
-    def connection_from_url(self, url, pool_kwargs=None):
-        """
-        Similar to :func:`urllib3.connectionpool.connection_from_url`.
-
-        If ``pool_kwargs`` is not provided and a new pool needs to be
-        constructed, ``self.connection_pool_kw`` is used to initialize
-        the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
-        is provided, it is used instead. Note that if a new pool does not
-        need to be created for the request, the provided ``pool_kwargs`` are
-        not used.
-        """
-        u = parse_url(url)
-        return self.connection_from_host(
-            u.host, port=u.port, scheme=u.scheme, pool_kwargs=pool_kwargs
-        )
-
-    def _merge_pool_kwargs(self, override):
-        """
-        Merge a dictionary of override values for self.connection_pool_kw.
-
-        This does not modify self.connection_pool_kw and returns a new dict.
-        Any keys in the override dictionary with a value of ``None`` are
-        removed from the merged dictionary.
-        """
-        base_pool_kwargs = self.connection_pool_kw.copy()
-        if override:
-            for key, value in override.items():
-                if value is None:
-                    try:
-                        del base_pool_kwargs[key]
-                    except KeyError:
-                        pass
-                else:
-                    base_pool_kwargs[key] = value
-        return base_pool_kwargs
-
-    def _proxy_requires_url_absolute_form(self, parsed_url):
-        """
-        Indicates if the proxy requires the complete destination URL in the
-        request.  Normally this is only needed when not using an HTTP CONNECT
-        tunnel.
-        """
-        if self.proxy is None:
-            return False
-
-        return not connection_requires_http_tunnel(
-            self.proxy, self.proxy_config, parsed_url.scheme
-        )
-
-    def _validate_proxy_scheme_url_selection(self, url_scheme):
-        """
-        Validates that were not attempting to do TLS in TLS connections on
-        Python2 or with unsupported SSL implementations.
-        """
-        if self.proxy is None or url_scheme != "https":
-            return
-
-        if self.proxy.scheme != "https":
-            return
-
-        if six.PY2 and not self.proxy_config.use_forwarding_for_https:
-            raise ProxySchemeUnsupported(
-                "Contacting HTTPS destinations through HTTPS proxies "
-                "'via CONNECT tunnels' is not supported in Python 2"
-            )
-
-    def urlopen(self, method, url, redirect=True, **kw):
-        """
-        Same as :meth:`urllib3.HTTPConnectionPool.urlopen`
-        with custom cross-host redirect logic and only sends the request-uri
-        portion of the ``url``.
-
-        The given ``url`` parameter must be absolute, such that an appropriate
-        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
-        """
-        u = parse_url(url)
-        self._validate_proxy_scheme_url_selection(u.scheme)
-
-        conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
-
-        kw["assert_same_host"] = False
-        kw["redirect"] = False
-
-        if "headers" not in kw:
-            kw["headers"] = self.headers.copy()
-
-        if self._proxy_requires_url_absolute_form(u):
-            response = conn.urlopen(method, url, **kw)
-        else:
-            response = conn.urlopen(method, u.request_uri, **kw)
-
-        redirect_location = redirect and response.get_redirect_location()
-        if not redirect_location:
-            return response
-
-        # Support relative URLs for redirecting.
-        redirect_location = urljoin(url, redirect_location)
-
-        if response.status == 303:
-            # Change the method according to RFC 9110, Section 15.4.4.
-            method = "GET"
-            # And lose the body not to transfer anything sensitive.
-            kw["body"] = None
-            kw["headers"] = HTTPHeaderDict(kw["headers"])._prepare_for_method_change()
-
-        retries = kw.get("retries")
-        if not isinstance(retries, Retry):
-            retries = Retry.from_int(retries, redirect=redirect)
-
-        # Strip headers marked as unsafe to forward to the redirected location.
-        # Check remove_headers_on_redirect to avoid a potential network call within
-        # conn.is_same_host() which may use socket.gethostbyname() in the future.
-        if retries.remove_headers_on_redirect and not conn.is_same_host(
-            redirect_location
-        ):
-            headers = list(six.iterkeys(kw["headers"]))
-            for header in headers:
-                if header.lower() in retries.remove_headers_on_redirect:
-                    kw["headers"].pop(header, None)
-
-        try:
-            retries = retries.increment(method, url, response=response, _pool=conn)
-        except MaxRetryError:
-            if retries.raise_on_redirect:
-                response.drain_conn()
-                raise
-            return response
-
-        kw["retries"] = retries
-        kw["redirect"] = redirect
-
-        log.info("Redirecting %s -> %s", url, redirect_location)
-
-        response.drain_conn()
-        return self.urlopen(method, redirect_location, **kw)
-
-
-class ProxyManager(PoolManager):
-    """
-    Behaves just like :class:`PoolManager`, but sends all requests through
-    the defined proxy, using the CONNECT method for HTTPS URLs.
-
-    :param proxy_url:
-        The URL of the proxy to be used.
-
-    :param proxy_headers:
-        A dictionary containing headers that will be sent to the proxy. In case
-        of HTTP they are being sent with each request, while in the
-        HTTPS/CONNECT case they are sent only once. Could be used for proxy
-        authentication.
-
-    :param proxy_ssl_context:
-        The proxy SSL context is used to establish the TLS connection to the
-        proxy when using HTTPS proxies.
-
-    :param use_forwarding_for_https:
-        (Defaults to False) If set to True will forward requests to the HTTPS
-        proxy to be made on behalf of the client instead of creating a TLS
-        tunnel via the CONNECT method. **Enabling this flag means that request
-        and response headers and content will be visible from the HTTPS proxy**
-        whereas tunneling keeps request and response headers and content
-        private.  IP address, target hostname, SNI, and port are always visible
-        to an HTTPS proxy even when this flag is disabled.
-
-    Example:
-        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
-        >>> r1 = proxy.request('GET', 'http://google.com/')
-        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
-        >>> len(proxy.pools)
-        1
-        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
-        >>> r4 = proxy.request('GET', 'https://twitter.com/')
-        >>> len(proxy.pools)
-        3
-
-    """
-
-    def __init__(
-        self,
-        proxy_url,
-        num_pools=10,
-        headers=None,
-        proxy_headers=None,
-        proxy_ssl_context=None,
-        use_forwarding_for_https=False,
-        **connection_pool_kw
-    ):
-
-        if isinstance(proxy_url, HTTPConnectionPool):
-            proxy_url = "%s://%s:%i" % (
-                proxy_url.scheme,
-                proxy_url.host,
-                proxy_url.port,
-            )
-        proxy = parse_url(proxy_url)
-
-        if proxy.scheme not in ("http", "https"):
-            raise ProxySchemeUnknown(proxy.scheme)
-
-        if not proxy.port:
-            port = port_by_scheme.get(proxy.scheme, 80)
-            proxy = proxy._replace(port=port)
-
-        self.proxy = proxy
-        self.proxy_headers = proxy_headers or {}
-        self.proxy_ssl_context = proxy_ssl_context
-        self.proxy_config = ProxyConfig(proxy_ssl_context, use_forwarding_for_https)
-
-        connection_pool_kw["_proxy"] = self.proxy
-        connection_pool_kw["_proxy_headers"] = self.proxy_headers
-        connection_pool_kw["_proxy_config"] = self.proxy_config
-
-        super(ProxyManager, self).__init__(num_pools, headers, **connection_pool_kw)
-
-    def connection_from_host(self, host, port=None, scheme="http", pool_kwargs=None):
-        if scheme == "https":
-            return super(ProxyManager, self).connection_from_host(
-                host, port, scheme, pool_kwargs=pool_kwargs
-            )
-
-        return super(ProxyManager, self).connection_from_host(
-            self.proxy.host, self.proxy.port, self.proxy.scheme, pool_kwargs=pool_kwargs
-        )
-
-    def _set_proxy_headers(self, url, headers=None):
-        """
-        Sets headers needed by proxies: specifically, the Accept and Host
-        headers. Only sets headers not provided by the user.
-        """
-        headers_ = {"Accept": "*/*"}
-
-        netloc = parse_url(url).netloc
-        if netloc:
-            headers_["Host"] = netloc
-
-        if headers:
-            headers_.update(headers)
-        return headers_
-
-    def urlopen(self, method, url, redirect=True, **kw):
-        "Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute."
-        u = parse_url(url)
-        if not connection_requires_http_tunnel(self.proxy, self.proxy_config, u.scheme):
-            # For connections using HTTP CONNECT, httplib sets the necessary
-            # headers on the CONNECT to the proxy. If we're not using CONNECT,
-            # we'll definitely need to set 'Host' at the very least.
-            headers = kw.get("headers", self.headers)
-            kw["headers"] = self._set_proxy_headers(url, headers)
-
-        return super(ProxyManager, self).urlopen(method, url, redirect=redirect, **kw)
-
-
-def proxy_from_url(url, **kw):
-    return ProxyManager(proxy_url=url, **kw)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/request.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/request.py
deleted file mode 100644
index 3b4cf9992..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/request.py
+++ /dev/null
@@ -1,191 +0,0 @@
-from __future__ import absolute_import
-
-import sys
-
-from .filepost import encode_multipart_formdata
-from .packages import six
-from .packages.six.moves.urllib.parse import urlencode
-
-__all__ = ["RequestMethods"]
-
-
-class RequestMethods(object):
-    """
-    Convenience mixin for classes who implement a :meth:`urlopen` method, such
-    as :class:`urllib3.HTTPConnectionPool` and
-    :class:`urllib3.PoolManager`.
-
-    Provides behavior for making common types of HTTP request methods and
-    decides which type of request field encoding to use.
-
-    Specifically,
-
-    :meth:`.request_encode_url` is for sending requests whose fields are
-    encoded in the URL (such as GET, HEAD, DELETE).
-
-    :meth:`.request_encode_body` is for sending requests whose fields are
-    encoded in the *body* of the request using multipart or www-form-urlencoded
-    (such as for POST, PUT, PATCH).
-
-    :meth:`.request` is for making any kind of request, it will look up the
-    appropriate encoding format and use one of the above two methods to make
-    the request.
-
-    Initializer parameters:
-
-    :param headers:
-        Headers to include with all requests, unless other headers are given
-        explicitly.
-    """
-
-    _encode_url_methods = {"DELETE", "GET", "HEAD", "OPTIONS"}
-
-    def __init__(self, headers=None):
-        self.headers = headers or {}
-
-    def urlopen(
-        self,
-        method,
-        url,
-        body=None,
-        headers=None,
-        encode_multipart=True,
-        multipart_boundary=None,
-        **kw
-    ):  # Abstract
-        raise NotImplementedError(
-            "Classes extending RequestMethods must implement "
-            "their own ``urlopen`` method."
-        )
-
-    def request(self, method, url, fields=None, headers=None, **urlopen_kw):
-        """
-        Make a request using :meth:`urlopen` with the appropriate encoding of
-        ``fields`` based on the ``method`` used.
-
-        This is a convenience method that requires the least amount of manual
-        effort. It can be used in most situations, while still having the
-        option to drop down to more specific methods when necessary, such as
-        :meth:`request_encode_url`, :meth:`request_encode_body`,
-        or even the lowest level :meth:`urlopen`.
-        """
-        method = method.upper()
-
-        urlopen_kw["request_url"] = url
-
-        if method in self._encode_url_methods:
-            return self.request_encode_url(
-                method, url, fields=fields, headers=headers, **urlopen_kw
-            )
-        else:
-            return self.request_encode_body(
-                method, url, fields=fields, headers=headers, **urlopen_kw
-            )
-
-    def request_encode_url(self, method, url, fields=None, headers=None, **urlopen_kw):
-        """
-        Make a request using :meth:`urlopen` with the ``fields`` encoded in
-        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
-        """
-        if headers is None:
-            headers = self.headers
-
-        extra_kw = {"headers": headers}
-        extra_kw.update(urlopen_kw)
-
-        if fields:
-            url += "?" + urlencode(fields)
-
-        return self.urlopen(method, url, **extra_kw)
-
-    def request_encode_body(
-        self,
-        method,
-        url,
-        fields=None,
-        headers=None,
-        encode_multipart=True,
-        multipart_boundary=None,
-        **urlopen_kw
-    ):
-        """
-        Make a request using :meth:`urlopen` with the ``fields`` encoded in
-        the body. This is useful for request methods like POST, PUT, PATCH, etc.
-
-        When ``encode_multipart=True`` (default), then
-        :func:`urllib3.encode_multipart_formdata` is used to encode
-        the payload with the appropriate content type. Otherwise
-        :func:`urllib.parse.urlencode` is used with the
-        'application/x-www-form-urlencoded' content type.
-
-        Multipart encoding must be used when posting files, and it's reasonably
-        safe to use it in other times too. However, it may break request
-        signing, such as with OAuth.
-
-        Supports an optional ``fields`` parameter of key/value strings AND
-        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
-        the MIME type is optional. For example::
-
-            fields = {
-                'foo': 'bar',
-                'fakefile': ('foofile.txt', 'contents of foofile'),
-                'realfile': ('barfile.txt', open('realfile').read()),
-                'typedfile': ('bazfile.bin', open('bazfile').read(),
-                              'image/jpeg'),
-                'nonamefile': 'contents of nonamefile field',
-            }
-
-        When uploading a file, providing a filename (the first parameter of the
-        tuple) is optional but recommended to best mimic behavior of browsers.
-
-        Note that if ``headers`` are supplied, the 'Content-Type' header will
-        be overwritten because it depends on the dynamic random boundary string
-        which is used to compose the body of the request. The random boundary
-        string can be explicitly set with the ``multipart_boundary`` parameter.
-        """
-        if headers is None:
-            headers = self.headers
-
-        extra_kw = {"headers": {}}
-
-        if fields:
-            if "body" in urlopen_kw:
-                raise TypeError(
-                    "request got values for both 'fields' and 'body', can only specify one."
-                )
-
-            if encode_multipart:
-                body, content_type = encode_multipart_formdata(
-                    fields, boundary=multipart_boundary
-                )
-            else:
-                body, content_type = (
-                    urlencode(fields),
-                    "application/x-www-form-urlencoded",
-                )
-
-            extra_kw["body"] = body
-            extra_kw["headers"] = {"Content-Type": content_type}
-
-        extra_kw["headers"].update(headers)
-        extra_kw.update(urlopen_kw)
-
-        return self.urlopen(method, url, **extra_kw)
-
-
-if not six.PY2:
-
-    class RequestModule(sys.modules[__name__].__class__):
-        def __call__(self, *args, **kwargs):
-            """
-            If user tries to call this module directly urllib3 v2.x style raise an error to the user
-            suggesting they may need urllib3 v2
-            """
-            raise TypeError(
-                "'module' object is not callable\n"
-                "urllib3.request() method is not supported in this release, "
-                "upgrade to urllib3 v2 to use it\n"
-                "see https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html"
-            )
-
-    sys.modules[__name__].__class__ = RequestModule
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/response.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/response.py
deleted file mode 100644
index 8909f8454..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/response.py
+++ /dev/null
@@ -1,879 +0,0 @@
-from __future__ import absolute_import
-
-import io
-import logging
-import sys
-import warnings
-import zlib
-from contextlib import contextmanager
-from socket import error as SocketError
-from socket import timeout as SocketTimeout
-
-brotli = None
-
-from . import util
-from ._collections import HTTPHeaderDict
-from .connection import BaseSSLError, HTTPException
-from .exceptions import (
-    BodyNotHttplibCompatible,
-    DecodeError,
-    HTTPError,
-    IncompleteRead,
-    InvalidChunkLength,
-    InvalidHeader,
-    ProtocolError,
-    ReadTimeoutError,
-    ResponseNotChunked,
-    SSLError,
-)
-from .packages import six
-from .util.response import is_fp_closed, is_response_to_head
-
-log = logging.getLogger(__name__)
-
-
-class DeflateDecoder(object):
-    def __init__(self):
-        self._first_try = True
-        self._data = b""
-        self._obj = zlib.decompressobj()
-
-    def __getattr__(self, name):
-        return getattr(self._obj, name)
-
-    def decompress(self, data):
-        if not data:
-            return data
-
-        if not self._first_try:
-            return self._obj.decompress(data)
-
-        self._data += data
-        try:
-            decompressed = self._obj.decompress(data)
-            if decompressed:
-                self._first_try = False
-                self._data = None
-            return decompressed
-        except zlib.error:
-            self._first_try = False
-            self._obj = zlib.decompressobj(-zlib.MAX_WBITS)
-            try:
-                return self.decompress(self._data)
-            finally:
-                self._data = None
-
-
-class GzipDecoderState(object):
-
-    FIRST_MEMBER = 0
-    OTHER_MEMBERS = 1
-    SWALLOW_DATA = 2
-
-
-class GzipDecoder(object):
-    def __init__(self):
-        self._obj = zlib.decompressobj(16 + zlib.MAX_WBITS)
-        self._state = GzipDecoderState.FIRST_MEMBER
-
-    def __getattr__(self, name):
-        return getattr(self._obj, name)
-
-    def decompress(self, data):
-        ret = bytearray()
-        if self._state == GzipDecoderState.SWALLOW_DATA or not data:
-            return bytes(ret)
-        while True:
-            try:
-                ret += self._obj.decompress(data)
-            except zlib.error:
-                previous_state = self._state
-                # Ignore data after the first error
-                self._state = GzipDecoderState.SWALLOW_DATA
-                if previous_state == GzipDecoderState.OTHER_MEMBERS:
-                    # Allow trailing garbage acceptable in other gzip clients
-                    return bytes(ret)
-                raise
-            data = self._obj.unused_data
-            if not data:
-                return bytes(ret)
-            self._state = GzipDecoderState.OTHER_MEMBERS
-            self._obj = zlib.decompressobj(16 + zlib.MAX_WBITS)
-
-
-if brotli is not None:
-
-    class BrotliDecoder(object):
-        # Supports both 'brotlipy' and 'Brotli' packages
-        # since they share an import name. The top branches
-        # are for 'brotlipy' and bottom branches for 'Brotli'
-        def __init__(self):
-            self._obj = brotli.Decompressor()
-            if hasattr(self._obj, "decompress"):
-                self.decompress = self._obj.decompress
-            else:
-                self.decompress = self._obj.process
-
-        def flush(self):
-            if hasattr(self._obj, "flush"):
-                return self._obj.flush()
-            return b""
-
-
-class MultiDecoder(object):
-    """
-    From RFC7231:
-        If one or more encodings have been applied to a representation, the
-        sender that applied the encodings MUST generate a Content-Encoding
-        header field that lists the content codings in the order in which
-        they were applied.
-    """
-
-    def __init__(self, modes):
-        self._decoders = [_get_decoder(m.strip()) for m in modes.split(",")]
-
-    def flush(self):
-        return self._decoders[0].flush()
-
-    def decompress(self, data):
-        for d in reversed(self._decoders):
-            data = d.decompress(data)
-        return data
-
-
-def _get_decoder(mode):
-    if "," in mode:
-        return MultiDecoder(mode)
-
-    if mode == "gzip":
-        return GzipDecoder()
-
-    if brotli is not None and mode == "br":
-        return BrotliDecoder()
-
-    return DeflateDecoder()
-
-
-class HTTPResponse(io.IOBase):
-    """
-    HTTP Response container.
-
-    Backwards-compatible with :class:`http.client.HTTPResponse` but the response ``body`` is
-    loaded and decoded on-demand when the ``data`` property is accessed.  This
-    class is also compatible with the Python standard library's :mod:`io`
-    module, and can hence be treated as a readable object in the context of that
-    framework.
-
-    Extra parameters for behaviour not present in :class:`http.client.HTTPResponse`:
-
-    :param preload_content:
-        If True, the response's body will be preloaded during construction.
-
-    :param decode_content:
-        If True, will attempt to decode the body based on the
-        'content-encoding' header.
-
-    :param original_response:
-        When this HTTPResponse wrapper is generated from an :class:`http.client.HTTPResponse`
-        object, it's convenient to include the original for debug purposes. It's
-        otherwise unused.
-
-    :param retries:
-        The retries contains the last :class:`~urllib3.util.retry.Retry` that
-        was used during the request.
-
-    :param enforce_content_length:
-        Enforce content length checking. Body returned by server must match
-        value of Content-Length header, if present. Otherwise, raise error.
-    """
-
-    CONTENT_DECODERS = ["gzip", "deflate"]
-    if brotli is not None:
-        CONTENT_DECODERS += ["br"]
-    REDIRECT_STATUSES = [301, 302, 303, 307, 308]
-
-    def __init__(
-        self,
-        body="",
-        headers=None,
-        status=0,
-        version=0,
-        reason=None,
-        strict=0,
-        preload_content=True,
-        decode_content=True,
-        original_response=None,
-        pool=None,
-        connection=None,
-        msg=None,
-        retries=None,
-        enforce_content_length=False,
-        request_method=None,
-        request_url=None,
-        auto_close=True,
-    ):
-
-        if isinstance(headers, HTTPHeaderDict):
-            self.headers = headers
-        else:
-            self.headers = HTTPHeaderDict(headers)
-        self.status = status
-        self.version = version
-        self.reason = reason
-        self.strict = strict
-        self.decode_content = decode_content
-        self.retries = retries
-        self.enforce_content_length = enforce_content_length
-        self.auto_close = auto_close
-
-        self._decoder = None
-        self._body = None
-        self._fp = None
-        self._original_response = original_response
-        self._fp_bytes_read = 0
-        self.msg = msg
-        self._request_url = request_url
-
-        if body and isinstance(body, (six.string_types, bytes)):
-            self._body = body
-
-        self._pool = pool
-        self._connection = connection
-
-        if hasattr(body, "read"):
-            self._fp = body
-
-        # Are we using the chunked-style of transfer encoding?
-        self.chunked = False
-        self.chunk_left = None
-        tr_enc = self.headers.get("transfer-encoding", "").lower()
-        # Don't incur the penalty of creating a list and then discarding it
-        encodings = (enc.strip() for enc in tr_enc.split(","))
-        if "chunked" in encodings:
-            self.chunked = True
-
-        # Determine length of response
-        self.length_remaining = self._init_length(request_method)
-
-        # If requested, preload the body.
-        if preload_content and not self._body:
-            self._body = self.read(decode_content=decode_content)
-
-    def get_redirect_location(self):
-        """
-        Should we redirect and where to?
-
-        :returns: Truthy redirect location string if we got a redirect status
-            code and valid location. ``None`` if redirect status and no
-            location. ``False`` if not a redirect status code.
-        """
-        if self.status in self.REDIRECT_STATUSES:
-            return self.headers.get("location")
-
-        return False
-
-    def release_conn(self):
-        if not self._pool or not self._connection:
-            return
-
-        self._pool._put_conn(self._connection)
-        self._connection = None
-
-    def drain_conn(self):
-        """
-        Read and discard any remaining HTTP response data in the response connection.
-
-        Unread data in the HTTPResponse connection blocks the connection from being released back to the pool.
-        """
-        try:
-            self.read()
-        except (HTTPError, SocketError, BaseSSLError, HTTPException):
-            pass
-
-    @property
-    def data(self):
-        # For backwards-compat with earlier urllib3 0.4 and earlier.
-        if self._body:
-            return self._body
-
-        if self._fp:
-            return self.read(cache_content=True)
-
-    @property
-    def connection(self):
-        return self._connection
-
-    def isclosed(self):
-        return is_fp_closed(self._fp)
-
-    def tell(self):
-        """
-        Obtain the number of bytes pulled over the wire so far. May differ from
-        the amount of content returned by :meth:``urllib3.response.HTTPResponse.read``
-        if bytes are encoded on the wire (e.g, compressed).
-        """
-        return self._fp_bytes_read
-
-    def _init_length(self, request_method):
-        """
-        Set initial length value for Response content if available.
-        """
-        length = self.headers.get("content-length")
-
-        if length is not None:
-            if self.chunked:
-                # This Response will fail with an IncompleteRead if it can't be
-                # received as chunked. This method falls back to attempt reading
-                # the response before raising an exception.
-                log.warning(
-                    "Received response with both Content-Length and "
-                    "Transfer-Encoding set. This is expressly forbidden "
-                    "by RFC 7230 sec 3.3.2. Ignoring Content-Length and "
-                    "attempting to process response as Transfer-Encoding: "
-                    "chunked."
-                )
-                return None
-
-            try:
-                # RFC 7230 section 3.3.2 specifies multiple content lengths can
-                # be sent in a single Content-Length header
-                # (e.g. Content-Length: 42, 42). This line ensures the values
-                # are all valid ints and that as long as the `set` length is 1,
-                # all values are the same. Otherwise, the header is invalid.
-                lengths = set([int(val) for val in length.split(",")])
-                if len(lengths) > 1:
-                    raise InvalidHeader(
-                        "Content-Length contained multiple "
-                        "unmatching values (%s)" % length
-                    )
-                length = lengths.pop()
-            except ValueError:
-                length = None
-            else:
-                if length < 0:
-                    length = None
-
-        # Convert status to int for comparison
-        # In some cases, httplib returns a status of "_UNKNOWN"
-        try:
-            status = int(self.status)
-        except ValueError:
-            status = 0
-
-        # Check for responses that shouldn't include a body
-        if status in (204, 304) or 100 <= status < 200 or request_method == "HEAD":
-            length = 0
-
-        return length
-
-    def _init_decoder(self):
-        """
-        Set-up the _decoder attribute if necessary.
-        """
-        # Note: content-encoding value should be case-insensitive, per RFC 7230
-        # Section 3.2
-        content_encoding = self.headers.get("content-encoding", "").lower()
-        if self._decoder is None:
-            if content_encoding in self.CONTENT_DECODERS:
-                self._decoder = _get_decoder(content_encoding)
-            elif "," in content_encoding:
-                encodings = [
-                    e.strip()
-                    for e in content_encoding.split(",")
-                    if e.strip() in self.CONTENT_DECODERS
-                ]
-                if len(encodings):
-                    self._decoder = _get_decoder(content_encoding)
-
-    DECODER_ERROR_CLASSES = (IOError, zlib.error)
-    if brotli is not None:
-        DECODER_ERROR_CLASSES += (brotli.error,)
-
-    def _decode(self, data, decode_content, flush_decoder):
-        """
-        Decode the data passed in and potentially flush the decoder.
-        """
-        if not decode_content:
-            return data
-
-        try:
-            if self._decoder:
-                data = self._decoder.decompress(data)
-        except self.DECODER_ERROR_CLASSES as e:
-            content_encoding = self.headers.get("content-encoding", "").lower()
-            raise DecodeError(
-                "Received response with content-encoding: %s, but "
-                "failed to decode it." % content_encoding,
-                e,
-            )
-        if flush_decoder:
-            data += self._flush_decoder()
-
-        return data
-
-    def _flush_decoder(self):
-        """
-        Flushes the decoder. Should only be called if the decoder is actually
-        being used.
-        """
-        if self._decoder:
-            buf = self._decoder.decompress(b"")
-            return buf + self._decoder.flush()
-
-        return b""
-
-    @contextmanager
-    def _error_catcher(self):
-        """
-        Catch low-level python exceptions, instead re-raising urllib3
-        variants, so that low-level exceptions are not leaked in the
-        high-level api.
-
-        On exit, release the connection back to the pool.
-        """
-        clean_exit = False
-
-        try:
-            try:
-                yield
-
-            except SocketTimeout:
-                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
-                # there is yet no clean way to get at it from this context.
-                raise ReadTimeoutError(self._pool, None, "Read timed out.")
-
-            except BaseSSLError as e:
-                # FIXME: Is there a better way to differentiate between SSLErrors?
-                if "read operation timed out" not in str(e):
-                    # SSL errors related to framing/MAC get wrapped and reraised here
-                    raise SSLError(e)
-
-                raise ReadTimeoutError(self._pool, None, "Read timed out.")
-
-            except (HTTPException, SocketError) as e:
-                # This includes IncompleteRead.
-                raise ProtocolError("Connection broken: %r" % e, e)
-
-            # If no exception is thrown, we should avoid cleaning up
-            # unnecessarily.
-            clean_exit = True
-        finally:
-            # If we didn't terminate cleanly, we need to throw away our
-            # connection.
-            if not clean_exit:
-                # The response may not be closed but we're not going to use it
-                # anymore so close it now to ensure that the connection is
-                # released back to the pool.
-                if self._original_response:
-                    self._original_response.close()
-
-                # Closing the response may not actually be sufficient to close
-                # everything, so if we have a hold of the connection close that
-                # too.
-                if self._connection:
-                    self._connection.close()
-
-            # If we hold the original response but it's closed now, we should
-            # return the connection back to the pool.
-            if self._original_response and self._original_response.isclosed():
-                self.release_conn()
-
-    def _fp_read(self, amt):
-        """
-        Read a response with the thought that reading the number of bytes
-        larger than can fit in a 32-bit int at a time via SSL in some
-        known cases leads to an overflow error that has to be prevented
-        if `amt` or `self.length_remaining` indicate that a problem may
-        happen.
-
-        The known cases:
-          * 3.8 <= CPython < 3.9.7 because of a bug
-            https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900.
-          * urllib3 injected with pyOpenSSL-backed SSL-support.
-          * CPython < 3.10 only when `amt` does not fit 32-bit int.
-        """
-        assert self._fp
-        c_int_max = 2 ** 31 - 1
-        if (
-            (
-                (amt and amt > c_int_max)
-                or (self.length_remaining and self.length_remaining > c_int_max)
-            )
-            and not util.IS_SECURETRANSPORT
-            and (util.IS_PYOPENSSL or sys.version_info < (3, 10))
-        ):
-            buffer = io.BytesIO()
-            # Besides `max_chunk_amt` being a maximum chunk size, it
-            # affects memory overhead of reading a response by this
-            # method in CPython.
-            # `c_int_max` equal to 2 GiB - 1 byte is the actual maximum
-            # chunk size that does not lead to an overflow error, but
-            # 256 MiB is a compromise.
-            max_chunk_amt = 2 ** 28
-            while amt is None or amt != 0:
-                if amt is not None:
-                    chunk_amt = min(amt, max_chunk_amt)
-                    amt -= chunk_amt
-                else:
-                    chunk_amt = max_chunk_amt
-                data = self._fp.read(chunk_amt)
-                if not data:
-                    break
-                buffer.write(data)
-                del data  # to reduce peak memory usage by `max_chunk_amt`.
-            return buffer.getvalue()
-        else:
-            # StringIO doesn't like amt=None
-            return self._fp.read(amt) if amt is not None else self._fp.read()
-
-    def read(self, amt=None, decode_content=None, cache_content=False):
-        """
-        Similar to :meth:`http.client.HTTPResponse.read`, but with two additional
-        parameters: ``decode_content`` and ``cache_content``.
-
-        :param amt:
-            How much of the content to read. If specified, caching is skipped
-            because it doesn't make sense to cache partial content as the full
-            response.
-
-        :param decode_content:
-            If True, will attempt to decode the body based on the
-            'content-encoding' header.
-
-        :param cache_content:
-            If True, will save the returned data such that the same result is
-            returned despite of the state of the underlying file object. This
-            is useful if you want the ``.data`` property to continue working
-            after having ``.read()`` the file object. (Overridden if ``amt`` is
-            set.)
-        """
-        self._init_decoder()
-        if decode_content is None:
-            decode_content = self.decode_content
-
-        if self._fp is None:
-            return
-
-        flush_decoder = False
-        fp_closed = getattr(self._fp, "closed", False)
-
-        with self._error_catcher():
-            data = self._fp_read(amt) if not fp_closed else b""
-            if amt is None:
-                flush_decoder = True
-            else:
-                cache_content = False
-                if (
-                    amt != 0 and not data
-                ):  # Platform-specific: Buggy versions of Python.
-                    # Close the connection when no data is returned
-                    #
-                    # This is redundant to what httplib/http.client _should_
-                    # already do.  However, versions of python released before
-                    # December 15, 2012 (http://bugs.python.org/issue16298) do
-                    # not properly close the connection in all cases. There is
-                    # no harm in redundantly calling close.
-                    self._fp.close()
-                    flush_decoder = True
-                    if self.enforce_content_length and self.length_remaining not in (
-                        0,
-                        None,
-                    ):
-                        # This is an edge case that httplib failed to cover due
-                        # to concerns of backward compatibility. We're
-                        # addressing it here to make sure IncompleteRead is
-                        # raised during streaming, so all calls with incorrect
-                        # Content-Length are caught.
-                        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
-
-        if data:
-            self._fp_bytes_read += len(data)
-            if self.length_remaining is not None:
-                self.length_remaining -= len(data)
-
-            data = self._decode(data, decode_content, flush_decoder)
-
-            if cache_content:
-                self._body = data
-
-        return data
-
-    def stream(self, amt=2 ** 16, decode_content=None):
-        """
-        A generator wrapper for the read() method. A call will block until
-        ``amt`` bytes have been read from the connection or until the
-        connection is closed.
-
-        :param amt:
-            How much of the content to read. The generator will return up to
-            much data per iteration, but may return less. This is particularly
-            likely when using compressed data. However, the empty string will
-            never be returned.
-
-        :param decode_content:
-            If True, will attempt to decode the body based on the
-            'content-encoding' header.
-        """
-        if self.chunked and self.supports_chunked_reads():
-            for line in self.read_chunked(amt, decode_content=decode_content):
-                yield line
-        else:
-            while not is_fp_closed(self._fp):
-                data = self.read(amt=amt, decode_content=decode_content)
-
-                if data:
-                    yield data
-
-    @classmethod
-    def from_httplib(ResponseCls, r, **response_kw):
-        """
-        Given an :class:`http.client.HTTPResponse` instance ``r``, return a
-        corresponding :class:`urllib3.response.HTTPResponse` object.
-
-        Remaining parameters are passed to the HTTPResponse constructor, along
-        with ``original_response=r``.
-        """
-        headers = r.msg
-
-        if not isinstance(headers, HTTPHeaderDict):
-            if six.PY2:
-                # Python 2.7
-                headers = HTTPHeaderDict.from_httplib(headers)
-            else:
-                headers = HTTPHeaderDict(headers.items())
-
-        # HTTPResponse objects in Python 3 don't have a .strict attribute
-        strict = getattr(r, "strict", 0)
-        resp = ResponseCls(
-            body=r,
-            headers=headers,
-            status=r.status,
-            version=r.version,
-            reason=r.reason,
-            strict=strict,
-            original_response=r,
-            **response_kw
-        )
-        return resp
-
-    # Backwards-compatibility methods for http.client.HTTPResponse
-    def getheaders(self):
-        warnings.warn(
-            "HTTPResponse.getheaders() is deprecated and will be removed "
-            "in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.",
-            category=DeprecationWarning,
-            stacklevel=2,
-        )
-        return self.headers
-
-    def getheader(self, name, default=None):
-        warnings.warn(
-            "HTTPResponse.getheader() is deprecated and will be removed "
-            "in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).",
-            category=DeprecationWarning,
-            stacklevel=2,
-        )
-        return self.headers.get(name, default)
-
-    # Backwards compatibility for http.cookiejar
-    def info(self):
-        return self.headers
-
-    # Overrides from io.IOBase
-    def close(self):
-        if not self.closed:
-            self._fp.close()
-
-        if self._connection:
-            self._connection.close()
-
-        if not self.auto_close:
-            io.IOBase.close(self)
-
-    @property
-    def closed(self):
-        if not self.auto_close:
-            return io.IOBase.closed.__get__(self)
-        elif self._fp is None:
-            return True
-        elif hasattr(self._fp, "isclosed"):
-            return self._fp.isclosed()
-        elif hasattr(self._fp, "closed"):
-            return self._fp.closed
-        else:
-            return True
-
-    def fileno(self):
-        if self._fp is None:
-            raise IOError("HTTPResponse has no file to get a fileno from")
-        elif hasattr(self._fp, "fileno"):
-            return self._fp.fileno()
-        else:
-            raise IOError(
-                "The file-like object this HTTPResponse is wrapped "
-                "around has no file descriptor"
-            )
-
-    def flush(self):
-        if (
-            self._fp is not None
-            and hasattr(self._fp, "flush")
-            and not getattr(self._fp, "closed", False)
-        ):
-            return self._fp.flush()
-
-    def readable(self):
-        # This method is required for `io` module compatibility.
-        return True
-
-    def readinto(self, b):
-        # This method is required for `io` module compatibility.
-        temp = self.read(len(b))
-        if len(temp) == 0:
-            return 0
-        else:
-            b[: len(temp)] = temp
-            return len(temp)
-
-    def supports_chunked_reads(self):
-        """
-        Checks if the underlying file-like object looks like a
-        :class:`http.client.HTTPResponse` object. We do this by testing for
-        the fp attribute. If it is present we assume it returns raw chunks as
-        processed by read_chunked().
-        """
-        return hasattr(self._fp, "fp")
-
-    def _update_chunk_length(self):
-        # First, we'll figure out length of a chunk and then
-        # we'll try to read it from socket.
-        if self.chunk_left is not None:
-            return
-        line = self._fp.fp.readline()
-        line = line.split(b";", 1)[0]
-        try:
-            self.chunk_left = int(line, 16)
-        except ValueError:
-            # Invalid chunked protocol response, abort.
-            self.close()
-            raise InvalidChunkLength(self, line)
-
-    def _handle_chunk(self, amt):
-        returned_chunk = None
-        if amt is None:
-            chunk = self._fp._safe_read(self.chunk_left)
-            returned_chunk = chunk
-            self._fp._safe_read(2)  # Toss the CRLF at the end of the chunk.
-            self.chunk_left = None
-        elif amt < self.chunk_left:
-            value = self._fp._safe_read(amt)
-            self.chunk_left = self.chunk_left - amt
-            returned_chunk = value
-        elif amt == self.chunk_left:
-            value = self._fp._safe_read(amt)
-            self._fp._safe_read(2)  # Toss the CRLF at the end of the chunk.
-            self.chunk_left = None
-            returned_chunk = value
-        else:  # amt > self.chunk_left
-            returned_chunk = self._fp._safe_read(self.chunk_left)
-            self._fp._safe_read(2)  # Toss the CRLF at the end of the chunk.
-            self.chunk_left = None
-        return returned_chunk
-
-    def read_chunked(self, amt=None, decode_content=None):
-        """
-        Similar to :meth:`HTTPResponse.read`, but with an additional
-        parameter: ``decode_content``.
-
-        :param amt:
-            How much of the content to read. If specified, caching is skipped
-            because it doesn't make sense to cache partial content as the full
-            response.
-
-        :param decode_content:
-            If True, will attempt to decode the body based on the
-            'content-encoding' header.
-        """
-        self._init_decoder()
-        # FIXME: Rewrite this method and make it a class with a better structured logic.
-        if not self.chunked:
-            raise ResponseNotChunked(
-                "Response is not chunked. "
-                "Header 'transfer-encoding: chunked' is missing."
-            )
-        if not self.supports_chunked_reads():
-            raise BodyNotHttplibCompatible(
-                "Body should be http.client.HTTPResponse like. "
-                "It should have have an fp attribute which returns raw chunks."
-            )
-
-        with self._error_catcher():
-            # Don't bother reading the body of a HEAD request.
-            if self._original_response and is_response_to_head(self._original_response):
-                self._original_response.close()
-                return
-
-            # If a response is already read and closed
-            # then return immediately.
-            if self._fp.fp is None:
-                return
-
-            while True:
-                self._update_chunk_length()
-                if self.chunk_left == 0:
-                    break
-                chunk = self._handle_chunk(amt)
-                decoded = self._decode(
-                    chunk, decode_content=decode_content, flush_decoder=False
-                )
-                if decoded:
-                    yield decoded
-
-            if decode_content:
-                # On CPython and PyPy, we should never need to flush the
-                # decoder. However, on Jython we *might* need to, so
-                # lets defensively do it anyway.
-                decoded = self._flush_decoder()
-                if decoded:  # Platform-specific: Jython.
-                    yield decoded
-
-            # Chunk content ends with \r\n: discard it.
-            while True:
-                line = self._fp.fp.readline()
-                if not line:
-                    # Some sites may not end with '\r\n'.
-                    break
-                if line == b"\r\n":
-                    break
-
-            # We read everything; close the "file".
-            if self._original_response:
-                self._original_response.close()
-
-    def geturl(self):
-        """
-        Returns the URL that was the source of this response.
-        If the request that generated this response redirected, this method
-        will return the final redirect location.
-        """
-        if self.retries is not None and len(self.retries.history):
-            return self.retries.history[-1].redirect_location
-        else:
-            return self._request_url
-
-    def __iter__(self):
-        buffer = []
-        for chunk in self.stream(decode_content=True):
-            if b"\n" in chunk:
-                chunk = chunk.split(b"\n")
-                yield b"".join(buffer) + chunk[0] + b"\n"
-                for x in chunk[1:-1]:
-                    yield x + b"\n"
-                if chunk[-1]:
-                    buffer = [chunk[-1]]
-                else:
-                    buffer = []
-            else:
-                buffer.append(chunk)
-        if buffer:
-            yield b"".join(buffer)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py
deleted file mode 100644
index 4547fc522..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py
+++ /dev/null
@@ -1,49 +0,0 @@
-from __future__ import absolute_import
-
-# For backwards compatibility, provide imports that used to be here.
-from .connection import is_connection_dropped
-from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers
-from .response import is_fp_closed
-from .retry import Retry
-from .ssl_ import (
-    ALPN_PROTOCOLS,
-    HAS_SNI,
-    IS_PYOPENSSL,
-    IS_SECURETRANSPORT,
-    PROTOCOL_TLS,
-    SSLContext,
-    assert_fingerprint,
-    resolve_cert_reqs,
-    resolve_ssl_version,
-    ssl_wrap_socket,
-)
-from .timeout import Timeout, current_time
-from .url import Url, get_host, parse_url, split_first
-from .wait import wait_for_read, wait_for_write
-
-__all__ = (
-    "HAS_SNI",
-    "IS_PYOPENSSL",
-    "IS_SECURETRANSPORT",
-    "SSLContext",
-    "PROTOCOL_TLS",
-    "ALPN_PROTOCOLS",
-    "Retry",
-    "Timeout",
-    "Url",
-    "assert_fingerprint",
-    "current_time",
-    "is_connection_dropped",
-    "is_fp_closed",
-    "get_host",
-    "parse_url",
-    "make_headers",
-    "resolve_cert_reqs",
-    "resolve_ssl_version",
-    "split_first",
-    "ssl_wrap_socket",
-    "wait_for_read",
-    "wait_for_write",
-    "SKIP_HEADER",
-    "SKIPPABLE_HEADERS",
-)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index b21278f4a..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-314.pyc
deleted file mode 100644
index 5a37a3b9d..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-314.pyc
deleted file mode 100644
index 983681f0f..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/queue.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/queue.cpython-314.pyc
deleted file mode 100644
index 5366a7a48..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/queue.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-314.pyc
deleted file mode 100644
index 6a294bc4a..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-314.pyc
deleted file mode 100644
index 71f9c5c29..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-314.pyc
deleted file mode 100644
index 780e6c2c3..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-314.pyc
deleted file mode 100644
index c45b0412d..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-314.pyc
deleted file mode 100644
index 996c9fbc0..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-314.pyc
deleted file mode 100644
index e38f65159..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-314.pyc
deleted file mode 100644
index c5c32555c..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-314.pyc
deleted file mode 100644
index 7b3b05dc2..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-314.pyc b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-314.pyc
deleted file mode 100644
index 201637872..000000000
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/connection.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/connection.py
deleted file mode 100644
index 6af1138f2..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/connection.py
+++ /dev/null
@@ -1,149 +0,0 @@
-from __future__ import absolute_import
-
-import socket
-
-from ..contrib import _appengine_environ
-from ..exceptions import LocationParseError
-from ..packages import six
-from .wait import NoWayToWaitForSocketError, wait_for_read
-
-
-def is_connection_dropped(conn):  # Platform-specific
-    """
-    Returns True if the connection is dropped and should be closed.
-
-    :param conn:
-        :class:`http.client.HTTPConnection` object.
-
-    Note: For platforms like AppEngine, this will always return ``False`` to
-    let the platform handle connection recycling transparently for us.
-    """
-    sock = getattr(conn, "sock", False)
-    if sock is False:  # Platform-specific: AppEngine
-        return False
-    if sock is None:  # Connection already closed (such as by httplib).
-        return True
-    try:
-        # Returns True if readable, which here means it's been dropped
-        return wait_for_read(sock, timeout=0.0)
-    except NoWayToWaitForSocketError:  # Platform-specific: AppEngine
-        return False
-
-
-# This function is copied from socket.py in the Python 2.7 standard
-# library test suite. Added to its signature is only `socket_options`.
-# One additional modification is that we avoid binding to IPv6 servers
-# discovered in DNS if the system doesn't have IPv6 functionality.
-def create_connection(
-    address,
-    timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
-    source_address=None,
-    socket_options=None,
-):
-    """Connect to *address* and return the socket object.
-
-    Convenience function.  Connect to *address* (a 2-tuple ``(host,
-    port)``) and return the socket object.  Passing the optional
-    *timeout* parameter will set the timeout on the socket instance
-    before attempting to connect.  If no *timeout* is supplied, the
-    global default timeout setting returned by :func:`socket.getdefaulttimeout`
-    is used.  If *source_address* is set it must be a tuple of (host, port)
-    for the socket to bind as a source address before making the connection.
-    An host of '' or port 0 tells the OS to use the default.
-    """
-
-    host, port = address
-    if host.startswith("["):
-        host = host.strip("[]")
-    err = None
-
-    # Using the value from allowed_gai_family() in the context of getaddrinfo lets
-    # us select whether to work with IPv4 DNS records, IPv6 records, or both.
-    # The original create_connection function always returns all records.
-    family = allowed_gai_family()
-
-    try:
-        host.encode("idna")
-    except UnicodeError:
-        return six.raise_from(
-            LocationParseError(u"'%s', label empty or too long" % host), None
-        )
-
-    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
-        af, socktype, proto, canonname, sa = res
-        sock = None
-        try:
-            sock = socket.socket(af, socktype, proto)
-
-            # If provided, set socket level options before connecting.
-            _set_socket_options(sock, socket_options)
-
-            if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
-                sock.settimeout(timeout)
-            if source_address:
-                sock.bind(source_address)
-            sock.connect(sa)
-            return sock
-
-        except socket.error as e:
-            err = e
-            if sock is not None:
-                sock.close()
-                sock = None
-
-    if err is not None:
-        raise err
-
-    raise socket.error("getaddrinfo returns an empty list")
-
-
-def _set_socket_options(sock, options):
-    if options is None:
-        return
-
-    for opt in options:
-        sock.setsockopt(*opt)
-
-
-def allowed_gai_family():
-    """This function is designed to work in the context of
-    getaddrinfo, where family=socket.AF_UNSPEC is the default and
-    will perform a DNS search for both IPv6 and IPv4 records."""
-
-    family = socket.AF_INET
-    if HAS_IPV6:
-        family = socket.AF_UNSPEC
-    return family
-
-
-def _has_ipv6(host):
-    """Returns True if the system can bind an IPv6 address."""
-    sock = None
-    has_ipv6 = False
-
-    # App Engine doesn't support IPV6 sockets and actually has a quota on the
-    # number of sockets that can be used, so just early out here instead of
-    # creating a socket needlessly.
-    # See https://github.com/urllib3/urllib3/issues/1446
-    if _appengine_environ.is_appengine_sandbox():
-        return False
-
-    if socket.has_ipv6:
-        # has_ipv6 returns true if cPython was compiled with IPv6 support.
-        # It does not tell us if the system has IPv6 support enabled. To
-        # determine that we must bind to an IPv6 address.
-        # https://github.com/urllib3/urllib3/pull/611
-        # https://bugs.python.org/issue658327
-        try:
-            sock = socket.socket(socket.AF_INET6)
-            sock.bind((host, 0))
-            has_ipv6 = True
-        except Exception:
-            pass
-
-    if sock:
-        sock.close()
-    return has_ipv6
-
-
-HAS_IPV6 = _has_ipv6("::1")
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py
deleted file mode 100644
index 2199cc7b7..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py
+++ /dev/null
@@ -1,57 +0,0 @@
-from .ssl_ import create_urllib3_context, resolve_cert_reqs, resolve_ssl_version
-
-
-def connection_requires_http_tunnel(
-    proxy_url=None, proxy_config=None, destination_scheme=None
-):
-    """
-    Returns True if the connection requires an HTTP CONNECT through the proxy.
-
-    :param URL proxy_url:
-        URL of the proxy.
-    :param ProxyConfig proxy_config:
-        Proxy configuration from poolmanager.py
-    :param str destination_scheme:
-        The scheme of the destination. (i.e https, http, etc)
-    """
-    # If we're not using a proxy, no way to use a tunnel.
-    if proxy_url is None:
-        return False
-
-    # HTTP destinations never require tunneling, we always forward.
-    if destination_scheme == "http":
-        return False
-
-    # Support for forwarding with HTTPS proxies and HTTPS destinations.
-    if (
-        proxy_url.scheme == "https"
-        and proxy_config
-        and proxy_config.use_forwarding_for_https
-    ):
-        return False
-
-    # Otherwise always use a tunnel.
-    return True
-
-
-def create_proxy_ssl_context(
-    ssl_version, cert_reqs, ca_certs=None, ca_cert_dir=None, ca_cert_data=None
-):
-    """
-    Generates a default proxy ssl context if one hasn't been provided by the
-    user.
-    """
-    ssl_context = create_urllib3_context(
-        ssl_version=resolve_ssl_version(ssl_version),
-        cert_reqs=resolve_cert_reqs(cert_reqs),
-    )
-
-    if (
-        not ca_certs
-        and not ca_cert_dir
-        and not ca_cert_data
-        and hasattr(ssl_context, "load_default_certs")
-    ):
-        ssl_context.load_default_certs()
-
-    return ssl_context
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/queue.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/queue.py
deleted file mode 100644
index 41784104e..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/queue.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import collections
-
-from ..packages import six
-from ..packages.six.moves import queue
-
-if six.PY2:
-    # Queue is imported for side effects on MS Windows. See issue #229.
-    import Queue as _unused_module_Queue  # noqa: F401
-
-
-class LifoQueue(queue.Queue):
-    def _init(self, _):
-        self.queue = collections.deque()
-
-    def _qsize(self, len=len):
-        return len(self.queue)
-
-    def _put(self, item):
-        self.queue.append(item)
-
-    def _get(self):
-        return self.queue.pop()
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/request.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/request.py
deleted file mode 100644
index 330766ef4..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/request.py
+++ /dev/null
@@ -1,137 +0,0 @@
-from __future__ import absolute_import
-
-from base64 import b64encode
-
-from ..exceptions import UnrewindableBodyError
-from ..packages.six import b, integer_types
-
-# Pass as a value within ``headers`` to skip
-# emitting some HTTP headers that are added automatically.
-# The only headers that are supported are ``Accept-Encoding``,
-# ``Host``, and ``User-Agent``.
-SKIP_HEADER = "@@@SKIP_HEADER@@@"
-SKIPPABLE_HEADERS = frozenset(["accept-encoding", "host", "user-agent"])
-
-ACCEPT_ENCODING = "gzip,deflate"
-
-_FAILEDTELL = object()
-
-
-def make_headers(
-    keep_alive=None,
-    accept_encoding=None,
-    user_agent=None,
-    basic_auth=None,
-    proxy_basic_auth=None,
-    disable_cache=None,
-):
-    """
-    Shortcuts for generating request headers.
-
-    :param keep_alive:
-        If ``True``, adds 'connection: keep-alive' header.
-
-    :param accept_encoding:
-        Can be a boolean, list, or string.
-        ``True`` translates to 'gzip,deflate'.
-        List will get joined by comma.
-        String will be used as provided.
-
-    :param user_agent:
-        String representing the user-agent you want, such as
-        "python-urllib3/0.6"
-
-    :param basic_auth:
-        Colon-separated username:password string for 'authorization: basic ...'
-        auth header.
-
-    :param proxy_basic_auth:
-        Colon-separated username:password string for 'proxy-authorization: basic ...'
-        auth header.
-
-    :param disable_cache:
-        If ``True``, adds 'cache-control: no-cache' header.
-
-    Example::
-
-        >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
-        {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
-        >>> make_headers(accept_encoding=True)
-        {'accept-encoding': 'gzip,deflate'}
-    """
-    headers = {}
-    if accept_encoding:
-        if isinstance(accept_encoding, str):
-            pass
-        elif isinstance(accept_encoding, list):
-            accept_encoding = ",".join(accept_encoding)
-        else:
-            accept_encoding = ACCEPT_ENCODING
-        headers["accept-encoding"] = accept_encoding
-
-    if user_agent:
-        headers["user-agent"] = user_agent
-
-    if keep_alive:
-        headers["connection"] = "keep-alive"
-
-    if basic_auth:
-        headers["authorization"] = "Basic " + b64encode(b(basic_auth)).decode("utf-8")
-
-    if proxy_basic_auth:
-        headers["proxy-authorization"] = "Basic " + b64encode(
-            b(proxy_basic_auth)
-        ).decode("utf-8")
-
-    if disable_cache:
-        headers["cache-control"] = "no-cache"
-
-    return headers
-
-
-def set_file_position(body, pos):
-    """
-    If a position is provided, move file to that point.
-    Otherwise, we'll attempt to record a position for future use.
-    """
-    if pos is not None:
-        rewind_body(body, pos)
-    elif getattr(body, "tell", None) is not None:
-        try:
-            pos = body.tell()
-        except (IOError, OSError):
-            # This differentiates from None, allowing us to catch
-            # a failed `tell()` later when trying to rewind the body.
-            pos = _FAILEDTELL
-
-    return pos
-
-
-def rewind_body(body, body_pos):
-    """
-    Attempt to rewind body to a certain position.
-    Primarily used for request redirects and retries.
-
-    :param body:
-        File-like object that supports seek.
-
-    :param int pos:
-        Position to seek to in file.
-    """
-    body_seek = getattr(body, "seek", None)
-    if body_seek is not None and isinstance(body_pos, integer_types):
-        try:
-            body_seek(body_pos)
-        except (IOError, OSError):
-            raise UnrewindableBodyError(
-                "An error occurred when rewinding request body for redirect/retry."
-            )
-    elif body_pos is _FAILEDTELL:
-        raise UnrewindableBodyError(
-            "Unable to record file position for rewinding "
-            "request body during a redirect/retry."
-        )
-    else:
-        raise ValueError(
-            "body_pos must be of type integer, instead it was %s." % type(body_pos)
-        )
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/response.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/response.py
deleted file mode 100644
index 5ea609cce..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/response.py
+++ /dev/null
@@ -1,107 +0,0 @@
-from __future__ import absolute_import
-
-from email.errors import MultipartInvariantViolationDefect, StartBoundaryNotFoundDefect
-
-from ..exceptions import HeaderParsingError
-from ..packages.six.moves import http_client as httplib
-
-
-def is_fp_closed(obj):
-    """
-    Checks whether a given file-like object is closed.
-
-    :param obj:
-        The file-like object to check.
-    """
-
-    try:
-        # Check `isclosed()` first, in case Python3 doesn't set `closed`.
-        # GH Issue #928
-        return obj.isclosed()
-    except AttributeError:
-        pass
-
-    try:
-        # Check via the official file-like-object way.
-        return obj.closed
-    except AttributeError:
-        pass
-
-    try:
-        # Check if the object is a container for another file-like object that
-        # gets released on exhaustion (e.g. HTTPResponse).
-        return obj.fp is None
-    except AttributeError:
-        pass
-
-    raise ValueError("Unable to determine whether fp is closed.")
-
-
-def assert_header_parsing(headers):
-    """
-    Asserts whether all headers have been successfully parsed.
-    Extracts encountered errors from the result of parsing headers.
-
-    Only works on Python 3.
-
-    :param http.client.HTTPMessage headers: Headers to verify.
-
-    :raises urllib3.exceptions.HeaderParsingError:
-        If parsing errors are found.
-    """
-
-    # This will fail silently if we pass in the wrong kind of parameter.
-    # To make debugging easier add an explicit check.
-    if not isinstance(headers, httplib.HTTPMessage):
-        raise TypeError("expected httplib.Message, got {0}.".format(type(headers)))
-
-    defects = getattr(headers, "defects", None)
-    get_payload = getattr(headers, "get_payload", None)
-
-    unparsed_data = None
-    if get_payload:
-        # get_payload is actually email.message.Message.get_payload;
-        # we're only interested in the result if it's not a multipart message
-        if not headers.is_multipart():
-            payload = get_payload()
-
-            if isinstance(payload, (bytes, str)):
-                unparsed_data = payload
-    if defects:
-        # httplib is assuming a response body is available
-        # when parsing headers even when httplib only sends
-        # header data to parse_headers() This results in
-        # defects on multipart responses in particular.
-        # See: https://github.com/urllib3/urllib3/issues/800
-
-        # So we ignore the following defects:
-        # - StartBoundaryNotFoundDefect:
-        #     The claimed start boundary was never found.
-        # - MultipartInvariantViolationDefect:
-        #     A message claimed to be a multipart but no subparts were found.
-        defects = [
-            defect
-            for defect in defects
-            if not isinstance(
-                defect, (StartBoundaryNotFoundDefect, MultipartInvariantViolationDefect)
-            )
-        ]
-
-    if defects or unparsed_data:
-        raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
-
-
-def is_response_to_head(response):
-    """
-    Checks whether the request of a response has been a HEAD-request.
-    Handles the quirks of AppEngine.
-
-    :param http.client.HTTPResponse response:
-        Response to check if the originating request
-        used 'HEAD' as a method.
-    """
-    # FIXME: Can we do this somehow without accessing private httplib _method?
-    method = response._method
-    if isinstance(method, int):  # Platform-specific: Appengine
-        return method == 3
-    return method.upper() == "HEAD"
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/retry.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/retry.py
deleted file mode 100644
index 9a1e90d0b..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/retry.py
+++ /dev/null
@@ -1,622 +0,0 @@
-from __future__ import absolute_import
-
-import email
-import logging
-import re
-import time
-import warnings
-from collections import namedtuple
-from itertools import takewhile
-
-from ..exceptions import (
-    ConnectTimeoutError,
-    InvalidHeader,
-    MaxRetryError,
-    ProtocolError,
-    ProxyError,
-    ReadTimeoutError,
-    ResponseError,
-)
-from ..packages import six
-
-log = logging.getLogger(__name__)
-
-
-# Data structure for representing the metadata of requests that result in a retry.
-RequestHistory = namedtuple(
-    "RequestHistory", ["method", "url", "error", "status", "redirect_location"]
-)
-
-
-# TODO: In v2 we can remove this sentinel and metaclass with deprecated options.
-_Default = object()
-
-
-class _RetryMeta(type):
-    @property
-    def DEFAULT_METHOD_WHITELIST(cls):
-        warnings.warn(
-            "Using 'Retry.DEFAULT_METHOD_WHITELIST' is deprecated and "
-            "will be removed in v2.0. Use 'Retry.DEFAULT_ALLOWED_METHODS' instead",
-            DeprecationWarning,
-        )
-        return cls.DEFAULT_ALLOWED_METHODS
-
-    @DEFAULT_METHOD_WHITELIST.setter
-    def DEFAULT_METHOD_WHITELIST(cls, value):
-        warnings.warn(
-            "Using 'Retry.DEFAULT_METHOD_WHITELIST' is deprecated and "
-            "will be removed in v2.0. Use 'Retry.DEFAULT_ALLOWED_METHODS' instead",
-            DeprecationWarning,
-        )
-        cls.DEFAULT_ALLOWED_METHODS = value
-
-    @property
-    def DEFAULT_REDIRECT_HEADERS_BLACKLIST(cls):
-        warnings.warn(
-            "Using 'Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST' is deprecated and "
-            "will be removed in v2.0. Use 'Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT' instead",
-            DeprecationWarning,
-        )
-        return cls.DEFAULT_REMOVE_HEADERS_ON_REDIRECT
-
-    @DEFAULT_REDIRECT_HEADERS_BLACKLIST.setter
-    def DEFAULT_REDIRECT_HEADERS_BLACKLIST(cls, value):
-        warnings.warn(
-            "Using 'Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST' is deprecated and "
-            "will be removed in v2.0. Use 'Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT' instead",
-            DeprecationWarning,
-        )
-        cls.DEFAULT_REMOVE_HEADERS_ON_REDIRECT = value
-
-    @property
-    def BACKOFF_MAX(cls):
-        warnings.warn(
-            "Using 'Retry.BACKOFF_MAX' is deprecated and "
-            "will be removed in v2.0. Use 'Retry.DEFAULT_BACKOFF_MAX' instead",
-            DeprecationWarning,
-        )
-        return cls.DEFAULT_BACKOFF_MAX
-
-    @BACKOFF_MAX.setter
-    def BACKOFF_MAX(cls, value):
-        warnings.warn(
-            "Using 'Retry.BACKOFF_MAX' is deprecated and "
-            "will be removed in v2.0. Use 'Retry.DEFAULT_BACKOFF_MAX' instead",
-            DeprecationWarning,
-        )
-        cls.DEFAULT_BACKOFF_MAX = value
-
-
-@six.add_metaclass(_RetryMeta)
-class Retry(object):
-    """Retry configuration.
-
-    Each retry attempt will create a new Retry object with updated values, so
-    they can be safely reused.
-
-    Retries can be defined as a default for a pool::
-
-        retries = Retry(connect=5, read=2, redirect=5)
-        http = PoolManager(retries=retries)
-        response = http.request('GET', 'http://example.com/')
-
-    Or per-request (which overrides the default for the pool)::
-
-        response = http.request('GET', 'http://example.com/', retries=Retry(10))
-
-    Retries can be disabled by passing ``False``::
-
-        response = http.request('GET', 'http://example.com/', retries=False)
-
-    Errors will be wrapped in :class:`~urllib3.exceptions.MaxRetryError` unless
-    retries are disabled, in which case the causing exception will be raised.
-
-    :param int total:
-        Total number of retries to allow. Takes precedence over other counts.
-
-        Set to ``None`` to remove this constraint and fall back on other
-        counts.
-
-        Set to ``0`` to fail on the first retry.
-
-        Set to ``False`` to disable and imply ``raise_on_redirect=False``.
-
-    :param int connect:
-        How many connection-related errors to retry on.
-
-        These are errors raised before the request is sent to the remote server,
-        which we assume has not triggered the server to process the request.
-
-        Set to ``0`` to fail on the first retry of this type.
-
-    :param int read:
-        How many times to retry on read errors.
-
-        These errors are raised after the request was sent to the server, so the
-        request may have side-effects.
-
-        Set to ``0`` to fail on the first retry of this type.
-
-    :param int redirect:
-        How many redirects to perform. Limit this to avoid infinite redirect
-        loops.
-
-        A redirect is a HTTP response with a status code 301, 302, 303, 307 or
-        308.
-
-        Set to ``0`` to fail on the first retry of this type.
-
-        Set to ``False`` to disable and imply ``raise_on_redirect=False``.
-
-    :param int status:
-        How many times to retry on bad status codes.
-
-        These are retries made on responses, where status code matches
-        ``status_forcelist``.
-
-        Set to ``0`` to fail on the first retry of this type.
-
-    :param int other:
-        How many times to retry on other errors.
-
-        Other errors are errors that are not connect, read, redirect or status errors.
-        These errors might be raised after the request was sent to the server, so the
-        request might have side-effects.
-
-        Set to ``0`` to fail on the first retry of this type.
-
-        If ``total`` is not set, it's a good idea to set this to 0 to account
-        for unexpected edge cases and avoid infinite retry loops.
-
-    :param iterable allowed_methods:
-        Set of uppercased HTTP method verbs that we should retry on.
-
-        By default, we only retry on methods which are considered to be
-        idempotent (multiple requests with the same parameters end with the
-        same state). See :attr:`Retry.DEFAULT_ALLOWED_METHODS`.
-
-        Set to a ``False`` value to retry on any verb.
-
-        .. warning::
-
-            Previously this parameter was named ``method_whitelist``, that
-            usage is deprecated in v1.26.0 and will be removed in v2.0.
-
-    :param iterable status_forcelist:
-        A set of integer HTTP status codes that we should force a retry on.
-        A retry is initiated if the request method is in ``allowed_methods``
-        and the response status code is in ``status_forcelist``.
-
-        By default, this is disabled with ``None``.
-
-    :param float backoff_factor:
-        A backoff factor to apply between attempts after the second try
-        (most errors are resolved immediately by a second try without a
-        delay). urllib3 will sleep for::
-
-            {backoff factor} * (2 ** ({number of total retries} - 1))
-
-        seconds. If the backoff_factor is 0.1, then :func:`.sleep` will sleep
-        for [0.0s, 0.2s, 0.4s, ...] between retries. It will never be longer
-        than :attr:`Retry.DEFAULT_BACKOFF_MAX`.
-
-        By default, backoff is disabled (set to 0).
-
-    :param bool raise_on_redirect: Whether, if the number of redirects is
-        exhausted, to raise a MaxRetryError, or to return a response with a
-        response code in the 3xx range.
-
-    :param bool raise_on_status: Similar meaning to ``raise_on_redirect``:
-        whether we should raise an exception, or return a response,
-        if status falls in ``status_forcelist`` range and retries have
-        been exhausted.
-
-    :param tuple history: The history of the request encountered during
-        each call to :meth:`~Retry.increment`. The list is in the order
-        the requests occurred. Each list item is of class :class:`RequestHistory`.
-
-    :param bool respect_retry_after_header:
-        Whether to respect Retry-After header on status codes defined as
-        :attr:`Retry.RETRY_AFTER_STATUS_CODES` or not.
-
-    :param iterable remove_headers_on_redirect:
-        Sequence of headers to remove from the request when a response
-        indicating a redirect is returned before firing off the redirected
-        request.
-    """
-
-    #: Default methods to be used for ``allowed_methods``
-    DEFAULT_ALLOWED_METHODS = frozenset(
-        ["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE"]
-    )
-
-    #: Default status codes to be used for ``status_forcelist``
-    RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503])
-
-    #: Default headers to be used for ``remove_headers_on_redirect``
-    DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(
-        ["Cookie", "Authorization", "Proxy-Authorization"]
-    )
-
-    #: Maximum backoff time.
-    DEFAULT_BACKOFF_MAX = 120
-
-    def __init__(
-        self,
-        total=10,
-        connect=None,
-        read=None,
-        redirect=None,
-        status=None,
-        other=None,
-        allowed_methods=_Default,
-        status_forcelist=None,
-        backoff_factor=0,
-        raise_on_redirect=True,
-        raise_on_status=True,
-        history=None,
-        respect_retry_after_header=True,
-        remove_headers_on_redirect=_Default,
-        # TODO: Deprecated, remove in v2.0
-        method_whitelist=_Default,
-    ):
-
-        if method_whitelist is not _Default:
-            if allowed_methods is not _Default:
-                raise ValueError(
-                    "Using both 'allowed_methods' and "
-                    "'method_whitelist' together is not allowed. "
-                    "Instead only use 'allowed_methods'"
-                )
-            warnings.warn(
-                "Using 'method_whitelist' with Retry is deprecated and "
-                "will be removed in v2.0. Use 'allowed_methods' instead",
-                DeprecationWarning,
-                stacklevel=2,
-            )
-            allowed_methods = method_whitelist
-        if allowed_methods is _Default:
-            allowed_methods = self.DEFAULT_ALLOWED_METHODS
-        if remove_headers_on_redirect is _Default:
-            remove_headers_on_redirect = self.DEFAULT_REMOVE_HEADERS_ON_REDIRECT
-
-        self.total = total
-        self.connect = connect
-        self.read = read
-        self.status = status
-        self.other = other
-
-        if redirect is False or total is False:
-            redirect = 0
-            raise_on_redirect = False
-
-        self.redirect = redirect
-        self.status_forcelist = status_forcelist or set()
-        self.allowed_methods = allowed_methods
-        self.backoff_factor = backoff_factor
-        self.raise_on_redirect = raise_on_redirect
-        self.raise_on_status = raise_on_status
-        self.history = history or tuple()
-        self.respect_retry_after_header = respect_retry_after_header
-        self.remove_headers_on_redirect = frozenset(
-            [h.lower() for h in remove_headers_on_redirect]
-        )
-
-    def new(self, **kw):
-        params = dict(
-            total=self.total,
-            connect=self.connect,
-            read=self.read,
-            redirect=self.redirect,
-            status=self.status,
-            other=self.other,
-            status_forcelist=self.status_forcelist,
-            backoff_factor=self.backoff_factor,
-            raise_on_redirect=self.raise_on_redirect,
-            raise_on_status=self.raise_on_status,
-            history=self.history,
-            remove_headers_on_redirect=self.remove_headers_on_redirect,
-            respect_retry_after_header=self.respect_retry_after_header,
-        )
-
-        # TODO: If already given in **kw we use what's given to us
-        # If not given we need to figure out what to pass. We decide
-        # based on whether our class has the 'method_whitelist' property
-        # and if so we pass the deprecated 'method_whitelist' otherwise
-        # we use 'allowed_methods'. Remove in v2.0
-        if "method_whitelist" not in kw and "allowed_methods" not in kw:
-            if "method_whitelist" in self.__dict__:
-                warnings.warn(
-                    "Using 'method_whitelist' with Retry is deprecated and "
-                    "will be removed in v2.0. Use 'allowed_methods' instead",
-                    DeprecationWarning,
-                )
-                params["method_whitelist"] = self.allowed_methods
-            else:
-                params["allowed_methods"] = self.allowed_methods
-
-        params.update(kw)
-        return type(self)(**params)
-
-    @classmethod
-    def from_int(cls, retries, redirect=True, default=None):
-        """Backwards-compatibility for the old retries format."""
-        if retries is None:
-            retries = default if default is not None else cls.DEFAULT
-
-        if isinstance(retries, Retry):
-            return retries
-
-        redirect = bool(redirect) and None
-        new_retries = cls(retries, redirect=redirect)
-        log.debug("Converted retries value: %r -> %r", retries, new_retries)
-        return new_retries
-
-    def get_backoff_time(self):
-        """Formula for computing the current backoff
-
-        :rtype: float
-        """
-        # We want to consider only the last consecutive errors sequence (Ignore redirects).
-        consecutive_errors_len = len(
-            list(
-                takewhile(lambda x: x.redirect_location is None, reversed(self.history))
-            )
-        )
-        if consecutive_errors_len <= 1:
-            return 0
-
-        backoff_value = self.backoff_factor * (2 ** (consecutive_errors_len - 1))
-        return min(self.DEFAULT_BACKOFF_MAX, backoff_value)
-
-    def parse_retry_after(self, retry_after):
-        # Whitespace: https://tools.ietf.org/html/rfc7230#section-3.2.4
-        if re.match(r"^\s*[0-9]+\s*$", retry_after):
-            seconds = int(retry_after)
-        else:
-            retry_date_tuple = email.utils.parsedate_tz(retry_after)
-            if retry_date_tuple is None:
-                raise InvalidHeader("Invalid Retry-After header: %s" % retry_after)
-            if retry_date_tuple[9] is None:  # Python 2
-                # Assume UTC if no timezone was specified
-                # On Python2.7, parsedate_tz returns None for a timezone offset
-                # instead of 0 if no timezone is given, where mktime_tz treats
-                # a None timezone offset as local time.
-                retry_date_tuple = retry_date_tuple[:9] + (0,) + retry_date_tuple[10:]
-
-            retry_date = email.utils.mktime_tz(retry_date_tuple)
-            seconds = retry_date - time.time()
-
-        if seconds < 0:
-            seconds = 0
-
-        return seconds
-
-    def get_retry_after(self, response):
-        """Get the value of Retry-After in seconds."""
-
-        retry_after = response.headers.get("Retry-After")
-
-        if retry_after is None:
-            return None
-
-        return self.parse_retry_after(retry_after)
-
-    def sleep_for_retry(self, response=None):
-        retry_after = self.get_retry_after(response)
-        if retry_after:
-            time.sleep(retry_after)
-            return True
-
-        return False
-
-    def _sleep_backoff(self):
-        backoff = self.get_backoff_time()
-        if backoff <= 0:
-            return
-        time.sleep(backoff)
-
-    def sleep(self, response=None):
-        """Sleep between retry attempts.
-
-        This method will respect a server's ``Retry-After`` response header
-        and sleep the duration of the time requested. If that is not present, it
-        will use an exponential backoff. By default, the backoff factor is 0 and
-        this method will return immediately.
-        """
-
-        if self.respect_retry_after_header and response:
-            slept = self.sleep_for_retry(response)
-            if slept:
-                return
-
-        self._sleep_backoff()
-
-    def _is_connection_error(self, err):
-        """Errors when we're fairly sure that the server did not receive the
-        request, so it should be safe to retry.
-        """
-        if isinstance(err, ProxyError):
-            err = err.original_error
-        return isinstance(err, ConnectTimeoutError)
-
-    def _is_read_error(self, err):
-        """Errors that occur after the request has been started, so we should
-        assume that the server began processing it.
-        """
-        return isinstance(err, (ReadTimeoutError, ProtocolError))
-
-    def _is_method_retryable(self, method):
-        """Checks if a given HTTP method should be retried upon, depending if
-        it is included in the allowed_methods
-        """
-        # TODO: For now favor if the Retry implementation sets its own method_whitelist
-        # property outside of our constructor to avoid breaking custom implementations.
-        if "method_whitelist" in self.__dict__:
-            warnings.warn(
-                "Using 'method_whitelist' with Retry is deprecated and "
-                "will be removed in v2.0. Use 'allowed_methods' instead",
-                DeprecationWarning,
-            )
-            allowed_methods = self.method_whitelist
-        else:
-            allowed_methods = self.allowed_methods
-
-        if allowed_methods and method.upper() not in allowed_methods:
-            return False
-        return True
-
-    def is_retry(self, method, status_code, has_retry_after=False):
-        """Is this method/status code retryable? (Based on allowlists and control
-        variables such as the number of total retries to allow, whether to
-        respect the Retry-After header, whether this header is present, and
-        whether the returned status code is on the list of status codes to
-        be retried upon on the presence of the aforementioned header)
-        """
-        if not self._is_method_retryable(method):
-            return False
-
-        if self.status_forcelist and status_code in self.status_forcelist:
-            return True
-
-        return (
-            self.total
-            and self.respect_retry_after_header
-            and has_retry_after
-            and (status_code in self.RETRY_AFTER_STATUS_CODES)
-        )
-
-    def is_exhausted(self):
-        """Are we out of retries?"""
-        retry_counts = (
-            self.total,
-            self.connect,
-            self.read,
-            self.redirect,
-            self.status,
-            self.other,
-        )
-        retry_counts = list(filter(None, retry_counts))
-        if not retry_counts:
-            return False
-
-        return min(retry_counts) < 0
-
-    def increment(
-        self,
-        method=None,
-        url=None,
-        response=None,
-        error=None,
-        _pool=None,
-        _stacktrace=None,
-    ):
-        """Return a new Retry object with incremented retry counters.
-
-        :param response: A response object, or None, if the server did not
-            return a response.
-        :type response: :class:`~urllib3.response.HTTPResponse`
-        :param Exception error: An error encountered during the request, or
-            None if the response was received successfully.
-
-        :return: A new ``Retry`` object.
-        """
-        if self.total is False and error:
-            # Disabled, indicate to re-raise the error.
-            raise six.reraise(type(error), error, _stacktrace)
-
-        total = self.total
-        if total is not None:
-            total -= 1
-
-        connect = self.connect
-        read = self.read
-        redirect = self.redirect
-        status_count = self.status
-        other = self.other
-        cause = "unknown"
-        status = None
-        redirect_location = None
-
-        if error and self._is_connection_error(error):
-            # Connect retry?
-            if connect is False:
-                raise six.reraise(type(error), error, _stacktrace)
-            elif connect is not None:
-                connect -= 1
-
-        elif error and self._is_read_error(error):
-            # Read retry?
-            if read is False or not self._is_method_retryable(method):
-                raise six.reraise(type(error), error, _stacktrace)
-            elif read is not None:
-                read -= 1
-
-        elif error:
-            # Other retry?
-            if other is not None:
-                other -= 1
-
-        elif response and response.get_redirect_location():
-            # Redirect retry?
-            if redirect is not None:
-                redirect -= 1
-            cause = "too many redirects"
-            redirect_location = response.get_redirect_location()
-            status = response.status
-
-        else:
-            # Incrementing because of a server error like a 500 in
-            # status_forcelist and the given method is in the allowed_methods
-            cause = ResponseError.GENERIC_ERROR
-            if response and response.status:
-                if status_count is not None:
-                    status_count -= 1
-                cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
-                status = response.status
-
-        history = self.history + (
-            RequestHistory(method, url, error, status, redirect_location),
-        )
-
-        new_retry = self.new(
-            total=total,
-            connect=connect,
-            read=read,
-            redirect=redirect,
-            status=status_count,
-            other=other,
-            history=history,
-        )
-
-        if new_retry.is_exhausted():
-            raise MaxRetryError(_pool, url, error or ResponseError(cause))
-
-        log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
-
-        return new_retry
-
-    def __repr__(self):
-        return (
-            "{cls.__name__}(total={self.total}, connect={self.connect}, "
-            "read={self.read}, redirect={self.redirect}, status={self.status})"
-        ).format(cls=type(self), self=self)
-
-    def __getattr__(self, item):
-        if item == "method_whitelist":
-            # TODO: Remove this deprecated alias in v2.0
-            warnings.warn(
-                "Using 'method_whitelist' with Retry is deprecated and "
-                "will be removed in v2.0. Use 'allowed_methods' instead",
-                DeprecationWarning,
-            )
-            return self.allowed_methods
-        try:
-            return getattr(super(Retry, self), item)
-        except AttributeError:
-            return getattr(Retry, item)
-
-
-# For backwards compatibility (equivalent to pre-v1.9):
-Retry.DEFAULT = Retry(3)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py
deleted file mode 100644
index 0a6a0e06a..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py
+++ /dev/null
@@ -1,504 +0,0 @@
-from __future__ import absolute_import
-
-import hashlib
-import hmac
-import os
-import sys
-import warnings
-from binascii import hexlify, unhexlify
-
-from ..exceptions import (
-    InsecurePlatformWarning,
-    ProxySchemeUnsupported,
-    SNIMissingWarning,
-    SSLError,
-)
-from ..packages import six
-from .url import BRACELESS_IPV6_ADDRZ_RE, IPV4_RE
-
-SSLContext = None
-SSLTransport = None
-HAS_SNI = False
-IS_PYOPENSSL = False
-IS_SECURETRANSPORT = False
-ALPN_PROTOCOLS = ["http/1.1"]
-
-# Maps the length of a digest to a possible hash function producing this digest
-HASHFUNC_MAP = {
-    length: getattr(hashlib, algorithm, None)
-    for length, algorithm in ((32, "md5"), (40, "sha1"), (64, "sha256"))
-}
-
-
-def _const_compare_digest_backport(a, b):
-    """
-    Compare two digests of equal length in constant time.
-
-    The digests must be of type str/bytes.
-    Returns True if the digests match, and False otherwise.
-    """
-    result = abs(len(a) - len(b))
-    for left, right in zip(bytearray(a), bytearray(b)):
-        result |= left ^ right
-    return result == 0
-
-
-_const_compare_digest = getattr(hmac, "compare_digest", _const_compare_digest_backport)
-
-try:  # Test for SSL features
-    import ssl
-    from ssl import CERT_REQUIRED, wrap_socket
-except ImportError:
-    pass
-
-try:
-    from ssl import HAS_SNI  # Has SNI?
-except ImportError:
-    pass
-
-try:
-    from .ssltransport import SSLTransport
-except ImportError:
-    pass
-
-
-try:  # Platform-specific: Python 3.6
-    from ssl import PROTOCOL_TLS
-
-    PROTOCOL_SSLv23 = PROTOCOL_TLS
-except ImportError:
-    try:
-        from ssl import PROTOCOL_SSLv23 as PROTOCOL_TLS
-
-        PROTOCOL_SSLv23 = PROTOCOL_TLS
-    except ImportError:
-        PROTOCOL_SSLv23 = PROTOCOL_TLS = 2
-
-try:
-    from ssl import PROTOCOL_TLS_CLIENT
-except ImportError:
-    PROTOCOL_TLS_CLIENT = PROTOCOL_TLS
-
-
-try:
-    from ssl import OP_NO_COMPRESSION, OP_NO_SSLv2, OP_NO_SSLv3
-except ImportError:
-    OP_NO_SSLv2, OP_NO_SSLv3 = 0x1000000, 0x2000000
-    OP_NO_COMPRESSION = 0x20000
-
-
-try:  # OP_NO_TICKET was added in Python 3.6
-    from ssl import OP_NO_TICKET
-except ImportError:
-    OP_NO_TICKET = 0x4000
-
-
-# A secure default.
-# Sources for more information on TLS ciphers:
-#
-# - https://wiki.mozilla.org/Security/Server_Side_TLS
-# - https://www.ssllabs.com/projects/best-practices/index.html
-# - https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
-#
-# The general intent is:
-# - prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE),
-# - prefer ECDHE over DHE for better performance,
-# - prefer any AES-GCM and ChaCha20 over any AES-CBC for better performance and
-#   security,
-# - prefer AES-GCM over ChaCha20 because hardware-accelerated AES is common,
-# - disable NULL authentication, MD5 MACs, DSS, and other
-#   insecure ciphers for security reasons.
-# - NOTE: TLS 1.3 cipher suites are managed through a different interface
-#   not exposed by CPython (yet!) and are enabled by default if they're available.
-DEFAULT_CIPHERS = ":".join(
-    [
-        "ECDHE+AESGCM",
-        "ECDHE+CHACHA20",
-        "DHE+AESGCM",
-        "DHE+CHACHA20",
-        "ECDH+AESGCM",
-        "DH+AESGCM",
-        "ECDH+AES",
-        "DH+AES",
-        "RSA+AESGCM",
-        "RSA+AES",
-        "!aNULL",
-        "!eNULL",
-        "!MD5",
-        "!DSS",
-    ]
-)
-
-try:
-    from ssl import SSLContext  # Modern SSL?
-except ImportError:
-
-    class SSLContext(object):  # Platform-specific: Python 2
-        def __init__(self, protocol_version):
-            self.protocol = protocol_version
-            # Use default values from a real SSLContext
-            self.check_hostname = False
-            self.verify_mode = ssl.CERT_NONE
-            self.ca_certs = None
-            self.options = 0
-            self.certfile = None
-            self.keyfile = None
-            self.ciphers = None
-
-        def load_cert_chain(self, certfile, keyfile):
-            self.certfile = certfile
-            self.keyfile = keyfile
-
-        def load_verify_locations(self, cafile=None, capath=None, cadata=None):
-            self.ca_certs = cafile
-
-            if capath is not None:
-                raise SSLError("CA directories not supported in older Pythons")
-
-            if cadata is not None:
-                raise SSLError("CA data not supported in older Pythons")
-
-        def set_ciphers(self, cipher_suite):
-            self.ciphers = cipher_suite
-
-        def wrap_socket(self, socket, server_hostname=None, server_side=False):
-            warnings.warn(
-                "A true SSLContext object is not available. This prevents "
-                "urllib3 from configuring SSL appropriately and may cause "
-                "certain SSL connections to fail. You can upgrade to a newer "
-                "version of Python to solve this. For more information, see "
-                "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
-                "#ssl-warnings",
-                InsecurePlatformWarning,
-            )
-            kwargs = {
-                "keyfile": self.keyfile,
-                "certfile": self.certfile,
-                "ca_certs": self.ca_certs,
-                "cert_reqs": self.verify_mode,
-                "ssl_version": self.protocol,
-                "server_side": server_side,
-            }
-            return wrap_socket(socket, ciphers=self.ciphers, **kwargs)
-
-
-def assert_fingerprint(cert, fingerprint):
-    """
-    Checks if given fingerprint matches the supplied certificate.
-
-    :param cert:
-        Certificate as bytes object.
-    :param fingerprint:
-        Fingerprint as string of hexdigits, can be interspersed by colons.
-    """
-
-    fingerprint = fingerprint.replace(":", "").lower()
-    digest_length = len(fingerprint)
-    if digest_length not in HASHFUNC_MAP:
-        raise SSLError("Fingerprint of invalid length: {0}".format(fingerprint))
-    hashfunc = HASHFUNC_MAP.get(digest_length)
-    if hashfunc is None:
-        raise SSLError(
-            "Hash function implementation unavailable for fingerprint length: {0}".format(
-                digest_length
-            )
-        )
-
-    # We need encode() here for py32; works on py2 and p33.
-    fingerprint_bytes = unhexlify(fingerprint.encode())
-
-    cert_digest = hashfunc(cert).digest()
-
-    if not _const_compare_digest(cert_digest, fingerprint_bytes):
-        raise SSLError(
-            'Fingerprints did not match. Expected "{0}", got "{1}".'.format(
-                fingerprint, hexlify(cert_digest)
-            )
-        )
-
-
-def resolve_cert_reqs(candidate):
-    """
-    Resolves the argument to a numeric constant, which can be passed to
-    the wrap_socket function/method from the ssl module.
-    Defaults to :data:`ssl.CERT_REQUIRED`.
-    If given a string it is assumed to be the name of the constant in the
-    :mod:`ssl` module or its abbreviation.
-    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
-    If it's neither `None` nor a string we assume it is already the numeric
-    constant which can directly be passed to wrap_socket.
-    """
-    if candidate is None:
-        return CERT_REQUIRED
-
-    if isinstance(candidate, str):
-        res = getattr(ssl, candidate, None)
-        if res is None:
-            res = getattr(ssl, "CERT_" + candidate)
-        return res
-
-    return candidate
-
-
-def resolve_ssl_version(candidate):
-    """
-    like resolve_cert_reqs
-    """
-    if candidate is None:
-        return PROTOCOL_TLS
-
-    if isinstance(candidate, str):
-        res = getattr(ssl, candidate, None)
-        if res is None:
-            res = getattr(ssl, "PROTOCOL_" + candidate)
-        return res
-
-    return candidate
-
-
-def create_urllib3_context(
-    ssl_version=None, cert_reqs=None, options=None, ciphers=None
-):
-    """All arguments have the same meaning as ``ssl_wrap_socket``.
-
-    By default, this function does a lot of the same work that
-    ``ssl.create_default_context`` does on Python 3.4+. It:
-
-    - Disables SSLv2, SSLv3, and compression
-    - Sets a restricted set of server ciphers
-
-    If you wish to enable SSLv3, you can do::
-
-        from pip._vendor.urllib3.util import ssl_
-        context = ssl_.create_urllib3_context()
-        context.options &= ~ssl_.OP_NO_SSLv3
-
-    You can do the same to enable compression (substituting ``COMPRESSION``
-    for ``SSLv3`` in the last line above).
-
-    :param ssl_version:
-        The desired protocol version to use. This will default to
-        PROTOCOL_SSLv23 which will negotiate the highest protocol that both
-        the server and your installation of OpenSSL support.
-    :param cert_reqs:
-        Whether to require the certificate verification. This defaults to
-        ``ssl.CERT_REQUIRED``.
-    :param options:
-        Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
-        ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``, and ``ssl.OP_NO_TICKET``.
-    :param ciphers:
-        Which cipher suites to allow the server to select.
-    :returns:
-        Constructed SSLContext object with specified options
-    :rtype: SSLContext
-    """
-    # PROTOCOL_TLS is deprecated in Python 3.10
-    if not ssl_version or ssl_version == PROTOCOL_TLS:
-        ssl_version = PROTOCOL_TLS_CLIENT
-
-    context = SSLContext(ssl_version)
-
-    context.set_ciphers(ciphers or DEFAULT_CIPHERS)
-
-    # Setting the default here, as we may have no ssl module on import
-    cert_reqs = ssl.CERT_REQUIRED if cert_reqs is None else cert_reqs
-
-    if options is None:
-        options = 0
-        # SSLv2 is easily broken and is considered harmful and dangerous
-        options |= OP_NO_SSLv2
-        # SSLv3 has several problems and is now dangerous
-        options |= OP_NO_SSLv3
-        # Disable compression to prevent CRIME attacks for OpenSSL 1.0+
-        # (issue #309)
-        options |= OP_NO_COMPRESSION
-        # TLSv1.2 only. Unless set explicitly, do not request tickets.
-        # This may save some bandwidth on wire, and although the ticket is encrypted,
-        # there is a risk associated with it being on wire,
-        # if the server is not rotating its ticketing keys properly.
-        options |= OP_NO_TICKET
-
-    context.options |= options
-
-    # Enable post-handshake authentication for TLS 1.3, see GH #1634. PHA is
-    # necessary for conditional client cert authentication with TLS 1.3.
-    # The attribute is None for OpenSSL <= 1.1.0 or does not exist in older
-    # versions of Python.  We only enable on Python 3.7.4+ or if certificate
-    # verification is enabled to work around Python issue #37428
-    # See: https://bugs.python.org/issue37428
-    if (cert_reqs == ssl.CERT_REQUIRED or sys.version_info >= (3, 7, 4)) and getattr(
-        context, "post_handshake_auth", None
-    ) is not None:
-        context.post_handshake_auth = True
-
-    def disable_check_hostname():
-        if (
-            getattr(context, "check_hostname", None) is not None
-        ):  # Platform-specific: Python 3.2
-            # We do our own verification, including fingerprints and alternative
-            # hostnames. So disable it here
-            context.check_hostname = False
-
-    # The order of the below lines setting verify_mode and check_hostname
-    # matter due to safe-guards SSLContext has to prevent an SSLContext with
-    # check_hostname=True, verify_mode=NONE/OPTIONAL. This is made even more
-    # complex because we don't know whether PROTOCOL_TLS_CLIENT will be used
-    # or not so we don't know the initial state of the freshly created SSLContext.
-    if cert_reqs == ssl.CERT_REQUIRED:
-        context.verify_mode = cert_reqs
-        disable_check_hostname()
-    else:
-        disable_check_hostname()
-        context.verify_mode = cert_reqs
-
-    # Enable logging of TLS session keys via defacto standard environment variable
-    # 'SSLKEYLOGFILE', if the feature is available (Python 3.8+). Skip empty values.
-    if hasattr(context, "keylog_filename"):
-        sslkeylogfile = os.environ.get("SSLKEYLOGFILE")
-        if sslkeylogfile:
-            context.keylog_filename = sslkeylogfile
-
-    return context
-
-
-def ssl_wrap_socket(
-    sock,
-    keyfile=None,
-    certfile=None,
-    cert_reqs=None,
-    ca_certs=None,
-    server_hostname=None,
-    ssl_version=None,
-    ciphers=None,
-    ssl_context=None,
-    ca_cert_dir=None,
-    key_password=None,
-    ca_cert_data=None,
-    tls_in_tls=False,
-):
-    """
-    All arguments except for server_hostname, ssl_context, and ca_cert_dir have
-    the same meaning as they do when using :func:`ssl.wrap_socket`.
-
-    :param server_hostname:
-        When SNI is supported, the expected hostname of the certificate
-    :param ssl_context:
-        A pre-made :class:`SSLContext` object. If none is provided, one will
-        be created using :func:`create_urllib3_context`.
-    :param ciphers:
-        A string of ciphers we wish the client to support.
-    :param ca_cert_dir:
-        A directory containing CA certificates in multiple separate files, as
-        supported by OpenSSL's -CApath flag or the capath argument to
-        SSLContext.load_verify_locations().
-    :param key_password:
-        Optional password if the keyfile is encrypted.
-    :param ca_cert_data:
-        Optional string containing CA certificates in PEM format suitable for
-        passing as the cadata parameter to SSLContext.load_verify_locations()
-    :param tls_in_tls:
-        Use SSLTransport to wrap the existing socket.
-    """
-    context = ssl_context
-    if context is None:
-        # Note: This branch of code and all the variables in it are no longer
-        # used by urllib3 itself. We should consider deprecating and removing
-        # this code.
-        context = create_urllib3_context(ssl_version, cert_reqs, ciphers=ciphers)
-
-    if ca_certs or ca_cert_dir or ca_cert_data:
-        try:
-            context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
-        except (IOError, OSError) as e:
-            raise SSLError(e)
-
-    elif ssl_context is None and hasattr(context, "load_default_certs"):
-        # try to load OS default certs; works well on Windows (require Python3.4+)
-        context.load_default_certs()
-
-    # Attempt to detect if we get the goofy behavior of the
-    # keyfile being encrypted and OpenSSL asking for the
-    # passphrase via the terminal and instead error out.
-    if keyfile and key_password is None and _is_key_file_encrypted(keyfile):
-        raise SSLError("Client private key is encrypted, password is required")
-
-    if certfile:
-        if key_password is None:
-            context.load_cert_chain(certfile, keyfile)
-        else:
-            context.load_cert_chain(certfile, keyfile, key_password)
-
-    try:
-        if hasattr(context, "set_alpn_protocols"):
-            context.set_alpn_protocols(ALPN_PROTOCOLS)
-    except NotImplementedError:  # Defensive: in CI, we always have set_alpn_protocols
-        pass
-
-    # If we detect server_hostname is an IP address then the SNI
-    # extension should not be used according to RFC3546 Section 3.1
-    use_sni_hostname = server_hostname and not is_ipaddress(server_hostname)
-    # SecureTransport uses server_hostname in certificate verification.
-    send_sni = (use_sni_hostname and HAS_SNI) or (
-        IS_SECURETRANSPORT and server_hostname
-    )
-    # Do not warn the user if server_hostname is an invalid SNI hostname.
-    if not HAS_SNI and use_sni_hostname:
-        warnings.warn(
-            "An HTTPS request has been made, but the SNI (Server Name "
-            "Indication) extension to TLS is not available on this platform. "
-            "This may cause the server to present an incorrect TLS "
-            "certificate, which can cause validation failures. You can upgrade to "
-            "a newer version of Python to solve this. For more information, see "
-            "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html"
-            "#ssl-warnings",
-            SNIMissingWarning,
-        )
-
-    if send_sni:
-        ssl_sock = _ssl_wrap_socket_impl(
-            sock, context, tls_in_tls, server_hostname=server_hostname
-        )
-    else:
-        ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
-    return ssl_sock
-
-
-def is_ipaddress(hostname):
-    """Detects whether the hostname given is an IPv4 or IPv6 address.
-    Also detects IPv6 addresses with Zone IDs.
-
-    :param str hostname: Hostname to examine.
-    :return: True if the hostname is an IP address, False otherwise.
-    """
-    if not six.PY2 and isinstance(hostname, bytes):
-        # IDN A-label bytes are ASCII compatible.
-        hostname = hostname.decode("ascii")
-    return bool(IPV4_RE.match(hostname) or BRACELESS_IPV6_ADDRZ_RE.match(hostname))
-
-
-def _is_key_file_encrypted(key_file):
-    """Detects if a key file is encrypted or not."""
-    with open(key_file, "r") as f:
-        for line in f:
-            # Look for Proc-Type: 4,ENCRYPTED
-            if "ENCRYPTED" in line:
-                return True
-
-    return False
-
-
-def _ssl_wrap_socket_impl(sock, ssl_context, tls_in_tls, server_hostname=None):
-    if tls_in_tls:
-        if not SSLTransport:
-            # Import error, ssl is not available.
-            raise ProxySchemeUnsupported(
-                "TLS in TLS requires support for the 'ssl' module"
-            )
-
-        SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context)
-        return SSLTransport(sock, ssl_context, server_hostname)
-
-    if server_hostname:
-        return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
-    else:
-        return ssl_context.wrap_socket(sock)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py
deleted file mode 100644
index 1dd950c48..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py
+++ /dev/null
@@ -1,159 +0,0 @@
-"""The match_hostname() function from Python 3.3.3, essential when using SSL."""
-
-# Note: This file is under the PSF license as the code comes from the python
-# stdlib.   http://docs.python.org/3/license.html
-
-import re
-import sys
-
-# ipaddress has been backported to 2.6+ in pypi.  If it is installed on the
-# system, use it to handle IPAddress ServerAltnames (this was added in
-# python-3.5) otherwise only do DNS matching.  This allows
-# util.ssl_match_hostname to continue to be used in Python 2.7.
-try:
-    import ipaddress
-except ImportError:
-    ipaddress = None
-
-__version__ = "3.5.0.1"
-
-
-class CertificateError(ValueError):
-    pass
-
-
-def _dnsname_match(dn, hostname, max_wildcards=1):
-    """Matching according to RFC 6125, section 6.4.3
-
-    http://tools.ietf.org/html/rfc6125#section-6.4.3
-    """
-    pats = []
-    if not dn:
-        return False
-
-    # Ported from python3-syntax:
-    # leftmost, *remainder = dn.split(r'.')
-    parts = dn.split(r".")
-    leftmost = parts[0]
-    remainder = parts[1:]
-
-    wildcards = leftmost.count("*")
-    if wildcards > max_wildcards:
-        # Issue #17980: avoid denials of service by refusing more
-        # than one wildcard per fragment.  A survey of established
-        # policy among SSL implementations showed it to be a
-        # reasonable choice.
-        raise CertificateError(
-            "too many wildcards in certificate DNS name: " + repr(dn)
-        )
-
-    # speed up common case w/o wildcards
-    if not wildcards:
-        return dn.lower() == hostname.lower()
-
-    # RFC 6125, section 6.4.3, subitem 1.
-    # The client SHOULD NOT attempt to match a presented identifier in which
-    # the wildcard character comprises a label other than the left-most label.
-    if leftmost == "*":
-        # When '*' is a fragment by itself, it matches a non-empty dotless
-        # fragment.
-        pats.append("[^.]+")
-    elif leftmost.startswith("xn--") or hostname.startswith("xn--"):
-        # RFC 6125, section 6.4.3, subitem 3.
-        # The client SHOULD NOT attempt to match a presented identifier
-        # where the wildcard character is embedded within an A-label or
-        # U-label of an internationalized domain name.
-        pats.append(re.escape(leftmost))
-    else:
-        # Otherwise, '*' matches any dotless string, e.g. www*
-        pats.append(re.escape(leftmost).replace(r"\*", "[^.]*"))
-
-    # add the remaining fragments, ignore any wildcards
-    for frag in remainder:
-        pats.append(re.escape(frag))
-
-    pat = re.compile(r"\A" + r"\.".join(pats) + r"\Z", re.IGNORECASE)
-    return pat.match(hostname)
-
-
-def _to_unicode(obj):
-    if isinstance(obj, str) and sys.version_info < (3,):
-        # ignored flake8 # F821 to support python 2.7 function
-        obj = unicode(obj, encoding="ascii", errors="strict")  # noqa: F821
-    return obj
-
-
-def _ipaddress_match(ipname, host_ip):
-    """Exact matching of IP addresses.
-
-    RFC 6125 explicitly doesn't define an algorithm for this
-    (section 1.7.2 - "Out of Scope").
-    """
-    # OpenSSL may add a trailing newline to a subjectAltName's IP address
-    # Divergence from upstream: ipaddress can't handle byte str
-    ip = ipaddress.ip_address(_to_unicode(ipname).rstrip())
-    return ip == host_ip
-
-
-def match_hostname(cert, hostname):
-    """Verify that *cert* (in decoded format as returned by
-    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
-    rules are followed, but IP addresses are not accepted for *hostname*.
-
-    CertificateError is raised on failure. On success, the function
-    returns nothing.
-    """
-    if not cert:
-        raise ValueError(
-            "empty or no certificate, match_hostname needs a "
-            "SSL socket or SSL context with either "
-            "CERT_OPTIONAL or CERT_REQUIRED"
-        )
-    try:
-        # Divergence from upstream: ipaddress can't handle byte str
-        host_ip = ipaddress.ip_address(_to_unicode(hostname))
-    except (UnicodeError, ValueError):
-        # ValueError: Not an IP address (common case)
-        # UnicodeError: Divergence from upstream: Have to deal with ipaddress not taking
-        # byte strings.  addresses should be all ascii, so we consider it not
-        # an ipaddress in this case
-        host_ip = None
-    except AttributeError:
-        # Divergence from upstream: Make ipaddress library optional
-        if ipaddress is None:
-            host_ip = None
-        else:  # Defensive
-            raise
-    dnsnames = []
-    san = cert.get("subjectAltName", ())
-    for key, value in san:
-        if key == "DNS":
-            if host_ip is None and _dnsname_match(value, hostname):
-                return
-            dnsnames.append(value)
-        elif key == "IP Address":
-            if host_ip is not None and _ipaddress_match(value, host_ip):
-                return
-            dnsnames.append(value)
-    if not dnsnames:
-        # The subject is only checked when there is no dNSName entry
-        # in subjectAltName
-        for sub in cert.get("subject", ()):
-            for key, value in sub:
-                # XXX according to RFC 2818, the most specific Common Name
-                # must be used.
-                if key == "commonName":
-                    if _dnsname_match(value, hostname):
-                        return
-                    dnsnames.append(value)
-    if len(dnsnames) > 1:
-        raise CertificateError(
-            "hostname %r "
-            "doesn't match either of %s" % (hostname, ", ".join(map(repr, dnsnames)))
-        )
-    elif len(dnsnames) == 1:
-        raise CertificateError("hostname %r doesn't match %r" % (hostname, dnsnames[0]))
-    else:
-        raise CertificateError(
-            "no appropriate commonName or subjectAltName fields were found"
-        )
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py
deleted file mode 100644
index 4a7105d17..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py
+++ /dev/null
@@ -1,221 +0,0 @@
-import io
-import socket
-import ssl
-
-from ..exceptions import ProxySchemeUnsupported
-from ..packages import six
-
-SSL_BLOCKSIZE = 16384
-
-
-class SSLTransport:
-    """
-    The SSLTransport wraps an existing socket and establishes an SSL connection.
-
-    Contrary to Python's implementation of SSLSocket, it allows you to chain
-    multiple TLS connections together. It's particularly useful if you need to
-    implement TLS within TLS.
-
-    The class supports most of the socket API operations.
-    """
-
-    @staticmethod
-    def _validate_ssl_context_for_tls_in_tls(ssl_context):
-        """
-        Raises a ProxySchemeUnsupported if the provided ssl_context can't be used
-        for TLS in TLS.
-
-        The only requirement is that the ssl_context provides the 'wrap_bio'
-        methods.
-        """
-
-        if not hasattr(ssl_context, "wrap_bio"):
-            if six.PY2:
-                raise ProxySchemeUnsupported(
-                    "TLS in TLS requires SSLContext.wrap_bio() which isn't "
-                    "supported on Python 2"
-                )
-            else:
-                raise ProxySchemeUnsupported(
-                    "TLS in TLS requires SSLContext.wrap_bio() which isn't "
-                    "available on non-native SSLContext"
-                )
-
-    def __init__(
-        self, socket, ssl_context, server_hostname=None, suppress_ragged_eofs=True
-    ):
-        """
-        Create an SSLTransport around socket using the provided ssl_context.
-        """
-        self.incoming = ssl.MemoryBIO()
-        self.outgoing = ssl.MemoryBIO()
-
-        self.suppress_ragged_eofs = suppress_ragged_eofs
-        self.socket = socket
-
-        self.sslobj = ssl_context.wrap_bio(
-            self.incoming, self.outgoing, server_hostname=server_hostname
-        )
-
-        # Perform initial handshake.
-        self._ssl_io_loop(self.sslobj.do_handshake)
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, *_):
-        self.close()
-
-    def fileno(self):
-        return self.socket.fileno()
-
-    def read(self, len=1024, buffer=None):
-        return self._wrap_ssl_read(len, buffer)
-
-    def recv(self, len=1024, flags=0):
-        if flags != 0:
-            raise ValueError("non-zero flags not allowed in calls to recv")
-        return self._wrap_ssl_read(len)
-
-    def recv_into(self, buffer, nbytes=None, flags=0):
-        if flags != 0:
-            raise ValueError("non-zero flags not allowed in calls to recv_into")
-        if buffer and (nbytes is None):
-            nbytes = len(buffer)
-        elif nbytes is None:
-            nbytes = 1024
-        return self.read(nbytes, buffer)
-
-    def sendall(self, data, flags=0):
-        if flags != 0:
-            raise ValueError("non-zero flags not allowed in calls to sendall")
-        count = 0
-        with memoryview(data) as view, view.cast("B") as byte_view:
-            amount = len(byte_view)
-            while count < amount:
-                v = self.send(byte_view[count:])
-                count += v
-
-    def send(self, data, flags=0):
-        if flags != 0:
-            raise ValueError("non-zero flags not allowed in calls to send")
-        response = self._ssl_io_loop(self.sslobj.write, data)
-        return response
-
-    def makefile(
-        self, mode="r", buffering=None, encoding=None, errors=None, newline=None
-    ):
-        """
-        Python's httpclient uses makefile and buffered io when reading HTTP
-        messages and we need to support it.
-
-        This is unfortunately a copy and paste of socket.py makefile with small
-        changes to point to the socket directly.
-        """
-        if not set(mode) <= {"r", "w", "b"}:
-            raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,))
-
-        writing = "w" in mode
-        reading = "r" in mode or not writing
-        assert reading or writing
-        binary = "b" in mode
-        rawmode = ""
-        if reading:
-            rawmode += "r"
-        if writing:
-            rawmode += "w"
-        raw = socket.SocketIO(self, rawmode)
-        self.socket._io_refs += 1
-        if buffering is None:
-            buffering = -1
-        if buffering < 0:
-            buffering = io.DEFAULT_BUFFER_SIZE
-        if buffering == 0:
-            if not binary:
-                raise ValueError("unbuffered streams must be binary")
-            return raw
-        if reading and writing:
-            buffer = io.BufferedRWPair(raw, raw, buffering)
-        elif reading:
-            buffer = io.BufferedReader(raw, buffering)
-        else:
-            assert writing
-            buffer = io.BufferedWriter(raw, buffering)
-        if binary:
-            return buffer
-        text = io.TextIOWrapper(buffer, encoding, errors, newline)
-        text.mode = mode
-        return text
-
-    def unwrap(self):
-        self._ssl_io_loop(self.sslobj.unwrap)
-
-    def close(self):
-        self.socket.close()
-
-    def getpeercert(self, binary_form=False):
-        return self.sslobj.getpeercert(binary_form)
-
-    def version(self):
-        return self.sslobj.version()
-
-    def cipher(self):
-        return self.sslobj.cipher()
-
-    def selected_alpn_protocol(self):
-        return self.sslobj.selected_alpn_protocol()
-
-    def selected_npn_protocol(self):
-        return self.sslobj.selected_npn_protocol()
-
-    def shared_ciphers(self):
-        return self.sslobj.shared_ciphers()
-
-    def compression(self):
-        return self.sslobj.compression()
-
-    def settimeout(self, value):
-        self.socket.settimeout(value)
-
-    def gettimeout(self):
-        return self.socket.gettimeout()
-
-    def _decref_socketios(self):
-        self.socket._decref_socketios()
-
-    def _wrap_ssl_read(self, len, buffer=None):
-        try:
-            return self._ssl_io_loop(self.sslobj.read, len, buffer)
-        except ssl.SSLError as e:
-            if e.errno == ssl.SSL_ERROR_EOF and self.suppress_ragged_eofs:
-                return 0  # eof, return 0.
-            else:
-                raise
-
-    def _ssl_io_loop(self, func, *args):
-        """Performs an I/O loop between incoming/outgoing and the socket."""
-        should_loop = True
-        ret = None
-
-        while should_loop:
-            errno = None
-            try:
-                ret = func(*args)
-            except ssl.SSLError as e:
-                if e.errno not in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE):
-                    # WANT_READ, and WANT_WRITE are expected, others are not.
-                    raise e
-                errno = e.errno
-
-            buf = self.outgoing.read()
-            self.socket.sendall(buf)
-
-            if errno is None:
-                should_loop = False
-            elif errno == ssl.SSL_ERROR_WANT_READ:
-                buf = self.socket.recv(SSL_BLOCKSIZE)
-                if buf:
-                    self.incoming.write(buf)
-                else:
-                    self.incoming.write_eof()
-        return ret
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/url.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/url.py
deleted file mode 100644
index a960b2f3c..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/url.py
+++ /dev/null
@@ -1,435 +0,0 @@
-from __future__ import absolute_import
-
-import re
-from collections import namedtuple
-
-from ..exceptions import LocationParseError
-from ..packages import six
-
-url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"]
-
-# We only want to normalize urls with an HTTP(S) scheme.
-# urllib3 infers URLs without a scheme (None) to be http.
-NORMALIZABLE_SCHEMES = ("http", "https", None)
-
-# Almost all of these patterns were derived from the
-# 'rfc3986' module: https://github.com/python-hyper/rfc3986
-PERCENT_RE = re.compile(r"%[a-fA-F0-9]{2}")
-SCHEME_RE = re.compile(r"^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)")
-URI_RE = re.compile(
-    r"^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?"
-    r"(?://([^\\/?#]*))?"
-    r"([^?#]*)"
-    r"(?:\?([^#]*))?"
-    r"(?:#(.*))?$",
-    re.UNICODE | re.DOTALL,
-)
-
-IPV4_PAT = r"(?:[0-9]{1,3}\.){3}[0-9]{1,3}"
-HEX_PAT = "[0-9A-Fa-f]{1,4}"
-LS32_PAT = "(?:{hex}:{hex}|{ipv4})".format(hex=HEX_PAT, ipv4=IPV4_PAT)
-_subs = {"hex": HEX_PAT, "ls32": LS32_PAT}
-_variations = [
-    #                            6( h16 ":" ) ls32
-    "(?:%(hex)s:){6}%(ls32)s",
-    #                       "::" 5( h16 ":" ) ls32
-    "::(?:%(hex)s:){5}%(ls32)s",
-    # [               h16 ] "::" 4( h16 ":" ) ls32
-    "(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)s",
-    # [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
-    "(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)s",
-    # [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
-    "(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)s",
-    # [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
-    "(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)s",
-    # [ *4( h16 ":" ) h16 ] "::"              ls32
-    "(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)s",
-    # [ *5( h16 ":" ) h16 ] "::"              h16
-    "(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)s",
-    # [ *6( h16 ":" ) h16 ] "::"
-    "(?:(?:%(hex)s:){0,6}%(hex)s)?::",
-]
-
-UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~"
-IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")"
-ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+"
-IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]"
-REG_NAME_PAT = r"(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*"
-TARGET_RE = re.compile(r"^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$")
-
-IPV4_RE = re.compile("^" + IPV4_PAT + "$")
-IPV6_RE = re.compile("^" + IPV6_PAT + "$")
-IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$")
-BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$")
-ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$")
-
-_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$") % (
-    REG_NAME_PAT,
-    IPV4_PAT,
-    IPV6_ADDRZ_PAT,
-)
-_HOST_PORT_RE = re.compile(_HOST_PORT_PAT, re.UNICODE | re.DOTALL)
-
-UNRESERVED_CHARS = set(
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~"
-)
-SUB_DELIM_CHARS = set("!$&'()*+,;=")
-USERINFO_CHARS = UNRESERVED_CHARS | SUB_DELIM_CHARS | {":"}
-PATH_CHARS = USERINFO_CHARS | {"@", "/"}
-QUERY_CHARS = FRAGMENT_CHARS = PATH_CHARS | {"?"}
-
-
-class Url(namedtuple("Url", url_attrs)):
-    """
-    Data structure for representing an HTTP URL. Used as a return value for
-    :func:`parse_url`. Both the scheme and host are normalized as they are
-    both case-insensitive according to RFC 3986.
-    """
-
-    __slots__ = ()
-
-    def __new__(
-        cls,
-        scheme=None,
-        auth=None,
-        host=None,
-        port=None,
-        path=None,
-        query=None,
-        fragment=None,
-    ):
-        if path and not path.startswith("/"):
-            path = "/" + path
-        if scheme is not None:
-            scheme = scheme.lower()
-        return super(Url, cls).__new__(
-            cls, scheme, auth, host, port, path, query, fragment
-        )
-
-    @property
-    def hostname(self):
-        """For backwards-compatibility with urlparse. We're nice like that."""
-        return self.host
-
-    @property
-    def request_uri(self):
-        """Absolute path including the query string."""
-        uri = self.path or "/"
-
-        if self.query is not None:
-            uri += "?" + self.query
-
-        return uri
-
-    @property
-    def netloc(self):
-        """Network location including host and port"""
-        if self.port:
-            return "%s:%d" % (self.host, self.port)
-        return self.host
-
-    @property
-    def url(self):
-        """
-        Convert self into a url
-
-        This function should more or less round-trip with :func:`.parse_url`. The
-        returned url may not be exactly the same as the url inputted to
-        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
-        with a blank port will have : removed).
-
-        Example: ::
-
-            >>> U = parse_url('http://google.com/mail/')
-            >>> U.url
-            'http://google.com/mail/'
-            >>> Url('http', 'username:password', 'host.com', 80,
-            ... '/path', 'query', 'fragment').url
-            'http://username:password@host.com:80/path?query#fragment'
-        """
-        scheme, auth, host, port, path, query, fragment = self
-        url = u""
-
-        # We use "is not None" we want things to happen with empty strings (or 0 port)
-        if scheme is not None:
-            url += scheme + u"://"
-        if auth is not None:
-            url += auth + u"@"
-        if host is not None:
-            url += host
-        if port is not None:
-            url += u":" + str(port)
-        if path is not None:
-            url += path
-        if query is not None:
-            url += u"?" + query
-        if fragment is not None:
-            url += u"#" + fragment
-
-        return url
-
-    def __str__(self):
-        return self.url
-
-
-def split_first(s, delims):
-    """
-    .. deprecated:: 1.25
-
-    Given a string and an iterable of delimiters, split on the first found
-    delimiter. Return two split parts and the matched delimiter.
-
-    If not found, then the first part is the full input string.
-
-    Example::
-
-        >>> split_first('foo/bar?baz', '?/=')
-        ('foo', 'bar?baz', '/')
-        >>> split_first('foo/bar?baz', '123')
-        ('foo/bar?baz', '', None)
-
-    Scales linearly with number of delims. Not ideal for large number of delims.
-    """
-    min_idx = None
-    min_delim = None
-    for d in delims:
-        idx = s.find(d)
-        if idx < 0:
-            continue
-
-        if min_idx is None or idx < min_idx:
-            min_idx = idx
-            min_delim = d
-
-    if min_idx is None or min_idx < 0:
-        return s, "", None
-
-    return s[:min_idx], s[min_idx + 1 :], min_delim
-
-
-def _encode_invalid_chars(component, allowed_chars, encoding="utf-8"):
-    """Percent-encodes a URI component without reapplying
-    onto an already percent-encoded component.
-    """
-    if component is None:
-        return component
-
-    component = six.ensure_text(component)
-
-    # Normalize existing percent-encoded bytes.
-    # Try to see if the component we're encoding is already percent-encoded
-    # so we can skip all '%' characters but still encode all others.
-    component, percent_encodings = PERCENT_RE.subn(
-        lambda match: match.group(0).upper(), component
-    )
-
-    uri_bytes = component.encode("utf-8", "surrogatepass")
-    is_percent_encoded = percent_encodings == uri_bytes.count(b"%")
-    encoded_component = bytearray()
-
-    for i in range(0, len(uri_bytes)):
-        # Will return a single character bytestring on both Python 2 & 3
-        byte = uri_bytes[i : i + 1]
-        byte_ord = ord(byte)
-        if (is_percent_encoded and byte == b"%") or (
-            byte_ord < 128 and byte.decode() in allowed_chars
-        ):
-            encoded_component += byte
-            continue
-        encoded_component.extend(b"%" + (hex(byte_ord)[2:].encode().zfill(2).upper()))
-
-    return encoded_component.decode(encoding)
-
-
-def _remove_path_dot_segments(path):
-    # See http://tools.ietf.org/html/rfc3986#section-5.2.4 for pseudo-code
-    segments = path.split("/")  # Turn the path into a list of segments
-    output = []  # Initialize the variable to use to store output
-
-    for segment in segments:
-        # '.' is the current directory, so ignore it, it is superfluous
-        if segment == ".":
-            continue
-        # Anything other than '..', should be appended to the output
-        elif segment != "..":
-            output.append(segment)
-        # In this case segment == '..', if we can, we should pop the last
-        # element
-        elif output:
-            output.pop()
-
-    # If the path starts with '/' and the output is empty or the first string
-    # is non-empty
-    if path.startswith("/") and (not output or output[0]):
-        output.insert(0, "")
-
-    # If the path starts with '/.' or '/..' ensure we add one more empty
-    # string to add a trailing '/'
-    if path.endswith(("/.", "/..")):
-        output.append("")
-
-    return "/".join(output)
-
-
-def _normalize_host(host, scheme):
-    if host:
-        if isinstance(host, six.binary_type):
-            host = six.ensure_str(host)
-
-        if scheme in NORMALIZABLE_SCHEMES:
-            is_ipv6 = IPV6_ADDRZ_RE.match(host)
-            if is_ipv6:
-                # IPv6 hosts of the form 'a::b%zone' are encoded in a URL as
-                # such per RFC 6874: 'a::b%25zone'. Unquote the ZoneID
-                # separator as necessary to return a valid RFC 4007 scoped IP.
-                match = ZONE_ID_RE.search(host)
-                if match:
-                    start, end = match.span(1)
-                    zone_id = host[start:end]
-
-                    if zone_id.startswith("%25") and zone_id != "%25":
-                        zone_id = zone_id[3:]
-                    else:
-                        zone_id = zone_id[1:]
-                    zone_id = "%" + _encode_invalid_chars(zone_id, UNRESERVED_CHARS)
-                    return host[:start].lower() + zone_id + host[end:]
-                else:
-                    return host.lower()
-            elif not IPV4_RE.match(host):
-                return six.ensure_str(
-                    b".".join([_idna_encode(label) for label in host.split(".")])
-                )
-    return host
-
-
-def _idna_encode(name):
-    if name and any(ord(x) >= 128 for x in name):
-        try:
-            from pip._vendor import idna
-        except ImportError:
-            six.raise_from(
-                LocationParseError("Unable to parse URL without the 'idna' module"),
-                None,
-            )
-        try:
-            return idna.encode(name.lower(), strict=True, std3_rules=True)
-        except idna.IDNAError:
-            six.raise_from(
-                LocationParseError(u"Name '%s' is not a valid IDNA label" % name), None
-            )
-    return name.lower().encode("ascii")
-
-
-def _encode_target(target):
-    """Percent-encodes a request target so that there are no invalid characters"""
-    path, query = TARGET_RE.match(target).groups()
-    target = _encode_invalid_chars(path, PATH_CHARS)
-    query = _encode_invalid_chars(query, QUERY_CHARS)
-    if query is not None:
-        target += "?" + query
-    return target
-
-
-def parse_url(url):
-    """
-    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
-    performed to parse incomplete urls. Fields not provided will be None.
-    This parser is RFC 3986 and RFC 6874 compliant.
-
-    The parser logic and helper functions are based heavily on
-    work done in the ``rfc3986`` module.
-
-    :param str url: URL to parse into a :class:`.Url` namedtuple.
-
-    Partly backwards-compatible with :mod:`urlparse`.
-
-    Example::
-
-        >>> parse_url('http://google.com/mail/')
-        Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
-        >>> parse_url('google.com:80')
-        Url(scheme=None, host='google.com', port=80, path=None, ...)
-        >>> parse_url('/foo?bar')
-        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
-    """
-    if not url:
-        # Empty
-        return Url()
-
-    source_url = url
-    if not SCHEME_RE.search(url):
-        url = "//" + url
-
-    try:
-        scheme, authority, path, query, fragment = URI_RE.match(url).groups()
-        normalize_uri = scheme is None or scheme.lower() in NORMALIZABLE_SCHEMES
-
-        if scheme:
-            scheme = scheme.lower()
-
-        if authority:
-            auth, _, host_port = authority.rpartition("@")
-            auth = auth or None
-            host, port = _HOST_PORT_RE.match(host_port).groups()
-            if auth and normalize_uri:
-                auth = _encode_invalid_chars(auth, USERINFO_CHARS)
-            if port == "":
-                port = None
-        else:
-            auth, host, port = None, None, None
-
-        if port is not None:
-            port = int(port)
-            if not (0 <= port <= 65535):
-                raise LocationParseError(url)
-
-        host = _normalize_host(host, scheme)
-
-        if normalize_uri and path:
-            path = _remove_path_dot_segments(path)
-            path = _encode_invalid_chars(path, PATH_CHARS)
-        if normalize_uri and query:
-            query = _encode_invalid_chars(query, QUERY_CHARS)
-        if normalize_uri and fragment:
-            fragment = _encode_invalid_chars(fragment, FRAGMENT_CHARS)
-
-    except (ValueError, AttributeError):
-        return six.raise_from(LocationParseError(source_url), None)
-
-    # For the sake of backwards compatibility we put empty
-    # string values for path if there are any defined values
-    # beyond the path in the URL.
-    # TODO: Remove this when we break backwards compatibility.
-    if not path:
-        if query is not None or fragment is not None:
-            path = ""
-        else:
-            path = None
-
-    # Ensure that each part of the URL is a `str` for
-    # backwards compatibility.
-    if isinstance(url, six.text_type):
-        ensure_func = six.ensure_text
-    else:
-        ensure_func = six.ensure_str
-
-    def ensure_type(x):
-        return x if x is None else ensure_func(x)
-
-    return Url(
-        scheme=ensure_type(scheme),
-        auth=ensure_type(auth),
-        host=ensure_type(host),
-        port=port,
-        path=ensure_type(path),
-        query=ensure_type(query),
-        fragment=ensure_type(fragment),
-    )
-
-
-def get_host(url):
-    """
-    Deprecated. Use :func:`parse_url` instead.
-    """
-    p = parse_url(url)
-    return p.scheme or "http", p.hostname, p.port
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/wait.py b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/wait.py
deleted file mode 100644
index 21b4590b3..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/wait.py
+++ /dev/null
@@ -1,152 +0,0 @@
-import errno
-import select
-import sys
-from functools import partial
-
-try:
-    from time import monotonic
-except ImportError:
-    from time import time as monotonic
-
-__all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"]
-
-
-class NoWayToWaitForSocketError(Exception):
-    pass
-
-
-# How should we wait on sockets?
-#
-# There are two types of APIs you can use for waiting on sockets: the fancy
-# modern stateful APIs like epoll/kqueue, and the older stateless APIs like
-# select/poll. The stateful APIs are more efficient when you have a lots of
-# sockets to keep track of, because you can set them up once and then use them
-# lots of times. But we only ever want to wait on a single socket at a time
-# and don't want to keep track of state, so the stateless APIs are actually
-# more efficient. So we want to use select() or poll().
-#
-# Now, how do we choose between select() and poll()? On traditional Unixes,
-# select() has a strange calling convention that makes it slow, or fail
-# altogether, for high-numbered file descriptors. The point of poll() is to fix
-# that, so on Unixes, we prefer poll().
-#
-# On Windows, there is no poll() (or at least Python doesn't provide a wrapper
-# for it), but that's OK, because on Windows, select() doesn't have this
-# strange calling convention; plain select() works fine.
-#
-# So: on Windows we use select(), and everywhere else we use poll(). We also
-# fall back to select() in case poll() is somehow broken or missing.
-
-if sys.version_info >= (3, 5):
-    # Modern Python, that retries syscalls by default
-    def _retry_on_intr(fn, timeout):
-        return fn(timeout)
-
-else:
-    # Old and broken Pythons.
-    def _retry_on_intr(fn, timeout):
-        if timeout is None:
-            deadline = float("inf")
-        else:
-            deadline = monotonic() + timeout
-
-        while True:
-            try:
-                return fn(timeout)
-            # OSError for 3 <= pyver < 3.5, select.error for pyver <= 2.7
-            except (OSError, select.error) as e:
-                # 'e.args[0]' incantation works for both OSError and select.error
-                if e.args[0] != errno.EINTR:
-                    raise
-                else:
-                    timeout = deadline - monotonic()
-                    if timeout < 0:
-                        timeout = 0
-                    if timeout == float("inf"):
-                        timeout = None
-                    continue
-
-
-def select_wait_for_socket(sock, read=False, write=False, timeout=None):
-    if not read and not write:
-        raise RuntimeError("must specify at least one of read=True, write=True")
-    rcheck = []
-    wcheck = []
-    if read:
-        rcheck.append(sock)
-    if write:
-        wcheck.append(sock)
-    # When doing a non-blocking connect, most systems signal success by
-    # marking the socket writable. Windows, though, signals success by marked
-    # it as "exceptional". We paper over the difference by checking the write
-    # sockets for both conditions. (The stdlib selectors module does the same
-    # thing.)
-    fn = partial(select.select, rcheck, wcheck, wcheck)
-    rready, wready, xready = _retry_on_intr(fn, timeout)
-    return bool(rready or wready or xready)
-
-
-def poll_wait_for_socket(sock, read=False, write=False, timeout=None):
-    if not read and not write:
-        raise RuntimeError("must specify at least one of read=True, write=True")
-    mask = 0
-    if read:
-        mask |= select.POLLIN
-    if write:
-        mask |= select.POLLOUT
-    poll_obj = select.poll()
-    poll_obj.register(sock, mask)
-
-    # For some reason, poll() takes timeout in milliseconds
-    def do_poll(t):
-        if t is not None:
-            t *= 1000
-        return poll_obj.poll(t)
-
-    return bool(_retry_on_intr(do_poll, timeout))
-
-
-def null_wait_for_socket(*args, **kwargs):
-    raise NoWayToWaitForSocketError("no select-equivalent available")
-
-
-def _have_working_poll():
-    # Apparently some systems have a select.poll that fails as soon as you try
-    # to use it, either due to strange configuration or broken monkeypatching
-    # from libraries like eventlet/greenlet.
-    try:
-        poll_obj = select.poll()
-        _retry_on_intr(poll_obj.poll, 0)
-    except (AttributeError, OSError):
-        return False
-    else:
-        return True
-
-
-def wait_for_socket(*args, **kwargs):
-    # We delay choosing which implementation to use until the first time we're
-    # called. We could do it at import time, but then we might make the wrong
-    # decision if someone goes wild with monkeypatching select.poll after
-    # we're imported.
-    global wait_for_socket
-    if _have_working_poll():
-        wait_for_socket = poll_wait_for_socket
-    elif hasattr(select, "select"):
-        wait_for_socket = select_wait_for_socket
-    else:  # Platform-specific: Appengine.
-        wait_for_socket = null_wait_for_socket
-    return wait_for_socket(*args, **kwargs)
-
-
-def wait_for_read(sock, timeout=None):
-    """Waits for reading to be available on a given socket.
-    Returns True if the socket is readable, or False if the timeout expired.
-    """
-    return wait_for_socket(sock, read=True, timeout=timeout)
-
-
-def wait_for_write(sock, timeout=None):
-    """Waits for writing to be available on a given socket.
-    Returns True if the socket is readable, or False if the timeout expired.
-    """
-    return wait_for_socket(sock, write=True, timeout=timeout)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/vendor.txt b/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/vendor.txt
deleted file mode 100644
index dd2f5f348..000000000
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/vendor.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-CacheControl==0.14.4
-distlib==0.4.0
-distro==1.9.0
-msgpack==1.1.2
-packaging==26.0
-platformdirs==4.5.1
-pyproject-hooks==1.2.0
-requests==2.32.5
-    certifi==2026.1.4
-    idna==3.11
-    urllib3==1.26.20
-rich==14.2.0
-    pygments==2.19.2
-resolvelib==1.2.1
-setuptools==70.3.0
-tomli==2.3.0
-tomli-w==1.2.0
-truststore==0.10.4
-dependency-groups==1.3.1
diff --git a/Python314_4_x64_Template/Lib/string/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/string/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 5281c9187..000000000
Binary files a/Python314_4_x64_Template/Lib/string/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/sysconfig/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/sysconfig/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 57d4879c3..000000000
Binary files a/Python314_4_x64_Template/Lib/sysconfig/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/tomllib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/tomllib/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index dd8c34b21..000000000
Binary files a/Python314_4_x64_Template/Lib/tomllib/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/tomllib/__pycache__/_parser.cpython-314.pyc b/Python314_4_x64_Template/Lib/tomllib/__pycache__/_parser.cpython-314.pyc
deleted file mode 100644
index 21d39efbe..000000000
Binary files a/Python314_4_x64_Template/Lib/tomllib/__pycache__/_parser.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/tomllib/__pycache__/_re.cpython-314.pyc b/Python314_4_x64_Template/Lib/tomllib/__pycache__/_re.cpython-314.pyc
deleted file mode 100644
index 560630663..000000000
Binary files a/Python314_4_x64_Template/Lib/tomllib/__pycache__/_re.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/tomllib/_parser.py b/Python314_4_x64_Template/Lib/tomllib/_parser.py
deleted file mode 100644
index 3ee47aa9e..000000000
--- a/Python314_4_x64_Template/Lib/tomllib/_parser.py
+++ /dev/null
@@ -1,753 +0,0 @@
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
-# Licensed to PSF under a Contributor Agreement.
-
-from __future__ import annotations
-
-from types import MappingProxyType
-
-from ._re import (
-    RE_DATETIME,
-    RE_LOCALTIME,
-    RE_NUMBER,
-    match_to_datetime,
-    match_to_localtime,
-    match_to_number,
-)
-
-TYPE_CHECKING = False
-if TYPE_CHECKING:
-    from collections.abc import Iterable
-    from typing import IO, Any
-
-    from ._types import Key, ParseFloat, Pos
-
-ASCII_CTRL = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
-
-# Neither of these sets include quotation mark or backslash. They are
-# currently handled as separate cases in the parser functions.
-ILLEGAL_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t")
-ILLEGAL_MULTILINE_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t\n")
-
-ILLEGAL_LITERAL_STR_CHARS = ILLEGAL_BASIC_STR_CHARS
-ILLEGAL_MULTILINE_LITERAL_STR_CHARS = ILLEGAL_MULTILINE_BASIC_STR_CHARS
-
-ILLEGAL_COMMENT_CHARS = ILLEGAL_BASIC_STR_CHARS
-
-TOML_WS = frozenset(" \t")
-TOML_WS_AND_NEWLINE = TOML_WS | frozenset("\n")
-BARE_KEY_CHARS = frozenset(
-    "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
-)
-KEY_INITIAL_CHARS = BARE_KEY_CHARS | frozenset("\"'")
-HEXDIGIT_CHARS = frozenset("abcdef" "ABCDEF" "0123456789")
-
-BASIC_STR_ESCAPE_REPLACEMENTS = MappingProxyType(
-    {
-        "\\b": "\u0008",  # backspace
-        "\\t": "\u0009",  # tab
-        "\\n": "\u000A",  # linefeed
-        "\\f": "\u000C",  # form feed
-        "\\r": "\u000D",  # carriage return
-        '\\"': "\u0022",  # quote
-        "\\\\": "\u005C",  # backslash
-    }
-)
-
-
-class DEPRECATED_DEFAULT:
-    """Sentinel to be used as default arg during deprecation
-    period of TOMLDecodeError's free-form arguments."""
-
-
-class TOMLDecodeError(ValueError):
-    """An error raised if a document is not valid TOML.
-
-    Adds the following attributes to ValueError:
-    msg: The unformatted error message
-    doc: The TOML document being parsed
-    pos: The index of doc where parsing failed
-    lineno: The line corresponding to pos
-    colno: The column corresponding to pos
-    """
-
-    def __init__(
-        self,
-        msg: str = DEPRECATED_DEFAULT,  # type: ignore[assignment]
-        doc: str = DEPRECATED_DEFAULT,  # type: ignore[assignment]
-        pos: Pos = DEPRECATED_DEFAULT,  # type: ignore[assignment]
-        *args: Any,
-    ):
-        if (
-            args
-            or not isinstance(msg, str)
-            or not isinstance(doc, str)
-            or not isinstance(pos, int)
-        ):
-            import warnings
-
-            warnings.warn(
-                "Free-form arguments for TOMLDecodeError are deprecated. "
-                "Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.",
-                DeprecationWarning,
-                stacklevel=2,
-            )
-            if pos is not DEPRECATED_DEFAULT:  # type: ignore[comparison-overlap]
-                args = pos, *args
-            if doc is not DEPRECATED_DEFAULT:  # type: ignore[comparison-overlap]
-                args = doc, *args
-            if msg is not DEPRECATED_DEFAULT:  # type: ignore[comparison-overlap]
-                args = msg, *args
-            ValueError.__init__(self, *args)
-            return
-
-        lineno = doc.count("\n", 0, pos) + 1
-        if lineno == 1:
-            colno = pos + 1
-        else:
-            colno = pos - doc.rindex("\n", 0, pos)
-
-        if pos >= len(doc):
-            coord_repr = "end of document"
-        else:
-            coord_repr = f"line {lineno}, column {colno}"
-        errmsg = f"{msg} (at {coord_repr})"
-        ValueError.__init__(self, errmsg)
-
-        self.msg = msg
-        self.doc = doc
-        self.pos = pos
-        self.lineno = lineno
-        self.colno = colno
-
-
-def load(fp: IO[bytes], /, *, parse_float: ParseFloat = float) -> dict[str, Any]:
-    """Parse TOML from a binary file object."""
-    b = fp.read()
-    try:
-        s = b.decode()
-    except AttributeError:
-        raise TypeError(
-            "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
-        ) from None
-    return loads(s, parse_float=parse_float)
-
-
-def loads(s: str, /, *, parse_float: ParseFloat = float) -> dict[str, Any]:  # noqa: C901
-    """Parse TOML from a string."""
-
-    # The spec allows converting "\r\n" to "\n", even in string
-    # literals. Let's do so to simplify parsing.
-    try:
-        src = s.replace("\r\n", "\n")
-    except (AttributeError, TypeError):
-        raise TypeError(
-            f"Expected str object, not '{type(s).__qualname__}'"
-        ) from None
-    pos = 0
-    out = Output()
-    header: Key = ()
-    parse_float = make_safe_parse_float(parse_float)
-
-    # Parse one statement at a time
-    # (typically means one line in TOML source)
-    while True:
-        # 1. Skip line leading whitespace
-        pos = skip_chars(src, pos, TOML_WS)
-
-        # 2. Parse rules. Expect one of the following:
-        #    - end of file
-        #    - end of line
-        #    - comment
-        #    - key/value pair
-        #    - append dict to list (and move to its namespace)
-        #    - create dict (and move to its namespace)
-        # Skip trailing whitespace when applicable.
-        try:
-            char = src[pos]
-        except IndexError:
-            break
-        if char == "\n":
-            pos += 1
-            continue
-        if char in KEY_INITIAL_CHARS:
-            pos = key_value_rule(src, pos, out, header, parse_float)
-            pos = skip_chars(src, pos, TOML_WS)
-        elif char == "[":
-            try:
-                second_char: str | None = src[pos + 1]
-            except IndexError:
-                second_char = None
-            out.flags.finalize_pending()
-            if second_char == "[":
-                pos, header = create_list_rule(src, pos, out)
-            else:
-                pos, header = create_dict_rule(src, pos, out)
-            pos = skip_chars(src, pos, TOML_WS)
-        elif char != "#":
-            raise TOMLDecodeError("Invalid statement", src, pos)
-
-        # 3. Skip comment
-        pos = skip_comment(src, pos)
-
-        # 4. Expect end of line or end of file
-        try:
-            char = src[pos]
-        except IndexError:
-            break
-        if char != "\n":
-            raise TOMLDecodeError(
-                "Expected newline or end of document after a statement", src, pos
-            )
-        pos += 1
-
-    return out.data.dict
-
-
-class Flags:
-    """Flags that map to parsed keys/namespaces."""
-
-    # Marks an immutable namespace (inline array or inline table).
-    FROZEN = 0
-    # Marks a nest that has been explicitly created and can no longer
-    # be opened using the "[table]" syntax.
-    EXPLICIT_NEST = 1
-
-    def __init__(self) -> None:
-        self._flags: dict[str, dict[Any, Any]] = {}
-        self._pending_flags: set[tuple[Key, int]] = set()
-
-    def add_pending(self, key: Key, flag: int) -> None:
-        self._pending_flags.add((key, flag))
-
-    def finalize_pending(self) -> None:
-        for key, flag in self._pending_flags:
-            self.set(key, flag, recursive=False)
-        self._pending_flags.clear()
-
-    def unset_all(self, key: Key) -> None:
-        cont = self._flags
-        for k in key[:-1]:
-            if k not in cont:
-                return
-            cont = cont[k]["nested"]
-        cont.pop(key[-1], None)
-
-    def set(self, key: Key, flag: int, *, recursive: bool) -> None:  # noqa: A003
-        cont = self._flags
-        key_parent, key_stem = key[:-1], key[-1]
-        for k in key_parent:
-            if k not in cont:
-                cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
-            cont = cont[k]["nested"]
-        if key_stem not in cont:
-            cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
-        cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
-
-    def is_(self, key: Key, flag: int) -> bool:
-        if not key:
-            return False  # document root has no flags
-        cont = self._flags
-        for k in key[:-1]:
-            if k not in cont:
-                return False
-            inner_cont = cont[k]
-            if flag in inner_cont["recursive_flags"]:
-                return True
-            cont = inner_cont["nested"]
-        key_stem = key[-1]
-        if key_stem in cont:
-            cont = cont[key_stem]
-            return flag in cont["flags"] or flag in cont["recursive_flags"]
-        return False
-
-
-class NestedDict:
-    def __init__(self) -> None:
-        # The parsed content of the TOML document
-        self.dict: dict[str, Any] = {}
-
-    def get_or_create_nest(
-        self,
-        key: Key,
-        *,
-        access_lists: bool = True,
-    ) -> dict[str, Any]:
-        cont: Any = self.dict
-        for k in key:
-            if k not in cont:
-                cont[k] = {}
-            cont = cont[k]
-            if access_lists and isinstance(cont, list):
-                cont = cont[-1]
-            if not isinstance(cont, dict):
-                raise KeyError("There is no nest behind this key")
-        return cont  # type: ignore[no-any-return]
-
-    def append_nest_to_list(self, key: Key) -> None:
-        cont = self.get_or_create_nest(key[:-1])
-        last_key = key[-1]
-        if last_key in cont:
-            list_ = cont[last_key]
-            if not isinstance(list_, list):
-                raise KeyError("An object other than list found behind this key")
-            list_.append({})
-        else:
-            cont[last_key] = [{}]
-
-
-class Output:
-    def __init__(self) -> None:
-        self.data = NestedDict()
-        self.flags = Flags()
-
-
-def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
-    try:
-        while src[pos] in chars:
-            pos += 1
-    except IndexError:
-        pass
-    return pos
-
-
-def skip_until(
-    src: str,
-    pos: Pos,
-    expect: str,
-    *,
-    error_on: frozenset[str],
-    error_on_eof: bool,
-) -> Pos:
-    try:
-        new_pos = src.index(expect, pos)
-    except ValueError:
-        new_pos = len(src)
-        if error_on_eof:
-            raise TOMLDecodeError(f"Expected {expect!r}", src, new_pos) from None
-
-    if not error_on.isdisjoint(src[pos:new_pos]):
-        while src[pos] not in error_on:
-            pos += 1
-        raise TOMLDecodeError(f"Found invalid character {src[pos]!r}", src, pos)
-    return new_pos
-
-
-def skip_comment(src: str, pos: Pos) -> Pos:
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char == "#":
-        return skip_until(
-            src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
-        )
-    return pos
-
-
-def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
-    while True:
-        pos_before_skip = pos
-        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
-        pos = skip_comment(src, pos)
-        if pos == pos_before_skip:
-            return pos
-
-
-def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
-    pos += 1  # Skip "["
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, key = parse_key(src, pos)
-
-    if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
-        raise TOMLDecodeError(f"Cannot declare {key} twice", src, pos)
-    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
-    try:
-        out.data.get_or_create_nest(key)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-
-    if not src.startswith("]", pos):
-        raise TOMLDecodeError(
-            "Expected ']' at the end of a table declaration", src, pos
-        )
-    return pos + 1, key
-
-
-def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
-    pos += 2  # Skip "[["
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, key = parse_key(src, pos)
-
-    if out.flags.is_(key, Flags.FROZEN):
-        raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
-    # Free the namespace now that it points to another empty list item...
-    out.flags.unset_all(key)
-    # ...but this key precisely is still prohibited from table declaration
-    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
-    try:
-        out.data.append_nest_to_list(key)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-
-    if not src.startswith("]]", pos):
-        raise TOMLDecodeError(
-            "Expected ']]' at the end of an array declaration", src, pos
-        )
-    return pos + 2, key
-
-
-def key_value_rule(
-    src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
-) -> Pos:
-    pos, key, value = parse_key_value_pair(src, pos, parse_float)
-    key_parent, key_stem = key[:-1], key[-1]
-    abs_key_parent = header + key_parent
-
-    relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
-    for cont_key in relative_path_cont_keys:
-        # Check that dotted key syntax does not redefine an existing table
-        if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
-            raise TOMLDecodeError(f"Cannot redefine namespace {cont_key}", src, pos)
-        # Containers in the relative path can't be opened with the table syntax or
-        # dotted key/value syntax in following table sections.
-        out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)
-
-    if out.flags.is_(abs_key_parent, Flags.FROZEN):
-        raise TOMLDecodeError(
-            f"Cannot mutate immutable namespace {abs_key_parent}", src, pos
-        )
-
-    try:
-        nest = out.data.get_or_create_nest(abs_key_parent)
-    except KeyError:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-    if key_stem in nest:
-        raise TOMLDecodeError("Cannot overwrite a value", src, pos)
-    # Mark inline table and array namespaces recursively immutable
-    if isinstance(value, (dict, list)):
-        out.flags.set(header + key, Flags.FROZEN, recursive=True)
-    nest[key_stem] = value
-    return pos
-
-
-def parse_key_value_pair(
-    src: str, pos: Pos, parse_float: ParseFloat
-) -> tuple[Pos, Key, Any]:
-    pos, key = parse_key(src, pos)
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char != "=":
-        raise TOMLDecodeError("Expected '=' after a key in a key/value pair", src, pos)
-    pos += 1
-    pos = skip_chars(src, pos, TOML_WS)
-    pos, value = parse_value(src, pos, parse_float)
-    return pos, key, value
-
-
-def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
-    pos, key_part = parse_key_part(src, pos)
-    key: Key = (key_part,)
-    pos = skip_chars(src, pos, TOML_WS)
-    while True:
-        try:
-            char: str | None = src[pos]
-        except IndexError:
-            char = None
-        if char != ".":
-            return pos, key
-        pos += 1
-        pos = skip_chars(src, pos, TOML_WS)
-        pos, key_part = parse_key_part(src, pos)
-        key += (key_part,)
-        pos = skip_chars(src, pos, TOML_WS)
-
-
-def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-    if char in BARE_KEY_CHARS:
-        start_pos = pos
-        pos = skip_chars(src, pos, BARE_KEY_CHARS)
-        return pos, src[start_pos:pos]
-    if char == "'":
-        return parse_literal_str(src, pos)
-    if char == '"':
-        return parse_one_line_basic_str(src, pos)
-    raise TOMLDecodeError("Invalid initial character for a key part", src, pos)
-
-
-def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
-    pos += 1
-    return parse_basic_str(src, pos, multiline=False)
-
-
-def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list[Any]]:
-    pos += 1
-    array: list[Any] = []
-
-    pos = skip_comments_and_array_ws(src, pos)
-    if src.startswith("]", pos):
-        return pos + 1, array
-    while True:
-        pos, val = parse_value(src, pos, parse_float)
-        array.append(val)
-        pos = skip_comments_and_array_ws(src, pos)
-
-        c = src[pos : pos + 1]
-        if c == "]":
-            return pos + 1, array
-        if c != ",":
-            raise TOMLDecodeError("Unclosed array", src, pos)
-        pos += 1
-
-        pos = skip_comments_and_array_ws(src, pos)
-        if src.startswith("]", pos):
-            return pos + 1, array
-
-
-def parse_inline_table(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, dict[str, Any]]:
-    pos += 1
-    nested_dict = NestedDict()
-    flags = Flags()
-
-    pos = skip_chars(src, pos, TOML_WS)
-    if src.startswith("}", pos):
-        return pos + 1, nested_dict.dict
-    while True:
-        pos, key, value = parse_key_value_pair(src, pos, parse_float)
-        key_parent, key_stem = key[:-1], key[-1]
-        if flags.is_(key, Flags.FROZEN):
-            raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
-        try:
-            nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
-        except KeyError:
-            raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
-        if key_stem in nest:
-            raise TOMLDecodeError(f"Duplicate inline table key {key_stem!r}", src, pos)
-        nest[key_stem] = value
-        pos = skip_chars(src, pos, TOML_WS)
-        c = src[pos : pos + 1]
-        if c == "}":
-            return pos + 1, nested_dict.dict
-        if c != ",":
-            raise TOMLDecodeError("Unclosed inline table", src, pos)
-        if isinstance(value, (dict, list)):
-            flags.set(key, Flags.FROZEN, recursive=True)
-        pos += 1
-        pos = skip_chars(src, pos, TOML_WS)
-
-
-def parse_basic_str_escape(
-    src: str, pos: Pos, *, multiline: bool = False
-) -> tuple[Pos, str]:
-    escape_id = src[pos : pos + 2]
-    pos += 2
-    if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
-        # Skip whitespace until next non-whitespace character or end of
-        # the doc. Error if non-whitespace is found before newline.
-        if escape_id != "\\\n":
-            pos = skip_chars(src, pos, TOML_WS)
-            try:
-                char = src[pos]
-            except IndexError:
-                return pos, ""
-            if char != "\n":
-                raise TOMLDecodeError("Unescaped '\\' in a string", src, pos)
-            pos += 1
-        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
-        return pos, ""
-    if escape_id == "\\u":
-        return parse_hex_char(src, pos, 4)
-    if escape_id == "\\U":
-        return parse_hex_char(src, pos, 8)
-    try:
-        return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
-    except KeyError:
-        raise TOMLDecodeError("Unescaped '\\' in a string", src, pos) from None
-
-
-def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
-    return parse_basic_str_escape(src, pos, multiline=True)
-
-
-def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
-    hex_str = src[pos : pos + hex_len]
-    if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
-        raise TOMLDecodeError("Invalid hex value", src, pos)
-    pos += hex_len
-    hex_int = int(hex_str, 16)
-    if not is_unicode_scalar_value(hex_int):
-        raise TOMLDecodeError(
-            "Escaped character is not a Unicode scalar value", src, pos
-        )
-    return pos, chr(hex_int)
-
-
-def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
-    pos += 1  # Skip starting apostrophe
-    start_pos = pos
-    pos = skip_until(
-        src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
-    )
-    return pos + 1, src[start_pos:pos]  # Skip ending apostrophe
-
-
-def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
-    pos += 3
-    if src.startswith("\n", pos):
-        pos += 1
-
-    if literal:
-        delim = "'"
-        end_pos = skip_until(
-            src,
-            pos,
-            "'''",
-            error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
-            error_on_eof=True,
-        )
-        result = src[pos:end_pos]
-        pos = end_pos + 3
-    else:
-        delim = '"'
-        pos, result = parse_basic_str(src, pos, multiline=True)
-
-    # Add at maximum two extra apostrophes/quotes if the end sequence
-    # is 4 or 5 chars long instead of just 3.
-    if not src.startswith(delim, pos):
-        return pos, result
-    pos += 1
-    if not src.startswith(delim, pos):
-        return pos, result + delim
-    pos += 1
-    return pos, result + (delim * 2)
-
-
-def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
-    if multiline:
-        error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
-        parse_escapes = parse_basic_str_escape_multiline
-    else:
-        error_on = ILLEGAL_BASIC_STR_CHARS
-        parse_escapes = parse_basic_str_escape
-    result = ""
-    start_pos = pos
-    while True:
-        try:
-            char = src[pos]
-        except IndexError:
-            raise TOMLDecodeError("Unterminated string", src, pos) from None
-        if char == '"':
-            if not multiline:
-                return pos + 1, result + src[start_pos:pos]
-            if src.startswith('"""', pos):
-                return pos + 3, result + src[start_pos:pos]
-            pos += 1
-            continue
-        if char == "\\":
-            result += src[start_pos:pos]
-            pos, parsed_escape = parse_escapes(src, pos)
-            result += parsed_escape
-            start_pos = pos
-            continue
-        if char in error_on:
-            raise TOMLDecodeError(f"Illegal character {char!r}", src, pos)
-        pos += 1
-
-
-def parse_value(  # noqa: C901
-    src: str, pos: Pos, parse_float: ParseFloat
-) -> tuple[Pos, Any]:
-    try:
-        char: str | None = src[pos]
-    except IndexError:
-        char = None
-
-    # IMPORTANT: order conditions based on speed of checking and likelihood
-
-    # Basic strings
-    if char == '"':
-        if src.startswith('"""', pos):
-            return parse_multiline_str(src, pos, literal=False)
-        return parse_one_line_basic_str(src, pos)
-
-    # Literal strings
-    if char == "'":
-        if src.startswith("'''", pos):
-            return parse_multiline_str(src, pos, literal=True)
-        return parse_literal_str(src, pos)
-
-    # Booleans
-    if char == "t":
-        if src.startswith("true", pos):
-            return pos + 4, True
-    if char == "f":
-        if src.startswith("false", pos):
-            return pos + 5, False
-
-    # Arrays
-    if char == "[":
-        return parse_array(src, pos, parse_float)
-
-    # Inline tables
-    if char == "{":
-        return parse_inline_table(src, pos, parse_float)
-
-    # Dates and times
-    datetime_match = RE_DATETIME.match(src, pos)
-    if datetime_match:
-        try:
-            datetime_obj = match_to_datetime(datetime_match)
-        except ValueError as e:
-            raise TOMLDecodeError("Invalid date or datetime", src, pos) from e
-        return datetime_match.end(), datetime_obj
-    localtime_match = RE_LOCALTIME.match(src, pos)
-    if localtime_match:
-        return localtime_match.end(), match_to_localtime(localtime_match)
-
-    # Integers and "normal" floats.
-    # The regex will greedily match any type starting with a decimal
-    # char, so needs to be located after handling of dates and times.
-    number_match = RE_NUMBER.match(src, pos)
-    if number_match:
-        return number_match.end(), match_to_number(number_match, parse_float)
-
-    # Special floats
-    first_three = src[pos : pos + 3]
-    if first_three in {"inf", "nan"}:
-        return pos + 3, parse_float(first_three)
-    first_four = src[pos : pos + 4]
-    if first_four in {"-inf", "+inf", "-nan", "+nan"}:
-        return pos + 4, parse_float(first_four)
-
-    raise TOMLDecodeError("Invalid value", src, pos)
-
-
-def is_unicode_scalar_value(codepoint: int) -> bool:
-    return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)
-
-
-def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
-    """A decorator to make `parse_float` safe.
-
-    `parse_float` must not return dicts or lists, because these types
-    would be mixed with parsed TOML tables and arrays, thus confusing
-    the parser. The returned decorated callable raises `ValueError`
-    instead of returning illegal types.
-    """
-    # The default `float` callable never returns illegal types. Optimize it.
-    if parse_float is float:
-        return float
-
-    def safe_parse_float(float_str: str) -> Any:
-        float_value = parse_float(float_str)
-        if isinstance(float_value, (dict, list)):
-            raise ValueError("parse_float must not return dicts or lists")
-        return float_value
-
-    return safe_parse_float
diff --git a/Python314_4_x64_Template/Lib/urllib/__init__.py b/Python314_4_x64_Template/Lib/urllib/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Python314_4_x64_Template/Lib/urllib/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/urllib/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index ebae42b48..000000000
Binary files a/Python314_4_x64_Template/Lib/urllib/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/urllib/__pycache__/request.cpython-314.pyc b/Python314_4_x64_Template/Lib/urllib/__pycache__/request.cpython-314.pyc
deleted file mode 100644
index 9784a07a9..000000000
Binary files a/Python314_4_x64_Template/Lib/urllib/__pycache__/request.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/urllib/__pycache__/response.cpython-314.pyc b/Python314_4_x64_Template/Lib/urllib/__pycache__/response.cpython-314.pyc
deleted file mode 100644
index 0b39fc6c9..000000000
Binary files a/Python314_4_x64_Template/Lib/urllib/__pycache__/response.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/urllib/robotparser.py b/Python314_4_x64_Template/Lib/urllib/robotparser.py
deleted file mode 100644
index 4009fd6b5..000000000
--- a/Python314_4_x64_Template/Lib/urllib/robotparser.py
+++ /dev/null
@@ -1,288 +0,0 @@
-""" robotparser.py
-
-    Copyright (C) 2000  Bastian Kleineidam
-
-    You can choose between two licenses when using this package:
-    1) GNU GPLv2
-    2) PSF license for Python 2.2
-
-    The robots.txt Exclusion Protocol is implemented as specified in
-    http://www.robotstxt.org/norobots-rfc.txt
-"""
-
-import collections
-import re
-import urllib.error
-import urllib.parse
-import urllib.request
-
-__all__ = ["RobotFileParser"]
-
-RequestRate = collections.namedtuple("RequestRate", "requests seconds")
-
-
-def normalize(path):
-    unquoted = urllib.parse.unquote(path, errors='surrogateescape')
-    return urllib.parse.quote(unquoted, errors='surrogateescape')
-
-def normalize_path(path):
-    path, sep, query = path.partition('?')
-    path = normalize(path)
-    if sep:
-        query = re.sub(r'[^=&]+', lambda m: normalize(m[0]), query)
-        path += '?' + query
-    return path
-
-
-class RobotFileParser:
-    """ This class provides a set of methods to read, parse and answer
-    questions about a single robots.txt file.
-
-    """
-
-    def __init__(self, url=''):
-        self.entries = []
-        self.sitemaps = []
-        self.default_entry = None
-        self.disallow_all = False
-        self.allow_all = False
-        self.set_url(url)
-        self.last_checked = 0
-
-    def mtime(self):
-        """Returns the time the robots.txt file was last fetched.
-
-        This is useful for long-running web spiders that need to
-        check for new robots.txt files periodically.
-
-        """
-        return self.last_checked
-
-    def modified(self):
-        """Sets the time the robots.txt file was last fetched to the
-        current time.
-
-        """
-        import time
-        self.last_checked = time.time()
-
-    def set_url(self, url):
-        """Sets the URL referring to a robots.txt file."""
-        self.url = url
-        self.host, self.path = urllib.parse.urlsplit(url)[1:3]
-
-    def read(self):
-        """Reads the robots.txt URL and feeds it to the parser."""
-        try:
-            f = urllib.request.urlopen(self.url)
-        except urllib.error.HTTPError as err:
-            if err.code in (401, 403):
-                self.disallow_all = True
-            elif err.code >= 400 and err.code < 500:
-                self.allow_all = True
-            err.close()
-        else:
-            raw = f.read()
-            self.parse(raw.decode("utf-8", "surrogateescape").splitlines())
-
-    def _add_entry(self, entry):
-        if "*" in entry.useragents:
-            # the default entry is considered last
-            if self.default_entry is None:
-                # the first default entry wins
-                self.default_entry = entry
-        else:
-            self.entries.append(entry)
-
-    def parse(self, lines):
-        """Parse the input lines from a robots.txt file.
-
-        We allow that a user-agent: line is not preceded by
-        one or more blank lines.
-        """
-        # states:
-        #   0: start state
-        #   1: saw user-agent line
-        #   2: saw an allow or disallow line
-        state = 0
-        entry = Entry()
-
-        self.modified()
-        for line in lines:
-            if not line:
-                if state == 1:
-                    entry = Entry()
-                    state = 0
-                elif state == 2:
-                    self._add_entry(entry)
-                    entry = Entry()
-                    state = 0
-            # remove optional comment and strip line
-            i = line.find('#')
-            if i >= 0:
-                line = line[:i]
-            line = line.strip()
-            if not line:
-                continue
-            line = line.split(':', 1)
-            if len(line) == 2:
-                line[0] = line[0].strip().lower()
-                line[1] = line[1].strip()
-                if line[0] == "user-agent":
-                    if state == 2:
-                        self._add_entry(entry)
-                        entry = Entry()
-                    entry.useragents.append(line[1])
-                    state = 1
-                elif line[0] == "disallow":
-                    if state != 0:
-                        entry.rulelines.append(RuleLine(line[1], False))
-                        state = 2
-                elif line[0] == "allow":
-                    if state != 0:
-                        entry.rulelines.append(RuleLine(line[1], True))
-                        state = 2
-                elif line[0] == "crawl-delay":
-                    if state != 0:
-                        # before trying to convert to int we need to make
-                        # sure that robots.txt has valid syntax otherwise
-                        # it will crash
-                        if line[1].strip().isdigit():
-                            entry.delay = int(line[1])
-                        state = 2
-                elif line[0] == "request-rate":
-                    if state != 0:
-                        numbers = line[1].split('/')
-                        # check if all values are sane
-                        if (len(numbers) == 2 and numbers[0].strip().isdigit()
-                            and numbers[1].strip().isdigit()):
-                            entry.req_rate = RequestRate(int(numbers[0]), int(numbers[1]))
-                        state = 2
-                elif line[0] == "sitemap":
-                    # According to http://www.sitemaps.org/protocol.html
-                    # "This directive is independent of the user-agent line,
-                    #  so it doesn't matter where you place it in your file."
-                    # Therefore we do not change the state of the parser.
-                    self.sitemaps.append(line[1])
-        if state == 2:
-            self._add_entry(entry)
-
-    def can_fetch(self, useragent, url):
-        """using the parsed robots.txt decide if useragent can fetch url"""
-        if self.disallow_all:
-            return False
-        if self.allow_all:
-            return True
-        # Until the robots.txt file has been read or found not
-        # to exist, we must assume that no url is allowable.
-        # This prevents false positives when a user erroneously
-        # calls can_fetch() before calling read().
-        if not self.last_checked:
-            return False
-        # search for given user agent matches
-        # the first match counts
-        # TODO: The private API is used in order to preserve an empty query.
-        # This is temporary until the public API starts supporting this feature.
-        parsed_url = urllib.parse._urlsplit(url, '')
-        url = urllib.parse._urlunsplit(None, None, *parsed_url[2:])
-        url = normalize_path(url)
-        if not url:
-            url = "/"
-        for entry in self.entries:
-            if entry.applies_to(useragent):
-                return entry.allowance(url)
-        # try the default entry last
-        if self.default_entry:
-            return self.default_entry.allowance(url)
-        # agent not found ==> access granted
-        return True
-
-    def crawl_delay(self, useragent):
-        if not self.mtime():
-            return None
-        for entry in self.entries:
-            if entry.applies_to(useragent):
-                return entry.delay
-        if self.default_entry:
-            return self.default_entry.delay
-        return None
-
-    def request_rate(self, useragent):
-        if not self.mtime():
-            return None
-        for entry in self.entries:
-            if entry.applies_to(useragent):
-                return entry.req_rate
-        if self.default_entry:
-            return self.default_entry.req_rate
-        return None
-
-    def site_maps(self):
-        if not self.sitemaps:
-            return None
-        return self.sitemaps
-
-    def __str__(self):
-        entries = self.entries
-        if self.default_entry is not None:
-            entries = entries + [self.default_entry]
-        return '\n\n'.join(map(str, entries))
-
-class RuleLine:
-    """A rule line is a single "Allow:" (allowance==True) or "Disallow:"
-       (allowance==False) followed by a path."""
-    def __init__(self, path, allowance):
-        if path == '' and not allowance:
-            # an empty value means allow all
-            allowance = True
-        self.path = normalize_path(path)
-        self.allowance = allowance
-
-    def applies_to(self, filename):
-        return self.path == "*" or filename.startswith(self.path)
-
-    def __str__(self):
-        return ("Allow" if self.allowance else "Disallow") + ": " + self.path
-
-
-class Entry:
-    """An entry has one or more user-agents and zero or more rulelines"""
-    def __init__(self):
-        self.useragents = []
-        self.rulelines = []
-        self.delay = None
-        self.req_rate = None
-
-    def __str__(self):
-        ret = []
-        for agent in self.useragents:
-            ret.append(f"User-agent: {agent}")
-        if self.delay is not None:
-            ret.append(f"Crawl-delay: {self.delay}")
-        if self.req_rate is not None:
-            rate = self.req_rate
-            ret.append(f"Request-rate: {rate.requests}/{rate.seconds}")
-        ret.extend(map(str, self.rulelines))
-        return '\n'.join(ret)
-
-    def applies_to(self, useragent):
-        """check if this entry applies to the specified agent"""
-        # split the name token and make it lower case
-        useragent = useragent.split("/")[0].lower()
-        for agent in self.useragents:
-            if agent == '*':
-                # we have the catch-all agent
-                return True
-            agent = agent.lower()
-            if agent in useragent:
-                return True
-        return False
-
-    def allowance(self, filename):
-        """Preconditions:
-        - our agent applies to this entry
-        - filename is URL encoded"""
-        for line in self.rulelines:
-            if line.applies_to(filename):
-                return line.allowance
-        return True
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/common/Activate.ps1 b/Python314_4_x64_Template/Lib/venv/scripts/common/Activate.ps1
deleted file mode 100644
index 2cc909193..000000000
--- a/Python314_4_x64_Template/Lib/venv/scripts/common/Activate.ps1
+++ /dev/null
@@ -1,547 +0,0 @@
-<#
-.Synopsis
-Activate a Python virtual environment for the current PowerShell session.
-
-.Description
-Pushes the python executable for a virtual environment to the front of the
-$Env:PATH environment variable and sets the prompt to signify that you are
-in a Python virtual environment. Makes use of the command line switches as
-well as the `pyvenv.cfg` file values present in the virtual environment.
-
-.Parameter VenvDir
-Path to the directory that contains the virtual environment to activate. The
-default value for this is the parent of the directory that the Activate.ps1
-script is located within.
-
-.Parameter Prompt
-The prompt prefix to display when this virtual environment is activated. By
-default, this prompt is the name of the virtual environment folder (VenvDir)
-surrounded by parentheses and followed by a single space (ie. '(.venv) ').
-
-.Example
-Activate.ps1
-Activates the Python virtual environment that contains the Activate.ps1 script.
-
-.Example
-Activate.ps1 -Verbose
-Activates the Python virtual environment that contains the Activate.ps1 script,
-and shows extra information about the activation as it executes.
-
-.Example
-Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
-Activates the Python virtual environment located in the specified location.
-
-.Example
-Activate.ps1 -Prompt "MyPython"
-Activates the Python virtual environment that contains the Activate.ps1 script,
-and prefixes the current prompt with the specified string (surrounded in
-parentheses) while the virtual environment is active.
-
-.Notes
-On Windows, it may be required to enable this Activate.ps1 script by setting the
-execution policy for the user. You can do this by issuing the following PowerShell
-command:
-
-PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
-For more information on Execution Policies: 
-https://go.microsoft.com/fwlink/?LinkID=135170
-
-#>
-Param(
-    [Parameter(Mandatory = $false)]
-    [String]
-    $VenvDir,
-    [Parameter(Mandatory = $false)]
-    [String]
-    $Prompt
-)
-
-<# Function declarations --------------------------------------------------- #>
-
-<#
-.Synopsis
-Remove all shell session elements added by the Activate script, including the
-addition of the virtual environment's Python executable from the beginning of
-the PATH variable.
-
-.Parameter NonDestructive
-If present, do not remove this function from the global namespace for the
-session.
-
-#>
-function global:deactivate ([switch]$NonDestructive) {
-    # Revert to original values
-
-    # The prior prompt:
-    if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
-        Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
-        Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
-    }
-
-    # The prior PYTHONHOME:
-    if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
-        Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
-        Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
-    }
-
-    # The prior PATH:
-    if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
-        Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
-        Remove-Item -Path Env:_OLD_VIRTUAL_PATH
-    }
-
-    # Just remove the VIRTUAL_ENV altogether:
-    if (Test-Path -Path Env:VIRTUAL_ENV) {
-        Remove-Item -Path env:VIRTUAL_ENV
-    }
-
-    # Just remove VIRTUAL_ENV_PROMPT altogether.
-    if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
-        Remove-Item -Path env:VIRTUAL_ENV_PROMPT
-    }
-
-    # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
-    if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
-        Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
-    }
-
-    # Leave deactivate function in the global namespace if requested:
-    if (-not $NonDestructive) {
-        Remove-Item -Path function:deactivate
-    }
-}
-
-<#
-.Description
-Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
-given folder, and returns them in a map.
-
-For each line in the pyvenv.cfg file, if that line can be parsed into exactly
-two strings separated by `=` (with any amount of whitespace surrounding the =)
-then it is considered a `key = value` line. The left hand string is the key,
-the right hand is the value.
-
-If the value starts with a `'` or a `"` then the first and last character is
-stripped from the value before being captured.
-
-.Parameter ConfigDir
-Path to the directory that contains the `pyvenv.cfg` file.
-#>
-function Get-PyVenvConfig(
-    [String]
-    $ConfigDir
-) {
-    Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
-
-    # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
-    $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
-
-    # An empty map will be returned if no config file is found.
-    $pyvenvConfig = @{ }
-
-    if ($pyvenvConfigPath) {
-
-        Write-Verbose "File exists, parse `key = value` lines"
-        $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
-
-        $pyvenvConfigContent | ForEach-Object {
-            $keyval = $PSItem -split "\s*=\s*", 2
-            if ($keyval[0] -and $keyval[1]) {
-                $val = $keyval[1]
-
-                # Remove extraneous quotations around a string value.
-                if ("'""".Contains($val.Substring(0, 1))) {
-                    $val = $val.Substring(1, $val.Length - 2)
-                }
-
-                $pyvenvConfig[$keyval[0]] = $val
-                Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
-            }
-        }
-    }
-    return $pyvenvConfig
-}
-
-
-<# Begin Activate script --------------------------------------------------- #>
-
-# Determine the containing directory of this script
-$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
-$VenvExecDir = Get-Item -Path $VenvExecPath
-
-Write-Verbose "Activation script is located in path: '$VenvExecPath'"
-Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
-Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
-
-# Set values required in priority: CmdLine, ConfigFile, Default
-# First, get the location of the virtual environment, it might not be
-# VenvExecDir if specified on the command line.
-if ($VenvDir) {
-    Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
-}
-else {
-    Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
-    $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
-    Write-Verbose "VenvDir=$VenvDir"
-}
-
-# Next, read the `pyvenv.cfg` file to determine any required value such
-# as `prompt`.
-$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
-
-# Next, set the prompt from the command line, or the config file, or
-# just use the name of the virtual environment folder.
-if ($Prompt) {
-    Write-Verbose "Prompt specified as argument, using '$Prompt'"
-}
-else {
-    Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
-    if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
-        Write-Verbose "  Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
-        $Prompt = $pyvenvCfg['prompt'];
-    }
-    else {
-        Write-Verbose "  Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
-        Write-Verbose "  Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
-        $Prompt = Split-Path -Path $venvDir -Leaf
-    }
-}
-
-Write-Verbose "Prompt = '$Prompt'"
-Write-Verbose "VenvDir='$VenvDir'"
-
-# Deactivate any currently active virtual environment, but leave the
-# deactivate function in place.
-deactivate -nondestructive
-
-# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
-# that there is an activated venv.
-$env:VIRTUAL_ENV = $VenvDir
-
-$env:VIRTUAL_ENV_PROMPT = $Prompt
-
-if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
-
-    Write-Verbose "Setting prompt to '$Prompt'"
-
-    # Set the prompt to include the env name
-    # Make sure _OLD_VIRTUAL_PROMPT is global
-    function global:_OLD_VIRTUAL_PROMPT { "" }
-    Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
-    New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
-
-    function global:prompt {
-        Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
-        _OLD_VIRTUAL_PROMPT
-    }
-}
-
-# Clear PYTHONHOME
-if (Test-Path -Path Env:PYTHONHOME) {
-    Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
-    Remove-Item -Path Env:PYTHONHOME
-}
-
-# Add the venv to the PATH
-Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
-$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
-
-# SIG # Begin signature block
-# MII3YgYJKoZIhvcNAQcCoII3UzCCN08CAQExDzANBglghkgBZQMEAgEFADB5Bgor
-# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
-# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBALKwKRFIhr2RY
-# IW/WJLd9pc8a9sj/IoThKU92fTfKsKCCG9IwggXMMIIDtKADAgECAhBUmNLR1FsZ
-# lUgTecgRwIeZMA0GCSqGSIb3DQEBDAUAMHcxCzAJBgNVBAYTAlVTMR4wHAYDVQQK
-# ExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xSDBGBgNVBAMTP01pY3Jvc29mdCBJZGVu
-# dGl0eSBWZXJpZmljYXRpb24gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgMjAy
-# MDAeFw0yMDA0MTYxODM2MTZaFw00NTA0MTYxODQ0NDBaMHcxCzAJBgNVBAYTAlVT
-# MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xSDBGBgNVBAMTP01pY3Jv
-# c29mdCBJZGVudGl0eSBWZXJpZmljYXRpb24gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRo
-# b3JpdHkgMjAyMDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALORKgeD
-# Bmf9np3gx8C3pOZCBH8Ppttf+9Va10Wg+3cL8IDzpm1aTXlT2KCGhFdFIMeiVPvH
-# or+Kx24186IVxC9O40qFlkkN/76Z2BT2vCcH7kKbK/ULkgbk/WkTZaiRcvKYhOuD
-# PQ7k13ESSCHLDe32R0m3m/nJxxe2hE//uKya13NnSYXjhr03QNAlhtTetcJtYmrV
-# qXi8LW9J+eVsFBT9FMfTZRY33stuvF4pjf1imxUs1gXmuYkyM6Nix9fWUmcIxC70
-# ViueC4fM7Ke0pqrrBc0ZV6U6CwQnHJFnni1iLS8evtrAIMsEGcoz+4m+mOJyoHI1
-# vnnhnINv5G0Xb5DzPQCGdTiO0OBJmrvb0/gwytVXiGhNctO/bX9x2P29Da6SZEi3
-# W295JrXNm5UhhNHvDzI9e1eM80UHTHzgXhgONXaLbZ7LNnSrBfjgc10yVpRnlyUK
-# xjU9lJfnwUSLgP3B+PR0GeUw9gb7IVc+BhyLaxWGJ0l7gpPKWeh1R+g/OPTHU3mg
-# trTiXFHvvV84wRPmeAyVWi7FQFkozA8kwOy6CXcjmTimthzax7ogttc32H83rwjj
-# O3HbbnMbfZlysOSGM1l0tRYAe1BtxoYT2v3EOYI9JACaYNq6lMAFUSw0rFCZE4e7
-# swWAsk0wAly4JoNdtGNz764jlU9gKL431VulAgMBAAGjVDBSMA4GA1UdDwEB/wQE
-# AwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIftJqhSobyhmYBAcnz1AQ
-# T2ioojAQBgkrBgEEAYI3FQEEAwIBADANBgkqhkiG9w0BAQwFAAOCAgEAr2rd5hnn
-# LZRDGU7L6VCVZKUDkQKL4jaAOxWiUsIWGbZqWl10QzD0m/9gdAmxIR6QFm3FJI9c
-# Zohj9E/MffISTEAQiwGf2qnIrvKVG8+dBetJPnSgaFvlVixlHIJ+U9pW2UYXeZJF
-# xBA2CFIpF8svpvJ+1Gkkih6PsHMNzBxKq7Kq7aeRYwFkIqgyuH4yKLNncy2RtNwx
-# AQv3Rwqm8ddK7VZgxCwIo3tAsLx0J1KH1r6I3TeKiW5niB31yV2g/rarOoDXGpc8
-# FzYiQR6sTdWD5jw4vU8w6VSp07YEwzJ2YbuwGMUrGLPAgNW3lbBeUU0i/OxYqujY
-# lLSlLu2S3ucYfCFX3VVj979tzR/SpncocMfiWzpbCNJbTsgAlrPhgzavhgplXHT2
-# 6ux6anSg8Evu75SjrFDyh+3XOjCDyft9V77l4/hByuVkrrOj7FjshZrM77nq81YY
-# uVxzmq/FdxeDWds3GhhyVKVB0rYjdaNDmuV3fJZ5t0GNv+zcgKCf0Xd1WF81E+Al
-# GmcLfc4l+gcK5GEh2NQc5QfGNpn0ltDGFf5Ozdeui53bFv0ExpK91IjmqaOqu/dk
-# ODtfzAzQNb50GQOmxapMomE2gj4d8yu8l13bS3g7LfU772Aj6PXsCyM2la+YZr9T
-# 03u4aUoqlmZpxJTG9F9urJh4iIAGXKKy7aIwggb+MIIE5qADAgECAhMzAAfqVHr/
-# 4Q/aDzAcAAAAB+pUMA0GCSqGSIb3DQEBDAUAMFoxCzAJBgNVBAYTAlVTMR4wHAYD
-# VQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKzApBgNVBAMTIk1pY3Jvc29mdCBJ
-# RCBWZXJpZmllZCBDUyBFT0MgQ0EgMDIwHhcNMjYwNDA3MDcyODM1WhcNMjYwNDEw
-# MDcyODM1WjB8MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMRIwEAYDVQQH
-# EwlCZWF2ZXJ0b24xIzAhBgNVBAoTGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9u
-# MSMwIQYDVQQDExpQeXRob24gU29mdHdhcmUgRm91bmRhdGlvbjCCAaIwDQYJKoZI
-# hvcNAQEBBQADggGPADCCAYoCggGBAND/lHfn3OCIvUzMUIL6OdsKJrpnvuRtahV1
-# 6NCf0YSqOQemwQw2bTIyTkgSFwY4WaCvfHzcliURiPidXiqy56OmeC19A95BarKA
-# UmKRv3bVpM0XEK7OLvMyRFNg9aPUi1nmdF3Vx02RI9p88wBHQR5nNIpOTXlwfONQ
-# klggyEZSxkBf+dCL6jtz4jiqoreiEmRwesOrtQxKNsRuezbumpmVMZGxrMQVLBIX
-# OWG9a3GS6Sqfi+cJgxQhSKa9JENPRojyxOyVG8vdwJQiMqSjm2ZMFAkIkSWBQSfx
-# WjrRmw8/20WaBENattpqb7/cjX7zwimJ86uV48D8AQIGzAxfYAySG6NG9iMfU5S5
-# wzDFpiCuXyfrlgAbZu4fnBIyOmGcq01XxruzJ3FcdLMif5YXZU+n30XOaJfgY9/x
-# Gq2HiEIQF5MeuxknfD+vYi/GXGtC/nlKS0Tx91+YXt6RctxgJEwpZCGzFZmmaiUa
-# Y0GBp4jzXXwLqX8T15lgxAGoqoPvvwIDAQABo4ICGTCCAhUwDAYDVR0TAQH/BAIw
-# ADAOBgNVHQ8BAf8EBAMCB4AwPAYDVR0lBDUwMwYKKwYBBAGCN2EBAAYIKwYBBQUH
-# AwMGGysGAQQBgjdhgqKNuwqmkohkgZH0oEWCk/3hbzAdBgNVHQ4EFgQUy3N6DzeS
-# y91jju8Ihmm3r+5AO58wHwYDVR0jBBgwFoAUZZ9RzoVofy+KRYiq3acxux4NAF4w
-# ZwYDVR0fBGAwXjBcoFqgWIZWaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9w
-# cy9jcmwvTWljcm9zb2Z0JTIwSUQlMjBWZXJpZmllZCUyMENTJTIwRU9DJTIwQ0El
-# MjAwMi5jcmwwgaUGCCsGAQUFBwEBBIGYMIGVMGQGCCsGAQUFBzAChlhodHRwOi8v
-# d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY3Jvc29mdCUyMElEJTIw
-# VmVyaWZpZWQlMjBDUyUyMEVPQyUyMENBJTIwMDIuY3J0MC0GCCsGAQUFBzABhiFo
-# dHRwOi8vb25lb2NzcC5taWNyb3NvZnQuY29tL29jc3AwZgYDVR0gBF8wXTBRBgwr
-# BgEEAYI3TIN9AQEwQTA/BggrBgEFBQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQu
-# Y29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnkuaHRtMAgGBmeBDAEEATANBgkqhkiG
-# 9w0BAQwFAAOCAgEAPPwJPfkrkQMH39/iTBbir6tGnQpLCpOuP1A6mmKp22GxCG0/
-# 1IPx4QK1qXpy8hYd/G9ySDSYu3DSg22/icSmGSxdcI3zoRsj9vdJeesQrxtK8v9y
-# 4zMxN5TaLV5CmatSUZPyX1t7Tee9wiLBUeZIj+3Lg2gNUsdvavywRYxSYkWGuGaM
-# jGtJrs4PoJW3f4KkOc5mShCpUgl4Mo9ZO+ChcQpKEP99UJ9CXB9wrNzXnEOTyGnR
-# f1sYklPqBifC7hrnKIPZiJte1efmGeExmspWewmUSNXCIGenDAN8XDut2yi1iSSQ
-# n1VtL6deCRhS1cTn+FAzy2q7a/8Jhhq+HUlcJwRGtrxgKZHrwEvGRvIWNK5l1rKl
-# Q+WQ7RqRrH6PpSfR/xoptfpJX9LNUoHS0m114HcE2xk2hbv+U/5ZgxUtSd4MbF7/
-# C8eShz4Os8CznYXJ/d+kfvoyEqKE9VCbc4BUC+w1iufQOPo4tRvK4TFJu1N4IqJk
-# NsChWXUef7lIT5CoaJw4np0dVS2NosmRCxi1dMyADzqFNDXGKQxq5k6MpnXbevL5
-# JdcznhhxgwRUcwNK/3f9WSaU2mnI+6tHrnATteL7Ct6FzZWjqWDbURkU66bRqrBh
-# +u5KyLZAAQXTfdsaDUfxtElQJf5wROgYvwnW1dGvujgc+XKVvf1VT3GSFRIwggda
-# MIIFQqADAgECAhMzAAAABft6XDITYd9dAAAAAAAFMA0GCSqGSIb3DQEBDAUAMGMx
-# CzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xNDAy
-# BgNVBAMTK01pY3Jvc29mdCBJRCBWZXJpZmllZCBDb2RlIFNpZ25pbmcgUENBIDIw
-# MjEwHhcNMjEwNDEzMTczMTUzWhcNMjYwNDEzMTczMTUzWjBaMQswCQYDVQQGEwJV
-# UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSswKQYDVQQDEyJNaWNy
-# b3NvZnQgSUQgVmVyaWZpZWQgQ1MgRU9DIENBIDAyMIICIjANBgkqhkiG9w0BAQEF
-# AAOCAg8AMIICCgKCAgEA0hqZfD8ykKTA6CDbWvshmBpDoBf7Lv132RVuSqVwQO3a
-# ALLkuRnnTIoRmMGo0fIMQrtwR6UHB06xdqOkAfqB6exubXTHu44+duHUCdE4ngjE
-# LBQyluMuSOnHaEdveIbt31OhMEX/4nQkph4+Ah0eR4H2sTRrVKmKrlOoQlhia73Q
-# g2dHoitcX1uT1vW3Knpt9Mt76H7ZHbLNspMZLkWBabKMl6BdaWZXYpPGdS+qY80g
-# DaNCvFq0d10UMu7xHesIqXpTDT3Q3AeOxSylSTc/74P3og9j3OuemEFauFzL55t1
-# MvpadEhQmD8uFMxFv/iZOjwvcdY1zhanVLLyplz13/NzSoU3QjhPdqAGhRIwh/YD
-# zo3jCdVJgWQRrW83P3qWFFkxNiME2iO4IuYgj7RwseGwv7I9cxOyaHihKMdT9Neo
-# SjpSNzVnKKGcYMtOdMtKFqoV7Cim2m84GmIYZTBorR/Po9iwlasTYKFpGZqdWKyY
-# nJO2FV8oMmWkIK1iagLLgEt6ZaR0rk/1jUYssyTiRqWr84Qs3XL/V5KUBEtUEQfQ
-# /4RtnI09uFFUIGJZV9mD/xOUksWodGrCQSem6Hy261xMJAHqTqMuDKgwi8xk/mfl
-# r7yhXPL73SOULmu1Aqu4I7Gpe6QwNW2TtQBxM3vtSTmdPW6rK5y0gED51RjsyK0C
-# AwEAAaOCAg4wggIKMA4GA1UdDwEB/wQEAwIBhjAQBgkrBgEEAYI3FQEEAwIBADAd
-# BgNVHQ4EFgQUZZ9RzoVofy+KRYiq3acxux4NAF4wVAYDVR0gBE0wSzBJBgRVHSAA
-# MEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMv
-# RG9jcy9SZXBvc2l0b3J5Lmh0bTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTAS
-# BgNVHRMBAf8ECDAGAQH/AgEAMB8GA1UdIwQYMBaAFNlBKbAPD2Ns72nX9c0pnqRI
-# ajDmMHAGA1UdHwRpMGcwZaBjoGGGX2h0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9w
-# a2lvcHMvY3JsL01pY3Jvc29mdCUyMElEJTIwVmVyaWZpZWQlMjBDb2RlJTIwU2ln
-# bmluZyUyMFBDQSUyMDIwMjEuY3JsMIGuBggrBgEFBQcBAQSBoTCBnjBtBggrBgEF
-# BQcwAoZhaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNy
-# b3NvZnQlMjBJRCUyMFZlcmlmaWVkJTIwQ29kZSUyMFNpZ25pbmclMjBQQ0ElMjAy
-# MDIxLmNydDAtBggrBgEFBQcwAYYhaHR0cDovL29uZW9jc3AubWljcm9zb2Z0LmNv
-# bS9vY3NwMA0GCSqGSIb3DQEBDAUAA4ICAQBFSWDUd08X4g5HzvVfrB1SiV8pk6XP
-# HT9jPkCmvU/uvBzmZRAjYk2gKYR3pXoStRJaJ/lhjC5Dq/2R7P1YRZHCDYyK0zvS
-# RMdE6YQtgGjmsdhzD0nCS6hVVcgfmNQscPJ1WHxbvG5EQgYQ0ZED1FN0MOPQzWe1
-# zbH5Va0dSxtnodBVRjnyDYEm7sNEcvJHTG3eXzAyd00E5KDCsEl4z5O0mvXqwaH2
-# PS0200E6P4WqLwgs/NmUu5+Aa8Lw/2En2VkIW7Pkir4Un1jG6+tj/ehuqgFyUPPC
-# h6kbnvk48bisi/zPjAVkj7qErr7fSYICCzJ4s4YUNVVHgdoFn2xbW7ZfBT3QA9zf
-# hq9u4ExXbrVD5rxXSTFEUg2gzQq9JHxsdHyMfcCKLFQOXODSzcYeLpCd+r6GcoDB
-# ToyPdKccjC6mAq6+/hiMDnpvKUIHpyYEzWUeattyKXtMf+QrJeQ+ny5jBL+xqdOO
-# PEz3dg7qn8/oprUrUbGLBv9fWm18fWXdAv1PCtLL/acMLtHoyeSVMKQYqDHb3Qm0
-# uQ+NQ0YE4kUxSQa+W/cCzYAI32uN0nb9M4Mr1pj4bJZidNkM4JyYqezohILxYkgH
-# bboJQISrQWrm5RYdyhKBpptJ9JJn0Z63LjdnzlOUxjlsAbQir2Wmz/OJE703BbHm
-# QZRwzPx1vu7S5zCCB54wggWGoAMCAQICEzMAAAAHh6M0o3uljhwAAAAAAAcwDQYJ
-# KoZIhvcNAQEMBQAwdzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBD
-# b3Jwb3JhdGlvbjFIMEYGA1UEAxM/TWljcm9zb2Z0IElkZW50aXR5IFZlcmlmaWNh
-# dGlvbiBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAyMDIwMB4XDTIxMDQwMTIw
-# MDUyMFoXDTM2MDQwMTIwMTUyMFowYzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1p
-# Y3Jvc29mdCBDb3Jwb3JhdGlvbjE0MDIGA1UEAxMrTWljcm9zb2Z0IElEIFZlcmlm
-# aWVkIENvZGUgU2lnbmluZyBQQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
-# ADCCAgoCggIBALLwwK8ZiCji3VR6TElsaQhVCbRS/3pK+MHrJSj3Zxd3KU3rlfL3
-# qrZilYKJNqztA9OQacr1AwoNcHbKBLbsQAhBnIB34zxf52bDpIO3NJlfIaTE/xrw
-# eLoQ71lzCHkD7A4As1Bs076Iu+mA6cQzsYYH/Cbl1icwQ6C65rU4V9NQhNUwgrx9
-# rGQ//h890Q8JdjLLw0nV+ayQ2Fbkd242o9kH82RZsH3HEyqjAB5a8+Ae2nPIPc8s
-# ZU6ZE7iRrRZywRmrKDp5+TcmJX9MRff241UaOBs4NmHOyke8oU1TYrkxh+YeHgfW
-# o5tTgkoSMoayqoDpHOLJs+qG8Tvh8SnifW2Jj3+ii11TS8/FGngEaNAWrbyfNrC6
-# 9oKpRQXY9bGH6jn9NEJv9weFxhTwyvx9OJLXmRGbAUXN1U9nf4lXezky6Uh/cgjk
-# Vd6CGUAf0K+Jw+GE/5VpIVbcNr9rNE50Sbmy/4RTCEGvOq3GhjITbCa4crCzTTHg
-# YYjHs1NbOc6brH+eKpWLtr+bGecy9CrwQyx7S/BfYJ+ozst7+yZtG2wR461uckFu
-# 0t+gCwLdN0A6cFtSRtR8bvxVFyWwTtgMMFRuBa3vmUOTnfKLsLefRaQcVTgRnzeL
-# zdpt32cdYKp+dhr2ogc+qM6K4CBI5/j4VFyC4QFeUP2YAidLtvpXRRo3AgMBAAGj
-# ggI1MIICMTAOBgNVHQ8BAf8EBAMCAYYwEAYJKwYBBAGCNxUBBAMCAQAwHQYDVR0O
-# BBYEFNlBKbAPD2Ns72nX9c0pnqRIajDmMFQGA1UdIARNMEswSQYEVR0gADBBMD8G
-# CCsGAQUFBwIBFjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL0RvY3Mv
-# UmVwb3NpdG9yeS5odG0wGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwDwYDVR0T
-# AQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTIftJqhSobyhmYBAcnz1AQT2ioojCBhAYD
-# VR0fBH0wezB5oHegdYZzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9j
-# cmwvTWljcm9zb2Z0JTIwSWRlbnRpdHklMjBWZXJpZmljYXRpb24lMjBSb290JTIw
-# Q2VydGlmaWNhdGUlMjBBdXRob3JpdHklMjAyMDIwLmNybDCBwwYIKwYBBQUHAQEE
-# gbYwgbMwgYEGCCsGAQUFBzAChnVodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtp
-# b3BzL2NlcnRzL01pY3Jvc29mdCUyMElkZW50aXR5JTIwVmVyaWZpY2F0aW9uJTIw
-# Um9vdCUyMENlcnRpZmljYXRlJTIwQXV0aG9yaXR5JTIwMjAyMC5jcnQwLQYIKwYB
-# BQUHMAGGIWh0dHA6Ly9vbmVvY3NwLm1pY3Jvc29mdC5jb20vb2NzcDANBgkqhkiG
-# 9w0BAQwFAAOCAgEAfyUqnv7Uq+rdZgrbVyNMul5skONbhls5fccPlmIbzi+OwVdP
-# Q4H55v7VOInnmezQEeW4LqK0wja+fBznANbXLB0KrdMCbHQpbLvG6UA/Xv2pfpVI
-# E1CRFfNF4XKO8XYEa3oW8oVH+KZHgIQRIwAbyFKQ9iyj4aOWeAzwk+f9E5StNp5T
-# 8FG7/VEURIVWArbAzPt9ThVN3w1fAZkF7+YU9kbq1bCR2YD+MtunSQ1Rft6XG7b4
-# e0ejRA7mB2IoX5hNh3UEauY0byxNRG+fT2MCEhQl9g2i2fs6VOG19CNep7SquKaB
-# jhWmirYyANb0RJSLWjinMLXNOAga10n8i9jqeprzSMU5ODmrMCJE12xS/NWShg/t
-# uLjAsKP6SzYZ+1Ry358ZTFcx0FS/mx2vSoU8s8HRvy+rnXqyUJ9HBqS0DErVLjQw
-# K8VtsBdekBmdTbQVoCgPCqr+PDPB3xajYnzevs7eidBsM71PINK2BoE2UfMwxCCX
-# 3mccFgx6UsQeRSdVVVNSyALQe6PT12418xon2iDGE81OGCreLzDcMAZnrUAx4XQL
-# Uz6ZTl65yPUiOh3k7Yww94lDf+8oG2oZmDh5O1Qe38E+M3vhKwmzIeoB1dVLlz4i
-# 3IpaDcR+iuGjH2TdaC1ZOmBXiCRKJLj4DT2uhJ04ji+tHD6n58vhavFIrmcxghrm
-# MIIa4gIBATBxMFoxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29y
-# cG9yYXRpb24xKzApBgNVBAMTIk1pY3Jvc29mdCBJRCBWZXJpZmllZCBDUyBFT0Mg
-# Q0EgMDICEzMAB+pUev/hD9oPMBwAAAAH6lQwDQYJYIZIAWUDBAIBBQCggbIwGQYJ
-# KoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEOMAwGCisGAQQB
-# gjcCARUwLwYJKoZIhvcNAQkEMSIEICpXe3RS3b2coD0CJveEHlglqtPUYZ2FqSrO
-# UfP6C6Y4MEYGCisGAQQBgjcCAQwxODA2oDCALgBQAHkAdABoAG8AbgAgADMALgAx
-# ADQALgA0ACAAKAAyADMAMQAxADYAZgA5ACmhAoAAMA0GCSqGSIb3DQEBAQUABIIB
-# gHaAK9dRSQxQvAiBXu8BOjm/3WL7Hdh4vVPDdI7TVKrNk9GE/8isBY5v3SDISaGV
-# VzilkWjgUJX1tp5Wq3Ix9zJVToVG3kaHlNrEjb+cK8oqkMJqIS0GTrS70Xs1UPKk
-# PNSzUfi1ddmCW9Up3bmvR7e5SotcgAKysucyRPHmhDZKdC0tM3FdzqbFMs0QV1QL
-# gUzdgWEMqRQp7PN9Y3uHeO7/FUUGkEGBHuKq9kGXbnYGwZEazzy6Uxx2Nd47iCsu
-# cEiOdpecA13fGE6lnM+uTZGOvshUVQeTIkr5pb2NS+lXF+CEq6uqMntdAfblYzCs
-# gTCp8OflGXHVnbo4p8SsrGaBV7KnbzCk7uuEqW3SJiQfMrkQjvjc1cRwQvOVVaPj
-# F1Qknn7KmxukU7FEIwyGXPKQ5OG8oUugOTS/5aqSbpmY6HuTbbWH/7MULJlfikOq
-# zuteCVjvd18Y6LMk+mK1x9PAtoHmZuMIedP6rHNE8admogur39k1IhRJIcG9S8Kk
-# 3aGCGBEwghgNBgorBgEEAYI3AwMBMYIX/TCCF/kGCSqGSIb3DQEHAqCCF+owghfm
-# AgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFiBgsqhkiG9w0BCRABBKCCAVEEggFNMIIB
-# SQIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFlAwQCAQUABCASSpbbgjgopvaqW5Og
-# e0ZpH9C7TBmrsY+qwoqXJMywiwIGacJyyM2cGBMyMDI2MDQwNzE2MTkwNy44NjJa
-# MASAAgH0oIHhpIHeMIHbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3Rv
-# bjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0
-# aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25zMScwJQYD
-# VQQLEx5uU2hpZWxkIFRTUyBFU046N0QwMC0wNUUwLUQ5NDcxNTAzBgNVBAMTLE1p
-# Y3Jvc29mdCBQdWJsaWMgUlNBIFRpbWUgU3RhbXBpbmcgQXV0aG9yaXR5oIIPITCC
-# B4IwggVqoAMCAQICEzMAAAAF5c8P/2YuyYcAAAAAAAUwDQYJKoZIhvcNAQEMBQAw
-# dzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjFI
-# MEYGA1UEAxM/TWljcm9zb2Z0IElkZW50aXR5IFZlcmlmaWNhdGlvbiBSb290IENl
-# cnRpZmljYXRlIEF1dGhvcml0eSAyMDIwMB4XDTIwMTExOTIwMzIzMVoXDTM1MTEx
-# OTIwNDIzMVowYTELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw
-# b3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFB1YmxpYyBSU0EgVGltZXN0YW1w
-# aW5nIENBIDIwMjAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCefOdS
-# Y/3gxZ8FfWO1BiKjHB7X55cz0RMFvWVGR3eRwV1wb3+yq0OXDEqhUhxqoNv6iYWK
-# jkMcLhEFxvJAeNcLAyT+XdM5i2CgGPGcb95WJLiw7HzLiBKrxmDj1EQB/mG5eEiR
-# BEp7dDGzxKCnTYocDOcRr9KxqHydajmEkzXHOeRGwU+7qt8Md5l4bVZrXAhK+WSk
-# 5CihNQsWbzT1nRliVDwunuLkX1hyIWXIArCfrKM3+RHh+Sq5RZ8aYyik2r8HxT+l
-# 2hmRllBvE2Wok6IEaAJanHr24qoqFM9WLeBUSudz+qL51HwDYyIDPSQ3SeHtKog0
-# ZubDk4hELQSxnfVYXdTGncaBnB60QrEuazvcob9n4yR65pUNBCF5qeA4QwYnilBk
-# fnmeAjRN3LVuLr0g0FXkqfYdUmj1fFFhH8k8YBozrEaXnsSL3kdTD01X+4LfIWOu
-# FzTzuoslBrBILfHNj8RfOxPgjuwNvE6YzauXi4orp4Sm6tF245DaFOSYbWFK5ZgG
-# 6cUY2/bUq3g3bQAqZt65KcaewEJ3ZyNEobv35Nf6xN6FrA6jF9447+NHvCjeWLCQ
-# Z3M8lgeCcnnhTFtyQX3XgCoc6IRXvFOcPVrr3D9RPHCMS6Ckg8wggTrtIVnY8yjb
-# vGOUsAdZbeXUIQAWMs0d3cRDv09SvwVRd61evQIDAQABo4ICGzCCAhcwDgYDVR0P
-# AQH/BAQDAgGGMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRraSg6NS9IY0DP
-# e9ivSek+2T3bITBUBgNVHSAETTBLMEkGBFUdIAAwQTA/BggrBgEFBQcCARYzaHR0
-# cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnkuaHRt
-# MBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIAQwBB
-# MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUyH7SaoUqG8oZmAQHJ89QEE9o
-# qKIwgYQGA1UdHwR9MHsweaB3oHWGc2h0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9w
-# a2lvcHMvY3JsL01pY3Jvc29mdCUyMElkZW50aXR5JTIwVmVyaWZpY2F0aW9uJTIw
-# Um9vdCUyMENlcnRpZmljYXRlJTIwQXV0aG9yaXR5JTIwMjAyMC5jcmwwgZQGCCsG
-# AQUFBwEBBIGHMIGEMIGBBggrBgEFBQcwAoZ1aHR0cDovL3d3dy5taWNyb3NvZnQu
-# Y29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBJZGVudGl0eSUyMFZlcmlmaWNh
-# dGlvbiUyMFJvb3QlMjBDZXJ0aWZpY2F0ZSUyMEF1dGhvcml0eSUyMDIwMjAuY3J0
-# MA0GCSqGSIb3DQEBDAUAA4ICAQBfiHbHfm21WhV150x4aPpO4dhEmSUVpbixNDmv
-# 6TvuIHv1xIs174bNGO/ilWMm+Jx5boAXrJxagRhHQtiFprSjMktTliL4sKZyt2i+
-# SXncM23gRezzsoOiBhv14YSd1Klnlkzvgs29XNjT+c8hIfPRe9rvVCMPiH7zPZcw
-# 5nNjthDQ+zD563I1nUJ6y59TbXWsuyUsqw7wXZoGzZwijWT5oc6GvD3HDokJY401
-# uhnj3ubBhbkR83RbfMvmzdp3he2bvIUztSOuFzRqrLfEvsPkVHYnvH1wtYyrt5vS
-# hiKheGpXa2AWpsod4OJyT4/y0dggWi8g/tgbhmQlZqDUf3UqUQsZaLdIu/XSjgoZ
-# qDjamzCPJtOLi2hBwL+KsCh0Nbwc21f5xvPSwym0Ukr4o5sCcMUcSy6TEP7uMV8R
-# X0eH/4JLEpGyae6Ki8JYg5v4fsNGif1OXHJ2IWG+7zyjTDfkmQ1snFOTgyEX8qBp
-# efQbF0fx6URrYiarjmBprwP6ZObwtZXJ23jK3Fg/9uqM3j0P01nzVygTppBabzxP
-# Ah/hHhhls6kwo3QLJ6No803jUsZcd4JQxiYHHc+Q/wAMcPUnYKv/q2O444LO1+n6
-# j01z5mggCSlRwD9faBIySAcA9S8h22hIAcRQqIGEjolCK9F6nK9ZyX4lhthsGHum
-# aABdWzCCB5cwggV/oAMCAQICEzMAAABV2d1pJij5+OIAAAAAAFUwDQYJKoZIhvcN
-# AQEMBQAwYTELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jh
-# dGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFB1YmxpYyBSU0EgVGltZXN0YW1waW5n
-# IENBIDIwMjAwHhcNMjUxMDIzMjA0NjQ5WhcNMjYxMDIyMjA0NjQ5WjCB2zELMAkG
-# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx
-# HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9z
-# b2Z0IEFtZXJpY2EgT3BlcmF0aW9uczEnMCUGA1UECxMeblNoaWVsZCBUU1MgRVNO
-# OjdEMDAtMDVFMC1EOTQ3MTUwMwYDVQQDEyxNaWNyb3NvZnQgUHVibGljIFJTQSBU
-# aW1lIFN0YW1waW5nIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
-# AgoCggIBAL25H5IeWUiz9DAlFmn2sPymaFWbvYkMfK+ScIWb3a1IvOlIwghUDjY0
-# Gp6yMRhfYURiGS0GedIB6ywvuH6VBCX3+bdOFcAclgtv21jrpOjZmk4fSaT2Q3Bs
-# zUfeUJa8o3xI7ZfoMY9dszTxHQAz6ZVX87fHGEVhQcfxW33IdPJOj/ae419qtYxT
-# 21MVmCfsTshgtWioQxmOW/vMC9/b+qgtBxSMf798vm3qfmhF6KCvFaHlivrM32hY
-# 16PGE3L0PFC+LM7vRxU7mTb+r76CeybvqOWk4+dbKYftPhV1t/E5S/6wwXeYmu/Y
-# 7JC7Tnh2w45G5Y4pcM3oHMb/YuPRdOWa0v+RC2QgmNVWqjuxDiylWscXQDuaMtb2
-# 9AcdGUVV9ZsRY2M2sthAtOdZOshiR5ufMtaHtiCkWv0jNfgUxrHurxzYuUNneWZ6
-# EfQDgFAw8CSCKkSOK2c9jEop4ddVq10xvbqxdrqMneVXvvIcXrPQAXj9j2ECpV2E
-# wMb3Wnmpw00P78JpzPsk3Fs61ZvOGd/F1RcOBu6f2TWdp7HL7+rq7tgHr13Mldbf
-# IWu4lpoYYE1gTQa1Yrg5XN4j7zs9klT2z3qocmPzV8DWQgIHNh+aTs7bujMEMQyI
-# 7Xt1zPxZCgcR6H0tmmzU/9BxvsWbRalCQ2sYGyWupTdc4e7KY7kPAgMBAAGjggHL
-# MIIBxzAdBgNVHQ4EFgQUVgRfEG3cCAPwyL+pyRbKwdesZbYwHwYDVR0jBBgwFoAU
-# a2koOjUvSGNAz3vYr0npPtk92yEwbAYDVR0fBGUwYzBhoF+gXYZbaHR0cDovL3d3
-# dy5taWNyb3NvZnQuY29tL3BraW9wcy9jcmwvTWljcm9zb2Z0JTIwUHVibGljJTIw
-# UlNBJTIwVGltZXN0YW1waW5nJTIwQ0ElMjAyMDIwLmNybDB5BggrBgEFBQcBAQRt
-# MGswaQYIKwYBBQUHMAKGXWh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMv
-# Y2VydHMvTWljcm9zb2Z0JTIwUHVibGljJTIwUlNBJTIwVGltZXN0YW1waW5nJTIw
-# Q0ElMjAyMDIwLmNydDAMBgNVHRMBAf8EAjAAMBYGA1UdJQEB/wQMMAoGCCsGAQUF
-# BwMIMA4GA1UdDwEB/wQEAwIHgDBmBgNVHSAEXzBdMFEGDCsGAQQBgjdMg30BATBB
-# MD8GCCsGAQUFBwIBFjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL0Rv
-# Y3MvUmVwb3NpdG9yeS5odG0wCAYGZ4EMAQQCMA0GCSqGSIb3DQEBDAUAA4ICAQBS
-# HuGSVHvalCnFnlsqXIQefH1xP2SFr9g+Vz+f5P7QeywjfQb5jUlSmd1XnJUDPe/M
-# HxL7r3TEElL+mNtG6CDPAytStSFPXD9tTBtBMYh8Wqo64pH9qm361yIqeBH979mz
-# WCkMQsTd0nM6dUl9B+7qiti+ToXwxIl39eYqLuYYfhD2mqqePXMzUKSQzkf73yYI
-# VHP6nLJQz4aAmaWcfG9jg78sBkDV8KpW7JgktuLhphJEN1B+SVHjenPdcmrFXIUu
-# /K4jK5ukfWaQIjuaXzSjBlNjC5tQN6adPfA3GxUwHPeR4ekL5If/9vBf13tmzBW+
-# gy+0sNGTveb9IL9GU8iX8UvywsX62nhCCPRUhTigDBKdczRUrNrntBhowbfchBDF
-# ML8avRMRc9Gmc2JvIryX336SFQ51//q1UU2HMSJEMhWLJSIWJVhfUowsOa+PampI
-# zETYfFvTu2mqKJUlWZXkGYxrdCvCczJcqeoadpW1ul6kcdnDh228SQ8ZhDc6IRlM
-# 4iNd5SNoNgX+aom3wuGyjUaSaPZWxPB1G2NKiYhPLt0lPHg0Gskj1zhISY8UQkMM
-# Dr3o2JgRuT+wnJEDQUp55ddvhSkSoD6I9DL/s+TjIY/c9jLaW5xywJHqdKHUApRM
-# sghv7kebSua1upmR+TquelFktDSOjVdSRkuya4uoxTGCB0Mwggc/AgEBMHgwYTEL
-# MAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAG
-# A1UEAxMpTWljcm9zb2Z0IFB1YmxpYyBSU0EgVGltZXN0YW1waW5nIENBIDIwMjAC
-# EzMAAABV2d1pJij5+OIAAAAAAFUwDQYJYIZIAWUDBAIBBQCgggScMBEGCyqGSIb3
-# DQEJEAIPMQIFADAaBgkqhkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcN
-# AQkFMQ8XDTI2MDQwNzE2MTkwN1owLwYJKoZIhvcNAQkEMSIEIO1tbnR5rJvq+GXf
-# 4bgeV3HDcP+8Ud48R8sLBQBLI+rBMIG5BgsqhkiG9w0BCRACLzGBqTCBpjCBozCB
-# oAQg2Lk8l2SGYru/ff7+D2qrJnkswcYdK6pGKu7GGGr4/s0wfDBlpGMwYTELMAkG
-# A1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UE
-# AxMpTWljcm9zb2Z0IFB1YmxpYyBSU0EgVGltZXN0YW1waW5nIENBIDIwMjACEzMA
-# AABV2d1pJij5+OIAAAAAAFUwggNeBgsqhkiG9w0BCRACEjGCA00wggNJoYIDRTCC
-# A0EwggIpAgEBMIIBCaGB4aSB3jCB2zELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh
-# c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD
-# b3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2EgT3BlcmF0aW9u
-# czEnMCUGA1UECxMeblNoaWVsZCBUU1MgRVNOOjdEMDAtMDVFMC1EOTQ3MTUwMwYD
-# VQQDEyxNaWNyb3NvZnQgUHVibGljIFJTQSBUaW1lIFN0YW1waW5nIEF1dGhvcml0
-# eaIjCgEBMAcGBSsOAwIaAxUAHTtUAYJlv7bgWVeRBo4X7FeHDeqgZzBlpGMwYTEL
-# MAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAG
-# A1UEAxMpTWljcm9zb2Z0IFB1YmxpYyBSU0EgVGltZXN0YW1waW5nIENBIDIwMjAw
-# DQYJKoZIhvcNAQELBQACBQDtf2YdMCIYDzIwMjYwNDA3MTExNjQ1WhgPMjAyNjA0
-# MDgxMTE2NDVaMHQwOgYKKwYBBAGEWQoEATEsMCowCgIFAO1/Zh0CAQAwBwIBAAIC
-# Ew4wBwIBAAICHEcwCgIFAO2At50CAQAwNgYKKwYBBAGEWQoEAjEoMCYwDAYKKwYB
-# BAGEWQoDAqAKMAgCAQACAwehIKEKMAgCAQACAwGGoDANBgkqhkiG9w0BAQsFAAOC
-# AQEAj/DYTzrEaV8hMcUsbVdSBihFoM0FgJoy99LL0e/ztow4UwgL27kPtwlbyVfW
-# Onw+tLBT2sbsS4yIj+QnTUoHeqNA/Ue9FPkPH801qthzRDZ4UTwz09KgVfKchw0Y
-# jGTSpL8GQL6cAYgFuf/Zh0qEVwYW4OxiyKEMKpzYdqoNwRx9LrCgE0km4WZ3bDBw
-# VFCKcd176gCpV5Yle8MbDWFizSUrylp7v7q/Knx0BrWs8Q17RUHnYAyehZCD0d0H
-# zXEClh+sKxScyk8TjI2o7MKau8YRHzeLDN9wj24hJ9URkNThjDhY3ruNMvves5xS
-# fKmhpIqWsb5ZvZW4hmbqdxwWbDANBgkqhkiG9w0BAQEFAASCAgA6C6+LOeV/wer0
-# SB0XI0QO89oeTrCbxFNxmKegd8rz7ERBKLcxLh9WFOfDf4t5oi0RlPP8cFwByVIb
-# TIgtggkIq5uN6/qJ9+iF+w7a4123dTuQSAi35d7VMC/q8rtHL6ev5zeKeYVnov5C
-# JqmlUyVL5NPRxrUaWeXNXOmOMZwmNTqZspf/eadKTiBwDVJZ4DLXkrZNoR3Gd7Wq
-# w6N/gt5MDhL26NU2xnysk2pXRdTna4Fh545XD2YGqZAJdJ6nzv/uSQBDnAL7uOV1
-# U5I+hEBgbCMLAkNzTJUprQFaz1X9taVTbYQOE8IGkseOg1nw8kDc5nYga3kNZQ/k
-# u4gbx3opZuxUL43teYm17AJwHphWgQojwdvi+OozR0bS27xVK5O5Y+5yReg4U6DG
-# XjuaFzxxA8efdy7DDETfFWhO6fSfREWcf+Nb9uA7i+qPOJvK4ls5p3yTwJgG1KUr
-# UNFhIw5LZZxn+yAArVY712VcCDsdBQiJ3ZbS90/AXjtsgFP/Cr99YhoKi7WNOtJ9
-# CHXI8Y5RMy3AAGBXmSJ2f1bEVX7Ya1Wdi7UlwgYbchhfL25XRKonczGNxAzymO6t
-# MCAweDvuELomErT+70YfQXd1kye4j5KiCQXYtpedFgb9sDqGv5j7c5ACHVyAsvPA
-# Wx3T3b6yi2pK9C6xC8g5cmjf8c7Rnw==
-# SIG # End signature block
diff --git a/Python314_4_x64_Template/Lib/xml/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/xml/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index a8feea585..000000000
Binary files a/Python314_4_x64_Template/Lib/xml/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/xml/parsers/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/xml/parsers/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index 2764401d7..000000000
Binary files a/Python314_4_x64_Template/Lib/xml/parsers/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/xml/parsers/__pycache__/expat.cpython-314.pyc b/Python314_4_x64_Template/Lib/xml/parsers/__pycache__/expat.cpython-314.pyc
deleted file mode 100644
index 634297808..000000000
Binary files a/Python314_4_x64_Template/Lib/xml/parsers/__pycache__/expat.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/xmlrpc/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/xmlrpc/__pycache__/__init__.cpython-314.pyc
deleted file mode 100644
index caa050656..000000000
Binary files a/Python314_4_x64_Template/Lib/xmlrpc/__pycache__/__init__.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/xmlrpc/__pycache__/client.cpython-314.pyc b/Python314_4_x64_Template/Lib/xmlrpc/__pycache__/client.cpython-314.pyc
deleted file mode 100644
index 463b40b63..000000000
Binary files a/Python314_4_x64_Template/Lib/xmlrpc/__pycache__/client.cpython-314.pyc and /dev/null differ
diff --git a/Python314_4_x64_Template/Lib/xmlrpc/client.py b/Python314_4_x64_Template/Lib/xmlrpc/client.py
deleted file mode 100644
index f441376d0..000000000
--- a/Python314_4_x64_Template/Lib/xmlrpc/client.py
+++ /dev/null
@@ -1,1503 +0,0 @@
-#
-# XML-RPC CLIENT LIBRARY
-# $Id$
-#
-# an XML-RPC client interface for Python.
-#
-# the marshalling and response parser code can also be used to
-# implement XML-RPC servers.
-#
-# Notes:
-# this version is designed to work with Python 2.1 or newer.
-#
-# History:
-# 1999-01-14 fl  Created
-# 1999-01-15 fl  Changed dateTime to use localtime
-# 1999-01-16 fl  Added Binary/base64 element, default to RPC2 service
-# 1999-01-19 fl  Fixed array data element (from Skip Montanaro)
-# 1999-01-21 fl  Fixed dateTime constructor, etc.
-# 1999-02-02 fl  Added fault handling, handle empty sequences, etc.
-# 1999-02-10 fl  Fixed problem with empty responses (from Skip Montanaro)
-# 1999-06-20 fl  Speed improvements, pluggable parsers/transports (0.9.8)
-# 2000-11-28 fl  Changed boolean to check the truth value of its argument
-# 2001-02-24 fl  Added encoding/Unicode/SafeTransport patches
-# 2001-02-26 fl  Added compare support to wrappers (0.9.9/1.0b1)
-# 2001-03-28 fl  Make sure response tuple is a singleton
-# 2001-03-29 fl  Don't require empty params element (from Nicholas Riley)
-# 2001-06-10 fl  Folded in _xmlrpclib accelerator support (1.0b2)
-# 2001-08-20 fl  Base xmlrpclib.Error on built-in Exception (from Paul Prescod)
-# 2001-09-03 fl  Allow Transport subclass to override getparser
-# 2001-09-10 fl  Lazy import of urllib, cgi, xmllib (20x import speedup)
-# 2001-10-01 fl  Remove containers from memo cache when done with them
-# 2001-10-01 fl  Use faster escape method (80% dumps speedup)
-# 2001-10-02 fl  More dumps microtuning
-# 2001-10-04 fl  Make sure import expat gets a parser (from Guido van Rossum)
-# 2001-10-10 sm  Allow long ints to be passed as ints if they don't overflow
-# 2001-10-17 sm  Test for int and long overflow (allows use on 64-bit systems)
-# 2001-11-12 fl  Use repr() to marshal doubles (from Paul Felix)
-# 2002-03-17 fl  Avoid buffered read when possible (from James Rucker)
-# 2002-04-07 fl  Added pythondoc comments
-# 2002-04-16 fl  Added __str__ methods to datetime/binary wrappers
-# 2002-05-15 fl  Added error constants (from Andrew Kuchling)
-# 2002-06-27 fl  Merged with Python CVS version
-# 2002-10-22 fl  Added basic authentication (based on code from Phillip Eby)
-# 2003-01-22 sm  Add support for the bool type
-# 2003-02-27 gvr Remove apply calls
-# 2003-04-24 sm  Use cStringIO if available
-# 2003-04-25 ak  Add support for nil
-# 2003-06-15 gn  Add support for time.struct_time
-# 2003-07-12 gp  Correct marshalling of Faults
-# 2003-10-31 mvl Add multicall support
-# 2004-08-20 mvl Bump minimum supported Python version to 2.1
-# 2014-12-02 ch/doko  Add workaround for gzip bomb vulnerability
-#
-# Copyright (c) 1999-2002 by Secret Labs AB.
-# Copyright (c) 1999-2002 by Fredrik Lundh.
-#
-# info@pythonware.com
-# http://www.pythonware.com
-#
-# --------------------------------------------------------------------
-# The XML-RPC client interface is
-#
-# Copyright (c) 1999-2002 by Secret Labs AB
-# Copyright (c) 1999-2002 by Fredrik Lundh
-#
-# By obtaining, using, and/or copying this software and/or its
-# associated documentation, you agree that you have read, understood,
-# and will comply with the following terms and conditions:
-#
-# Permission to use, copy, modify, and distribute this software and
-# its associated documentation for any purpose and without fee is
-# hereby granted, provided that the above copyright notice appears in
-# all copies, and that both that copyright notice and this permission
-# notice appear in supporting documentation, and that the name of
-# Secret Labs AB or the author not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-# TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
-# ABILITY AND FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
-# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
-# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-# --------------------------------------------------------------------
-
-"""
-An XML-RPC client interface for Python.
-
-The marshalling and response parser code can also be used to
-implement XML-RPC servers.
-
-Exported exceptions:
-
-  Error          Base class for client errors
-  ProtocolError  Indicates an HTTP protocol error
-  ResponseError  Indicates a broken response package
-  Fault          Indicates an XML-RPC fault package
-
-Exported classes:
-
-  ServerProxy    Represents a logical connection to an XML-RPC server
-
-  MultiCall      Executor of boxcared xmlrpc requests
-  DateTime       dateTime wrapper for an ISO 8601 string or time tuple or
-                 localtime integer value to generate a "dateTime.iso8601"
-                 XML-RPC value
-  Binary         binary data wrapper
-
-  Marshaller     Generate an XML-RPC params chunk from a Python data structure
-  Unmarshaller   Unmarshal an XML-RPC response from incoming XML event message
-  Transport      Handles an HTTP transaction to an XML-RPC server
-  SafeTransport  Handles an HTTPS transaction to an XML-RPC server
-
-Exported constants:
-
-  (none)
-
-Exported functions:
-
-  getparser      Create instance of the fastest available parser & attach
-                 to an unmarshalling object
-  dumps          Convert an argument tuple or a Fault instance to an XML-RPC
-                 request (or response, if the methodresponse option is used).
-  loads          Convert an XML-RPC packet to unmarshalled data plus a method
-                 name (None if not present).
-"""
-
-import base64
-import sys
-import time
-from datetime import datetime
-from decimal import Decimal
-import http.client
-import urllib.parse
-from xml.parsers import expat
-import errno
-from io import BytesIO
-try:
-    import gzip
-except ImportError:
-    gzip = None #python can be built without zlib/gzip support
-
-# --------------------------------------------------------------------
-# Internal stuff
-
-def escape(s):
-    s = s.replace("&", "&")
-    s = s.replace("<", "<")
-    return s.replace(">", ">",)
-
-# used in User-Agent header sent
-__version__ = '%d.%d' % sys.version_info[:2]
-
-# xmlrpc integer limits
-MAXINT =  2**31-1
-MININT = -2**31
-
-# --------------------------------------------------------------------
-# Error constants (from Dan Libby's specification at
-# http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php)
-
-# Ranges of errors
-PARSE_ERROR       = -32700
-SERVER_ERROR      = -32600
-APPLICATION_ERROR = -32500
-SYSTEM_ERROR      = -32400
-TRANSPORT_ERROR   = -32300
-
-# Specific errors
-NOT_WELLFORMED_ERROR  = -32700
-UNSUPPORTED_ENCODING  = -32701
-INVALID_ENCODING_CHAR = -32702
-INVALID_XMLRPC        = -32600
-METHOD_NOT_FOUND      = -32601
-INVALID_METHOD_PARAMS = -32602
-INTERNAL_ERROR        = -32603
-
-# --------------------------------------------------------------------
-# Exceptions
-
-##
-# Base class for all kinds of client-side errors.
-
-class Error(Exception):
-    """Base class for client errors."""
-    __str__ = object.__str__
-
-##
-# Indicates an HTTP-level protocol error.  This is raised by the HTTP
-# transport layer, if the server returns an error code other than 200
-# (OK).
-#
-# @param url The target URL.
-# @param errcode The HTTP error code.
-# @param errmsg The HTTP error message.
-# @param headers The HTTP header dictionary.
-
-class ProtocolError(Error):
-    """Indicates an HTTP protocol error."""
-    def __init__(self, url, errcode, errmsg, headers):
-        Error.__init__(self)
-        self.url = url
-        self.errcode = errcode
-        self.errmsg = errmsg
-        self.headers = headers
-    def __repr__(self):
-        return (
-            "<%s for %s: %s %s>" %
-            (self.__class__.__name__, self.url, self.errcode, self.errmsg)
-            )
-
-##
-# Indicates a broken XML-RPC response package.  This exception is
-# raised by the unmarshalling layer, if the XML-RPC response is
-# malformed.
-
-class ResponseError(Error):
-    """Indicates a broken response package."""
-    pass
-
-##
-# Indicates an XML-RPC fault response package.  This exception is
-# raised by the unmarshalling layer, if the XML-RPC response contains
-# a fault string.  This exception can also be used as a class, to
-# generate a fault XML-RPC message.
-#
-# @param faultCode The XML-RPC fault code.
-# @param faultString The XML-RPC fault string.
-
-class Fault(Error):
-    """Indicates an XML-RPC fault package."""
-    def __init__(self, faultCode, faultString, **extra):
-        Error.__init__(self)
-        self.faultCode = faultCode
-        self.faultString = faultString
-    def __repr__(self):
-        return "<%s %s: %r>" % (self.__class__.__name__,
-                                self.faultCode, self.faultString)
-
-# --------------------------------------------------------------------
-# Special values
-
-##
-# Backwards compatibility
-boolean = Boolean = bool
-
-
-def _iso8601_format(value):
-    if value.tzinfo is not None:
-        # XML-RPC only uses the naive portion of the datetime
-        value = value.replace(tzinfo=None)
-    # XML-RPC doesn't use '-' separator in the date part
-    return value.isoformat(timespec='seconds').replace('-', '')
-
-
-def _strftime(value):
-    if isinstance(value, datetime):
-        return _iso8601_format(value)
-
-    if not isinstance(value, (tuple, time.struct_time)):
-        if value == 0:
-            value = time.time()
-        value = time.localtime(value)
-
-    return "%04d%02d%02dT%02d:%02d:%02d" % value[:6]
-
-class DateTime:
-    """DateTime wrapper for an ISO 8601 string or time tuple or
-    localtime integer value to generate 'dateTime.iso8601' XML-RPC
-    value.
-    """
-
-    def __init__(self, value=0):
-        if isinstance(value, str):
-            self.value = value
-        else:
-            self.value = _strftime(value)
-
-    def make_comparable(self, other):
-        if isinstance(other, DateTime):
-            s = self.value
-            o = other.value
-        elif isinstance(other, datetime):
-            s = self.value
-            o = _iso8601_format(other)
-        elif isinstance(other, str):
-            s = self.value
-            o = other
-        elif hasattr(other, "timetuple"):
-            s = self.timetuple()
-            o = other.timetuple()
-        else:
-            s = self
-            o = NotImplemented
-        return s, o
-
-    def __lt__(self, other):
-        s, o = self.make_comparable(other)
-        if o is NotImplemented:
-            return NotImplemented
-        return s < o
-
-    def __le__(self, other):
-        s, o = self.make_comparable(other)
-        if o is NotImplemented:
-            return NotImplemented
-        return s <= o
-
-    def __gt__(self, other):
-        s, o = self.make_comparable(other)
-        if o is NotImplemented:
-            return NotImplemented
-        return s > o
-
-    def __ge__(self, other):
-        s, o = self.make_comparable(other)
-        if o is NotImplemented:
-            return NotImplemented
-        return s >= o
-
-    def __eq__(self, other):
-        s, o = self.make_comparable(other)
-        if o is NotImplemented:
-            return NotImplemented
-        return s == o
-
-    def timetuple(self):
-        return time.strptime(self.value, "%Y%m%dT%H:%M:%S")
-
-    ##
-    # Get date/time value.
-    #
-    # @return Date/time value, as an ISO 8601 string.
-
-    def __str__(self):
-        return self.value
-
-    def __repr__(self):
-        return "<%s %r at %#x>" % (self.__class__.__name__, self.value, id(self))
-
-    def decode(self, data):
-        self.value = str(data).strip()
-
-    def encode(self, out):
-        out.write("")
-        out.write(self.value)
-        out.write("\n")
-
-def _datetime(data):
-    # decode xml element contents into a DateTime structure.
-    value = DateTime()
-    value.decode(data)
-    return value
-
-def _datetime_type(data):
-    return datetime.strptime(data, "%Y%m%dT%H:%M:%S")
-
-##
-# Wrapper for binary data.  This can be used to transport any kind
-# of binary data over XML-RPC, using BASE64 encoding.
-#
-# @param data An 8-bit string containing arbitrary data.
-
-class Binary:
-    """Wrapper for binary data."""
-
-    def __init__(self, data=None):
-        if data is None:
-            data = b""
-        else:
-            if not isinstance(data, (bytes, bytearray)):
-                raise TypeError("expected bytes or bytearray, not %s" %
-                                data.__class__.__name__)
-            data = bytes(data)  # Make a copy of the bytes!
-        self.data = data
-
-    ##
-    # Get buffer contents.
-    #
-    # @return Buffer contents, as an 8-bit string.
-
-    def __str__(self):
-        return str(self.data, "latin-1")  # XXX encoding?!
-
-    def __eq__(self, other):
-        if isinstance(other, Binary):
-            other = other.data
-        return self.data == other
-
-    def decode(self, data):
-        self.data = base64.decodebytes(data)
-
-    def encode(self, out):
-        out.write("\n")
-        encoded = base64.encodebytes(self.data)
-        out.write(encoded.decode('ascii'))
-        out.write("\n")
-
-def _binary(data):
-    # decode xml element contents into a Binary structure
-    value = Binary()
-    value.decode(data)
-    return value
-
-WRAPPERS = (DateTime, Binary)
-
-# --------------------------------------------------------------------
-# XML parsers
-
-class ExpatParser:
-    # fast expat parser for Python 2.0 and later.
-    def __init__(self, target):
-        self._parser = parser = expat.ParserCreate(None, None)
-        self._target = target
-        parser.StartElementHandler = target.start
-        parser.EndElementHandler = target.end
-        parser.CharacterDataHandler = target.data
-        encoding = None
-        target.xml(encoding, None)
-
-    def feed(self, data):
-        self._parser.Parse(data, False)
-
-    def close(self):
-        try:
-            parser = self._parser
-        except AttributeError:
-            pass
-        else:
-            del self._target, self._parser # get rid of circular references
-            parser.Parse(b"", True) # end of data
-
-# --------------------------------------------------------------------
-# XML-RPC marshalling and unmarshalling code
-
-##
-# XML-RPC marshaller.
-#
-# @param encoding Default encoding for 8-bit strings.  The default
-#     value is None (interpreted as UTF-8).
-# @see dumps
-
-class Marshaller:
-    """Generate an XML-RPC params chunk from a Python data structure.
-
-    Create a Marshaller instance for each set of parameters, and use
-    the "dumps" method to convert your data (represented as a tuple)
-    to an XML-RPC params chunk.  To write a fault response, pass a
-    Fault instance instead.  You may prefer to use the "dumps" module
-    function for this purpose.
-    """
-
-    # by the way, if you don't understand what's going on in here,
-    # that's perfectly ok.
-
-    def __init__(self, encoding=None, allow_none=False):
-        self.memo = {}
-        self.data = None
-        self.encoding = encoding
-        self.allow_none = allow_none
-
-    dispatch = {}
-
-    def dumps(self, values):
-        out = []
-        write = out.append
-        dump = self.__dump
-        if isinstance(values, Fault):
-            # fault instance
-            write("\n")
-            dump({'faultCode': values.faultCode,
-                  'faultString': values.faultString},
-                 write)
-            write("\n")
-        else:
-            # parameter block
-            # FIXME: the xml-rpc specification allows us to leave out
-            # the entire  block if there are no parameters.
-            # however, changing this may break older code (including
-            # old versions of xmlrpclib.py), so this is better left as
-            # is for now.  See @XMLRPC3 for more information. /F
-            write("\n")
-            for v in values:
-                write("\n")
-                dump(v, write)
-                write("\n")
-            write("\n")
-        result = "".join(out)
-        return result
-
-    def __dump(self, value, write):
-        try:
-            f = self.dispatch[type(value)]
-        except KeyError:
-            # check if this object can be marshalled as a structure
-            if not hasattr(value, '__dict__'):
-                raise TypeError("cannot marshal %s objects" % type(value))
-            # check if this class is a sub-class of a basic type,
-            # because we don't know how to marshal these types
-            # (e.g. a string sub-class)
-            for type_ in type(value).__mro__:
-                if type_ in self.dispatch.keys():
-                    raise TypeError("cannot marshal %s objects" % type(value))
-            # XXX(twouters): using "_arbitrary_instance" as key as a quick-fix
-            # for the p3yk merge, this should probably be fixed more neatly.
-            f = self.dispatch["_arbitrary_instance"]
-        f(self, value, write)
-
-    def dump_nil (self, value, write):
-        if not self.allow_none:
-            raise TypeError("cannot marshal None unless allow_none is enabled")
-        write("")
-    dispatch[type(None)] = dump_nil
-
-    def dump_bool(self, value, write):
-        write("")
-        write(value and "1" or "0")
-        write("\n")
-    dispatch[bool] = dump_bool
-
-    def dump_long(self, value, write):
-        if value > MAXINT or value < MININT:
-            raise OverflowError("int exceeds XML-RPC limits")
-        write("")
-        write(str(int(value)))
-        write("\n")
-    dispatch[int] = dump_long
-
-    # backward compatible
-    dump_int = dump_long
-
-    def dump_double(self, value, write):
-        write("")
-        write(repr(value))
-        write("\n")
-    dispatch[float] = dump_double
-
-    def dump_unicode(self, value, write, escape=escape):
-        write("")
-        write(escape(value))
-        write("\n")
-    dispatch[str] = dump_unicode
-
-    def dump_bytes(self, value, write):
-        write("\n")
-        encoded = base64.encodebytes(value)
-        write(encoded.decode('ascii'))
-        write("\n")
-    dispatch[bytes] = dump_bytes
-    dispatch[bytearray] = dump_bytes
-
-    def dump_array(self, value, write):
-        i = id(value)
-        if i in self.memo:
-            raise TypeError("cannot marshal recursive sequences")
-        self.memo[i] = None
-        dump = self.__dump
-        write("\n")
-        for v in value:
-            dump(v, write)
-        write("\n")
-        del self.memo[i]
-    dispatch[tuple] = dump_array
-    dispatch[list] = dump_array
-
-    def dump_struct(self, value, write, escape=escape):
-        i = id(value)
-        if i in self.memo:
-            raise TypeError("cannot marshal recursive dictionaries")
-        self.memo[i] = None
-        dump = self.__dump
-        write("\n")
-        for k, v in value.items():
-            write("\n")
-            if not isinstance(k, str):
-                raise TypeError("dictionary key must be string")
-            write("%s\n" % escape(k))
-            dump(v, write)
-            write("\n")
-        write("\n")
-        del self.memo[i]
-    dispatch[dict] = dump_struct
-
-    def dump_datetime(self, value, write):
-        write("")
-        write(_strftime(value))
-        write("\n")
-    dispatch[datetime] = dump_datetime
-
-    def dump_instance(self, value, write):
-        # check for special wrappers
-        if value.__class__ in WRAPPERS:
-            self.write = write
-            value.encode(self)
-            del self.write
-        else:
-            # store instance attributes as a struct (really?)
-            self.dump_struct(value.__dict__, write)
-    dispatch[DateTime] = dump_instance
-    dispatch[Binary] = dump_instance
-    # XXX(twouters): using "_arbitrary_instance" as key as a quick-fix
-    # for the p3yk merge, this should probably be fixed more neatly.
-    dispatch["_arbitrary_instance"] = dump_instance
-
-##
-# XML-RPC unmarshaller.
-#
-# @see loads
-
-class Unmarshaller:
-    """Unmarshal an XML-RPC response, based on incoming XML event
-    messages (start, data, end).  Call close() to get the resulting
-    data structure.
-
-    Note that this reader is fairly tolerant, and gladly accepts bogus
-    XML-RPC data without complaining (but not bogus XML).
-    """
-
-    # and again, if you don't understand what's going on in here,
-    # that's perfectly ok.
-
-    def __init__(self, use_datetime=False, use_builtin_types=False):
-        self._type = None
-        self._stack = []
-        self._marks = []
-        self._data = []
-        self._value = False
-        self._methodname = None
-        self._encoding = "utf-8"
-        self.append = self._stack.append
-        self._use_datetime = use_builtin_types or use_datetime
-        self._use_bytes = use_builtin_types
-
-    def close(self):
-        # return response tuple and target method
-        if self._type is None or self._marks:
-            raise ResponseError()
-        if self._type == "fault":
-            raise Fault(**self._stack[0])
-        return tuple(self._stack)
-
-    def getmethodname(self):
-        return self._methodname
-
-    #
-    # event handlers
-
-    def xml(self, encoding, standalone):
-        self._encoding = encoding
-        # FIXME: assert standalone == 1 ???
-
-    def start(self, tag, attrs):
-        # prepare to handle this element
-        if ':' in tag:
-            tag = tag.split(':')[-1]
-        if tag == "array" or tag == "struct":
-            self._marks.append(len(self._stack))
-        self._data = []
-        if self._value and tag not in self.dispatch:
-            raise ResponseError("unknown tag %r" % tag)
-        self._value = (tag == "value")
-
-    def data(self, text):
-        self._data.append(text)
-
-    def end(self, tag):
-        # call the appropriate end tag handler
-        try:
-            f = self.dispatch[tag]
-        except KeyError:
-            if ':' not in tag:
-                return # unknown tag ?
-            try:
-                f = self.dispatch[tag.split(':')[-1]]
-            except KeyError:
-                return # unknown tag ?
-        return f(self, "".join(self._data))
-
-    #
-    # accelerator support
-
-    def end_dispatch(self, tag, data):
-        # dispatch data
-        try:
-            f = self.dispatch[tag]
-        except KeyError:
-            if ':' not in tag:
-                return # unknown tag ?
-            try:
-                f = self.dispatch[tag.split(':')[-1]]
-            except KeyError:
-                return # unknown tag ?
-        return f(self, data)
-
-    #
-    # element decoders
-
-    dispatch = {}
-
-    def end_nil (self, data):
-        self.append(None)
-        self._value = 0
-    dispatch["nil"] = end_nil
-
-    def end_boolean(self, data):
-        if data == "0":
-            self.append(False)
-        elif data == "1":
-            self.append(True)
-        else:
-            raise TypeError("bad boolean value")
-        self._value = 0
-    dispatch["boolean"] = end_boolean
-
-    def end_int(self, data):
-        self.append(int(data))
-        self._value = 0
-    dispatch["i1"] = end_int
-    dispatch["i2"] = end_int
-    dispatch["i4"] = end_int
-    dispatch["i8"] = end_int
-    dispatch["int"] = end_int
-    dispatch["biginteger"] = end_int
-
-    def end_double(self, data):
-        self.append(float(data))
-        self._value = 0
-    dispatch["double"] = end_double
-    dispatch["float"] = end_double
-
-    def end_bigdecimal(self, data):
-        self.append(Decimal(data))
-        self._value = 0
-    dispatch["bigdecimal"] = end_bigdecimal
-
-    def end_string(self, data):
-        if self._encoding:
-            data = data.decode(self._encoding)
-        self.append(data)
-        self._value = 0
-    dispatch["string"] = end_string
-    dispatch["name"] = end_string # struct keys are always strings
-
-    def end_array(self, data):
-        mark = self._marks.pop()
-        # map arrays to Python lists
-        self._stack[mark:] = [self._stack[mark:]]
-        self._value = 0
-    dispatch["array"] = end_array
-
-    def end_struct(self, data):
-        mark = self._marks.pop()
-        # map structs to Python dictionaries
-        dict = {}
-        items = self._stack[mark:]
-        for i in range(0, len(items), 2):
-            dict[items[i]] = items[i+1]
-        self._stack[mark:] = [dict]
-        self._value = 0
-    dispatch["struct"] = end_struct
-
-    def end_base64(self, data):
-        value = Binary()
-        value.decode(data.encode("ascii"))
-        if self._use_bytes:
-            value = value.data
-        self.append(value)
-        self._value = 0
-    dispatch["base64"] = end_base64
-
-    def end_dateTime(self, data):
-        value = DateTime()
-        value.decode(data)
-        if self._use_datetime:
-            value = _datetime_type(data)
-        self.append(value)
-    dispatch["dateTime.iso8601"] = end_dateTime
-
-    def end_value(self, data):
-        # if we stumble upon a value element with no internal
-        # elements, treat it as a string element
-        if self._value:
-            self.end_string(data)
-    dispatch["value"] = end_value
-
-    def end_params(self, data):
-        self._type = "params"
-    dispatch["params"] = end_params
-
-    def end_fault(self, data):
-        self._type = "fault"
-    dispatch["fault"] = end_fault
-
-    def end_methodName(self, data):
-        if self._encoding:
-            data = data.decode(self._encoding)
-        self._methodname = data
-        self._type = "methodName" # no params
-    dispatch["methodName"] = end_methodName
-
-## Multicall support
-#
-
-class _MultiCallMethod:
-    # some lesser magic to store calls made to a MultiCall object
-    # for batch execution
-    def __init__(self, call_list, name):
-        self.__call_list = call_list
-        self.__name = name
-    def __getattr__(self, name):
-        return _MultiCallMethod(self.__call_list, "%s.%s" % (self.__name, name))
-    def __call__(self, *args):
-        self.__call_list.append((self.__name, args))
-
-class MultiCallIterator:
-    """Iterates over the results of a multicall. Exceptions are
-    raised in response to xmlrpc faults."""
-
-    def __init__(self, results):
-        self.results = results
-
-    def __getitem__(self, i):
-        item = self.results[i]
-        if isinstance(item, dict):
-            raise Fault(item['faultCode'], item['faultString'])
-        elif isinstance(item, list):
-            return item[0]
-        else:
-            raise ValueError("unexpected type in multicall result")
-
-class MultiCall:
-    """server -> an object used to boxcar method calls
-
-    server should be a ServerProxy object.
-
-    Methods can be added to the MultiCall using normal
-    method call syntax e.g.:
-
-    multicall = MultiCall(server_proxy)
-    multicall.add(2,3)
-    multicall.get_address("Guido")
-
-    To execute the multicall, call the MultiCall object e.g.:
-
-    add_result, address = multicall()
-    """
-
-    def __init__(self, server):
-        self.__server = server
-        self.__call_list = []
-
-    def __repr__(self):
-        return "<%s at %#x>" % (self.__class__.__name__, id(self))
-
-    def __getattr__(self, name):
-        return _MultiCallMethod(self.__call_list, name)
-
-    def __call__(self):
-        marshalled_list = []
-        for name, args in self.__call_list:
-            marshalled_list.append({'methodName' : name, 'params' : args})
-
-        return MultiCallIterator(self.__server.system.multicall(marshalled_list))
-
-# --------------------------------------------------------------------
-# convenience functions
-
-FastMarshaller = FastParser = FastUnmarshaller = None
-
-##
-# Create a parser object, and connect it to an unmarshalling instance.
-# This function picks the fastest available XML parser.
-#
-# return A (parser, unmarshaller) tuple.
-
-def getparser(use_datetime=False, use_builtin_types=False):
-    """getparser() -> parser, unmarshaller
-
-    Create an instance of the fastest available parser, and attach it
-    to an unmarshalling object.  Return both objects.
-    """
-    if FastParser and FastUnmarshaller:
-        if use_builtin_types:
-            mkdatetime = _datetime_type
-            mkbytes = base64.decodebytes
-        elif use_datetime:
-            mkdatetime = _datetime_type
-            mkbytes = _binary
-        else:
-            mkdatetime = _datetime
-            mkbytes = _binary
-        target = FastUnmarshaller(True, False, mkbytes, mkdatetime, Fault)
-        parser = FastParser(target)
-    else:
-        target = Unmarshaller(use_datetime=use_datetime, use_builtin_types=use_builtin_types)
-        if FastParser:
-            parser = FastParser(target)
-        else:
-            parser = ExpatParser(target)
-    return parser, target
-
-##
-# Convert a Python tuple or a Fault instance to an XML-RPC packet.
-#
-# @def dumps(params, **options)
-# @param params A tuple or Fault instance.
-# @keyparam methodname If given, create a methodCall request for
-#     this method name.
-# @keyparam methodresponse If given, create a methodResponse packet.
-#     If used with a tuple, the tuple must be a singleton (that is,
-#     it must contain exactly one element).
-# @keyparam encoding The packet encoding.
-# @return A string containing marshalled data.
-
-def dumps(params, methodname=None, methodresponse=None, encoding=None,
-          allow_none=False):
-    """data [,options] -> marshalled data
-
-    Convert an argument tuple or a Fault instance to an XML-RPC
-    request (or response, if the methodresponse option is used).
-
-    In addition to the data object, the following options can be given
-    as keyword arguments:
-
-        methodname: the method name for a methodCall packet
-
-        methodresponse: true to create a methodResponse packet.
-        If this option is used with a tuple, the tuple must be
-        a singleton (i.e. it can contain only one element).
-
-        encoding: the packet encoding (default is UTF-8)
-
-    All byte strings in the data structure are assumed to use the
-    packet encoding.  Unicode strings are automatically converted,
-    where necessary.
-    """
-
-    assert isinstance(params, (tuple, Fault)), "argument must be tuple or Fault instance"
-    if isinstance(params, Fault):
-        methodresponse = 1
-    elif methodresponse and isinstance(params, tuple):
-        assert len(params) == 1, "response tuple must be a singleton"
-
-    if not encoding:
-        encoding = "utf-8"
-
-    if FastMarshaller:
-        m = FastMarshaller(encoding)
-    else:
-        m = Marshaller(encoding, allow_none)
-
-    data = m.dumps(params)
-
-    if encoding != "utf-8":
-        xmlheader = "\n" % str(encoding)
-    else:
-        xmlheader = "\n" # utf-8 is default
-
-    # standard XML-RPC wrappings
-    if methodname:
-        # a method call
-        data = (
-            xmlheader,
-            "\n"
-            "", methodname, "\n",
-            data,
-            "\n"
-            )
-    elif methodresponse:
-        # a method response, or a fault structure
-        data = (
-            xmlheader,
-            "\n",
-            data,
-            "\n"
-            )
-    else:
-        return data # return as is
-    return "".join(data)
-
-##
-# Convert an XML-RPC packet to a Python object.  If the XML-RPC packet
-# represents a fault condition, this function raises a Fault exception.
-#
-# @param data An XML-RPC packet, given as an 8-bit string.
-# @return A tuple containing the unpacked data, and the method name
-#     (None if not present).
-# @see Fault
-
-def loads(data, use_datetime=False, use_builtin_types=False):
-    """data -> unmarshalled data, method name
-
-    Convert an XML-RPC packet to unmarshalled data plus a method
-    name (None if not present).
-
-    If the XML-RPC packet represents a fault condition, this function
-    raises a Fault exception.
-    """
-    p, u = getparser(use_datetime=use_datetime, use_builtin_types=use_builtin_types)
-    p.feed(data)
-    p.close()
-    return u.close(), u.getmethodname()
-
-##
-# Encode a string using the gzip content encoding such as specified by the
-# Content-Encoding: gzip
-# in the HTTP header, as described in RFC 1952
-#
-# @param data the unencoded data
-# @return the encoded data
-
-def gzip_encode(data):
-    """data -> gzip encoded data
-
-    Encode data using the gzip content encoding as described in RFC 1952
-    """
-    if not gzip:
-        raise NotImplementedError
-    f = BytesIO()
-    with gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1) as gzf:
-        gzf.write(data)
-    return f.getvalue()
-
-##
-# Decode a string using the gzip content encoding such as specified by the
-# Content-Encoding: gzip
-# in the HTTP header, as described in RFC 1952
-#
-# @param data The encoded data
-# @keyparam max_decode Maximum bytes to decode (20 MiB default), use negative
-#    values for unlimited decoding
-# @return the unencoded data
-# @raises ValueError if data is not correctly coded.
-# @raises ValueError if max gzipped payload length exceeded
-
-def gzip_decode(data, max_decode=20971520):
-    """gzip encoded data -> unencoded data
-
-    Decode data using the gzip content encoding as described in RFC 1952
-    """
-    if not gzip:
-        raise NotImplementedError
-    with gzip.GzipFile(mode="rb", fileobj=BytesIO(data)) as gzf:
-        try:
-            if max_decode < 0: # no limit
-                decoded = gzf.read()
-            else:
-                decoded = gzf.read(max_decode + 1)
-        except OSError:
-            raise ValueError("invalid data")
-    if max_decode >= 0 and len(decoded) > max_decode:
-        raise ValueError("max gzipped payload length exceeded")
-    return decoded
-
-##
-# Return a decoded file-like object for the gzip encoding
-# as described in RFC 1952.
-#
-# @param response A stream supporting a read() method
-# @return a file-like object that the decoded data can be read() from
-
-class GzipDecodedResponse(gzip.GzipFile if gzip else object):
-    """a file-like object to decode a response encoded with the gzip
-    method, as described in RFC 1952.
-    """
-    def __init__(self, response):
-        #response doesn't support tell() and read(), required by
-        #GzipFile
-        if not gzip:
-            raise NotImplementedError
-        self.io = BytesIO(response.read())
-        gzip.GzipFile.__init__(self, mode="rb", fileobj=self.io)
-
-    def close(self):
-        try:
-            gzip.GzipFile.close(self)
-        finally:
-            self.io.close()
-
-
-# --------------------------------------------------------------------
-# request dispatcher
-
-class _Method:
-    # some magic to bind an XML-RPC method to an RPC server.
-    # supports "nested" methods (e.g. examples.getStateName)
-    def __init__(self, send, name):
-        self.__send = send
-        self.__name = name
-    def __getattr__(self, name):
-        return _Method(self.__send, "%s.%s" % (self.__name, name))
-    def __call__(self, *args):
-        return self.__send(self.__name, args)
-
-##
-# Standard transport class for XML-RPC over HTTP.
-# 

-# You can create custom transports by subclassing this method, and -# overriding selected methods. - -class Transport: - """Handles an HTTP transaction to an XML-RPC server.""" - - # client identifier (may be overridden) - user_agent = "Python-xmlrpc/%s" % __version__ - - #if true, we'll request gzip encoding - accept_gzip_encoding = True - - # if positive, encode request using gzip if it exceeds this threshold - # note that many servers will get confused, so only use it if you know - # that they can decode such a request - encode_threshold = None #None = don't encode - - def __init__(self, use_datetime=False, use_builtin_types=False, - *, headers=()): - self._use_datetime = use_datetime - self._use_builtin_types = use_builtin_types - self._connection = (None, None) - self._headers = list(headers) - self._extra_headers = [] - - ## - # Send a complete request, and parse the response. - # Retry request if a cached connection has disconnected. - # - # @param host Target host. - # @param handler Target PRC handler. - # @param request_body XML-RPC request body. - # @param verbose Debugging flag. - # @return Parsed response. - - def request(self, host, handler, request_body, verbose=False): - #retry request once if cached connection has gone cold - for i in (0, 1): - try: - return self.single_request(host, handler, request_body, verbose) - except http.client.RemoteDisconnected: - if i: - raise - except OSError as e: - if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, - errno.EPIPE): - raise - - def single_request(self, host, handler, request_body, verbose=False): - # issue XML-RPC request - try: - http_conn = self.send_request(host, handler, request_body, verbose) - resp = http_conn.getresponse() - if resp.status == 200: - self.verbose = verbose - return self.parse_response(resp) - - except Fault: - raise - except Exception: - #All unexpected errors leave connection in - # a strange state, so we clear it. - self.close() - raise - - #We got an error response. - #Discard any response data and raise exception - if resp.getheader("content-length", ""): - resp.read() - raise ProtocolError( - host + handler, - resp.status, resp.reason, - dict(resp.getheaders()) - ) - - - ## - # Create parser. - # - # @return A 2-tuple containing a parser and an unmarshaller. - - def getparser(self): - # get parser and unmarshaller - return getparser(use_datetime=self._use_datetime, - use_builtin_types=self._use_builtin_types) - - ## - # Get authorization info from host parameter - # Host may be a string, or a (host, x509-dict) tuple; if a string, - # it is checked for a "user:pw@host" format, and a "Basic - # Authentication" header is added if appropriate. - # - # @param host Host descriptor (URL or (URL, x509 info) tuple). - # @return A 3-tuple containing (actual host, extra headers, - # x509 info). The header and x509 fields may be None. - - def get_host_info(self, host): - - x509 = {} - if isinstance(host, tuple): - host, x509 = host - - auth, host = urllib.parse._splituser(host) - - if auth: - auth = urllib.parse.unquote_to_bytes(auth) - auth = base64.encodebytes(auth).decode("utf-8") - auth = "".join(auth.split()) # get rid of whitespace - extra_headers = [ - ("Authorization", "Basic " + auth) - ] - else: - extra_headers = [] - - return host, extra_headers, x509 - - ## - # Connect to server. - # - # @param host Target host. - # @return An HTTPConnection object - - def make_connection(self, host): - #return an existing connection if possible. This allows - #HTTP/1.1 keep-alive. - if self._connection and host == self._connection[0]: - return self._connection[1] - # create a HTTP connection object from a host descriptor - chost, self._extra_headers, x509 = self.get_host_info(host) - self._connection = host, http.client.HTTPConnection(chost) - return self._connection[1] - - ## - # Clear any cached connection object. - # Used in the event of socket errors. - # - def close(self): - host, connection = self._connection - if connection: - self._connection = (None, None) - connection.close() - - ## - # Send HTTP request. - # - # @param host Host descriptor (URL or (URL, x509 info) tuple). - # @param handler Target RPC handler (a path relative to host) - # @param request_body The XML-RPC request body - # @param debug Enable debugging if debug is true. - # @return An HTTPConnection. - - def send_request(self, host, handler, request_body, debug): - connection = self.make_connection(host) - headers = self._headers + self._extra_headers - if debug: - connection.set_debuglevel(1) - if self.accept_gzip_encoding and gzip: - connection.putrequest("POST", handler, skip_accept_encoding=True) - headers.append(("Accept-Encoding", "gzip")) - else: - connection.putrequest("POST", handler) - headers.append(("Content-Type", "text/xml")) - headers.append(("User-Agent", self.user_agent)) - self.send_headers(connection, headers) - self.send_content(connection, request_body) - return connection - - ## - # Send request headers. - # This function provides a useful hook for subclassing - # - # @param connection httpConnection. - # @param headers list of key,value pairs for HTTP headers - - def send_headers(self, connection, headers): - for key, val in headers: - connection.putheader(key, val) - - ## - # Send request body. - # This function provides a useful hook for subclassing - # - # @param connection httpConnection. - # @param request_body XML-RPC request body. - - def send_content(self, connection, request_body): - #optionally encode the request - if (self.encode_threshold is not None and - self.encode_threshold < len(request_body) and - gzip): - connection.putheader("Content-Encoding", "gzip") - request_body = gzip_encode(request_body) - - connection.putheader("Content-Length", str(len(request_body))) - connection.endheaders(request_body) - - ## - # Parse response. - # - # @param file Stream. - # @return Response tuple and target method. - - def parse_response(self, response): - # read response data from httpresponse, and parse it - # Check for new http response object, otherwise it is a file object. - if hasattr(response, 'getheader'): - if response.getheader("Content-Encoding", "") == "gzip": - stream = GzipDecodedResponse(response) - else: - stream = response - else: - stream = response - - p, u = self.getparser() - - while data := stream.read(1024): - if self.verbose: - print("body:", repr(data)) - p.feed(data) - - if stream is not response: - stream.close() - p.close() - - return u.close() - -## -# Standard transport class for XML-RPC over HTTPS. - -class SafeTransport(Transport): - """Handles an HTTPS transaction to an XML-RPC server.""" - - def __init__(self, use_datetime=False, use_builtin_types=False, - *, headers=(), context=None): - super().__init__(use_datetime=use_datetime, - use_builtin_types=use_builtin_types, - headers=headers) - self.context = context - - # FIXME: mostly untested - - def make_connection(self, host): - if self._connection and host == self._connection[0]: - return self._connection[1] - - if not hasattr(http.client, "HTTPSConnection"): - raise NotImplementedError( - "your version of http.client doesn't support HTTPS") - # create a HTTPS connection object from a host descriptor - # host may be a string, or a (host, x509-dict) tuple - chost, self._extra_headers, x509 = self.get_host_info(host) - self._connection = host, http.client.HTTPSConnection(chost, - None, context=self.context, **(x509 or {})) - return self._connection[1] - -## -# Standard server proxy. This class establishes a virtual connection -# to an XML-RPC server. -#

-# This class is available as ServerProxy and Server. New code should -# use ServerProxy, to avoid confusion. -# -# @def ServerProxy(uri, **options) -# @param uri The connection point on the server. -# @keyparam transport A transport factory, compatible with the -# standard transport class. -# @keyparam encoding The default encoding used for 8-bit strings -# (default is UTF-8). -# @keyparam verbose Use a true value to enable debugging output. -# (printed to standard output). -# @see Transport - -class ServerProxy: - """uri [,options] -> a logical connection to an XML-RPC server - - uri is the connection point on the server, given as - scheme://host/target. - - The standard implementation always supports the "http" scheme. If - SSL socket support is available (Python 2.0), it also supports - "https". - - If the target part and the slash preceding it are both omitted, - "/RPC2" is assumed. - - The following options can be given as keyword arguments: - - transport: a transport factory - encoding: the request encoding (default is UTF-8) - - All 8-bit strings passed to the server proxy are assumed to use - the given encoding. - """ - - def __init__(self, uri, transport=None, encoding=None, verbose=False, - allow_none=False, use_datetime=False, use_builtin_types=False, - *, headers=(), context=None): - # establish a "logical" server connection - - # get the url - p = urllib.parse.urlsplit(uri) - if p.scheme not in ("http", "https"): - raise OSError("unsupported XML-RPC protocol") - self.__host = p.netloc - self.__handler = urllib.parse.urlunsplit(["", "", *p[2:]]) - if not self.__handler: - self.__handler = "/RPC2" - - if transport is None: - if p.scheme == "https": - handler = SafeTransport - extra_kwargs = {"context": context} - else: - handler = Transport - extra_kwargs = {} - transport = handler(use_datetime=use_datetime, - use_builtin_types=use_builtin_types, - headers=headers, - **extra_kwargs) - self.__transport = transport - - self.__encoding = encoding or 'utf-8' - self.__verbose = verbose - self.__allow_none = allow_none - - def __close(self): - self.__transport.close() - - def __request(self, methodname, params): - # call a method on the remote server - - request = dumps(params, methodname, encoding=self.__encoding, - allow_none=self.__allow_none).encode(self.__encoding, 'xmlcharrefreplace') - - response = self.__transport.request( - self.__host, - self.__handler, - request, - verbose=self.__verbose - ) - - if len(response) == 1: - response = response[0] - - return response - - def __repr__(self): - return ( - "<%s for %s%s>" % - (self.__class__.__name__, self.__host, self.__handler) - ) - - def __getattr__(self, name): - # magic method dispatcher - return _Method(self.__request, name) - - # note: to call a remote object with a non-standard name, use - # result getattr(server, "strange-python-name")(args) - - def __call__(self, attr): - """A workaround to get special attributes on the ServerProxy - without interfering with the magic __getattr__ - """ - if attr == "close": - return self.__close - elif attr == "transport": - return self.__transport - raise AttributeError("Attribute %r not found" % (attr,)) - - def __enter__(self): - return self - - def __exit__(self, *args): - self.__close() - -# compatibility - -Server = ServerProxy - -# -------------------------------------------------------------------- -# test code - -if __name__ == "__main__": - - # simple test program (from the XML-RPC specification) - - # local server, available from Lib/xmlrpc/server.py - server = ServerProxy("http://localhost:8000") - - try: - print(server.currentTime.getCurrentTime()) - except Error as v: - print("ERROR", v) - - multi = MultiCall(server) - multi.getData() - multi.pow(2,9) - multi.add(1,2) - try: - for response in multi(): - print(response) - except Error as v: - print("ERROR", v) diff --git a/Python314_4_x64_Template/Lib/zipfile/__init__.py b/Python314_4_x64_Template/Lib/zipfile/__init__.py deleted file mode 100644 index 19aea290b..000000000 --- a/Python314_4_x64_Template/Lib/zipfile/__init__.py +++ /dev/null @@ -1,2435 +0,0 @@ -""" -Read and write ZIP files. - -XXX references to utf-8 need further investigation. -""" -import binascii -import importlib.util -import io -import os -import shutil -import stat -import struct -import sys -import threading -import time - -try: - import zlib # We may need its compression method - crc32 = zlib.crc32 -except ImportError: - zlib = None - crc32 = binascii.crc32 - -try: - import bz2 # We may need its compression method -except ImportError: - bz2 = None - -try: - import lzma # We may need its compression method -except ImportError: - lzma = None - -try: - from compression import zstd # We may need its compression method -except ImportError: - zstd = None - -__all__ = ["BadZipFile", "BadZipfile", "error", - "ZIP_STORED", "ZIP_DEFLATED", "ZIP_BZIP2", "ZIP_LZMA", - "ZIP_ZSTANDARD", "is_zipfile", "ZipInfo", "ZipFile", "PyZipFile", - "LargeZipFile", "Path"] - -class BadZipFile(Exception): - pass - - -class LargeZipFile(Exception): - """ - Raised when writing a zipfile, the zipfile requires ZIP64 extensions - and those extensions are disabled. - """ - -error = BadZipfile = BadZipFile # Pre-3.2 compatibility names - - -ZIP64_LIMIT = (1 << 31) - 1 -ZIP_FILECOUNT_LIMIT = (1 << 16) - 1 -ZIP_MAX_COMMENT = (1 << 16) - 1 - -# constants for Zip file compression methods -ZIP_STORED = 0 -ZIP_DEFLATED = 8 -ZIP_BZIP2 = 12 -ZIP_LZMA = 14 -ZIP_ZSTANDARD = 93 -# Other ZIP compression methods not supported - -DEFAULT_VERSION = 20 -ZIP64_VERSION = 45 -BZIP2_VERSION = 46 -LZMA_VERSION = 63 -ZSTANDARD_VERSION = 63 -# we recognize (but not necessarily support) all features up to that version -MAX_EXTRACT_VERSION = 63 - -# Below are some formats and associated data for reading/writing headers using -# the struct module. The names and structures of headers/records are those used -# in the PKWARE description of the ZIP file format: -# http://www.pkware.com/documents/casestudies/APPNOTE.TXT -# (URL valid as of January 2008) - -# The "end of central directory" structure, magic number, size, and indices -# (section V.I in the format document) -structEndArchive = b"<4s4H2LH" -stringEndArchive = b"PK\005\006" -sizeEndCentDir = struct.calcsize(structEndArchive) - -_ECD_SIGNATURE = 0 -_ECD_DISK_NUMBER = 1 -_ECD_DISK_START = 2 -_ECD_ENTRIES_THIS_DISK = 3 -_ECD_ENTRIES_TOTAL = 4 -_ECD_SIZE = 5 -_ECD_OFFSET = 6 -_ECD_COMMENT_SIZE = 7 -# These last two indices are not part of the structure as defined in the -# spec, but they are used internally by this module as a convenience -_ECD_COMMENT = 8 -_ECD_LOCATION = 9 - -# The "central directory" structure, magic number, size, and indices -# of entries in the structure (section V.F in the format document) -structCentralDir = "<4s4B4HL2L5H2L" -stringCentralDir = b"PK\001\002" -sizeCentralDir = struct.calcsize(structCentralDir) - -# indexes of entries in the central directory structure -_CD_SIGNATURE = 0 -_CD_CREATE_VERSION = 1 -_CD_CREATE_SYSTEM = 2 -_CD_EXTRACT_VERSION = 3 -_CD_EXTRACT_SYSTEM = 4 -_CD_FLAG_BITS = 5 -_CD_COMPRESS_TYPE = 6 -_CD_TIME = 7 -_CD_DATE = 8 -_CD_CRC = 9 -_CD_COMPRESSED_SIZE = 10 -_CD_UNCOMPRESSED_SIZE = 11 -_CD_FILENAME_LENGTH = 12 -_CD_EXTRA_FIELD_LENGTH = 13 -_CD_COMMENT_LENGTH = 14 -_CD_DISK_NUMBER_START = 15 -_CD_INTERNAL_FILE_ATTRIBUTES = 16 -_CD_EXTERNAL_FILE_ATTRIBUTES = 17 -_CD_LOCAL_HEADER_OFFSET = 18 - -# General purpose bit flags -# Zip Appnote: 4.4.4 general purpose bit flag: (2 bytes) -_MASK_ENCRYPTED = 1 << 0 -# Bits 1 and 2 have different meanings depending on the compression used. -_MASK_COMPRESS_OPTION_1 = 1 << 1 -# _MASK_COMPRESS_OPTION_2 = 1 << 2 -# _MASK_USE_DATA_DESCRIPTOR: If set, crc-32, compressed size and uncompressed -# size are zero in the local header and the real values are written in the data -# descriptor immediately following the compressed data. -_MASK_USE_DATA_DESCRIPTOR = 1 << 3 -# Bit 4: Reserved for use with compression method 8, for enhanced deflating. -# _MASK_RESERVED_BIT_4 = 1 << 4 -_MASK_COMPRESSED_PATCH = 1 << 5 -_MASK_STRONG_ENCRYPTION = 1 << 6 -# _MASK_UNUSED_BIT_7 = 1 << 7 -# _MASK_UNUSED_BIT_8 = 1 << 8 -# _MASK_UNUSED_BIT_9 = 1 << 9 -# _MASK_UNUSED_BIT_10 = 1 << 10 -_MASK_UTF_FILENAME = 1 << 11 -# Bit 12: Reserved by PKWARE for enhanced compression. -# _MASK_RESERVED_BIT_12 = 1 << 12 -# _MASK_ENCRYPTED_CENTRAL_DIR = 1 << 13 -# Bit 14, 15: Reserved by PKWARE -# _MASK_RESERVED_BIT_14 = 1 << 14 -# _MASK_RESERVED_BIT_15 = 1 << 15 - -# The "local file header" structure, magic number, size, and indices -# (section V.A in the format document) -structFileHeader = "<4s2B4HL2L2H" -stringFileHeader = b"PK\003\004" -sizeFileHeader = struct.calcsize(structFileHeader) - -_FH_SIGNATURE = 0 -_FH_EXTRACT_VERSION = 1 -_FH_EXTRACT_SYSTEM = 2 -_FH_GENERAL_PURPOSE_FLAG_BITS = 3 -_FH_COMPRESSION_METHOD = 4 -_FH_LAST_MOD_TIME = 5 -_FH_LAST_MOD_DATE = 6 -_FH_CRC = 7 -_FH_COMPRESSED_SIZE = 8 -_FH_UNCOMPRESSED_SIZE = 9 -_FH_FILENAME_LENGTH = 10 -_FH_EXTRA_FIELD_LENGTH = 11 - -# The "Zip64 end of central directory locator" structure, magic number, and size -structEndArchive64Locator = "<4sLQL" -stringEndArchive64Locator = b"PK\x06\x07" -sizeEndCentDir64Locator = struct.calcsize(structEndArchive64Locator) - -# The "Zip64 end of central directory" record, magic number, size, and indices -# (section V.G in the format document) -structEndArchive64 = "<4sQ2H2L4Q" -stringEndArchive64 = b"PK\x06\x06" -sizeEndCentDir64 = struct.calcsize(structEndArchive64) - -_CD64_SIGNATURE = 0 -_CD64_DIRECTORY_RECSIZE = 1 -_CD64_CREATE_VERSION = 2 -_CD64_EXTRACT_VERSION = 3 -_CD64_DISK_NUMBER = 4 -_CD64_DISK_NUMBER_START = 5 -_CD64_NUMBER_ENTRIES_THIS_DISK = 6 -_CD64_NUMBER_ENTRIES_TOTAL = 7 -_CD64_DIRECTORY_SIZE = 8 -_CD64_OFFSET_START_CENTDIR = 9 - -_DD_SIGNATURE = 0x08074b50 - - -class _Extra(bytes): - FIELD_STRUCT = struct.Struct('= sizeCentralDir: - data = fp.read(sizeCentralDir) # CD is where we expect it to be - if len(data) == sizeCentralDir: - centdir = struct.unpack(structCentralDir, data) # CD is the right size - if centdir[_CD_SIGNATURE] == stringCentralDir: - return True # First central directory entry has correct magic number - except OSError: - pass - return False - -def is_zipfile(filename): - """Quickly see if a file is a ZIP file by checking the magic number. - - The filename argument may be a file or file-like object too. - """ - result = False - try: - if hasattr(filename, "read"): - pos = filename.tell() - result = _check_zipfile(fp=filename) - filename.seek(pos) - else: - with open(filename, "rb") as fp: - result = _check_zipfile(fp) - except (OSError, BadZipFile): - pass - return result - -def _handle_prepended_data(endrec, debug=0): - size_cd = endrec[_ECD_SIZE] # bytes in central directory - offset_cd = endrec[_ECD_OFFSET] # offset of central directory - - # "concat" is zero, unless zip was concatenated to another file - concat = endrec[_ECD_LOCATION] - size_cd - offset_cd - - if debug > 2: - inferred = concat + offset_cd - print("given, inferred, offset", offset_cd, inferred, concat) - - return offset_cd, concat - -def _EndRecData64(fpin, offset, endrec): - """ - Read the ZIP64 end-of-archive records and use that to update endrec - """ - offset -= sizeEndCentDir64Locator - if offset < 0: - # The file is not large enough to contain a ZIP64 - # end-of-archive record, so just return the end record we were given. - return endrec - fpin.seek(offset) - data = fpin.read(sizeEndCentDir64Locator) - if len(data) != sizeEndCentDir64Locator: - raise OSError("Unknown I/O error") - sig, diskno, reloff, disks = struct.unpack(structEndArchive64Locator, data) - if sig != stringEndArchive64Locator: - return endrec - - if diskno != 0 or disks > 1: - raise BadZipFile("zipfiles that span multiple disks are not supported") - - offset -= sizeEndCentDir64 - if reloff > offset: - raise BadZipFile("Corrupt zip64 end of central directory locator") - # First, check the assumption that there is no prepended data. - fpin.seek(reloff) - extrasz = offset - reloff - data = fpin.read(sizeEndCentDir64) - if len(data) != sizeEndCentDir64: - raise OSError("Unknown I/O error") - if not data.startswith(stringEndArchive64) and reloff != offset: - # Since we already have seen the Zip64 EOCD Locator, it's - # possible we got here because there is prepended data. - # Assume no 'zip64 extensible data' - fpin.seek(offset) - extrasz = 0 - data = fpin.read(sizeEndCentDir64) - if len(data) != sizeEndCentDir64: - raise OSError("Unknown I/O error") - if not data.startswith(stringEndArchive64): - raise BadZipFile("Zip64 end of central directory record not found") - - sig, sz, create_version, read_version, disk_num, disk_dir, \ - dircount, dircount2, dirsize, diroffset = \ - struct.unpack(structEndArchive64, data) - if (diroffset + dirsize != reloff or - sz + 12 != sizeEndCentDir64 + extrasz): - raise BadZipFile("Corrupt zip64 end of central directory record") - - # Update the original endrec using data from the ZIP64 record - endrec[_ECD_SIGNATURE] = sig - endrec[_ECD_DISK_NUMBER] = disk_num - endrec[_ECD_DISK_START] = disk_dir - endrec[_ECD_ENTRIES_THIS_DISK] = dircount - endrec[_ECD_ENTRIES_TOTAL] = dircount2 - endrec[_ECD_SIZE] = dirsize - endrec[_ECD_OFFSET] = diroffset - endrec[_ECD_LOCATION] = offset - extrasz - return endrec - - -def _EndRecData(fpin): - """Return data from the "End of Central Directory" record, or None. - - The data is a list of the nine items in the ZIP "End of central dir" - record followed by a tenth item, the file seek offset of this record.""" - - # Determine file size - fpin.seek(0, 2) - filesize = fpin.tell() - - # Check to see if this is ZIP file with no archive comment (the - # "end of central directory" structure should be the last item in the - # file if this is the case). - try: - fpin.seek(-sizeEndCentDir, 2) - except OSError: - return None - data = fpin.read(sizeEndCentDir) - if (len(data) == sizeEndCentDir and - data[0:4] == stringEndArchive and - data[-2:] == b"\000\000"): - # the signature is correct and there's no comment, unpack structure - endrec = struct.unpack(structEndArchive, data) - endrec=list(endrec) - - # Append a blank comment and record start offset - endrec.append(b"") - endrec.append(filesize - sizeEndCentDir) - - # Try to read the "Zip64 end of central directory" structure - return _EndRecData64(fpin, filesize - sizeEndCentDir, endrec) - - # Either this is not a ZIP file, or it is a ZIP file with an archive - # comment. Search the end of the file for the "end of central directory" - # record signature. The comment is the last item in the ZIP file and may be - # up to 64K long. It is assumed that the "end of central directory" magic - # number does not appear in the comment. - maxCommentStart = max(filesize - ZIP_MAX_COMMENT - sizeEndCentDir, 0) - fpin.seek(maxCommentStart, 0) - data = fpin.read(ZIP_MAX_COMMENT + sizeEndCentDir) - start = data.rfind(stringEndArchive) - if start >= 0: - # found the magic number; attempt to unpack and interpret - recData = data[start:start+sizeEndCentDir] - if len(recData) != sizeEndCentDir: - # Zip file is corrupted. - return None - endrec = list(struct.unpack(structEndArchive, recData)) - commentSize = endrec[_ECD_COMMENT_SIZE] #as claimed by the zip file - comment = data[start+sizeEndCentDir:start+sizeEndCentDir+commentSize] - endrec.append(comment) - endrec.append(maxCommentStart + start) - - # Try to read the "Zip64 end of central directory" structure - return _EndRecData64(fpin, maxCommentStart + start, endrec) - - # Unable to find a valid end of central directory structure - return None - -def _sanitize_filename(filename): - """Terminate the file name at the first null byte and - ensure paths always use forward slashes as the directory separator.""" - - # Terminate the file name at the first null byte. Null bytes in file - # names are used as tricks by viruses in archives. - null_byte = filename.find(chr(0)) - if null_byte >= 0: - filename = filename[0:null_byte] - # This is used to ensure paths in generated ZIP files always use - # forward slashes as the directory separator, as required by the - # ZIP format specification. - if os.sep != "/" and os.sep in filename: - filename = filename.replace(os.sep, "/") - if os.altsep and os.altsep != "/" and os.altsep in filename: - filename = filename.replace(os.altsep, "/") - return filename - - -class ZipInfo: - """Class with attributes describing each file in the ZIP archive.""" - - __slots__ = ( - 'orig_filename', - 'filename', - 'date_time', - 'compress_type', - 'compress_level', - 'comment', - 'extra', - 'create_system', - 'create_version', - 'extract_version', - 'reserved', - 'flag_bits', - 'volume', - 'internal_attr', - 'external_attr', - 'header_offset', - 'CRC', - 'compress_size', - 'file_size', - '_raw_time', - '_end_offset', - ) - - def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): - self.orig_filename = filename # Original file name in archive - - # Terminate the file name at the first null byte and - # ensure paths always use forward slashes as the directory separator. - filename = _sanitize_filename(filename) - - self.filename = filename # Normalized file name - self.date_time = date_time # year, month, day, hour, min, sec - - if date_time[0] < 1980: - raise ValueError('ZIP does not support timestamps before 1980') - - # Standard values: - self.compress_type = ZIP_STORED # Type of compression for the file - self.compress_level = None # Level for the compressor - self.comment = b"" # Comment for each file - self.extra = b"" # ZIP extra data - if sys.platform == 'win32': - self.create_system = 0 # System which created ZIP archive - else: - # Assume everything else is unix-y - self.create_system = 3 # System which created ZIP archive - self.create_version = DEFAULT_VERSION # Version which created ZIP archive - self.extract_version = DEFAULT_VERSION # Version needed to extract archive - self.reserved = 0 # Must be zero - self.flag_bits = 0 # ZIP flag bits - self.volume = 0 # Volume number of file header - self.internal_attr = 0 # Internal attributes - self.external_attr = 0 # External file attributes - self.compress_size = 0 # Size of the compressed file - self.file_size = 0 # Size of the uncompressed file - self._end_offset = None # Start of the next local header or central directory - # Other attributes are set by class ZipFile: - # header_offset Byte offset to the file header - # CRC CRC-32 of the uncompressed file - - # Maintain backward compatibility with the old protected attribute name. - @property - def _compresslevel(self): - return self.compress_level - - @_compresslevel.setter - def _compresslevel(self, value): - self.compress_level = value - - def __repr__(self): - result = ['<%s filename=%r' % (self.__class__.__name__, self.filename)] - if self.compress_type != ZIP_STORED: - result.append(' compress_type=%s' % - compressor_names.get(self.compress_type, - self.compress_type)) - hi = self.external_attr >> 16 - lo = self.external_attr & 0xFFFF - if hi: - result.append(' filemode=%r' % stat.filemode(hi)) - if lo: - result.append(' external_attr=%#x' % lo) - isdir = self.is_dir() - if not isdir or self.file_size: - result.append(' file_size=%r' % self.file_size) - if ((not isdir or self.compress_size) and - (self.compress_type != ZIP_STORED or - self.file_size != self.compress_size)): - result.append(' compress_size=%r' % self.compress_size) - result.append('>') - return ''.join(result) - - def FileHeader(self, zip64=None): - """Return the per-file header as a bytes object. - - When the optional zip64 arg is None rather than a bool, we will - decide based upon the file_size and compress_size, if known, - False otherwise. - """ - dt = self.date_time - dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] - dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2) - if self.flag_bits & _MASK_USE_DATA_DESCRIPTOR: - # Set these to zero because we write them after the file data - CRC = compress_size = file_size = 0 - else: - CRC = self.CRC - compress_size = self.compress_size - file_size = self.file_size - - extra = self.extra - - min_version = 0 - if zip64 is None: - # We always explicitly pass zip64 within this module.... This - # remains for anyone using ZipInfo.FileHeader as a public API. - zip64 = file_size > ZIP64_LIMIT or compress_size > ZIP64_LIMIT - if zip64: - fmt = '= 4: - tp, ln = unpack(' len(extra): - raise BadZipFile("Corrupt extra field %04x (size=%d)" % (tp, ln)) - if tp == 0x0001: - data = extra[4:ln+4] - # ZIP64 extension (large files and/or large archives) - try: - if self.file_size in (0xFFFF_FFFF_FFFF_FFFF, 0xFFFF_FFFF): - field = "File size" - self.file_size, = unpack(' 2107: - date_time = (2107, 12, 31, 23, 59, 59) - # Create ZipInfo instance to store file information - if arcname is None: - arcname = filename - arcname = os.path.normpath(os.path.splitdrive(arcname)[1]) - while arcname[0] in (os.sep, os.altsep): - arcname = arcname[1:] - if isdir: - arcname += '/' - zinfo = cls(arcname, date_time) - zinfo.external_attr = (st.st_mode & 0xFFFF) << 16 # Unix attributes - if isdir: - zinfo.file_size = 0 - zinfo.external_attr |= 0x10 # MS-DOS directory flag - else: - zinfo.file_size = st.st_size - - return zinfo - - def _for_archive(self, archive): - """Resolve suitable defaults from the archive. - - Resolve the date_time, compression attributes, and external attributes - to suitable defaults as used by :method:`ZipFile.writestr`. - - Return self. - """ - # gh-91279: Set the SOURCE_DATE_EPOCH to a specific timestamp - epoch = os.environ.get('SOURCE_DATE_EPOCH') - get_time = int(epoch) if epoch else time.time() - self.date_time = time.localtime(get_time)[:6] - - self.compress_type = archive.compression - self.compress_level = archive.compresslevel - if self.filename.endswith('/'): # pragma: no cover - self.external_attr = 0o40775 << 16 # drwxrwxr-x - self.external_attr |= 0x10 # MS-DOS directory flag - else: - self.external_attr = 0o600 << 16 # ?rw------- - return self - - def is_dir(self): - """Return True if this archive member is a directory.""" - if self.filename.endswith('/'): - return True - # The ZIP format specification requires to use forward slashes - # as the directory separator, but in practice some ZIP files - # created on Windows can use backward slashes. For compatibility - # with the extraction code which already handles this: - if os.path.altsep: - return self.filename.endswith((os.path.sep, os.path.altsep)) - return False - - -# ZIP encryption uses the CRC32 one-byte primitive for scrambling some -# internal keys. We noticed that a direct implementation is faster than -# relying on binascii.crc32(). - -_crctable = None -def _gen_crc(crc): - for j in range(8): - if crc & 1: - crc = (crc >> 1) ^ 0xEDB88320 - else: - crc >>= 1 - return crc - -# ZIP supports a password-based form of encryption. Even though known -# plaintext attacks have been found against it, it is still useful -# to be able to get data out of such a file. -# -# Usage: -# zd = _ZipDecrypter(mypwd) -# plain_bytes = zd(cypher_bytes) - -def _ZipDecrypter(pwd): - key0 = 305419896 - key1 = 591751049 - key2 = 878082192 - - global _crctable - if _crctable is None: - _crctable = list(map(_gen_crc, range(256))) - crctable = _crctable - - def crc32(ch, crc): - """Compute the CRC32 primitive on one byte.""" - return (crc >> 8) ^ crctable[(crc ^ ch) & 0xFF] - - def update_keys(c): - nonlocal key0, key1, key2 - key0 = crc32(c, key0) - key1 = (key1 + (key0 & 0xFF)) & 0xFFFFFFFF - key1 = (key1 * 134775813 + 1) & 0xFFFFFFFF - key2 = crc32(key1 >> 24, key2) - - for p in pwd: - update_keys(p) - - def decrypter(data): - """Decrypt a bytes object.""" - result = bytearray() - append = result.append - for c in data: - k = key2 | 2 - c ^= ((k * (k^1)) >> 8) & 0xFF - update_keys(c) - append(c) - return bytes(result) - - return decrypter - - -class LZMACompressor: - - def __init__(self): - self._comp = None - - def _init(self): - props = lzma._encode_filter_properties({'id': lzma.FILTER_LZMA1}) - self._comp = lzma.LZMACompressor(lzma.FORMAT_RAW, filters=[ - lzma._decode_filter_properties(lzma.FILTER_LZMA1, props) - ]) - return struct.pack('> 8) & 0xff - else: - # compare against the CRC otherwise - check_byte = (zipinfo.CRC >> 24) & 0xff - h = self._init_decrypter() - if h != check_byte: - raise RuntimeError("Bad password for file %r" % zipinfo.orig_filename) - - - def _init_decrypter(self): - self._decrypter = _ZipDecrypter(self._pwd) - # The first 12 bytes in the cypher stream is an encryption header - # used to strengthen the algorithm. The first 11 bytes are - # completely random, while the 12th contains the MSB of the CRC, - # or the MSB of the file time depending on the header type - # and is used to check the correctness of the password. - header = self._fileobj.read(12) - self._compress_left -= 12 - return self._decrypter(header)[11] - - def __repr__(self): - result = ['<%s.%s' % (self.__class__.__module__, - self.__class__.__qualname__)] - if not self.closed: - result.append(' name=%r' % (self.name,)) - if self._compress_type != ZIP_STORED: - result.append(' compress_type=%s' % - compressor_names.get(self._compress_type, - self._compress_type)) - else: - result.append(' [closed]') - result.append('>') - return ''.join(result) - - def readline(self, limit=-1): - """Read and return a line from the stream. - - If limit is specified, at most limit bytes will be read. - """ - - if limit < 0: - # Shortcut common case - newline found in buffer. - i = self._readbuffer.find(b'\n', self._offset) + 1 - if i > 0: - line = self._readbuffer[self._offset: i] - self._offset = i - return line - - return io.BufferedIOBase.readline(self, limit) - - def peek(self, n=1): - """Returns buffered bytes without advancing the position.""" - if n > len(self._readbuffer) - self._offset: - chunk = self.read(n) - if len(chunk) > self._offset: - self._readbuffer = chunk + self._readbuffer[self._offset:] - self._offset = 0 - else: - self._offset -= len(chunk) - - # Return up to 512 bytes to reduce allocation overhead for tight loops. - return self._readbuffer[self._offset: self._offset + 512] - - def readable(self): - if self.closed: - raise ValueError("I/O operation on closed file.") - return True - - def read(self, n=-1): - """Read and return up to n bytes. - If the argument is omitted, None, or negative, data is read and returned until EOF is reached. - """ - if self.closed: - raise ValueError("read from closed file.") - if n is None or n < 0: - buf = self._readbuffer[self._offset:] - self._readbuffer = b'' - self._offset = 0 - while not self._eof: - buf += self._read1(self.MAX_N) - return buf - - end = n + self._offset - if end < len(self._readbuffer): - buf = self._readbuffer[self._offset:end] - self._offset = end - return buf - - n = end - len(self._readbuffer) - buf = self._readbuffer[self._offset:] - self._readbuffer = b'' - self._offset = 0 - while n > 0 and not self._eof: - data = self._read1(n) - if n < len(data): - self._readbuffer = data - self._offset = n - buf += data[:n] - break - buf += data - n -= len(data) - return buf - - def _update_crc(self, newdata): - # Update the CRC using the given data. - if self._expected_crc is None: - # No need to compute the CRC if we don't have a reference value - return - self._running_crc = crc32(newdata, self._running_crc) - # Check the CRC if we're at the end of the file - if self._eof and self._running_crc != self._expected_crc: - raise BadZipFile("Bad CRC-32 for file %r" % self.name) - - def read1(self, n): - """Read up to n bytes with at most one read() system call.""" - - if n is None or n < 0: - buf = self._readbuffer[self._offset:] - self._readbuffer = b'' - self._offset = 0 - while not self._eof: - data = self._read1(self.MAX_N) - if data: - buf += data - break - return buf - - end = n + self._offset - if end < len(self._readbuffer): - buf = self._readbuffer[self._offset:end] - self._offset = end - return buf - - n = end - len(self._readbuffer) - buf = self._readbuffer[self._offset:] - self._readbuffer = b'' - self._offset = 0 - if n > 0: - while not self._eof: - data = self._read1(n) - if n < len(data): - self._readbuffer = data - self._offset = n - buf += data[:n] - break - if data: - buf += data - break - return buf - - def _read1(self, n): - # Read up to n compressed bytes with at most one read() system call, - # decrypt and decompress them. - if self._eof or n <= 0: - return b'' - - # Read from file. - if self._compress_type == ZIP_DEFLATED: - ## Handle unconsumed data. - data = self._decompressor.unconsumed_tail - if n > len(data): - data += self._read2(n - len(data)) - else: - data = self._read2(n) - - if self._compress_type == ZIP_STORED: - self._eof = self._compress_left <= 0 - elif self._compress_type == ZIP_DEFLATED: - n = max(n, self.MIN_READ_SIZE) - data = self._decompressor.decompress(data, n) - self._eof = (self._decompressor.eof or - self._compress_left <= 0 and - not self._decompressor.unconsumed_tail) - if self._eof: - data += self._decompressor.flush() - else: - data = self._decompressor.decompress(data) - self._eof = self._decompressor.eof or self._compress_left <= 0 - - data = data[:self._left] - self._left -= len(data) - if self._left <= 0: - self._eof = True - self._update_crc(data) - return data - - def _read2(self, n): - if self._compress_left <= 0: - return b'' - - n = max(n, self.MIN_READ_SIZE) - n = min(n, self._compress_left) - - data = self._fileobj.read(n) - self._compress_left -= len(data) - if not data: - raise EOFError - - if self._decrypter is not None: - data = self._decrypter(data) - return data - - def close(self): - try: - if self._close_fileobj: - self._fileobj.close() - finally: - super().close() - - def seekable(self): - if self.closed: - raise ValueError("I/O operation on closed file.") - return self._seekable - - def seek(self, offset, whence=os.SEEK_SET): - if self.closed: - raise ValueError("seek on closed file.") - if not self._seekable: - raise io.UnsupportedOperation("underlying stream is not seekable") - curr_pos = self.tell() - if whence == os.SEEK_SET: - new_pos = offset - elif whence == os.SEEK_CUR: - new_pos = curr_pos + offset - elif whence == os.SEEK_END: - new_pos = self._orig_file_size + offset - else: - raise ValueError("whence must be os.SEEK_SET (0), " - "os.SEEK_CUR (1), or os.SEEK_END (2)") - - if new_pos > self._orig_file_size: - new_pos = self._orig_file_size - - if new_pos < 0: - new_pos = 0 - - read_offset = new_pos - curr_pos - buff_offset = read_offset + self._offset - - if buff_offset >= 0 and buff_offset < len(self._readbuffer): - # Just move the _offset index if the new position is in the _readbuffer - self._offset = buff_offset - read_offset = 0 - # Fast seek uncompressed unencrypted file - elif self._compress_type == ZIP_STORED and self._decrypter is None and read_offset != 0: - # disable CRC checking after first seeking - it would be invalid - self._expected_crc = None - # seek actual file taking already buffered data into account - read_offset -= len(self._readbuffer) - self._offset - self._fileobj.seek(read_offset, os.SEEK_CUR) - self._left -= read_offset - self._compress_left -= read_offset - self._eof = self._left <= 0 - read_offset = 0 - # flush read buffer - self._readbuffer = b'' - self._offset = 0 - elif read_offset < 0: - # Position is before the current position. Reset the ZipExtFile - self._fileobj.seek(self._orig_compress_start) - self._running_crc = self._orig_start_crc - self._expected_crc = self._orig_crc - self._compress_left = self._orig_compress_size - self._left = self._orig_file_size - self._readbuffer = b'' - self._offset = 0 - self._decompressor = _get_decompressor(self._compress_type) - self._eof = False - read_offset = new_pos - if self._decrypter is not None: - self._init_decrypter() - - while read_offset > 0: - read_len = min(self.MAX_SEEK_READ, read_offset) - self.read(read_len) - read_offset -= read_len - - return self.tell() - - def tell(self): - if self.closed: - raise ValueError("tell on closed file.") - if not self._seekable: - raise io.UnsupportedOperation("underlying stream is not seekable") - filepos = self._orig_file_size - self._left - len(self._readbuffer) + self._offset - return filepos - - -class _ZipWriteFile(io.BufferedIOBase): - def __init__(self, zf, zinfo, zip64): - self._zinfo = zinfo - self._zip64 = zip64 - self._zipfile = zf - self._compressor = _get_compressor(zinfo.compress_type, - zinfo.compress_level) - self._file_size = 0 - self._compress_size = 0 - self._crc = 0 - - @property - def _fileobj(self): - return self._zipfile.fp - - @property - def name(self): - return self._zinfo.filename - - @property - def mode(self): - return 'wb' - - def writable(self): - return True - - def write(self, data): - if self.closed: - raise ValueError('I/O operation on closed file.') - - # Accept any data that supports the buffer protocol - if isinstance(data, (bytes, bytearray)): - nbytes = len(data) - else: - data = memoryview(data) - nbytes = data.nbytes - self._file_size += nbytes - - self._crc = crc32(data, self._crc) - if self._compressor: - data = self._compressor.compress(data) - self._compress_size += len(data) - self._fileobj.write(data) - return nbytes - - def close(self): - if self.closed: - return - try: - super().close() - # Flush any data from the compressor, and update header info - if self._compressor: - buf = self._compressor.flush() - self._compress_size += len(buf) - self._fileobj.write(buf) - self._zinfo.compress_size = self._compress_size - else: - self._zinfo.compress_size = self._file_size - self._zinfo.CRC = self._crc - self._zinfo.file_size = self._file_size - - if not self._zip64: - if self._file_size > ZIP64_LIMIT: - raise RuntimeError("File size too large, try using force_zip64") - if self._compress_size > ZIP64_LIMIT: - raise RuntimeError("Compressed size too large, try using force_zip64") - - # Write updated header info - if self._zinfo.flag_bits & _MASK_USE_DATA_DESCRIPTOR: - # Write CRC and file sizes after the file data - fmt = '') - return ''.join(result) - - def _RealGetContents(self): - """Read in the table of contents for the ZIP file.""" - fp = self.fp - try: - endrec = _EndRecData(fp) - except OSError: - raise BadZipFile("File is not a zip file") - if not endrec: - raise BadZipFile("File is not a zip file") - if self.debug > 1: - print(endrec) - self._comment = endrec[_ECD_COMMENT] # archive comment - - offset_cd, concat = _handle_prepended_data(endrec, self.debug) - - # self.start_dir: Position of start of central directory - self.start_dir = offset_cd + concat - - if self.start_dir < 0: - raise BadZipFile("Bad offset for central directory") - fp.seek(self.start_dir, 0) - size_cd = endrec[_ECD_SIZE] - data = fp.read(size_cd) - fp = io.BytesIO(data) - total = 0 - while total < size_cd: - centdir = fp.read(sizeCentralDir) - if len(centdir) != sizeCentralDir: - raise BadZipFile("Truncated central directory") - centdir = struct.unpack(structCentralDir, centdir) - if centdir[_CD_SIGNATURE] != stringCentralDir: - raise BadZipFile("Bad magic number for central directory") - if self.debug > 2: - print(centdir) - filename = fp.read(centdir[_CD_FILENAME_LENGTH]) - orig_filename_crc = crc32(filename) - flags = centdir[_CD_FLAG_BITS] - if flags & _MASK_UTF_FILENAME: - # UTF-8 file names extension - filename = filename.decode('utf-8') - else: - # Historical ZIP filename encoding - filename = filename.decode(self.metadata_encoding or 'cp437') - # Create ZipInfo instance to store file information - x = ZipInfo(filename) - x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH]) - x.comment = fp.read(centdir[_CD_COMMENT_LENGTH]) - x.header_offset = centdir[_CD_LOCAL_HEADER_OFFSET] - (x.create_version, x.create_system, x.extract_version, x.reserved, - x.flag_bits, x.compress_type, t, d, - x.CRC, x.compress_size, x.file_size) = centdir[1:12] - if x.extract_version > MAX_EXTRACT_VERSION: - raise NotImplementedError("zip file version %.1f" % - (x.extract_version / 10)) - x.volume, x.internal_attr, x.external_attr = centdir[15:18] - # Convert date/time code to (year, month, day, hour, min, sec) - x._raw_time = t - x.date_time = ( (d>>9)+1980, (d>>5)&0xF, d&0x1F, - t>>11, (t>>5)&0x3F, (t&0x1F) * 2 ) - x._decodeExtra(orig_filename_crc) - x.header_offset = x.header_offset + concat - self.filelist.append(x) - self.NameToInfo[x.filename] = x - - # update total bytes read from central directory - total = (total + sizeCentralDir + centdir[_CD_FILENAME_LENGTH] - + centdir[_CD_EXTRA_FIELD_LENGTH] - + centdir[_CD_COMMENT_LENGTH]) - - if self.debug > 2: - print("total", total) - - end_offset = self.start_dir - for zinfo in reversed(sorted(self.filelist, - key=lambda zinfo: zinfo.header_offset)): - zinfo._end_offset = end_offset - end_offset = zinfo.header_offset - - def namelist(self): - """Return a list of file names in the archive.""" - return [data.filename for data in self.filelist] - - def infolist(self): - """Return a list of class ZipInfo instances for files in the - archive.""" - return self.filelist - - def printdir(self, file=None): - """Print a table of contents for the zip file.""" - print("%-46s %19s %12s" % ("File Name", "Modified ", "Size"), - file=file) - for zinfo in self.filelist: - date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time[:6] - print("%-46s %s %12d" % (zinfo.filename, date, zinfo.file_size), - file=file) - - def testzip(self): - """Read all the files and check the CRC. - - Return None if all files could be read successfully, or the name - of the offending file otherwise.""" - chunk_size = 2 ** 20 - for zinfo in self.filelist: - try: - # Read by chunks, to avoid an OverflowError or a - # MemoryError with very large embedded files. - with self.open(zinfo.filename, "r") as f: - while f.read(chunk_size): # Check CRC-32 - pass - except BadZipFile: - return zinfo.filename - - def getinfo(self, name): - """Return the instance of ZipInfo given 'name'.""" - info = self.NameToInfo.get(name) - if info is None: - raise KeyError( - 'There is no item named %r in the archive' % name) - - return info - - def setpassword(self, pwd): - """Set default password for encrypted files.""" - if pwd and not isinstance(pwd, bytes): - raise TypeError("pwd: expected bytes, got %s" % type(pwd).__name__) - if pwd: - self.pwd = pwd - else: - self.pwd = None - - @property - def comment(self): - """The comment text associated with the ZIP file.""" - return self._comment - - @comment.setter - def comment(self, comment): - if not isinstance(comment, bytes): - raise TypeError("comment: expected bytes, got %s" % type(comment).__name__) - # check for valid comment length - if len(comment) > ZIP_MAX_COMMENT: - import warnings - warnings.warn('Archive comment is too long; truncating to %d bytes' - % ZIP_MAX_COMMENT, stacklevel=2) - comment = comment[:ZIP_MAX_COMMENT] - self._comment = comment - self._didModify = True - - def read(self, name, pwd=None): - """Return file bytes for name. 'pwd' is the password to decrypt - encrypted files.""" - with self.open(name, "r", pwd) as fp: - return fp.read() - - def open(self, name, mode="r", pwd=None, *, force_zip64=False): - """Return file-like object for 'name'. - - name is a string for the file name within the ZIP file, or a ZipInfo - object. - - mode should be 'r' to read a file already in the ZIP file, or 'w' to - write to a file newly added to the archive. - - pwd is the password to decrypt files (only used for reading). - - When writing, if the file size is not known in advance but may exceed - 2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large - files. If the size is known in advance, it is best to pass a ZipInfo - instance for name, with zinfo.file_size set. - """ - if mode not in {"r", "w"}: - raise ValueError('open() requires mode "r" or "w"') - if pwd and (mode == "w"): - raise ValueError("pwd is only supported for reading files") - if not self.fp: - raise ValueError( - "Attempt to use ZIP archive that was already closed") - - # Make sure we have an info object - if isinstance(name, ZipInfo): - # 'name' is already an info object - zinfo = name - elif mode == 'w': - zinfo = ZipInfo(name) - zinfo.compress_type = self.compression - zinfo.compress_level = self.compresslevel - else: - # Get info object for name - zinfo = self.getinfo(name) - - if mode == 'w': - return self._open_to_write(zinfo, force_zip64=force_zip64) - - if self._writing: - raise ValueError("Can't read from the ZIP file while there " - "is an open writing handle on it. " - "Close the writing handle before trying to read.") - - # Open for reading: - self._fileRefCnt += 1 - zef_file = _SharedFile(self.fp, zinfo.header_offset, - self._fpclose, self._lock, lambda: self._writing) - try: - # Skip the file header: - fheader = zef_file.read(sizeFileHeader) - if len(fheader) != sizeFileHeader: - raise BadZipFile("Truncated file header") - fheader = struct.unpack(structFileHeader, fheader) - if fheader[_FH_SIGNATURE] != stringFileHeader: - raise BadZipFile("Bad magic number for file header") - - fname = zef_file.read(fheader[_FH_FILENAME_LENGTH]) - if fheader[_FH_EXTRA_FIELD_LENGTH]: - zef_file.seek(fheader[_FH_EXTRA_FIELD_LENGTH], whence=1) - - if zinfo.flag_bits & _MASK_COMPRESSED_PATCH: - # Zip 2.7: compressed patched data - raise NotImplementedError("compressed patched data (flag bit 5)") - - if zinfo.flag_bits & _MASK_STRONG_ENCRYPTION: - # strong encryption - raise NotImplementedError("strong encryption (flag bit 6)") - - if fheader[_FH_GENERAL_PURPOSE_FLAG_BITS] & _MASK_UTF_FILENAME: - # UTF-8 filename - fname_str = fname.decode("utf-8") - else: - fname_str = fname.decode(self.metadata_encoding or "cp437") - - if fname_str != zinfo.orig_filename: - raise BadZipFile( - 'File name in directory %r and header %r differ.' - % (zinfo.orig_filename, fname)) - - if (zinfo._end_offset is not None and - zef_file.tell() + zinfo.compress_size > zinfo._end_offset): - if zinfo._end_offset == zinfo.header_offset: - import warnings - warnings.warn( - f"Overlapped entries: {zinfo.orig_filename!r} " - f"(possible zip bomb)", - skip_file_prefixes=(os.path.dirname(__file__),)) - else: - raise BadZipFile( - f"Overlapped entries: {zinfo.orig_filename!r} " - f"(possible zip bomb)") - - # check for encrypted flag & handle password - is_encrypted = zinfo.flag_bits & _MASK_ENCRYPTED - if is_encrypted: - if not pwd: - pwd = self.pwd - if pwd and not isinstance(pwd, bytes): - raise TypeError("pwd: expected bytes, got %s" % type(pwd).__name__) - if not pwd: - raise RuntimeError("File %r is encrypted, password " - "required for extraction" % name) - else: - pwd = None - - return ZipExtFile(zef_file, mode + 'b', zinfo, pwd, True) - except: - zef_file.close() - raise - - def _open_to_write(self, zinfo, force_zip64=False): - if force_zip64 and not self._allowZip64: - raise ValueError( - "force_zip64 is True, but allowZip64 was False when opening " - "the ZIP file." - ) - if self._writing: - raise ValueError("Can't write to the ZIP file while there is " - "another write handle open on it. " - "Close the first handle before opening another.") - - # Size and CRC are overwritten with correct data after processing the file - zinfo.compress_size = 0 - zinfo.CRC = 0 - - zinfo.flag_bits = 0x00 - if zinfo.compress_type == ZIP_LZMA: - # Compressed data includes an end-of-stream (EOS) marker - zinfo.flag_bits |= _MASK_COMPRESS_OPTION_1 - if not self._seekable: - zinfo.flag_bits |= _MASK_USE_DATA_DESCRIPTOR - - if not zinfo.external_attr: - zinfo.external_attr = 0o600 << 16 # permissions: ?rw------- - - # Compressed size can be larger than uncompressed size - zip64 = force_zip64 or (zinfo.file_size * 1.05 > ZIP64_LIMIT) - if not self._allowZip64 and zip64: - raise LargeZipFile("Filesize would require ZIP64 extensions") - - if self._seekable: - self.fp.seek(self.start_dir) - zinfo.header_offset = self.fp.tell() - - self._writecheck(zinfo) - self._didModify = True - - self.fp.write(zinfo.FileHeader(zip64)) - - self._writing = True - return _ZipWriteFile(self, zinfo, zip64) - - def extract(self, member, path=None, pwd=None): - """Extract a member from the archive to the current working directory, - using its full name. Its file information is extracted as accurately - as possible. 'member' may be a filename or a ZipInfo object. You can - specify a different directory using 'path'. You can specify the - password to decrypt the file using 'pwd'. - """ - if path is None: - path = os.getcwd() - else: - path = os.fspath(path) - - return self._extract_member(member, path, pwd) - - def extractall(self, path=None, members=None, pwd=None): - """Extract all members from the archive to the current working - directory. 'path' specifies a different directory to extract to. - 'members' is optional and must be a subset of the list returned - by namelist(). You can specify the password to decrypt all files - using 'pwd'. - """ - if members is None: - members = self.namelist() - - if path is None: - path = os.getcwd() - else: - path = os.fspath(path) - - for zipinfo in members: - self._extract_member(zipinfo, path, pwd) - - @classmethod - def _sanitize_windows_name(cls, arcname, pathsep): - """Replace bad characters and remove trailing dots from parts.""" - table = cls._windows_illegal_name_trans_table - if not table: - illegal = ':<>|"?*' - table = str.maketrans(illegal, '_' * len(illegal)) - cls._windows_illegal_name_trans_table = table - arcname = arcname.translate(table) - # remove trailing dots and spaces - arcname = (x.rstrip(' .') for x in arcname.split(pathsep)) - # rejoin, removing empty parts. - arcname = pathsep.join(x for x in arcname if x) - return arcname - - def _extract_member(self, member, targetpath, pwd): - """Extract the ZipInfo object 'member' to a physical - file on the path targetpath. - """ - if not isinstance(member, ZipInfo): - member = self.getinfo(member) - - # build the destination pathname, replacing - # forward slashes to platform specific separators. - arcname = member.filename.replace('/', os.path.sep) - - if os.path.altsep: - arcname = arcname.replace(os.path.altsep, os.path.sep) - # interpret absolute pathname as relative, remove drive letter or - # UNC path, redundant separators, "." and ".." components. - arcname = os.path.splitdrive(arcname)[1] - invalid_path_parts = ('', os.path.curdir, os.path.pardir) - arcname = os.path.sep.join(x for x in arcname.split(os.path.sep) - if x not in invalid_path_parts) - if os.path.sep == '\\': - # filter illegal characters on Windows - arcname = self._sanitize_windows_name(arcname, os.path.sep) - - if not arcname and not member.is_dir(): - raise ValueError("Empty filename.") - - targetpath = os.path.join(targetpath, arcname) - targetpath = os.path.normpath(targetpath) - - # Create all upper directories if necessary. - upperdirs = os.path.dirname(targetpath) - if upperdirs and not os.path.exists(upperdirs): - os.makedirs(upperdirs, exist_ok=True) - - if member.is_dir(): - if not os.path.isdir(targetpath): - try: - os.mkdir(targetpath) - except FileExistsError: - if not os.path.isdir(targetpath): - raise - return targetpath - - with self.open(member, pwd=pwd) as source, \ - open(targetpath, "wb") as target: - shutil.copyfileobj(source, target) - - return targetpath - - def _writecheck(self, zinfo): - """Check for errors before writing a file to the archive.""" - if zinfo.filename in self.NameToInfo: - import warnings - warnings.warn('Duplicate name: %r' % zinfo.filename, stacklevel=3) - if self.mode not in ('w', 'x', 'a'): - raise ValueError("write() requires mode 'w', 'x', or 'a'") - if not self.fp: - raise ValueError( - "Attempt to write ZIP archive that was already closed") - _check_compression(zinfo.compress_type) - if not self._allowZip64: - requires_zip64 = None - if len(self.filelist) >= ZIP_FILECOUNT_LIMIT: - requires_zip64 = "Files count" - elif zinfo.file_size > ZIP64_LIMIT: - requires_zip64 = "Filesize" - elif zinfo.header_offset > ZIP64_LIMIT: - requires_zip64 = "Zipfile size" - if requires_zip64: - raise LargeZipFile(requires_zip64 + - " would require ZIP64 extensions") - - def write(self, filename, arcname=None, - compress_type=None, compresslevel=None): - """Put the bytes from filename into the archive under the name - arcname.""" - if not self.fp: - raise ValueError( - "Attempt to write to ZIP archive that was already closed") - if self._writing: - raise ValueError( - "Can't write to ZIP archive while an open writing handle exists" - ) - - zinfo = ZipInfo.from_file(filename, arcname, - strict_timestamps=self._strict_timestamps) - - if zinfo.is_dir(): - zinfo.compress_size = 0 - zinfo.CRC = 0 - self.mkdir(zinfo) - else: - if compress_type is not None: - zinfo.compress_type = compress_type - else: - zinfo.compress_type = self.compression - - if compresslevel is not None: - zinfo.compress_level = compresslevel - else: - zinfo.compress_level = self.compresslevel - - with open(filename, "rb") as src, self.open(zinfo, 'w') as dest: - shutil.copyfileobj(src, dest, 1024*8) - - def writestr(self, zinfo_or_arcname, data, - compress_type=None, compresslevel=None): - """Write a file into the archive. The contents is 'data', which - may be either a 'str' or a 'bytes' instance; if it is a 'str', - it is encoded as UTF-8 first. - 'zinfo_or_arcname' is either a ZipInfo instance or - the name of the file in the archive.""" - if isinstance(data, str): - data = data.encode("utf-8") - if isinstance(zinfo_or_arcname, ZipInfo): - zinfo = zinfo_or_arcname - else: - zinfo = ZipInfo(zinfo_or_arcname)._for_archive(self) - - if not self.fp: - raise ValueError( - "Attempt to write to ZIP archive that was already closed") - if self._writing: - raise ValueError( - "Can't write to ZIP archive while an open writing handle exists." - ) - - if compress_type is not None: - zinfo.compress_type = compress_type - - if compresslevel is not None: - zinfo.compress_level = compresslevel - - zinfo.file_size = len(data) # Uncompressed size - with self._lock: - with self.open(zinfo, mode='w') as dest: - dest.write(data) - - def mkdir(self, zinfo_or_directory_name, mode=511): - """Creates a directory inside the zip archive.""" - if isinstance(zinfo_or_directory_name, ZipInfo): - zinfo = zinfo_or_directory_name - if not zinfo.is_dir(): - raise ValueError("The given ZipInfo does not describe a directory") - elif isinstance(zinfo_or_directory_name, str): - directory_name = zinfo_or_directory_name - if not directory_name.endswith("/"): - directory_name += "/" - zinfo = ZipInfo(directory_name) - zinfo.compress_size = 0 - zinfo.CRC = 0 - zinfo.external_attr = ((0o40000 | mode) & 0xFFFF) << 16 - zinfo.file_size = 0 - zinfo.external_attr |= 0x10 - else: - raise TypeError("Expected type str or ZipInfo") - - with self._lock: - if self._seekable: - self.fp.seek(self.start_dir) - zinfo.header_offset = self.fp.tell() # Start of header bytes - if zinfo.compress_type == ZIP_LZMA: - # Compressed data includes an end-of-stream (EOS) marker - zinfo.flag_bits |= _MASK_COMPRESS_OPTION_1 - - self._writecheck(zinfo) - self._didModify = True - - self.filelist.append(zinfo) - self.NameToInfo[zinfo.filename] = zinfo - self.fp.write(zinfo.FileHeader(False)) - self.start_dir = self.fp.tell() - - def __del__(self): - """Call the "close()" method in case the user forgot.""" - self.close() - - def close(self): - """Close the file, and for mode 'w', 'x' and 'a' write the ending - records.""" - if self.fp is None: - return - - if self._writing: - raise ValueError("Can't close the ZIP file while there is " - "an open writing handle on it. " - "Close the writing handle before closing the zip.") - - try: - if self.mode in ('w', 'x', 'a') and self._didModify: # write ending records - with self._lock: - if self._seekable: - self.fp.seek(self.start_dir) - self._write_end_record() - finally: - fp = self.fp - self.fp = None - self._fpclose(fp) - - def _write_end_record(self): - for zinfo in self.filelist: # write central directory - dt = zinfo.date_time - dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] - dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2) - extra = [] - if zinfo.file_size > ZIP64_LIMIT \ - or zinfo.compress_size > ZIP64_LIMIT: - extra.append(zinfo.file_size) - extra.append(zinfo.compress_size) - file_size = 0xffffffff - compress_size = 0xffffffff - else: - file_size = zinfo.file_size - compress_size = zinfo.compress_size - - if zinfo.header_offset > ZIP64_LIMIT: - extra.append(zinfo.header_offset) - header_offset = 0xffffffff - else: - header_offset = zinfo.header_offset - - extra_data = zinfo.extra - min_version = 0 - if extra: - # Append a ZIP64 field to the extra's - extra_data = _Extra.strip(extra_data, (1,)) - extra_data = struct.pack( - ' ZIP_FILECOUNT_LIMIT: - requires_zip64 = "Files count" - elif centDirOffset > ZIP64_LIMIT: - requires_zip64 = "Central directory offset" - elif centDirSize > ZIP64_LIMIT: - requires_zip64 = "Central directory size" - if requires_zip64: - # Need to write the ZIP64 end-of-archive records - if not self._allowZip64: - raise LargeZipFile(requires_zip64 + - " would require ZIP64 extensions") - zip64endrec = struct.pack( - structEndArchive64, stringEndArchive64, - sizeEndCentDir64 - 12, 45, 45, 0, 0, centDirCount, centDirCount, - centDirSize, centDirOffset) - self.fp.write(zip64endrec) - - zip64locrec = struct.pack( - structEndArchive64Locator, - stringEndArchive64Locator, 0, pos2, 1) - self.fp.write(zip64locrec) - centDirCount = min(centDirCount, 0xFFFF) - centDirSize = min(centDirSize, 0xFFFFFFFF) - centDirOffset = min(centDirOffset, 0xFFFFFFFF) - - endrec = struct.pack(structEndArchive, stringEndArchive, - 0, 0, centDirCount, centDirCount, - centDirSize, centDirOffset, len(self._comment)) - self.fp.write(endrec) - self.fp.write(self._comment) - if self.mode == "a": - self.fp.truncate() - self.fp.flush() - - def _fpclose(self, fp): - assert self._fileRefCnt > 0 - self._fileRefCnt -= 1 - if not self._fileRefCnt and not self._filePassed: - fp.close() - - -class PyZipFile(ZipFile): - """Class to create ZIP archives with Python library files and packages.""" - - def __init__(self, file, mode="r", compression=ZIP_STORED, - allowZip64=True, optimize=-1): - ZipFile.__init__(self, file, mode=mode, compression=compression, - allowZip64=allowZip64) - self._optimize = optimize - - def writepy(self, pathname, basename="", filterfunc=None): - """Add all files from "pathname" to the ZIP archive. - - If pathname is a package directory, search the directory and - all package subdirectories recursively for all *.py and enter - the modules into the archive. If pathname is a plain - directory, listdir *.py and enter all modules. Else, pathname - must be a Python *.py file and the module will be put into the - archive. Added modules are always module.pyc. - This method will compile the module.py into module.pyc if - necessary. - If filterfunc(pathname) is given, it is called with every argument. - When it is False, the file or directory is skipped. - """ - pathname = os.fspath(pathname) - if filterfunc and not filterfunc(pathname): - if self.debug: - label = 'path' if os.path.isdir(pathname) else 'file' - print('%s %r skipped by filterfunc' % (label, pathname)) - return - dir, name = os.path.split(pathname) - if os.path.isdir(pathname): - initname = os.path.join(pathname, "__init__.py") - if os.path.isfile(initname): - # This is a package directory, add it - if basename: - basename = "%s/%s" % (basename, name) - else: - basename = name - if self.debug: - print("Adding package in", pathname, "as", basename) - fname, arcname = self._get_codename(initname[0:-3], basename) - if self.debug: - print("Adding", arcname) - self.write(fname, arcname) - dirlist = sorted(os.listdir(pathname)) - dirlist.remove("__init__.py") - # Add all *.py files and package subdirectories - for filename in dirlist: - path = os.path.join(pathname, filename) - root, ext = os.path.splitext(filename) - if os.path.isdir(path): - if os.path.isfile(os.path.join(path, "__init__.py")): - # This is a package directory, add it - self.writepy(path, basename, - filterfunc=filterfunc) # Recursive call - elif ext == ".py": - if filterfunc and not filterfunc(path): - if self.debug: - print('file %r skipped by filterfunc' % path) - continue - fname, arcname = self._get_codename(path[0:-3], - basename) - if self.debug: - print("Adding", arcname) - self.write(fname, arcname) - else: - # This is NOT a package directory, add its files at top level - if self.debug: - print("Adding files from directory", pathname) - for filename in sorted(os.listdir(pathname)): - path = os.path.join(pathname, filename) - root, ext = os.path.splitext(filename) - if ext == ".py": - if filterfunc and not filterfunc(path): - if self.debug: - print('file %r skipped by filterfunc' % path) - continue - fname, arcname = self._get_codename(path[0:-3], - basename) - if self.debug: - print("Adding", arcname) - self.write(fname, arcname) - else: - if pathname[-3:] != ".py": - raise RuntimeError( - 'Files added with writepy() must end with ".py"') - fname, arcname = self._get_codename(pathname[0:-3], basename) - if self.debug: - print("Adding file", arcname) - self.write(fname, arcname) - - def _get_codename(self, pathname, basename): - """Return (filename, archivename) for the path. - - Given a module name path, return the correct file path and - archive name, compiling if necessary. For example, given - /python/lib/string, return (/python/lib/string.pyc, string). - """ - def _compile(file, optimize=-1): - import py_compile - if self.debug: - print("Compiling", file) - try: - py_compile.compile(file, doraise=True, optimize=optimize) - except py_compile.PyCompileError as err: - print(err.msg) - return False - return True - - file_py = pathname + ".py" - file_pyc = pathname + ".pyc" - pycache_opt0 = importlib.util.cache_from_source(file_py, optimization='') - pycache_opt1 = importlib.util.cache_from_source(file_py, optimization=1) - pycache_opt2 = importlib.util.cache_from_source(file_py, optimization=2) - if self._optimize == -1: - # legacy mode: use whatever file is present - if (os.path.isfile(file_pyc) and - os.stat(file_pyc).st_mtime >= os.stat(file_py).st_mtime): - # Use .pyc file. - arcname = fname = file_pyc - elif (os.path.isfile(pycache_opt0) and - os.stat(pycache_opt0).st_mtime >= os.stat(file_py).st_mtime): - # Use the __pycache__/*.pyc file, but write it to the legacy pyc - # file name in the archive. - fname = pycache_opt0 - arcname = file_pyc - elif (os.path.isfile(pycache_opt1) and - os.stat(pycache_opt1).st_mtime >= os.stat(file_py).st_mtime): - # Use the __pycache__/*.pyc file, but write it to the legacy pyc - # file name in the archive. - fname = pycache_opt1 - arcname = file_pyc - elif (os.path.isfile(pycache_opt2) and - os.stat(pycache_opt2).st_mtime >= os.stat(file_py).st_mtime): - # Use the __pycache__/*.pyc file, but write it to the legacy pyc - # file name in the archive. - fname = pycache_opt2 - arcname = file_pyc - else: - # Compile py into PEP 3147 pyc file. - if _compile(file_py): - if sys.flags.optimize == 0: - fname = pycache_opt0 - elif sys.flags.optimize == 1: - fname = pycache_opt1 - else: - fname = pycache_opt2 - arcname = file_pyc - else: - fname = arcname = file_py - else: - # new mode: use given optimization level - if self._optimize == 0: - fname = pycache_opt0 - arcname = file_pyc - else: - arcname = file_pyc - if self._optimize == 1: - fname = pycache_opt1 - elif self._optimize == 2: - fname = pycache_opt2 - else: - msg = "invalid value for 'optimize': {!r}".format(self._optimize) - raise ValueError(msg) - if not (os.path.isfile(fname) and - os.stat(fname).st_mtime >= os.stat(file_py).st_mtime): - if not _compile(file_py, optimize=self._optimize): - fname = arcname = file_py - archivename = os.path.split(arcname)[1] - if basename: - archivename = "%s/%s" % (basename, archivename) - return (fname, archivename) - - -def main(args=None): - import argparse - - description = 'A simple command-line interface for zipfile module.' - parser = argparse.ArgumentParser(description=description, color=True) - group = parser.add_mutually_exclusive_group(required=True) - group.add_argument('-l', '--list', metavar='', - help='Show listing of a zipfile') - group.add_argument('-e', '--extract', nargs=2, - metavar=('', ''), - help='Extract zipfile into target dir') - group.add_argument('-c', '--create', nargs='+', - metavar=('', ''), - help='Create zipfile from sources') - group.add_argument('-t', '--test', metavar='', - help='Test if a zipfile is valid') - parser.add_argument('--metadata-encoding', metavar='', - help='Specify encoding of member names for -l, -e and -t') - args = parser.parse_args(args) - - encoding = args.metadata_encoding - - if args.test is not None: - src = args.test - with ZipFile(src, 'r', metadata_encoding=encoding) as zf: - badfile = zf.testzip() - if badfile: - print("The following enclosed file is corrupted: {!r}".format(badfile)) - print("Done testing") - - elif args.list is not None: - src = args.list - with ZipFile(src, 'r', metadata_encoding=encoding) as zf: - zf.printdir() - - elif args.extract is not None: - src, curdir = args.extract - with ZipFile(src, 'r', metadata_encoding=encoding) as zf: - zf.extractall(curdir) - - elif args.create is not None: - if encoding: - print("Non-conforming encodings not supported with -c.", - file=sys.stderr) - sys.exit(1) - - zip_name = args.create.pop(0) - files = args.create - - def addToZip(zf, path, zippath): - if os.path.isfile(path): - zf.write(path, zippath, ZIP_DEFLATED) - elif os.path.isdir(path): - if zippath: - zf.write(path, zippath) - for nm in sorted(os.listdir(path)): - addToZip(zf, - os.path.join(path, nm), os.path.join(zippath, nm)) - # else: ignore - - with ZipFile(zip_name, 'w') as zf: - for path in files: - zippath = os.path.basename(path) - if not zippath: - zippath = os.path.basename(os.path.dirname(path)) - if zippath in ('', os.curdir, os.pardir): - zippath = '' - addToZip(zf, path, zippath) - - -from ._path import ( # noqa: E402 - Path, - - # used privately for tests - CompleteDirs, # noqa: F401 -) diff --git a/Python314_4_x64_Template/Lib/zipfile/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/zipfile/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 8f705cd7d..000000000 Binary files a/Python314_4_x64_Template/Lib/zipfile/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/zipfile/_path/__pycache__/__init__.cpython-314.pyc b/Python314_4_x64_Template/Lib/zipfile/_path/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index de7f5ea5b..000000000 Binary files a/Python314_4_x64_Template/Lib/zipfile/_path/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/Lib/zipfile/_path/__pycache__/glob.cpython-314.pyc b/Python314_4_x64_Template/Lib/zipfile/_path/__pycache__/glob.cpython-314.pyc deleted file mode 100644 index 3b5224788..000000000 Binary files a/Python314_4_x64_Template/Lib/zipfile/_path/__pycache__/glob.cpython-314.pyc and /dev/null differ diff --git a/Python314_4_x64_Template/python314.dll b/Python314_4_x64_Template/python314.dll deleted file mode 100644 index f7d8aa790..000000000 Binary files a/Python314_4_x64_Template/python314.dll and /dev/null differ diff --git a/Python314_6_x64_Template/DLLs/_asyncio.pyd b/Python314_6_x64_Template/DLLs/_asyncio.pyd new file mode 100644 index 000000000..e790e4e76 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_asyncio.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_bz2.pyd b/Python314_6_x64_Template/DLLs/_bz2.pyd new file mode 100644 index 000000000..4c16e920a Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_bz2.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_ctypes.pyd b/Python314_6_x64_Template/DLLs/_ctypes.pyd new file mode 100644 index 000000000..5c6efb000 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_ctypes.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_decimal.pyd b/Python314_6_x64_Template/DLLs/_decimal.pyd new file mode 100644 index 000000000..b6f7f97e5 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_decimal.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_elementtree.pyd b/Python314_6_x64_Template/DLLs/_elementtree.pyd new file mode 100644 index 000000000..410a1cc97 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_elementtree.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_hashlib.pyd b/Python314_6_x64_Template/DLLs/_hashlib.pyd new file mode 100644 index 000000000..f15a6aa6e Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_hashlib.pyd differ diff --git a/Python314_4_x64_Template/DLLs/_lzma.pyd b/Python314_6_x64_Template/DLLs/_lzma.pyd similarity index 79% rename from Python314_4_x64_Template/DLLs/_lzma.pyd rename to Python314_6_x64_Template/DLLs/_lzma.pyd index 23db27c1d..a368396ab 100644 Binary files a/Python314_4_x64_Template/DLLs/_lzma.pyd and b/Python314_6_x64_Template/DLLs/_lzma.pyd differ diff --git a/Python314_4_x64_Template/DLLs/_multiprocessing.pyd b/Python314_6_x64_Template/DLLs/_multiprocessing.pyd similarity index 77% rename from Python314_4_x64_Template/DLLs/_multiprocessing.pyd rename to Python314_6_x64_Template/DLLs/_multiprocessing.pyd index 3e59a953d..551a59a45 100644 Binary files a/Python314_4_x64_Template/DLLs/_multiprocessing.pyd and b/Python314_6_x64_Template/DLLs/_multiprocessing.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_overlapped.pyd b/Python314_6_x64_Template/DLLs/_overlapped.pyd new file mode 100644 index 000000000..fc3abf65a Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_overlapped.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_queue.pyd b/Python314_6_x64_Template/DLLs/_queue.pyd new file mode 100644 index 000000000..a510c8301 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_queue.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_remote_debugging.pyd b/Python314_6_x64_Template/DLLs/_remote_debugging.pyd new file mode 100644 index 000000000..6c1479647 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_remote_debugging.pyd differ diff --git a/Python314_4_x64_Template/DLLs/_socket.pyd b/Python314_6_x64_Template/DLLs/_socket.pyd similarity index 90% rename from Python314_4_x64_Template/DLLs/_socket.pyd rename to Python314_6_x64_Template/DLLs/_socket.pyd index 201263033..b4af3d6eb 100644 Binary files a/Python314_4_x64_Template/DLLs/_socket.pyd and b/Python314_6_x64_Template/DLLs/_socket.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_sqlite3.pyd b/Python314_6_x64_Template/DLLs/_sqlite3.pyd new file mode 100644 index 000000000..e9ce78a47 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_sqlite3.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_ssl.pyd b/Python314_6_x64_Template/DLLs/_ssl.pyd new file mode 100644 index 000000000..b9488ccf4 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_ssl.pyd differ diff --git a/Python314_6_x64_Template/DLLs/_uuid.pyd b/Python314_6_x64_Template/DLLs/_uuid.pyd new file mode 100644 index 000000000..3eab2898e Binary files /dev/null and b/Python314_6_x64_Template/DLLs/_uuid.pyd differ diff --git a/Python314_4_x64_Template/DLLs/_wmi.pyd b/Python314_6_x64_Template/DLLs/_wmi.pyd similarity index 78% rename from Python314_4_x64_Template/DLLs/_wmi.pyd rename to Python314_6_x64_Template/DLLs/_wmi.pyd index 4b6d7ead4..adfd3c5da 100644 Binary files a/Python314_4_x64_Template/DLLs/_wmi.pyd and b/Python314_6_x64_Template/DLLs/_wmi.pyd differ diff --git a/Python314_4_x64_Template/DLLs/_zoneinfo.pyd b/Python314_6_x64_Template/DLLs/_zoneinfo.pyd similarity index 79% rename from Python314_4_x64_Template/DLLs/_zoneinfo.pyd rename to Python314_6_x64_Template/DLLs/_zoneinfo.pyd index 4bd6423da..e38c739f1 100644 Binary files a/Python314_4_x64_Template/DLLs/_zoneinfo.pyd and b/Python314_6_x64_Template/DLLs/_zoneinfo.pyd differ diff --git a/Python314_4_x64_Template/DLLs/_zstd.pyd b/Python314_6_x64_Template/DLLs/_zstd.pyd similarity index 85% rename from Python314_4_x64_Template/DLLs/_zstd.pyd rename to Python314_6_x64_Template/DLLs/_zstd.pyd index 998975689..411d0bcc9 100644 Binary files a/Python314_4_x64_Template/DLLs/_zstd.pyd and b/Python314_6_x64_Template/DLLs/_zstd.pyd differ diff --git a/Python314_6_x64_Template/DLLs/libcrypto-3.dll b/Python314_6_x64_Template/DLLs/libcrypto-3.dll new file mode 100644 index 000000000..10160266c Binary files /dev/null and b/Python314_6_x64_Template/DLLs/libcrypto-3.dll differ diff --git a/Python314_4_x64_Template/DLLs/libffi-8.dll b/Python314_6_x64_Template/DLLs/libffi-8.dll similarity index 100% rename from Python314_4_x64_Template/DLLs/libffi-8.dll rename to Python314_6_x64_Template/DLLs/libffi-8.dll diff --git a/Python314_6_x64_Template/DLLs/libssl-3.dll b/Python314_6_x64_Template/DLLs/libssl-3.dll new file mode 100644 index 000000000..ab15eb87f Binary files /dev/null and b/Python314_6_x64_Template/DLLs/libssl-3.dll differ diff --git a/Python314_4_x64_Template/DLLs/py.ico b/Python314_6_x64_Template/DLLs/py.ico similarity index 100% rename from Python314_4_x64_Template/DLLs/py.ico rename to Python314_6_x64_Template/DLLs/py.ico diff --git a/Python314_4_x64_Template/DLLs/pyc.ico b/Python314_6_x64_Template/DLLs/pyc.ico similarity index 100% rename from Python314_4_x64_Template/DLLs/pyc.ico rename to Python314_6_x64_Template/DLLs/pyc.ico diff --git a/Python314_4_x64_Template/DLLs/pyd.ico b/Python314_6_x64_Template/DLLs/pyd.ico similarity index 100% rename from Python314_4_x64_Template/DLLs/pyd.ico rename to Python314_6_x64_Template/DLLs/pyd.ico diff --git a/Python314_6_x64_Template/DLLs/pyexpat.pyd b/Python314_6_x64_Template/DLLs/pyexpat.pyd new file mode 100644 index 000000000..3fb21f830 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/pyexpat.pyd differ diff --git a/Python314_4_x64_Template/DLLs/python_lib.cat b/Python314_6_x64_Template/DLLs/python_lib.cat similarity index 76% rename from Python314_4_x64_Template/DLLs/python_lib.cat rename to Python314_6_x64_Template/DLLs/python_lib.cat index 249f375c6..a0a337e6d 100644 Binary files a/Python314_4_x64_Template/DLLs/python_lib.cat and b/Python314_6_x64_Template/DLLs/python_lib.cat differ diff --git a/Python314_4_x64_Template/DLLs/select.pyd b/Python314_6_x64_Template/DLLs/select.pyd similarity index 78% rename from Python314_4_x64_Template/DLLs/select.pyd rename to Python314_6_x64_Template/DLLs/select.pyd index 0ff5305d1..0a95bb006 100644 Binary files a/Python314_4_x64_Template/DLLs/select.pyd and b/Python314_6_x64_Template/DLLs/select.pyd differ diff --git a/Python314_4_x64_Template/DLLs/sqlite3.dll b/Python314_6_x64_Template/DLLs/sqlite3.dll similarity index 99% rename from Python314_4_x64_Template/DLLs/sqlite3.dll rename to Python314_6_x64_Template/DLLs/sqlite3.dll index d669911e9..fa09ae29c 100644 Binary files a/Python314_4_x64_Template/DLLs/sqlite3.dll and b/Python314_6_x64_Template/DLLs/sqlite3.dll differ diff --git a/Python314_4_x64_Template/DLLs/unicodedata.pyd b/Python314_6_x64_Template/DLLs/unicodedata.pyd similarity index 94% rename from Python314_4_x64_Template/DLLs/unicodedata.pyd rename to Python314_6_x64_Template/DLLs/unicodedata.pyd index cda451306..12f38925e 100644 Binary files a/Python314_4_x64_Template/DLLs/unicodedata.pyd and b/Python314_6_x64_Template/DLLs/unicodedata.pyd differ diff --git a/Python314_6_x64_Template/DLLs/winsound.pyd b/Python314_6_x64_Template/DLLs/winsound.pyd new file mode 100644 index 000000000..305fd7c54 Binary files /dev/null and b/Python314_6_x64_Template/DLLs/winsound.pyd differ diff --git a/Python314_4_x64_Template/LICENSE.txt b/Python314_6_x64_Template/LICENSE.txt similarity index 100% rename from Python314_4_x64_Template/LICENSE.txt rename to Python314_6_x64_Template/LICENSE.txt diff --git a/Python314_4_x64_Template/Lib/__future__.py b/Python314_6_x64_Template/Lib/__future__.py similarity index 100% rename from Python314_4_x64_Template/Lib/__future__.py rename to Python314_6_x64_Template/Lib/__future__.py diff --git a/Python314_4_x64_Template/Lib/__hello__.py b/Python314_6_x64_Template/Lib/__hello__.py similarity index 100% rename from Python314_4_x64_Template/Lib/__hello__.py rename to Python314_6_x64_Template/Lib/__hello__.py diff --git a/Python314_4_x64_Template/Lib/__phello__/__init__.py b/Python314_6_x64_Template/Lib/__phello__/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/__phello__/__init__.py rename to Python314_6_x64_Template/Lib/__phello__/__init__.py diff --git a/Python314_4_x64_Template/Lib/__phello__/ham/__init__.py b/Python314_6_x64_Template/Lib/__phello__/ham/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/__phello__/ham/__init__.py rename to Python314_6_x64_Template/Lib/__phello__/ham/__init__.py diff --git a/Python314_4_x64_Template/Lib/__phello__/ham/eggs.py b/Python314_6_x64_Template/Lib/__phello__/ham/eggs.py similarity index 100% rename from Python314_4_x64_Template/Lib/__phello__/ham/eggs.py rename to Python314_6_x64_Template/Lib/__phello__/ham/eggs.py diff --git a/Python314_4_x64_Template/Lib/__phello__/spam.py b/Python314_6_x64_Template/Lib/__phello__/spam.py similarity index 100% rename from Python314_4_x64_Template/Lib/__phello__/spam.py rename to Python314_6_x64_Template/Lib/__phello__/spam.py diff --git a/Python314_4_x64_Template/Lib/__pycache__/__future__.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/__future__.cpython-314.pyc similarity index 92% rename from Python314_4_x64_Template/Lib/__pycache__/__future__.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/__future__.cpython-314.pyc index da3aae934..889612ef0 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/__future__.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/__future__.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/_colorize.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/_colorize.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/_colorize.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/_colorize.cpython-314.pyc index 78ec5407b..b99a2172c 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/_colorize.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/_colorize.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/_compat_pickle.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/_compat_pickle.cpython-314.pyc similarity index 95% rename from Python314_4_x64_Template/Lib/__pycache__/_compat_pickle.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/_compat_pickle.cpython-314.pyc index 91c3e52e0..4bb30f857 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/_compat_pickle.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/_compat_pickle.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/_markupbase.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/_markupbase.cpython-314.pyc similarity index 93% rename from Python314_4_x64_Template/Lib/__pycache__/_markupbase.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/_markupbase.cpython-314.pyc index 7a7ab8ac3..b637e7640 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/_markupbase.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/_markupbase.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/_opcode_metadata.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/_opcode_metadata.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/_opcode_metadata.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/_opcode_metadata.cpython-314.pyc index 1df3725b2..7eb9ce803 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/_opcode_metadata.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/_opcode_metadata.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/_py_warnings.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/_py_warnings.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/_py_warnings.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/_py_warnings.cpython-314.pyc index 3534c297b..8766cf81d 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/_py_warnings.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/_py_warnings.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/_weakrefset.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/_weakrefset.cpython-314.pyc similarity index 95% rename from Python314_4_x64_Template/Lib/__pycache__/_weakrefset.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/_weakrefset.cpython-314.pyc index 1d9b3ef11..34867abd3 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/_weakrefset.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/_weakrefset.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/annotationlib.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/annotationlib.cpython-314.pyc new file mode 100644 index 000000000..ffdfe7c51 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/annotationlib.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/argparse.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/argparse.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/argparse.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/argparse.cpython-314.pyc index a2246fa5e..f53af2ade 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/argparse.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/argparse.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/ast.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/ast.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/ast.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/ast.cpython-314.pyc index f381279da..0aaa012bd 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/ast.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/ast.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/base64.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/base64.cpython-314.pyc similarity index 89% rename from Python314_4_x64_Template/Lib/__pycache__/base64.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/base64.cpython-314.pyc index cfddd5f64..29961a325 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/base64.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/base64.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/bisect.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/bisect.cpython-314.pyc similarity index 82% rename from Python314_4_x64_Template/Lib/__pycache__/bisect.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/bisect.cpython-314.pyc index ba82e9b5a..8ad2076df 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/bisect.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/bisect.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/bz2.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/bz2.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/bz2.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/bz2.cpython-314.pyc index 4208949cd..08648dd97 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/bz2.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/bz2.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/calendar.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/calendar.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/calendar.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/calendar.cpython-314.pyc index 1e26b18e4..4ae65c497 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/calendar.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/calendar.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/codeop.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/codeop.cpython-314.pyc similarity index 95% rename from Python314_4_x64_Template/Lib/__pycache__/codeop.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/codeop.cpython-314.pyc index dcc8681d5..71edc966d 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/codeop.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/codeop.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/colorsys.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/colorsys.cpython-314.pyc similarity index 96% rename from Python314_4_x64_Template/Lib/__pycache__/colorsys.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/colorsys.cpython-314.pyc index 1c46876d7..2c23764f8 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/colorsys.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/colorsys.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/compileall.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/compileall.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/compileall.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/compileall.cpython-314.pyc index 61bfb9b2e..f3c13139f 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/compileall.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/compileall.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/configparser.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/configparser.cpython-314.pyc new file mode 100644 index 000000000..92955a313 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/configparser.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/contextlib.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/contextlib.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/contextlib.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/contextlib.cpython-314.pyc index 8b7b92847..861bc22ef 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/contextlib.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/contextlib.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/copy.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/copy.cpython-314.pyc similarity index 95% rename from Python314_4_x64_Template/Lib/__pycache__/copy.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/copy.cpython-314.pyc index a30cc3ffb..0c145cab8 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/copy.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/copy.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/copyreg.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/copyreg.cpython-314.pyc similarity index 94% rename from Python314_4_x64_Template/Lib/__pycache__/copyreg.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/copyreg.cpython-314.pyc index 8a6c03450..39b68e7c9 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/copyreg.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/copyreg.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/csv.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/csv.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/csv.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/csv.cpython-314.pyc index 908cfb60a..78ced094c 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/csv.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/csv.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/dataclasses.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/dataclasses.cpython-314.pyc similarity index 87% rename from Python314_4_x64_Template/Lib/__pycache__/dataclasses.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/dataclasses.cpython-314.pyc index 5603c90a2..f78ab65fe 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/dataclasses.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/dataclasses.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/datetime.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/datetime.cpython-314.pyc new file mode 100644 index 000000000..1ebcf69d5 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/datetime.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/decimal.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/decimal.cpython-314.pyc similarity index 89% rename from Python314_4_x64_Template/Lib/__pycache__/decimal.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/decimal.cpython-314.pyc index 58627f499..e0d1ee458 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/decimal.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/decimal.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/dis.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/dis.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/dis.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/dis.cpython-314.pyc index 13b215ec5..0d07b025e 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/dis.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/dis.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/enum.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/enum.cpython-314.pyc similarity index 92% rename from Python314_4_x64_Template/Lib/__pycache__/enum.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/enum.cpython-314.pyc index fee5f0f42..0106255c1 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/enum.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/enum.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/filecmp.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/filecmp.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/filecmp.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/filecmp.cpython-314.pyc index 18f1ae2d0..ee4ef313d 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/filecmp.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/filecmp.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/fnmatch.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/fnmatch.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/fnmatch.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/fnmatch.cpython-314.pyc index 0d5f3736f..fe5442037 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/fnmatch.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/fnmatch.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/fractions.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/fractions.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/fractions.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/fractions.cpython-314.pyc index 529da5187..9bb158a14 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/fractions.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/fractions.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/functools.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/functools.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/functools.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/functools.cpython-314.pyc index aa54d0a7d..3784e7f27 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/functools.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/functools.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/getpass.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/getpass.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/getpass.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/getpass.cpython-314.pyc index d38b7a2c2..945687884 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/getpass.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/getpass.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/gettext.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/gettext.cpython-314.pyc similarity index 96% rename from Python314_4_x64_Template/Lib/__pycache__/gettext.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/gettext.cpython-314.pyc index 2bfd3dad2..8de72997d 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/gettext.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/gettext.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/glob.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/glob.cpython-314.pyc new file mode 100644 index 000000000..dd94b4637 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/glob.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/gzip.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/gzip.cpython-314.pyc similarity index 81% rename from Python314_4_x64_Template/Lib/__pycache__/gzip.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/gzip.cpython-314.pyc index 896801b06..899a4e7f7 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/gzip.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/gzip.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/hashlib.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/hashlib.cpython-314.pyc similarity index 92% rename from Python314_4_x64_Template/Lib/__pycache__/hashlib.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/hashlib.cpython-314.pyc index 6627017a2..755e7f72b 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/hashlib.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/hashlib.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/heapq.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/heapq.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/heapq.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/heapq.cpython-314.pyc index 64720af06..2cd581653 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/heapq.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/heapq.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/hmac.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/hmac.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/hmac.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/hmac.cpython-314.pyc index f6eabe3e1..00a6a8fe1 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/hmac.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/hmac.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/inspect.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/inspect.cpython-314.pyc new file mode 100644 index 000000000..09668f397 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/inspect.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/ipaddress.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/ipaddress.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/ipaddress.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/ipaddress.cpython-314.pyc index 3d7995d40..106ac2550 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/ipaddress.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/ipaddress.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/keyword.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/keyword.cpython-314.pyc similarity index 83% rename from Python314_4_x64_Template/Lib/__pycache__/keyword.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/keyword.cpython-314.pyc index 879508cf6..3858dc78e 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/keyword.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/keyword.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/linecache.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/linecache.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/linecache.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/linecache.cpython-314.pyc index d0c3a823b..55568b9e3 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/linecache.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/linecache.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/locale.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/locale.cpython-314.pyc similarity index 76% rename from Python314_4_x64_Template/Lib/__pycache__/locale.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/locale.cpython-314.pyc index d08132202..9d59e0891 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/locale.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/locale.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/lzma.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/lzma.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/lzma.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/lzma.cpython-314.pyc index 792baade7..b156910d5 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/lzma.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/lzma.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/mimetypes.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/mimetypes.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/mimetypes.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/mimetypes.cpython-314.pyc index 5003647d6..41a18e393 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/mimetypes.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/mimetypes.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/numbers.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/numbers.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/numbers.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/numbers.cpython-314.pyc index 97ff45226..9885ddc49 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/numbers.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/numbers.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/opcode.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/opcode.cpython-314.pyc similarity index 93% rename from Python314_4_x64_Template/Lib/__pycache__/opcode.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/opcode.cpython-314.pyc index e42380ba1..7e27c48dc 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/opcode.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/opcode.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/operator.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/operator.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/operator.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/operator.cpython-314.pyc index 170a14fe9..0ecb39d93 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/operator.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/operator.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/optparse.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/optparse.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/optparse.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/optparse.cpython-314.pyc index 7e0057f2c..9cccfeebb 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/optparse.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/optparse.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/pickle.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/pickle.cpython-314.pyc similarity index 80% rename from Python314_4_x64_Template/Lib/__pycache__/pickle.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/pickle.cpython-314.pyc index 2f4cd098c..7924689b1 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/pickle.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/pickle.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/pkgutil.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/pkgutil.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/pkgutil.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/pkgutil.cpython-314.pyc index ba1666c80..c93a93d13 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/pkgutil.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/pkgutil.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/platform.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/platform.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/platform.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/platform.cpython-314.pyc index 710b3bad8..3e465f9a0 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/platform.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/platform.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/py_compile.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/py_compile.cpython-314.pyc similarity index 96% rename from Python314_4_x64_Template/Lib/__pycache__/py_compile.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/py_compile.cpython-314.pyc index d5eb79ffd..a0a3a0c10 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/py_compile.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/py_compile.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/queue.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/queue.cpython-314.pyc new file mode 100644 index 000000000..11ba4f852 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/queue.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/quopri.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/quopri.cpython-314.pyc similarity index 95% rename from Python314_4_x64_Template/Lib/__pycache__/quopri.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/quopri.cpython-314.pyc index 759b740c0..901340fed 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/quopri.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/quopri.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/random.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/random.cpython-314.pyc similarity index 92% rename from Python314_4_x64_Template/Lib/__pycache__/random.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/random.cpython-314.pyc index 002bc4bd0..b678f7743 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/random.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/random.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/reprlib.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/reprlib.cpython-314.pyc similarity index 96% rename from Python314_4_x64_Template/Lib/__pycache__/reprlib.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/reprlib.cpython-314.pyc index e6fe3883c..02a54d360 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/reprlib.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/reprlib.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/selectors.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/selectors.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/selectors.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/selectors.cpython-314.pyc index eed0c9ab2..b727db522 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/selectors.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/selectors.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/shlex.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/shlex.cpython-314.pyc similarity index 97% rename from Python314_4_x64_Template/Lib/__pycache__/shlex.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/shlex.cpython-314.pyc index fa2910ef9..2c620ef0c 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/shlex.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/shlex.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/shutil.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/shutil.cpython-314.pyc similarity index 88% rename from Python314_4_x64_Template/Lib/__pycache__/shutil.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/shutil.cpython-314.pyc index baf580004..081f99353 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/shutil.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/shutil.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/signal.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/signal.cpython-314.pyc similarity index 92% rename from Python314_4_x64_Template/Lib/__pycache__/signal.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/signal.cpython-314.pyc index 7977d47d2..caf070d4d 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/signal.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/signal.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/socket.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/socket.cpython-314.pyc similarity index 87% rename from Python314_4_x64_Template/Lib/__pycache__/socket.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/socket.cpython-314.pyc index 00ddc671d..a8164e3a1 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/socket.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/socket.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/socketserver.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/socketserver.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/socketserver.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/socketserver.cpython-314.pyc index e45c532bc..2d983c1ec 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/socketserver.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/socketserver.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/ssl.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/ssl.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/ssl.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/ssl.cpython-314.pyc index 9971aad99..b6dd5b763 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/ssl.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/ssl.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/stringprep.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/stringprep.cpython-314.pyc similarity index 89% rename from Python314_4_x64_Template/Lib/__pycache__/stringprep.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/stringprep.cpython-314.pyc index 8382876cf..ebd52e657 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/stringprep.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/stringprep.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/struct.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/struct.cpython-314.pyc new file mode 100644 index 000000000..df166c381 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/struct.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/subprocess.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/subprocess.cpython-314.pyc new file mode 100644 index 000000000..6678a57a2 Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/subprocess.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/tarfile.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/tarfile.cpython-314.pyc similarity index 79% rename from Python314_4_x64_Template/Lib/__pycache__/tarfile.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/tarfile.cpython-314.pyc index 48c8c8cb5..c3f745ffb 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/tarfile.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/tarfile.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/tempfile.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/tempfile.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/tempfile.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/tempfile.cpython-314.pyc index d76d26ab6..6d0690d84 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/tempfile.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/tempfile.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/textwrap.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/textwrap.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/textwrap.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/textwrap.cpython-314.pyc index f4335a915..91a5e0f92 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/textwrap.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/textwrap.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/threading.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/threading.cpython-314.pyc similarity index 99% rename from Python314_4_x64_Template/Lib/__pycache__/threading.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/threading.cpython-314.pyc index db6fd3460..6f644f407 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/threading.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/threading.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/token.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/token.cpython-314.pyc new file mode 100644 index 000000000..552b009ea Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/token.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/tokenize.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/tokenize.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/tokenize.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/tokenize.cpython-314.pyc index 20966aa5d..246d6fb46 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/tokenize.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/tokenize.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/__pycache__/traceback.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/traceback.cpython-314.pyc new file mode 100644 index 000000000..a4c1837cb Binary files /dev/null and b/Python314_6_x64_Template/Lib/__pycache__/traceback.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/types.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/types.cpython-314.pyc similarity index 84% rename from Python314_4_x64_Template/Lib/__pycache__/types.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/types.cpython-314.pyc index e814adf4b..685568929 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/types.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/types.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/typing.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/typing.cpython-314.pyc similarity index 85% rename from Python314_4_x64_Template/Lib/__pycache__/typing.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/typing.cpython-314.pyc index 358fe67c2..08e35d94c 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/typing.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/typing.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/uuid.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/uuid.cpython-314.pyc similarity index 92% rename from Python314_4_x64_Template/Lib/__pycache__/uuid.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/uuid.cpython-314.pyc index df6356089..ff397bf29 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/uuid.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/uuid.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/warnings.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/warnings.cpython-314.pyc similarity index 83% rename from Python314_4_x64_Template/Lib/__pycache__/warnings.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/warnings.cpython-314.pyc index 73b0445b3..253363f5d 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/warnings.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/warnings.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/__pycache__/weakref.cpython-314.pyc b/Python314_6_x64_Template/Lib/__pycache__/weakref.cpython-314.pyc similarity index 98% rename from Python314_4_x64_Template/Lib/__pycache__/weakref.cpython-314.pyc rename to Python314_6_x64_Template/Lib/__pycache__/weakref.cpython-314.pyc index 300df917a..4db274b8a 100644 Binary files a/Python314_4_x64_Template/Lib/__pycache__/weakref.cpython-314.pyc and b/Python314_6_x64_Template/Lib/__pycache__/weakref.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/_aix_support.py b/Python314_6_x64_Template/Lib/_aix_support.py similarity index 100% rename from Python314_4_x64_Template/Lib/_aix_support.py rename to Python314_6_x64_Template/Lib/_aix_support.py diff --git a/Python314_4_x64_Template/Lib/_android_support.py b/Python314_6_x64_Template/Lib/_android_support.py similarity index 100% rename from Python314_4_x64_Template/Lib/_android_support.py rename to Python314_6_x64_Template/Lib/_android_support.py diff --git a/Python314_4_x64_Template/Lib/_apple_support.py b/Python314_6_x64_Template/Lib/_apple_support.py similarity index 100% rename from Python314_4_x64_Template/Lib/_apple_support.py rename to Python314_6_x64_Template/Lib/_apple_support.py diff --git a/Python314_4_x64_Template/Lib/_ast_unparse.py b/Python314_6_x64_Template/Lib/_ast_unparse.py similarity index 100% rename from Python314_4_x64_Template/Lib/_ast_unparse.py rename to Python314_6_x64_Template/Lib/_ast_unparse.py diff --git a/Python314_4_x64_Template/Lib/_collections_abc.py b/Python314_6_x64_Template/Lib/_collections_abc.py similarity index 97% rename from Python314_4_x64_Template/Lib/_collections_abc.py rename to Python314_6_x64_Template/Lib/_collections_abc.py index 241d40d57..996b09437 100644 --- a/Python314_4_x64_Template/Lib/_collections_abc.py +++ b/Python314_6_x64_Template/Lib/_collections_abc.py @@ -461,8 +461,8 @@ def __subclasshook__(cls, C): class _CallableGenericAlias(GenericAlias): """ Represent `Callable[argtypes, resulttype]`. - This sets ``__args__`` to a tuple containing the flattened ``argtypes`` - followed by ``resulttype``. + This sets ``__args__`` to a tuple containing the flattened + ``argtypes`` followed by ``resulttype``. Example: ``Callable[[int, str], float]`` sets ``__args__`` to ``(int, str, float)``. @@ -927,8 +927,9 @@ def __delitem__(self, key): __marker = object() def pop(self, key, default=__marker): - '''D.pop(k[,d]) -> v, remove specified key and return the corresponding value. - If key is not found, d is returned if given, otherwise KeyError is raised. + '''D.pop(k[,d]) -> v, remove specified key and return the corresponding + value. If key is not found, d is returned if given, otherwise + KeyError is raised. ''' try: value = self[key] @@ -962,9 +963,12 @@ def clear(self): def update(self, other=(), /, **kwds): ''' D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. - If E present and has a .keys() method, does: for k in E.keys(): D[k] = E[k] - If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v - In either case, this is followed by: for k, v in F.items(): D[k] = v + If E present and has a .keys() method, does: + for k in E.keys(): D[k] = E[k] + If E present and lacks .keys() method, does: + for (k, v) in E: D[k] = v + In either case, this is followed by: + for k, v in F.items(): D[k] = v ''' if isinstance(other, Mapping): for key in other: @@ -1029,8 +1033,8 @@ def __reversed__(self): yield self[i] def index(self, value, start=0, stop=None): - '''S.index(value, [start, [stop]]) -> integer -- return first index of value. - Raises ValueError if the value is not present. + '''S.index(value, [start, [stop]]) -> integer -- return first index of + value. Raises ValueError if the value is not present. Supporting start and stop arguments is optional, but recommended. @@ -1138,15 +1142,16 @@ def reverse(self): self[i], self[n-i-1] = self[n-i-1], self[i] def extend(self, values): - 'S.extend(iterable) -- extend sequence by appending elements from the iterable' + """S.extend(iterable) -- extend sequence by appending elements from the + iterable""" if values is self: values = list(values) for v in values: self.append(v) def pop(self, index=-1): - '''S.pop([index]) -> item -- remove and return item at index (default last). - Raise IndexError if list is empty or index is out of range. + '''S.pop([index]) -> item -- remove and return item at index (default + last). Raise IndexError if list is empty or index is out of range. ''' v = self[index] del self[index] diff --git a/Python314_4_x64_Template/Lib/_colorize.py b/Python314_6_x64_Template/Lib/_colorize.py similarity index 100% rename from Python314_4_x64_Template/Lib/_colorize.py rename to Python314_6_x64_Template/Lib/_colorize.py diff --git a/Python314_4_x64_Template/Lib/_compat_pickle.py b/Python314_6_x64_Template/Lib/_compat_pickle.py similarity index 100% rename from Python314_4_x64_Template/Lib/_compat_pickle.py rename to Python314_6_x64_Template/Lib/_compat_pickle.py diff --git a/Python314_4_x64_Template/Lib/_ios_support.py b/Python314_6_x64_Template/Lib/_ios_support.py similarity index 100% rename from Python314_4_x64_Template/Lib/_ios_support.py rename to Python314_6_x64_Template/Lib/_ios_support.py diff --git a/Python314_4_x64_Template/Lib/_markupbase.py b/Python314_6_x64_Template/Lib/_markupbase.py similarity index 100% rename from Python314_4_x64_Template/Lib/_markupbase.py rename to Python314_6_x64_Template/Lib/_markupbase.py diff --git a/Python314_4_x64_Template/Lib/_opcode_metadata.py b/Python314_6_x64_Template/Lib/_opcode_metadata.py similarity index 100% rename from Python314_4_x64_Template/Lib/_opcode_metadata.py rename to Python314_6_x64_Template/Lib/_opcode_metadata.py diff --git a/Python314_4_x64_Template/Lib/_osx_support.py b/Python314_6_x64_Template/Lib/_osx_support.py similarity index 100% rename from Python314_4_x64_Template/Lib/_osx_support.py rename to Python314_6_x64_Template/Lib/_osx_support.py diff --git a/Python314_4_x64_Template/Lib/_py_abc.py b/Python314_6_x64_Template/Lib/_py_abc.py similarity index 100% rename from Python314_4_x64_Template/Lib/_py_abc.py rename to Python314_6_x64_Template/Lib/_py_abc.py diff --git a/Python314_4_x64_Template/Lib/_py_warnings.py b/Python314_6_x64_Template/Lib/_py_warnings.py similarity index 100% rename from Python314_4_x64_Template/Lib/_py_warnings.py rename to Python314_6_x64_Template/Lib/_py_warnings.py diff --git a/Python314_4_x64_Template/Lib/_pydatetime.py b/Python314_6_x64_Template/Lib/_pydatetime.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pydatetime.py rename to Python314_6_x64_Template/Lib/_pydatetime.py diff --git a/Python314_4_x64_Template/Lib/_pydecimal.py b/Python314_6_x64_Template/Lib/_pydecimal.py similarity index 98% rename from Python314_4_x64_Template/Lib/_pydecimal.py rename to Python314_6_x64_Template/Lib/_pydecimal.py index 97a629fe9..2277578df 100644 --- a/Python314_4_x64_Template/Lib/_pydecimal.py +++ b/Python314_6_x64_Template/Lib/_pydecimal.py @@ -104,8 +104,8 @@ class DecimalException(ArithmeticError): anything, though. handle -- Called when context._raise_error is called and the - trap_enabler is not set. First argument is self, second is the - context. More arguments can be given, those being after + trap_enabler is not set. First argument is self, second is + the context. More arguments can be given, those being after the explanation in _raise_error (For example, context._raise_error(NewError, '(-x)!', self._sign) would call NewError().handle(context, self._sign).) @@ -222,11 +222,12 @@ class InvalidContext(InvalidOperation): """Invalid context. Unknown rounding, for example. This occurs and signals invalid-operation if an invalid context was - detected during an operation. This can occur if contexts are not checked - on creation and either the precision exceeds the capability of the - underlying concrete representation or an unknown or unsupported rounding - was specified. These aspects of the context need only be checked when - the values are required to be used. The result is [0,qNaN]. + detected during an operation. This can occur if contexts are not + checked on creation and either the precision exceeds the capability of + the underlying concrete representation or an unknown or unsupported + rounding was specified. These aspects of the context need only be + checked when the values are required to be used. The result is + [0,qNaN]. """ def handle(self, context, *args): @@ -319,8 +320,9 @@ class FloatOperation(DecimalException, TypeError): Decimal.from_float() or context.create_decimal_from_float() do not set the flag. - Otherwise (the signal is trapped), only equality comparisons and explicit - conversions are silent. All other mixed operations raise FloatOperation. + Otherwise (the signal is trapped), only equality comparisons and + explicit conversions are silent. All other mixed operations raise + FloatOperation. """ # List of public traps and flags @@ -2898,8 +2900,8 @@ def compare_total(self, other, context=None): """Compares self to other using the abstract representations. This is not like the standard compare, which use their numerical - value. Note that a total ordering is defined for all possible abstract - representations. + value. Note that a total ordering is defined for all possible + abstract representations. """ other = _convert_other(other, raiseit=True) @@ -2970,7 +2972,8 @@ def compare_total(self, other, context=None): def compare_total_mag(self, other, context=None): """Compares self to other using abstract repr., ignoring sign. - Like compare_total, but with operand's sign ignored and assumed to be 0. + Like compare_total, but with operand's sign ignored and assumed to + be 0. """ other = _convert_other(other, raiseit=True) @@ -4107,9 +4110,9 @@ def create_decimal_from_float(self, f): def abs(self, a): """Returns the absolute value of the operand. - If the operand is negative, the result is the same as using the minus - operation on the operand. Otherwise, the result is the same as using - the plus operation on the operand. + If the operand is negative, the result is the same as using the + minus operation on the operand. Otherwise, the result is the same + as using the plus operation on the operand. >>> ExtendedContext.abs(Decimal('2.1')) Decimal('2.1') @@ -4165,16 +4168,17 @@ def canonical(self, a): def compare(self, a, b): """Compares values numerically. - If the signs of the operands differ, a value representing each operand - ('-1' if the operand is less than zero, '0' if the operand is zero or - negative zero, or '1' if the operand is greater than zero) is used in - place of that operand for the comparison instead of the actual - operand. + If the signs of the operands differ, a value representing each + operand ('-1' if the operand is less than zero, '0' if the operand + is zero or negative zero, or '1' if the operand is greater than + zero) is used in place of that operand for the comparison instead of + the actual operand. - The comparison is then effected by subtracting the second operand from - the first and then returning a value according to the result of the - subtraction: '-1' if the result is less than zero, '0' if the result is - zero or negative zero, or '1' if the result is greater than zero. + The comparison is then effected by subtracting the second operand + from the first and then returning a value according to the result of + the subtraction: '-1' if the result is less than zero, '0' if the + result is zero or negative zero, or '1' if the result is greater + than zero. >>> ExtendedContext.compare(Decimal('2.1'), Decimal('3')) Decimal('-1') @@ -4237,8 +4241,8 @@ def compare_total(self, a, b): """Compares two operands using their abstract representation. This is not like the standard compare, which use their numerical - value. Note that a total ordering is defined for all possible abstract - representations. + value. Note that a total ordering is defined for all possible + abstract representations. >>> ExtendedContext.compare_total(Decimal('12.73'), Decimal('127.9')) Decimal('-1') @@ -4265,7 +4269,8 @@ def compare_total(self, a, b): def compare_total_mag(self, a, b): """Compares two operands using their abstract representation ignoring sign. - Like compare_total, but with operand's sign ignored and assumed to be 0. + Like compare_total, but with operand's sign ignored and assumed to + be 0. """ a = _convert_other(a, raiseit=True) return a.compare_total_mag(b) @@ -4923,8 +4928,8 @@ def multiply(self, a, b): If either operand is a special value then the general rules apply. Otherwise, the operands are multiplied together - ('long multiplication'), resulting in a number which may be as long as - the sum of the lengths of the two operands. + ('long multiplication'), resulting in a number which may be as long + as the sum of the lengths of the two operands. >>> ExtendedContext.multiply(Decimal('1.20'), Decimal('3')) Decimal('3.60') @@ -5200,19 +5205,19 @@ def quantize(self, a, b): """Returns a value equal to 'a' (rounded), having the exponent of 'b'. The coefficient of the result is derived from that of the left-hand - operand. It may be rounded using the current rounding setting (if the - exponent is being increased), multiplied by a positive power of ten (if - the exponent is being decreased), or is unchanged (if the exponent is - already equal to that of the right-hand operand). + operand. It may be rounded using the current rounding setting (if + the exponent is being increased), multiplied by a positive power of + ten (if the exponent is being decreased), or is unchanged (if the + exponent is already equal to that of the right-hand operand). Unlike other operations, if the length of the coefficient after the quantize operation would be greater than precision then an Invalid - operation condition is raised. This guarantees that, unless there is - an error condition, the exponent of the result of a quantize is always - equal to that of the right-hand operand. + operation condition is raised. This guarantees that, unless there + is an error condition, the exponent of the result of a quantize is + always equal to that of the right-hand operand. - Also unlike other operations, quantize will never raise Underflow, even - if the result is subnormal and inexact. + Also unlike other operations, quantize will never raise Underflow, + even if the result is subnormal and inexact. >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001')) Decimal('2.170') @@ -5266,13 +5271,13 @@ def remainder(self, a, b): """Returns the remainder from integer division. The result is the residue of the dividend after the operation of - calculating integer division as described for divide-integer, rounded - to precision digits if necessary. The sign of the result, if - non-zero, is the same as that of the original dividend. + calculating integer division as described for divide-integer, + rounded to precision digits if necessary. The sign of the result, + if non-zero, is the same as that of the original dividend. - This operation will fail under the same conditions as integer division - (that is, if integer division on the same two operands would fail, the - remainder cannot be calculated). + This operation will fail under the same conditions as integer + division (that is, if integer division on the same two operands + would fail, the remainder cannot be calculated). >>> ExtendedContext.remainder(Decimal('2.1'), Decimal('3')) Decimal('2.1') @@ -5306,9 +5311,9 @@ def remainder_near(self, a, b): is chosen). If the result is equal to 0 then its sign will be the sign of a. - This operation will fail under the same conditions as integer division - (that is, if integer division on the same two operands would fail, the - remainder cannot be calculated). + This operation will fail under the same conditions as integer + division (that is, if integer division on the same two operands + would fail, the remainder cannot be calculated). >>> ExtendedContext.remainder_near(Decimal('2.1'), Decimal('3')) Decimal('-0.9') @@ -5366,8 +5371,8 @@ def rotate(self, a, b): def same_quantum(self, a, b): """Returns True if the two operands have the same exponent. - The result is never affected by either the sign or the coefficient of - either operand. + The result is never affected by either the sign or the coefficient + of either operand. >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001')) False @@ -5439,8 +5444,8 @@ def shift(self, a, b): def sqrt(self, a): """Square root of a non-negative number to context precision. - If the result must be inexact, it is rounded using the round-half-even - algorithm. + If the result must be inexact, it is rounded using the + round-half-even algorithm. >>> ExtendedContext.sqrt(Decimal('0')) Decimal('0') diff --git a/Python314_4_x64_Template/Lib/_pyio.py b/Python314_6_x64_Template/Lib/_pyio.py similarity index 96% rename from Python314_4_x64_Template/Lib/_pyio.py rename to Python314_6_x64_Template/Lib/_pyio.py index 116ce4f37..d0adef08e 100644 --- a/Python314_4_x64_Template/Lib/_pyio.py +++ b/Python314_6_x64_Template/Lib/_pyio.py @@ -83,27 +83,28 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None, wrapped. (If a file descriptor is given, it is closed when the returned I/O object is closed, unless closefd is set to False.) - mode is an optional string that specifies the mode in which the file is - opened. It defaults to 'r' which means open for reading in text mode. Other - common values are 'w' for writing (truncating the file if it already - exists), 'x' for exclusive creation of a new file, and 'a' for appending - (which on some Unix systems, means that all writes append to the end of the - file regardless of the current seek position). In text mode, if encoding is - not specified the encoding used is platform dependent. (For reading and - writing raw bytes use binary mode and leave encoding unspecified.) The - available modes are: - - ========= =============================================================== + mode is an optional string that specifies the mode in which the file + is opened. It defaults to 'r' which means open for reading in text + mode. Other common values are 'w' for writing (truncating the file if + it already exists), 'x' for exclusive creation of a new file, and + 'a' for appending (which on some Unix systems, means that all writes + append to the end of the file regardless of the current seek position). + In text mode, if encoding is not specified the encoding used is platform + dependent. (For reading and writing raw bytes use binary mode and leave + encoding unspecified.) The available modes are: + + ========= ========================================================== Character Meaning - --------- --------------------------------------------------------------- + --------- ---------------------------------------------------------- 'r' open for reading (default) 'w' open for writing, truncating the file first 'x' create a new file and open it for writing - 'a' open for writing, appending to the end of the file if it exists + 'a' open for writing, appending to the end of the file if it + exists 'b' binary mode 't' text mode (default) '+' open a disk file for updating (reading and writing) - ========= =============================================================== + ========= ========================================================== The default mode is 'rt' (open for reading text). For binary random access, the mode 'w+b' opens and truncates the file to 0 bytes, while @@ -111,23 +112,23 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None, raises an `FileExistsError` if the file already exists. Python distinguishes between files opened in binary and text modes, - even when the underlying operating system doesn't. Files opened in + even when the underlying operating system doesn't. Files opened in binary mode (appending 'b' to the mode argument) return contents as - bytes objects without any decoding. In text mode (the default, or when + bytes objects without any decoding. In text mode (the default, or when 't' is appended to the mode argument), the contents of the file are returned as strings, the bytes having been first decoded using a platform-dependent encoding or using the specified encoding if given. buffering is an optional integer used to set the buffering policy. - Pass 0 to switch buffering off (only allowed in binary mode), 1 to select - line buffering (only usable in text mode), and an integer > 1 to indicate - the size of a fixed-size chunk buffer. When no buffering argument is - given, the default buffering policy works as follows: + Pass 0 to switch buffering off (only allowed in binary mode), 1 to + select line buffering (only usable in text mode), and an integer > 1 to + indicate the size of a fixed-size chunk buffer. When no buffering + argument is given, the default buffering policy works as follows: - * Binary files are buffered in fixed-size chunks; the size of the buffer - is max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE) - when the device block size is available. - On most systems, the buffer will typically be 128 kilobytes long. + * Binary files are buffered in fixed-size chunks; the size of the buffer + is max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE) when the device + block size is available. + On most systems, the buffer will typically be 128 kilobytes long. * "Interactive" text files (files for which isatty() returns True) use line buffering. Other text files use the policy described above @@ -147,8 +148,8 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None, encoding error strings. newline is a string controlling how universal newlines works (it only - applies to text mode). It can be None, '', '\n', '\r', and '\r\n'. It works - as follows: + applies to text mode). It can be None, '', '\n', '\r', and '\r\n'. It + works as follows: * On input, if newline is None, universal newlines mode is enabled. Lines in the input can end in '\n', '\r', or '\r\n', and @@ -164,17 +165,17 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None, other legal values, any '\n' characters written are translated to the given string. - closedfd is a bool. If closefd is False, the underlying file descriptor will - be kept open when the file is closed. This does not work when a file name is - given and must be True in that case. + closedfd is a bool. If closefd is False, the underlying file descriptor + will be kept open when the file is closed. This does not work when + a file name is given and must be True in that case. The newly created file is non-inheritable. A custom opener can be used by passing a callable as *opener*. The - underlying file descriptor for the file object is then obtained by calling - *opener* with (*file*, *flags*). *opener* must return an open file - descriptor (passing os.open as *opener* results in functionality similar to - passing None). + underlying file descriptor for the file object is then obtained by + calling *opener* with (*file*, *flags*). *opener* must return an open + file descriptor (passing os.open as *opener* results in functionality + similar to passing None). open() returns a file object whose type depends on the mode, and through which the standard file operations such as reading and writing @@ -351,10 +352,12 @@ def seek(self, pos, whence=0): interpreted relative to the position indicated by whence. Values for whence are ints: - * 0 -- start of stream (the default); offset should be zero or positive + * 0 -- start of stream (the default); offset should be zero or + positive * 1 -- current stream position; offset may be negative * 2 -- end of stream; offset is usually negative - Some operating systems / file systems could provide additional values. + Some operating systems / file systems could provide additional + values. Return an int indicating the new absolute position. """ @@ -367,8 +370,8 @@ def tell(self): def truncate(self, pos=None): """Truncate file to size bytes. - Size defaults to the current IO position as reported by tell(). Return - the new size. + Size defaults to the current IO position as reported by tell(). + Return the new size. """ self._unsupported("truncate") @@ -492,7 +495,8 @@ def __exit__(self, *args): def fileno(self): """Returns underlying file descriptor (an int) if one exists. - An OSError is raised if the IO object does not use a file descriptor. + An OSError is raised if the IO object does not use a file + descriptor. """ self._unsupported("fileno") @@ -1485,17 +1489,22 @@ class FileIO(RawIOBase): _closefd = True def __init__(self, file, mode='r', closefd=True, opener=None): - """Open a file. The mode can be 'r' (default), 'w', 'x' or 'a' for reading, - writing, exclusive creation or appending. The file will be created if it - doesn't exist when opened for writing or appending; it will be truncated - when opened for writing. A FileExistsError will be raised if it already - exists when opened for creating. Opening a file for creating implies - writing so this mode behaves in a similar way to 'w'. Add a '+' to the mode - to allow simultaneous reading and writing. A custom opener can be used by - passing a callable as *opener*. The underlying file descriptor for the file - object is then obtained by calling opener with (*name*, *flags*). - *opener* must return an open file descriptor (passing os.open as *opener* - results in functionality similar to passing None). + """Open a file. + + The mode can be 'r' (default), 'w', 'x' or 'a' for reading, + writing, exclusive creation or appending. The file will be created + if it doesn't exist when opened for writing or appending; it will be + truncated when opened for writing. A FileExistsError will be raised + if it already exists when opened for creating. Opening a file for + creating implies writing so this mode behaves in a similar way to + 'w'. Add a '+' to the mode to allow simultaneous reading and + writing. + + A custom opener can be used by passing a callable as *opener*. + The underlying file descriptor for the file object is then obtained + by calling opener with (*name*, *flags*). *opener* must return + an open file descriptor (passing os.open as *opener* results in + functionality similar to passing None). """ if self._fd >= 0: # Have to close the existing file first. @@ -1733,8 +1742,8 @@ def write(self, b): """Write bytes b to file, return number written. Only makes one system call, so not all of the data may be written. - The number of bytes actually written is returned. In non-blocking mode, - returns None if the write would block. + The number of bytes actually written is returned. In non-blocking + mode, returns None if the write would block. """ self._checkClosed() self._checkWritable() @@ -1746,11 +1755,12 @@ def write(self, b): def seek(self, pos, whence=SEEK_SET): """Move to new file position. - Argument offset is a byte count. Optional argument whence defaults to - SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values - are SEEK_CUR or 1 (move relative to current position, positive or negative), - and SEEK_END or 2 (move relative to end of file, usually negative, although - many platforms allow seeking beyond the end of a file). + Argument offset is a byte count. Optional argument whence defaults + to SEEK_SET or 0 (offset from start of file, offset should be >= 0); + other values are SEEK_CUR or 1 (move relative to current position, + positive or negative), and SEEK_END or 2 (move relative to end of + file, usually negative, although many platforms allow seeking beyond + the end of a file). Note that not all file objects are seekable. """ @@ -1783,8 +1793,8 @@ def truncate(self, size=None): def close(self): """Close the file. - A closed file cannot be used for further I/O operations. close() may be - called more than once without error. + A closed file cannot be used for further I/O operations. + close() may be called more than once without error. """ if not self.closed: self._stat_atopen = None @@ -1879,8 +1889,8 @@ class TextIOBase(IOBase): def read(self, size=-1): """Read at most size characters from stream, where size is an int. - Read from underlying buffer until we have size characters or we hit EOF. - If size is negative or omitted, read until EOF. + Read from underlying buffer until we have size characters or we hit + EOF. If size is negative or omitted, read until EOF. Returns a string. """ diff --git a/Python314_4_x64_Template/Lib/_pylong.py b/Python314_6_x64_Template/Lib/_pylong.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pylong.py rename to Python314_6_x64_Template/Lib/_pylong.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/__init__.py b/Python314_6_x64_Template/Lib/_pyrepl/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/__init__.py rename to Python314_6_x64_Template/Lib/_pyrepl/__init__.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/__main__.py b/Python314_6_x64_Template/Lib/_pyrepl/__main__.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/__main__.py rename to Python314_6_x64_Template/Lib/_pyrepl/__main__.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/_module_completer.py b/Python314_6_x64_Template/Lib/_pyrepl/_module_completer.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/_module_completer.py rename to Python314_6_x64_Template/Lib/_pyrepl/_module_completer.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/_threading_handler.py b/Python314_6_x64_Template/Lib/_pyrepl/_threading_handler.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/_threading_handler.py rename to Python314_6_x64_Template/Lib/_pyrepl/_threading_handler.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/base_eventqueue.py b/Python314_6_x64_Template/Lib/_pyrepl/base_eventqueue.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/base_eventqueue.py rename to Python314_6_x64_Template/Lib/_pyrepl/base_eventqueue.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/commands.py b/Python314_6_x64_Template/Lib/_pyrepl/commands.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/commands.py rename to Python314_6_x64_Template/Lib/_pyrepl/commands.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/completing_reader.py b/Python314_6_x64_Template/Lib/_pyrepl/completing_reader.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/completing_reader.py rename to Python314_6_x64_Template/Lib/_pyrepl/completing_reader.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/console.py b/Python314_6_x64_Template/Lib/_pyrepl/console.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/console.py rename to Python314_6_x64_Template/Lib/_pyrepl/console.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/fancy_termios.py b/Python314_6_x64_Template/Lib/_pyrepl/fancy_termios.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/fancy_termios.py rename to Python314_6_x64_Template/Lib/_pyrepl/fancy_termios.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/historical_reader.py b/Python314_6_x64_Template/Lib/_pyrepl/historical_reader.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/historical_reader.py rename to Python314_6_x64_Template/Lib/_pyrepl/historical_reader.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/input.py b/Python314_6_x64_Template/Lib/_pyrepl/input.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/input.py rename to Python314_6_x64_Template/Lib/_pyrepl/input.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/keymap.py b/Python314_6_x64_Template/Lib/_pyrepl/keymap.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/keymap.py rename to Python314_6_x64_Template/Lib/_pyrepl/keymap.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/main.py b/Python314_6_x64_Template/Lib/_pyrepl/main.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/main.py rename to Python314_6_x64_Template/Lib/_pyrepl/main.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/mypy.ini b/Python314_6_x64_Template/Lib/_pyrepl/mypy.ini similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/mypy.ini rename to Python314_6_x64_Template/Lib/_pyrepl/mypy.ini diff --git a/Python314_4_x64_Template/Lib/_pyrepl/pager.py b/Python314_6_x64_Template/Lib/_pyrepl/pager.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/pager.py rename to Python314_6_x64_Template/Lib/_pyrepl/pager.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/reader.py b/Python314_6_x64_Template/Lib/_pyrepl/reader.py similarity index 99% rename from Python314_4_x64_Template/Lib/_pyrepl/reader.py rename to Python314_6_x64_Template/Lib/_pyrepl/reader.py index 9ab92f64d..f0116e742 100644 --- a/Python314_4_x64_Template/Lib/_pyrepl/reader.py +++ b/Python314_6_x64_Template/Lib/_pyrepl/reader.py @@ -644,6 +644,7 @@ def update_screen(self) -> None: def refresh(self) -> None: """Recalculate and refresh the screen.""" + self.console.height, self.console.width = self.console.getheightwidth() # this call sets up self.cxy, so call it first. self.screen = self.calc_screen() self.console.refresh(self.screen, self.cxy) diff --git a/Python314_4_x64_Template/Lib/_pyrepl/readline.py b/Python314_6_x64_Template/Lib/_pyrepl/readline.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/readline.py rename to Python314_6_x64_Template/Lib/_pyrepl/readline.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/simple_interact.py b/Python314_6_x64_Template/Lib/_pyrepl/simple_interact.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/simple_interact.py rename to Python314_6_x64_Template/Lib/_pyrepl/simple_interact.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/terminfo.py b/Python314_6_x64_Template/Lib/_pyrepl/terminfo.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/terminfo.py rename to Python314_6_x64_Template/Lib/_pyrepl/terminfo.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/trace.py b/Python314_6_x64_Template/Lib/_pyrepl/trace.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/trace.py rename to Python314_6_x64_Template/Lib/_pyrepl/trace.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/types.py b/Python314_6_x64_Template/Lib/_pyrepl/types.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/types.py rename to Python314_6_x64_Template/Lib/_pyrepl/types.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/unix_console.py b/Python314_6_x64_Template/Lib/_pyrepl/unix_console.py similarity index 99% rename from Python314_4_x64_Template/Lib/_pyrepl/unix_console.py rename to Python314_6_x64_Template/Lib/_pyrepl/unix_console.py index 937b5df6f..639d16db3 100644 --- a/Python314_4_x64_Template/Lib/_pyrepl/unix_console.py +++ b/Python314_6_x64_Template/Lib/_pyrepl/unix_console.py @@ -776,7 +776,6 @@ def __move_tall(self, x, y): self.__write_code(self._cup, y - self.__offset, x) def __sigwinch(self, signum, frame): - self.height, self.width = self.getheightwidth() self.event_queue.insert(Event("resize", None)) def __hide_cursor(self): diff --git a/Python314_4_x64_Template/Lib/_pyrepl/unix_eventqueue.py b/Python314_6_x64_Template/Lib/_pyrepl/unix_eventqueue.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/unix_eventqueue.py rename to Python314_6_x64_Template/Lib/_pyrepl/unix_eventqueue.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/utils.py b/Python314_6_x64_Template/Lib/_pyrepl/utils.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/utils.py rename to Python314_6_x64_Template/Lib/_pyrepl/utils.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/windows_console.py b/Python314_6_x64_Template/Lib/_pyrepl/windows_console.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/windows_console.py rename to Python314_6_x64_Template/Lib/_pyrepl/windows_console.py diff --git a/Python314_4_x64_Template/Lib/_pyrepl/windows_eventqueue.py b/Python314_6_x64_Template/Lib/_pyrepl/windows_eventqueue.py similarity index 100% rename from Python314_4_x64_Template/Lib/_pyrepl/windows_eventqueue.py rename to Python314_6_x64_Template/Lib/_pyrepl/windows_eventqueue.py diff --git a/Python314_4_x64_Template/Lib/_sitebuiltins.py b/Python314_6_x64_Template/Lib/_sitebuiltins.py similarity index 100% rename from Python314_4_x64_Template/Lib/_sitebuiltins.py rename to Python314_6_x64_Template/Lib/_sitebuiltins.py diff --git a/Python314_4_x64_Template/Lib/_strptime.py b/Python314_6_x64_Template/Lib/_strptime.py similarity index 100% rename from Python314_4_x64_Template/Lib/_strptime.py rename to Python314_6_x64_Template/Lib/_strptime.py diff --git a/Python314_4_x64_Template/Lib/_threading_local.py b/Python314_6_x64_Template/Lib/_threading_local.py similarity index 100% rename from Python314_4_x64_Template/Lib/_threading_local.py rename to Python314_6_x64_Template/Lib/_threading_local.py diff --git a/Python314_4_x64_Template/Lib/_weakrefset.py b/Python314_6_x64_Template/Lib/_weakrefset.py similarity index 100% rename from Python314_4_x64_Template/Lib/_weakrefset.py rename to Python314_6_x64_Template/Lib/_weakrefset.py diff --git a/Python314_4_x64_Template/Lib/abc.py b/Python314_6_x64_Template/Lib/abc.py similarity index 100% rename from Python314_4_x64_Template/Lib/abc.py rename to Python314_6_x64_Template/Lib/abc.py diff --git a/Python314_4_x64_Template/Lib/annotationlib.py b/Python314_6_x64_Template/Lib/annotationlib.py similarity index 97% rename from Python314_4_x64_Template/Lib/annotationlib.py rename to Python314_6_x64_Template/Lib/annotationlib.py index 9fee25641..5c9a08126 100644 --- a/Python314_4_x64_Template/Lib/annotationlib.py +++ b/Python314_6_x64_Template/Lib/annotationlib.py @@ -47,6 +47,7 @@ class Format(enum.IntEnum): "__cell__", "__owner__", "__stringifier_dict__", + "__resolved_str_cache__", ) @@ -94,6 +95,7 @@ def __init__( # value later. self.__code__ = None self.__ast_node__ = None + self.__resolved_str_cache__ = None def __init_subclass__(cls, /, *args, **kwds): raise TypeError("Cannot subclass ForwardRef") @@ -113,7 +115,7 @@ def evaluate( """ match format: case Format.STRING: - return self.__forward_arg__ + return self.__resolved_str__ case Format.VALUE: is_forwardref_format = False case Format.FORWARDREF: @@ -258,6 +260,24 @@ def __forward_arg__(self): "Attempted to access '__forward_arg__' on an uninitialized ForwardRef" ) + @property + def __resolved_str__(self): + # __forward_arg__ with any names from __extra_names__ replaced + # with the type_repr of the value they represent + if self.__resolved_str_cache__ is None: + resolved_str = self.__forward_arg__ + names = self.__extra_names__ + + if names: + visitor = _ExtraNameFixer(names) + ast_expr = ast.parse(resolved_str, mode="eval").body + node = visitor.visit(ast_expr) + resolved_str = ast.unparse(node) + + self.__resolved_str_cache__ = resolved_str + + return self.__resolved_str_cache__ + @property def __forward_code__(self): if self.__code__ is not None: @@ -321,7 +341,7 @@ def __repr__(self): extra.append(", is_class=True") if self.__owner__ is not None: extra.append(f", owner={self.__owner__!r}") - return f"ForwardRef({self.__forward_arg__!r}{''.join(extra)})" + return f"ForwardRef({self.__resolved_str__!r}{''.join(extra)})" _Template = type(t"") @@ -357,6 +377,7 @@ def __init__( self.__cell__ = cell self.__owner__ = owner self.__stringifier_dict__ = stringifier_dict + self.__resolved_str_cache__ = None # Needed for ForwardRef def __convert_to_ast(self, other): if isinstance(other, _Stringifier): @@ -1163,3 +1184,14 @@ def _get_dunder_annotations(obj): if not isinstance(ann, dict): raise ValueError(f"{obj!r}.__annotations__ is neither a dict nor None") return ann + + +class _ExtraNameFixer(ast.NodeTransformer): + """Fixer for __extra_names__ items in ForwardRef __repr__ and string evaluation""" + def __init__(self, extra_names): + self.extra_names = extra_names + + def visit_Name(self, node: ast.Name): + if (new_name := self.extra_names.get(node.id, _sentinel)) is not _sentinel: + node = ast.Name(id=type_repr(new_name)) + return node diff --git a/Python314_4_x64_Template/Lib/antigravity.py b/Python314_6_x64_Template/Lib/antigravity.py similarity index 100% rename from Python314_4_x64_Template/Lib/antigravity.py rename to Python314_6_x64_Template/Lib/antigravity.py diff --git a/Python314_4_x64_Template/Lib/argparse.py b/Python314_6_x64_Template/Lib/argparse.py similarity index 99% rename from Python314_4_x64_Template/Lib/argparse.py rename to Python314_6_x64_Template/Lib/argparse.py index 8cf856943..24f474056 100644 --- a/Python314_4_x64_Template/Lib/argparse.py +++ b/Python314_6_x64_Template/Lib/argparse.py @@ -2678,7 +2678,7 @@ def _check_value(self, action, value): if value not in choices: args = {'value': str(value), - 'choices': ', '.join(map(str, action.choices))} + 'choices': ', '.join(repr(str(choice)) for choice in action.choices)} msg = _('invalid choice: %(value)r (choose from %(choices)s)') if self.suggest_on_error and isinstance(value, str): diff --git a/Python314_4_x64_Template/Lib/ast.py b/Python314_6_x64_Template/Lib/ast.py similarity index 100% rename from Python314_4_x64_Template/Lib/ast.py rename to Python314_6_x64_Template/Lib/ast.py diff --git a/Python314_4_x64_Template/Lib/asyncio/__init__.py b/Python314_6_x64_Template/Lib/asyncio/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/__init__.py rename to Python314_6_x64_Template/Lib/asyncio/__init__.py diff --git a/Python314_6_x64_Template/Lib/asyncio/__main__.py b/Python314_6_x64_Template/Lib/asyncio/__main__.py new file mode 100644 index 000000000..44e14771b --- /dev/null +++ b/Python314_6_x64_Template/Lib/asyncio/__main__.py @@ -0,0 +1,245 @@ +import argparse +import ast +import asyncio +import asyncio.tools +import concurrent.futures +import contextvars +import inspect +import os +import site +import sys +import threading +import types +import warnings + +from _colorize import get_theme +from _pyrepl.console import InteractiveColoredConsole + +from . import futures + + +class AsyncIOInteractiveConsole(InteractiveColoredConsole): + + def __init__(self, locals, loop): + super().__init__(locals, filename="") + self.compile.compiler.flags |= ast.PyCF_ALLOW_TOP_LEVEL_AWAIT + + self.loop = loop + self.context = contextvars.copy_context() + + def runcode(self, code): + global return_code + future = concurrent.futures.Future() + + def callback(): + global return_code + global repl_future + global keyboard_interrupted + + repl_future = None + keyboard_interrupted = False + + func = types.FunctionType(code, self.locals) + try: + coro = func() + except SystemExit as se: + return_code = se.code + self.loop.stop() + return + except KeyboardInterrupt as ex: + keyboard_interrupted = True + future.set_exception(ex) + return + except BaseException as ex: + future.set_exception(ex) + return + + if not inspect.iscoroutine(coro): + future.set_result(coro) + return + + try: + repl_future = self.loop.create_task(coro, context=self.context) + futures._chain_future(repl_future, future) + except BaseException as exc: + future.set_exception(exc) + + self.loop.call_soon_threadsafe(callback, context=self.context) + + try: + return future.result() + except SystemExit as se: + return_code = se.code + self.loop.stop() + return + except BaseException: + if keyboard_interrupted: + if not CAN_USE_PYREPL: + self.write("\nKeyboardInterrupt\n") + else: + self.showtraceback() + return self.STATEMENT_FAILED + +class REPLThread(threading.Thread): + + def run(self): + global return_code + + try: + if not sys.flags.quiet: + banner = ( + f'asyncio REPL {sys.version} on {sys.platform}\n' + f'Use "await" directly instead of "asyncio.run()".\n' + f'Type "help", "copyright", "credits" or "license" ' + f'for more information.\n' + ) + + console.write(banner) + + if not sys.flags.isolated and (startup_path := os.getenv("PYTHONSTARTUP")): + sys.audit("cpython.run_startup", startup_path) + try: + import tokenize + with tokenize.open(startup_path) as f: + startup_code = compile(f.read(), startup_path, "exec") + exec(startup_code, console.locals) + except SystemExit: + raise + except BaseException: + console.showtraceback() + + ps1 = getattr(sys, "ps1", ">>> ") + if CAN_USE_PYREPL: + theme = get_theme().syntax + ps1 = f"{theme.prompt}{ps1}{theme.reset}" + console.write(f"{ps1}import asyncio\n") + + if CAN_USE_PYREPL: + from _pyrepl.simple_interact import ( + run_multiline_interactive_console, + ) + try: + run_multiline_interactive_console(console) + except SystemExit: + # expected via the `exit` and `quit` commands + pass + except BaseException: + # unexpected issue + console.showtraceback() + console.write("Internal error, ") + return_code = 1 + else: + console.interact(banner="", exitmsg="") + finally: + warnings.filterwarnings( + 'ignore', + message=r'^coroutine .* was never awaited$', + category=RuntimeWarning) + + loop.call_soon_threadsafe(loop.stop) + + def interrupt(self) -> None: + if not CAN_USE_PYREPL: + return + + from _pyrepl.simple_interact import _get_reader + r = _get_reader() + if r.threading_hook is not None: + r.threading_hook.add("") # type: ignore + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + prog="python3 -m asyncio", + description="Interactive asyncio shell and CLI tools", + color=True, + ) + subparsers = parser.add_subparsers(help="sub-commands", dest="command") + ps = subparsers.add_parser( + "ps", help="Display a table of all pending tasks in a process" + ) + ps.add_argument("pid", type=int, help="Process ID to inspect") + pstree = subparsers.add_parser( + "pstree", help="Display a tree of all pending tasks in a process" + ) + pstree.add_argument("pid", type=int, help="Process ID to inspect") + args = parser.parse_args() + match args.command: + case "ps": + asyncio.tools.display_awaited_by_tasks_table(args.pid) + sys.exit(0) + case "pstree": + asyncio.tools.display_awaited_by_tasks_tree(args.pid) + sys.exit(0) + case None: + pass # continue to the interactive shell + case _: + # shouldn't happen as an invalid command-line wouldn't parse + # but let's keep it for the next person adding a command + print(f"error: unhandled command {args.command}", file=sys.stderr) + parser.print_usage(file=sys.stderr) + sys.exit(1) + + sys.audit("cpython.run_stdin") + + if os.getenv('PYTHON_BASIC_REPL'): + CAN_USE_PYREPL = False + else: + from _pyrepl.main import CAN_USE_PYREPL + + return_code = 0 + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + + repl_locals = {'asyncio': asyncio} + for key in {'__name__', '__package__', + '__loader__', '__spec__', + '__builtins__', '__file__'}: + repl_locals[key] = locals()[key] + + console = AsyncIOInteractiveConsole(repl_locals, loop) + + repl_future = None + keyboard_interrupted = False + + try: + import readline # NoQA + except ImportError: + readline = None + + interactive_hook = getattr(sys, "__interactivehook__", None) + + if interactive_hook is not None: + sys.audit("cpython.run_interactivehook", interactive_hook) + interactive_hook() + + if interactive_hook is site.register_readline: + # Fix the completer function to use the interactive console locals + try: + import rlcompleter + except: + pass + else: + if readline is not None: + completer = rlcompleter.Completer(console.locals) + readline.set_completer(completer.complete) + + repl_thread = REPLThread(name="Interactive thread") + repl_thread.daemon = True + repl_thread.start() + + while True: + try: + loop.run_forever() + except KeyboardInterrupt: + keyboard_interrupted = True + if repl_future and not repl_future.done(): + repl_future.cancel() + repl_thread.interrupt() + continue + else: + break + + console.write('exiting asyncio REPL...\n') + loop.close() + sys.exit(return_code) diff --git a/Python314_4_x64_Template/Lib/asyncio/base_events.py b/Python314_6_x64_Template/Lib/asyncio/base_events.py similarity index 99% rename from Python314_4_x64_Template/Lib/asyncio/base_events.py rename to Python314_6_x64_Template/Lib/asyncio/base_events.py index b83b84181..6d1f1f843 100644 --- a/Python314_4_x64_Template/Lib/asyncio/base_events.py +++ b/Python314_6_x64_Template/Lib/asyncio/base_events.py @@ -483,10 +483,10 @@ def set_task_factory(self, factory): If factory is None the default task factory will be set. If factory is a callable, it should have a signature matching - '(loop, coro, **kwargs)', where 'loop' will be a reference to the active - event loop, 'coro' will be a coroutine object, and **kwargs will be - arbitrary keyword arguments that should be passed on to Task. - The callable must return a Task. + '(loop, coro, **kwargs)', where 'loop' will be a reference to the + active event loop, 'coro' will be a coroutine object, and **kwargs + will be arbitrary keyword arguments that should be passed on to + Task. The callable must return a Task. """ if factory is not None and not callable(factory): raise TypeError('task factory must be a callable or None') @@ -721,8 +721,8 @@ def run_until_complete(self, future): def stop(self): """Stop running the event loop. - Every callback already scheduled will still run. This simply informs - run_forever to stop looping after a complete iteration. + Every callback already scheduled will still run. This simply + informs run_forever to stop looping after a complete iteration. """ self._stopping = True @@ -963,7 +963,7 @@ async def _sock_sendfile_native(self, sock, file, offset, count): f"and file {file!r} combination") async def _sock_sendfile_fallback(self, sock, file, offset, count): - if offset: + if hasattr(file, 'seek'): file.seek(offset) blocksize = ( min(count, constants.SENDFILE_FALLBACK_READBUFFER_SIZE) @@ -1070,12 +1070,12 @@ async def create_connection( Create a streaming transport connection to a given internet host and port: socket family AF_INET or socket.AF_INET6 depending on host (or - family if specified), socket type SOCK_STREAM. protocol_factory must be - a callable returning a protocol instance. + family if specified), socket type SOCK_STREAM. protocol_factory must + be a callable returning a protocol instance. - This method is a coroutine which will try to establish the connection - in the background. When successful, the coroutine returns a - (transport, protocol) pair. + This method is a coroutine which will try to establish the + connection in the background. When successful, the coroutine + returns a (transport, protocol) pair. """ if server_hostname is not None and not ssl: raise ValueError('server_hostname is only meaningful with ssl') @@ -1278,7 +1278,6 @@ async def sendfile(self, transport, file, offset=0, count=None, raise RuntimeError( f"fallback is disabled and native sendfile is not " f"supported for transport {transport!r}") - return await self._sendfile_fallback(transport, file, offset, count) @@ -1287,7 +1286,7 @@ async def _sendfile_native(self, transp, file, offset, count): "sendfile syscall is not supported") async def _sendfile_fallback(self, transp, file, offset, count): - if offset: + if hasattr(file, 'seek'): file.seek(offset) blocksize = min(count, 16384) if count else 16384 buf = bytearray(blocksize) @@ -1543,11 +1542,11 @@ async def create_server( The host parameter can be a string, in that case the TCP server is bound to host and port. - The host parameter can also be a sequence of strings and in that case - the TCP server is bound to all hosts of the sequence. If a host - appears multiple times (possibly indirectly e.g. when hostnames - resolve to the same IP address), the server is only bound once to that - host. + The host parameter can also be a sequence of strings and in that + case the TCP server is bound to all hosts of the sequence. If + a host appears multiple times (possibly indirectly e.g. when + hostnames resolve to the same IP address), the server is only bound + once to that host. Return a Server object which can be used to stop the service. diff --git a/Python314_4_x64_Template/Lib/asyncio/base_futures.py b/Python314_6_x64_Template/Lib/asyncio/base_futures.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/base_futures.py rename to Python314_6_x64_Template/Lib/asyncio/base_futures.py diff --git a/Python314_4_x64_Template/Lib/asyncio/base_subprocess.py b/Python314_6_x64_Template/Lib/asyncio/base_subprocess.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/base_subprocess.py rename to Python314_6_x64_Template/Lib/asyncio/base_subprocess.py diff --git a/Python314_4_x64_Template/Lib/asyncio/base_tasks.py b/Python314_6_x64_Template/Lib/asyncio/base_tasks.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/base_tasks.py rename to Python314_6_x64_Template/Lib/asyncio/base_tasks.py diff --git a/Python314_4_x64_Template/Lib/asyncio/constants.py b/Python314_6_x64_Template/Lib/asyncio/constants.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/constants.py rename to Python314_6_x64_Template/Lib/asyncio/constants.py diff --git a/Python314_4_x64_Template/Lib/asyncio/coroutines.py b/Python314_6_x64_Template/Lib/asyncio/coroutines.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/coroutines.py rename to Python314_6_x64_Template/Lib/asyncio/coroutines.py index a51319cb7..6727065bb 100644 --- a/Python314_4_x64_Template/Lib/asyncio/coroutines.py +++ b/Python314_6_x64_Template/Lib/asyncio/coroutines.py @@ -18,8 +18,8 @@ def _is_debug_mode(): def iscoroutinefunction(func): - import warnings """Return True if func is a decorated coroutine function.""" + import warnings warnings._deprecated("asyncio.iscoroutinefunction", f"{warnings._DEPRECATED_MSG}; " "use inspect.iscoroutinefunction() instead", diff --git a/Python314_4_x64_Template/Lib/asyncio/events.py b/Python314_6_x64_Template/Lib/asyncio/events.py similarity index 98% rename from Python314_4_x64_Template/Lib/asyncio/events.py rename to Python314_6_x64_Template/Lib/asyncio/events.py index a7fb55982..42d8408a3 100644 --- a/Python314_4_x64_Template/Lib/asyncio/events.py +++ b/Python314_6_x64_Template/Lib/asyncio/events.py @@ -374,8 +374,8 @@ async def create_server( If host is an empty string or None all interfaces are assumed and a list of multiple sockets will be returned (most likely - one for IPv4 and another one for IPv6). The host parameter can also be - a sequence (e.g. list) of hosts to bind to. + one for IPv4 and another one for IPv6). The host parameter can also + be a sequence (e.g. list) of hosts to bind to. family can be set to either AF_INET or AF_INET6 to force the socket to use IPv4 or IPv6. If not set it will be determined @@ -415,8 +415,9 @@ async def create_server( start_serving set to True (default) causes the created server to start accepting connections immediately. When set to False, - the user should await Server.start_serving() or Server.serve_forever() - to make the server to start accepting connections. + the user should await Server.start_serving() or + Server.serve_forever() to make the server to start accepting + connections. """ raise NotImplementedError @@ -479,8 +480,9 @@ async def create_unix_server( start_serving set to True (default) causes the created server to start accepting connections immediately. When set to False, - the user should await Server.start_serving() or Server.serve_forever() - to make the server to start accepting connections. + the user should await Server.start_serving() or + Server.serve_forever() to make the server to start accepting + connections. """ raise NotImplementedError @@ -511,8 +513,8 @@ async def create_datagram_endpoint(self, protocol_factory, protocol_factory must be a callable returning a protocol instance. - socket family AF_INET, socket.AF_INET6 or socket.AF_UNIX depending on - host (or family if specified), socket type SOCK_DGRAM. + socket family AF_INET, socket.AF_INET6 or socket.AF_UNIX depending + on host (or family if specified), socket type SOCK_DGRAM. reuse_address tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to @@ -552,7 +554,8 @@ async def connect_read_pipe(self, protocol_factory, pipe): async def connect_write_pipe(self, protocol_factory, pipe): """Register write pipe in event loop. - protocol_factory should instantiate object with BaseProtocol interface. + protocol_factory should instantiate object with BaseProtocol + interface. Pipe is file-like object already switched to nonblocking. Return pair (transport, protocol), where transport support WriteTransport interface.""" diff --git a/Python314_4_x64_Template/Lib/asyncio/exceptions.py b/Python314_6_x64_Template/Lib/asyncio/exceptions.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/exceptions.py rename to Python314_6_x64_Template/Lib/asyncio/exceptions.py diff --git a/Python314_4_x64_Template/Lib/asyncio/format_helpers.py b/Python314_6_x64_Template/Lib/asyncio/format_helpers.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/format_helpers.py rename to Python314_6_x64_Template/Lib/asyncio/format_helpers.py diff --git a/Python314_4_x64_Template/Lib/asyncio/futures.py b/Python314_6_x64_Template/Lib/asyncio/futures.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/futures.py rename to Python314_6_x64_Template/Lib/asyncio/futures.py diff --git a/Python314_4_x64_Template/Lib/asyncio/graph.py b/Python314_6_x64_Template/Lib/asyncio/graph.py similarity index 95% rename from Python314_4_x64_Template/Lib/asyncio/graph.py rename to Python314_6_x64_Template/Lib/asyncio/graph.py index b5bfeb163..35f7fa621 100644 --- a/Python314_4_x64_Template/Lib/asyncio/graph.py +++ b/Python314_6_x64_Template/Lib/asyncio/graph.py @@ -112,13 +112,13 @@ def capture_call_graph( optional keyword-only 'depth' argument can be used to skip the specified number of frames from top of the stack. - If the optional keyword-only 'limit' argument is provided, each call stack - in the resulting graph is truncated to include at most ``abs(limit)`` - entries. If 'limit' is positive, the entries left are the closest to - the invocation point. If 'limit' is negative, the topmost entries are - left. If 'limit' is omitted or None, all entries are present. - If 'limit' is 0, the call stack is not captured at all, only - "awaited by" information is present. + If the optional keyword-only 'limit' argument is provided, each call + stack in the resulting graph is truncated to include at most + ``abs(limit)`` entries. If 'limit' is positive, the entries left are + the closest to the invocation point. If 'limit' is negative, the + topmost entries are left. If 'limit' is omitted or None, all entries + are present. If 'limit' is 0, the call stack is not captured at all, + only "awaited by" information is present. """ loop = events._get_running_loop() diff --git a/Python314_4_x64_Template/Lib/asyncio/locks.py b/Python314_6_x64_Template/Lib/asyncio/locks.py similarity index 97% rename from Python314_4_x64_Template/Lib/asyncio/locks.py rename to Python314_6_x64_Template/Lib/asyncio/locks.py index fa3a94764..1592d30ed 100644 --- a/Python314_4_x64_Template/Lib/asyncio/locks.py +++ b/Python314_6_x64_Template/Lib/asyncio/locks.py @@ -158,10 +158,10 @@ def _wake_up_first(self): class Event(mixins._LoopBoundMixin): """Asynchronous equivalent to threading.Event. - Class implementing event objects. An event manages a flag that can be set - to true with the set() method and reset to false with the clear() method. - The wait() method blocks until the flag is true. The flag is initially - false. + Class implementing event objects. An event manages a flag that can be + set to true with the set() method and reset to false with the clear() + method. The wait() method blocks until the flag is true. The flag is + initially false. """ def __init__(self): @@ -353,9 +353,9 @@ class Semaphore(_ContextManagerMixin, mixins._LoopBoundMixin): """A Semaphore implementation. A semaphore manages an internal counter which is decremented by each - acquire() call and incremented by each release() call. The counter - can never go below zero; when acquire() finds that it is zero, it blocks, - waiting until some other thread calls release(). + acquire() call and incremented by each release() call. The counter + can never go below zero; when acquire() finds that it is zero, it + blocks, waiting until some other thread calls release(). Semaphores also support the context management protocol. @@ -511,8 +511,8 @@ async def __aexit__(self, *args): async def wait(self): """Wait for the barrier. - When the specified number of tasks have started waiting, they are all - simultaneously awoken. + When the specified number of tasks have started waiting, they are + all simultaneously awoken. Returns an unique and individual index number from 0 to 'parties-1'. """ async with self._cond: diff --git a/Python314_4_x64_Template/Lib/asyncio/log.py b/Python314_6_x64_Template/Lib/asyncio/log.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/log.py rename to Python314_6_x64_Template/Lib/asyncio/log.py diff --git a/Python314_4_x64_Template/Lib/asyncio/mixins.py b/Python314_6_x64_Template/Lib/asyncio/mixins.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/mixins.py rename to Python314_6_x64_Template/Lib/asyncio/mixins.py diff --git a/Python314_4_x64_Template/Lib/asyncio/proactor_events.py b/Python314_6_x64_Template/Lib/asyncio/proactor_events.py similarity index 99% rename from Python314_4_x64_Template/Lib/asyncio/proactor_events.py rename to Python314_6_x64_Template/Lib/asyncio/proactor_events.py index f404273c3..6b94975d0 100644 --- a/Python314_4_x64_Template/Lib/asyncio/proactor_events.py +++ b/Python314_6_x64_Template/Lib/asyncio/proactor_events.py @@ -756,8 +756,7 @@ async def _sock_sendfile_native(self, sock, file, offset, count): offset += blocksize total_sent += blocksize finally: - if total_sent > 0: - file.seek(offset) + file.seek(offset) async def _sendfile_native(self, transp, file, offset, count): resume_reading = transp.is_reading() diff --git a/Python314_4_x64_Template/Lib/asyncio/protocols.py b/Python314_6_x64_Template/Lib/asyncio/protocols.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/protocols.py rename to Python314_6_x64_Template/Lib/asyncio/protocols.py diff --git a/Python314_4_x64_Template/Lib/asyncio/queues.py b/Python314_6_x64_Template/Lib/asyncio/queues.py similarity index 92% rename from Python314_4_x64_Template/Lib/asyncio/queues.py rename to Python314_6_x64_Template/Lib/asyncio/queues.py index 756216fac..30004f2bc 100644 --- a/Python314_4_x64_Template/Lib/asyncio/queues.py +++ b/Python314_6_x64_Template/Lib/asyncio/queues.py @@ -33,9 +33,9 @@ class QueueShutDown(Exception): class Queue(mixins._LoopBoundMixin): """A queue, useful for coordinating producer and consumer coroutines. - If maxsize is less than or equal to zero, the queue size is infinite. If it - is an integer greater than 0, then "await put()" will block when the - queue reaches maxsize, until an item is removed by get(). + If maxsize is less than or equal to zero, the queue size is infinite. + If it is an integer greater than 0, then "await put()" will block when + the queue reaches maxsize, until an item is removed by get(). Unlike queue.Queue, you can reliably know this Queue's size with qsize(), since your single-threaded asyncio application won't be @@ -174,8 +174,8 @@ async def get(self): If queue is empty, wait until an item is available. - Raises QueueShutDown if the queue has been shut down and is empty, or - if the queue has been shut down immediately. + Raises QueueShutDown if the queue has been shut down and is empty, + or if the queue has been shut down immediately. """ while self.empty(): if self._is_shutdown and self.empty(): @@ -203,10 +203,11 @@ async def get(self): def get_nowait(self): """Remove and return an item from the queue. - Return an item if one is immediately available, else raise QueueEmpty. + Return an item if one is immediately available, else raise + QueueEmpty. - Raises QueueShutDown if the queue has been shut down and is empty, or - if the queue has been shut down immediately. + Raises QueueShutDown if the queue has been shut down and is empty, + or if the queue has been shut down immediately. """ if self.empty(): if self._is_shutdown: @@ -223,12 +224,12 @@ def task_done(self): a subsequent call to task_done() tells the queue that the processing on the task is complete. - If a join() is currently blocking, it will resume when all items have - been processed (meaning that a task_done() call was received for every - item that had been put() into the queue). + If a join() is currently blocking, it will resume when all items + have been processed (meaning that a task_done() call was received + for every item that had been put() into the queue). - Raises ValueError if called more times than there were items placed in - the queue. + Raises ValueError if called more times than there were items placed + in the queue. """ if self._unfinished_tasks <= 0: raise ValueError('task_done() called too many times') @@ -239,10 +240,11 @@ def task_done(self): async def join(self): """Block until all items in the queue have been gotten and processed. - The count of unfinished tasks goes up whenever an item is added to the - queue. The count goes down whenever a consumer calls task_done() to - indicate that the item was retrieved and all work on it is complete. - When the count of unfinished tasks drops to zero, join() unblocks. + The count of unfinished tasks goes up whenever an item is added to + the queue. The count goes down whenever a consumer calls + task_done() to indicate that the item was retrieved and all work on + it is complete. When the count of unfinished tasks drops to zero, + join() unblocks. """ if self._unfinished_tasks > 0: await self._finished.wait() diff --git a/Python314_4_x64_Template/Lib/asyncio/runners.py b/Python314_6_x64_Template/Lib/asyncio/runners.py similarity index 99% rename from Python314_4_x64_Template/Lib/asyncio/runners.py rename to Python314_6_x64_Template/Lib/asyncio/runners.py index ba37e003a..774a31756 100644 --- a/Python314_4_x64_Template/Lib/asyncio/runners.py +++ b/Python314_6_x64_Template/Lib/asyncio/runners.py @@ -35,7 +35,8 @@ class Runner: with asyncio.Runner(debug=True) as runner: runner.run(main()) - The run() method can be called multiple times within the runner's context. + The run() method can be called multiple times within the runner's + context. This can be useful for interactive console (e.g. IPython), unittest runners, console tools, -- everywhere when async code diff --git a/Python314_4_x64_Template/Lib/asyncio/selector_events.py b/Python314_6_x64_Template/Lib/asyncio/selector_events.py similarity index 97% rename from Python314_4_x64_Template/Lib/asyncio/selector_events.py rename to Python314_6_x64_Template/Lib/asyncio/selector_events.py index ff7e16df3..7c2062e3d 100644 --- a/Python314_4_x64_Template/Lib/asyncio/selector_events.py +++ b/Python314_6_x64_Template/Lib/asyncio/selector_events.py @@ -530,11 +530,12 @@ def _sock_recvfrom_into(self, fut, sock, buf, bufsize): async def sock_sendall(self, sock, data): """Send data to the socket. - The socket must be connected to a remote socket. This method continues - to send data from data until either all data has been sent or an - error occurs. None is returned on success. On error, an exception is - raised, and there is no way to determine how much data, if any, was - successfully processed by the receiving end of the connection. + The socket must be connected to a remote socket. This method + continues to send data from data until either all data has been + sent or an error occurs. None is returned on success. On error, + an exception is raised, and there is no way to determine how much + data, if any, was successfully processed by the receiving end of + the connection. """ base_events._check_ssl_socket(sock) if self._debug and sock.gettimeout() != 0: @@ -583,11 +584,12 @@ def _sock_sendall(self, fut, sock, view, pos): async def sock_sendto(self, sock, data, address): """Send data to the socket. - The socket must be connected to a remote socket. This method continues - to send data from data until either all data has been sent or an - error occurs. None is returned on success. On error, an exception is - raised, and there is no way to determine how much data, if any, was - successfully processed by the receiving end of the connection. + The socket must be connected to a remote socket. This method + continues to send data from data until either all data has been + sent or an error occurs. None is returned on success. On error, + an exception is raised, and there is no way to determine how much + data, if any, was successfully processed by the receiving end of + the connection. """ base_events._check_ssl_socket(sock) if self._debug and sock.gettimeout() != 0: @@ -698,10 +700,11 @@ def _sock_connect_cb(self, fut, sock, address): async def sock_accept(self, sock): """Accept a connection. - The socket must be bound to an address and listening for connections. - The return value is a pair (conn, address) where conn is a new socket - object usable to send and receive data on the connection, and address - is the address bound to the socket on the other end of the connection. + The socket must be bound to an address and listening for + connections. The return value is a pair (conn, address) where + conn is a new socket object usable to send and receive data on the + connection, and address is the address bound to the socket on the + other end of the connection. """ base_events._check_ssl_socket(sock) if self._debug and sock.gettimeout() != 0: diff --git a/Python314_4_x64_Template/Lib/asyncio/sslproto.py b/Python314_6_x64_Template/Lib/asyncio/sslproto.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/sslproto.py rename to Python314_6_x64_Template/Lib/asyncio/sslproto.py diff --git a/Python314_4_x64_Template/Lib/asyncio/staggered.py b/Python314_6_x64_Template/Lib/asyncio/staggered.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/staggered.py rename to Python314_6_x64_Template/Lib/asyncio/staggered.py diff --git a/Python314_4_x64_Template/Lib/asyncio/streams.py b/Python314_6_x64_Template/Lib/asyncio/streams.py similarity index 98% rename from Python314_4_x64_Template/Lib/asyncio/streams.py rename to Python314_6_x64_Template/Lib/asyncio/streams.py index 64aac4cc5..dd8f66186 100644 --- a/Python314_4_x64_Template/Lib/asyncio/streams.py +++ b/Python314_6_x64_Template/Lib/asyncio/streams.py @@ -541,17 +541,17 @@ async def _wait_for_data(self, func_name): self._waiter = None async def readline(self): - """Read chunk of data from the stream until newline (b'\n') is found. + r"""Read chunk of data from the stream until newline (b'\n') is found. - On success, return chunk that ends with newline. If only partial + On success, return chunk that ends with newline. If only partial line can be read due to EOF, return incomplete line without - terminating newline. When EOF was reached while no bytes read, empty - bytes object is returned. + terminating newline. When EOF was reached while no bytes read, + empty bytes object is returned. - If limit is reached, ValueError will be raised. In that case, if + If limit is reached, ValueError will be raised. In that case, if newline was found, complete line including newline will be removed - from internal buffer. Else, internal buffer will be cleared. Limit is - compared against part of the line without newline. + from internal buffer. Else, internal buffer will be cleared. + Limit is compared against part of the line without newline. If stream was paused, this function will automatically resume it if needed. diff --git a/Python314_4_x64_Template/Lib/asyncio/subprocess.py b/Python314_6_x64_Template/Lib/asyncio/subprocess.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/subprocess.py rename to Python314_6_x64_Template/Lib/asyncio/subprocess.py diff --git a/Python314_4_x64_Template/Lib/asyncio/taskgroups.py b/Python314_6_x64_Template/Lib/asyncio/taskgroups.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/taskgroups.py rename to Python314_6_x64_Template/Lib/asyncio/taskgroups.py diff --git a/Python314_4_x64_Template/Lib/asyncio/tasks.py b/Python314_6_x64_Template/Lib/asyncio/tasks.py similarity index 96% rename from Python314_4_x64_Template/Lib/asyncio/tasks.py rename to Python314_6_x64_Template/Lib/asyncio/tasks.py index fbd5c39a7..14d3c1ceb 100644 --- a/Python314_4_x64_Template/Lib/asyncio/tasks.py +++ b/Python314_6_x64_Template/Lib/asyncio/tasks.py @@ -624,10 +624,11 @@ def as_completed(fs, *, timeout=None): Run the supplied awaitables concurrently. The returned object can be iterated to obtain the results of the awaitables as they finish. - The object returned can be iterated as an asynchronous iterator or a plain - iterator. When asynchronous iteration is used, the originally-supplied - awaitables are yielded if they are tasks or futures. This makes it easy to - correlate previously-scheduled tasks with their results: + The object returned can be iterated as an asynchronous iterator or + a plain iterator. When asynchronous iteration is used, the + originally-supplied awaitables are yielded if they are tasks or + futures. This makes it easy to correlate previously-scheduled tasks + with their results: ipv4_connect = create_task(open_connection("127.0.0.1", 80)) ipv6_connect = create_task(open_connection("::1", 80)) @@ -643,26 +644,27 @@ def as_completed(fs, *, timeout=None): else: print("IPv4 connection established.") - During asynchronous iteration, implicitly-created tasks will be yielded for - supplied awaitables that aren't tasks or futures. + During asynchronous iteration, implicitly-created tasks will be + yielded for supplied awaitables that aren't tasks or futures. - When used as a plain iterator, each iteration yields a new coroutine that - returns the result or raises the exception of the next completed awaitable. - This pattern is compatible with Python versions older than 3.13: + When used as a plain iterator, each iteration yields a new coroutine + that returns the result or raises the exception of the next completed + awaitable. This pattern is compatible with Python versions older than + 3.13: ipv4_connect = create_task(open_connection("127.0.0.1", 80)) ipv6_connect = create_task(open_connection("::1", 80)) tasks = [ipv4_connect, ipv6_connect] for next_connect in as_completed(tasks): - # next_connect is not one of the original task objects. It must be - # awaited to obtain the result value or raise the exception of the - # awaitable that finishes next. + # next_connect is not one of the original task objects. It must + # be awaited to obtain the result value or raise the exception + # of the awaitable that finishes next. reader, writer = await next_connect - A TimeoutError is raised if the timeout occurs before all awaitables are - done. This is raised by the async for loop during asynchronous iteration or - by the coroutines yielded during plain iteration. + A TimeoutError is raised if the timeout occurs before all awaitables + are done. This is raised by the async for loop during asynchronous + iteration or by the coroutines yielded during plain iteration. """ if inspect.isawaitable(fs): raise TypeError( @@ -1030,21 +1032,22 @@ def callback(): def create_eager_task_factory(custom_task_constructor): """Create a function suitable for use as a task factory on an event-loop. - Example usage: + Example usage: - loop.set_task_factory( - asyncio.create_eager_task_factory(my_task_constructor)) + loop.set_task_factory( + asyncio.create_eager_task_factory(my_task_constructor)) - Now, tasks created will be started immediately (rather than being first - scheduled to an event loop). The constructor argument can be any callable - that returns a Task-compatible object and has a signature compatible - with `Task.__init__`; it must have the `eager_start` keyword argument. + Now, tasks created will be started immediately (rather than being first + scheduled to an event loop). The constructor argument can be any + callable that returns a Task-compatible object and has a signature + compatible with `Task.__init__`; it must have the `eager_start` + keyword argument. - Most applications will use `Task` for `custom_task_constructor` and in - this case there's no need to call `create_eager_task_factory()` - directly. Instead the global `eager_task_factory` instance can be - used. E.g. `loop.set_task_factory(asyncio.eager_task_factory)`. - """ + Most applications will use `Task` for `custom_task_constructor` and in + this case there's no need to call `create_eager_task_factory()` + directly. Instead the global `eager_task_factory` instance can be + used. E.g. `loop.set_task_factory(asyncio.eager_task_factory)`. + """ def factory(loop, coro, *, eager_start=True, **kwargs): return custom_task_constructor( diff --git a/Python314_4_x64_Template/Lib/asyncio/threads.py b/Python314_6_x64_Template/Lib/asyncio/threads.py similarity index 97% rename from Python314_4_x64_Template/Lib/asyncio/threads.py rename to Python314_6_x64_Template/Lib/asyncio/threads.py index db048a823..5001351b0 100644 --- a/Python314_4_x64_Template/Lib/asyncio/threads.py +++ b/Python314_6_x64_Template/Lib/asyncio/threads.py @@ -17,7 +17,8 @@ async def to_thread(func, /, *args, **kwargs): allowing context variables from the main thread to be accessed in the separate thread. - Return a coroutine that can be awaited to get the eventual result of *func*. + Return a coroutine that can be awaited to get the eventual result of + *func*. """ loop = events.get_running_loop() ctx = contextvars.copy_context() diff --git a/Python314_4_x64_Template/Lib/asyncio/timeouts.py b/Python314_6_x64_Template/Lib/asyncio/timeouts.py similarity index 99% rename from Python314_4_x64_Template/Lib/asyncio/timeouts.py rename to Python314_6_x64_Template/Lib/asyncio/timeouts.py index 09342dc7c..65ddc285a 100644 --- a/Python314_4_x64_Template/Lib/asyncio/timeouts.py +++ b/Python314_6_x64_Template/Lib/asyncio/timeouts.py @@ -25,7 +25,8 @@ class _State(enum.Enum): class Timeout: """Asynchronous context manager for cancelling overdue coroutines. - Use `timeout()` or `timeout_at()` rather than instantiating this class directly. + Use `timeout()` or `timeout_at()` rather than instantiating this class + directly. """ def __init__(self, when: float | None) -> None: diff --git a/Python314_4_x64_Template/Lib/asyncio/tools.py b/Python314_6_x64_Template/Lib/asyncio/tools.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/tools.py rename to Python314_6_x64_Template/Lib/asyncio/tools.py diff --git a/Python314_4_x64_Template/Lib/asyncio/transports.py b/Python314_6_x64_Template/Lib/asyncio/transports.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/transports.py rename to Python314_6_x64_Template/Lib/asyncio/transports.py diff --git a/Python314_4_x64_Template/Lib/asyncio/trsock.py b/Python314_6_x64_Template/Lib/asyncio/trsock.py similarity index 100% rename from Python314_4_x64_Template/Lib/asyncio/trsock.py rename to Python314_6_x64_Template/Lib/asyncio/trsock.py diff --git a/Python314_4_x64_Template/Lib/asyncio/unix_events.py b/Python314_6_x64_Template/Lib/asyncio/unix_events.py similarity index 98% rename from Python314_4_x64_Template/Lib/asyncio/unix_events.py rename to Python314_6_x64_Template/Lib/asyncio/unix_events.py index 1c1458127..bfb3da0de 100644 --- a/Python314_4_x64_Template/Lib/asyncio/unix_events.py +++ b/Python314_6_x64_Template/Lib/asyncio/unix_events.py @@ -54,7 +54,8 @@ def waitstatus_to_exitcode(status): class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): """Unix event loop. - Adds signal handling and UNIX Domain Socket support to SelectorEventLoop. + Adds signal handling and UNIX Domain Socket support to + SelectorEventLoop. """ def __init__(self, selector=None): @@ -384,12 +385,12 @@ def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno, # order to simplify the common case. self.remove_writer(registered_fd) if fut.cancelled(): - self._sock_sendfile_update_filepos(fileno, offset, total_sent) + self._sock_sendfile_update_filepos(fileno, offset) return if count: blocksize = count - total_sent if blocksize <= 0: - self._sock_sendfile_update_filepos(fileno, offset, total_sent) + self._sock_sendfile_update_filepos(fileno, offset) fut.set_result(total_sent) return @@ -423,20 +424,20 @@ def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno, # plain send(). err = exceptions.SendfileNotAvailableError( "os.sendfile call failed") - self._sock_sendfile_update_filepos(fileno, offset, total_sent) + self._sock_sendfile_update_filepos(fileno, offset) fut.set_exception(err) else: - self._sock_sendfile_update_filepos(fileno, offset, total_sent) + self._sock_sendfile_update_filepos(fileno, offset) fut.set_exception(exc) except (SystemExit, KeyboardInterrupt): raise except BaseException as exc: - self._sock_sendfile_update_filepos(fileno, offset, total_sent) + self._sock_sendfile_update_filepos(fileno, offset) fut.set_exception(exc) else: if sent == 0: # EOF - self._sock_sendfile_update_filepos(fileno, offset, total_sent) + self._sock_sendfile_update_filepos(fileno, offset) fut.set_result(total_sent) else: offset += sent @@ -447,9 +448,9 @@ def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno, fd, sock, fileno, offset, count, blocksize, total_sent) - def _sock_sendfile_update_filepos(self, fileno, offset, total_sent): - if total_sent > 0: - os.lseek(fileno, offset, os.SEEK_SET) + def _sock_sendfile_update_filepos(self, fileno, offset): + # After this helper runs, the source fd's lseek pointer is at offset." + os.lseek(fileno, offset, os.SEEK_SET) def _sock_add_cancellation_callback(self, fut, sock): def cb(fut): diff --git a/Python314_4_x64_Template/Lib/asyncio/windows_events.py b/Python314_6_x64_Template/Lib/asyncio/windows_events.py similarity index 99% rename from Python314_4_x64_Template/Lib/asyncio/windows_events.py rename to Python314_6_x64_Template/Lib/asyncio/windows_events.py index 5f75b17d8..0bf773213 100644 --- a/Python314_4_x64_Template/Lib/asyncio/windows_events.py +++ b/Python314_6_x64_Template/Lib/asyncio/windows_events.py @@ -610,6 +610,9 @@ def sendfile(self, sock, file, offset, count): ov = _overlapped.Overlapped(NULL) offset_low = offset & 0xffff_ffff offset_high = (offset >> 32) & 0xffff_ffff + # TransmitFile ignores OVERLAPPED.Offset for handles not opened with + # FILE_FLAG_OVERLAPPED, so seek the CRT file pointer to match. + file.seek(offset) ov.TransmitFile(sock.fileno(), msvcrt.get_osfhandle(file.fileno()), offset_low, offset_high, diff --git a/Python314_4_x64_Template/Lib/asyncio/windows_utils.py b/Python314_6_x64_Template/Lib/asyncio/windows_utils.py similarity index 98% rename from Python314_4_x64_Template/Lib/asyncio/windows_utils.py rename to Python314_6_x64_Template/Lib/asyncio/windows_utils.py index acd494411..d6393f0b1 100644 --- a/Python314_4_x64_Template/Lib/asyncio/windows_utils.py +++ b/Python314_6_x64_Template/Lib/asyncio/windows_utils.py @@ -111,8 +111,9 @@ def fileno(self): def close(self, *, CloseHandle=_winapi.CloseHandle): if self._handle is not None: - CloseHandle(self._handle) + handle = self._handle self._handle = None + CloseHandle(handle) def __del__(self, _warn=warnings.warn): if self._handle is not None: diff --git a/Python314_4_x64_Template/Lib/base64.py b/Python314_6_x64_Template/Lib/base64.py similarity index 95% rename from Python314_4_x64_Template/Lib/base64.py rename to Python314_6_x64_Template/Lib/base64.py index f95132a42..775ceab0e 100644 --- a/Python314_4_x64_Template/Lib/base64.py +++ b/Python314_6_x64_Template/Lib/base64.py @@ -325,17 +325,20 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False): foldspaces is an optional flag that uses the special short sequence 'y' instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This - feature is not supported by the "standard" Adobe encoding. + feature is not supported by the standard encoding used in PDF. - wrapcol controls whether the output should have newline (b'\\n') characters - added to it. If this is non-zero, each output line will be at most this - many characters long, excluding the trailing newline. + If wrapcol is non-zero, insert a newline (b'\\n') character after at most + every wrapcol characters. - pad controls whether the input is padded to a multiple of 4 before - encoding. Note that the btoa implementation always pads. + pad controls whether zero-padding applied to the end of the input + is fully retained in the output encoding, as done by btoa, + producing an exact multiple of 5 bytes of output. + + adobe controls whether the encoded byte sequence is framed with <~ + and ~>, as in a PostScript base-85 string literal. Note that + while ASCII85Decode streams in PDF documents must be terminated + with ~>, they must not use a leading <~. - adobe controls whether the encoded byte sequence is framed with <~ and ~>, - which is used by the Adobe implementation. """ global _a85chars, _a85chars2 # Delay the initialization of tables to not waste memory @@ -364,12 +367,14 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False): def a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v'): """Decode the Ascii85 encoded bytes-like object or ASCII string b. - foldspaces is a flag that specifies whether the 'y' short sequence should be - accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature is - not supported by the "standard" Adobe encoding. + foldspaces is a flag that specifies whether the 'y' short sequence + should be accepted as shorthand for 4 consecutive spaces (ASCII + 0x20). This feature is not supported by the standard Ascii85 + encoding used in PDF and PostScript. - adobe controls whether the input sequence is in Adobe Ascii85 format (i.e. - is framed with <~ and ~>). + adobe controls whether the <~ and ~> markers are present. While + the leading <~ is not required, the input must end with ~>, or a + ValueError is raised. ignorechars should be a byte string containing characters to ignore from the input. This should only contain whitespace characters, and by default @@ -442,8 +447,10 @@ def a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v'): def b85encode(b, pad=False): """Encode bytes-like object b in base85 format and return a bytes object. - If pad is true, the input is padded with b'\\0' so its length is a multiple of - 4 bytes before encoding. + The input is padded with b'\0' so its length is a multiple of 4 + bytes before encoding. If pad is true, all the resulting + characters are retained in the output, which will always be a + multiple of 5 bytes. """ global _b85chars, _b85chars2 # Delay the initialization of tables to not waste memory diff --git a/Python314_4_x64_Template/Lib/bdb.py b/Python314_6_x64_Template/Lib/bdb.py similarity index 100% rename from Python314_4_x64_Template/Lib/bdb.py rename to Python314_6_x64_Template/Lib/bdb.py diff --git a/Python314_4_x64_Template/Lib/bisect.py b/Python314_6_x64_Template/Lib/bisect.py similarity index 100% rename from Python314_4_x64_Template/Lib/bisect.py rename to Python314_6_x64_Template/Lib/bisect.py diff --git a/Python314_4_x64_Template/Lib/bz2.py b/Python314_6_x64_Template/Lib/bz2.py similarity index 100% rename from Python314_4_x64_Template/Lib/bz2.py rename to Python314_6_x64_Template/Lib/bz2.py diff --git a/Python314_4_x64_Template/Lib/cProfile.py b/Python314_6_x64_Template/Lib/cProfile.py similarity index 100% rename from Python314_4_x64_Template/Lib/cProfile.py rename to Python314_6_x64_Template/Lib/cProfile.py diff --git a/Python314_4_x64_Template/Lib/calendar.py b/Python314_6_x64_Template/Lib/calendar.py similarity index 100% rename from Python314_4_x64_Template/Lib/calendar.py rename to Python314_6_x64_Template/Lib/calendar.py diff --git a/Python314_4_x64_Template/Lib/cmd.py b/Python314_6_x64_Template/Lib/cmd.py similarity index 100% rename from Python314_4_x64_Template/Lib/cmd.py rename to Python314_6_x64_Template/Lib/cmd.py diff --git a/Python314_4_x64_Template/Lib/code.py b/Python314_6_x64_Template/Lib/code.py similarity index 100% rename from Python314_4_x64_Template/Lib/code.py rename to Python314_6_x64_Template/Lib/code.py diff --git a/Python314_4_x64_Template/Lib/codecs.py b/Python314_6_x64_Template/Lib/codecs.py similarity index 100% rename from Python314_4_x64_Template/Lib/codecs.py rename to Python314_6_x64_Template/Lib/codecs.py diff --git a/Python314_4_x64_Template/Lib/codeop.py b/Python314_6_x64_Template/Lib/codeop.py similarity index 100% rename from Python314_4_x64_Template/Lib/codeop.py rename to Python314_6_x64_Template/Lib/codeop.py diff --git a/Python314_4_x64_Template/Lib/collections/__init__.py b/Python314_6_x64_Template/Lib/collections/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/collections/__init__.py rename to Python314_6_x64_Template/Lib/collections/__init__.py diff --git a/Python314_6_x64_Template/Lib/collections/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/collections/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 000000000..27b8b27fa Binary files /dev/null and b/Python314_6_x64_Template/Lib/collections/__pycache__/__init__.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/colorsys.py b/Python314_6_x64_Template/Lib/colorsys.py similarity index 100% rename from Python314_4_x64_Template/Lib/colorsys.py rename to Python314_6_x64_Template/Lib/colorsys.py diff --git a/Python314_4_x64_Template/Lib/compileall.py b/Python314_6_x64_Template/Lib/compileall.py similarity index 100% rename from Python314_4_x64_Template/Lib/compileall.py rename to Python314_6_x64_Template/Lib/compileall.py diff --git a/Python314_4_x64_Template/Lib/compression/__init__.py b/Python314_6_x64_Template/Lib/compression/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/compression/__init__.py rename to Python314_6_x64_Template/Lib/compression/__init__.py diff --git a/Python314_6_x64_Template/Lib/compression/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/compression/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 000000000..bc6a3ca8e Binary files /dev/null and b/Python314_6_x64_Template/Lib/compression/__pycache__/__init__.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/compression/_common/__init__.py b/Python314_6_x64_Template/Lib/compression/_common/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/compression/_common/__init__.py rename to Python314_6_x64_Template/Lib/compression/_common/__init__.py diff --git a/Python314_6_x64_Template/Lib/compression/_common/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/compression/_common/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 000000000..e161f25cc Binary files /dev/null and b/Python314_6_x64_Template/Lib/compression/_common/__pycache__/__init__.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/compression/_common/__pycache__/_streams.cpython-314.pyc b/Python314_6_x64_Template/Lib/compression/_common/__pycache__/_streams.cpython-314.pyc similarity index 82% rename from Python314_4_x64_Template/Lib/compression/_common/__pycache__/_streams.cpython-314.pyc rename to Python314_6_x64_Template/Lib/compression/_common/__pycache__/_streams.cpython-314.pyc index 373c9fa64..6258754c6 100644 Binary files a/Python314_4_x64_Template/Lib/compression/_common/__pycache__/_streams.cpython-314.pyc and b/Python314_6_x64_Template/Lib/compression/_common/__pycache__/_streams.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/compression/_common/_streams.py b/Python314_6_x64_Template/Lib/compression/_common/_streams.py similarity index 100% rename from Python314_4_x64_Template/Lib/compression/_common/_streams.py rename to Python314_6_x64_Template/Lib/compression/_common/_streams.py diff --git a/Python314_4_x64_Template/Lib/compression/bz2.py b/Python314_6_x64_Template/Lib/compression/bz2.py similarity index 100% rename from Python314_4_x64_Template/Lib/compression/bz2.py rename to Python314_6_x64_Template/Lib/compression/bz2.py diff --git a/Python314_4_x64_Template/Lib/compression/gzip.py b/Python314_6_x64_Template/Lib/compression/gzip.py similarity index 100% rename from Python314_4_x64_Template/Lib/compression/gzip.py rename to Python314_6_x64_Template/Lib/compression/gzip.py diff --git a/Python314_4_x64_Template/Lib/compression/lzma.py b/Python314_6_x64_Template/Lib/compression/lzma.py similarity index 100% rename from Python314_4_x64_Template/Lib/compression/lzma.py rename to Python314_6_x64_Template/Lib/compression/lzma.py diff --git a/Python314_4_x64_Template/Lib/compression/zlib.py b/Python314_6_x64_Template/Lib/compression/zlib.py similarity index 100% rename from Python314_4_x64_Template/Lib/compression/zlib.py rename to Python314_6_x64_Template/Lib/compression/zlib.py diff --git a/Python314_6_x64_Template/Lib/compression/zstd/__init__.py b/Python314_6_x64_Template/Lib/compression/zstd/__init__.py new file mode 100644 index 000000000..5326cf9b1 --- /dev/null +++ b/Python314_6_x64_Template/Lib/compression/zstd/__init__.py @@ -0,0 +1,244 @@ +"""Python bindings to the Zstandard (zstd) compression library (RFC-8878).""" + +__all__ = ( + # compression.zstd + 'COMPRESSION_LEVEL_DEFAULT', + 'compress', + 'CompressionParameter', + 'decompress', + 'DecompressionParameter', + 'finalize_dict', + 'get_frame_info', + 'Strategy', + 'train_dict', + + # compression.zstd._zstdfile + 'open', + 'ZstdFile', + + # _zstd + 'get_frame_size', + 'zstd_version', + 'zstd_version_info', + 'ZstdCompressor', + 'ZstdDecompressor', + 'ZstdDict', + 'ZstdError', +) + +import _zstd +import enum +from _zstd import (ZstdCompressor, ZstdDecompressor, ZstdDict, ZstdError, + get_frame_size, zstd_version) +from compression.zstd._zstdfile import ZstdFile, open, _nbytes + +# zstd_version_number is (MAJOR * 100 * 100 + MINOR * 100 + RELEASE) +zstd_version_info = (*divmod(_zstd.zstd_version_number // 100, 100), + _zstd.zstd_version_number % 100) +"""Version number of the runtime zstd library as a tuple of integers.""" + +COMPRESSION_LEVEL_DEFAULT = _zstd.ZSTD_CLEVEL_DEFAULT +"""The default compression level for Zstandard, currently '3'.""" + + +class FrameInfo: + """Information about a Zstandard frame.""" + + __slots__ = 'decompressed_size', 'dictionary_id' + + def __init__(self, decompressed_size, dictionary_id): + super().__setattr__('decompressed_size', decompressed_size) + super().__setattr__('dictionary_id', dictionary_id) + + def __repr__(self): + return (f'FrameInfo(decompressed_size={self.decompressed_size}, ' + f'dictionary_id={self.dictionary_id})') + + def __setattr__(self, name, _): + raise AttributeError(f"can't set attribute {name!r}") + + +def get_frame_info(frame_buffer): + """Get Zstandard frame information from a frame header. + + *frame_buffer* is a bytes-like object. It should start from the + beginning of a frame, and needs to include at least the frame header + (6 to 18 bytes). + + The returned FrameInfo object has two attributes. + 'decompressed_size' is the size in bytes of the data in the frame when + decompressed, or None when the decompressed size is unknown. + 'dictionary_id' is an int in the range (0, 2**32). The special value 0 + means that the dictionary ID was not recorded in the frame header, + the frame may or may not need a dictionary to be decoded, + and the ID of such a dictionary is not specified. + """ + return FrameInfo(*_zstd.get_frame_info(frame_buffer)) + + +def train_dict(samples, dict_size): + """Return a ZstdDict representing a trained Zstandard dictionary. + + *samples* is an iterable of samples, where a sample is a bytes-like + object representing a file. + + *dict_size* is the dictionary's maximum size, in bytes. + """ + if not isinstance(dict_size, int): + ds_cls = type(dict_size).__qualname__ + raise TypeError(f'dict_size must be an int object, not {ds_cls!r}.') + + samples = tuple(samples) + chunks = b''.join(samples) + chunk_sizes = tuple(_nbytes(sample) for sample in samples) + if not chunks: + raise ValueError("samples contained no data; can't train dictionary.") + dict_content = _zstd.train_dict(chunks, chunk_sizes, dict_size) + return ZstdDict(dict_content) + + +def finalize_dict(zstd_dict, /, samples, dict_size, level): + """Return a ZstdDict representing a finalized Zstandard dictionary. + + Given a custom content as a basis for dictionary, and a set of samples, + finalize *zstd_dict* by adding headers and statistics according to the + Zstandard dictionary format. + + You may compose an effective dictionary content by hand, which is used + as basis dictionary, and use some samples to finalize a dictionary. The + basis dictionary may be a "raw content" dictionary. See *is_raw* in + ZstdDict. + + *samples* is an iterable of samples, where a sample is a bytes-like + object representing a file. + *dict_size* is the dictionary's maximum size, in bytes. + *level* is the expected compression level. The statistics for each + compression level differ, so tuning the dictionary to the compression + level can provide improvements. + """ + + if not isinstance(zstd_dict, ZstdDict): + raise TypeError('zstd_dict argument should be a ZstdDict object.') + if not isinstance(dict_size, int): + raise TypeError('dict_size argument should be an int object.') + if not isinstance(level, int): + raise TypeError('level argument should be an int object.') + + samples = tuple(samples) + chunks = b''.join(samples) + chunk_sizes = tuple(_nbytes(sample) for sample in samples) + if not chunks: + raise ValueError("The samples are empty content, can't finalize the " + "dictionary.") + dict_content = _zstd.finalize_dict(zstd_dict.dict_content, chunks, + chunk_sizes, dict_size, level) + return ZstdDict(dict_content) + + +def compress(data, level=None, options=None, zstd_dict=None): + """Return Zstandard compressed *data* as bytes. + + *level* is an int specifying the compression level to use, defaulting to + COMPRESSION_LEVEL_DEFAULT ('3'). + *options* is a dict object that contains advanced compression + parameters. See CompressionParameter for more on options. + *zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary. + See the function train_dict for how to train a ZstdDict on sample data. + + For incremental compression, use a ZstdCompressor instead. + """ + comp = ZstdCompressor(level=level, options=options, zstd_dict=zstd_dict) + return comp.compress(data, mode=ZstdCompressor.FLUSH_FRAME) + + +def decompress(data, zstd_dict=None, options=None): + """Decompress one or more frames of Zstandard compressed *data*. + + *zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary. + See the function train_dict for how to train a ZstdDict on sample data. + *options* is a dict object that contains advanced compression + parameters. See DecompressionParameter for more on options. + + For incremental decompression, use a ZstdDecompressor instead. + """ + results = [] + while True: + decomp = ZstdDecompressor(options=options, zstd_dict=zstd_dict) + results.append(decomp.decompress(data)) + if not decomp.eof: + raise ZstdError('Compressed data ended before the ' + 'end-of-stream marker was reached') + data = decomp.unused_data + if not data: + break + return b''.join(results) + + +class CompressionParameter(enum.IntEnum): + """Compression parameters.""" + + compression_level = _zstd.ZSTD_c_compressionLevel + window_log = _zstd.ZSTD_c_windowLog + hash_log = _zstd.ZSTD_c_hashLog + chain_log = _zstd.ZSTD_c_chainLog + search_log = _zstd.ZSTD_c_searchLog + min_match = _zstd.ZSTD_c_minMatch + target_length = _zstd.ZSTD_c_targetLength + strategy = _zstd.ZSTD_c_strategy + + enable_long_distance_matching = _zstd.ZSTD_c_enableLongDistanceMatching + ldm_hash_log = _zstd.ZSTD_c_ldmHashLog + ldm_min_match = _zstd.ZSTD_c_ldmMinMatch + ldm_bucket_size_log = _zstd.ZSTD_c_ldmBucketSizeLog + ldm_hash_rate_log = _zstd.ZSTD_c_ldmHashRateLog + + content_size_flag = _zstd.ZSTD_c_contentSizeFlag + checksum_flag = _zstd.ZSTD_c_checksumFlag + dict_id_flag = _zstd.ZSTD_c_dictIDFlag + + nb_workers = _zstd.ZSTD_c_nbWorkers + job_size = _zstd.ZSTD_c_jobSize + overlap_log = _zstd.ZSTD_c_overlapLog + + def bounds(self): + """Return the (lower, upper) int bounds of a compression parameter. + + Both the lower and upper bounds are inclusive. + """ + return _zstd.get_param_bounds(self.value, is_compress=True) + + +class DecompressionParameter(enum.IntEnum): + """Decompression parameters.""" + + window_log_max = _zstd.ZSTD_d_windowLogMax + + def bounds(self): + """Return the (lower, upper) int bounds of a decompression parameter. + + Both the lower and upper bounds are inclusive. + """ + return _zstd.get_param_bounds(self.value, is_compress=False) + + +class Strategy(enum.IntEnum): + """Compression strategies, listed from fastest to strongest. + + Note that new strategies might be added in the future. + Only the order (from fast to strong) is guaranteed, + the numeric value might change. + """ + + fast = _zstd.ZSTD_fast + dfast = _zstd.ZSTD_dfast + greedy = _zstd.ZSTD_greedy + lazy = _zstd.ZSTD_lazy + lazy2 = _zstd.ZSTD_lazy2 + btlazy2 = _zstd.ZSTD_btlazy2 + btopt = _zstd.ZSTD_btopt + btultra = _zstd.ZSTD_btultra + btultra2 = _zstd.ZSTD_btultra2 + + +# Check validity of the CompressionParameter & DecompressionParameter types +_zstd.set_parameter_types(CompressionParameter, DecompressionParameter) diff --git a/Python314_6_x64_Template/Lib/compression/zstd/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/compression/zstd/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 000000000..3dff61f12 Binary files /dev/null and b/Python314_6_x64_Template/Lib/compression/zstd/__pycache__/__init__.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/compression/zstd/__pycache__/_zstdfile.cpython-314.pyc b/Python314_6_x64_Template/Lib/compression/zstd/__pycache__/_zstdfile.cpython-314.pyc similarity index 90% rename from Python314_4_x64_Template/Lib/compression/zstd/__pycache__/_zstdfile.cpython-314.pyc rename to Python314_6_x64_Template/Lib/compression/zstd/__pycache__/_zstdfile.cpython-314.pyc index 4667db917..4d04abf08 100644 Binary files a/Python314_4_x64_Template/Lib/compression/zstd/__pycache__/_zstdfile.cpython-314.pyc and b/Python314_6_x64_Template/Lib/compression/zstd/__pycache__/_zstdfile.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/compression/zstd/_zstdfile.py b/Python314_6_x64_Template/Lib/compression/zstd/_zstdfile.py similarity index 92% rename from Python314_4_x64_Template/Lib/compression/zstd/_zstdfile.py rename to Python314_6_x64_Template/Lib/compression/zstd/_zstdfile.py index d709f5efc..8d3358152 100644 --- a/Python314_4_x64_Template/Lib/compression/zstd/_zstdfile.py +++ b/Python314_6_x64_Template/Lib/compression/zstd/_zstdfile.py @@ -36,9 +36,9 @@ def __init__(self, file, /, mode='r', *, *file* can be either an file-like object, or a file name to open. - *mode* can be 'r' for reading (default), 'w' for (over)writing, 'x' for - creating exclusively, or 'a' for appending. These can equivalently be - given as 'rb', 'wb', 'xb' and 'ab' respectively. + *mode* can be 'r' for reading (default), 'w' for (over)writing, 'x' + for creating exclusively, or 'a' for appending. These can + equivalently be given as 'rb', 'wb', 'xb' and 'ab' respectively. *level* is an optional int specifying the compression level to use, or COMPRESSION_LEVEL_DEFAULT if not given. @@ -296,26 +296,27 @@ def open(file, /, mode='rb', *, level=None, options=None, zstd_dict=None, encoding=None, errors=None, newline=None): """Open a Zstandard compressed file in binary or text mode. - file can be either a file name (given as a str, bytes, or PathLike object), - in which case the named file is opened, or it can be an existing file object - to read from or write to. + file can be either a file name (given as a str, bytes, or PathLike + object), in which case the named file is opened, or it can be + an existing file object to read from or write to. - The mode parameter can be 'r', 'rb' (default), 'w', 'wb', 'x', 'xb', 'a', - 'ab' for binary mode, or 'rt', 'wt', 'xt', 'at' for text mode. + The mode parameter can be 'r', 'rb' (default), 'w', 'wb', 'x', 'xb', + 'a', 'ab' for binary mode, or 'rt', 'wt', 'xt', 'at' for text mode. - The level, options, and zstd_dict parameters specify the settings the same - as ZstdFile. + The level, options, and zstd_dict parameters specify the settings the + same as ZstdFile. When using read mode (decompression), the options parameter is a dict - representing advanced decompression options. The level parameter is not - supported in this case. When using write mode (compression), only one of - level, an int representing the compression level, or options, a dict - representing advanced compression options, may be passed. In both modes, - zstd_dict is a ZstdDict instance containing a trained Zstandard dictionary. - - For binary mode, this function is equivalent to the ZstdFile constructor: - ZstdFile(filename, mode, ...). In this case, the encoding, errors and - newline parameters must not be provided. + representing advanced decompression options. The level parameter is not + supported in this case. When using write mode (compression), only one + of level, an int representing the compression level, or options, a dict + representing advanced compression options, may be passed. In both + modes, zstd_dict is a ZstdDict instance containing a trained Zstandard + dictionary. + + For binary mode, this function is equivalent to the ZstdFile + constructor: ZstdFile(filename, mode, ...). In this case, the encoding, + errors and newline parameters must not be provided. For text mode, an ZstdFile object is created, and wrapped in an io.TextIOWrapper instance with the specified encoding, error handling diff --git a/Python314_4_x64_Template/Lib/concurrent/__init__.py b/Python314_6_x64_Template/Lib/concurrent/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/concurrent/__init__.py rename to Python314_6_x64_Template/Lib/concurrent/__init__.py diff --git a/Python314_4_x64_Template/Lib/concurrent/futures/__init__.py b/Python314_6_x64_Template/Lib/concurrent/futures/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/concurrent/futures/__init__.py rename to Python314_6_x64_Template/Lib/concurrent/futures/__init__.py diff --git a/Python314_4_x64_Template/Lib/concurrent/futures/_base.py b/Python314_6_x64_Template/Lib/concurrent/futures/_base.py similarity index 91% rename from Python314_4_x64_Template/Lib/concurrent/futures/_base.py rename to Python314_6_x64_Template/Lib/concurrent/futures/_base.py index d98b1ebdd..96156f47a 100644 --- a/Python314_4_x64_Template/Lib/concurrent/futures/_base.py +++ b/Python314_6_x64_Template/Lib/concurrent/futures/_base.py @@ -194,15 +194,15 @@ def as_completed(fs, timeout=None): """An iterator over the given futures that yields each as it completes. Args: - fs: The sequence of Futures (possibly created by different Executors) to - iterate over. - timeout: The maximum number of seconds to wait. If None, then there - is no limit on the wait time. + fs: The sequence of Futures (possibly created by different + Executors) to iterate over. + timeout: The maximum number of seconds to wait. If None, then + there is no limit on the wait time. Returns: - An iterator that yields the given Futures as they complete (finished or - cancelled). If any given Futures are duplicated, they will be returned - once. + An iterator that yields the given Futures as they complete + (finished or cancelled). If any given Futures are duplicated, + they will be returned once. Raises: TimeoutError: If the entire result iterator could not be generated @@ -258,19 +258,20 @@ def wait(fs, timeout=None, return_when=ALL_COMPLETED): """Wait for the futures in the given sequence to complete. Args: - fs: The sequence of Futures (possibly created by different Executors) to - wait upon. - timeout: The maximum number of seconds to wait. If None, then there - is no limit on the wait time. - return_when: Indicates when this function should return. The options - are: + fs: The sequence of Futures (possibly created by different + Executors) to wait upon. + timeout: The maximum number of seconds to wait. If None, then + there is no limit on the wait time. + return_when: Indicates when this function should return. + The options are: FIRST_COMPLETED - Return when any future finishes or is cancelled. FIRST_EXCEPTION - Return when any future finishes by raising an - exception. If no future raises an exception + exception. If no future raises an exception then it is equivalent to ALL_COMPLETED. - ALL_COMPLETED - Return when all futures finish or are cancelled. + ALL_COMPLETED - Return when all futures finish or are + cancelled. Returns: A named 2-tuple of sets. The first set, named 'done', contains the @@ -404,11 +405,12 @@ def add_done_callback(self, fn): Args: fn: A callable that will be called with this future as its only - argument when the future completes or is cancelled. The callable - will always be called by a thread in the same process in which - it was added. If the future has already completed or been - cancelled then the callable will be called immediately. These - callables are called in the order that they were added. + argument when the future completes or is cancelled. The + callable will always be called by a thread in the same + process in which it was added. If the future has already + completed or been cancelled then the callable will be + called immediately. These callables are called in the + order that they were added. """ with self._condition: if self._state not in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]: @@ -423,17 +425,19 @@ def result(self, timeout=None): """Return the result of the call that the future represents. Args: - timeout: The number of seconds to wait for the result if the future - isn't done. If None, then there is no limit on the wait time. + timeout: The number of seconds to wait for the result if the + future isn't done. If None, then there is no limit on the + wait time. Returns: The result of the call that the future represents. Raises: CancelledError: If the future was cancelled. - TimeoutError: If the future didn't finish executing before the given - timeout. - Exception: If the call raised then that exception will be raised. + TimeoutError: If the future didn't finish executing before the + given timeout. + Exception: If the call raised then that exception will be + raised. """ try: with self._condition: @@ -459,17 +463,17 @@ def exception(self, timeout=None): Args: timeout: The number of seconds to wait for the exception if the - future isn't done. If None, then there is no limit on the wait - time. + future isn't done. If None, then there is no limit on the + wait time. Returns: - The exception raised by the call that the future represents or None - if the call completed without raising. + The exception raised by the call that the future represents or + None if the call completed without raising. Raises: CancelledError: If the future was cancelled. - TimeoutError: If the future didn't finish executing before the given - timeout. + TimeoutError: If the future didn't finish executing before the + given timeout. """ with self._condition: @@ -494,22 +498,23 @@ def set_running_or_notify_cancel(self): Should only be used by Executor implementations and unit tests. If the future has been cancelled (cancel() was called and returned - True) then any threads waiting on the future completing (though calls - to as_completed() or wait()) are notified and False is returned. + True) then any threads waiting on the future completing (though + calls to as_completed() or wait()) are notified and False is + returned. If the future was not cancelled then it is put in the running state (future calls to running() will return True) and True is returned. This method should be called by Executor implementations before - executing the work associated with this future. If this method returns - False then the work should not be executed. + executing the work associated with this future. If this method + returns False then the work should not be executed. Returns: False if the Future was cancelled, True otherwise. Raises: - RuntimeError: if this method was already called or if set_result() - or set_exception() was called. + RuntimeError: if this method was already called or if + set_result() or set_exception() was called. """ with self._condition: if self._state == CANCELLED: @@ -566,8 +571,9 @@ class Executor(object): def submit(self, fn, /, *args, **kwargs): """Submits a callable to be executed with the given arguments. - Schedules the callable to be executed as fn(*args, **kwargs) and returns - a Future instance representing the execution of the callable. + Schedules the callable to be executed as fn(*args, **kwargs) and + returns a Future instance representing the execution of the + callable. Returns: A Future representing the given call. @@ -580,25 +586,25 @@ def map(self, fn, *iterables, timeout=None, chunksize=1, buffersize=None): Args: fn: A callable that will take as many arguments as there are passed iterables. - timeout: The maximum number of seconds to wait. If None, then there - is no limit on the wait time. - chunksize: The size of the chunks the iterable will be broken into - before being passed to a child process. This argument is only - used by ProcessPoolExecutor; it is ignored by + timeout: The maximum number of seconds to wait. If None, then + there is no limit on the wait time. + chunksize: The size of the chunks the iterable will be broken + into before being passed to a child process. This argument + is only used by ProcessPoolExecutor; it is ignored by ThreadPoolExecutor. buffersize: The number of submitted tasks whose results have not - yet been yielded. If the buffer is full, iteration over the + yet been yielded. If the buffer is full, iteration over the iterables pauses until a result is yielded from the buffer. - If None, all input elements are eagerly collected, and a task is - submitted for each. + If None, all input elements are eagerly collected, and + a task is submitted for each. Returns: - An iterator equivalent to: map(func, *iterables) but the calls may - be evaluated out-of-order. + An iterator equivalent to: map(func, *iterables) but the calls + may be evaluated out-of-order. Raises: - TimeoutError: If the entire result iterator could not be generated - before the given timeout. + TimeoutError: If the entire result iterator could not be + generated before the given timeout. Exception: If fn(*args) raises for any values. """ if buffersize is not None and not isinstance(buffersize, int): @@ -652,8 +658,8 @@ def shutdown(self, wait=True, *, cancel_futures=False): Args: wait: If True then shutdown will not return until all running - futures have finished executing and the resources used by the - executor have been reclaimed. + futures have finished executing and the resources used by + the executor have been reclaimed. cancel_futures: If True then shutdown will cancel all pending futures. Futures that are completed or running will not be cancelled. diff --git a/Python314_4_x64_Template/Lib/concurrent/futures/interpreter.py b/Python314_6_x64_Template/Lib/concurrent/futures/interpreter.py similarity index 98% rename from Python314_4_x64_Template/Lib/concurrent/futures/interpreter.py rename to Python314_6_x64_Template/Lib/concurrent/futures/interpreter.py index 85c1da2c7..fd3d45144 100644 --- a/Python314_4_x64_Template/Lib/concurrent/futures/interpreter.py +++ b/Python314_6_x64_Template/Lib/concurrent/futures/interpreter.py @@ -110,8 +110,8 @@ def __init__(self, max_workers=None, thread_name_prefix='', """Initializes a new InterpreterPoolExecutor instance. Args: - max_workers: The maximum number of interpreters that can be used to - execute the given calls. + max_workers: The maximum number of interpreters that can be used + to execute the given calls. thread_name_prefix: An optional name prefix to give our threads. initializer: A callable or script used to initialize each worker interpreter. diff --git a/Python314_4_x64_Template/Lib/concurrent/futures/process.py b/Python314_6_x64_Template/Lib/concurrent/futures/process.py similarity index 96% rename from Python314_4_x64_Template/Lib/concurrent/futures/process.py rename to Python314_6_x64_Template/Lib/concurrent/futures/process.py index a14650bf5..122be5827 100644 --- a/Python314_4_x64_Template/Lib/concurrent/futures/process.py +++ b/Python314_6_x64_Template/Lib/concurrent/futures/process.py @@ -642,19 +642,21 @@ def __init__(self, max_workers=None, mp_context=None, Args: max_workers: The maximum number of processes that can be used to - execute the given calls. If None or not given then as many - worker processes will be created as the machine has processors. - mp_context: A multiprocessing context to launch the workers created - using the multiprocessing.get_context('start method') API. This - object should provide SimpleQueue, Queue and Process. + execute the given calls. If None or not given then as many + worker processes will be created as the machine has + processors. + mp_context: A multiprocessing context to launch the workers + created using the multiprocessing.get_context('start method') + API. This object should provide SimpleQueue, Queue and + Process. initializer: A callable used to initialize worker processes. initargs: A tuple of arguments to pass to the initializer. - max_tasks_per_child: The maximum number of tasks a worker process - can complete before it will exit and be replaced with a fresh - worker process. The default of None means worker process will - live as long as the executor. Requires a non-'fork' mp_context - start method. When given, we default to using 'spawn' if no - mp_context is supplied. + max_tasks_per_child: The maximum number of tasks a worker + process can complete before it will exit and be replaced + with a fresh worker process. The default of None means + worker process will live as long as the executor. Requires + a non-'fork' mp_context start method. When given, we + default to using 'spawn' if no mp_context is supplied. """ _check_system_limits() @@ -824,24 +826,25 @@ def map(self, fn, *iterables, timeout=None, chunksize=1, buffersize=None): Args: fn: A callable that will take as many arguments as there are passed iterables. - timeout: The maximum number of seconds to wait. If None, then there - is no limit on the wait time. - chunksize: If greater than one, the iterables will be chopped into - chunks of size chunksize and submitted to the process pool. - If set to one, the items in the list will be sent one at a time. + timeout: The maximum number of seconds to wait. If None, then + there is no limit on the wait time. + chunksize: If greater than one, the iterables will be chopped + into chunks of size chunksize and submitted to the process + pool. If set to one, the items in the list will be sent + one at a time. buffersize: The number of submitted tasks whose results have not - yet been yielded. If the buffer is full, iteration over the + yet been yielded. If the buffer is full, iteration over the iterables pauses until a result is yielded from the buffer. - If None, all input elements are eagerly collected, and a task is - submitted for each. + If None, all input elements are eagerly collected, and + a task is submitted for each. Returns: - An iterator equivalent to: map(func, *iterables) but the calls may - be evaluated out-of-order. + An iterator equivalent to: map(func, *iterables) but the calls + may be evaluated out-of-order. Raises: - TimeoutError: If the entire result iterator could not be generated - before the given timeout. + TimeoutError: If the entire result iterator could not be + generated before the given timeout. Exception: If fn(*args) raises for any values. """ if chunksize < 1: diff --git a/Python314_4_x64_Template/Lib/concurrent/futures/thread.py b/Python314_6_x64_Template/Lib/concurrent/futures/thread.py similarity index 100% rename from Python314_4_x64_Template/Lib/concurrent/futures/thread.py rename to Python314_6_x64_Template/Lib/concurrent/futures/thread.py diff --git a/Python314_4_x64_Template/Lib/concurrent/interpreters/__init__.py b/Python314_6_x64_Template/Lib/concurrent/interpreters/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/concurrent/interpreters/__init__.py rename to Python314_6_x64_Template/Lib/concurrent/interpreters/__init__.py diff --git a/Python314_4_x64_Template/Lib/concurrent/interpreters/_crossinterp.py b/Python314_6_x64_Template/Lib/concurrent/interpreters/_crossinterp.py similarity index 100% rename from Python314_4_x64_Template/Lib/concurrent/interpreters/_crossinterp.py rename to Python314_6_x64_Template/Lib/concurrent/interpreters/_crossinterp.py diff --git a/Python314_4_x64_Template/Lib/concurrent/interpreters/_queues.py b/Python314_6_x64_Template/Lib/concurrent/interpreters/_queues.py similarity index 99% rename from Python314_4_x64_Template/Lib/concurrent/interpreters/_queues.py rename to Python314_6_x64_Template/Lib/concurrent/interpreters/_queues.py index 81ea1098d..56c947f7d 100644 --- a/Python314_4_x64_Template/Lib/concurrent/interpreters/_queues.py +++ b/Python314_6_x64_Template/Lib/concurrent/interpreters/_queues.py @@ -186,7 +186,8 @@ def put(self, obj, block=True, timeout=None, *, underlying data is actually shared. Furthermore, some types can be sent through a queue more efficiently than others. This group includes various immutable types like int, str, bytes, and - tuple (if the items are likewise efficiently shareable). See interpreters.is_shareable(). + tuple (if the items are likewise efficiently shareable). + See interpreters.is_shareable(). "unbounditems" controls the behavior of Queue.get() for the given object if the current interpreter (calling put()) is later diff --git a/Python314_4_x64_Template/Lib/configparser.py b/Python314_6_x64_Template/Lib/configparser.py similarity index 98% rename from Python314_4_x64_Template/Lib/configparser.py rename to Python314_6_x64_Template/Lib/configparser.py index d435a5c2f..a53ac8727 100644 --- a/Python314_4_x64_Template/Lib/configparser.py +++ b/Python314_6_x64_Template/Lib/configparser.py @@ -315,12 +315,15 @@ def __init__(self, source, *args): def append(self, lineno, line): self.errors.append((lineno, line)) - self.message += '\n\t[line %2d]: %s' % (lineno, repr(line)) + self.message += f'\n\t[line {lineno:2d}]: {line!r}' def combine(self, others): + messages = [self.message] for other in others: - for error in other.errors: - self.append(*error) + for lineno, line in other.errors: + self.errors.append((lineno, line)) + messages.append(f'\n\t[line {lineno:2d}]: {line!r}') + self.message = "".join(messages) return self @staticmethod @@ -613,7 +616,9 @@ class RawConfigParser(MutableMapping): \] # ] """ _OPT_TMPL = r""" - (?P

                                          # pre-release
+            [._-]?+
+            (?Palpha|a|beta|b|preview|pre|c|rc)
+            [._-]?+
+            (?P[0-9]+)?
+        )?+
+        (?P                                         # post release
+            (?:-(?P[0-9]+))
+            |
+            (?:
+                [._-]?
+                (?Ppost|rev|r)
+                [._-]?
+                (?P[0-9]+)?
+            )
+        )?+
+        (?P                                          # dev release
+            [._-]?+
+            (?Pdev)
+            [._-]?+
+            (?P[0-9]+)?
+        )?+
+    )
+    (?a:\+
+        (?P                                        # local version
+            [a-z0-9]+
+            (?:[._-][a-z0-9]+)*+
+        )
+    )?+
+"""
+
+_VERSION_PATTERN_OLD = _VERSION_PATTERN.replace("*+", "*").replace("?+", "?")
+
+# Possessive qualifiers were added in Python 3.11.
+# CPython 3.11.0-3.11.4 had a bug: https://github.com/python/cpython/pull/107795
+# Older PyPy also had a bug.
+VERSION_PATTERN = (
+    _VERSION_PATTERN_OLD
+    if (sys.implementation.name == "cpython" and sys.version_info < (3, 11, 5))
+    or (sys.implementation.name == "pypy" and sys.version_info < (3, 11, 13))
+    or sys.version_info < (3, 11)
+    else _VERSION_PATTERN
+)
+"""
+A string containing the regular expression used to match a valid version.
+
+The pattern is not anchored at either end, and is intended for embedding in larger
+expressions (for example, matching a version number as part of a file name). The
+regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
+flags set.
+
+.. versionchanged:: 26.0
+
+   The regex now uses possessive qualifiers on Python 3.11 if they are
+   supported (CPython 3.11.5+, PyPy 3.11.13+).
+
+:meta hide-value:
+"""
+
+
+# Validation pattern for local version in replace()
+_LOCAL_PATTERN = re.compile(r"[a-z0-9]+(?:[._-][a-z0-9]+)*", re.IGNORECASE | re.ASCII)
+
+# Fast path: If a version has only digits and dots then we
+# can skip the regex and parse it as a release segment
+_SIMPLE_VERSION_INDICATORS = frozenset(".0123456789")
+
+
+def _validate_epoch(value: object, /) -> int:
+    epoch = value or 0
+    if isinstance(epoch, int) and epoch >= 0:
+        return epoch
+    msg = f"epoch must be non-negative integer, got {epoch}"
+    raise InvalidVersion(msg)
+
+
+def _validate_release(value: object, /) -> tuple[int, ...]:
+    release = (0,) if value is None else value
+    if (
+        isinstance(release, tuple)
+        and len(release) > 0
+        and all(isinstance(i, int) and i >= 0 for i in release)
+    ):
+        return release
+    msg = f"release must be a non-empty tuple of non-negative integers, got {release}"
+    raise InvalidVersion(msg)
+
+
+def _validate_pre(value: object, /) -> tuple[Literal["a", "b", "rc"], int] | None:
+    if value is None:
+        return value
+    if isinstance(value, tuple) and len(value) == 2:
+        letter, number = value
+        letter = normalize_pre(letter)
+        if letter in {"a", "b", "rc"} and isinstance(number, int) and number >= 0:
+            # type checkers can't infer the Literal type here on letter
+            return (letter, number)  # type: ignore[return-value]
+    msg = f"pre must be a tuple of ('a'|'b'|'rc', non-negative int), got {value}"
+    raise InvalidVersion(msg)
+
+
+def _validate_post(value: object, /) -> tuple[Literal["post"], int] | None:
+    if value is None:
+        return value
+    if isinstance(value, int) and value >= 0:
+        return ("post", value)
+    msg = f"post must be non-negative integer, got {value}"
+    raise InvalidVersion(msg)
+
+
+def _validate_dev(value: object, /) -> tuple[Literal["dev"], int] | None:
+    if value is None:
+        return value
+    if isinstance(value, int) and value >= 0:
+        return ("dev", value)
+    msg = f"dev must be non-negative integer, got {value}"
+    raise InvalidVersion(msg)
+
+
+def _validate_local(value: object, /) -> LocalType | None:
+    if value is None:
+        return value
+    if isinstance(value, str) and _LOCAL_PATTERN.fullmatch(value):
+        return _parse_local_version(value)
+    msg = f"local must be a valid version string, got {value!r}"
+    raise InvalidVersion(msg)
+
+
+# Backward compatibility for internals before 26.0. Do not use.
+class _Version(NamedTuple):
+    epoch: int
+    release: tuple[int, ...]
+    dev: tuple[Literal["dev"], int] | None
+    pre: tuple[Literal["a", "b", "rc"], int] | None
+    post: tuple[Literal["post"], int] | None
+    local: LocalType | None
+
+
+class Version(_BaseVersion):
+    """This class abstracts handling of a project's versions.
+
+    A :class:`Version` instance is comparison aware and can be compared and
+    sorted using the standard Python interfaces.
+
+    >>> v1 = Version("1.0a5")
+    >>> v2 = Version("1.0")
+    >>> v1
+    
+    >>> v2
+    
+    >>> v1 < v2
+    True
+    >>> v1 == v2
+    False
+    >>> v1 > v2
+    False
+    >>> v1 >= v2
+    False
+    >>> v1 <= v2
+    True
+
+    :class:`Version` is immutable; use :meth:`__replace__` to change
+    part of a version.
+
+    Instances are safe to serialize with :mod:`pickle`. They use a stable
+    format so the same pickle can be loaded in future packaging releases.
+
+    .. versionchanged:: 26.2
+
+        Added a stable pickle format. Pickles created with packaging 26.2+ can
+        be unpickled with future releases.  Backward compatibility with pickles
+        from pip._vendor.packaging < 26.2 is supported but may be removed in a future
+        release.
+    """
+
+    __slots__ = (
+        "_dev",
+        "_epoch",
+        "_hash_cache",
+        "_key_cache",
+        "_local",
+        "_post",
+        "_pre",
+        "_release",
+    )
+    __match_args__ = ("_str",)
+    """
+    Pattern matching is supported on Python 3.10+.
+
+    .. versionadded:: 26.0
+
+    :meta hide-value:
+    """
+
+    _regex = re.compile(r"\s*" + VERSION_PATTERN + r"\s*", re.VERBOSE | re.IGNORECASE)
+
+    _epoch: int
+    _release: tuple[int, ...]
+    _dev: tuple[Literal["dev"], int] | None
+    _pre: tuple[Literal["a", "b", "rc"], int] | None
+    _post: tuple[Literal["post"], int] | None
+    _local: LocalType | None
+
+    _hash_cache: int | None
+    _key_cache: CmpKey | None
+
+    def __init__(self, version: str) -> None:
+        """Initialize a Version object.
+
+        :param version:
+            The string representation of a version which will be parsed and normalized
+            before use.
+        :raises InvalidVersion:
+            If the ``version`` does not conform to PEP 440 in any way then this
+            exception will be raised.
+        """
+        if _SIMPLE_VERSION_INDICATORS.issuperset(version):
+            try:
+                self._release = tuple(map(int, version.split(".")))
+            except ValueError:
+                # Empty parts (from "1..2", ".1", etc.) are invalid versions.
+                # Any other ValueError (e.g. int str-digits limit) should
+                # propagate to the caller.
+                if "" in version.split("."):
+                    raise InvalidVersion(f"Invalid version: {version!r}") from None
+                # TODO: remove "no cover" when Python 3.9 is dropped.
+                raise  # pragma: no cover
+
+            self._epoch = 0
+            self._pre = None
+            self._post = None
+            self._dev = None
+            self._local = None
+            self._key_cache = None
+            self._hash_cache = None
+            return
+
+        # Validate the version and parse it into pieces
+        match = self._regex.fullmatch(version)
+        if not match:
+            raise InvalidVersion(f"Invalid version: {version!r}")
+        self._epoch = int(match.group("epoch")) if match.group("epoch") else 0
+        self._release = tuple(map(int, match.group("release").split(".")))
+        # We can type ignore the assignments below because the regex guarantees
+        # the correct strings
+        self._pre = _parse_letter_version(match.group("pre_l"), match.group("pre_n"))  # type: ignore[assignment]
+        self._post = _parse_letter_version(  # type: ignore[assignment]
+            match.group("post_l"), match.group("post_n1") or match.group("post_n2")
+        )
+        self._dev = _parse_letter_version(match.group("dev_l"), match.group("dev_n"))  # type: ignore[assignment]
+        self._local = _parse_local_version(match.group("local"))
+
+        # Key which will be used for sorting
+        self._key_cache = None
+        self._hash_cache = None
+
+    @classmethod
+    def from_parts(
+        cls,
+        *,
+        epoch: int = 0,
+        release: tuple[int, ...],
+        pre: tuple[str, int] | None = None,
+        post: int | None = None,
+        dev: int | None = None,
+        local: str | None = None,
+    ) -> Self:
+        """
+        Return a new version composed of the various parts.
+
+        This allows you to build a version without going though a string and
+        running a regular expression. It normalizes pre-release strings. The
+        ``release=`` keyword argument is required.
+
+        >>> Version.from_parts(release=(1,2,3))
+        
+        >>> Version.from_parts(release=(0,1,0), pre=("b", 1))
+        
+
+        :param epoch:
+        :param release: This version tuple is required
+
+        .. versionadded:: 26.1
+        """
+        _epoch = _validate_epoch(epoch)
+        _release = _validate_release(release)
+        _pre = _validate_pre(pre) if pre is not None else None
+        _post = _validate_post(post) if post is not None else None
+        _dev = _validate_dev(dev) if dev is not None else None
+        _local = _validate_local(local) if local is not None else None
+
+        new_version = cls.__new__(cls)
+        new_version._key_cache = None
+        new_version._hash_cache = None
+        new_version._epoch = _epoch
+        new_version._release = _release
+        new_version._pre = _pre
+        new_version._post = _post
+        new_version._dev = _dev
+        new_version._local = _local
+
+        return new_version
+
+    def __replace__(self, **kwargs: Unpack[_VersionReplace]) -> Self:
+        """
+        __replace__(*, epoch=..., release=..., pre=..., post=..., dev=..., local=...)
+
+        Return a new version with parts replaced.
+
+        This returns a new version (unless no parts were changed). The
+        pre-release is normalized. Setting a value to ``None`` clears it.
+
+        >>> v = Version("1.2.3")
+        >>> v.__replace__(pre=("a", 1))
+        
+
+        :param int | None epoch:
+        :param tuple[int, ...] | None release:
+        :param tuple[str, int] | None pre:
+        :param int | None post:
+        :param int | None dev:
+        :param str | None local:
+
+        .. versionadded:: 26.0
+        .. versionchanged:: 26.1
+
+           The pre-release portion is now normalized.
+        """
+        epoch = _validate_epoch(kwargs["epoch"]) if "epoch" in kwargs else self._epoch
+        release = (
+            _validate_release(kwargs["release"])
+            if "release" in kwargs
+            else self._release
+        )
+        pre = _validate_pre(kwargs["pre"]) if "pre" in kwargs else self._pre
+        post = _validate_post(kwargs["post"]) if "post" in kwargs else self._post
+        dev = _validate_dev(kwargs["dev"]) if "dev" in kwargs else self._dev
+        local = _validate_local(kwargs["local"]) if "local" in kwargs else self._local
+
+        if (
+            epoch == self._epoch
+            and release == self._release
+            and pre == self._pre
+            and post == self._post
+            and dev == self._dev
+            and local == self._local
+        ):
+            return self
+
+        new_version = self.__class__.__new__(self.__class__)
+        new_version._key_cache = None
+        new_version._hash_cache = None
+        new_version._epoch = epoch
+        new_version._release = release
+        new_version._pre = pre
+        new_version._post = post
+        new_version._dev = dev
+        new_version._local = local
+
+        return new_version
+
+    @property
+    def _key(self) -> CmpKey:
+        if self._key_cache is None:
+            self._key_cache = _cmpkey(
+                self._epoch,
+                self._release,
+                self._pre,
+                self._post,
+                self._dev,
+                self._local,
+            )
+        return self._key_cache
+
+    # __hash__ must be defined when __eq__ is overridden,
+    # otherwise Python sets __hash__ to None.
+    def __hash__(self) -> int:
+        if (cached_hash := self._hash_cache) is not None:
+            return cached_hash
+
+        if (key := self._key_cache) is None:
+            self._key_cache = key = _cmpkey(
+                self._epoch,
+                self._release,
+                self._pre,
+                self._post,
+                self._dev,
+                self._local,
+            )
+        self._hash_cache = cached_hash = hash(key)
+        return cached_hash
+
+    # Override comparison methods to use direct _key_cache access
+    # This is faster than property access, especially before Python 3.12
+    def __lt__(self, other: _BaseVersion) -> bool:
+        if isinstance(other, Version):
+            if self._key_cache is None:
+                self._key_cache = _cmpkey(
+                    self._epoch,
+                    self._release,
+                    self._pre,
+                    self._post,
+                    self._dev,
+                    self._local,
+                )
+            if other._key_cache is None:
+                other._key_cache = _cmpkey(
+                    other._epoch,
+                    other._release,
+                    other._pre,
+                    other._post,
+                    other._dev,
+                    other._local,
+                )
+            return self._key_cache < other._key_cache
+
+        if not isinstance(other, _BaseVersion):
+            return NotImplemented
+
+        return super().__lt__(other)
+
+    def __le__(self, other: _BaseVersion) -> bool:
+        if isinstance(other, Version):
+            if self._key_cache is None:
+                self._key_cache = _cmpkey(
+                    self._epoch,
+                    self._release,
+                    self._pre,
+                    self._post,
+                    self._dev,
+                    self._local,
+                )
+            if other._key_cache is None:
+                other._key_cache = _cmpkey(
+                    other._epoch,
+                    other._release,
+                    other._pre,
+                    other._post,
+                    other._dev,
+                    other._local,
+                )
+            return self._key_cache <= other._key_cache
+
+        if not isinstance(other, _BaseVersion):
+            return NotImplemented
+
+        return super().__le__(other)
+
+    def __eq__(self, other: object) -> bool:
+        if isinstance(other, Version):
+            if self._key_cache is None:
+                self._key_cache = _cmpkey(
+                    self._epoch,
+                    self._release,
+                    self._pre,
+                    self._post,
+                    self._dev,
+                    self._local,
+                )
+            if other._key_cache is None:
+                other._key_cache = _cmpkey(
+                    other._epoch,
+                    other._release,
+                    other._pre,
+                    other._post,
+                    other._dev,
+                    other._local,
+                )
+            return self._key_cache == other._key_cache
+
+        if not isinstance(other, _BaseVersion):
+            return NotImplemented
+
+        return super().__eq__(other)
+
+    def __ge__(self, other: _BaseVersion) -> bool:
+        if isinstance(other, Version):
+            if self._key_cache is None:
+                self._key_cache = _cmpkey(
+                    self._epoch,
+                    self._release,
+                    self._pre,
+                    self._post,
+                    self._dev,
+                    self._local,
+                )
+            if other._key_cache is None:
+                other._key_cache = _cmpkey(
+                    other._epoch,
+                    other._release,
+                    other._pre,
+                    other._post,
+                    other._dev,
+                    other._local,
+                )
+            return self._key_cache >= other._key_cache
+
+        if not isinstance(other, _BaseVersion):
+            return NotImplemented
+
+        return super().__ge__(other)
+
+    def __gt__(self, other: _BaseVersion) -> bool:
+        if isinstance(other, Version):
+            if self._key_cache is None:
+                self._key_cache = _cmpkey(
+                    self._epoch,
+                    self._release,
+                    self._pre,
+                    self._post,
+                    self._dev,
+                    self._local,
+                )
+            if other._key_cache is None:
+                other._key_cache = _cmpkey(
+                    other._epoch,
+                    other._release,
+                    other._pre,
+                    other._post,
+                    other._dev,
+                    other._local,
+                )
+            return self._key_cache > other._key_cache
+
+        if not isinstance(other, _BaseVersion):
+            return NotImplemented
+
+        return super().__gt__(other)
+
+    def __ne__(self, other: object) -> bool:
+        if isinstance(other, Version):
+            if self._key_cache is None:
+                self._key_cache = _cmpkey(
+                    self._epoch,
+                    self._release,
+                    self._pre,
+                    self._post,
+                    self._dev,
+                    self._local,
+                )
+            if other._key_cache is None:
+                other._key_cache = _cmpkey(
+                    other._epoch,
+                    other._release,
+                    other._pre,
+                    other._post,
+                    other._dev,
+                    other._local,
+                )
+            return self._key_cache != other._key_cache
+
+        if not isinstance(other, _BaseVersion):
+            return NotImplemented
+
+        return super().__ne__(other)
+
+    def __getstate__(
+        self,
+    ) -> tuple[
+        int,
+        tuple[int, ...],
+        tuple[str, int] | None,
+        tuple[str, int] | None,
+        tuple[str, int] | None,
+        LocalType | None,
+    ]:
+        # Return state as a 6-item tuple for compactness:
+        #   (epoch, release, pre, post, dev, local)
+        # Cache members are excluded and will be recomputed on demand
+        return (
+            self._epoch,
+            self._release,
+            self._pre,
+            self._post,
+            self._dev,
+            self._local,
+        )
+
+    def __setstate__(self, state: object) -> None:
+        # Always discard cached values — they may contain stale references
+        # (e.g. packaging._structures.InfinityType from pre-26.1 pickles)
+        # and will be recomputed on demand from the core fields above.
+        self._key_cache = None
+        self._hash_cache = None
+
+        if isinstance(state, tuple):
+            if len(state) == 6:
+                # New format (26.2+): (epoch, release, pre, post, dev, local)
+                (
+                    self._epoch,
+                    self._release,
+                    self._pre,
+                    self._post,
+                    self._dev,
+                    self._local,
+                ) = state
+                return
+            if len(state) == 2:
+                # Format (packaging 26.0-26.1): (None, {slot: value}).
+                _, slot_dict = state
+                if isinstance(slot_dict, dict):
+                    self._epoch = slot_dict["_epoch"]
+                    self._release = slot_dict["_release"]
+                    self._pre = slot_dict.get("_pre")
+                    self._post = slot_dict.get("_post")
+                    self._dev = slot_dict.get("_dev")
+                    self._local = slot_dict.get("_local")
+                    return
+        if isinstance(state, dict):
+            # Old format (packaging <= 25.x, no __slots__): state is a plain
+            # dict with "_version" (_Version NamedTuple) and "_key" entries.
+            version_nt = state.get("_version")
+            if version_nt is not None:
+                self._epoch = version_nt.epoch
+                self._release = version_nt.release
+                self._pre = version_nt.pre
+                self._post = version_nt.post
+                self._dev = version_nt.dev
+                self._local = version_nt.local
+                return
+
+        raise TypeError(f"Cannot restore Version from {state!r}")
+
+    @property
+    @_deprecated("Version._version is private and will be removed soon")
+    def _version(self) -> _Version:
+        return _Version(
+            self._epoch, self._release, self._dev, self._pre, self._post, self._local
+        )
+
+    @_version.setter
+    @_deprecated("Version._version is private and will be removed soon")
+    def _version(self, value: _Version) -> None:
+        self._epoch = value.epoch
+        self._release = value.release
+        self._dev = value.dev
+        self._pre = value.pre
+        self._post = value.post
+        self._local = value.local
+        self._key_cache = None
+        self._hash_cache = None
+
+    def __repr__(self) -> str:
+        """A representation of the Version that shows all internal state.
+
+        >>> Version('1.0.0')
+        
+        """
+        return f"<{self.__class__.__name__}({str(self)!r})>"
+
+    def __str__(self) -> str:
+        """A string representation of the version that can be round-tripped.
+
+        >>> str(Version("1.0a5"))
+        '1.0a5'
+        """
+        # This is a hot function, so not calling self.base_version
+        version = ".".join(map(str, self.release))
+
+        # Epoch
+        if self.epoch:
+            version = f"{self.epoch}!{version}"
+
+        # Pre-release
+        if self.pre is not None:
+            version += "".join(map(str, self.pre))
+
+        # Post-release
+        if self.post is not None:
+            version += f".post{self.post}"
+
+        # Development release
+        if self.dev is not None:
+            version += f".dev{self.dev}"
+
+        # Local version segment
+        if self.local is not None:
+            version += f"+{self.local}"
+
+        return version
+
+    @property
+    def _str(self) -> str:
+        """Internal property for match_args"""
+        return str(self)
+
+    @property
+    def epoch(self) -> int:
+        """The epoch of the version.
+
+        >>> Version("2.0.0").epoch
+        0
+        >>> Version("1!2.0.0").epoch
+        1
+        """
+        return self._epoch
+
+    @property
+    def release(self) -> tuple[int, ...]:
+        """The components of the "release" segment of the version.
+
+        >>> Version("1.2.3").release
+        (1, 2, 3)
+        >>> Version("2.0.0").release
+        (2, 0, 0)
+        >>> Version("1!2.0.0.post0").release
+        (2, 0, 0)
+
+        Includes trailing zeroes but not the epoch or any pre-release / development /
+        post-release suffixes.
+        """
+        return self._release
+
+    @property
+    def pre(self) -> tuple[Literal["a", "b", "rc"], int] | None:
+        """The pre-release segment of the version.
+
+        >>> print(Version("1.2.3").pre)
+        None
+        >>> Version("1.2.3a1").pre
+        ('a', 1)
+        >>> Version("1.2.3b1").pre
+        ('b', 1)
+        >>> Version("1.2.3rc1").pre
+        ('rc', 1)
+        """
+        return self._pre
+
+    @property
+    def post(self) -> int | None:
+        """The post-release number of the version.
+
+        >>> print(Version("1.2.3").post)
+        None
+        >>> Version("1.2.3.post1").post
+        1
+        """
+        return self._post[1] if self._post else None
+
+    @property
+    def dev(self) -> int | None:
+        """The development number of the version.
+
+        >>> print(Version("1.2.3").dev)
+        None
+        >>> Version("1.2.3.dev1").dev
+        1
+        """
+        return self._dev[1] if self._dev else None
+
+    @property
+    def local(self) -> str | None:
+        """The local version segment of the version.
+
+        >>> print(Version("1.2.3").local)
+        None
+        >>> Version("1.2.3+abc").local
+        'abc'
+        """
+        if self._local:
+            return ".".join(str(x) for x in self._local)
+        else:
+            return None
+
+    @property
+    def public(self) -> str:
+        """The public portion of the version.
+
+        This returns a string. If you want a :class:`Version` again and care
+        about performance, use ``v.__replace__(local=None)`` instead.
+
+        >>> Version("1.2.3").public
+        '1.2.3'
+        >>> Version("1.2.3+abc").public
+        '1.2.3'
+        >>> Version("1!1.2.3dev1+abc").public
+        '1!1.2.3.dev1'
+        """
+        return str(self).split("+", 1)[0]
+
+    @property
+    def base_version(self) -> str:
+        """The "base version" of the version.
+
+        This returns a string. If you want a :class:`Version` again and care
+        about performance, use
+        ``v.__replace__(pre=None, post=None, dev=None, local=None)`` instead.
+
+        >>> Version("1.2.3").base_version
+        '1.2.3'
+        >>> Version("1.2.3+abc").base_version
+        '1.2.3'
+        >>> Version("1!1.2.3dev1+abc").base_version
+        '1!1.2.3'
+
+        The "base version" is the public version of the project without any pre or post
+        release markers.
+        """
+        release_segment = ".".join(map(str, self.release))
+        return f"{self.epoch}!{release_segment}" if self.epoch else release_segment
+
+    @property
+    def is_prerelease(self) -> bool:
+        """Whether this version is a pre-release.
+
+        >>> Version("1.2.3").is_prerelease
+        False
+        >>> Version("1.2.3a1").is_prerelease
+        True
+        >>> Version("1.2.3b1").is_prerelease
+        True
+        >>> Version("1.2.3rc1").is_prerelease
+        True
+        >>> Version("1.2.3dev1").is_prerelease
+        True
+        """
+        return self.dev is not None or self.pre is not None
+
+    @property
+    def is_postrelease(self) -> bool:
+        """Whether this version is a post-release.
+
+        >>> Version("1.2.3").is_postrelease
+        False
+        >>> Version("1.2.3.post1").is_postrelease
+        True
+        """
+        return self.post is not None
+
+    @property
+    def is_devrelease(self) -> bool:
+        """Whether this version is a development release.
+
+        >>> Version("1.2.3").is_devrelease
+        False
+        >>> Version("1.2.3.dev1").is_devrelease
+        True
+        """
+        return self.dev is not None
+
+    @property
+    def major(self) -> int:
+        """The first item of :attr:`release` or ``0`` if unavailable.
+
+        >>> Version("1.2.3").major
+        1
+        """
+        return self.release[0] if len(self.release) >= 1 else 0
+
+    @property
+    def minor(self) -> int:
+        """The second item of :attr:`release` or ``0`` if unavailable.
+
+        >>> Version("1.2.3").minor
+        2
+        >>> Version("1").minor
+        0
+        """
+        return self.release[1] if len(self.release) >= 2 else 0
+
+    @property
+    def micro(self) -> int:
+        """The third item of :attr:`release` or ``0`` if unavailable.
+
+        >>> Version("1.2.3").micro
+        3
+        >>> Version("1").micro
+        0
+        """
+        return self.release[2] if len(self.release) >= 3 else 0
+
+
+class _TrimmedRelease(Version):
+    __slots__ = ()
+
+    def __init__(self, version: str | Version) -> None:
+        if isinstance(version, Version):
+            self._epoch = version._epoch
+            self._release = version._release
+            self._dev = version._dev
+            self._pre = version._pre
+            self._post = version._post
+            self._local = version._local
+            self._key_cache = version._key_cache
+            return
+        super().__init__(version)  # pragma: no cover
+
+    @property
+    def release(self) -> tuple[int, ...]:
+        """
+        Release segment without any trailing zeros.
+
+        >>> _TrimmedRelease('1.0.0').release
+        (1,)
+        >>> _TrimmedRelease('0.0').release
+        (0,)
+        """
+        # This leaves one 0.
+        rel = super().release
+        len_release = len(rel)
+        i = len_release
+        while i > 1 and rel[i - 1] == 0:
+            i -= 1
+        return rel if i == len_release else rel[:i]
+
+
+def _parse_letter_version(
+    letter: str | None, number: str | bytes | SupportsInt | None
+) -> tuple[str, int] | None:
+    if letter:
+        # We normalize any letters to their lower case form
+        letter = letter.lower()
+
+        # We consider some words to be alternate spellings of other words and
+        # in those cases we want to normalize the spellings to our preferred
+        # spelling.
+        letter = _LETTER_NORMALIZATION.get(letter, letter)
+
+        # We consider there to be an implicit 0 in a pre-release if there is
+        # not a numeral associated with it.
+        return letter, int(number or 0)
+
+    if number:
+        # We assume if we are given a number, but we are not given a letter
+        # then this is using the implicit post release syntax (e.g. 1.0-1)
+        return "post", int(number)
+
+    return None
+
+
+_local_version_separators = re.compile(r"[\._-]")
+
+
+def _parse_local_version(local: str | None) -> LocalType | None:
+    """
+    Takes a string like ``"abc.1.twelve"`` and turns it into
+    ``("abc", 1, "twelve")``.
+    """
+    if local is not None:
+        return tuple(
+            part.lower() if not part.isdigit() else int(part)
+            for part in _local_version_separators.split(local)
+        )
+    return None
+
+
+# Sort ranks for pre-release: dev-only < a < b < rc < stable (no pre-release).
+_PRE_RANK = {"a": 0, "b": 1, "rc": 2}
+_PRE_RANK_DEV_ONLY = -1  # sorts before a(0)
+_PRE_RANK_STABLE = 3  # sorts after rc(2)
+
+# In local version segments, strings sort before ints per PEP 440.
+_LOCAL_STR_RANK = -1  # sorts before all non-negative ints
+
+# Pre-computed suffix for stable releases (no pre, post, or dev segments).
+# See _cmpkey() for the suffix layout.
+_STABLE_SUFFIX = (_PRE_RANK_STABLE, 0, 0, 0, 1, 0)
+
+
+def _cmpkey(
+    epoch: int,
+    release: tuple[int, ...],
+    pre: tuple[str, int] | None,
+    post: tuple[str, int] | None,
+    dev: tuple[str, int] | None,
+    local: LocalType | None,
+) -> CmpKey:
+    """Build a comparison key for PEP 440 ordering.
+
+    Returns ``(epoch, release, suffix)`` or
+    ``(epoch, release, suffix, local)`` so that plain tuple
+    comparison gives the correct order.
+
+    Trailing zeros are stripped from the release so that ``1.0.0 == 1``.
+
+    The suffix is a flat 6-int tuple that encodes pre/post/dev:
+    ``(pre_rank, pre_n, post_rank, post_n, dev_rank, dev_n)``
+
+    pre_rank: dev-only=-1, a=0, b=1, rc=2, no-pre=3
+        Dev-only releases (no pre or post) get -1 so they sort before
+        any alpha/beta/rc.  Releases without a pre-release tag get 3
+        so they sort after rc.
+    post_rank: no-post=0, post=1
+        Releases without a post segment sort before those with one.
+    dev_rank: dev=0, no-dev=1
+        Releases without a dev segment sort after those with one.
+
+    Local segments use ``(n, "")`` for ints and ``(-1, s)`` for strings,
+    following PEP 440: strings sort before ints, strings compare
+    lexicographically, ints compare numerically, and shorter segments
+    sort before longer when prefixes match.  Versions without a local
+    segment sort before those with one (3-tuple < 4-tuple).
+
+    >>> _cmpkey(0, (1, 0, 0), None, None, None, None)
+    (0, (1,), (3, 0, 0, 0, 1, 0))
+    >>> _cmpkey(0, (1,), ("a", 1), None, None, None)
+    (0, (1,), (0, 1, 0, 0, 1, 0))
+    >>> _cmpkey(0, (1,), None, None, None, ("ubuntu", 1))
+    (0, (1,), (3, 0, 0, 0, 1, 0), ((-1, 'ubuntu'), (1, '')))
+    """
+    # Strip trailing zeros: 1.0.0 compares equal to 1.
+    len_release = len(release)
+    i = len_release
+    while i and release[i - 1] == 0:
+        i -= 1
+    trimmed = release if i == len_release else release[:i]
+
+    # Fast path: stable release with no local segment.
+    if pre is None and post is None and dev is None and local is None:
+        return epoch, trimmed, _STABLE_SUFFIX
+
+    if pre is None and post is None and dev is not None:
+        # dev-only (e.g. 1.0.dev1) sorts before all pre-releases.
+        pre_rank, pre_n = _PRE_RANK_DEV_ONLY, 0
+    elif pre is None:
+        pre_rank, pre_n = _PRE_RANK_STABLE, 0
+    else:
+        pre_rank, pre_n = _PRE_RANK[pre[0]], pre[1]
+
+    post_rank = 0 if post is None else 1
+    post_n = 0 if post is None else post[1]
+
+    dev_rank = 1 if dev is None else 0
+    dev_n = 0 if dev is None else dev[1]
+
+    suffix = (pre_rank, pre_n, post_rank, post_n, dev_rank, dev_n)
+
+    if local is None:
+        return epoch, trimmed, suffix
+
+    cmp_local: CmpLocalType = tuple(
+        (seg, "") if isinstance(seg, int) else (_LOCAL_STR_RANK, seg) for seg in local
+    )
+    return epoch, trimmed, suffix, cmp_local
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..0a7d36ad0
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__init__.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__main__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__main__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__main__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__main__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..d9d4159f2
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-314.pyc
new file mode 100644
index 000000000..fcc4feae8
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-314.pyc
similarity index 94%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-314.pyc
index f54f9b785..2b5405130 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-314.pyc
new file mode 100644
index 000000000..2f93376c8
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-314.pyc
similarity index 94%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-314.pyc
index 610ffaec1..64e164624 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-314.pyc
index 4ed789e42..fd12ae257 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-314.pyc
new file mode 100644
index 000000000..8b6e021f7
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-314.pyc
index ce24ec6f8..41701f34d 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/android.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/android.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/android.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/android.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/api.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/api.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/api.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/api.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/macos.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/macos.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/macos.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/macos.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/packaging/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/py.typed
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/unix.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/unix.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/unix.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/unix.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/version.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/version.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/version.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/version.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/windows.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/windows.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/windows.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/windows.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__init__.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__main__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__main__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__main__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__main__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..d0df4026a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-314.pyc
new file mode 100644
index 000000000..cb1dcc8eb
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-314.pyc
new file mode 100644
index 000000000..8c84f9e10
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-314.pyc
similarity index 88%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-314.pyc
index b291a3277..f3a70bd78 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-314.pyc
similarity index 91%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-314.pyc
index c6f602f9a..0416dfb50 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-314.pyc
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-314.pyc
index 8f90802e8..abf594e69 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-314.pyc
similarity index 76%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-314.pyc
index 9357db3a4..c2965e613 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-314.pyc
similarity index 81%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-314.pyc
index 20217084b..e7d5e4b0d 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-314.pyc
similarity index 90%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-314.pyc
index 73a94826c..942836ad2 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-314.pyc
new file mode 100644
index 000000000..02a251149
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-314.pyc
similarity index 93%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-314.pyc
index e4d606011..68046c741 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-314.pyc
new file mode 100644
index 000000000..d5d35de86
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-314.pyc
new file mode 100644
index 000000000..93c584487
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-314.pyc
index ca10257e1..28e3386de 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-314.pyc
new file mode 100644
index 000000000..91892fab8
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/console.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/console.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/console.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/console.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/filter.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/filter.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/filter.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/filter.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..b80cbe354
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatter.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatter.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatter.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatter.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..a3cdf9c4f
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-314.pyc
new file mode 100644
index 000000000..a7d407ac4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexer.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexer.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexer.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexer.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..ff23c670b
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-314.pyc
new file mode 100644
index 000000000..2c52f0b52
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-314.pyc
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-314.pyc
index 646d6c628..a14ef96f1 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/python.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/python.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/python.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/lexers/python.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/modeline.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/modeline.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/modeline.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/modeline.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/plugin.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/plugin.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/plugin.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/plugin.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/regexopt.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/regexopt.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/regexopt.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/regexopt.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/scanner.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/scanner.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/scanner.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/scanner.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/sphinxext.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/sphinxext.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/sphinxext.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/sphinxext.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/style.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/style.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/style.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/style.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..42db3db25
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-314.pyc
new file mode 100644
index 000000000..2d3ca4872
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/token.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/token.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/token.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/token.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/unistring.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/unistring.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/unistring.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/unistring.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/util.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/util.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pygments/util.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pygments/util.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..191fccfd9
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-314.pyc
index 0f6a8e5a5..69a629b3e 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..fc20874a4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-314.pyc
index c553d0da0..db9eead2a 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/platformdirs/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/LICENSE
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__init__.py
new file mode 100644
index 000000000..81d38590a
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__init__.py
@@ -0,0 +1,178 @@
+#   __
+#  /__)  _  _     _   _ _/   _
+# / (   (- (/ (/ (- _)  /  _)
+#          /
+
+"""
+Requests HTTP Library
+~~~~~~~~~~~~~~~~~~~~~
+
+Requests is an HTTP library, written in Python, for human beings.
+Basic GET usage:
+
+   >>> import requests
+   >>> r = requests.get('https://www.python.org')
+   >>> r.status_code
+   200
+   >>> b'Python is a programming language' in r.content
+   True
+
+... or POST:
+
+   >>> payload = dict(key1='value1', key2='value2')
+   >>> r = requests.post('https://httpbin.org/post', data=payload)
+   >>> print(r.text)
+   {
+     ...
+     "form": {
+       "key1": "value1",
+       "key2": "value2"
+     },
+     ...
+   }
+
+The other HTTP methods are supported - see `requests.api`. Full documentation
+is at .
+
+:copyright: (c) 2017 by Kenneth Reitz.
+:license: Apache 2.0, see LICENSE for more details.
+"""
+
+import warnings
+
+from pip._vendor import urllib3
+
+from .exceptions import RequestsDependencyWarning
+
+charset_normalizer_version = None
+chardet_version = None
+
+
+def check_compatibility(urllib3_version, chardet_version, charset_normalizer_version):
+    urllib3_version = urllib3_version.split(".")
+    assert urllib3_version != ["dev"]  # Verify urllib3 isn't installed from git.
+
+    # Sometimes, urllib3 only reports its version as 16.1.
+    if len(urllib3_version) == 2:
+        urllib3_version.append("0")
+
+    # Check urllib3 for compatibility.
+    major, minor, patch = urllib3_version  # noqa: F811
+    major, minor, patch = int(major), int(minor), int(patch)
+    # urllib3 >= 1.21.1
+    assert major >= 1
+    if major == 1:
+        assert minor >= 21
+
+    # Check charset_normalizer for compatibility.
+    if chardet_version:
+        major, minor, patch = chardet_version.split(".")[:3]
+        major, minor, patch = int(major), int(minor), int(patch)
+        # chardet_version >= 3.0.2, < 8.0.0
+        assert (3, 0, 2) <= (major, minor, patch) < (8, 0, 0)
+    elif charset_normalizer_version:
+        major, minor, patch = charset_normalizer_version.split(".")[:3]
+        major, minor, patch = int(major), int(minor), int(patch)
+        # charset_normalizer >= 2.0.0 < 4.0.0
+        assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0)
+    else:
+        # pip does not need or use character detection
+        pass
+
+
+def _check_cryptography(cryptography_version):
+    # cryptography < 1.3.4
+    try:
+        cryptography_version = list(map(int, cryptography_version.split(".")))
+    except ValueError:
+        return
+
+    if cryptography_version < [1, 3, 4]:
+        warning = (
+            f"Old version of cryptography ({cryptography_version}) may cause slowdown."
+        )
+        warnings.warn(warning, RequestsDependencyWarning)
+
+
+# Check imported dependencies for compatibility.
+try:
+    check_compatibility(
+        urllib3.__version__, chardet_version, charset_normalizer_version
+    )
+except (AssertionError, ValueError):
+    warnings.warn(
+        f"urllib3 ({urllib3.__version__}) or chardet "
+        f"({chardet_version})/charset_normalizer ({charset_normalizer_version}) "
+        "doesn't match a supported version!",
+        RequestsDependencyWarning,
+    )
+
+# Attempt to enable urllib3's fallback for SNI support
+# if the standard library doesn't support SNI or the
+# 'ssl' library isn't available.
+try:
+    # Note: This logic prevents upgrading cryptography on Windows, if imported
+    #       as part of pip.
+    from pip._internal.utils.compat import WINDOWS
+    if not WINDOWS:
+        raise ImportError("pip internals: don't import cryptography on Windows")
+    try:
+        import ssl
+    except ImportError:
+        ssl = None
+
+    if not getattr(ssl, "HAS_SNI", False):
+        from pip._vendor.urllib3.contrib import pyopenssl
+
+        pyopenssl.inject_into_urllib3()
+
+        # Check cryptography version
+        from cryptography import __version__ as cryptography_version
+
+        _check_cryptography(cryptography_version)
+except ImportError:
+    pass
+
+# urllib3's DependencyWarnings should be silenced.
+from pip._vendor.urllib3.exceptions import DependencyWarning
+
+warnings.simplefilter("ignore", DependencyWarning)
+
+# Set default logging handler to avoid "No handler found" warnings.
+import logging
+from logging import NullHandler
+
+from . import packages, utils
+from .__version__ import (
+    __author__,
+    __author_email__,
+    __build__,
+    __cake__,
+    __copyright__,
+    __description__,
+    __license__,
+    __title__,
+    __url__,
+    __version__,
+)
+from .api import delete, get, head, options, patch, post, put, request
+from .exceptions import (
+    ConnectionError,
+    ConnectTimeout,
+    FileModeWarning,
+    HTTPError,
+    JSONDecodeError,
+    ReadTimeout,
+    RequestException,
+    Timeout,
+    TooManyRedirects,
+    URLRequired,
+)
+from .models import PreparedRequest, Request, Response
+from .sessions import Session, session
+from .status_codes import codes
+
+logging.getLogger(__name__).addHandler(NullHandler())
+
+# FileModeWarnings go off per the default.
+warnings.simplefilter("default", FileModeWarning, append=True)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..175742c55
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-314.pyc
new file mode 100644
index 000000000..8a8fe8b86
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-314.pyc
new file mode 100644
index 000000000..88b9c2c48
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-314.pyc
new file mode 100644
index 000000000..dee630f9b
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/api.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/api.cpython-314.pyc
new file mode 100644
index 000000000..c7de3f127
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/api.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-314.pyc
new file mode 100644
index 000000000..08fda898d
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-314.pyc
new file mode 100644
index 000000000..f2b5f3323
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-314.pyc
new file mode 100644
index 000000000..887d5b931
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-314.pyc
new file mode 100644
index 000000000..7f697143f
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-314.pyc
new file mode 100644
index 000000000..6d6dbd914
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/help.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/help.cpython-314.pyc
new file mode 100644
index 000000000..9ec85fea6
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/help.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-314.pyc
new file mode 100644
index 000000000..83fe87088
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/models.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/models.cpython-314.pyc
similarity index 84%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/models.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/models.cpython-314.pyc
index 07632c748..014d5b11d 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/models.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/models.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-314.pyc
similarity index 82%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-314.pyc
index aed684b82..8dd417172 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-314.pyc
similarity index 90%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-314.pyc
index f3132f7fb..db70033b9 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-314.pyc
new file mode 100644
index 000000000..33a68032c
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-314.pyc
new file mode 100644
index 000000000..11e8fbfc6
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-314.pyc
new file mode 100644
index 000000000..9826d6ce6
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__version__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__version__.py
similarity index 89%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__version__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__version__.py
index effdd98cf..7f8a52c85 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/__version__.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/__version__.py
@@ -5,8 +5,8 @@
 __title__ = "requests"
 __description__ = "Python HTTP for Humans."
 __url__ = "https://requests.readthedocs.io"
-__version__ = "2.32.5"
-__build__ = 0x023205
+__version__ = "2.33.1"
+__build__ = 0x023301
 __author__ = "Kenneth Reitz"
 __author_email__ = "me@kennethreitz.org"
 __license__ = "Apache-2.0"
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/_internal_utils.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/_internal_utils.py
similarity index 83%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/_internal_utils.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/_internal_utils.py
index f2cf635e2..b7cf4695b 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/_internal_utils.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/_internal_utils.py
@@ -5,14 +5,15 @@
 Provides utility functions that are consumed internally by Requests
 which depend on extremely few external helpers (such as compat)
 """
+
 import re
 
 from .compat import builtin_str
 
-_VALID_HEADER_NAME_RE_BYTE = re.compile(rb"^[^:\s][^:\r\n]*$")
-_VALID_HEADER_NAME_RE_STR = re.compile(r"^[^:\s][^:\r\n]*$")
-_VALID_HEADER_VALUE_RE_BYTE = re.compile(rb"^\S[^\r\n]*$|^$")
-_VALID_HEADER_VALUE_RE_STR = re.compile(r"^\S[^\r\n]*$|^$")
+_VALID_HEADER_NAME_RE_BYTE = re.compile(rb"^[^:\s][^:\r\n]*\Z")
+_VALID_HEADER_NAME_RE_STR = re.compile(r"^[^:\s][^:\r\n]*\Z")
+_VALID_HEADER_VALUE_RE_BYTE = re.compile(rb"^\S[^\r\n]*\Z|^\Z")
+_VALID_HEADER_VALUE_RE_STR = re.compile(r"^\S[^\r\n]*\Z|^\Z")
 
 _HEADER_VALIDATORS_STR = (_VALID_HEADER_NAME_RE_STR, _VALID_HEADER_VALUE_RE_STR)
 _HEADER_VALIDATORS_BYTE = (_VALID_HEADER_NAME_RE_BYTE, _VALID_HEADER_VALUE_RE_BYTE)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/adapters.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/adapters.py
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/adapters.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/adapters.py
index 67ccebcbe..da8959e77 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/adapters.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/adapters.py
@@ -11,17 +11,19 @@
 import typing
 import warnings
 
-from pip._vendor.urllib3.exceptions import ClosedPoolError, ConnectTimeoutError
-from pip._vendor.urllib3.exceptions import HTTPError as _HTTPError
-from pip._vendor.urllib3.exceptions import InvalidHeader as _InvalidHeader
 from pip._vendor.urllib3.exceptions import (
+    ClosedPoolError,
+    ConnectTimeoutError,
     LocationValueError,
     MaxRetryError,
     NewConnectionError,
     ProtocolError,
+    ReadTimeoutError,
+    ResponseError,
 )
+from pip._vendor.urllib3.exceptions import HTTPError as _HTTPError
+from pip._vendor.urllib3.exceptions import InvalidHeader as _InvalidHeader
 from pip._vendor.urllib3.exceptions import ProxyError as _ProxyError
-from pip._vendor.urllib3.exceptions import ReadTimeoutError, ResponseError
 from pip._vendor.urllib3.exceptions import SSLError as _SSLError
 from pip._vendor.urllib3.poolmanager import PoolManager, proxy_from_url
 from pip._vendor.urllib3.util import Timeout as TimeoutSauce
@@ -47,7 +49,6 @@
 from .structures import CaseInsensitiveDict
 from .utils import (
     DEFAULT_CA_BUNDLE_PATH,
-    extract_zipped_paths,
     get_auth_from_url,
     get_encoding_from_headers,
     prepend_scheme_if_needed,
@@ -76,9 +77,9 @@ def SOCKSProxyManager(*args, **kwargs):
 def _urllib3_request_context(
     request: "PreparedRequest",
     verify: "bool | str | None",
-    client_cert: "typing.Tuple[str, str] | str | None",
+    client_cert: "tuple[str, str] | str | None",
     poolmanager: "PoolManager",
-) -> "(typing.Dict[str, typing.Any], typing.Dict[str, typing.Any])":
+) -> "(dict[str, typing.Any], dict[str, typing.Any])":
     host_params = {}
     pool_kwargs = {}
     parsed_request_url = urlparse(request.url)
@@ -297,7 +298,7 @@ def cert_verify(self, conn, url, verify, cert):
                 cert_loc = verify
 
             if not cert_loc:
-                cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
+                cert_loc = DEFAULT_CA_BUNDLE_PATH
 
             if not cert_loc or not os.path.exists(cert_loc):
                 raise OSError(
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/api.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/api.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/api.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/api.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/auth.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/auth.py
new file mode 100644
index 000000000..c39b64518
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/auth.py
@@ -0,0 +1,314 @@
+"""
+requests.auth
+~~~~~~~~~~~~~
+
+This module contains the authentication handlers for Requests.
+"""
+
+import hashlib
+import os
+import re
+import threading
+import time
+import warnings
+from base64 import b64encode
+
+from ._internal_utils import to_native_string
+from .compat import basestring, str, urlparse
+from .cookies import extract_cookies_to_jar
+from .utils import parse_dict_header
+
+CONTENT_TYPE_FORM_URLENCODED = "application/x-www-form-urlencoded"
+CONTENT_TYPE_MULTI_PART = "multipart/form-data"
+
+
+def _basic_auth_str(username, password):
+    """Returns a Basic Auth string."""
+
+    # "I want us to put a big-ol' comment on top of it that
+    # says that this behaviour is dumb but we need to preserve
+    # it because people are relying on it."
+    #    - Lukasa
+    #
+    # These are here solely to maintain backwards compatibility
+    # for things like ints. This will be removed in 3.0.0.
+    if not isinstance(username, basestring):
+        warnings.warn(
+            "Non-string usernames will no longer be supported in Requests "
+            f"3.0.0. Please convert the object you've passed in ({username!r}) to "
+            "a string or bytes object in the near future to avoid "
+            "problems.",
+            category=DeprecationWarning,
+        )
+        username = str(username)
+
+    if not isinstance(password, basestring):
+        warnings.warn(
+            "Non-string passwords will no longer be supported in Requests "
+            f"3.0.0. Please convert the object you've passed in ({type(password)!r}) to "
+            "a string or bytes object in the near future to avoid "
+            "problems.",
+            category=DeprecationWarning,
+        )
+        password = str(password)
+    # -- End Removal --
+
+    if isinstance(username, str):
+        username = username.encode("latin1")
+
+    if isinstance(password, str):
+        password = password.encode("latin1")
+
+    authstr = "Basic " + to_native_string(
+        b64encode(b":".join((username, password))).strip()
+    )
+
+    return authstr
+
+
+class AuthBase:
+    """Base class that all auth implementations derive from"""
+
+    def __call__(self, r):
+        raise NotImplementedError("Auth hooks must be callable.")
+
+
+class HTTPBasicAuth(AuthBase):
+    """Attaches HTTP Basic Authentication to the given Request object."""
+
+    def __init__(self, username, password):
+        self.username = username
+        self.password = password
+
+    def __eq__(self, other):
+        return all(
+            [
+                self.username == getattr(other, "username", None),
+                self.password == getattr(other, "password", None),
+            ]
+        )
+
+    def __ne__(self, other):
+        return not self == other
+
+    def __call__(self, r):
+        r.headers["Authorization"] = _basic_auth_str(self.username, self.password)
+        return r
+
+
+class HTTPProxyAuth(HTTPBasicAuth):
+    """Attaches HTTP Proxy Authentication to a given Request object."""
+
+    def __call__(self, r):
+        r.headers["Proxy-Authorization"] = _basic_auth_str(self.username, self.password)
+        return r
+
+
+class HTTPDigestAuth(AuthBase):
+    """Attaches HTTP Digest Authentication to the given Request object."""
+
+    def __init__(self, username, password):
+        self.username = username
+        self.password = password
+        # Keep state in per-thread local storage
+        self._thread_local = threading.local()
+
+    def init_per_thread_state(self):
+        # Ensure state is initialized just once per-thread
+        if not hasattr(self._thread_local, "init"):
+            self._thread_local.init = True
+            self._thread_local.last_nonce = ""
+            self._thread_local.nonce_count = 0
+            self._thread_local.chal = {}
+            self._thread_local.pos = None
+            self._thread_local.num_401_calls = None
+
+    def build_digest_header(self, method, url):
+        """
+        :rtype: str
+        """
+
+        realm = self._thread_local.chal["realm"]
+        nonce = self._thread_local.chal["nonce"]
+        qop = self._thread_local.chal.get("qop")
+        algorithm = self._thread_local.chal.get("algorithm")
+        opaque = self._thread_local.chal.get("opaque")
+        hash_utf8 = None
+
+        if algorithm is None:
+            _algorithm = "MD5"
+        else:
+            _algorithm = algorithm.upper()
+        # lambdas assume digest modules are imported at the top level
+        if _algorithm == "MD5" or _algorithm == "MD5-SESS":
+
+            def md5_utf8(x):
+                if isinstance(x, str):
+                    x = x.encode("utf-8")
+                return hashlib.md5(x).hexdigest()
+
+            hash_utf8 = md5_utf8
+        elif _algorithm == "SHA":
+
+            def sha_utf8(x):
+                if isinstance(x, str):
+                    x = x.encode("utf-8")
+                return hashlib.sha1(x).hexdigest()
+
+            hash_utf8 = sha_utf8
+        elif _algorithm == "SHA-256":
+
+            def sha256_utf8(x):
+                if isinstance(x, str):
+                    x = x.encode("utf-8")
+                return hashlib.sha256(x).hexdigest()
+
+            hash_utf8 = sha256_utf8
+        elif _algorithm == "SHA-512":
+
+            def sha512_utf8(x):
+                if isinstance(x, str):
+                    x = x.encode("utf-8")
+                return hashlib.sha512(x).hexdigest()
+
+            hash_utf8 = sha512_utf8
+
+        KD = lambda s, d: hash_utf8(f"{s}:{d}")  # noqa:E731
+
+        if hash_utf8 is None:
+            return None
+
+        # XXX not implemented yet
+        entdig = None
+        p_parsed = urlparse(url)
+        #: path is request-uri defined in RFC 2616 which should not be empty
+        path = p_parsed.path or "/"
+        if p_parsed.query:
+            path += f"?{p_parsed.query}"
+
+        A1 = f"{self.username}:{realm}:{self.password}"
+        A2 = f"{method}:{path}"
+
+        HA1 = hash_utf8(A1)
+        HA2 = hash_utf8(A2)
+
+        if nonce == self._thread_local.last_nonce:
+            self._thread_local.nonce_count += 1
+        else:
+            self._thread_local.nonce_count = 1
+        ncvalue = f"{self._thread_local.nonce_count:08x}"
+        s = str(self._thread_local.nonce_count).encode("utf-8")
+        s += nonce.encode("utf-8")
+        s += time.ctime().encode("utf-8")
+        s += os.urandom(8)
+
+        cnonce = hashlib.sha1(s).hexdigest()[:16]
+        if _algorithm == "MD5-SESS":
+            HA1 = hash_utf8(f"{HA1}:{nonce}:{cnonce}")
+
+        if not qop:
+            respdig = KD(HA1, f"{nonce}:{HA2}")
+        elif qop == "auth" or "auth" in qop.split(","):
+            noncebit = f"{nonce}:{ncvalue}:{cnonce}:auth:{HA2}"
+            respdig = KD(HA1, noncebit)
+        else:
+            # XXX handle auth-int.
+            return None
+
+        self._thread_local.last_nonce = nonce
+
+        # XXX should the partial digests be encoded too?
+        base = (
+            f'username="{self.username}", realm="{realm}", nonce="{nonce}", '
+            f'uri="{path}", response="{respdig}"'
+        )
+        if opaque:
+            base += f', opaque="{opaque}"'
+        if algorithm:
+            base += f', algorithm="{algorithm}"'
+        if entdig:
+            base += f', digest="{entdig}"'
+        if qop:
+            base += f', qop="auth", nc={ncvalue}, cnonce="{cnonce}"'
+
+        return f"Digest {base}"
+
+    def handle_redirect(self, r, **kwargs):
+        """Reset num_401_calls counter on redirects."""
+        if r.is_redirect:
+            self._thread_local.num_401_calls = 1
+
+    def handle_401(self, r, **kwargs):
+        """
+        Takes the given response and tries digest-auth, if needed.
+
+        :rtype: requests.Response
+        """
+
+        # If response is not 4xx, do not auth
+        # See https://github.com/psf/requests/issues/3772
+        if not 400 <= r.status_code < 500:
+            self._thread_local.num_401_calls = 1
+            return r
+
+        if self._thread_local.pos is not None:
+            # Rewind the file position indicator of the body to where
+            # it was to resend the request.
+            r.request.body.seek(self._thread_local.pos)
+        s_auth = r.headers.get("www-authenticate", "")
+
+        if "digest" in s_auth.lower() and self._thread_local.num_401_calls < 2:
+            self._thread_local.num_401_calls += 1
+            pat = re.compile(r"digest ", flags=re.IGNORECASE)
+            self._thread_local.chal = parse_dict_header(pat.sub("", s_auth, count=1))
+
+            # Consume content and release the original connection
+            # to allow our new request to reuse the same one.
+            r.content
+            r.close()
+            prep = r.request.copy()
+            extract_cookies_to_jar(prep._cookies, r.request, r.raw)
+            prep.prepare_cookies(prep._cookies)
+
+            prep.headers["Authorization"] = self.build_digest_header(
+                prep.method, prep.url
+            )
+            _r = r.connection.send(prep, **kwargs)
+            _r.history.append(r)
+            _r.request = prep
+
+            return _r
+
+        self._thread_local.num_401_calls = 1
+        return r
+
+    def __call__(self, r):
+        # Initialize per-thread state, if needed
+        self.init_per_thread_state()
+        # If we have a saved nonce, skip the 401
+        if self._thread_local.last_nonce:
+            r.headers["Authorization"] = self.build_digest_header(r.method, r.url)
+        try:
+            self._thread_local.pos = r.body.tell()
+        except AttributeError:
+            # In the case of HTTPDigestAuth being reused and the body of
+            # the previous request was a file-like object, pos has the
+            # file position of the previous body. Ensure it's set to
+            # None.
+            self._thread_local.pos = None
+        r.register_hook("response", self.handle_401)
+        r.register_hook("response", self.handle_redirect)
+        self._thread_local.num_401_calls = 1
+
+        return r
+
+    def __eq__(self, other):
+        return all(
+            [
+                self.username == getattr(other, "username", None),
+                self.password == getattr(other, "password", None),
+            ]
+        )
+
+    def __ne__(self, other):
+        return not self == other
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/certs.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/certs.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/certs.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/certs.py
index 2743144b9..c5953485f 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/certs.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/certs.py
@@ -11,6 +11,7 @@
 environment, you can change the definition of where() to return a separately
 packaged CA bundle.
 """
+
 from pip._vendor.certifi import where
 
 if __name__ == "__main__":
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/compat.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/compat.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/compat.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/compat.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/cookies.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/cookies.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/cookies.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/cookies.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/exceptions.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/exceptions.py
new file mode 100644
index 000000000..d84504881
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/exceptions.py
@@ -0,0 +1,152 @@
+"""
+requests.exceptions
+~~~~~~~~~~~~~~~~~~~
+
+This module contains the set of Requests' exceptions.
+"""
+
+from pip._vendor.urllib3.exceptions import HTTPError as BaseHTTPError
+
+from .compat import JSONDecodeError as CompatJSONDecodeError
+
+
+class RequestException(IOError):
+    """There was an ambiguous exception that occurred while handling your
+    request.
+    """
+
+    def __init__(self, *args, **kwargs):
+        """Initialize RequestException with `request` and `response` objects."""
+        response = kwargs.pop("response", None)
+        self.response = response
+        self.request = kwargs.pop("request", None)
+        if response is not None and not self.request and hasattr(response, "request"):
+            self.request = self.response.request
+        super().__init__(*args, **kwargs)
+
+
+class InvalidJSONError(RequestException):
+    """A JSON error occurred."""
+
+
+class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError):
+    """Couldn't decode the text into json"""
+
+    def __init__(self, *args, **kwargs):
+        """
+        Construct the JSONDecodeError instance first with all
+        args. Then use it's args to construct the IOError so that
+        the json specific args aren't used as IOError specific args
+        and the error message from JSONDecodeError is preserved.
+        """
+        CompatJSONDecodeError.__init__(self, *args)
+        InvalidJSONError.__init__(self, *self.args, **kwargs)
+
+    def __reduce__(self):
+        """
+        The __reduce__ method called when pickling the object must
+        be the one from the JSONDecodeError (be it json/simplejson)
+        as it expects all the arguments for instantiation, not just
+        one like the IOError, and the MRO would by default call the
+        __reduce__ method from the IOError due to the inheritance order.
+        """
+        return CompatJSONDecodeError.__reduce__(self)
+
+
+class HTTPError(RequestException):
+    """An HTTP error occurred."""
+
+
+class ConnectionError(RequestException):
+    """A Connection error occurred."""
+
+
+class ProxyError(ConnectionError):
+    """A proxy error occurred."""
+
+
+class SSLError(ConnectionError):
+    """An SSL error occurred."""
+
+
+class Timeout(RequestException):
+    """The request timed out.
+
+    Catching this error will catch both
+    :exc:`~requests.exceptions.ConnectTimeout` and
+    :exc:`~requests.exceptions.ReadTimeout` errors.
+    """
+
+
+class ConnectTimeout(ConnectionError, Timeout):
+    """The request timed out while trying to connect to the remote server.
+
+    Requests that produced this error are safe to retry.
+    """
+
+
+class ReadTimeout(Timeout):
+    """The server did not send any data in the allotted amount of time."""
+
+
+class URLRequired(RequestException):
+    """A valid URL is required to make a request."""
+
+
+class TooManyRedirects(RequestException):
+    """Too many redirects."""
+
+
+class MissingSchema(RequestException, ValueError):
+    """The URL scheme (e.g. http or https) is missing."""
+
+
+class InvalidSchema(RequestException, ValueError):
+    """The URL scheme provided is either invalid or unsupported."""
+
+
+class InvalidURL(RequestException, ValueError):
+    """The URL provided was somehow invalid."""
+
+
+class InvalidHeader(RequestException, ValueError):
+    """The header value provided was somehow invalid."""
+
+
+class InvalidProxyURL(InvalidURL):
+    """The proxy URL provided is invalid."""
+
+
+class ChunkedEncodingError(RequestException):
+    """The server declared chunked encoding but sent an invalid chunk."""
+
+
+class ContentDecodingError(RequestException, BaseHTTPError):
+    """Failed to decode response content."""
+
+
+class StreamConsumedError(RequestException, TypeError):
+    """The content for this response was already consumed."""
+
+
+class RetryError(RequestException):
+    """Custom retries logic failed"""
+
+
+class UnrewindableBodyError(RequestException):
+    """Requests encountered an error when trying to rewind a body."""
+
+
+# Warnings
+
+
+class RequestsWarning(Warning):
+    """Base warning for Requests."""
+
+
+class FileModeWarning(RequestsWarning, DeprecationWarning):
+    """A file was opened in text mode, but Requests determined its binary length."""
+
+
+class RequestsDependencyWarning(RequestsWarning):
+    """An imported dependency doesn't match the expected version range."""
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/help.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/help.py
similarity index 95%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/help.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/help.py
index ddbb6150d..022cd6062 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/help.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/help.py
@@ -40,11 +40,8 @@ def _implementation():
     if implementation == "CPython":
         implementation_version = platform.python_version()
     elif implementation == "PyPy":
-        implementation_version = "{}.{}.{}".format(
-            sys.pypy_version_info.major,
-            sys.pypy_version_info.minor,
-            sys.pypy_version_info.micro,
-        )
+        pypy = sys.pypy_version_info
+        implementation_version = f"{pypy.major}.{pypy.minor}.{pypy.micro}"
         if sys.pypy_version_info.releaselevel != "final":
             implementation_version = "".join(
                 [implementation_version, sys.pypy_version_info.releaselevel]
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/hooks.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/hooks.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/hooks.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/hooks.py
index d181ba2ec..5976bc7d0 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/hooks.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/hooks.py
@@ -9,6 +9,7 @@
 ``response``:
     The response generated from a Request.
 """
+
 HOOKS = ["response"]
 
 
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/models.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/models.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/models.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/models.py
index 22de95c06..ba7c01d9b 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/models.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/models.py
@@ -34,9 +34,11 @@
     builtin_str,
     chardet,
     cookielib,
+    urlencode,
+    urlsplit,
+    urlunparse,
 )
 from .compat import json as complexjson
-from .compat import urlencode, urlsplit, urlunparse
 from .cookies import _copy_cookie_jar, cookiejar_from_dict, get_cookie_header
 from .exceptions import (
     ChunkedEncodingError,
@@ -45,11 +47,11 @@
     HTTPError,
     InvalidJSONError,
     InvalidURL,
+    MissingSchema,
+    StreamConsumedError,
 )
 from .exceptions import JSONDecodeError as RequestsJSONDecodeError
-from .exceptions import MissingSchema
 from .exceptions import SSLError as RequestsSSLError
-from .exceptions import StreamConsumedError
 from .hooks import default_hooks
 from .status_codes import codes
 from .structures import CaseInsensitiveDict
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/packages.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/packages.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/packages.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/packages.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/sessions.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/sessions.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/sessions.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/sessions.py
index 731550de8..578cc44d5 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/sessions.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/sessions.py
@@ -5,6 +5,7 @@
 This module provides a Session object to manage and persist settings across
 requests (cookies, auth, proxies).
 """
+
 import os
 import sys
 import time
@@ -421,6 +422,8 @@ def __init__(self):
         #: expired certificates, which will make your application vulnerable to
         #: man-in-the-middle (MitM) attacks.
         #: Only set this to `False` for testing.
+        #: If verify is set to a string, it must be the path to a CA bundle file
+        #: that will be used to verify the TLS certificate.
         self.verify = True
 
         #: SSL client certificate default, if String, path to ssl client
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/status_codes.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/status_codes.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/status_codes.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/status_codes.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/structures.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/structures.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/requests/structures.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/structures.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/utils.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/utils.py
new file mode 100644
index 000000000..6ee16b580
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/requests/utils.py
@@ -0,0 +1,1083 @@
+"""
+requests.utils
+~~~~~~~~~~~~~~
+
+This module provides utility functions that are used within Requests
+that are also useful for external consumption.
+"""
+
+import codecs
+import contextlib
+import io
+import os
+import re
+import socket
+import struct
+import sys
+import tempfile
+import warnings
+import zipfile
+from collections import OrderedDict
+
+from pip._vendor.urllib3.util import make_headers, parse_url
+
+from . import certs
+from .__version__ import __version__
+
+# to_native_string is unused here, but imported here for backwards compatibility
+from ._internal_utils import (  # noqa: F401
+    _HEADER_VALIDATORS_BYTE,
+    _HEADER_VALIDATORS_STR,
+    HEADER_VALIDATORS,
+    to_native_string,
+)
+from .compat import (
+    Mapping,
+    basestring,
+    bytes,
+    getproxies,
+    getproxies_environment,
+    integer_types,
+    is_urllib3_1,
+    proxy_bypass,
+    proxy_bypass_environment,
+    quote,
+    str,
+    unquote,
+    urlparse,
+    urlunparse,
+)
+from .compat import parse_http_list as _parse_list_header
+from .cookies import cookiejar_from_dict
+from .exceptions import (
+    FileModeWarning,
+    InvalidHeader,
+    InvalidURL,
+    UnrewindableBodyError,
+)
+from .structures import CaseInsensitiveDict
+
+NETRC_FILES = (".netrc", "_netrc")
+
+# Certificate is extracted by certifi when needed.
+DEFAULT_CA_BUNDLE_PATH = certs.where()
+
+DEFAULT_PORTS = {"http": 80, "https": 443}
+
+# Ensure that ', ' is used to preserve previous delimiter behavior.
+DEFAULT_ACCEPT_ENCODING = ", ".join(
+    re.split(r",\s*", make_headers(accept_encoding=True)["accept-encoding"])
+)
+
+
+if sys.platform == "win32":
+    # provide a proxy_bypass version on Windows without DNS lookups
+
+    def proxy_bypass_registry(host):
+        try:
+            import winreg
+        except ImportError:
+            return False
+
+        try:
+            internetSettings = winreg.OpenKey(
+                winreg.HKEY_CURRENT_USER,
+                r"Software\Microsoft\Windows\CurrentVersion\Internet Settings",
+            )
+            # ProxyEnable could be REG_SZ or REG_DWORD, normalizing it
+            proxyEnable = int(winreg.QueryValueEx(internetSettings, "ProxyEnable")[0])
+            # ProxyOverride is almost always a string
+            proxyOverride = winreg.QueryValueEx(internetSettings, "ProxyOverride")[0]
+        except (OSError, ValueError):
+            return False
+        if not proxyEnable or not proxyOverride:
+            return False
+
+        # make a check value list from the registry entry: replace the
+        # '' string by the localhost entry and the corresponding
+        # canonical entry.
+        proxyOverride = proxyOverride.split(";")
+        # filter out empty strings to avoid re.match return true in the following code.
+        proxyOverride = filter(None, proxyOverride)
+        # now check if we match one of the registry values.
+        for test in proxyOverride:
+            if test == "":
+                if "." not in host:
+                    return True
+            test = test.replace(".", r"\.")  # mask dots
+            test = test.replace("*", r".*")  # change glob sequence
+            test = test.replace("?", r".")  # change glob char
+            if re.match(test, host, re.I):
+                return True
+        return False
+
+    def proxy_bypass(host):  # noqa
+        """Return True, if the host should be bypassed.
+
+        Checks proxy settings gathered from the environment, if specified,
+        or the registry.
+        """
+        if getproxies_environment():
+            return proxy_bypass_environment(host)
+        else:
+            return proxy_bypass_registry(host)
+
+
+def dict_to_sequence(d):
+    """Returns an internal sequence dictionary update."""
+
+    if hasattr(d, "items"):
+        d = d.items()
+
+    return d
+
+
+def super_len(o):
+    total_length = None
+    current_position = 0
+
+    if not is_urllib3_1 and isinstance(o, str):
+        # urllib3 2.x+ treats all strings as utf-8 instead
+        # of latin-1 (iso-8859-1) like http.client.
+        o = o.encode("utf-8")
+
+    if hasattr(o, "__len__"):
+        total_length = len(o)
+
+    elif hasattr(o, "len"):
+        total_length = o.len
+
+    elif hasattr(o, "fileno"):
+        try:
+            fileno = o.fileno()
+        except (io.UnsupportedOperation, AttributeError):
+            # AttributeError is a surprising exception, seeing as how we've just checked
+            # that `hasattr(o, 'fileno')`.  It happens for objects obtained via
+            # `Tarfile.extractfile()`, per issue 5229.
+            pass
+        else:
+            total_length = os.fstat(fileno).st_size
+
+            # Having used fstat to determine the file length, we need to
+            # confirm that this file was opened up in binary mode.
+            if "b" not in o.mode:
+                warnings.warn(
+                    (
+                        "Requests has determined the content-length for this "
+                        "request using the binary size of the file: however, the "
+                        "file has been opened in text mode (i.e. without the 'b' "
+                        "flag in the mode). This may lead to an incorrect "
+                        "content-length. In Requests 3.0, support will be removed "
+                        "for files in text mode."
+                    ),
+                    FileModeWarning,
+                )
+
+    if hasattr(o, "tell"):
+        try:
+            current_position = o.tell()
+        except OSError:
+            # This can happen in some weird situations, such as when the file
+            # is actually a special file descriptor like stdin. In this
+            # instance, we don't know what the length is, so set it to zero and
+            # let requests chunk it instead.
+            if total_length is not None:
+                current_position = total_length
+        else:
+            if hasattr(o, "seek") and total_length is None:
+                # StringIO and BytesIO have seek but no usable fileno
+                try:
+                    # seek to end of file
+                    o.seek(0, 2)
+                    total_length = o.tell()
+
+                    # seek back to current position to support
+                    # partially read file-like objects
+                    o.seek(current_position or 0)
+                except OSError:
+                    total_length = 0
+
+    if total_length is None:
+        total_length = 0
+
+    return max(0, total_length - current_position)
+
+
+def get_netrc_auth(url, raise_errors=False):
+    """Returns the Requests tuple auth for a given url from netrc."""
+
+    netrc_file = os.environ.get("NETRC")
+    if netrc_file is not None:
+        netrc_locations = (netrc_file,)
+    else:
+        netrc_locations = (f"~/{f}" for f in NETRC_FILES)
+
+    try:
+        from netrc import NetrcParseError, netrc
+
+        netrc_path = None
+
+        for f in netrc_locations:
+            loc = os.path.expanduser(f)
+            if os.path.exists(loc):
+                netrc_path = loc
+                break
+
+        # Abort early if there isn't one.
+        if netrc_path is None:
+            return
+
+        ri = urlparse(url)
+        host = ri.hostname
+
+        try:
+            _netrc = netrc(netrc_path).authenticators(host)
+            if _netrc and any(_netrc):
+                # Return with login / password
+                login_i = 0 if _netrc[0] else 1
+                return (_netrc[login_i], _netrc[2])
+        except (NetrcParseError, OSError):
+            # If there was a parsing error or a permissions issue reading the file,
+            # we'll just skip netrc auth unless explicitly asked to raise errors.
+            if raise_errors:
+                raise
+
+    # App Engine hackiness.
+    except (ImportError, AttributeError):
+        pass
+
+
+def guess_filename(obj):
+    """Tries to guess the filename of the given object."""
+    name = getattr(obj, "name", None)
+    if name and isinstance(name, basestring) and name[0] != "<" and name[-1] != ">":
+        return os.path.basename(name)
+
+
+def extract_zipped_paths(path):
+    """Replace nonexistent paths that look like they refer to a member of a zip
+    archive with the location of an extracted copy of the target, or else
+    just return the provided path unchanged.
+    """
+    if os.path.exists(path):
+        # this is already a valid path, no need to do anything further
+        return path
+
+    # find the first valid part of the provided path and treat that as a zip archive
+    # assume the rest of the path is the name of a member in the archive
+    archive, member = os.path.split(path)
+    while archive and not os.path.exists(archive):
+        archive, prefix = os.path.split(archive)
+        if not prefix:
+            # If we don't check for an empty prefix after the split (in other words, archive remains unchanged after the split),
+            # we _can_ end up in an infinite loop on a rare corner case affecting a small number of users
+            break
+        member = "/".join([prefix, member])
+
+    if not zipfile.is_zipfile(archive):
+        return path
+
+    zip_file = zipfile.ZipFile(archive)
+    if member not in zip_file.namelist():
+        return path
+
+    # we have a valid zip archive and a valid member of that archive
+    suffix = os.path.splitext(member.split("/")[-1])[-1]
+    fd, extracted_path = tempfile.mkstemp(suffix=suffix)
+    try:
+        os.write(fd, zip_file.read(member))
+    finally:
+        os.close(fd)
+
+    return extracted_path
+
+
+@contextlib.contextmanager
+def atomic_open(filename):
+    """Write a file to the disk in an atomic fashion"""
+    tmp_descriptor, tmp_name = tempfile.mkstemp(dir=os.path.dirname(filename))
+    try:
+        with os.fdopen(tmp_descriptor, "wb") as tmp_handler:
+            yield tmp_handler
+        os.replace(tmp_name, filename)
+    except BaseException:
+        os.remove(tmp_name)
+        raise
+
+
+def from_key_val_list(value):
+    """Take an object and test to see if it can be represented as a
+    dictionary. Unless it can not be represented as such, return an
+    OrderedDict, e.g.,
+
+    ::
+
+        >>> from_key_val_list([('key', 'val')])
+        OrderedDict([('key', 'val')])
+        >>> from_key_val_list('string')
+        Traceback (most recent call last):
+        ...
+        ValueError: cannot encode objects that are not 2-tuples
+        >>> from_key_val_list({'key': 'val'})
+        OrderedDict([('key', 'val')])
+
+    :rtype: OrderedDict
+    """
+    if value is None:
+        return None
+
+    if isinstance(value, (str, bytes, bool, int)):
+        raise ValueError("cannot encode objects that are not 2-tuples")
+
+    return OrderedDict(value)
+
+
+def to_key_val_list(value):
+    """Take an object and test to see if it can be represented as a
+    dictionary. If it can be, return a list of tuples, e.g.,
+
+    ::
+
+        >>> to_key_val_list([('key', 'val')])
+        [('key', 'val')]
+        >>> to_key_val_list({'key': 'val'})
+        [('key', 'val')]
+        >>> to_key_val_list('string')
+        Traceback (most recent call last):
+        ...
+        ValueError: cannot encode objects that are not 2-tuples
+
+    :rtype: list
+    """
+    if value is None:
+        return None
+
+    if isinstance(value, (str, bytes, bool, int)):
+        raise ValueError("cannot encode objects that are not 2-tuples")
+
+    if isinstance(value, Mapping):
+        value = value.items()
+
+    return list(value)
+
+
+# From mitsuhiko/werkzeug (used with permission).
+def parse_list_header(value):
+    """Parse lists as described by RFC 2068 Section 2.
+
+    In particular, parse comma-separated lists where the elements of
+    the list may include quoted-strings.  A quoted-string could
+    contain a comma.  A non-quoted string could have quotes in the
+    middle.  Quotes are removed automatically after parsing.
+
+    It basically works like :func:`parse_set_header` just that items
+    may appear multiple times and case sensitivity is preserved.
+
+    The return value is a standard :class:`list`:
+
+    >>> parse_list_header('token, "quoted value"')
+    ['token', 'quoted value']
+
+    To create a header from the :class:`list` again, use the
+    :func:`dump_header` function.
+
+    :param value: a string with a list header.
+    :return: :class:`list`
+    :rtype: list
+    """
+    result = []
+    for item in _parse_list_header(value):
+        if item[:1] == item[-1:] == '"':
+            item = unquote_header_value(item[1:-1])
+        result.append(item)
+    return result
+
+
+# From mitsuhiko/werkzeug (used with permission).
+def parse_dict_header(value):
+    """Parse lists of key, value pairs as described by RFC 2068 Section 2 and
+    convert them into a python dict:
+
+    >>> d = parse_dict_header('foo="is a fish", bar="as well"')
+    >>> type(d) is dict
+    True
+    >>> sorted(d.items())
+    [('bar', 'as well'), ('foo', 'is a fish')]
+
+    If there is no value for a key it will be `None`:
+
+    >>> parse_dict_header('key_without_value')
+    {'key_without_value': None}
+
+    To create a header from the :class:`dict` again, use the
+    :func:`dump_header` function.
+
+    :param value: a string with a dict header.
+    :return: :class:`dict`
+    :rtype: dict
+    """
+    result = {}
+    for item in _parse_list_header(value):
+        if "=" not in item:
+            result[item] = None
+            continue
+        name, value = item.split("=", 1)
+        if value[:1] == value[-1:] == '"':
+            value = unquote_header_value(value[1:-1])
+        result[name] = value
+    return result
+
+
+# From mitsuhiko/werkzeug (used with permission).
+def unquote_header_value(value, is_filename=False):
+    r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
+    This does not use the real unquoting but what browsers are actually
+    using for quoting.
+
+    :param value: the header value to unquote.
+    :rtype: str
+    """
+    if value and value[0] == value[-1] == '"':
+        # this is not the real unquoting, but fixing this so that the
+        # RFC is met will result in bugs with internet explorer and
+        # probably some other browsers as well.  IE for example is
+        # uploading files with "C:\foo\bar.txt" as filename
+        value = value[1:-1]
+
+        # if this is a filename and the starting characters look like
+        # a UNC path, then just return the value without quotes.  Using the
+        # replace sequence below on a UNC path has the effect of turning
+        # the leading double slash into a single slash and then
+        # _fix_ie_filename() doesn't work correctly.  See #458.
+        if not is_filename or value[:2] != "\\\\":
+            return value.replace("\\\\", "\\").replace('\\"', '"')
+    return value
+
+
+def dict_from_cookiejar(cj):
+    """Returns a key/value dictionary from a CookieJar.
+
+    :param cj: CookieJar object to extract cookies from.
+    :rtype: dict
+    """
+
+    cookie_dict = {cookie.name: cookie.value for cookie in cj}
+    return cookie_dict
+
+
+def add_dict_to_cookiejar(cj, cookie_dict):
+    """Returns a CookieJar from a key/value dictionary.
+
+    :param cj: CookieJar to insert cookies into.
+    :param cookie_dict: Dict of key/values to insert into CookieJar.
+    :rtype: CookieJar
+    """
+
+    return cookiejar_from_dict(cookie_dict, cj)
+
+
+def get_encodings_from_content(content):
+    """Returns encodings from given content string.
+
+    :param content: bytestring to extract encodings from.
+    """
+    warnings.warn(
+        (
+            "In requests 3.0, get_encodings_from_content will be removed. For "
+            "more information, please see the discussion on issue #2266. (This"
+            " warning should only appear once.)"
+        ),
+        DeprecationWarning,
+    )
+
+    charset_re = re.compile(r']', flags=re.I)
+    pragma_re = re.compile(r']', flags=re.I)
+    xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')
+
+    return (
+        charset_re.findall(content)
+        + pragma_re.findall(content)
+        + xml_re.findall(content)
+    )
+
+
+def _parse_content_type_header(header):
+    """Returns content type and parameters from given header.
+
+    :param header: string
+    :return: tuple containing content type and dictionary of
+         parameters.
+    """
+
+    tokens = header.split(";")
+    content_type, params = tokens[0].strip(), tokens[1:]
+    params_dict = {}
+    strip_chars = "\"' "
+
+    for param in params:
+        param = param.strip()
+        if param and (idx := param.find("=")) != -1:
+            key = param[:idx].strip(strip_chars)
+            value = param[idx + 1 :].strip(strip_chars)
+            params_dict[key.lower()] = value
+    return content_type, params_dict
+
+
+def get_encoding_from_headers(headers):
+    """Returns encodings from given HTTP Header Dict.
+
+    :param headers: dictionary to extract encoding from.
+    :rtype: str
+    """
+
+    content_type = headers.get("content-type")
+
+    if not content_type:
+        return None
+
+    content_type, params = _parse_content_type_header(content_type)
+
+    if "charset" in params:
+        return params["charset"].strip("'\"")
+
+    if "text" in content_type:
+        return "ISO-8859-1"
+
+    if "application/json" in content_type:
+        # Assume UTF-8 based on RFC 4627: https://www.ietf.org/rfc/rfc4627.txt since the charset was unset
+        return "utf-8"
+
+
+def stream_decode_response_unicode(iterator, r):
+    """Stream decodes an iterator."""
+
+    if r.encoding is None:
+        yield from iterator
+        return
+
+    decoder = codecs.getincrementaldecoder(r.encoding)(errors="replace")
+    for chunk in iterator:
+        rv = decoder.decode(chunk)
+        if rv:
+            yield rv
+    rv = decoder.decode(b"", final=True)
+    if rv:
+        yield rv
+
+
+def iter_slices(string, slice_length):
+    """Iterate over slices of a string."""
+    pos = 0
+    if slice_length is None or slice_length <= 0:
+        slice_length = len(string)
+    while pos < len(string):
+        yield string[pos : pos + slice_length]
+        pos += slice_length
+
+
+def get_unicode_from_response(r):
+    """Returns the requested content back in unicode.
+
+    :param r: Response object to get unicode content from.
+
+    Tried:
+
+    1. charset from content-type
+    2. fall back and replace all unicode characters
+
+    :rtype: str
+    """
+    warnings.warn(
+        (
+            "In requests 3.0, get_unicode_from_response will be removed. For "
+            "more information, please see the discussion on issue #2266. (This"
+            " warning should only appear once.)"
+        ),
+        DeprecationWarning,
+    )
+
+    tried_encodings = []
+
+    # Try charset from content-type
+    encoding = get_encoding_from_headers(r.headers)
+
+    if encoding:
+        try:
+            return str(r.content, encoding)
+        except UnicodeError:
+            tried_encodings.append(encoding)
+
+    # Fall back:
+    try:
+        return str(r.content, encoding, errors="replace")
+    except TypeError:
+        return r.content
+
+
+# The unreserved URI characters (RFC 3986)
+UNRESERVED_SET = frozenset(
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789-._~"
+)
+
+
+def unquote_unreserved(uri):
+    """Un-escape any percent-escape sequences in a URI that are unreserved
+    characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
+
+    :rtype: str
+    """
+    parts = uri.split("%")
+    for i in range(1, len(parts)):
+        h = parts[i][0:2]
+        if len(h) == 2 and h.isalnum():
+            try:
+                c = chr(int(h, 16))
+            except ValueError:
+                raise InvalidURL(f"Invalid percent-escape sequence: '{h}'")
+
+            if c in UNRESERVED_SET:
+                parts[i] = c + parts[i][2:]
+            else:
+                parts[i] = f"%{parts[i]}"
+        else:
+            parts[i] = f"%{parts[i]}"
+    return "".join(parts)
+
+
+def requote_uri(uri):
+    """Re-quote the given URI.
+
+    This function passes the given URI through an unquote/quote cycle to
+    ensure that it is fully and consistently quoted.
+
+    :rtype: str
+    """
+    safe_with_percent = "!#$%&'()*+,/:;=?@[]~"
+    safe_without_percent = "!#$&'()*+,/:;=?@[]~"
+    try:
+        # Unquote only the unreserved characters
+        # Then quote only illegal characters (do not quote reserved,
+        # unreserved, or '%')
+        return quote(unquote_unreserved(uri), safe=safe_with_percent)
+    except InvalidURL:
+        # We couldn't unquote the given URI, so let's try quoting it, but
+        # there may be unquoted '%'s in the URI. We need to make sure they're
+        # properly quoted so they do not cause issues elsewhere.
+        return quote(uri, safe=safe_without_percent)
+
+
+def address_in_network(ip, net):
+    """This function allows you to check if an IP belongs to a network subnet
+
+    Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
+             returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
+
+    :rtype: bool
+    """
+    ipaddr = struct.unpack("=L", socket.inet_aton(ip))[0]
+    netaddr, bits = net.split("/")
+    netmask = struct.unpack("=L", socket.inet_aton(dotted_netmask(int(bits))))[0]
+    network = struct.unpack("=L", socket.inet_aton(netaddr))[0] & netmask
+    return (ipaddr & netmask) == (network & netmask)
+
+
+def dotted_netmask(mask):
+    """Converts mask from /xx format to xxx.xxx.xxx.xxx
+
+    Example: if mask is 24 function returns 255.255.255.0
+
+    :rtype: str
+    """
+    bits = 0xFFFFFFFF ^ (1 << 32 - mask) - 1
+    return socket.inet_ntoa(struct.pack(">I", bits))
+
+
+def is_ipv4_address(string_ip):
+    """
+    :rtype: bool
+    """
+    try:
+        socket.inet_aton(string_ip)
+    except OSError:
+        return False
+    return True
+
+
+def is_valid_cidr(string_network):
+    """
+    Very simple check of the cidr format in no_proxy variable.
+
+    :rtype: bool
+    """
+    if string_network.count("/") == 1:
+        try:
+            mask = int(string_network.split("/")[1])
+        except ValueError:
+            return False
+
+        if mask < 1 or mask > 32:
+            return False
+
+        try:
+            socket.inet_aton(string_network.split("/")[0])
+        except OSError:
+            return False
+    else:
+        return False
+    return True
+
+
+@contextlib.contextmanager
+def set_environ(env_name, value):
+    """Set the environment variable 'env_name' to 'value'
+
+    Save previous value, yield, and then restore the previous value stored in
+    the environment variable 'env_name'.
+
+    If 'value' is None, do nothing"""
+    value_changed = value is not None
+    if value_changed:
+        old_value = os.environ.get(env_name)
+        os.environ[env_name] = value
+    try:
+        yield
+    finally:
+        if value_changed:
+            if old_value is None:
+                del os.environ[env_name]
+            else:
+                os.environ[env_name] = old_value
+
+
+def should_bypass_proxies(url, no_proxy):
+    """
+    Returns whether we should bypass proxies or not.
+
+    :rtype: bool
+    """
+
+    # Prioritize lowercase environment variables over uppercase
+    # to keep a consistent behaviour with other http projects (curl, wget).
+    def get_proxy(key):
+        return os.environ.get(key) or os.environ.get(key.upper())
+
+    # First check whether no_proxy is defined. If it is, check that the URL
+    # we're getting isn't in the no_proxy list.
+    no_proxy_arg = no_proxy
+    if no_proxy is None:
+        no_proxy = get_proxy("no_proxy")
+    parsed = urlparse(url)
+
+    if parsed.hostname is None:
+        # URLs don't always have hostnames, e.g. file:/// urls.
+        return True
+
+    if no_proxy:
+        # We need to check whether we match here. We need to see if we match
+        # the end of the hostname, both with and without the port.
+        no_proxy = (host for host in no_proxy.replace(" ", "").split(",") if host)
+
+        if is_ipv4_address(parsed.hostname):
+            for proxy_ip in no_proxy:
+                if is_valid_cidr(proxy_ip):
+                    if address_in_network(parsed.hostname, proxy_ip):
+                        return True
+                elif parsed.hostname == proxy_ip:
+                    # If no_proxy ip was defined in plain IP notation instead of cidr notation &
+                    # matches the IP of the index
+                    return True
+        else:
+            host_with_port = parsed.hostname
+            if parsed.port:
+                host_with_port += f":{parsed.port}"
+
+            for host in no_proxy:
+                if parsed.hostname.endswith(host) or host_with_port.endswith(host):
+                    # The URL does match something in no_proxy, so we don't want
+                    # to apply the proxies on this URL.
+                    return True
+
+    with set_environ("no_proxy", no_proxy_arg):
+        # parsed.hostname can be `None` in cases such as a file URI.
+        try:
+            bypass = proxy_bypass(parsed.hostname)
+        except (TypeError, socket.gaierror):
+            bypass = False
+
+    if bypass:
+        return True
+
+    return False
+
+
+def get_environ_proxies(url, no_proxy=None):
+    """
+    Return a dict of environment proxies.
+
+    :rtype: dict
+    """
+    if should_bypass_proxies(url, no_proxy=no_proxy):
+        return {}
+    else:
+        return getproxies()
+
+
+def select_proxy(url, proxies):
+    """Select a proxy for the url, if applicable.
+
+    :param url: The url being for the request
+    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
+    """
+    proxies = proxies or {}
+    urlparts = urlparse(url)
+    if urlparts.hostname is None:
+        return proxies.get(urlparts.scheme, proxies.get("all"))
+
+    proxy_keys = [
+        urlparts.scheme + "://" + urlparts.hostname,
+        urlparts.scheme,
+        "all://" + urlparts.hostname,
+        "all",
+    ]
+    proxy = None
+    for proxy_key in proxy_keys:
+        if proxy_key in proxies:
+            proxy = proxies[proxy_key]
+            break
+
+    return proxy
+
+
+def resolve_proxies(request, proxies, trust_env=True):
+    """This method takes proxy information from a request and configuration
+    input to resolve a mapping of target proxies. This will consider settings
+    such as NO_PROXY to strip proxy configurations.
+
+    :param request: Request or PreparedRequest
+    :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
+    :param trust_env: Boolean declaring whether to trust environment configs
+
+    :rtype: dict
+    """
+    proxies = proxies if proxies is not None else {}
+    url = request.url
+    scheme = urlparse(url).scheme
+    no_proxy = proxies.get("no_proxy")
+    new_proxies = proxies.copy()
+
+    if trust_env and not should_bypass_proxies(url, no_proxy=no_proxy):
+        environ_proxies = get_environ_proxies(url, no_proxy=no_proxy)
+
+        proxy = environ_proxies.get(scheme, environ_proxies.get("all"))
+
+        if proxy:
+            new_proxies.setdefault(scheme, proxy)
+    return new_proxies
+
+
+def default_user_agent(name="python-requests"):
+    """
+    Return a string representing the default user agent.
+
+    :rtype: str
+    """
+    return f"{name}/{__version__}"
+
+
+def default_headers():
+    """
+    :rtype: requests.structures.CaseInsensitiveDict
+    """
+    return CaseInsensitiveDict(
+        {
+            "User-Agent": default_user_agent(),
+            "Accept-Encoding": DEFAULT_ACCEPT_ENCODING,
+            "Accept": "*/*",
+            "Connection": "keep-alive",
+        }
+    )
+
+
+def parse_header_links(value):
+    """Return a list of parsed link headers proxies.
+
+    i.e. Link: ; rel=front; type="image/jpeg",; rel=back;type="image/jpeg"
+
+    :rtype: list
+    """
+
+    links = []
+
+    replace_chars = " '\""
+
+    value = value.strip(replace_chars)
+    if not value:
+        return links
+
+    for val in re.split(", *<", value):
+        try:
+            url, params = val.split(";", 1)
+        except ValueError:
+            url, params = val, ""
+
+        link = {"url": url.strip("<> '\"")}
+
+        for param in params.split(";"):
+            try:
+                key, value = param.split("=")
+            except ValueError:
+                break
+
+            link[key.strip(replace_chars)] = value.strip(replace_chars)
+
+        links.append(link)
+
+    return links
+
+
+# Null bytes; no need to recreate these on each call to guess_json_utf
+_null = "\x00".encode("ascii")  # encoding to ASCII for Python 3
+_null2 = _null * 2
+_null3 = _null * 3
+
+
+def guess_json_utf(data):
+    """
+    :rtype: str
+    """
+    # JSON always starts with two ASCII characters, so detection is as
+    # easy as counting the nulls and from their location and count
+    # determine the encoding. Also detect a BOM, if present.
+    sample = data[:4]
+    if sample in (codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE):
+        return "utf-32"  # BOM included
+    if sample[:3] == codecs.BOM_UTF8:
+        return "utf-8-sig"  # BOM included, MS style (discouraged)
+    if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE):
+        return "utf-16"  # BOM included
+    nullcount = sample.count(_null)
+    if nullcount == 0:
+        return "utf-8"
+    if nullcount == 2:
+        if sample[::2] == _null2:  # 1st and 3rd are null
+            return "utf-16-be"
+        if sample[1::2] == _null2:  # 2nd and 4th are null
+            return "utf-16-le"
+        # Did not detect 2 valid UTF-16 ascii-range characters
+    if nullcount == 3:
+        if sample[:3] == _null3:
+            return "utf-32-be"
+        if sample[1:] == _null3:
+            return "utf-32-le"
+        # Did not detect a valid UTF-32 ascii-range character
+    return None
+
+
+def prepend_scheme_if_needed(url, new_scheme):
+    """Given a URL that may or may not have a scheme, prepend the given scheme.
+    Does not replace a present scheme with the one provided as an argument.
+
+    :rtype: str
+    """
+    parsed = parse_url(url)
+    scheme, auth, host, port, path, query, fragment = parsed
+
+    # A defect in urlparse determines that there isn't a netloc present in some
+    # urls. We previously assumed parsing was overly cautious, and swapped the
+    # netloc and path. Due to a lack of tests on the original defect, this is
+    # maintained with parse_url for backwards compatibility.
+    netloc = parsed.netloc
+    if not netloc:
+        netloc, path = path, netloc
+
+    if auth:
+        # parse_url doesn't provide the netloc with auth
+        # so we'll add it ourselves.
+        netloc = "@".join([auth, netloc])
+    if scheme is None:
+        scheme = new_scheme
+    if path is None:
+        path = ""
+
+    return urlunparse((scheme, netloc, path, "", query, fragment))
+
+
+def get_auth_from_url(url):
+    """Given a url with authentication components, extract them into a tuple of
+    username,password.
+
+    :rtype: (str,str)
+    """
+    parsed = urlparse(url)
+
+    try:
+        auth = (unquote(parsed.username), unquote(parsed.password))
+    except (AttributeError, TypeError):
+        auth = ("", "")
+
+    return auth
+
+
+def check_header_validity(header):
+    """Verifies that header parts don't contain leading whitespace
+    reserved characters, or return characters.
+
+    :param header: tuple, in the format (name, value).
+    """
+    name, value = header
+    _validate_header_part(header, name, 0)
+    _validate_header_part(header, value, 1)
+
+
+def _validate_header_part(header, header_part, header_validator_index):
+    if isinstance(header_part, str):
+        validator = _HEADER_VALIDATORS_STR[header_validator_index]
+    elif isinstance(header_part, bytes):
+        validator = _HEADER_VALIDATORS_BYTE[header_validator_index]
+    else:
+        raise InvalidHeader(
+            f"Header part ({header_part!r}) from {header} "
+            f"must be of type str or bytes, not {type(header_part)}"
+        )
+
+    if not validator.match(header_part):
+        header_kind = "name" if header_validator_index == 0 else "value"
+        raise InvalidHeader(
+            f"Invalid leading whitespace, reserved character(s), or return "
+            f"character(s) in header {header_kind}: {header_part!r}"
+        )
+
+
+def urldefragauth(url):
+    """
+    Given a url remove the fragment and the authentication part.
+
+    :rtype: str
+    """
+    scheme, netloc, path, params, query, fragment = urlparse(url)
+
+    # see func:`prepend_scheme_if_needed`
+    if not netloc:
+        netloc, path = path, netloc
+
+    netloc = netloc.rsplit("@", 1)[-1]
+
+    return urlunparse((scheme, netloc, path, params, query, ""))
+
+
+def rewind_body(prepared_request):
+    """Move file pointer back to its recorded starting position
+    so it can be read again on redirect.
+    """
+    body_seek = getattr(prepared_request.body, "seek", None)
+    if body_seek is not None and isinstance(
+        prepared_request._body_position, integer_types
+    ):
+        try:
+            body_seek(prepared_request._body_position)
+        except OSError:
+            raise UnrewindableBodyError(
+                "An error occurred when rewinding request body for redirect."
+            )
+    else:
+        raise UnrewindableBodyError("Unable to rewind request body for redirect.")
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..edbaf9b9b
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-314.pyc
index 347ceeec2..af1e0d402 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-314.pyc
similarity index 85%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-314.pyc
index 7cabf96f9..ff9a01560 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-314.pyc
index abb8251db..7e68c4bd3 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/providers.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/providers.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/providers.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/providers.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/py.typed
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/reporters.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/reporters.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/reporters.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/reporters.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..f09ab02dd
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/abstract.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/abstract.cpython-314.pyc
new file mode 100644
index 000000000..d69ab7e31
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/abstract.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/criterion.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/criterion.cpython-314.pyc
similarity index 91%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/criterion.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/criterion.cpython-314.pyc
index 0af06519b..a3e9d229a 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/criterion.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/criterion.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/exceptions.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/exceptions.cpython-314.pyc
new file mode 100644
index 000000000..a7f81abd1
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/exceptions.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/resolution.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/resolution.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/resolution.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/resolution.cpython-314.pyc
index baed71a80..3e7d9a048 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/resolution.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__pycache__/resolution.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/structs.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/structs.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/structs.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/structs.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__init__.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__main__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__main__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__main__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__main__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..998faec71
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-314.pyc
new file mode 100644
index 000000000..2e3a35deb
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-314.pyc
index a93e7c1e2..e6976feab 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-314.pyc
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-314.pyc
index 62235a5fc..719939cf6 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-314.pyc
similarity index 88%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-314.pyc
index e69242117..3053b7174 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-314.pyc
similarity index 86%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-314.pyc
index bc2420142..32105a3aa 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-314.pyc
new file mode 100644
index 000000000..cca068cfb
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-314.pyc
new file mode 100644
index 000000000..37e64df52
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-314.pyc
index 74a192eaf..0e78339f5 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-314.pyc
similarity index 93%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-314.pyc
index 962824835..1f39682f6 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-314.pyc
similarity index 76%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-314.pyc
index 469883db2..6ea96b77d 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-314.pyc
new file mode 100644
index 000000000..65abd54c5
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-314.pyc
index 15b63d541..d21421064 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-314.pyc
new file mode 100644
index 000000000..e29c19a66
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-314.pyc
index 5dc602ca7..477216fc7 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-314.pyc
index 94f9853dd..b6a6df6a3 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-314.pyc
similarity index 82%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-314.pyc
index 905e4a1fa..7e2454a26 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-314.pyc
new file mode 100644
index 000000000..87fea300c
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-314.pyc
index 26b406a34..12820cb8e 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-314.pyc
new file mode 100644
index 000000000..dc27602c9
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-314.pyc
similarity index 88%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-314.pyc
index ee6381518..21f9e7fa7 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-314.pyc
similarity index 85%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-314.pyc
index da8e7a09e..5f453d5b1 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-314.pyc
new file mode 100644
index 000000000..610d240f8
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/align.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/align.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/align.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/align.cpython-314.pyc
index 348a67881..9ab3f5fdb 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/align.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/align.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-314.pyc
index 305171c12..7d3b4f4f8 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-314.pyc
similarity index 87%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-314.pyc
index 5f1ba3aad..1660f9e82 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/box.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/box.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/box.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/box.cpython-314.pyc
index 9baa4c27c..377a58745 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/box.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/box.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-314.pyc
similarity index 93%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-314.pyc
index 6ed882429..256462432 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color.cpython-314.pyc
index 0504e688d..3809833e2 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-314.pyc
new file mode 100644
index 000000000..e768f113e
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-314.pyc
index 87ee2b869..406ae678b 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/console.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/console.cpython-314.pyc
new file mode 100644
index 000000000..4b46db65a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/console.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-314.pyc
similarity index 83%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-314.pyc
index 7eb00de65..43ea6ea7e 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-314.pyc
index 648cf326a..083f813ec 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/control.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/control.cpython-314.pyc
similarity index 85%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/control.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/control.cpython-314.pyc
index bcd3b0575..cc29e5db7 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/control.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/control.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-314.pyc
similarity index 94%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-314.pyc
index 7cab9a5eb..f2f89387e 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-314.pyc
similarity index 87%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-314.pyc
index abaebe15a..4b9d0655a 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-314.pyc
similarity index 93%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-314.pyc
index 032a6f511..690c0fa33 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-314.pyc
new file mode 100644
index 000000000..f21607285
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-314.pyc
new file mode 100644
index 000000000..a20840c70
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-314.pyc
similarity index 92%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-314.pyc
index 76bb6d1a6..10343df23 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-314.pyc
index 7f5deb5cf..275f93a50 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/json.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/json.cpython-314.pyc
similarity index 94%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/json.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/json.cpython-314.pyc
index 6e2dfaff7..fd7d532cf 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/json.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/json.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-314.pyc
similarity index 92%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-314.pyc
index 360d61d52..209afe223 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-314.pyc
index ef8a9d8fd..cc1d089b3 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live.cpython-314.pyc
similarity index 92%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live.cpython-314.pyc
index 2c5b63969..fd4788c21 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-314.pyc
similarity index 93%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-314.pyc
index 4a42bda44..a270e155f 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-314.pyc
new file mode 100644
index 000000000..7334a8110
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-314.pyc
index 2cb03ddad..1fa187748 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-314.pyc
similarity index 95%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-314.pyc
index aa059d140..575b079ef 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-314.pyc
index ea811b2b0..753d26d5e 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-314.pyc
similarity index 86%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-314.pyc
index d56f6d597..947d80165 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-314.pyc
similarity index 86%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-314.pyc
index c594407bb..5d4b08f40 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-314.pyc
index 6f5252976..c79757fe9 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-314.pyc
similarity index 99%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-314.pyc
index 5a80cef20..1c7100136 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-314.pyc
index 57c7270a1..9876b9984 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-314.pyc
index 30fc1b457..48c4e1d29 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-314.pyc
index f3f7f705a..cf47eabe2 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-314.pyc
similarity index 87%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-314.pyc
index 21163f116..783df7fe6 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/region.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/region.cpython-314.pyc
new file mode 100644
index 000000000..eeccc8980
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/region.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-314.pyc
similarity index 86%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-314.pyc
index 26e6fa9ee..ee91fdb6c 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-314.pyc
similarity index 95%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-314.pyc
index 2dcc4ade8..4bb2547a3 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-314.pyc
similarity index 93%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-314.pyc
index 089136fe9..70ae2407f 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-314.pyc
similarity index 91%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-314.pyc
index 16ab03dbb..e3ba720b6 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-314.pyc
index 47c0994a1..7b8b21cb4 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-314.pyc
similarity index 95%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-314.pyc
index d3389a47b..5615a2cc1 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/status.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/status.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/status.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/status.cpython-314.pyc
index 4c12cf63e..92d04fc5c 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/status.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/status.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/style.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/style.cpython-314.pyc
new file mode 100644
index 000000000..f74ac6ba7
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/style.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-314.pyc
similarity index 84%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-314.pyc
index 8c053b8da..7e5164702 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-314.pyc
index 084e3eb84..4a3cea25a 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/table.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/table.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/table.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/table.cpython-314.pyc
index 5c512884d..b64a214df 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/table.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/table.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-314.pyc
similarity index 90%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-314.pyc
index 914215788..7e92985bc 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/text.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/text.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/text.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/text.cpython-314.pyc
index e3d7c85e6..69b9b5c90 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/text.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/text.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-314.pyc
index 60e4b36e3..e0f2e1a2b 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-314.pyc
new file mode 100644
index 000000000..c3cc5087a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-314.pyc
new file mode 100644
index 000000000..d48c31df6
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-314.pyc
index 83fd9c526..b10672c9f 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_cell_widths.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_cell_widths.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_cell_widths.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_cell_widths.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_export_format.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_export_format.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_export_format.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_export_format.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_extension.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_extension.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_extension.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_extension.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_fileno.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_fileno.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_fileno.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_fileno.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_inspect.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_inspect.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_inspect.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_inspect.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_log_render.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_log_render.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_log_render.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_log_render.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_loop.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_loop.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_loop.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_loop.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_null_file.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_null_file.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_null_file.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_null_file.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_palettes.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_palettes.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_palettes.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_palettes.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_pick.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_pick.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_pick.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_pick.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_ratio.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_ratio.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_ratio.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_ratio.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_spinners.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_spinners.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_spinners.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_spinners.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_stack.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_stack.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_stack.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_stack.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_timer.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_timer.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_timer.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_timer.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_win32_console.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_win32_console.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_win32_console.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_win32_console.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_wrap.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_wrap.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/_wrap.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/_wrap.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/abc.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/abc.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/abc.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/abc.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/align.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/align.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/align.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/align.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/ansi.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/ansi.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/ansi.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/ansi.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/bar.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/bar.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/bar.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/bar.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/box.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/box.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/box.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/box.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/cells.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/cells.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/cells.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/cells.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/color.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/color.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/color.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/color.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/color_triplet.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/color_triplet.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/color_triplet.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/color_triplet.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/columns.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/columns.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/columns.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/columns.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/console.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/console.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/console.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/console.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/constrain.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/constrain.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/constrain.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/constrain.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/containers.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/containers.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/containers.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/containers.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/control.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/control.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/control.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/control.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/default_styles.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/default_styles.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/default_styles.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/default_styles.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/diagnose.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/diagnose.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/diagnose.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/diagnose.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/emoji.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/emoji.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/emoji.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/emoji.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/errors.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/errors.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/errors.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/errors.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/file_proxy.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/file_proxy.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/file_proxy.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/file_proxy.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/filesize.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/filesize.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/filesize.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/filesize.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/highlighter.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/highlighter.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/highlighter.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/highlighter.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/json.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/json.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/json.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/json.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/jupyter.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/jupyter.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/jupyter.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/jupyter.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/layout.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/layout.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/layout.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/layout.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/live.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/live.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/live.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/live.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/live_render.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/live_render.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/live_render.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/live_render.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/logging.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/logging.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/logging.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/logging.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/markup.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/markup.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/markup.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/markup.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/measure.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/measure.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/measure.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/measure.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/padding.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/padding.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/padding.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/padding.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/pager.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/pager.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/pager.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/pager.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/palette.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/palette.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/palette.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/palette.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/panel.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/panel.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/panel.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/panel.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/pretty.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/pretty.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/pretty.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/pretty.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/progress.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/progress.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/progress.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/progress.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/progress_bar.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/progress_bar.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/progress_bar.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/progress_bar.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/prompt.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/prompt.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/prompt.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/prompt.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/protocol.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/protocol.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/protocol.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/protocol.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/resolvelib/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/py.typed
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/region.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/region.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/region.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/region.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/repr.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/repr.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/repr.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/repr.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/rule.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/rule.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/rule.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/rule.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/scope.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/scope.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/scope.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/scope.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/screen.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/screen.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/screen.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/screen.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/segment.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/segment.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/segment.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/segment.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/spinner.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/spinner.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/spinner.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/spinner.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/status.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/status.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/status.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/status.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/style.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/style.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/style.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/style.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/styled.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/styled.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/styled.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/styled.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/syntax.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/syntax.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/syntax.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/syntax.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/table.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/table.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/table.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/table.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/terminal_theme.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/terminal_theme.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/terminal_theme.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/terminal_theme.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/text.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/text.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/text.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/text.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/theme.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/theme.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/theme.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/theme.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/themes.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/themes.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/themes.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/themes.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/traceback.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/traceback.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/traceback.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/traceback.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/tree.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/tree.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/tree.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/rich/tree.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/LICENSE
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__init__.py
new file mode 100644
index 000000000..aaecab11f
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__init__.py
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
+# Licensed to PSF under a Contributor Agreement.
+
+__all__ = ("loads", "load", "TOMLDecodeError")
+__version__ = "2.3.1"  # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
+
+from ._parser import TOMLDecodeError, load, loads
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..78ea2d8bf
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-314.pyc
new file mode 100644
index 000000000..d147970a5
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-314.pyc
new file mode 100644
index 000000000..a9328f8c4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-314.pyc
new file mode 100644
index 000000000..0ea629391
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/_parser.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/_parser.py
new file mode 100644
index 000000000..f81f468a8
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/_parser.py
@@ -0,0 +1,788 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
+# Licensed to PSF under a Contributor Agreement.
+
+from __future__ import annotations
+
+import sys
+from types import MappingProxyType
+
+from ._re import (
+    RE_DATETIME,
+    RE_LOCALTIME,
+    RE_NUMBER,
+    match_to_datetime,
+    match_to_localtime,
+    match_to_number,
+)
+
+TYPE_CHECKING = False
+if TYPE_CHECKING:
+    from collections.abc import Iterable
+    from typing import IO, Any, Final
+
+    from ._types import Key, ParseFloat, Pos
+
+# Inline tables/arrays are implemented using recursion. Pathologically
+# nested documents cause pure Python to raise RecursionError (which is OK),
+# but mypyc binary wheels will crash unrecoverably (not OK). According to
+# mypyc docs this will be fixed in the future:
+# https://mypyc.readthedocs.io/en/latest/differences_from_python.html#stack-overflows
+# Before mypyc's fix is in, recursion needs to be limited by this library.
+# Choosing `sys.getrecursionlimit()` as maximum inline table/array nesting
+# level, as it allows more nesting than pure Python, but still seems a far
+# lower number than where mypyc binaries crash.
+MAX_INLINE_NESTING: Final = sys.getrecursionlimit()
+
+# Pathologically excessive number of parts in a key runs into quadratic
+# behavior (e.g. in Flags.is_).
+# Even if keys aren't currently parsed using recursion, they name a
+# recursive structure, so it makes sense to limit it using getrecursionlimit()
+# and RecursionError.
+MAX_KEY_PARTS: Final = sys.getrecursionlimit()
+
+ASCII_CTRL: Final = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
+
+# Neither of these sets include quotation mark or backslash. They are
+# currently handled as separate cases in the parser functions.
+ILLEGAL_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t")
+ILLEGAL_MULTILINE_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t\n")
+
+ILLEGAL_LITERAL_STR_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
+ILLEGAL_MULTILINE_LITERAL_STR_CHARS: Final = ILLEGAL_MULTILINE_BASIC_STR_CHARS
+
+ILLEGAL_COMMENT_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
+
+TOML_WS: Final = frozenset(" \t")
+TOML_WS_AND_NEWLINE: Final = TOML_WS | frozenset("\n")
+BARE_KEY_CHARS: Final = frozenset(
+    "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
+)
+KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'")
+HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789")
+
+BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType(
+    {
+        "\\b": "\u0008",  # backspace
+        "\\t": "\u0009",  # tab
+        "\\n": "\u000a",  # linefeed
+        "\\f": "\u000c",  # form feed
+        "\\r": "\u000d",  # carriage return
+        '\\"': "\u0022",  # quote
+        "\\\\": "\u005c",  # backslash
+    }
+)
+
+
+class DEPRECATED_DEFAULT:
+    """Sentinel to be used as default arg during deprecation
+    period of TOMLDecodeError's free-form arguments."""
+
+
+class TOMLDecodeError(ValueError):
+    """An error raised if a document is not valid TOML.
+
+    Adds the following attributes to ValueError:
+    msg: The unformatted error message
+    doc: The TOML document being parsed
+    pos: The index of doc where parsing failed
+    lineno: The line corresponding to pos
+    colno: The column corresponding to pos
+    """
+
+    def __init__(
+        self,
+        msg: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
+        doc: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
+        pos: Pos | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
+        *args: Any,
+    ):
+        if (
+            args
+            or not isinstance(msg, str)
+            or not isinstance(doc, str)
+            or not isinstance(pos, int)
+        ):
+            import warnings
+
+            warnings.warn(
+                "Free-form arguments for TOMLDecodeError are deprecated. "
+                "Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.",
+                DeprecationWarning,
+                stacklevel=2,
+            )
+            if pos is not DEPRECATED_DEFAULT:
+                args = pos, *args
+            if doc is not DEPRECATED_DEFAULT:
+                args = doc, *args
+            if msg is not DEPRECATED_DEFAULT:
+                args = msg, *args
+            ValueError.__init__(self, *args)
+            return
+
+        lineno = doc.count("\n", 0, pos) + 1
+        if lineno == 1:
+            colno = pos + 1
+        else:
+            colno = pos - doc.rindex("\n", 0, pos)
+
+        if pos >= len(doc):
+            coord_repr = "end of document"
+        else:
+            coord_repr = f"line {lineno}, column {colno}"
+        errmsg = f"{msg} (at {coord_repr})"
+        ValueError.__init__(self, errmsg)
+
+        self.msg = msg
+        self.doc = doc
+        self.pos = pos
+        self.lineno = lineno
+        self.colno = colno
+
+
+def load(__fp: IO[bytes], *, parse_float: ParseFloat = float) -> dict[str, Any]:
+    """Parse TOML from a binary file object."""
+    b = __fp.read()
+    try:
+        s = b.decode()
+    except AttributeError:
+        raise TypeError(
+            "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
+        ) from None
+    return loads(s, parse_float=parse_float)
+
+
+def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]:
+    """Parse TOML from a string."""
+
+    # The spec allows converting "\r\n" to "\n", even in string
+    # literals. Let's do so to simplify parsing.
+    try:
+        src = __s.replace("\r\n", "\n")
+    except (AttributeError, TypeError):
+        raise TypeError(
+            f"Expected str object, not '{type(__s).__qualname__}'"
+        ) from None
+    pos = 0
+    out = Output()
+    header: Key = ()
+    parse_float = make_safe_parse_float(parse_float)
+
+    # Parse one statement at a time
+    # (typically means one line in TOML source)
+    while True:
+        # 1. Skip line leading whitespace
+        pos = skip_chars(src, pos, TOML_WS)
+
+        # 2. Parse rules. Expect one of the following:
+        #    - end of file
+        #    - end of line
+        #    - comment
+        #    - key/value pair
+        #    - append dict to list (and move to its namespace)
+        #    - create dict (and move to its namespace)
+        # Skip trailing whitespace when applicable.
+        try:
+            char = src[pos]
+        except IndexError:
+            break
+        if char == "\n":
+            pos += 1
+            continue
+        if char in KEY_INITIAL_CHARS:
+            pos = key_value_rule(src, pos, out, header, parse_float)
+            pos = skip_chars(src, pos, TOML_WS)
+        elif char == "[":
+            try:
+                second_char: str | None = src[pos + 1]
+            except IndexError:
+                second_char = None
+            out.flags.finalize_pending()
+            if second_char == "[":
+                pos, header = create_list_rule(src, pos, out)
+            else:
+                pos, header = create_dict_rule(src, pos, out)
+            pos = skip_chars(src, pos, TOML_WS)
+        elif char != "#":
+            raise TOMLDecodeError("Invalid statement", src, pos)
+
+        # 3. Skip comment
+        pos = skip_comment(src, pos)
+
+        # 4. Expect end of line or end of file
+        try:
+            char = src[pos]
+        except IndexError:
+            break
+        if char != "\n":
+            raise TOMLDecodeError(
+                "Expected newline or end of document after a statement", src, pos
+            )
+        pos += 1
+
+    return out.data.dict
+
+
+class Flags:
+    """Flags that map to parsed keys/namespaces."""
+
+    # Marks an immutable namespace (inline array or inline table).
+    FROZEN: Final = 0
+    # Marks a nest that has been explicitly created and can no longer
+    # be opened using the "[table]" syntax.
+    EXPLICIT_NEST: Final = 1
+
+    def __init__(self) -> None:
+        self._flags: dict[str, dict[Any, Any]] = {}
+        self._pending_flags: set[tuple[Key, int]] = set()
+
+    def add_pending(self, key: Key, flag: int) -> None:
+        self._pending_flags.add((key, flag))
+
+    def finalize_pending(self) -> None:
+        for key, flag in self._pending_flags:
+            self.set(key, flag, recursive=False)
+        self._pending_flags.clear()
+
+    def unset_all(self, key: Key) -> None:
+        cont = self._flags
+        for k in key[:-1]:
+            if k not in cont:
+                return
+            cont = cont[k]["nested"]
+        cont.pop(key[-1], None)
+
+    def set(self, key: Key, flag: int, *, recursive: bool) -> None:  # noqa: A003
+        cont = self._flags
+        key_parent, key_stem = key[:-1], key[-1]
+        for k in key_parent:
+            if k not in cont:
+                cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
+            cont = cont[k]["nested"]
+        if key_stem not in cont:
+            cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
+        cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
+
+    def is_(self, key: Key, flag: int) -> bool:
+        if not key:
+            return False  # document root has no flags
+        cont = self._flags
+        for k in key[:-1]:
+            if k not in cont:
+                return False
+            inner_cont = cont[k]
+            if flag in inner_cont["recursive_flags"]:
+                return True
+            cont = inner_cont["nested"]
+        key_stem = key[-1]
+        if key_stem in cont:
+            inner_cont = cont[key_stem]
+            return flag in inner_cont["flags"] or flag in inner_cont["recursive_flags"]
+        return False
+
+
+class NestedDict:
+    def __init__(self) -> None:
+        # The parsed content of the TOML document
+        self.dict: dict[str, Any] = {}
+
+    def get_or_create_nest(
+        self,
+        key: Key,
+        *,
+        access_lists: bool = True,
+    ) -> dict[str, Any]:
+        cont: Any = self.dict
+        for k in key:
+            if k not in cont:
+                cont[k] = {}
+            cont = cont[k]
+            if access_lists and isinstance(cont, list):
+                cont = cont[-1]
+            if not isinstance(cont, dict):
+                raise KeyError("There is no nest behind this key")
+        return cont  # type: ignore[no-any-return]
+
+    def append_nest_to_list(self, key: Key) -> None:
+        cont = self.get_or_create_nest(key[:-1])
+        last_key = key[-1]
+        if last_key in cont:
+            list_ = cont[last_key]
+            if not isinstance(list_, list):
+                raise KeyError("An object other than list found behind this key")
+            list_.append({})
+        else:
+            cont[last_key] = [{}]
+
+
+class Output:
+    def __init__(self) -> None:
+        self.data = NestedDict()
+        self.flags = Flags()
+
+
+def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
+    try:
+        while src[pos] in chars:
+            pos += 1
+    except IndexError:
+        pass
+    return pos
+
+
+def skip_until(
+    src: str,
+    pos: Pos,
+    expect: str,
+    *,
+    error_on: frozenset[str],
+    error_on_eof: bool,
+) -> Pos:
+    try:
+        new_pos = src.index(expect, pos)
+    except ValueError:
+        new_pos = len(src)
+        if error_on_eof:
+            raise TOMLDecodeError(f"Expected {expect!r}", src, new_pos) from None
+
+    if not error_on.isdisjoint(src[pos:new_pos]):
+        while src[pos] not in error_on:
+            pos += 1
+        raise TOMLDecodeError(f"Found invalid character {src[pos]!r}", src, pos)
+    return new_pos
+
+
+def skip_comment(src: str, pos: Pos) -> Pos:
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+    if char == "#":
+        return skip_until(
+            src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
+        )
+    return pos
+
+
+def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
+    while True:
+        pos_before_skip = pos
+        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
+        pos = skip_comment(src, pos)
+        if pos == pos_before_skip:
+            return pos
+
+
+def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
+    pos += 1  # Skip "["
+    pos = skip_chars(src, pos, TOML_WS)
+    pos, key = parse_key(src, pos)
+
+    if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
+        raise TOMLDecodeError(f"Cannot declare {key} twice", src, pos)
+    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
+    try:
+        out.data.get_or_create_nest(key)
+    except KeyError:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+
+    if not src.startswith("]", pos):
+        raise TOMLDecodeError(
+            "Expected ']' at the end of a table declaration", src, pos
+        )
+    return pos + 1, key
+
+
+def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
+    pos += 2  # Skip "[["
+    pos = skip_chars(src, pos, TOML_WS)
+    pos, key = parse_key(src, pos)
+
+    if out.flags.is_(key, Flags.FROZEN):
+        raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
+    # Free the namespace now that it points to another empty list item...
+    out.flags.unset_all(key)
+    # ...but this key precisely is still prohibited from table declaration
+    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
+    try:
+        out.data.append_nest_to_list(key)
+    except KeyError:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+
+    if not src.startswith("]]", pos):
+        raise TOMLDecodeError(
+            "Expected ']]' at the end of an array declaration", src, pos
+        )
+    return pos + 2, key
+
+
+def key_value_rule(
+    src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
+) -> Pos:
+    pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl=0)
+    key_parent, key_stem = key[:-1], key[-1]
+    abs_key_parent = header + key_parent
+
+    relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
+    for cont_key in relative_path_cont_keys:
+        # Check that dotted key syntax does not redefine an existing table
+        if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
+            raise TOMLDecodeError(f"Cannot redefine namespace {cont_key}", src, pos)
+        # Containers in the relative path can't be opened with the table syntax or
+        # dotted key/value syntax in following table sections.
+        out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)
+
+    if out.flags.is_(abs_key_parent, Flags.FROZEN):
+        raise TOMLDecodeError(
+            f"Cannot mutate immutable namespace {abs_key_parent}", src, pos
+        )
+
+    try:
+        nest = out.data.get_or_create_nest(abs_key_parent)
+    except KeyError:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+    if key_stem in nest:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos)
+    # Mark inline table and array namespaces recursively immutable
+    if isinstance(value, (dict, list)):
+        out.flags.set(header + key, Flags.FROZEN, recursive=True)
+    nest[key_stem] = value
+    return pos
+
+
+def parse_key_value_pair(
+    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
+) -> tuple[Pos, Key, Any]:
+    pos, key = parse_key(src, pos)
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+    if char != "=":
+        raise TOMLDecodeError("Expected '=' after a key in a key/value pair", src, pos)
+    pos += 1
+    pos = skip_chars(src, pos, TOML_WS)
+    pos, value = parse_value(src, pos, parse_float, nest_lvl)
+    return pos, key, value
+
+
+def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
+    pos, key_part = parse_key_part(src, pos)
+    key: Key = (key_part,)
+    pos = skip_chars(src, pos, TOML_WS)
+    while True:
+        try:
+            char: str | None = src[pos]
+        except IndexError:
+            char = None
+        if char != ".":
+            return pos, key
+        pos += 1
+        pos = skip_chars(src, pos, TOML_WS)
+        pos, key_part = parse_key_part(src, pos)
+        key += (key_part,)
+        if len(key) > MAX_KEY_PARTS:
+            raise RecursionError(
+                f"TOML key has more than the allowed {MAX_KEY_PARTS} parts"
+            )
+        pos = skip_chars(src, pos, TOML_WS)
+
+
+def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+    if char in BARE_KEY_CHARS:
+        start_pos = pos
+        pos = skip_chars(src, pos, BARE_KEY_CHARS)
+        return pos, src[start_pos:pos]
+    if char == "'":
+        return parse_literal_str(src, pos)
+    if char == '"':
+        return parse_one_line_basic_str(src, pos)
+    raise TOMLDecodeError("Invalid initial character for a key part", src, pos)
+
+
+def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
+    pos += 1
+    return parse_basic_str(src, pos, multiline=False)
+
+
+def parse_array(
+    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
+) -> tuple[Pos, list[Any]]:
+    pos += 1
+    array: list[Any] = []
+
+    pos = skip_comments_and_array_ws(src, pos)
+    if src.startswith("]", pos):
+        return pos + 1, array
+    while True:
+        pos, val = parse_value(src, pos, parse_float, nest_lvl)
+        array.append(val)
+        pos = skip_comments_and_array_ws(src, pos)
+
+        c = src[pos : pos + 1]
+        if c == "]":
+            return pos + 1, array
+        if c != ",":
+            raise TOMLDecodeError("Unclosed array", src, pos)
+        pos += 1
+
+        pos = skip_comments_and_array_ws(src, pos)
+        if src.startswith("]", pos):
+            return pos + 1, array
+
+
+def parse_inline_table(
+    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
+) -> tuple[Pos, dict[str, Any]]:
+    pos += 1
+    nested_dict = NestedDict()
+    flags = Flags()
+
+    pos = skip_chars(src, pos, TOML_WS)
+    if src.startswith("}", pos):
+        return pos + 1, nested_dict.dict
+    while True:
+        pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl)
+        key_parent, key_stem = key[:-1], key[-1]
+        if flags.is_(key, Flags.FROZEN):
+            raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
+        try:
+            nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
+        except KeyError:
+            raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+        if key_stem in nest:
+            raise TOMLDecodeError(f"Duplicate inline table key {key_stem!r}", src, pos)
+        nest[key_stem] = value
+        pos = skip_chars(src, pos, TOML_WS)
+        c = src[pos : pos + 1]
+        if c == "}":
+            return pos + 1, nested_dict.dict
+        if c != ",":
+            raise TOMLDecodeError("Unclosed inline table", src, pos)
+        if isinstance(value, (dict, list)):
+            flags.set(key, Flags.FROZEN, recursive=True)
+        pos += 1
+        pos = skip_chars(src, pos, TOML_WS)
+
+
+def parse_basic_str_escape(
+    src: str, pos: Pos, *, multiline: bool = False
+) -> tuple[Pos, str]:
+    escape_id = src[pos : pos + 2]
+    pos += 2
+    if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
+        # Skip whitespace until next non-whitespace character or end of
+        # the doc. Error if non-whitespace is found before newline.
+        if escape_id != "\\\n":
+            pos = skip_chars(src, pos, TOML_WS)
+            try:
+                char = src[pos]
+            except IndexError:
+                return pos, ""
+            if char != "\n":
+                raise TOMLDecodeError("Unescaped '\\' in a string", src, pos)
+            pos += 1
+        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
+        return pos, ""
+    if escape_id == "\\u":
+        return parse_hex_char(src, pos, 4)
+    if escape_id == "\\U":
+        return parse_hex_char(src, pos, 8)
+    try:
+        return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
+    except KeyError:
+        raise TOMLDecodeError("Unescaped '\\' in a string", src, pos) from None
+
+
+def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
+    return parse_basic_str_escape(src, pos, multiline=True)
+
+
+def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
+    hex_str = src[pos : pos + hex_len]
+    if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
+        raise TOMLDecodeError("Invalid hex value", src, pos)
+    pos += hex_len
+    hex_int = int(hex_str, 16)
+    if not is_unicode_scalar_value(hex_int):
+        raise TOMLDecodeError(
+            "Escaped character is not a Unicode scalar value", src, pos
+        )
+    return pos, chr(hex_int)
+
+
+def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
+    pos += 1  # Skip starting apostrophe
+    start_pos = pos
+    pos = skip_until(
+        src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
+    )
+    return pos + 1, src[start_pos:pos]  # Skip ending apostrophe
+
+
+def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
+    pos += 3
+    if src.startswith("\n", pos):
+        pos += 1
+
+    if literal:
+        delim = "'"
+        end_pos = skip_until(
+            src,
+            pos,
+            "'''",
+            error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
+            error_on_eof=True,
+        )
+        result = src[pos:end_pos]
+        pos = end_pos + 3
+    else:
+        delim = '"'
+        pos, result = parse_basic_str(src, pos, multiline=True)
+
+    # Add at maximum two extra apostrophes/quotes if the end sequence
+    # is 4 or 5 chars long instead of just 3.
+    if not src.startswith(delim, pos):
+        return pos, result
+    pos += 1
+    if not src.startswith(delim, pos):
+        return pos, result + delim
+    pos += 1
+    return pos, result + (delim * 2)
+
+
+def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
+    if multiline:
+        error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
+        parse_escapes = parse_basic_str_escape_multiline
+    else:
+        error_on = ILLEGAL_BASIC_STR_CHARS
+        parse_escapes = parse_basic_str_escape
+    result = ""
+    start_pos = pos
+    while True:
+        try:
+            char = src[pos]
+        except IndexError:
+            raise TOMLDecodeError("Unterminated string", src, pos) from None
+        if char == '"':
+            if not multiline:
+                return pos + 1, result + src[start_pos:pos]
+            if src.startswith('"""', pos):
+                return pos + 3, result + src[start_pos:pos]
+            pos += 1
+            continue
+        if char == "\\":
+            result += src[start_pos:pos]
+            pos, parsed_escape = parse_escapes(src, pos)
+            result += parsed_escape
+            start_pos = pos
+            continue
+        if char in error_on:
+            raise TOMLDecodeError(f"Illegal character {char!r}", src, pos)
+        pos += 1
+
+
+def parse_value(
+    src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
+) -> tuple[Pos, Any]:
+    if nest_lvl > MAX_INLINE_NESTING:
+        # Pure Python should have raised RecursionError already.
+        # This ensures mypyc binaries eventually do the same.
+        raise RecursionError(  # pragma: no cover
+            "TOML inline arrays/tables are nested more than the allowed"
+            f" {MAX_INLINE_NESTING} levels"
+        )
+
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+
+    # IMPORTANT: order conditions based on speed of checking and likelihood
+
+    # Basic strings
+    if char == '"':
+        if src.startswith('"""', pos):
+            return parse_multiline_str(src, pos, literal=False)
+        return parse_one_line_basic_str(src, pos)
+
+    # Literal strings
+    if char == "'":
+        if src.startswith("'''", pos):
+            return parse_multiline_str(src, pos, literal=True)
+        return parse_literal_str(src, pos)
+
+    # Booleans
+    if char == "t":
+        if src.startswith("true", pos):
+            return pos + 4, True
+    if char == "f":
+        if src.startswith("false", pos):
+            return pos + 5, False
+
+    # Arrays
+    if char == "[":
+        return parse_array(src, pos, parse_float, nest_lvl + 1)
+
+    # Inline tables
+    if char == "{":
+        return parse_inline_table(src, pos, parse_float, nest_lvl + 1)
+
+    # Dates and times
+    datetime_match = RE_DATETIME.match(src, pos)
+    if datetime_match:
+        try:
+            datetime_obj = match_to_datetime(datetime_match)
+        except ValueError as e:
+            raise TOMLDecodeError("Invalid date or datetime", src, pos) from e
+        return datetime_match.end(), datetime_obj
+    localtime_match = RE_LOCALTIME.match(src, pos)
+    if localtime_match:
+        return localtime_match.end(), match_to_localtime(localtime_match)
+
+    # Integers and "normal" floats.
+    # The regex will greedily match any type starting with a decimal
+    # char, so needs to be located after handling of dates and times.
+    number_match = RE_NUMBER.match(src, pos)
+    if number_match:
+        return number_match.end(), match_to_number(number_match, parse_float)
+
+    # Special floats
+    first_three = src[pos : pos + 3]
+    if first_three in {"inf", "nan"}:
+        return pos + 3, parse_float(first_three)
+    first_four = src[pos : pos + 4]
+    if first_four in {"-inf", "+inf", "-nan", "+nan"}:
+        return pos + 4, parse_float(first_four)
+
+    raise TOMLDecodeError("Invalid value", src, pos)
+
+
+def is_unicode_scalar_value(codepoint: int) -> bool:
+    return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)
+
+
+def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
+    """A decorator to make `parse_float` safe.
+
+    `parse_float` must not return dicts or lists, because these types
+    would be mixed with parsed TOML tables and arrays, thus confusing
+    the parser. The returned decorated callable raises `ValueError`
+    instead of returning illegal types.
+    """
+    # The default `float` callable never returns illegal types. Optimize it.
+    if parse_float is float:
+        return float
+
+    def safe_parse_float(float_str: str) -> Any:
+        float_value = parse_float(float_str)
+        if isinstance(float_value, (dict, list)):
+            raise ValueError("parse_float must not return dicts or lists")
+        return float_value
+
+    return safe_parse_float
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/_re.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/_re.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/_re.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/_re.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/_types.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/_types.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/_types.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/_types.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli/py.typed
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..31df1e6c8
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/_writer.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/_writer.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/_writer.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/_writer.cpython-314.pyc
index 2467069b5..213ef51a5 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/_writer.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/__pycache__/_writer.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/_writer.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/_writer.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/_writer.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/_writer.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/tomli_w/py.typed
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/LICENSE b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/LICENSE
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/LICENSE
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/LICENSE
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..7924344ab
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-314.pyc
similarity index 98%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-314.pyc
index d72f29a71..bdeeb010e 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-314.pyc
similarity index 96%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-314.pyc
index b579543a1..fa9b88747 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-314.pyc
similarity index 90%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-314.pyc
index 90a168236..ceab4f6b0 100644
Binary files a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-314.pyc and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-314.pyc
new file mode 100644
index 000000000..40883ace4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-314.pyc
new file mode 100644
index 000000000..cb492aee3
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_api.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_api.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_api.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_api.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_macos.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_macos.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_macos.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_macos.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_openssl.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_openssl.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_openssl.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_openssl.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_windows.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_windows.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/truststore/_windows.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/_windows.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/rich/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/truststore/py.typed
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/LICENSE.txt b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/LICENSE.txt
new file mode 100644
index 000000000..e6183d027
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2008-2020 Andrey Petrov and contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__init__.py
new file mode 100644
index 000000000..3fe782c8a
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__init__.py
@@ -0,0 +1,211 @@
+"""
+Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more
+"""
+
+from __future__ import annotations
+
+# Set default logging handler to avoid "No handler found" warnings.
+import logging
+import sys
+import typing
+import warnings
+from logging import NullHandler
+
+from . import exceptions
+from ._base_connection import _TYPE_BODY
+from ._collections import HTTPHeaderDict
+from ._version import __version__
+from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
+from .filepost import _TYPE_FIELDS, encode_multipart_formdata
+from .poolmanager import PoolManager, ProxyManager, proxy_from_url
+from .response import BaseHTTPResponse, HTTPResponse
+from .util.request import make_headers
+from .util.retry import Retry
+from .util.timeout import Timeout
+
+# Ensure that Python is compiled with OpenSSL 1.1.1+
+# If the 'ssl' module isn't available at all that's
+# fine, we only care if the module is available.
+try:
+    import ssl
+except ImportError:
+    pass
+else:
+    if not ssl.OPENSSL_VERSION.startswith("OpenSSL "):  # Defensive:
+        warnings.warn(
+            "urllib3 v2 only supports OpenSSL 1.1.1+, currently "
+            f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION!r}. "
+            "See: https://github.com/urllib3/urllib3/issues/3020",
+            exceptions.NotOpenSSLWarning,
+        )
+    elif ssl.OPENSSL_VERSION_INFO < (1, 1, 1):  # Defensive:
+        raise ImportError(
+            "urllib3 v2 only supports OpenSSL 1.1.1+, currently "
+            f"the 'ssl' module is compiled with {ssl.OPENSSL_VERSION!r}. "
+            "See: https://github.com/urllib3/urllib3/issues/2168"
+        )
+
+__author__ = "Andrey Petrov (andrey.petrov@shazow.net)"
+__license__ = "MIT"
+__version__ = __version__
+
+__all__ = (
+    "HTTPConnectionPool",
+    "HTTPHeaderDict",
+    "HTTPSConnectionPool",
+    "PoolManager",
+    "ProxyManager",
+    "HTTPResponse",
+    "Retry",
+    "Timeout",
+    "add_stderr_logger",
+    "connection_from_url",
+    "disable_warnings",
+    "encode_multipart_formdata",
+    "make_headers",
+    "proxy_from_url",
+    "request",
+    "BaseHTTPResponse",
+)
+
+logging.getLogger(__name__).addHandler(NullHandler())
+
+
+def add_stderr_logger(
+    level: int = logging.DEBUG,
+) -> logging.StreamHandler[typing.TextIO]:
+    """
+    Helper for quickly adding a StreamHandler to the logger. Useful for
+    debugging.
+
+    Returns the handler after adding it.
+    """
+    # This method needs to be in this __init__.py to get the __name__ correct
+    # even if urllib3 is vendored within another package.
+    logger = logging.getLogger(__name__)
+    handler = logging.StreamHandler()
+    handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s"))
+    logger.addHandler(handler)
+    logger.setLevel(level)
+    logger.debug("Added a stderr logging handler to logger: %s", __name__)
+    return handler
+
+
+# ... Clean up.
+del NullHandler
+
+
+# All warning filters *must* be appended unless you're really certain that they
+# shouldn't be: otherwise, it's very hard for users to use most Python
+# mechanisms to silence them.
+# SecurityWarning's always go off by default.
+warnings.simplefilter("always", exceptions.SecurityWarning, append=True)
+# InsecurePlatformWarning's don't vary between requests, so we keep it default.
+warnings.simplefilter("default", exceptions.InsecurePlatformWarning, append=True)
+
+
+def disable_warnings(category: type[Warning] = exceptions.HTTPWarning) -> None:
+    """
+    Helper for quickly disabling all urllib3 warnings.
+    """
+    warnings.simplefilter("ignore", category)
+
+
+_DEFAULT_POOL = PoolManager()
+
+
+def request(
+    method: str,
+    url: str,
+    *,
+    body: _TYPE_BODY | None = None,
+    fields: _TYPE_FIELDS | None = None,
+    headers: typing.Mapping[str, str] | None = None,
+    preload_content: bool | None = True,
+    decode_content: bool | None = True,
+    redirect: bool | None = True,
+    retries: Retry | bool | int | None = None,
+    timeout: Timeout | float | int | None = 3,
+    json: typing.Any | None = None,
+) -> BaseHTTPResponse:
+    """
+    A convenience, top-level request method. It uses a module-global ``PoolManager`` instance.
+    Therefore, its side effects could be shared across dependencies relying on it.
+    To avoid side effects create a new ``PoolManager`` instance and use it instead.
+    The method does not accept low-level ``**urlopen_kw`` keyword arguments.
+
+    :param method:
+        HTTP request method (such as GET, POST, PUT, etc.)
+
+    :param url:
+        The URL to perform the request on.
+
+    :param body:
+        Data to send in the request body, either :class:`str`, :class:`bytes`,
+        an iterable of :class:`str`/:class:`bytes`, or a file-like object.
+
+    :param fields:
+        Data to encode and send in the request body.
+
+    :param headers:
+        Dictionary of custom headers to send, such as User-Agent,
+        If-None-Match, etc.
+
+    :param bool preload_content:
+        If True, the response's body will be preloaded into memory.
+
+    :param bool decode_content:
+        If True, will attempt to decode the body based on the
+        'content-encoding' header.
+
+    :param redirect:
+        If True, automatically handle redirects (status codes 301, 302,
+        303, 307, 308). Each redirect counts as a retry. Disabling retries
+        will disable redirect, too.
+
+    :param retries:
+        Configure the number of retries to allow before raising a
+        :class:`~urllib3.exceptions.MaxRetryError` exception.
+
+        If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a
+        :class:`~urllib3.util.retry.Retry` object for fine-grained control
+        over different types of retries.
+        Pass an integer number to retry connection errors that many times,
+        but no other types of errors. Pass zero to never retry.
+
+        If ``False``, then retries are disabled and any exception is raised
+        immediately. Also, instead of raising a MaxRetryError on redirects,
+        the redirect response will be returned.
+
+    :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.
+
+    :param timeout:
+        If specified, overrides the default timeout for this one
+        request. It may be a float (in seconds) or an instance of
+        :class:`urllib3.util.Timeout`.
+
+    :param json:
+        Data to encode and send as JSON with UTF-encoded in the request body.
+        The ``"Content-Type"`` header will be set to ``"application/json"``
+        unless specified otherwise.
+    """
+
+    return _DEFAULT_POOL.request(
+        method,
+        url,
+        body=body,
+        fields=fields,
+        headers=headers,
+        preload_content=preload_content,
+        decode_content=decode_content,
+        redirect=redirect,
+        retries=retries,
+        timeout=timeout,
+        json=json,
+    )
+
+
+if sys.platform == "emscripten":
+    from .contrib.emscripten import inject_into_urllib3  # noqa: 401
+
+    inject_into_urllib3()
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..5f486f56d
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_base_connection.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_base_connection.cpython-314.pyc
new file mode 100644
index 000000000..fcfbfe0fa
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_base_connection.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-314.pyc
new file mode 100644
index 000000000..2dc6526ef
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_request_methods.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_request_methods.cpython-314.pyc
new file mode 100644
index 000000000..e3b3fd062
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_request_methods.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-314.pyc
new file mode 100644
index 000000000..48e282afa
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-314.pyc
new file mode 100644
index 000000000..10312bbf7
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-314.pyc
new file mode 100644
index 000000000..49cf3dc59
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-314.pyc
new file mode 100644
index 000000000..e9b96ad71
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-314.pyc
new file mode 100644
index 000000000..a93f4a3f2
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-314.pyc
new file mode 100644
index 000000000..d80d6f361
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-314.pyc
new file mode 100644
index 000000000..a50ed6bbf
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-314.pyc
new file mode 100644
index 000000000..36ad0c680
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py
new file mode 100644
index 000000000..dc0f318c0
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py
@@ -0,0 +1,165 @@
+from __future__ import annotations
+
+import typing
+
+from .util.connection import _TYPE_SOCKET_OPTIONS
+from .util.timeout import _DEFAULT_TIMEOUT, _TYPE_TIMEOUT
+from .util.url import Url
+
+_TYPE_BODY = typing.Union[bytes, typing.IO[typing.Any], typing.Iterable[bytes], str]
+
+
+class ProxyConfig(typing.NamedTuple):
+    ssl_context: ssl.SSLContext | None
+    use_forwarding_for_https: bool
+    assert_hostname: None | str | typing.Literal[False]
+    assert_fingerprint: str | None
+
+
+class _ResponseOptions(typing.NamedTuple):
+    # TODO: Remove this in favor of a better
+    # HTTP request/response lifecycle tracking.
+    request_method: str
+    request_url: str
+    preload_content: bool
+    decode_content: bool
+    enforce_content_length: bool
+
+
+if typing.TYPE_CHECKING:
+    import ssl
+    from typing import Protocol
+
+    from .response import BaseHTTPResponse
+
+    class BaseHTTPConnection(Protocol):
+        default_port: typing.ClassVar[int]
+        default_socket_options: typing.ClassVar[_TYPE_SOCKET_OPTIONS]
+
+        host: str
+        port: int
+        timeout: None | (
+            float
+        )  # Instance doesn't store _DEFAULT_TIMEOUT, must be resolved.
+        blocksize: int
+        source_address: tuple[str, int] | None
+        socket_options: _TYPE_SOCKET_OPTIONS | None
+
+        proxy: Url | None
+        proxy_config: ProxyConfig | None
+
+        is_verified: bool
+        proxy_is_verified: bool | None
+
+        def __init__(
+            self,
+            host: str,
+            port: int | None = None,
+            *,
+            timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+            source_address: tuple[str, int] | None = None,
+            blocksize: int = 8192,
+            socket_options: _TYPE_SOCKET_OPTIONS | None = ...,
+            proxy: Url | None = None,
+            proxy_config: ProxyConfig | None = None,
+        ) -> None: ...
+
+        def set_tunnel(
+            self,
+            host: str,
+            port: int | None = None,
+            headers: typing.Mapping[str, str] | None = None,
+            scheme: str = "http",
+        ) -> None: ...
+
+        def connect(self) -> None: ...
+
+        def request(
+            self,
+            method: str,
+            url: str,
+            body: _TYPE_BODY | None = None,
+            headers: typing.Mapping[str, str] | None = None,
+            # We know *at least* botocore is depending on the order of the
+            # first 3 parameters so to be safe we only mark the later ones
+            # as keyword-only to ensure we have space to extend.
+            *,
+            chunked: bool = False,
+            preload_content: bool = True,
+            decode_content: bool = True,
+            enforce_content_length: bool = True,
+        ) -> None: ...
+
+        def getresponse(self) -> BaseHTTPResponse: ...
+
+        def close(self) -> None: ...
+
+        @property
+        def is_closed(self) -> bool:
+            """Whether the connection either is brand new or has been previously closed.
+            If this property is True then both ``is_connected`` and ``has_connected_to_proxy``
+            properties must be False.
+            """
+
+        @property
+        def is_connected(self) -> bool:
+            """Whether the connection is actively connected to any origin (proxy or target)"""
+
+        @property
+        def has_connected_to_proxy(self) -> bool:
+            """Whether the connection has successfully connected to its proxy.
+            This returns False if no proxy is in use. Used to determine whether
+            errors are coming from the proxy layer or from tunnelling to the target origin.
+            """
+
+    class BaseHTTPSConnection(BaseHTTPConnection, Protocol):
+        default_port: typing.ClassVar[int]
+        default_socket_options: typing.ClassVar[_TYPE_SOCKET_OPTIONS]
+
+        # Certificate verification methods
+        cert_reqs: int | str | None
+        assert_hostname: None | str | typing.Literal[False]
+        assert_fingerprint: str | None
+        ssl_context: ssl.SSLContext | None
+
+        # Trusted CAs
+        ca_certs: str | None
+        ca_cert_dir: str | None
+        ca_cert_data: None | str | bytes
+
+        # TLS version
+        ssl_minimum_version: int | None
+        ssl_maximum_version: int | None
+        ssl_version: int | str | None  # Deprecated
+
+        # Client certificates
+        cert_file: str | None
+        key_file: str | None
+        key_password: str | None
+
+        def __init__(
+            self,
+            host: str,
+            port: int | None = None,
+            *,
+            timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+            source_address: tuple[str, int] | None = None,
+            blocksize: int = 16384,
+            socket_options: _TYPE_SOCKET_OPTIONS | None = ...,
+            proxy: Url | None = None,
+            proxy_config: ProxyConfig | None = None,
+            cert_reqs: int | str | None = None,
+            assert_hostname: None | str | typing.Literal[False] = None,
+            assert_fingerprint: str | None = None,
+            server_hostname: str | None = None,
+            ssl_context: ssl.SSLContext | None = None,
+            ca_certs: str | None = None,
+            ca_cert_dir: str | None = None,
+            ca_cert_data: None | str | bytes = None,
+            ssl_minimum_version: int | None = None,
+            ssl_maximum_version: int | None = None,
+            ssl_version: int | str | None = None,  # Deprecated
+            cert_file: str | None = None,
+            key_file: str | None = None,
+            key_password: str | None = None,
+        ) -> None: ...
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_collections.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_collections.py
new file mode 100644
index 000000000..0378aab1b
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_collections.py
@@ -0,0 +1,487 @@
+from __future__ import annotations
+
+import typing
+from collections import OrderedDict
+from enum import Enum, auto
+from threading import RLock
+
+if typing.TYPE_CHECKING:
+    # We can only import Protocol if TYPE_CHECKING because it's a development
+    # dependency, and is not available at runtime.
+    from typing import Protocol
+
+    from typing_extensions import Self
+
+    class HasGettableStringKeys(Protocol):
+        def keys(self) -> typing.Iterator[str]: ...
+
+        def __getitem__(self, key: str) -> str: ...
+
+
+__all__ = ["RecentlyUsedContainer", "HTTPHeaderDict"]
+
+
+# Key type
+_KT = typing.TypeVar("_KT")
+# Value type
+_VT = typing.TypeVar("_VT")
+# Default type
+_DT = typing.TypeVar("_DT")
+
+ValidHTTPHeaderSource = typing.Union[
+    "HTTPHeaderDict",
+    typing.Mapping[str, str],
+    typing.Iterable[tuple[str, str]],
+    "HasGettableStringKeys",
+]
+
+
+class _Sentinel(Enum):
+    not_passed = auto()
+
+
+def ensure_can_construct_http_header_dict(
+    potential: object,
+) -> ValidHTTPHeaderSource | None:
+    if isinstance(potential, HTTPHeaderDict):
+        return potential
+    elif isinstance(potential, typing.Mapping):
+        # Full runtime checking of the contents of a Mapping is expensive, so for the
+        # purposes of typechecking, we assume that any Mapping is the right shape.
+        return typing.cast(typing.Mapping[str, str], potential)
+    elif isinstance(potential, typing.Iterable):
+        # Similarly to Mapping, full runtime checking of the contents of an Iterable is
+        # expensive, so for the purposes of typechecking, we assume that any Iterable
+        # is the right shape.
+        return typing.cast(typing.Iterable[tuple[str, str]], potential)
+    elif hasattr(potential, "keys") and hasattr(potential, "__getitem__"):
+        return typing.cast("HasGettableStringKeys", potential)
+    else:
+        return None
+
+
+class RecentlyUsedContainer(typing.Generic[_KT, _VT], typing.MutableMapping[_KT, _VT]):
+    """
+    Provides a thread-safe dict-like container which maintains up to
+    ``maxsize`` keys while throwing away the least-recently-used keys beyond
+    ``maxsize``.
+
+    :param maxsize:
+        Maximum number of recent elements to retain.
+
+    :param dispose_func:
+        Every time an item is evicted from the container,
+        ``dispose_func(value)`` is called.  Callback which will get called
+    """
+
+    _container: typing.OrderedDict[_KT, _VT]
+    _maxsize: int
+    dispose_func: typing.Callable[[_VT], None] | None
+    lock: RLock
+
+    def __init__(
+        self,
+        maxsize: int = 10,
+        dispose_func: typing.Callable[[_VT], None] | None = None,
+    ) -> None:
+        super().__init__()
+        self._maxsize = maxsize
+        self.dispose_func = dispose_func
+        self._container = OrderedDict()
+        self.lock = RLock()
+
+    def __getitem__(self, key: _KT) -> _VT:
+        # Re-insert the item, moving it to the end of the eviction line.
+        with self.lock:
+            item = self._container.pop(key)
+            self._container[key] = item
+            return item
+
+    def __setitem__(self, key: _KT, value: _VT) -> None:
+        evicted_item = None
+        with self.lock:
+            # Possibly evict the existing value of 'key'
+            try:
+                # If the key exists, we'll overwrite it, which won't change the
+                # size of the pool. Because accessing a key should move it to
+                # the end of the eviction line, we pop it out first.
+                evicted_item = key, self._container.pop(key)
+                self._container[key] = value
+            except KeyError:
+                # When the key does not exist, we insert the value first so that
+                # evicting works in all cases, including when self._maxsize is 0
+                self._container[key] = value
+                if len(self._container) > self._maxsize:
+                    # If we didn't evict an existing value, and we've hit our maximum
+                    # size, then we have to evict the least recently used item from
+                    # the beginning of the container.
+                    evicted_item = self._container.popitem(last=False)
+
+        # After releasing the lock on the pool, dispose of any evicted value.
+        if evicted_item is not None and self.dispose_func:
+            _, evicted_value = evicted_item
+            self.dispose_func(evicted_value)
+
+    def __delitem__(self, key: _KT) -> None:
+        with self.lock:
+            value = self._container.pop(key)
+
+        if self.dispose_func:
+            self.dispose_func(value)
+
+    def __len__(self) -> int:
+        with self.lock:
+            return len(self._container)
+
+    def __iter__(self) -> typing.NoReturn:
+        raise NotImplementedError(
+            "Iteration over this class is unlikely to be threadsafe."
+        )
+
+    def clear(self) -> None:
+        with self.lock:
+            # Copy pointers to all values, then wipe the mapping
+            values = list(self._container.values())
+            self._container.clear()
+
+        if self.dispose_func:
+            for value in values:
+                self.dispose_func(value)
+
+    def keys(self) -> set[_KT]:  # type: ignore[override]
+        with self.lock:
+            return set(self._container.keys())
+
+
+class HTTPHeaderDictItemView(set[tuple[str, str]]):
+    """
+    HTTPHeaderDict is unusual for a Mapping[str, str] in that it has two modes of
+    address.
+
+    If we directly try to get an item with a particular name, we will get a string
+    back that is the concatenated version of all the values:
+
+    >>> d['X-Header-Name']
+    'Value1, Value2, Value3'
+
+    However, if we iterate over an HTTPHeaderDict's items, we will optionally combine
+    these values based on whether combine=True was called when building up the dictionary
+
+    >>> d = HTTPHeaderDict({"A": "1", "B": "foo"})
+    >>> d.add("A", "2", combine=True)
+    >>> d.add("B", "bar")
+    >>> list(d.items())
+    [
+        ('A', '1, 2'),
+        ('B', 'foo'),
+        ('B', 'bar'),
+    ]
+
+    This class conforms to the interface required by the MutableMapping ABC while
+    also giving us the nonstandard iteration behavior we want; items with duplicate
+    keys, ordered by time of first insertion.
+    """
+
+    _headers: HTTPHeaderDict
+
+    def __init__(self, headers: HTTPHeaderDict) -> None:
+        self._headers = headers
+
+    def __len__(self) -> int:
+        return len(list(self._headers.iteritems()))
+
+    def __iter__(self) -> typing.Iterator[tuple[str, str]]:
+        return self._headers.iteritems()
+
+    def __contains__(self, item: object) -> bool:
+        if isinstance(item, tuple) and len(item) == 2:
+            passed_key, passed_val = item
+            if isinstance(passed_key, str) and isinstance(passed_val, str):
+                return self._headers._has_value_for_header(passed_key, passed_val)
+        return False
+
+
+class HTTPHeaderDict(typing.MutableMapping[str, str]):
+    """
+    :param headers:
+        An iterable of field-value pairs. Must not contain multiple field names
+        when compared case-insensitively.
+
+    :param kwargs:
+        Additional field-value pairs to pass in to ``dict.update``.
+
+    A ``dict`` like container for storing HTTP Headers.
+
+    Field names are stored and compared case-insensitively in compliance with
+    RFC 7230. Iteration provides the first case-sensitive key seen for each
+    case-insensitive pair.
+
+    Using ``__setitem__`` syntax overwrites fields that compare equal
+    case-insensitively in order to maintain ``dict``'s api. For fields that
+    compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
+    in a loop.
+
+    If multiple fields that are equal case-insensitively are passed to the
+    constructor or ``.update``, the behavior is undefined and some will be
+    lost.
+
+    >>> headers = HTTPHeaderDict()
+    >>> headers.add('Set-Cookie', 'foo=bar')
+    >>> headers.add('set-cookie', 'baz=quxx')
+    >>> headers['content-length'] = '7'
+    >>> headers['SET-cookie']
+    'foo=bar, baz=quxx'
+    >>> headers['Content-Length']
+    '7'
+    """
+
+    _container: typing.MutableMapping[str, list[str]]
+
+    def __init__(self, headers: ValidHTTPHeaderSource | None = None, **kwargs: str):
+        super().__init__()
+        self._container = {}  # 'dict' is insert-ordered
+        if headers is not None:
+            if isinstance(headers, HTTPHeaderDict):
+                self._copy_from(headers)
+            else:
+                self.extend(headers)
+        if kwargs:
+            self.extend(kwargs)
+
+    def __setitem__(self, key: str, val: str) -> None:
+        # avoid a bytes/str comparison by decoding before httplib
+        if isinstance(key, bytes):
+            key = key.decode("latin-1")
+        self._container[key.lower()] = [key, val]
+
+    def __getitem__(self, key: str) -> str:
+        if isinstance(key, bytes):
+            key = key.decode("latin-1")
+        val = self._container[key.lower()]
+        return ", ".join(val[1:])
+
+    def __delitem__(self, key: str) -> None:
+        if isinstance(key, bytes):
+            key = key.decode("latin-1")
+        del self._container[key.lower()]
+
+    def __contains__(self, key: object) -> bool:
+        if isinstance(key, bytes):
+            key = key.decode("latin-1")
+        if isinstance(key, str):
+            return key.lower() in self._container
+        return False
+
+    def setdefault(self, key: str, default: str = "") -> str:
+        return super().setdefault(key, default)
+
+    def __eq__(self, other: object) -> bool:
+        maybe_constructable = ensure_can_construct_http_header_dict(other)
+        if maybe_constructable is None:
+            return False
+        else:
+            other_as_http_header_dict = type(self)(maybe_constructable)
+
+        return {k.lower(): v for k, v in self.itermerged()} == {
+            k.lower(): v for k, v in other_as_http_header_dict.itermerged()
+        }
+
+    def __ne__(self, other: object) -> bool:
+        return not self.__eq__(other)
+
+    def __len__(self) -> int:
+        return len(self._container)
+
+    def __iter__(self) -> typing.Iterator[str]:
+        # Only provide the originally cased names
+        for vals in self._container.values():
+            yield vals[0]
+
+    def discard(self, key: str) -> None:
+        try:
+            del self[key]
+        except KeyError:
+            pass
+
+    def add(self, key: str, val: str, *, combine: bool = False) -> None:
+        """Adds a (name, value) pair, doesn't overwrite the value if it already
+        exists.
+
+        If this is called with combine=True, instead of adding a new header value
+        as a distinct item during iteration, this will instead append the value to
+        any existing header value with a comma. If no existing header value exists
+        for the key, then the value will simply be added, ignoring the combine parameter.
+
+        >>> headers = HTTPHeaderDict(foo='bar')
+        >>> headers.add('Foo', 'baz')
+        >>> headers['foo']
+        'bar, baz'
+        >>> list(headers.items())
+        [('foo', 'bar'), ('foo', 'baz')]
+        >>> headers.add('foo', 'quz', combine=True)
+        >>> list(headers.items())
+        [('foo', 'bar, baz, quz')]
+        """
+        # avoid a bytes/str comparison by decoding before httplib
+        if isinstance(key, bytes):
+            key = key.decode("latin-1")
+        key_lower = key.lower()
+        new_vals = [key, val]
+        # Keep the common case aka no item present as fast as possible
+        vals = self._container.setdefault(key_lower, new_vals)
+        if new_vals is not vals:
+            # if there are values here, then there is at least the initial
+            # key/value pair
+            assert len(vals) >= 2
+            if combine:
+                vals[-1] = vals[-1] + ", " + val
+            else:
+                vals.append(val)
+
+    def extend(self, *args: ValidHTTPHeaderSource, **kwargs: str) -> None:
+        """Generic import function for any type of header-like object.
+        Adapted version of MutableMapping.update in order to insert items
+        with self.add instead of self.__setitem__
+        """
+        if len(args) > 1:
+            raise TypeError(
+                f"extend() takes at most 1 positional arguments ({len(args)} given)"
+            )
+        other = args[0] if len(args) >= 1 else ()
+
+        if isinstance(other, HTTPHeaderDict):
+            for key, val in other.iteritems():
+                self.add(key, val)
+        elif isinstance(other, typing.Mapping):
+            for key, val in other.items():
+                self.add(key, val)
+        elif isinstance(other, typing.Iterable):
+            other = typing.cast(typing.Iterable[tuple[str, str]], other)
+            for key, value in other:
+                self.add(key, value)
+        elif hasattr(other, "keys") and hasattr(other, "__getitem__"):
+            # THIS IS NOT A TYPESAFE BRANCH
+            # In this branch, the object has a `keys` attr but is not a Mapping or any of
+            # the other types indicated in the method signature. We do some stuff with
+            # it as though it partially implements the Mapping interface, but we're not
+            # doing that stuff safely AT ALL.
+            for key in other.keys():
+                self.add(key, other[key])
+
+        for key, value in kwargs.items():
+            self.add(key, value)
+
+    @typing.overload
+    def getlist(self, key: str) -> list[str]: ...
+
+    @typing.overload
+    def getlist(self, key: str, default: _DT) -> list[str] | _DT: ...
+
+    def getlist(
+        self, key: str, default: _Sentinel | _DT = _Sentinel.not_passed
+    ) -> list[str] | _DT:
+        """Returns a list of all the values for the named field. Returns an
+        empty list if the key doesn't exist."""
+        if isinstance(key, bytes):
+            key = key.decode("latin-1")
+        try:
+            vals = self._container[key.lower()]
+        except KeyError:
+            if default is _Sentinel.not_passed:
+                # _DT is unbound; empty list is instance of List[str]
+                return []
+            # _DT is bound; default is instance of _DT
+            return default
+        else:
+            # _DT may or may not be bound; vals[1:] is instance of List[str], which
+            # meets our external interface requirement of `Union[List[str], _DT]`.
+            return vals[1:]
+
+    def _prepare_for_method_change(self) -> Self:
+        """
+        Remove content-specific header fields before changing the request
+        method to GET or HEAD according to RFC 9110, Section 15.4.
+        """
+        content_specific_headers = [
+            "Content-Encoding",
+            "Content-Language",
+            "Content-Location",
+            "Content-Type",
+            "Content-Length",
+            "Digest",
+            "Last-Modified",
+        ]
+        for header in content_specific_headers:
+            self.discard(header)
+        return self
+
+    # Backwards compatibility for httplib
+    getheaders = getlist
+    getallmatchingheaders = getlist
+    iget = getlist
+
+    # Backwards compatibility for http.cookiejar
+    get_all = getlist
+
+    def __repr__(self) -> str:
+        return f"{type(self).__name__}({dict(self.itermerged())})"
+
+    def _copy_from(self, other: HTTPHeaderDict) -> None:
+        for key in other:
+            val = other.getlist(key)
+            self._container[key.lower()] = [key, *val]
+
+    def copy(self) -> Self:
+        clone = type(self)()
+        clone._copy_from(self)
+        return clone
+
+    def iteritems(self) -> typing.Iterator[tuple[str, str]]:
+        """Iterate over all header lines, including duplicate ones."""
+        for key in self:
+            vals = self._container[key.lower()]
+            for val in vals[1:]:
+                yield vals[0], val
+
+    def itermerged(self) -> typing.Iterator[tuple[str, str]]:
+        """Iterate over all headers, merging duplicate ones together."""
+        for key in self:
+            val = self._container[key.lower()]
+            yield val[0], ", ".join(val[1:])
+
+    def items(self) -> HTTPHeaderDictItemView:  # type: ignore[override]
+        return HTTPHeaderDictItemView(self)
+
+    def _has_value_for_header(self, header_name: str, potential_value: str) -> bool:
+        if header_name in self:
+            return potential_value in self._container[header_name.lower()][1:]
+        return False
+
+    def __ior__(self, other: object) -> HTTPHeaderDict:
+        # Supports extending a header dict in-place using operator |=
+        # combining items with add instead of __setitem__
+        maybe_constructable = ensure_can_construct_http_header_dict(other)
+        if maybe_constructable is None:
+            return NotImplemented
+        self.extend(maybe_constructable)
+        return self
+
+    def __or__(self, other: object) -> Self:
+        # Supports merging header dicts using operator |
+        # combining items with add instead of __setitem__
+        maybe_constructable = ensure_can_construct_http_header_dict(other)
+        if maybe_constructable is None:
+            return NotImplemented
+        result = self.copy()
+        result.extend(maybe_constructable)
+        return result
+
+    def __ror__(self, other: object) -> Self:
+        # Supports merging header dicts using operator | when other is on left side
+        # combining items with add instead of __setitem__
+        maybe_constructable = ensure_can_construct_http_header_dict(other)
+        if maybe_constructable is None:
+            return NotImplemented
+        result = type(self)(maybe_constructable)
+        result.extend(self)
+        return result
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_request_methods.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_request_methods.py
new file mode 100644
index 000000000..297c271bf
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_request_methods.py
@@ -0,0 +1,278 @@
+from __future__ import annotations
+
+import json as _json
+import typing
+from urllib.parse import urlencode
+
+from ._base_connection import _TYPE_BODY
+from ._collections import HTTPHeaderDict
+from .filepost import _TYPE_FIELDS, encode_multipart_formdata
+from .response import BaseHTTPResponse
+
+__all__ = ["RequestMethods"]
+
+_TYPE_ENCODE_URL_FIELDS = typing.Union[
+    typing.Sequence[tuple[str, typing.Union[str, bytes]]],
+    typing.Mapping[str, typing.Union[str, bytes]],
+]
+
+
+class RequestMethods:
+    """
+    Convenience mixin for classes who implement a :meth:`urlopen` method, such
+    as :class:`urllib3.HTTPConnectionPool` and
+    :class:`urllib3.PoolManager`.
+
+    Provides behavior for making common types of HTTP request methods and
+    decides which type of request field encoding to use.
+
+    Specifically,
+
+    :meth:`.request_encode_url` is for sending requests whose fields are
+    encoded in the URL (such as GET, HEAD, DELETE).
+
+    :meth:`.request_encode_body` is for sending requests whose fields are
+    encoded in the *body* of the request using multipart or www-form-urlencoded
+    (such as for POST, PUT, PATCH).
+
+    :meth:`.request` is for making any kind of request, it will look up the
+    appropriate encoding format and use one of the above two methods to make
+    the request.
+
+    Initializer parameters:
+
+    :param headers:
+        Headers to include with all requests, unless other headers are given
+        explicitly.
+    """
+
+    _encode_url_methods = {"DELETE", "GET", "HEAD", "OPTIONS"}
+
+    def __init__(self, headers: typing.Mapping[str, str] | None = None) -> None:
+        self.headers = headers or {}
+
+    def urlopen(
+        self,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        encode_multipart: bool = True,
+        multipart_boundary: str | None = None,
+        **kw: typing.Any,
+    ) -> BaseHTTPResponse:  # Abstract
+        raise NotImplementedError(
+            "Classes extending RequestMethods must implement "
+            "their own ``urlopen`` method."
+        )
+
+    def request(
+        self,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        fields: _TYPE_FIELDS | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        json: typing.Any | None = None,
+        **urlopen_kw: typing.Any,
+    ) -> BaseHTTPResponse:
+        """
+        Make a request using :meth:`urlopen` with the appropriate encoding of
+        ``fields`` based on the ``method`` used.
+
+        This is a convenience method that requires the least amount of manual
+        effort. It can be used in most situations, while still having the
+        option to drop down to more specific methods when necessary, such as
+        :meth:`request_encode_url`, :meth:`request_encode_body`,
+        or even the lowest level :meth:`urlopen`.
+
+        :param method:
+            HTTP request method (such as GET, POST, PUT, etc.)
+
+        :param url:
+            The URL to perform the request on.
+
+        :param body:
+            Data to send in the request body, either :class:`str`, :class:`bytes`,
+            an iterable of :class:`str`/:class:`bytes`, or a file-like object.
+
+        :param fields:
+            Data to encode and send in the URL or request body, depending on ``method``.
+
+        :param headers:
+            Dictionary of custom headers to send, such as User-Agent,
+            If-None-Match, etc. If None, pool headers are used. If provided,
+            these headers completely replace any pool-specific headers.
+
+        :param json:
+            Data to encode and send as JSON with UTF-encoded in the request body.
+            The ``"Content-Type"`` header will be set to ``"application/json"``
+            unless specified otherwise.
+        """
+        method = method.upper()
+
+        if json is not None and body is not None:
+            raise TypeError(
+                "request got values for both 'body' and 'json' parameters which are mutually exclusive"
+            )
+
+        if json is not None:
+            if headers is None:
+                headers = self.headers
+
+            if not ("content-type" in map(str.lower, headers.keys())):
+                headers = HTTPHeaderDict(headers)
+                headers["Content-Type"] = "application/json"
+
+            body = _json.dumps(json, separators=(",", ":"), ensure_ascii=False).encode(
+                "utf-8"
+            )
+
+        if body is not None:
+            urlopen_kw["body"] = body
+
+        if method in self._encode_url_methods:
+            return self.request_encode_url(
+                method,
+                url,
+                fields=fields,  # type: ignore[arg-type]
+                headers=headers,
+                **urlopen_kw,
+            )
+        else:
+            return self.request_encode_body(
+                method, url, fields=fields, headers=headers, **urlopen_kw
+            )
+
+    def request_encode_url(
+        self,
+        method: str,
+        url: str,
+        fields: _TYPE_ENCODE_URL_FIELDS | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        **urlopen_kw: str,
+    ) -> BaseHTTPResponse:
+        """
+        Make a request using :meth:`urlopen` with the ``fields`` encoded in
+        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
+
+        :param method:
+            HTTP request method (such as GET, POST, PUT, etc.)
+
+        :param url:
+            The URL to perform the request on.
+
+        :param fields:
+            Data to encode and send in the URL.
+
+        :param headers:
+            Dictionary of custom headers to send, such as User-Agent,
+            If-None-Match, etc. If None, pool headers are used. If provided,
+            these headers completely replace any pool-specific headers.
+        """
+        if headers is None:
+            headers = self.headers
+
+        extra_kw: dict[str, typing.Any] = {"headers": headers}
+        extra_kw.update(urlopen_kw)
+
+        if fields:
+            url += "?" + urlencode(fields)
+
+        return self.urlopen(method, url, **extra_kw)
+
+    def request_encode_body(
+        self,
+        method: str,
+        url: str,
+        fields: _TYPE_FIELDS | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        encode_multipart: bool = True,
+        multipart_boundary: str | None = None,
+        **urlopen_kw: str,
+    ) -> BaseHTTPResponse:
+        """
+        Make a request using :meth:`urlopen` with the ``fields`` encoded in
+        the body. This is useful for request methods like POST, PUT, PATCH, etc.
+
+        When ``encode_multipart=True`` (default), then
+        :func:`urllib3.encode_multipart_formdata` is used to encode
+        the payload with the appropriate content type. Otherwise
+        :func:`urllib.parse.urlencode` is used with the
+        'application/x-www-form-urlencoded' content type.
+
+        Multipart encoding must be used when posting files, and it's reasonably
+        safe to use it in other times too. However, it may break request
+        signing, such as with OAuth.
+
+        Supports an optional ``fields`` parameter of key/value strings AND
+        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
+        the MIME type is optional. For example::
+
+            fields = {
+                'foo': 'bar',
+                'fakefile': ('foofile.txt', 'contents of foofile'),
+                'realfile': ('barfile.txt', open('realfile').read()),
+                'typedfile': ('bazfile.bin', open('bazfile').read(),
+                              'image/jpeg'),
+                'nonamefile': 'contents of nonamefile field',
+            }
+
+        When uploading a file, providing a filename (the first parameter of the
+        tuple) is optional but recommended to best mimic behavior of browsers.
+
+        Note that if ``headers`` are supplied, the 'Content-Type' header will
+        be overwritten because it depends on the dynamic random boundary string
+        which is used to compose the body of the request. The random boundary
+        string can be explicitly set with the ``multipart_boundary`` parameter.
+
+        :param method:
+            HTTP request method (such as GET, POST, PUT, etc.)
+
+        :param url:
+            The URL to perform the request on.
+
+        :param fields:
+            Data to encode and send in the request body.
+
+        :param headers:
+            Dictionary of custom headers to send, such as User-Agent,
+            If-None-Match, etc. If None, pool headers are used. If provided,
+            these headers completely replace any pool-specific headers.
+
+        :param encode_multipart:
+            If True, encode the ``fields`` using the multipart/form-data MIME
+            format.
+
+        :param multipart_boundary:
+            If not specified, then a random boundary will be generated using
+            :func:`urllib3.filepost.choose_boundary`.
+        """
+        if headers is None:
+            headers = self.headers
+
+        extra_kw: dict[str, typing.Any] = {"headers": HTTPHeaderDict(headers)}
+        body: bytes | str
+
+        if fields:
+            if "body" in urlopen_kw:
+                raise TypeError(
+                    "request got values for both 'fields' and 'body', can only specify one."
+                )
+
+            if encode_multipart:
+                body, content_type = encode_multipart_formdata(
+                    fields, boundary=multipart_boundary
+                )
+            else:
+                body, content_type = (
+                    urlencode(fields),  # type: ignore[arg-type]
+                    "application/x-www-form-urlencoded",
+                )
+
+            extra_kw["body"] = body
+            extra_kw["headers"].setdefault("Content-Type", content_type)
+
+        extra_kw.update(urlopen_kw)
+
+        return self.urlopen(method, url, **extra_kw)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_version.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_version.py
new file mode 100644
index 000000000..268d3b984
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/_version.py
@@ -0,0 +1,34 @@
+# file generated by setuptools-scm
+# don't change, don't track in version control
+
+__all__ = [
+    "__version__",
+    "__version_tuple__",
+    "version",
+    "version_tuple",
+    "__commit_id__",
+    "commit_id",
+]
+
+TYPE_CHECKING = False
+if TYPE_CHECKING:
+    from typing import Tuple
+    from typing import Union
+
+    VERSION_TUPLE = Tuple[Union[int, str], ...]
+    COMMIT_ID = Union[str, None]
+else:
+    VERSION_TUPLE = object
+    COMMIT_ID = object
+
+version: str
+__version__: str
+__version_tuple__: VERSION_TUPLE
+version_tuple: VERSION_TUPLE
+commit_id: COMMIT_ID
+__commit_id__: COMMIT_ID
+
+__version__ = version = '2.6.3'
+__version_tuple__ = version_tuple = (2, 6, 3)
+
+__commit_id__ = commit_id = None
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connection.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connection.py
new file mode 100644
index 000000000..2ceeb0a54
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connection.py
@@ -0,0 +1,1099 @@
+from __future__ import annotations
+
+import datetime
+import http.client
+import logging
+import os
+import re
+import socket
+import sys
+import threading
+import typing
+import warnings
+from http.client import HTTPConnection as _HTTPConnection
+from http.client import HTTPException as HTTPException  # noqa: F401
+from http.client import ResponseNotReady
+from socket import timeout as SocketTimeout
+
+if typing.TYPE_CHECKING:
+    from .response import HTTPResponse
+    from .util.ssl_ import _TYPE_PEER_CERT_RET_DICT
+    from .util.ssltransport import SSLTransport
+
+from ._collections import HTTPHeaderDict
+from .http2 import probe as http2_probe
+from .util.response import assert_header_parsing
+from .util.timeout import _DEFAULT_TIMEOUT, _TYPE_TIMEOUT, Timeout
+from .util.util import to_str
+from .util.wait import wait_for_read
+
+try:  # Compiled with SSL?
+    import ssl
+
+    BaseSSLError = ssl.SSLError
+except (ImportError, AttributeError):
+    ssl = None  # type: ignore[assignment]
+
+    class BaseSSLError(BaseException):  # type: ignore[no-redef]
+        pass
+
+
+from ._base_connection import _TYPE_BODY
+from ._base_connection import ProxyConfig as ProxyConfig
+from ._base_connection import _ResponseOptions as _ResponseOptions
+from ._version import __version__
+from .exceptions import (
+    ConnectTimeoutError,
+    HeaderParsingError,
+    NameResolutionError,
+    NewConnectionError,
+    ProxyError,
+    SystemTimeWarning,
+)
+from .util import SKIP_HEADER, SKIPPABLE_HEADERS, connection, ssl_
+from .util.request import body_to_chunks
+from .util.ssl_ import assert_fingerprint as _assert_fingerprint
+from .util.ssl_ import (
+    create_urllib3_context,
+    is_ipaddress,
+    resolve_cert_reqs,
+    resolve_ssl_version,
+    ssl_wrap_socket,
+)
+from .util.ssl_match_hostname import CertificateError, match_hostname
+from .util.url import Url
+
+# Not a no-op, we're adding this to the namespace so it can be imported.
+ConnectionError = ConnectionError
+BrokenPipeError = BrokenPipeError
+
+
+log = logging.getLogger(__name__)
+
+port_by_scheme = {"http": 80, "https": 443}
+
+# When it comes time to update this value as a part of regular maintenance
+# (ie test_recent_date is failing) update it to ~6 months before the current date.
+RECENT_DATE = datetime.date(2025, 1, 1)
+
+_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
+
+
+class HTTPConnection(_HTTPConnection):
+    """
+    Based on :class:`http.client.HTTPConnection` but provides an extra constructor
+    backwards-compatibility layer between older and newer Pythons.
+
+    Additional keyword parameters are used to configure attributes of the connection.
+    Accepted parameters include:
+
+    - ``source_address``: Set the source address for the current connection.
+    - ``socket_options``: Set specific options on the underlying socket. If not specified, then
+      defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling
+      Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy.
+
+      For example, if you wish to enable TCP Keep Alive in addition to the defaults,
+      you might pass:
+
+      .. code-block:: python
+
+         HTTPConnection.default_socket_options + [
+             (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
+         ]
+
+      Or you may want to disable the defaults by passing an empty list (e.g., ``[]``).
+    """
+
+    default_port: typing.ClassVar[int] = port_by_scheme["http"]  # type: ignore[misc]
+
+    #: Disable Nagle's algorithm by default.
+    #: ``[(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)]``
+    default_socket_options: typing.ClassVar[connection._TYPE_SOCKET_OPTIONS] = [
+        (socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
+    ]
+
+    #: Whether this connection verifies the host's certificate.
+    is_verified: bool = False
+
+    #: Whether this proxy connection verified the proxy host's certificate.
+    # If no proxy is currently connected to the value will be ``None``.
+    proxy_is_verified: bool | None = None
+
+    blocksize: int
+    source_address: tuple[str, int] | None
+    socket_options: connection._TYPE_SOCKET_OPTIONS | None
+
+    _has_connected_to_proxy: bool
+    _response_options: _ResponseOptions | None
+    _tunnel_host: str | None
+    _tunnel_port: int | None
+    _tunnel_scheme: str | None
+
+    def __init__(
+        self,
+        host: str,
+        port: int | None = None,
+        *,
+        timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+        source_address: tuple[str, int] | None = None,
+        blocksize: int = 16384,
+        socket_options: None | (
+            connection._TYPE_SOCKET_OPTIONS
+        ) = default_socket_options,
+        proxy: Url | None = None,
+        proxy_config: ProxyConfig | None = None,
+    ) -> None:
+        super().__init__(
+            host=host,
+            port=port,
+            timeout=Timeout.resolve_default_timeout(timeout),
+            source_address=source_address,
+            blocksize=blocksize,
+        )
+        self.socket_options = socket_options
+        self.proxy = proxy
+        self.proxy_config = proxy_config
+
+        self._has_connected_to_proxy = False
+        self._response_options = None
+        self._tunnel_host: str | None = None
+        self._tunnel_port: int | None = None
+        self._tunnel_scheme: str | None = None
+
+    def __str__(self) -> str:
+        return f"{type(self).__name__}(host={self.host!r}, port={self.port!r})"
+
+    def __repr__(self) -> str:
+        return f"<{self} at {id(self):#x}>"
+
+    @property
+    def host(self) -> str:
+        """
+        Getter method to remove any trailing dots that indicate the hostname is an FQDN.
+
+        In general, SSL certificates don't include the trailing dot indicating a
+        fully-qualified domain name, and thus, they don't validate properly when
+        checked against a domain name that includes the dot. In addition, some
+        servers may not expect to receive the trailing dot when provided.
+
+        However, the hostname with trailing dot is critical to DNS resolution; doing a
+        lookup with the trailing dot will properly only resolve the appropriate FQDN,
+        whereas a lookup without a trailing dot will search the system's search domain
+        list. Thus, it's important to keep the original host around for use only in
+        those cases where it's appropriate (i.e., when doing DNS lookup to establish the
+        actual TCP connection across which we're going to send HTTP requests).
+        """
+        return self._dns_host.rstrip(".")
+
+    @host.setter
+    def host(self, value: str) -> None:
+        """
+        Setter for the `host` property.
+
+        We assume that only urllib3 uses the _dns_host attribute; httplib itself
+        only uses `host`, and it seems reasonable that other libraries follow suit.
+        """
+        self._dns_host = value
+
+    def _new_conn(self) -> socket.socket:
+        """Establish a socket connection and set nodelay settings on it.
+
+        :return: New socket connection.
+        """
+        try:
+            sock = connection.create_connection(
+                (self._dns_host, self.port),
+                self.timeout,
+                source_address=self.source_address,
+                socket_options=self.socket_options,
+            )
+        except socket.gaierror as e:
+            raise NameResolutionError(self.host, self, e) from e
+        except SocketTimeout as e:
+            raise ConnectTimeoutError(
+                self,
+                f"Connection to {self.host} timed out. (connect timeout={self.timeout})",
+            ) from e
+
+        except OSError as e:
+            raise NewConnectionError(
+                self, f"Failed to establish a new connection: {e}"
+            ) from e
+
+        sys.audit("http.client.connect", self, self.host, self.port)
+
+        return sock
+
+    def set_tunnel(
+        self,
+        host: str,
+        port: int | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        scheme: str = "http",
+    ) -> None:
+        if scheme not in ("http", "https"):
+            raise ValueError(
+                f"Invalid proxy scheme for tunneling: {scheme!r}, must be either 'http' or 'https'"
+            )
+        super().set_tunnel(host, port=port, headers=headers)
+        self._tunnel_scheme = scheme
+
+    if sys.version_info < (3, 11, 9) or ((3, 12) <= sys.version_info < (3, 12, 3)):
+        # Taken from python/cpython#100986 which was backported in 3.11.9 and 3.12.3.
+        # When using connection_from_host, host will come without brackets.
+        def _wrap_ipv6(self, ip: bytes) -> bytes:
+            if b":" in ip and ip[0] != b"["[0]:
+                return b"[" + ip + b"]"
+            return ip
+
+        if sys.version_info < (3, 11, 9):
+            # `_tunnel` copied from 3.11.13 backporting
+            # https://github.com/python/cpython/commit/0d4026432591d43185568dd31cef6a034c4b9261
+            # and https://github.com/python/cpython/commit/6fbc61070fda2ffb8889e77e3b24bca4249ab4d1
+            def _tunnel(self) -> None:
+                _MAXLINE = http.client._MAXLINE  # type: ignore[attr-defined]
+                connect = b"CONNECT %s:%d HTTP/1.0\r\n" % (  # type: ignore[str-format]
+                    self._wrap_ipv6(self._tunnel_host.encode("ascii")),  # type: ignore[union-attr]
+                    self._tunnel_port,
+                )
+                headers = [connect]
+                for header, value in self._tunnel_headers.items():  # type: ignore[attr-defined]
+                    headers.append(f"{header}: {value}\r\n".encode("latin-1"))
+                headers.append(b"\r\n")
+                # Making a single send() call instead of one per line encourages
+                # the host OS to use a more optimal packet size instead of
+                # potentially emitting a series of small packets.
+                self.send(b"".join(headers))
+                del headers
+
+                response = self.response_class(self.sock, method=self._method)  # type: ignore[attr-defined]
+                try:
+                    (version, code, message) = response._read_status()  # type: ignore[attr-defined]
+
+                    if code != http.HTTPStatus.OK:
+                        self.close()
+                        raise OSError(
+                            f"Tunnel connection failed: {code} {message.strip()}"
+                        )
+                    while True:
+                        line = response.fp.readline(_MAXLINE + 1)
+                        if len(line) > _MAXLINE:
+                            raise http.client.LineTooLong("header line")
+                        if not line:
+                            # for sites which EOF without sending a trailer
+                            break
+                        if line in (b"\r\n", b"\n", b""):
+                            break
+
+                        if self.debuglevel > 0:
+                            print("header:", line.decode())
+                finally:
+                    response.close()
+
+        elif (3, 12) <= sys.version_info < (3, 12, 3):
+            # `_tunnel` copied from 3.12.11 backporting
+            # https://github.com/python/cpython/commit/23aef575c7629abcd4aaf028ebd226fb41a4b3c8
+            def _tunnel(self) -> None:  # noqa: F811
+                connect = b"CONNECT %s:%d HTTP/1.1\r\n" % (  # type: ignore[str-format]
+                    self._wrap_ipv6(self._tunnel_host.encode("idna")),  # type: ignore[union-attr]
+                    self._tunnel_port,
+                )
+                headers = [connect]
+                for header, value in self._tunnel_headers.items():  # type: ignore[attr-defined]
+                    headers.append(f"{header}: {value}\r\n".encode("latin-1"))
+                headers.append(b"\r\n")
+                # Making a single send() call instead of one per line encourages
+                # the host OS to use a more optimal packet size instead of
+                # potentially emitting a series of small packets.
+                self.send(b"".join(headers))
+                del headers
+
+                response = self.response_class(self.sock, method=self._method)  # type: ignore[attr-defined]
+                try:
+                    (version, code, message) = response._read_status()  # type: ignore[attr-defined]
+
+                    self._raw_proxy_headers = http.client._read_headers(response.fp)  # type: ignore[attr-defined]
+
+                    if self.debuglevel > 0:
+                        for header in self._raw_proxy_headers:
+                            print("header:", header.decode())
+
+                    if code != http.HTTPStatus.OK:
+                        self.close()
+                        raise OSError(
+                            f"Tunnel connection failed: {code} {message.strip()}"
+                        )
+
+                finally:
+                    response.close()
+
+    def connect(self) -> None:
+        self.sock = self._new_conn()
+        if self._tunnel_host:
+            # If we're tunneling it means we're connected to our proxy.
+            self._has_connected_to_proxy = True
+
+            # TODO: Fix tunnel so it doesn't depend on self.sock state.
+            self._tunnel()
+
+        # If there's a proxy to be connected to we are fully connected.
+        # This is set twice (once above and here) due to forwarding proxies
+        # not using tunnelling.
+        self._has_connected_to_proxy = bool(self.proxy)
+
+        if self._has_connected_to_proxy:
+            self.proxy_is_verified = False
+
+    @property
+    def is_closed(self) -> bool:
+        return self.sock is None
+
+    @property
+    def is_connected(self) -> bool:
+        if self.sock is None:
+            return False
+        return not wait_for_read(self.sock, timeout=0.0)
+
+    @property
+    def has_connected_to_proxy(self) -> bool:
+        return self._has_connected_to_proxy
+
+    @property
+    def proxy_is_forwarding(self) -> bool:
+        """
+        Return True if a forwarding proxy is configured, else return False
+        """
+        return bool(self.proxy) and self._tunnel_host is None
+
+    @property
+    def proxy_is_tunneling(self) -> bool:
+        """
+        Return True if a tunneling proxy is configured, else return False
+        """
+        return self._tunnel_host is not None
+
+    def close(self) -> None:
+        try:
+            super().close()
+        finally:
+            # Reset all stateful properties so connection
+            # can be re-used without leaking prior configs.
+            self.sock = None
+            self.is_verified = False
+            self.proxy_is_verified = None
+            self._has_connected_to_proxy = False
+            self._response_options = None
+            self._tunnel_host = None
+            self._tunnel_port = None
+            self._tunnel_scheme = None
+
+    def putrequest(
+        self,
+        method: str,
+        url: str,
+        skip_host: bool = False,
+        skip_accept_encoding: bool = False,
+    ) -> None:
+        """"""
+        # Empty docstring because the indentation of CPython's implementation
+        # is broken but we don't want this method in our documentation.
+        match = _CONTAINS_CONTROL_CHAR_RE.search(method)
+        if match:
+            raise ValueError(
+                f"Method cannot contain non-token characters {method!r} (found at least {match.group()!r})"
+            )
+
+        return super().putrequest(
+            method, url, skip_host=skip_host, skip_accept_encoding=skip_accept_encoding
+        )
+
+    def putheader(self, header: str, *values: str) -> None:  # type: ignore[override]
+        """"""
+        if not any(isinstance(v, str) and v == SKIP_HEADER for v in values):
+            super().putheader(header, *values)
+        elif to_str(header.lower()) not in SKIPPABLE_HEADERS:
+            skippable_headers = "', '".join(
+                [str.title(header) for header in sorted(SKIPPABLE_HEADERS)]
+            )
+            raise ValueError(
+                f"urllib3.util.SKIP_HEADER only supports '{skippable_headers}'"
+            )
+
+    # `request` method's signature intentionally violates LSP.
+    # urllib3's API is different from `http.client.HTTPConnection` and the subclassing is only incidental.
+    def request(  # type: ignore[override]
+        self,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        *,
+        chunked: bool = False,
+        preload_content: bool = True,
+        decode_content: bool = True,
+        enforce_content_length: bool = True,
+    ) -> None:
+        # Update the inner socket's timeout value to send the request.
+        # This only triggers if the connection is re-used.
+        if self.sock is not None:
+            self.sock.settimeout(self.timeout)
+
+        # Store these values to be fed into the HTTPResponse
+        # object later. TODO: Remove this in favor of a real
+        # HTTP lifecycle mechanism.
+
+        # We have to store these before we call .request()
+        # because sometimes we can still salvage a response
+        # off the wire even if we aren't able to completely
+        # send the request body.
+        self._response_options = _ResponseOptions(
+            request_method=method,
+            request_url=url,
+            preload_content=preload_content,
+            decode_content=decode_content,
+            enforce_content_length=enforce_content_length,
+        )
+
+        if headers is None:
+            headers = {}
+        header_keys = frozenset(to_str(k.lower()) for k in headers)
+        skip_accept_encoding = "accept-encoding" in header_keys
+        skip_host = "host" in header_keys
+        self.putrequest(
+            method, url, skip_accept_encoding=skip_accept_encoding, skip_host=skip_host
+        )
+
+        # Transform the body into an iterable of sendall()-able chunks
+        # and detect if an explicit Content-Length is doable.
+        chunks_and_cl = body_to_chunks(body, method=method, blocksize=self.blocksize)
+        chunks = chunks_and_cl.chunks
+        content_length = chunks_and_cl.content_length
+
+        # When chunked is explicit set to 'True' we respect that.
+        if chunked:
+            if "transfer-encoding" not in header_keys:
+                self.putheader("Transfer-Encoding", "chunked")
+        else:
+            # Detect whether a framing mechanism is already in use. If so
+            # we respect that value, otherwise we pick chunked vs content-length
+            # depending on the type of 'body'.
+            if "content-length" in header_keys:
+                chunked = False
+            elif "transfer-encoding" in header_keys:
+                chunked = True
+
+            # Otherwise we go off the recommendation of 'body_to_chunks()'.
+            else:
+                chunked = False
+                if content_length is None:
+                    if chunks is not None:
+                        chunked = True
+                        self.putheader("Transfer-Encoding", "chunked")
+                else:
+                    self.putheader("Content-Length", str(content_length))
+
+        # Now that framing headers are out of the way we send all the other headers.
+        if "user-agent" not in header_keys:
+            self.putheader("User-Agent", _get_default_user_agent())
+        for header, value in headers.items():
+            self.putheader(header, value)
+        self.endheaders()
+
+        # If we're given a body we start sending that in chunks.
+        if chunks is not None:
+            for chunk in chunks:
+                # Sending empty chunks isn't allowed for TE: chunked
+                # as it indicates the end of the body.
+                if not chunk:
+                    continue
+                if isinstance(chunk, str):
+                    chunk = chunk.encode("utf-8")
+                if chunked:
+                    self.send(b"%x\r\n%b\r\n" % (len(chunk), chunk))
+                else:
+                    self.send(chunk)
+
+        # Regardless of whether we have a body or not, if we're in
+        # chunked mode we want to send an explicit empty chunk.
+        if chunked:
+            self.send(b"0\r\n\r\n")
+
+    def request_chunked(
+        self,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+    ) -> None:
+        """
+        Alternative to the common request method, which sends the
+        body with chunked encoding and not as one block
+        """
+        warnings.warn(
+            "HTTPConnection.request_chunked() is deprecated and will be removed "
+            "in urllib3 v2.1.0. Instead use HTTPConnection.request(..., chunked=True).",
+            category=DeprecationWarning,
+            stacklevel=2,
+        )
+        self.request(method, url, body=body, headers=headers, chunked=True)
+
+    def getresponse(  # type: ignore[override]
+        self,
+    ) -> HTTPResponse:
+        """
+        Get the response from the server.
+
+        If the HTTPConnection is in the correct state, returns an instance of HTTPResponse or of whatever object is returned by the response_class variable.
+
+        If a request has not been sent or if a previous response has not be handled, ResponseNotReady is raised. If the HTTP response indicates that the connection should be closed, then it will be closed before the response is returned. When the connection is closed, the underlying socket is closed.
+        """
+        # Raise the same error as http.client.HTTPConnection
+        if self._response_options is None:
+            raise ResponseNotReady()
+
+        # Reset this attribute for being used again.
+        resp_options = self._response_options
+        self._response_options = None
+
+        # Since the connection's timeout value may have been updated
+        # we need to set the timeout on the socket.
+        self.sock.settimeout(self.timeout)
+
+        # This is needed here to avoid circular import errors
+        from .response import HTTPResponse
+
+        # Save a reference to the shutdown function before ownership is passed
+        # to httplib_response
+        # TODO should we implement it everywhere?
+        _shutdown = getattr(self.sock, "shutdown", None)
+
+        # Get the response from http.client.HTTPConnection
+        httplib_response = super().getresponse()
+
+        try:
+            assert_header_parsing(httplib_response.msg)
+        except (HeaderParsingError, TypeError) as hpe:
+            log.warning(
+                "Failed to parse headers (url=%s): %s",
+                _url_from_connection(self, resp_options.request_url),
+                hpe,
+                exc_info=True,
+            )
+
+        headers = HTTPHeaderDict(httplib_response.msg.items())
+
+        response = HTTPResponse(
+            body=httplib_response,
+            headers=headers,
+            status=httplib_response.status,
+            version=httplib_response.version,
+            version_string=getattr(self, "_http_vsn_str", "HTTP/?"),
+            reason=httplib_response.reason,
+            preload_content=resp_options.preload_content,
+            decode_content=resp_options.decode_content,
+            original_response=httplib_response,
+            enforce_content_length=resp_options.enforce_content_length,
+            request_method=resp_options.request_method,
+            request_url=resp_options.request_url,
+            sock_shutdown=_shutdown,
+        )
+        return response
+
+
+class HTTPSConnection(HTTPConnection):
+    """
+    Many of the parameters to this constructor are passed to the underlying SSL
+    socket by means of :py:func:`urllib3.util.ssl_wrap_socket`.
+    """
+
+    default_port = port_by_scheme["https"]  # type: ignore[misc]
+
+    cert_reqs: int | str | None = None
+    ca_certs: str | None = None
+    ca_cert_dir: str | None = None
+    ca_cert_data: None | str | bytes = None
+    ssl_version: int | str | None = None
+    ssl_minimum_version: int | None = None
+    ssl_maximum_version: int | None = None
+    assert_fingerprint: str | None = None
+    _connect_callback: typing.Callable[..., None] | None = None
+
+    def __init__(
+        self,
+        host: str,
+        port: int | None = None,
+        *,
+        timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+        source_address: tuple[str, int] | None = None,
+        blocksize: int = 16384,
+        socket_options: None | (
+            connection._TYPE_SOCKET_OPTIONS
+        ) = HTTPConnection.default_socket_options,
+        proxy: Url | None = None,
+        proxy_config: ProxyConfig | None = None,
+        cert_reqs: int | str | None = None,
+        assert_hostname: None | str | typing.Literal[False] = None,
+        assert_fingerprint: str | None = None,
+        server_hostname: str | None = None,
+        ssl_context: ssl.SSLContext | None = None,
+        ca_certs: str | None = None,
+        ca_cert_dir: str | None = None,
+        ca_cert_data: None | str | bytes = None,
+        ssl_minimum_version: int | None = None,
+        ssl_maximum_version: int | None = None,
+        ssl_version: int | str | None = None,  # Deprecated
+        cert_file: str | None = None,
+        key_file: str | None = None,
+        key_password: str | None = None,
+    ) -> None:
+        super().__init__(
+            host,
+            port=port,
+            timeout=timeout,
+            source_address=source_address,
+            blocksize=blocksize,
+            socket_options=socket_options,
+            proxy=proxy,
+            proxy_config=proxy_config,
+        )
+
+        self.key_file = key_file
+        self.cert_file = cert_file
+        self.key_password = key_password
+        self.ssl_context = ssl_context
+        self.server_hostname = server_hostname
+        self.assert_hostname = assert_hostname
+        self.assert_fingerprint = assert_fingerprint
+        self.ssl_version = ssl_version
+        self.ssl_minimum_version = ssl_minimum_version
+        self.ssl_maximum_version = ssl_maximum_version
+        self.ca_certs = ca_certs and os.path.expanduser(ca_certs)
+        self.ca_cert_dir = ca_cert_dir and os.path.expanduser(ca_cert_dir)
+        self.ca_cert_data = ca_cert_data
+
+        # cert_reqs depends on ssl_context so calculate last.
+        if cert_reqs is None:
+            if self.ssl_context is not None:
+                cert_reqs = self.ssl_context.verify_mode
+            else:
+                cert_reqs = resolve_cert_reqs(None)
+        self.cert_reqs = cert_reqs
+        self._connect_callback = None
+
+    def set_cert(
+        self,
+        key_file: str | None = None,
+        cert_file: str | None = None,
+        cert_reqs: int | str | None = None,
+        key_password: str | None = None,
+        ca_certs: str | None = None,
+        assert_hostname: None | str | typing.Literal[False] = None,
+        assert_fingerprint: str | None = None,
+        ca_cert_dir: str | None = None,
+        ca_cert_data: None | str | bytes = None,
+    ) -> None:
+        """
+        This method should only be called once, before the connection is used.
+        """
+        warnings.warn(
+            "HTTPSConnection.set_cert() is deprecated and will be removed "
+            "in urllib3 v2.1.0. Instead provide the parameters to the "
+            "HTTPSConnection constructor.",
+            category=DeprecationWarning,
+            stacklevel=2,
+        )
+
+        # If cert_reqs is not provided we'll assume CERT_REQUIRED unless we also
+        # have an SSLContext object in which case we'll use its verify_mode.
+        if cert_reqs is None:
+            if self.ssl_context is not None:
+                cert_reqs = self.ssl_context.verify_mode
+            else:
+                cert_reqs = resolve_cert_reqs(None)
+
+        self.key_file = key_file
+        self.cert_file = cert_file
+        self.cert_reqs = cert_reqs
+        self.key_password = key_password
+        self.assert_hostname = assert_hostname
+        self.assert_fingerprint = assert_fingerprint
+        self.ca_certs = ca_certs and os.path.expanduser(ca_certs)
+        self.ca_cert_dir = ca_cert_dir and os.path.expanduser(ca_cert_dir)
+        self.ca_cert_data = ca_cert_data
+
+    def connect(self) -> None:
+        # Today we don't need to be doing this step before the /actual/ socket
+        # connection, however in the future we'll need to decide whether to
+        # create a new socket or re-use an existing "shared" socket as a part
+        # of the HTTP/2 handshake dance.
+        if self._tunnel_host is not None and self._tunnel_port is not None:
+            probe_http2_host = self._tunnel_host
+            probe_http2_port = self._tunnel_port
+        else:
+            probe_http2_host = self.host
+            probe_http2_port = self.port
+
+        # Check if the target origin supports HTTP/2.
+        # If the value comes back as 'None' it means that the current thread
+        # is probing for HTTP/2 support. Otherwise, we're waiting for another
+        # probe to complete, or we get a value right away.
+        target_supports_http2: bool | None
+        if "h2" in ssl_.ALPN_PROTOCOLS:
+            target_supports_http2 = http2_probe.acquire_and_get(
+                host=probe_http2_host, port=probe_http2_port
+            )
+        else:
+            # If HTTP/2 isn't going to be offered it doesn't matter if
+            # the target supports HTTP/2. Don't want to make a probe.
+            target_supports_http2 = False
+
+        if self._connect_callback is not None:
+            self._connect_callback(
+                "before connect",
+                thread_id=threading.get_ident(),
+                target_supports_http2=target_supports_http2,
+            )
+
+        try:
+            sock: socket.socket | ssl.SSLSocket
+            self.sock = sock = self._new_conn()
+            server_hostname: str = self.host
+            tls_in_tls = False
+
+            # Do we need to establish a tunnel?
+            if self.proxy_is_tunneling:
+                # We're tunneling to an HTTPS origin so need to do TLS-in-TLS.
+                if self._tunnel_scheme == "https":
+                    # _connect_tls_proxy will verify and assign proxy_is_verified
+                    self.sock = sock = self._connect_tls_proxy(self.host, sock)
+                    tls_in_tls = True
+                elif self._tunnel_scheme == "http":
+                    self.proxy_is_verified = False
+
+                # If we're tunneling it means we're connected to our proxy.
+                self._has_connected_to_proxy = True
+
+                self._tunnel()
+                # Override the host with the one we're requesting data from.
+                server_hostname = typing.cast(str, self._tunnel_host)
+
+            if self.server_hostname is not None:
+                server_hostname = self.server_hostname
+
+            is_time_off = datetime.date.today() < RECENT_DATE
+            if is_time_off:
+                warnings.warn(
+                    (
+                        f"System time is way off (before {RECENT_DATE}). This will probably "
+                        "lead to SSL verification errors"
+                    ),
+                    SystemTimeWarning,
+                )
+
+            # Remove trailing '.' from fqdn hostnames to allow certificate validation
+            server_hostname_rm_dot = server_hostname.rstrip(".")
+
+            sock_and_verified = _ssl_wrap_socket_and_match_hostname(
+                sock=sock,
+                cert_reqs=self.cert_reqs,
+                ssl_version=self.ssl_version,
+                ssl_minimum_version=self.ssl_minimum_version,
+                ssl_maximum_version=self.ssl_maximum_version,
+                ca_certs=self.ca_certs,
+                ca_cert_dir=self.ca_cert_dir,
+                ca_cert_data=self.ca_cert_data,
+                cert_file=self.cert_file,
+                key_file=self.key_file,
+                key_password=self.key_password,
+                server_hostname=server_hostname_rm_dot,
+                ssl_context=self.ssl_context,
+                tls_in_tls=tls_in_tls,
+                assert_hostname=self.assert_hostname,
+                assert_fingerprint=self.assert_fingerprint,
+            )
+            self.sock = sock_and_verified.socket
+
+        # If an error occurs during connection/handshake we may need to release
+        # our lock so another connection can probe the origin.
+        except BaseException:
+            if self._connect_callback is not None:
+                self._connect_callback(
+                    "after connect failure",
+                    thread_id=threading.get_ident(),
+                    target_supports_http2=target_supports_http2,
+                )
+
+            if target_supports_http2 is None:
+                http2_probe.set_and_release(
+                    host=probe_http2_host, port=probe_http2_port, supports_http2=None
+                )
+            raise
+
+        # If this connection doesn't know if the origin supports HTTP/2
+        # we report back to the HTTP/2 probe our result.
+        if target_supports_http2 is None:
+            supports_http2 = sock_and_verified.socket.selected_alpn_protocol() == "h2"
+            http2_probe.set_and_release(
+                host=probe_http2_host,
+                port=probe_http2_port,
+                supports_http2=supports_http2,
+            )
+
+        # Forwarding proxies can never have a verified target since
+        # the proxy is the one doing the verification. Should instead
+        # use a CONNECT tunnel in order to verify the target.
+        # See: https://github.com/urllib3/urllib3/issues/3267.
+        if self.proxy_is_forwarding:
+            self.is_verified = False
+        else:
+            self.is_verified = sock_and_verified.is_verified
+
+        # If there's a proxy to be connected to we are fully connected.
+        # This is set twice (once above and here) due to forwarding proxies
+        # not using tunnelling.
+        self._has_connected_to_proxy = bool(self.proxy)
+
+        # Set `self.proxy_is_verified` unless it's already set while
+        # establishing a tunnel.
+        if self._has_connected_to_proxy and self.proxy_is_verified is None:
+            self.proxy_is_verified = sock_and_verified.is_verified
+
+    def _connect_tls_proxy(self, hostname: str, sock: socket.socket) -> ssl.SSLSocket:
+        """
+        Establish a TLS connection to the proxy using the provided SSL context.
+        """
+        # `_connect_tls_proxy` is called when self._tunnel_host is truthy.
+        proxy_config = typing.cast(ProxyConfig, self.proxy_config)
+        ssl_context = proxy_config.ssl_context
+        sock_and_verified = _ssl_wrap_socket_and_match_hostname(
+            sock,
+            cert_reqs=self.cert_reqs,
+            ssl_version=self.ssl_version,
+            ssl_minimum_version=self.ssl_minimum_version,
+            ssl_maximum_version=self.ssl_maximum_version,
+            ca_certs=self.ca_certs,
+            ca_cert_dir=self.ca_cert_dir,
+            ca_cert_data=self.ca_cert_data,
+            server_hostname=hostname,
+            ssl_context=ssl_context,
+            assert_hostname=proxy_config.assert_hostname,
+            assert_fingerprint=proxy_config.assert_fingerprint,
+            # Features that aren't implemented for proxies yet:
+            cert_file=None,
+            key_file=None,
+            key_password=None,
+            tls_in_tls=False,
+        )
+        self.proxy_is_verified = sock_and_verified.is_verified
+        return sock_and_verified.socket  # type: ignore[return-value]
+
+
+class _WrappedAndVerifiedSocket(typing.NamedTuple):
+    """
+    Wrapped socket and whether the connection is
+    verified after the TLS handshake
+    """
+
+    socket: ssl.SSLSocket | SSLTransport
+    is_verified: bool
+
+
+def _ssl_wrap_socket_and_match_hostname(
+    sock: socket.socket,
+    *,
+    cert_reqs: None | str | int,
+    ssl_version: None | str | int,
+    ssl_minimum_version: int | None,
+    ssl_maximum_version: int | None,
+    cert_file: str | None,
+    key_file: str | None,
+    key_password: str | None,
+    ca_certs: str | None,
+    ca_cert_dir: str | None,
+    ca_cert_data: None | str | bytes,
+    assert_hostname: None | str | typing.Literal[False],
+    assert_fingerprint: str | None,
+    server_hostname: str | None,
+    ssl_context: ssl.SSLContext | None,
+    tls_in_tls: bool = False,
+) -> _WrappedAndVerifiedSocket:
+    """Logic for constructing an SSLContext from all TLS parameters, passing
+    that down into ssl_wrap_socket, and then doing certificate verification
+    either via hostname or fingerprint. This function exists to guarantee
+    that both proxies and targets have the same behavior when connecting via TLS.
+    """
+    default_ssl_context = False
+    if ssl_context is None:
+        default_ssl_context = True
+        context = create_urllib3_context(
+            ssl_version=resolve_ssl_version(ssl_version),
+            ssl_minimum_version=ssl_minimum_version,
+            ssl_maximum_version=ssl_maximum_version,
+            cert_reqs=resolve_cert_reqs(cert_reqs),
+        )
+    else:
+        context = ssl_context
+
+    context.verify_mode = resolve_cert_reqs(cert_reqs)
+
+    # In some cases, we want to verify hostnames ourselves
+    if (
+        # `ssl` can't verify fingerprints or alternate hostnames
+        assert_fingerprint
+        or assert_hostname
+        # assert_hostname can be set to False to disable hostname checking
+        or assert_hostname is False
+        # We still support OpenSSL 1.0.2, which prevents us from verifying
+        # hostnames easily: https://github.com/pyca/pyopenssl/pull/933
+        or ssl_.IS_PYOPENSSL
+        or not ssl_.HAS_NEVER_CHECK_COMMON_NAME
+    ):
+        context.check_hostname = False
+
+    # Try to load OS default certs if none are given. We need to do the hasattr() check
+    # for custom pyOpenSSL SSLContext objects because they don't support
+    # load_default_certs().
+    if (
+        not ca_certs
+        and not ca_cert_dir
+        and not ca_cert_data
+        and default_ssl_context
+        and hasattr(context, "load_default_certs")
+    ):
+        context.load_default_certs()
+
+    # Ensure that IPv6 addresses are in the proper format and don't have a
+    # scope ID. Python's SSL module fails to recognize scoped IPv6 addresses
+    # and interprets them as DNS hostnames.
+    if server_hostname is not None:
+        normalized = server_hostname.strip("[]")
+        if "%" in normalized:
+            normalized = normalized[: normalized.rfind("%")]
+        if is_ipaddress(normalized):
+            server_hostname = normalized
+
+    ssl_sock = ssl_wrap_socket(
+        sock=sock,
+        keyfile=key_file,
+        certfile=cert_file,
+        key_password=key_password,
+        ca_certs=ca_certs,
+        ca_cert_dir=ca_cert_dir,
+        ca_cert_data=ca_cert_data,
+        server_hostname=server_hostname,
+        ssl_context=context,
+        tls_in_tls=tls_in_tls,
+    )
+
+    try:
+        if assert_fingerprint:
+            _assert_fingerprint(
+                ssl_sock.getpeercert(binary_form=True), assert_fingerprint
+            )
+        elif (
+            context.verify_mode != ssl.CERT_NONE
+            and not context.check_hostname
+            and assert_hostname is not False
+        ):
+            cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert()  # type: ignore[assignment]
+
+            # Need to signal to our match_hostname whether to use 'commonName' or not.
+            # If we're using our own constructed SSLContext we explicitly set 'False'
+            # because PyPy hard-codes 'True' from SSLContext.hostname_checks_common_name.
+            if default_ssl_context:
+                hostname_checks_common_name = False
+            else:
+                hostname_checks_common_name = (
+                    getattr(context, "hostname_checks_common_name", False) or False
+                )
+
+            _match_hostname(
+                cert,
+                assert_hostname or server_hostname,  # type: ignore[arg-type]
+                hostname_checks_common_name,
+            )
+
+        return _WrappedAndVerifiedSocket(
+            socket=ssl_sock,
+            is_verified=context.verify_mode == ssl.CERT_REQUIRED
+            or bool(assert_fingerprint),
+        )
+    except BaseException:
+        ssl_sock.close()
+        raise
+
+
+def _match_hostname(
+    cert: _TYPE_PEER_CERT_RET_DICT | None,
+    asserted_hostname: str,
+    hostname_checks_common_name: bool = False,
+) -> None:
+    # Our upstream implementation of ssl.match_hostname()
+    # only applies this normalization to IP addresses so it doesn't
+    # match DNS SANs so we do the same thing!
+    stripped_hostname = asserted_hostname.strip("[]")
+    if is_ipaddress(stripped_hostname):
+        asserted_hostname = stripped_hostname
+
+    try:
+        match_hostname(cert, asserted_hostname, hostname_checks_common_name)
+    except CertificateError as e:
+        log.warning(
+            "Certificate did not match expected hostname: %s. Certificate: %s",
+            asserted_hostname,
+            cert,
+        )
+        # Add cert to exception and reraise so client code can inspect
+        # the cert when catching the exception, if they want to
+        e._peer_cert = cert  # type: ignore[attr-defined]
+        raise
+
+
+def _wrap_proxy_error(err: Exception, proxy_scheme: str | None) -> ProxyError:
+    # Look for the phrase 'wrong version number', if found
+    # then we should warn the user that we're very sure that
+    # this proxy is HTTP-only and they have a configuration issue.
+    error_normalized = " ".join(re.split("[^a-z]", str(err).lower()))
+    is_likely_http_proxy = (
+        "wrong version number" in error_normalized
+        or "unknown protocol" in error_normalized
+        or "record layer failure" in error_normalized
+    )
+    http_proxy_warning = (
+        ". Your proxy appears to only use HTTP and not HTTPS, "
+        "try changing your proxy URL to be HTTP. See: "
+        "https://urllib3.readthedocs.io/en/latest/advanced-usage.html"
+        "#https-proxy-error-http-proxy"
+    )
+    new_err = ProxyError(
+        f"Unable to connect to proxy"
+        f"{http_proxy_warning if is_likely_http_proxy and proxy_scheme == 'https' else ''}",
+        err,
+    )
+    new_err.__cause__ = err
+    return new_err
+
+
+def _get_default_user_agent() -> str:
+    return f"python-urllib3/{__version__}"
+
+
+class DummyConnection:
+    """Used to detect a failed ConnectionCls import."""
+
+
+if not ssl:
+    HTTPSConnection = DummyConnection  # type: ignore[misc, assignment] # noqa: F811
+
+
+VerifiedHTTPSConnection = HTTPSConnection
+
+
+def _url_from_connection(
+    conn: HTTPConnection | HTTPSConnection, path: str | None = None
+) -> str:
+    """Returns the URL from a given connection. This is mainly used for testing and logging."""
+
+    scheme = "https" if isinstance(conn, HTTPSConnection) else "http"
+
+    return Url(scheme=scheme, host=conn.host, port=conn.port, path=path).url
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py
new file mode 100644
index 000000000..3a0685b4c
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py
@@ -0,0 +1,1178 @@
+from __future__ import annotations
+
+import errno
+import logging
+import queue
+import sys
+import typing
+import warnings
+import weakref
+from socket import timeout as SocketTimeout
+from types import TracebackType
+
+from ._base_connection import _TYPE_BODY
+from ._collections import HTTPHeaderDict
+from ._request_methods import RequestMethods
+from .connection import (
+    BaseSSLError,
+    BrokenPipeError,
+    DummyConnection,
+    HTTPConnection,
+    HTTPException,
+    HTTPSConnection,
+    ProxyConfig,
+    _wrap_proxy_error,
+)
+from .connection import port_by_scheme as port_by_scheme
+from .exceptions import (
+    ClosedPoolError,
+    EmptyPoolError,
+    FullPoolError,
+    HostChangedError,
+    InsecureRequestWarning,
+    LocationValueError,
+    MaxRetryError,
+    NewConnectionError,
+    ProtocolError,
+    ProxyError,
+    ReadTimeoutError,
+    SSLError,
+    TimeoutError,
+)
+from .response import BaseHTTPResponse
+from .util.connection import is_connection_dropped
+from .util.proxy import connection_requires_http_tunnel
+from .util.request import _TYPE_BODY_POSITION, set_file_position
+from .util.retry import Retry
+from .util.ssl_match_hostname import CertificateError
+from .util.timeout import _DEFAULT_TIMEOUT, _TYPE_DEFAULT, Timeout
+from .util.url import Url, _encode_target
+from .util.url import _normalize_host as normalize_host
+from .util.url import parse_url
+from .util.util import to_str
+
+if typing.TYPE_CHECKING:
+    import ssl
+
+    from typing_extensions import Self
+
+    from ._base_connection import BaseHTTPConnection, BaseHTTPSConnection
+
+log = logging.getLogger(__name__)
+
+_TYPE_TIMEOUT = typing.Union[Timeout, float, _TYPE_DEFAULT, None]
+
+
+# Pool objects
+class ConnectionPool:
+    """
+    Base class for all connection pools, such as
+    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.
+
+    .. note::
+       ConnectionPool.urlopen() does not normalize or percent-encode target URIs
+       which is useful if your target server doesn't support percent-encoded
+       target URIs.
+    """
+
+    scheme: str | None = None
+    QueueCls = queue.LifoQueue
+
+    def __init__(self, host: str, port: int | None = None) -> None:
+        if not host:
+            raise LocationValueError("No host specified.")
+
+        self.host = _normalize_host(host, scheme=self.scheme)
+        self.port = port
+
+        # This property uses 'normalize_host()' (not '_normalize_host()')
+        # to avoid removing square braces around IPv6 addresses.
+        # This value is sent to `HTTPConnection.set_tunnel()` if called
+        # because square braces are required for HTTP CONNECT tunneling.
+        self._tunnel_host = normalize_host(host, scheme=self.scheme).lower()
+
+    def __str__(self) -> str:
+        return f"{type(self).__name__}(host={self.host!r}, port={self.port!r})"
+
+    def __enter__(self) -> Self:
+        return self
+
+    def __exit__(
+        self,
+        exc_type: type[BaseException] | None,
+        exc_val: BaseException | None,
+        exc_tb: TracebackType | None,
+    ) -> typing.Literal[False]:
+        self.close()
+        # Return False to re-raise any potential exceptions
+        return False
+
+    def close(self) -> None:
+        """
+        Close all pooled connections and disable the pool.
+        """
+
+
+# This is taken from http://hg.python.org/cpython/file/7aaba721ebc0/Lib/socket.py#l252
+_blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}
+
+
+class HTTPConnectionPool(ConnectionPool, RequestMethods):
+    """
+    Thread-safe connection pool for one host.
+
+    :param host:
+        Host used for this HTTP Connection (e.g. "localhost"), passed into
+        :class:`http.client.HTTPConnection`.
+
+    :param port:
+        Port used for this HTTP Connection (None is equivalent to 80), passed
+        into :class:`http.client.HTTPConnection`.
+
+    :param timeout:
+        Socket timeout in seconds for each individual connection. This can
+        be a float or integer, which sets the timeout for the HTTP request,
+        or an instance of :class:`urllib3.util.Timeout` which gives you more
+        fine-grained control over request timeouts. After the constructor has
+        been parsed, this is always a `urllib3.util.Timeout` object.
+
+    :param maxsize:
+        Number of connections to save that can be reused. More than 1 is useful
+        in multithreaded situations. If ``block`` is set to False, more
+        connections will be created but they will not be saved once they've
+        been used.
+
+    :param block:
+        If set to True, no more than ``maxsize`` connections will be used at
+        a time. When no free connections are available, the call will block
+        until a connection has been released. This is a useful side effect for
+        particular multithreaded situations where one does not want to use more
+        than maxsize connections per host to prevent flooding.
+
+    :param headers:
+        Headers to include with all requests, unless other headers are given
+        explicitly.
+
+    :param retries:
+        Retry configuration to use by default with requests in this pool.
+
+    :param _proxy:
+        Parsed proxy URL, should not be used directly, instead, see
+        :class:`urllib3.ProxyManager`
+
+    :param _proxy_headers:
+        A dictionary with proxy headers, should not be used directly,
+        instead, see :class:`urllib3.ProxyManager`
+
+    :param \\**conn_kw:
+        Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
+        :class:`urllib3.connection.HTTPSConnection` instances.
+    """
+
+    scheme = "http"
+    ConnectionCls: type[BaseHTTPConnection] | type[BaseHTTPSConnection] = HTTPConnection
+
+    def __init__(
+        self,
+        host: str,
+        port: int | None = None,
+        timeout: _TYPE_TIMEOUT | None = _DEFAULT_TIMEOUT,
+        maxsize: int = 1,
+        block: bool = False,
+        headers: typing.Mapping[str, str] | None = None,
+        retries: Retry | bool | int | None = None,
+        _proxy: Url | None = None,
+        _proxy_headers: typing.Mapping[str, str] | None = None,
+        _proxy_config: ProxyConfig | None = None,
+        **conn_kw: typing.Any,
+    ):
+        ConnectionPool.__init__(self, host, port)
+        RequestMethods.__init__(self, headers)
+
+        if not isinstance(timeout, Timeout):
+            timeout = Timeout.from_float(timeout)
+
+        if retries is None:
+            retries = Retry.DEFAULT
+
+        self.timeout = timeout
+        self.retries = retries
+
+        self.pool: queue.LifoQueue[typing.Any] | None = self.QueueCls(maxsize)
+        self.block = block
+
+        self.proxy = _proxy
+        self.proxy_headers = _proxy_headers or {}
+        self.proxy_config = _proxy_config
+
+        # Fill the queue up so that doing get() on it will block properly
+        for _ in range(maxsize):
+            self.pool.put(None)
+
+        # These are mostly for testing and debugging purposes.
+        self.num_connections = 0
+        self.num_requests = 0
+        self.conn_kw = conn_kw
+
+        if self.proxy:
+            # Enable Nagle's algorithm for proxies, to avoid packet fragmentation.
+            # We cannot know if the user has added default socket options, so we cannot replace the
+            # list.
+            self.conn_kw.setdefault("socket_options", [])
+
+            self.conn_kw["proxy"] = self.proxy
+            self.conn_kw["proxy_config"] = self.proxy_config
+
+        # Do not pass 'self' as callback to 'finalize'.
+        # Then the 'finalize' would keep an endless living (leak) to self.
+        # By just passing a reference to the pool allows the garbage collector
+        # to free self if nobody else has a reference to it.
+        pool = self.pool
+
+        # Close all the HTTPConnections in the pool before the
+        # HTTPConnectionPool object is garbage collected.
+        weakref.finalize(self, _close_pool_connections, pool)
+
+    def _new_conn(self) -> BaseHTTPConnection:
+        """
+        Return a fresh :class:`HTTPConnection`.
+        """
+        self.num_connections += 1
+        log.debug(
+            "Starting new HTTP connection (%d): %s:%s",
+            self.num_connections,
+            self.host,
+            self.port or "80",
+        )
+
+        conn = self.ConnectionCls(
+            host=self.host,
+            port=self.port,
+            timeout=self.timeout.connect_timeout,
+            **self.conn_kw,
+        )
+        return conn
+
+    def _get_conn(self, timeout: float | None = None) -> BaseHTTPConnection:
+        """
+        Get a connection. Will return a pooled connection if one is available.
+
+        If no connections are available and :prop:`.block` is ``False``, then a
+        fresh connection is returned.
+
+        :param timeout:
+            Seconds to wait before giving up and raising
+            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
+            :prop:`.block` is ``True``.
+        """
+        conn = None
+
+        if self.pool is None:
+            raise ClosedPoolError(self, "Pool is closed.")
+
+        try:
+            conn = self.pool.get(block=self.block, timeout=timeout)
+
+        except AttributeError:  # self.pool is None
+            raise ClosedPoolError(self, "Pool is closed.") from None  # Defensive:
+
+        except queue.Empty:
+            if self.block:
+                raise EmptyPoolError(
+                    self,
+                    "Pool is empty and a new connection can't be opened due to blocking mode.",
+                ) from None
+            pass  # Oh well, we'll create a new connection then
+
+        # If this is a persistent connection, check if it got disconnected
+        if conn and is_connection_dropped(conn):
+            log.debug("Resetting dropped connection: %s", self.host)
+            conn.close()
+
+        return conn or self._new_conn()
+
+    def _put_conn(self, conn: BaseHTTPConnection | None) -> None:
+        """
+        Put a connection back into the pool.
+
+        :param conn:
+            Connection object for the current host and port as returned by
+            :meth:`._new_conn` or :meth:`._get_conn`.
+
+        If the pool is already full, the connection is closed and discarded
+        because we exceeded maxsize. If connections are discarded frequently,
+        then maxsize should be increased.
+
+        If the pool is closed, then the connection will be closed and discarded.
+        """
+        if self.pool is not None:
+            try:
+                self.pool.put(conn, block=False)
+                return  # Everything is dandy, done.
+            except AttributeError:
+                # self.pool is None.
+                pass
+            except queue.Full:
+                # Connection never got put back into the pool, close it.
+                if conn:
+                    conn.close()
+
+                if self.block:
+                    # This should never happen if you got the conn from self._get_conn
+                    raise FullPoolError(
+                        self,
+                        "Pool reached maximum size and no more connections are allowed.",
+                    ) from None
+
+                log.warning(
+                    "Connection pool is full, discarding connection: %s. Connection pool size: %s",
+                    self.host,
+                    self.pool.qsize(),
+                )
+
+        # Connection never got put back into the pool, close it.
+        if conn:
+            conn.close()
+
+    def _validate_conn(self, conn: BaseHTTPConnection) -> None:
+        """
+        Called right before a request is made, after the socket is created.
+        """
+
+    def _prepare_proxy(self, conn: BaseHTTPConnection) -> None:
+        # Nothing to do for HTTP connections.
+        pass
+
+    def _get_timeout(self, timeout: _TYPE_TIMEOUT) -> Timeout:
+        """Helper that always returns a :class:`urllib3.util.Timeout`"""
+        if timeout is _DEFAULT_TIMEOUT:
+            return self.timeout.clone()
+
+        if isinstance(timeout, Timeout):
+            return timeout.clone()
+        else:
+            # User passed us an int/float. This is for backwards compatibility,
+            # can be removed later
+            return Timeout.from_float(timeout)
+
+    def _raise_timeout(
+        self,
+        err: BaseSSLError | OSError | SocketTimeout,
+        url: str,
+        timeout_value: _TYPE_TIMEOUT | None,
+    ) -> None:
+        """Is the error actually a timeout? Will raise a ReadTimeout or pass"""
+
+        if isinstance(err, SocketTimeout):
+            raise ReadTimeoutError(
+                self, url, f"Read timed out. (read timeout={timeout_value})"
+            ) from err
+
+        # See the above comment about EAGAIN in Python 3.
+        if hasattr(err, "errno") and err.errno in _blocking_errnos:
+            raise ReadTimeoutError(
+                self, url, f"Read timed out. (read timeout={timeout_value})"
+            ) from err
+
+    def _make_request(
+        self,
+        conn: BaseHTTPConnection,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        retries: Retry | None = None,
+        timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+        chunked: bool = False,
+        response_conn: BaseHTTPConnection | None = None,
+        preload_content: bool = True,
+        decode_content: bool = True,
+        enforce_content_length: bool = True,
+    ) -> BaseHTTPResponse:
+        """
+        Perform a request on a given urllib connection object taken from our
+        pool.
+
+        :param conn:
+            a connection from one of our connection pools
+
+        :param method:
+            HTTP request method (such as GET, POST, PUT, etc.)
+
+        :param url:
+            The URL to perform the request on.
+
+        :param body:
+            Data to send in the request body, either :class:`str`, :class:`bytes`,
+            an iterable of :class:`str`/:class:`bytes`, or a file-like object.
+
+        :param headers:
+            Dictionary of custom headers to send, such as User-Agent,
+            If-None-Match, etc. If None, pool headers are used. If provided,
+            these headers completely replace any pool-specific headers.
+
+        :param retries:
+            Configure the number of retries to allow before raising a
+            :class:`~urllib3.exceptions.MaxRetryError` exception.
+
+            Pass ``None`` to retry until you receive a response. Pass a
+            :class:`~urllib3.util.retry.Retry` object for fine-grained control
+            over different types of retries.
+            Pass an integer number to retry connection errors that many times,
+            but no other types of errors. Pass zero to never retry.
+
+            If ``False``, then retries are disabled and any exception is raised
+            immediately. Also, instead of raising a MaxRetryError on redirects,
+            the redirect response will be returned.
+
+        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.
+
+        :param timeout:
+            If specified, overrides the default timeout for this one
+            request. It may be a float (in seconds) or an instance of
+            :class:`urllib3.util.Timeout`.
+
+        :param chunked:
+            If True, urllib3 will send the body using chunked transfer
+            encoding. Otherwise, urllib3 will send the body using the standard
+            content-length form. Defaults to False.
+
+        :param response_conn:
+            Set this to ``None`` if you will handle releasing the connection or
+            set the connection to have the response release it.
+
+        :param preload_content:
+          If True, the response's body will be preloaded during construction.
+
+        :param decode_content:
+            If True, will attempt to decode the body based on the
+            'content-encoding' header.
+
+        :param enforce_content_length:
+            Enforce content length checking. Body returned by server must match
+            value of Content-Length header, if present. Otherwise, raise error.
+        """
+        self.num_requests += 1
+
+        timeout_obj = self._get_timeout(timeout)
+        timeout_obj.start_connect()
+        conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout)
+
+        try:
+            # Trigger any extra validation we need to do.
+            try:
+                self._validate_conn(conn)
+            except (SocketTimeout, BaseSSLError) as e:
+                self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
+                raise
+
+        # _validate_conn() starts the connection to an HTTPS proxy
+        # so we need to wrap errors with 'ProxyError' here too.
+        except (
+            OSError,
+            NewConnectionError,
+            TimeoutError,
+            BaseSSLError,
+            CertificateError,
+            SSLError,
+        ) as e:
+            new_e: Exception = e
+            if isinstance(e, (BaseSSLError, CertificateError)):
+                new_e = SSLError(e)
+            # If the connection didn't successfully connect to it's proxy
+            # then there
+            if isinstance(
+                new_e, (OSError, NewConnectionError, TimeoutError, SSLError)
+            ) and (conn and conn.proxy and not conn.has_connected_to_proxy):
+                new_e = _wrap_proxy_error(new_e, conn.proxy.scheme)
+            raise new_e
+
+        # conn.request() calls http.client.*.request, not the method in
+        # urllib3.request. It also calls makefile (recv) on the socket.
+        try:
+            conn.request(
+                method,
+                url,
+                body=body,
+                headers=headers,
+                chunked=chunked,
+                preload_content=preload_content,
+                decode_content=decode_content,
+                enforce_content_length=enforce_content_length,
+            )
+
+        # We are swallowing BrokenPipeError (errno.EPIPE) since the server is
+        # legitimately able to close the connection after sending a valid response.
+        # With this behaviour, the received response is still readable.
+        except BrokenPipeError:
+            pass
+        except OSError as e:
+            # MacOS/Linux
+            # EPROTOTYPE and ECONNRESET are needed on macOS
+            # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
+            # Condition changed later to emit ECONNRESET instead of only EPROTOTYPE.
+            if e.errno != errno.EPROTOTYPE and e.errno != errno.ECONNRESET:
+                raise
+
+        # Reset the timeout for the recv() on the socket
+        read_timeout = timeout_obj.read_timeout
+
+        if not conn.is_closed:
+            # In Python 3 socket.py will catch EAGAIN and return None when you
+            # try and read into the file pointer created by http.client, which
+            # instead raises a BadStatusLine exception. Instead of catching
+            # the exception and assuming all BadStatusLine exceptions are read
+            # timeouts, check for a zero timeout before making the request.
+            if read_timeout == 0:
+                raise ReadTimeoutError(
+                    self, url, f"Read timed out. (read timeout={read_timeout})"
+                )
+            conn.timeout = read_timeout
+
+        # Receive the response from the server
+        try:
+            response = conn.getresponse()
+        except (BaseSSLError, OSError) as e:
+            self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
+            raise
+
+        # Set properties that are used by the pooling layer.
+        response.retries = retries
+        response._connection = response_conn  # type: ignore[attr-defined]
+        response._pool = self  # type: ignore[attr-defined]
+
+        log.debug(
+            '%s://%s:%s "%s %s %s" %s %s',
+            self.scheme,
+            self.host,
+            self.port,
+            method,
+            url,
+            response.version_string,
+            response.status,
+            response.length_remaining,
+        )
+
+        return response
+
+    def close(self) -> None:
+        """
+        Close all pooled connections and disable the pool.
+        """
+        if self.pool is None:
+            return
+        # Disable access to the pool
+        old_pool, self.pool = self.pool, None
+
+        # Close all the HTTPConnections in the pool.
+        _close_pool_connections(old_pool)
+
+    def is_same_host(self, url: str) -> bool:
+        """
+        Check if the given ``url`` is a member of the same host as this
+        connection pool.
+        """
+        if url.startswith("/"):
+            return True
+
+        # TODO: Add optional support for socket.gethostbyname checking.
+        scheme, _, host, port, *_ = parse_url(url)
+        scheme = scheme or "http"
+        if host is not None:
+            host = _normalize_host(host, scheme=scheme)
+
+        # Use explicit default port for comparison when none is given
+        if self.port and not port:
+            port = port_by_scheme.get(scheme)
+        elif not self.port and port == port_by_scheme.get(scheme):
+            port = None
+
+        return (scheme, host, port) == (self.scheme, self.host, self.port)
+
+    def urlopen(  # type: ignore[override]
+        self,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        retries: Retry | bool | int | None = None,
+        redirect: bool = True,
+        assert_same_host: bool = True,
+        timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+        pool_timeout: int | None = None,
+        release_conn: bool | None = None,
+        chunked: bool = False,
+        body_pos: _TYPE_BODY_POSITION | None = None,
+        preload_content: bool = True,
+        decode_content: bool = True,
+        **response_kw: typing.Any,
+    ) -> BaseHTTPResponse:
+        """
+        Get a connection from the pool and perform an HTTP request. This is the
+        lowest level call for making a request, so you'll need to specify all
+        the raw details.
+
+        .. note::
+
+           More commonly, it's appropriate to use a convenience method
+           such as :meth:`request`.
+
+        .. note::
+
+           `release_conn` will only behave as expected if
+           `preload_content=False` because we want to make
+           `preload_content=False` the default behaviour someday soon without
+           breaking backwards compatibility.
+
+        :param method:
+            HTTP request method (such as GET, POST, PUT, etc.)
+
+        :param url:
+            The URL to perform the request on.
+
+        :param body:
+            Data to send in the request body, either :class:`str`, :class:`bytes`,
+            an iterable of :class:`str`/:class:`bytes`, or a file-like object.
+
+        :param headers:
+            Dictionary of custom headers to send, such as User-Agent,
+            If-None-Match, etc. If None, pool headers are used. If provided,
+            these headers completely replace any pool-specific headers.
+
+        :param retries:
+            Configure the number of retries to allow before raising a
+            :class:`~urllib3.exceptions.MaxRetryError` exception.
+
+            If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a
+            :class:`~urllib3.util.retry.Retry` object for fine-grained control
+            over different types of retries.
+            Pass an integer number to retry connection errors that many times,
+            but no other types of errors. Pass zero to never retry.
+
+            If ``False``, then retries are disabled and any exception is raised
+            immediately. Also, instead of raising a MaxRetryError on redirects,
+            the redirect response will be returned.
+
+        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.
+
+        :param redirect:
+            If True, automatically handle redirects (status codes 301, 302,
+            303, 307, 308). Each redirect counts as a retry. Disabling retries
+            will disable redirect, too.
+
+        :param assert_same_host:
+            If ``True``, will make sure that the host of the pool requests is
+            consistent else will raise HostChangedError. When ``False``, you can
+            use the pool on an HTTP proxy and request foreign hosts.
+
+        :param timeout:
+            If specified, overrides the default timeout for this one
+            request. It may be a float (in seconds) or an instance of
+            :class:`urllib3.util.Timeout`.
+
+        :param pool_timeout:
+            If set and the pool is set to block=True, then this method will
+            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
+            connection is available within the time period.
+
+        :param bool preload_content:
+            If True, the response's body will be preloaded into memory.
+
+        :param bool decode_content:
+            If True, will attempt to decode the body based on the
+            'content-encoding' header.
+
+        :param release_conn:
+            If False, then the urlopen call will not release the connection
+            back into the pool once a response is received (but will release if
+            you read the entire contents of the response such as when
+            `preload_content=True`). This is useful if you're not preloading
+            the response's content immediately. You will need to call
+            ``r.release_conn()`` on the response ``r`` to return the connection
+            back into the pool. If None, it takes the value of ``preload_content``
+            which defaults to ``True``.
+
+        :param bool chunked:
+            If True, urllib3 will send the body using chunked transfer
+            encoding. Otherwise, urllib3 will send the body using the standard
+            content-length form. Defaults to False.
+
+        :param int body_pos:
+            Position to seek to in file-like body in the event of a retry or
+            redirect. Typically this won't need to be set because urllib3 will
+            auto-populate the value when needed.
+        """
+        parsed_url = parse_url(url)
+        destination_scheme = parsed_url.scheme
+
+        if headers is None:
+            headers = self.headers
+
+        if not isinstance(retries, Retry):
+            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)
+
+        if release_conn is None:
+            release_conn = preload_content
+
+        # Check host
+        if assert_same_host and not self.is_same_host(url):
+            raise HostChangedError(self, url, retries)
+
+        # Ensure that the URL we're connecting to is properly encoded
+        if url.startswith("/"):
+            url = to_str(_encode_target(url))
+        else:
+            url = to_str(parsed_url.url)
+
+        conn = None
+
+        # Track whether `conn` needs to be released before
+        # returning/raising/recursing. Update this variable if necessary, and
+        # leave `release_conn` constant throughout the function. That way, if
+        # the function recurses, the original value of `release_conn` will be
+        # passed down into the recursive call, and its value will be respected.
+        #
+        # See issue #651 [1] for details.
+        #
+        # [1] 
+        release_this_conn = release_conn
+
+        http_tunnel_required = connection_requires_http_tunnel(
+            self.proxy, self.proxy_config, destination_scheme
+        )
+
+        # Merge the proxy headers. Only done when not using HTTP CONNECT. We
+        # have to copy the headers dict so we can safely change it without those
+        # changes being reflected in anyone else's copy.
+        if not http_tunnel_required:
+            headers = headers.copy()  # type: ignore[attr-defined]
+            headers.update(self.proxy_headers)  # type: ignore[union-attr]
+
+        # Must keep the exception bound to a separate variable or else Python 3
+        # complains about UnboundLocalError.
+        err = None
+
+        # Keep track of whether we cleanly exited the except block. This
+        # ensures we do proper cleanup in finally.
+        clean_exit = False
+
+        # Rewind body position, if needed. Record current position
+        # for future rewinds in the event of a redirect/retry.
+        body_pos = set_file_position(body, body_pos)
+
+        try:
+            # Request a connection from the queue.
+            timeout_obj = self._get_timeout(timeout)
+            conn = self._get_conn(timeout=pool_timeout)
+
+            conn.timeout = timeout_obj.connect_timeout  # type: ignore[assignment]
+
+            # Is this a closed/new connection that requires CONNECT tunnelling?
+            if self.proxy is not None and http_tunnel_required and conn.is_closed:
+                try:
+                    self._prepare_proxy(conn)
+                except (BaseSSLError, OSError, SocketTimeout) as e:
+                    self._raise_timeout(
+                        err=e, url=self.proxy.url, timeout_value=conn.timeout
+                    )
+                    raise
+
+            # If we're going to release the connection in ``finally:``, then
+            # the response doesn't need to know about the connection. Otherwise
+            # it will also try to release it and we'll have a double-release
+            # mess.
+            response_conn = conn if not release_conn else None
+
+            # Make the request on the HTTPConnection object
+            response = self._make_request(
+                conn,
+                method,
+                url,
+                timeout=timeout_obj,
+                body=body,
+                headers=headers,
+                chunked=chunked,
+                retries=retries,
+                response_conn=response_conn,
+                preload_content=preload_content,
+                decode_content=decode_content,
+                **response_kw,
+            )
+
+            # Everything went great!
+            clean_exit = True
+
+        except EmptyPoolError:
+            # Didn't get a connection from the pool, no need to clean up
+            clean_exit = True
+            release_this_conn = False
+            raise
+
+        except (
+            TimeoutError,
+            HTTPException,
+            OSError,
+            ProtocolError,
+            BaseSSLError,
+            SSLError,
+            CertificateError,
+            ProxyError,
+        ) as e:
+            # Discard the connection for these exceptions. It will be
+            # replaced during the next _get_conn() call.
+            clean_exit = False
+            new_e: Exception = e
+            if isinstance(e, (BaseSSLError, CertificateError)):
+                new_e = SSLError(e)
+            if isinstance(
+                new_e,
+                (
+                    OSError,
+                    NewConnectionError,
+                    TimeoutError,
+                    SSLError,
+                    HTTPException,
+                ),
+            ) and (conn and conn.proxy and not conn.has_connected_to_proxy):
+                new_e = _wrap_proxy_error(new_e, conn.proxy.scheme)
+            elif isinstance(new_e, (OSError, HTTPException)):
+                new_e = ProtocolError("Connection aborted.", new_e)
+
+            retries = retries.increment(
+                method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
+            )
+            retries.sleep()
+
+            # Keep track of the error for the retry warning.
+            err = e
+
+        finally:
+            if not clean_exit:
+                # We hit some kind of exception, handled or otherwise. We need
+                # to throw the connection away unless explicitly told not to.
+                # Close the connection, set the variable to None, and make sure
+                # we put the None back in the pool to avoid leaking it.
+                if conn:
+                    conn.close()
+                    conn = None
+                release_this_conn = True
+
+            if release_this_conn:
+                # Put the connection back to be reused. If the connection is
+                # expired then it will be None, which will get replaced with a
+                # fresh connection during _get_conn.
+                self._put_conn(conn)
+
+        if not conn:
+            # Try again
+            log.warning(
+                "Retrying (%r) after connection broken by '%r': %s", retries, err, url
+            )
+            return self.urlopen(
+                method,
+                url,
+                body,
+                headers,
+                retries,
+                redirect,
+                assert_same_host,
+                timeout=timeout,
+                pool_timeout=pool_timeout,
+                release_conn=release_conn,
+                chunked=chunked,
+                body_pos=body_pos,
+                preload_content=preload_content,
+                decode_content=decode_content,
+                **response_kw,
+            )
+
+        # Handle redirect?
+        redirect_location = redirect and response.get_redirect_location()
+        if redirect_location:
+            if response.status == 303:
+                # Change the method according to RFC 9110, Section 15.4.4.
+                method = "GET"
+                # And lose the body not to transfer anything sensitive.
+                body = None
+                headers = HTTPHeaderDict(headers)._prepare_for_method_change()
+
+            try:
+                retries = retries.increment(method, url, response=response, _pool=self)
+            except MaxRetryError:
+                if retries.raise_on_redirect:
+                    response.drain_conn()
+                    raise
+                return response
+
+            response.drain_conn()
+            retries.sleep_for_retry(response)
+            log.debug("Redirecting %s -> %s", url, redirect_location)
+            return self.urlopen(
+                method,
+                redirect_location,
+                body,
+                headers,
+                retries=retries,
+                redirect=redirect,
+                assert_same_host=assert_same_host,
+                timeout=timeout,
+                pool_timeout=pool_timeout,
+                release_conn=release_conn,
+                chunked=chunked,
+                body_pos=body_pos,
+                preload_content=preload_content,
+                decode_content=decode_content,
+                **response_kw,
+            )
+
+        # Check if we should retry the HTTP response.
+        has_retry_after = bool(response.headers.get("Retry-After"))
+        if retries.is_retry(method, response.status, has_retry_after):
+            try:
+                retries = retries.increment(method, url, response=response, _pool=self)
+            except MaxRetryError:
+                if retries.raise_on_status:
+                    response.drain_conn()
+                    raise
+                return response
+
+            response.drain_conn()
+            retries.sleep(response)
+            log.debug("Retry: %s", url)
+            return self.urlopen(
+                method,
+                url,
+                body,
+                headers,
+                retries=retries,
+                redirect=redirect,
+                assert_same_host=assert_same_host,
+                timeout=timeout,
+                pool_timeout=pool_timeout,
+                release_conn=release_conn,
+                chunked=chunked,
+                body_pos=body_pos,
+                preload_content=preload_content,
+                decode_content=decode_content,
+                **response_kw,
+            )
+
+        return response
+
+
+class HTTPSConnectionPool(HTTPConnectionPool):
+    """
+    Same as :class:`.HTTPConnectionPool`, but HTTPS.
+
+    :class:`.HTTPSConnection` uses one of ``assert_fingerprint``,
+    ``assert_hostname`` and ``host`` in this order to verify connections.
+    If ``assert_hostname`` is False, no verification is done.
+
+    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``,
+    ``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl`
+    is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
+    the connection socket into an SSL socket.
+    """
+
+    scheme = "https"
+    ConnectionCls: type[BaseHTTPSConnection] = HTTPSConnection
+
+    def __init__(
+        self,
+        host: str,
+        port: int | None = None,
+        timeout: _TYPE_TIMEOUT | None = _DEFAULT_TIMEOUT,
+        maxsize: int = 1,
+        block: bool = False,
+        headers: typing.Mapping[str, str] | None = None,
+        retries: Retry | bool | int | None = None,
+        _proxy: Url | None = None,
+        _proxy_headers: typing.Mapping[str, str] | None = None,
+        key_file: str | None = None,
+        cert_file: str | None = None,
+        cert_reqs: int | str | None = None,
+        key_password: str | None = None,
+        ca_certs: str | None = None,
+        ssl_version: int | str | None = None,
+        ssl_minimum_version: ssl.TLSVersion | None = None,
+        ssl_maximum_version: ssl.TLSVersion | None = None,
+        assert_hostname: str | typing.Literal[False] | None = None,
+        assert_fingerprint: str | None = None,
+        ca_cert_dir: str | None = None,
+        **conn_kw: typing.Any,
+    ) -> None:
+        super().__init__(
+            host,
+            port,
+            timeout,
+            maxsize,
+            block,
+            headers,
+            retries,
+            _proxy,
+            _proxy_headers,
+            **conn_kw,
+        )
+
+        self.key_file = key_file
+        self.cert_file = cert_file
+        self.cert_reqs = cert_reqs
+        self.key_password = key_password
+        self.ca_certs = ca_certs
+        self.ca_cert_dir = ca_cert_dir
+        self.ssl_version = ssl_version
+        self.ssl_minimum_version = ssl_minimum_version
+        self.ssl_maximum_version = ssl_maximum_version
+        self.assert_hostname = assert_hostname
+        self.assert_fingerprint = assert_fingerprint
+
+    def _prepare_proxy(self, conn: HTTPSConnection) -> None:  # type: ignore[override]
+        """Establishes a tunnel connection through HTTP CONNECT."""
+        if self.proxy and self.proxy.scheme == "https":
+            tunnel_scheme = "https"
+        else:
+            tunnel_scheme = "http"
+
+        conn.set_tunnel(
+            scheme=tunnel_scheme,
+            host=self._tunnel_host,
+            port=self.port,
+            headers=self.proxy_headers,
+        )
+        conn.connect()
+
+    def _new_conn(self) -> BaseHTTPSConnection:
+        """
+        Return a fresh :class:`urllib3.connection.HTTPConnection`.
+        """
+        self.num_connections += 1
+        log.debug(
+            "Starting new HTTPS connection (%d): %s:%s",
+            self.num_connections,
+            self.host,
+            self.port or "443",
+        )
+
+        if not self.ConnectionCls or self.ConnectionCls is DummyConnection:  # type: ignore[comparison-overlap]
+            raise ImportError(
+                "Can't connect to HTTPS URL because the SSL module is not available."
+            )
+
+        actual_host: str = self.host
+        actual_port = self.port
+        if self.proxy is not None and self.proxy.host is not None:
+            actual_host = self.proxy.host
+            actual_port = self.proxy.port
+
+        return self.ConnectionCls(
+            host=actual_host,
+            port=actual_port,
+            timeout=self.timeout.connect_timeout,
+            cert_file=self.cert_file,
+            key_file=self.key_file,
+            key_password=self.key_password,
+            cert_reqs=self.cert_reqs,
+            ca_certs=self.ca_certs,
+            ca_cert_dir=self.ca_cert_dir,
+            assert_hostname=self.assert_hostname,
+            assert_fingerprint=self.assert_fingerprint,
+            ssl_version=self.ssl_version,
+            ssl_minimum_version=self.ssl_minimum_version,
+            ssl_maximum_version=self.ssl_maximum_version,
+            **self.conn_kw,
+        )
+
+    def _validate_conn(self, conn: BaseHTTPConnection) -> None:
+        """
+        Called right before a request is made, after the socket is created.
+        """
+        super()._validate_conn(conn)
+
+        # Force connect early to allow us to validate the connection.
+        if conn.is_closed:
+            conn.connect()
+
+        # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791
+        if not conn.is_verified and not conn.proxy_is_verified:
+            warnings.warn(
+                (
+                    f"Unverified HTTPS request is being made to host '{conn.host}'. "
+                    "Adding certificate verification is strongly advised. See: "
+                    "https://urllib3.readthedocs.io/en/latest/advanced-usage.html"
+                    "#tls-warnings"
+                ),
+                InsecureRequestWarning,
+            )
+
+
+def connection_from_url(url: str, **kw: typing.Any) -> HTTPConnectionPool:
+    """
+    Given a url, return an :class:`.ConnectionPool` instance of its host.
+
+    This is a shortcut for not having to parse out the scheme, host, and port
+    of the url before creating an :class:`.ConnectionPool` instance.
+
+    :param url:
+        Absolute URL string that must include the scheme. Port is optional.
+
+    :param \\**kw:
+        Passes additional parameters to the constructor of the appropriate
+        :class:`.ConnectionPool`. Useful for specifying things like
+        timeout, maxsize, headers, etc.
+
+    Example::
+
+        >>> conn = connection_from_url('http://google.com/')
+        >>> r = conn.request('GET', '/')
+    """
+    scheme, _, host, port, *_ = parse_url(url)
+    scheme = scheme or "http"
+    port = port or port_by_scheme.get(scheme, 80)
+    if scheme == "https":
+        return HTTPSConnectionPool(host, port=port, **kw)  # type: ignore[arg-type]
+    else:
+        return HTTPConnectionPool(host, port=port, **kw)  # type: ignore[arg-type]
+
+
+@typing.overload
+def _normalize_host(host: None, scheme: str | None) -> None: ...
+
+
+@typing.overload
+def _normalize_host(host: str, scheme: str | None) -> str: ...
+
+
+def _normalize_host(host: str | None, scheme: str | None) -> str | None:
+    """
+    Normalize hosts for comparisons and use with sockets.
+    """
+
+    host = normalize_host(host, scheme)
+
+    # httplib doesn't like it when we include brackets in IPv6 addresses
+    # Specifically, if we include brackets but also pass the port then
+    # httplib crazily doubles up the square brackets on the Host header.
+    # Instead, we need to make sure we never pass ``None`` as the port.
+    # However, for backward compatibility reasons we can't actually
+    # *assert* that.  See http://bugs.python.org/issue28539
+    if host and host.startswith("[") and host.endswith("]"):
+        host = host[1:-1]
+    return host
+
+
+def _url_from_pool(
+    pool: HTTPConnectionPool | HTTPSConnectionPool, path: str | None = None
+) -> str:
+    """Returns the URL from a given connection pool. This is mainly used for testing and logging."""
+    return Url(scheme=pool.scheme, host=pool.host, port=pool.port, path=path).url
+
+
+def _close_pool_connections(pool: queue.LifoQueue[typing.Any]) -> None:
+    """Drains a queue of connections and closes each one."""
+    try:
+        while True:
+            conn = pool.get(block=False)
+            if conn:
+                conn.close()
+    except queue.Empty:
+        pass  # Done.
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..d228197b6
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-314.pyc
new file mode 100644
index 000000000..77f31c9cd
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-314.pyc
new file mode 100644
index 000000000..f8652d0cd
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__init__.py
new file mode 100644
index 000000000..c0538059e
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__init__.py
@@ -0,0 +1,17 @@
+from __future__ import annotations
+
+import pip._vendor.urllib3.connection as urllib3_connection
+
+from ...connectionpool import HTTPConnectionPool, HTTPSConnectionPool
+from .connection import EmscriptenHTTPConnection, EmscriptenHTTPSConnection
+
+
+def inject_into_urllib3() -> None:
+    # override connection classes to use emscripten specific classes
+    # n.b. mypy complains about the overriding of classes below
+    # if it isn't ignored
+    HTTPConnectionPool.ConnectionCls = EmscriptenHTTPConnection
+    HTTPSConnectionPool.ConnectionCls = EmscriptenHTTPSConnection
+    urllib3_connection.HTTPConnection = EmscriptenHTTPConnection  # type: ignore[misc,assignment]
+    urllib3_connection.HTTPSConnection = EmscriptenHTTPSConnection  # type: ignore[misc,assignment]
+    urllib3_connection.VerifiedHTTPSConnection = EmscriptenHTTPSConnection  # type: ignore[assignment]
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..6aa2d8059
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/connection.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/connection.cpython-314.pyc
new file mode 100644
index 000000000..1df837cd9
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/connection.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/fetch.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/fetch.cpython-314.pyc
new file mode 100644
index 000000000..20109c5c4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/fetch.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/request.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/request.cpython-314.pyc
new file mode 100644
index 000000000..5efdf074a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/request.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/response.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/response.cpython-314.pyc
new file mode 100644
index 000000000..3c9923000
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/__pycache__/response.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/connection.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/connection.py
new file mode 100644
index 000000000..63f79dd3b
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/connection.py
@@ -0,0 +1,260 @@
+from __future__ import annotations
+
+import os
+import typing
+
+# use http.client.HTTPException for consistency with non-emscripten
+from http.client import HTTPException as HTTPException  # noqa: F401
+from http.client import ResponseNotReady
+
+from ..._base_connection import _TYPE_BODY
+from ...connection import HTTPConnection, ProxyConfig, port_by_scheme
+from ...exceptions import TimeoutError
+from ...response import BaseHTTPResponse
+from ...util.connection import _TYPE_SOCKET_OPTIONS
+from ...util.timeout import _DEFAULT_TIMEOUT, _TYPE_TIMEOUT
+from ...util.url import Url
+from .fetch import _RequestError, _TimeoutError, send_request, send_streaming_request
+from .request import EmscriptenRequest
+from .response import EmscriptenHttpResponseWrapper, EmscriptenResponse
+
+if typing.TYPE_CHECKING:
+    from ..._base_connection import BaseHTTPConnection, BaseHTTPSConnection
+
+
+class EmscriptenHTTPConnection:
+    default_port: typing.ClassVar[int] = port_by_scheme["http"]
+    default_socket_options: typing.ClassVar[_TYPE_SOCKET_OPTIONS]
+
+    timeout: None | (float)
+
+    host: str
+    port: int
+    blocksize: int
+    source_address: tuple[str, int] | None
+    socket_options: _TYPE_SOCKET_OPTIONS | None
+
+    proxy: Url | None
+    proxy_config: ProxyConfig | None
+
+    is_verified: bool = False
+    proxy_is_verified: bool | None = None
+
+    response_class: type[BaseHTTPResponse] = EmscriptenHttpResponseWrapper
+    _response: EmscriptenResponse | None
+
+    def __init__(
+        self,
+        host: str,
+        port: int = 0,
+        *,
+        timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+        source_address: tuple[str, int] | None = None,
+        blocksize: int = 8192,
+        socket_options: _TYPE_SOCKET_OPTIONS | None = None,
+        proxy: Url | None = None,
+        proxy_config: ProxyConfig | None = None,
+    ) -> None:
+        self.host = host
+        self.port = port
+        self.timeout = timeout if isinstance(timeout, float) else 0.0
+        self.scheme = "http"
+        self._closed = True
+        self._response = None
+        # ignore these things because we don't
+        # have control over that stuff
+        self.proxy = None
+        self.proxy_config = None
+        self.blocksize = blocksize
+        self.source_address = None
+        self.socket_options = None
+        self.is_verified = False
+
+    def set_tunnel(
+        self,
+        host: str,
+        port: int | None = 0,
+        headers: typing.Mapping[str, str] | None = None,
+        scheme: str = "http",
+    ) -> None:
+        pass
+
+    def connect(self) -> None:
+        pass
+
+    def request(
+        self,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        # We know *at least* botocore is depending on the order of the
+        # first 3 parameters so to be safe we only mark the later ones
+        # as keyword-only to ensure we have space to extend.
+        *,
+        chunked: bool = False,
+        preload_content: bool = True,
+        decode_content: bool = True,
+        enforce_content_length: bool = True,
+    ) -> None:
+        self._closed = False
+        if url.startswith("/"):
+            if self.port is not None:
+                port = f":{self.port}"
+            else:
+                port = ""
+            # no scheme / host / port included, make a full url
+            url = f"{self.scheme}://{self.host}{port}{url}"
+        request = EmscriptenRequest(
+            url=url,
+            method=method,
+            timeout=self.timeout if self.timeout else 0,
+            decode_content=decode_content,
+        )
+        request.set_body(body)
+        if headers:
+            for k, v in headers.items():
+                request.set_header(k, v)
+        self._response = None
+        try:
+            if not preload_content:
+                self._response = send_streaming_request(request)
+            if self._response is None:
+                self._response = send_request(request)
+        except _TimeoutError as e:
+            raise TimeoutError(e.message) from e
+        except _RequestError as e:
+            raise HTTPException(e.message) from e
+
+    def getresponse(self) -> BaseHTTPResponse:
+        if self._response is not None:
+            return EmscriptenHttpResponseWrapper(
+                internal_response=self._response,
+                url=self._response.request.url,
+                connection=self,
+            )
+        else:
+            raise ResponseNotReady()
+
+    def close(self) -> None:
+        self._closed = True
+        self._response = None
+
+    @property
+    def is_closed(self) -> bool:
+        """Whether the connection either is brand new or has been previously closed.
+        If this property is True then both ``is_connected`` and ``has_connected_to_proxy``
+        properties must be False.
+        """
+        return self._closed
+
+    @property
+    def is_connected(self) -> bool:
+        """Whether the connection is actively connected to any origin (proxy or target)"""
+        return True
+
+    @property
+    def has_connected_to_proxy(self) -> bool:
+        """Whether the connection has successfully connected to its proxy.
+        This returns False if no proxy is in use. Used to determine whether
+        errors are coming from the proxy layer or from tunnelling to the target origin.
+        """
+        return False
+
+
+class EmscriptenHTTPSConnection(EmscriptenHTTPConnection):
+    default_port = port_by_scheme["https"]
+    # all this is basically ignored, as browser handles https
+    cert_reqs: int | str | None = None
+    ca_certs: str | None = None
+    ca_cert_dir: str | None = None
+    ca_cert_data: None | str | bytes = None
+    cert_file: str | None
+    key_file: str | None
+    key_password: str | None
+    ssl_context: typing.Any | None
+    ssl_version: int | str | None = None
+    ssl_minimum_version: int | None = None
+    ssl_maximum_version: int | None = None
+    assert_hostname: None | str | typing.Literal[False]
+    assert_fingerprint: str | None = None
+
+    def __init__(
+        self,
+        host: str,
+        port: int = 0,
+        *,
+        timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+        source_address: tuple[str, int] | None = None,
+        blocksize: int = 16384,
+        socket_options: (
+            None | _TYPE_SOCKET_OPTIONS
+        ) = HTTPConnection.default_socket_options,
+        proxy: Url | None = None,
+        proxy_config: ProxyConfig | None = None,
+        cert_reqs: int | str | None = None,
+        assert_hostname: None | str | typing.Literal[False] = None,
+        assert_fingerprint: str | None = None,
+        server_hostname: str | None = None,
+        ssl_context: typing.Any | None = None,
+        ca_certs: str | None = None,
+        ca_cert_dir: str | None = None,
+        ca_cert_data: None | str | bytes = None,
+        ssl_minimum_version: int | None = None,
+        ssl_maximum_version: int | None = None,
+        ssl_version: int | str | None = None,  # Deprecated
+        cert_file: str | None = None,
+        key_file: str | None = None,
+        key_password: str | None = None,
+    ) -> None:
+        super().__init__(
+            host,
+            port=port,
+            timeout=timeout,
+            source_address=source_address,
+            blocksize=blocksize,
+            socket_options=socket_options,
+            proxy=proxy,
+            proxy_config=proxy_config,
+        )
+        self.scheme = "https"
+
+        self.key_file = key_file
+        self.cert_file = cert_file
+        self.key_password = key_password
+        self.ssl_context = ssl_context
+        self.server_hostname = server_hostname
+        self.assert_hostname = assert_hostname
+        self.assert_fingerprint = assert_fingerprint
+        self.ssl_version = ssl_version
+        self.ssl_minimum_version = ssl_minimum_version
+        self.ssl_maximum_version = ssl_maximum_version
+        self.ca_certs = ca_certs and os.path.expanduser(ca_certs)
+        self.ca_cert_dir = ca_cert_dir and os.path.expanduser(ca_cert_dir)
+        self.ca_cert_data = ca_cert_data
+
+        self.cert_reqs = None
+
+        # The browser will automatically verify all requests.
+        # We have no control over that setting.
+        self.is_verified = True
+
+    def set_cert(
+        self,
+        key_file: str | None = None,
+        cert_file: str | None = None,
+        cert_reqs: int | str | None = None,
+        key_password: str | None = None,
+        ca_certs: str | None = None,
+        assert_hostname: None | str | typing.Literal[False] = None,
+        assert_fingerprint: str | None = None,
+        ca_cert_dir: str | None = None,
+        ca_cert_data: None | str | bytes = None,
+    ) -> None:
+        pass
+
+
+# verify that this class implements BaseHTTP(s) connection correctly
+if typing.TYPE_CHECKING:
+    _supports_http_protocol: BaseHTTPConnection = EmscriptenHTTPConnection("", 0)
+    _supports_https_protocol: BaseHTTPSConnection = EmscriptenHTTPSConnection("", 0)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/emscripten_fetch_worker.js b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/emscripten_fetch_worker.js
new file mode 100644
index 000000000..faf141e1f
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/emscripten_fetch_worker.js
@@ -0,0 +1,110 @@
+let Status = {
+  SUCCESS_HEADER: -1,
+  SUCCESS_EOF: -2,
+  ERROR_TIMEOUT: -3,
+  ERROR_EXCEPTION: -4,
+};
+
+let connections = new Map();
+let nextConnectionID = 1;
+const encoder = new TextEncoder();
+
+self.addEventListener("message", async function (event) {
+  if (event.data.close) {
+    let connectionID = event.data.close;
+    connections.delete(connectionID);
+    return;
+  } else if (event.data.getMore) {
+    let connectionID = event.data.getMore;
+    let { curOffset, value, reader, intBuffer, byteBuffer } =
+      connections.get(connectionID);
+    // if we still have some in buffer, then just send it back straight away
+    if (!value || curOffset >= value.length) {
+      // read another buffer if required
+      try {
+        let readResponse = await reader.read();
+
+        if (readResponse.done) {
+          // read everything - clear connection and return
+          connections.delete(connectionID);
+          Atomics.store(intBuffer, 0, Status.SUCCESS_EOF);
+          Atomics.notify(intBuffer, 0);
+          // finished reading successfully
+          // return from event handler
+          return;
+        }
+        curOffset = 0;
+        connections.get(connectionID).value = readResponse.value;
+        value = readResponse.value;
+      } catch (error) {
+        console.log("Request exception:", error);
+        let errorBytes = encoder.encode(error.message);
+        let written = errorBytes.length;
+        byteBuffer.set(errorBytes);
+        intBuffer[1] = written;
+        Atomics.store(intBuffer, 0, Status.ERROR_EXCEPTION);
+        Atomics.notify(intBuffer, 0);
+      }
+    }
+
+    // send as much buffer as we can
+    let curLen = value.length - curOffset;
+    if (curLen > byteBuffer.length) {
+      curLen = byteBuffer.length;
+    }
+    byteBuffer.set(value.subarray(curOffset, curOffset + curLen), 0);
+
+    Atomics.store(intBuffer, 0, curLen); // store current length in bytes
+    Atomics.notify(intBuffer, 0);
+    curOffset += curLen;
+    connections.get(connectionID).curOffset = curOffset;
+
+    return;
+  } else {
+    // start fetch
+    let connectionID = nextConnectionID;
+    nextConnectionID += 1;
+    const intBuffer = new Int32Array(event.data.buffer);
+    const byteBuffer = new Uint8Array(event.data.buffer, 8);
+    try {
+      const response = await fetch(event.data.url, event.data.fetchParams);
+      // return the headers first via textencoder
+      var headers = [];
+      for (const pair of response.headers.entries()) {
+        headers.push([pair[0], pair[1]]);
+      }
+      let headerObj = {
+        headers: headers,
+        status: response.status,
+        connectionID,
+      };
+      const headerText = JSON.stringify(headerObj);
+      let headerBytes = encoder.encode(headerText);
+      let written = headerBytes.length;
+      byteBuffer.set(headerBytes);
+      intBuffer[1] = written;
+      // make a connection
+      connections.set(connectionID, {
+        reader: response.body.getReader(),
+        intBuffer: intBuffer,
+        byteBuffer: byteBuffer,
+        value: undefined,
+        curOffset: 0,
+      });
+      // set header ready
+      Atomics.store(intBuffer, 0, Status.SUCCESS_HEADER);
+      Atomics.notify(intBuffer, 0);
+      // all fetching after this goes through a new postmessage call with getMore
+      // this allows for parallel requests
+    } catch (error) {
+      console.log("Request exception:", error);
+      let errorBytes = encoder.encode(error.message);
+      let written = errorBytes.length;
+      byteBuffer.set(errorBytes);
+      intBuffer[1] = written;
+      Atomics.store(intBuffer, 0, Status.ERROR_EXCEPTION);
+      Atomics.notify(intBuffer, 0);
+    }
+  }
+});
+self.postMessage({ inited: true });
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/fetch.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/fetch.py
new file mode 100644
index 000000000..612cfddc4
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/fetch.py
@@ -0,0 +1,726 @@
+"""
+Support for streaming http requests in emscripten.
+
+A few caveats -
+
+If your browser (or Node.js) has WebAssembly JavaScript Promise Integration enabled
+https://github.com/WebAssembly/js-promise-integration/blob/main/proposals/js-promise-integration/Overview.md
+*and* you launch pyodide using `pyodide.runPythonAsync`, this will fetch data using the
+JavaScript asynchronous fetch api (wrapped via `pyodide.ffi.call_sync`). In this case
+timeouts and streaming should just work.
+
+Otherwise, it uses a combination of XMLHttpRequest and a web-worker for streaming.
+
+This approach has several caveats:
+
+Firstly, you can't do streaming http in the main UI thread, because atomics.wait isn't allowed.
+Streaming only works if you're running pyodide in a web worker.
+
+Secondly, this uses an extra web worker and SharedArrayBuffer to do the asynchronous fetch
+operation, so it requires that you have crossOriginIsolation enabled, by serving over https
+(or from localhost) with the two headers below set:
+
+    Cross-Origin-Opener-Policy: same-origin
+    Cross-Origin-Embedder-Policy: require-corp
+
+You can tell if cross origin isolation is successfully enabled by looking at the global crossOriginIsolated variable in
+JavaScript console. If it isn't, streaming requests will fallback to XMLHttpRequest, i.e. getting the whole
+request into a buffer and then returning it. it shows a warning in the JavaScript console in this case.
+
+Finally, the webworker which does the streaming fetch is created on initial import, but will only be started once
+control is returned to javascript. Call `await wait_for_streaming_ready()` to wait for streaming fetch.
+
+NB: in this code, there are a lot of JavaScript objects. They are named js_*
+to make it clear what type of object they are.
+"""
+
+from __future__ import annotations
+
+import io
+import json
+from email.parser import Parser
+from importlib.resources import files
+from typing import TYPE_CHECKING, Any
+
+import js  # type: ignore[import-not-found]
+from pyodide.ffi import (  # type: ignore[import-not-found]
+    JsArray,
+    JsException,
+    JsProxy,
+    to_js,
+)
+
+if TYPE_CHECKING:
+    from typing_extensions import Buffer
+
+from .request import EmscriptenRequest
+from .response import EmscriptenResponse
+
+"""
+There are some headers that trigger unintended CORS preflight requests.
+See also https://github.com/koenvo/pyodide-http/issues/22
+"""
+HEADERS_TO_IGNORE = ("user-agent",)
+
+SUCCESS_HEADER = -1
+SUCCESS_EOF = -2
+ERROR_TIMEOUT = -3
+ERROR_EXCEPTION = -4
+
+
+class _RequestError(Exception):
+    def __init__(
+        self,
+        message: str | None = None,
+        *,
+        request: EmscriptenRequest | None = None,
+        response: EmscriptenResponse | None = None,
+    ):
+        self.request = request
+        self.response = response
+        self.message = message
+        super().__init__(self.message)
+
+
+class _StreamingError(_RequestError):
+    pass
+
+
+class _TimeoutError(_RequestError):
+    pass
+
+
+def _obj_from_dict(dict_val: dict[str, Any]) -> JsProxy:
+    return to_js(dict_val, dict_converter=js.Object.fromEntries)
+
+
+class _ReadStream(io.RawIOBase):
+    def __init__(
+        self,
+        int_buffer: JsArray,
+        byte_buffer: JsArray,
+        timeout: float,
+        worker: JsProxy,
+        connection_id: int,
+        request: EmscriptenRequest,
+    ):
+        self.int_buffer = int_buffer
+        self.byte_buffer = byte_buffer
+        self.read_pos = 0
+        self.read_len = 0
+        self.connection_id = connection_id
+        self.worker = worker
+        self.timeout = int(1000 * timeout) if timeout > 0 else None
+        self.is_live = True
+        self._is_closed = False
+        self.request: EmscriptenRequest | None = request
+
+    def __del__(self) -> None:
+        self.close()
+
+    # this is compatible with _base_connection
+    def is_closed(self) -> bool:
+        return self._is_closed
+
+    # for compatibility with RawIOBase
+    @property
+    def closed(self) -> bool:
+        return self.is_closed()
+
+    def close(self) -> None:
+        if self.is_closed():
+            return
+        self.read_len = 0
+        self.read_pos = 0
+        self.int_buffer = None
+        self.byte_buffer = None
+        self._is_closed = True
+        self.request = None
+        if self.is_live:
+            self.worker.postMessage(_obj_from_dict({"close": self.connection_id}))
+            self.is_live = False
+        super().close()
+
+    def readable(self) -> bool:
+        return True
+
+    def writable(self) -> bool:
+        return False
+
+    def seekable(self) -> bool:
+        return False
+
+    def readinto(self, byte_obj: Buffer) -> int:
+        if not self.int_buffer:
+            raise _StreamingError(
+                "No buffer for stream in _ReadStream.readinto",
+                request=self.request,
+                response=None,
+            )
+        if self.read_len == 0:
+            # wait for the worker to send something
+            js.Atomics.store(self.int_buffer, 0, ERROR_TIMEOUT)
+            self.worker.postMessage(_obj_from_dict({"getMore": self.connection_id}))
+            if (
+                js.Atomics.wait(self.int_buffer, 0, ERROR_TIMEOUT, self.timeout)
+                == "timed-out"
+            ):
+                raise _TimeoutError
+            data_len = self.int_buffer[0]
+            if data_len > 0:
+                self.read_len = data_len
+                self.read_pos = 0
+            elif data_len == ERROR_EXCEPTION:
+                string_len = self.int_buffer[1]
+                # decode the error string
+                js_decoder = js.TextDecoder.new()
+                json_str = js_decoder.decode(self.byte_buffer.slice(0, string_len))
+                raise _StreamingError(
+                    f"Exception thrown in fetch: {json_str}",
+                    request=self.request,
+                    response=None,
+                )
+            else:
+                # EOF, free the buffers and return zero
+                # and free the request
+                self.is_live = False
+                self.close()
+                return 0
+        # copy from int32array to python bytes
+        ret_length = min(self.read_len, len(memoryview(byte_obj)))
+        subarray = self.byte_buffer.subarray(
+            self.read_pos, self.read_pos + ret_length
+        ).to_py()
+        memoryview(byte_obj)[0:ret_length] = subarray
+        self.read_len -= ret_length
+        self.read_pos += ret_length
+        return ret_length
+
+
+class _StreamingFetcher:
+    def __init__(self) -> None:
+        # make web-worker and data buffer on startup
+        self.streaming_ready = False
+        streaming_worker_code = (
+            files(__package__)
+            .joinpath("emscripten_fetch_worker.js")
+            .read_text(encoding="utf-8")
+        )
+        js_data_blob = js.Blob.new(
+            to_js([streaming_worker_code], create_pyproxies=False),
+            _obj_from_dict({"type": "application/javascript"}),
+        )
+
+        def promise_resolver(js_resolve_fn: JsProxy, js_reject_fn: JsProxy) -> None:
+            def onMsg(e: JsProxy) -> None:
+                self.streaming_ready = True
+                js_resolve_fn(e)
+
+            def onErr(e: JsProxy) -> None:
+                js_reject_fn(e)  # Defensive: never happens in ci
+
+            self.js_worker.onmessage = onMsg
+            self.js_worker.onerror = onErr
+
+        js_data_url = js.URL.createObjectURL(js_data_blob)
+        self.js_worker = js.globalThis.Worker.new(js_data_url)
+        self.js_worker_ready_promise = js.globalThis.Promise.new(promise_resolver)
+
+    def send(self, request: EmscriptenRequest) -> EmscriptenResponse:
+        headers = {
+            k: v for k, v in request.headers.items() if k not in HEADERS_TO_IGNORE
+        }
+
+        body = request.body
+        fetch_data = {"headers": headers, "body": to_js(body), "method": request.method}
+        # start the request off in the worker
+        timeout = int(1000 * request.timeout) if request.timeout > 0 else None
+        js_shared_buffer = js.SharedArrayBuffer.new(1048576)
+        js_int_buffer = js.Int32Array.new(js_shared_buffer)
+        js_byte_buffer = js.Uint8Array.new(js_shared_buffer, 8)
+
+        js.Atomics.store(js_int_buffer, 0, ERROR_TIMEOUT)
+        js.Atomics.notify(js_int_buffer, 0)
+        js_absolute_url = js.URL.new(request.url, js.location).href
+        self.js_worker.postMessage(
+            _obj_from_dict(
+                {
+                    "buffer": js_shared_buffer,
+                    "url": js_absolute_url,
+                    "fetchParams": fetch_data,
+                }
+            )
+        )
+        # wait for the worker to send something
+        js.Atomics.wait(js_int_buffer, 0, ERROR_TIMEOUT, timeout)
+        if js_int_buffer[0] == ERROR_TIMEOUT:
+            raise _TimeoutError(
+                "Timeout connecting to streaming request",
+                request=request,
+                response=None,
+            )
+        elif js_int_buffer[0] == SUCCESS_HEADER:
+            # got response
+            # header length is in second int of intBuffer
+            string_len = js_int_buffer[1]
+            # decode the rest to a JSON string
+            js_decoder = js.TextDecoder.new()
+            # this does a copy (the slice) because decode can't work on shared array
+            # for some silly reason
+            json_str = js_decoder.decode(js_byte_buffer.slice(0, string_len))
+            # get it as an object
+            response_obj = json.loads(json_str)
+            return EmscriptenResponse(
+                request=request,
+                status_code=response_obj["status"],
+                headers=response_obj["headers"],
+                body=_ReadStream(
+                    js_int_buffer,
+                    js_byte_buffer,
+                    request.timeout,
+                    self.js_worker,
+                    response_obj["connectionID"],
+                    request,
+                ),
+            )
+        elif js_int_buffer[0] == ERROR_EXCEPTION:
+            string_len = js_int_buffer[1]
+            # decode the error string
+            js_decoder = js.TextDecoder.new()
+            json_str = js_decoder.decode(js_byte_buffer.slice(0, string_len))
+            raise _StreamingError(
+                f"Exception thrown in fetch: {json_str}", request=request, response=None
+            )
+        else:
+            raise _StreamingError(
+                f"Unknown status from worker in fetch: {js_int_buffer[0]}",
+                request=request,
+                response=None,
+            )
+
+
+class _JSPIReadStream(io.RawIOBase):
+    """
+    A read stream that uses pyodide.ffi.run_sync to read from a JavaScript fetch
+    response. This requires support for WebAssembly JavaScript Promise Integration
+    in the containing browser, and for pyodide to be launched via runPythonAsync.
+
+    :param js_read_stream:
+        The JavaScript stream reader
+
+    :param timeout:
+        Timeout in seconds
+
+    :param request:
+        The request we're handling
+
+    :param response:
+        The response this stream relates to
+
+    :param js_abort_controller:
+        A JavaScript AbortController object, used for timeouts
+    """
+
+    def __init__(
+        self,
+        js_read_stream: Any,
+        timeout: float,
+        request: EmscriptenRequest,
+        response: EmscriptenResponse,
+        js_abort_controller: Any,  # JavaScript AbortController for timeouts
+    ):
+        self.js_read_stream = js_read_stream
+        self.timeout = timeout
+        self._is_closed = False
+        self._is_done = False
+        self.request: EmscriptenRequest | None = request
+        self.response: EmscriptenResponse | None = response
+        self.current_buffer = None
+        self.current_buffer_pos = 0
+        self.js_abort_controller = js_abort_controller
+
+    def __del__(self) -> None:
+        self.close()
+
+    # this is compatible with _base_connection
+    def is_closed(self) -> bool:
+        return self._is_closed
+
+    # for compatibility with RawIOBase
+    @property
+    def closed(self) -> bool:
+        return self.is_closed()
+
+    def close(self) -> None:
+        if self.is_closed():
+            return
+        self.read_len = 0
+        self.read_pos = 0
+        self.js_read_stream.cancel()
+        self.js_read_stream = None
+        self._is_closed = True
+        self._is_done = True
+        self.request = None
+        self.response = None
+        super().close()
+
+    def readable(self) -> bool:
+        return True
+
+    def writable(self) -> bool:
+        return False
+
+    def seekable(self) -> bool:
+        return False
+
+    def _get_next_buffer(self) -> bool:
+        result_js = _run_sync_with_timeout(
+            self.js_read_stream.read(),
+            self.timeout,
+            self.js_abort_controller,
+            request=self.request,
+            response=self.response,
+        )
+        if result_js.done:
+            self._is_done = True
+            return False
+        else:
+            self.current_buffer = result_js.value.to_py()
+            self.current_buffer_pos = 0
+            return True
+
+    def readinto(self, byte_obj: Buffer) -> int:
+        if self.current_buffer is None:
+            if not self._get_next_buffer() or self.current_buffer is None:
+                self.close()
+                return 0
+        ret_length = min(
+            len(byte_obj), len(self.current_buffer) - self.current_buffer_pos
+        )
+        byte_obj[0:ret_length] = self.current_buffer[
+            self.current_buffer_pos : self.current_buffer_pos + ret_length
+        ]
+        self.current_buffer_pos += ret_length
+        if self.current_buffer_pos == len(self.current_buffer):
+            self.current_buffer = None
+        return ret_length
+
+
+# check if we are in a worker or not
+def is_in_browser_main_thread() -> bool:
+    return hasattr(js, "window") and hasattr(js, "self") and js.self == js.window
+
+
+def is_cross_origin_isolated() -> bool:
+    return hasattr(js, "crossOriginIsolated") and js.crossOriginIsolated
+
+
+def is_in_node() -> bool:
+    return (
+        hasattr(js, "process")
+        and hasattr(js.process, "release")
+        and hasattr(js.process.release, "name")
+        and js.process.release.name == "node"
+    )
+
+
+def is_worker_available() -> bool:
+    return hasattr(js, "Worker") and hasattr(js, "Blob")
+
+
+_fetcher: _StreamingFetcher | None = None
+
+if is_worker_available() and (
+    (is_cross_origin_isolated() and not is_in_browser_main_thread())
+    and (not is_in_node())
+):
+    _fetcher = _StreamingFetcher()
+else:
+    _fetcher = None
+
+
+NODE_JSPI_ERROR = (
+    "urllib3 only works in Node.js with pyodide.runPythonAsync"
+    " and requires the flag --experimental-wasm-stack-switching in "
+    " versions of node <24."
+)
+
+
+def send_streaming_request(request: EmscriptenRequest) -> EmscriptenResponse | None:
+    if has_jspi():
+        return send_jspi_request(request, True)
+    elif is_in_node():
+        raise _RequestError(
+            message=NODE_JSPI_ERROR,
+            request=request,
+            response=None,
+        )
+
+    if _fetcher and streaming_ready():
+        return _fetcher.send(request)
+    else:
+        _show_streaming_warning()
+        return None
+
+
+_SHOWN_TIMEOUT_WARNING = False
+
+
+def _show_timeout_warning() -> None:
+    global _SHOWN_TIMEOUT_WARNING
+    if not _SHOWN_TIMEOUT_WARNING:
+        _SHOWN_TIMEOUT_WARNING = True
+        message = "Warning: Timeout is not available on main browser thread"
+        js.console.warn(message)
+
+
+_SHOWN_STREAMING_WARNING = False
+
+
+def _show_streaming_warning() -> None:
+    global _SHOWN_STREAMING_WARNING
+    if not _SHOWN_STREAMING_WARNING:
+        _SHOWN_STREAMING_WARNING = True
+        message = "Can't stream HTTP requests because: \n"
+        if not is_cross_origin_isolated():
+            message += "  Page is not cross-origin isolated\n"
+        if is_in_browser_main_thread():
+            message += "  Python is running in main browser thread\n"
+        if not is_worker_available():
+            message += " Worker or Blob classes are not available in this environment."  # Defensive: this is always False in browsers that we test in
+        if streaming_ready() is False:
+            message += """ Streaming fetch worker isn't ready. If you want to be sure that streaming fetch
+is working, you need to call: 'await urllib3.contrib.emscripten.fetch.wait_for_streaming_ready()`"""
+        from js import console
+
+        console.warn(message)
+
+
+def send_request(request: EmscriptenRequest) -> EmscriptenResponse:
+    if has_jspi():
+        return send_jspi_request(request, False)
+    elif is_in_node():
+        raise _RequestError(
+            message=NODE_JSPI_ERROR,
+            request=request,
+            response=None,
+        )
+    try:
+        js_xhr = js.XMLHttpRequest.new()
+
+        if not is_in_browser_main_thread():
+            js_xhr.responseType = "arraybuffer"
+            if request.timeout:
+                js_xhr.timeout = int(request.timeout * 1000)
+        else:
+            js_xhr.overrideMimeType("text/plain; charset=ISO-8859-15")
+            if request.timeout:
+                # timeout isn't available on the main thread - show a warning in console
+                # if it is set
+                _show_timeout_warning()
+
+        js_xhr.open(request.method, request.url, False)
+        for name, value in request.headers.items():
+            if name.lower() not in HEADERS_TO_IGNORE:
+                js_xhr.setRequestHeader(name, value)
+
+        js_xhr.send(to_js(request.body))
+
+        headers = dict(Parser().parsestr(js_xhr.getAllResponseHeaders()))
+
+        if not is_in_browser_main_thread():
+            body = js_xhr.response.to_py().tobytes()
+        else:
+            body = js_xhr.response.encode("ISO-8859-15")
+        return EmscriptenResponse(
+            status_code=js_xhr.status, headers=headers, body=body, request=request
+        )
+    except JsException as err:
+        if err.name == "TimeoutError":
+            raise _TimeoutError(err.message, request=request)
+        elif err.name == "NetworkError":
+            raise _RequestError(err.message, request=request)
+        else:
+            # general http error
+            raise _RequestError(err.message, request=request)
+
+
+def send_jspi_request(
+    request: EmscriptenRequest, streaming: bool
+) -> EmscriptenResponse:
+    """
+    Send a request using WebAssembly JavaScript Promise Integration
+    to wrap the asynchronous JavaScript fetch api (experimental).
+
+    :param request:
+        Request to send
+
+    :param streaming:
+        Whether to stream the response
+
+    :return: The response object
+    :rtype: EmscriptenResponse
+    """
+    timeout = request.timeout
+    js_abort_controller = js.AbortController.new()
+    headers = {k: v for k, v in request.headers.items() if k not in HEADERS_TO_IGNORE}
+    req_body = request.body
+    fetch_data = {
+        "headers": headers,
+        "body": to_js(req_body),
+        "method": request.method,
+        "signal": js_abort_controller.signal,
+    }
+    # Node.js returns the whole response (unlike opaqueredirect in browsers),
+    # so urllib3 can set `redirect: manual` to control redirects itself.
+    # https://stackoverflow.com/a/78524615
+    if _is_node_js():
+        fetch_data["redirect"] = "manual"
+    # Call JavaScript fetch (async api, returns a promise)
+    fetcher_promise_js = js.fetch(request.url, _obj_from_dict(fetch_data))
+    # Now suspend WebAssembly until we resolve that promise
+    # or time out.
+    response_js = _run_sync_with_timeout(
+        fetcher_promise_js,
+        timeout,
+        js_abort_controller,
+        request=request,
+        response=None,
+    )
+    headers = {}
+    header_iter = response_js.headers.entries()
+    while True:
+        iter_value_js = header_iter.next()
+        if getattr(iter_value_js, "done", False):
+            break
+        else:
+            headers[str(iter_value_js.value[0])] = str(iter_value_js.value[1])
+    status_code = response_js.status
+    body: bytes | io.RawIOBase = b""
+
+    response = EmscriptenResponse(
+        status_code=status_code, headers=headers, body=b"", request=request
+    )
+    if streaming:
+        # get via inputstream
+        if response_js.body is not None:
+            # get a reader from the fetch response
+            body_stream_js = response_js.body.getReader()
+            body = _JSPIReadStream(
+                body_stream_js, timeout, request, response, js_abort_controller
+            )
+    else:
+        # get directly via arraybuffer
+        # n.b. this is another async JavaScript call.
+        body = _run_sync_with_timeout(
+            response_js.arrayBuffer(),
+            timeout,
+            js_abort_controller,
+            request=request,
+            response=response,
+        ).to_py()
+    response.body = body
+    return response
+
+
+def _run_sync_with_timeout(
+    promise: Any,
+    timeout: float,
+    js_abort_controller: Any,
+    request: EmscriptenRequest | None,
+    response: EmscriptenResponse | None,
+) -> Any:
+    """
+    Await a JavaScript promise synchronously with a timeout which is implemented
+    via the AbortController
+
+    :param promise:
+        Javascript promise to await
+
+    :param timeout:
+        Timeout in seconds
+
+    :param js_abort_controller:
+        A JavaScript AbortController object, used on timeout
+
+    :param request:
+        The request being handled
+
+    :param response:
+        The response being handled (if it exists yet)
+
+    :raises _TimeoutError: If the request times out
+    :raises _RequestError: If the request raises a JavaScript exception
+
+    :return: The result of awaiting the promise.
+    """
+    timer_id = None
+    if timeout > 0:
+        timer_id = js.setTimeout(
+            js_abort_controller.abort.bind(js_abort_controller), int(timeout * 1000)
+        )
+    try:
+        from pyodide.ffi import run_sync
+
+        # run_sync here uses WebAssembly JavaScript Promise Integration to
+        # suspend python until the JavaScript promise resolves.
+        return run_sync(promise)
+    except JsException as err:
+        if err.name == "AbortError":
+            raise _TimeoutError(
+                message="Request timed out", request=request, response=response
+            )
+        else:
+            raise _RequestError(message=err.message, request=request, response=response)
+    finally:
+        if timer_id is not None:
+            js.clearTimeout(timer_id)
+
+
+def has_jspi() -> bool:
+    """
+    Return true if jspi can be used.
+
+    This requires both browser support and also WebAssembly
+    to be in the correct state - i.e. that the javascript
+    call into python was async not sync.
+
+    :return: True if jspi can be used.
+    :rtype: bool
+    """
+    try:
+        from pyodide.ffi import can_run_sync, run_sync  # noqa: F401
+
+        return bool(can_run_sync())
+    except ImportError:
+        return False
+
+
+def _is_node_js() -> bool:
+    """
+    Check if we are in Node.js.
+
+    :return: True if we are in Node.js.
+    :rtype: bool
+    """
+    return (
+        hasattr(js, "process")
+        and hasattr(js.process, "release")
+        # According to the Node.js documentation, the release name is always "node".
+        and js.process.release.name == "node"
+    )
+
+
+def streaming_ready() -> bool | None:
+    if _fetcher:
+        return _fetcher.streaming_ready
+    else:
+        return None  # no fetcher, return None to signify that
+
+
+async def wait_for_streaming_ready() -> bool:
+    if _fetcher:
+        await _fetcher.js_worker_ready_promise
+        return True
+    else:
+        return False
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/request.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/request.py
new file mode 100644
index 000000000..e692e692b
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/request.py
@@ -0,0 +1,22 @@
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+
+from ..._base_connection import _TYPE_BODY
+
+
+@dataclass
+class EmscriptenRequest:
+    method: str
+    url: str
+    params: dict[str, str] | None = None
+    body: _TYPE_BODY | None = None
+    headers: dict[str, str] = field(default_factory=dict)
+    timeout: float = 0
+    decode_content: bool = True
+
+    def set_header(self, name: str, value: str) -> None:
+        self.headers[name.capitalize()] = value
+
+    def set_body(self, body: _TYPE_BODY | None) -> None:
+        self.body = body
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py
new file mode 100644
index 000000000..cb1088a18
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py
@@ -0,0 +1,277 @@
+from __future__ import annotations
+
+import json as _json
+import logging
+import typing
+from contextlib import contextmanager
+from dataclasses import dataclass
+from http.client import HTTPException as HTTPException
+from io import BytesIO, IOBase
+
+from ...exceptions import InvalidHeader, TimeoutError
+from ...response import BaseHTTPResponse
+from ...util.retry import Retry
+from .request import EmscriptenRequest
+
+if typing.TYPE_CHECKING:
+    from ..._base_connection import BaseHTTPConnection, BaseHTTPSConnection
+
+log = logging.getLogger(__name__)
+
+
+@dataclass
+class EmscriptenResponse:
+    status_code: int
+    headers: dict[str, str]
+    body: IOBase | bytes
+    request: EmscriptenRequest
+
+
+class EmscriptenHttpResponseWrapper(BaseHTTPResponse):
+    def __init__(
+        self,
+        internal_response: EmscriptenResponse,
+        url: str | None = None,
+        connection: BaseHTTPConnection | BaseHTTPSConnection | None = None,
+    ):
+        self._pool = None  # set by pool class
+        self._body = None
+        self._response = internal_response
+        self._url = url
+        self._connection = connection
+        self._closed = False
+        super().__init__(
+            headers=internal_response.headers,
+            status=internal_response.status_code,
+            request_url=url,
+            version=0,
+            version_string="HTTP/?",
+            reason="",
+            decode_content=True,
+        )
+        self.length_remaining = self._init_length(self._response.request.method)
+        self.length_is_certain = False
+
+    @property
+    def url(self) -> str | None:
+        return self._url
+
+    @url.setter
+    def url(self, url: str | None) -> None:
+        self._url = url
+
+    @property
+    def connection(self) -> BaseHTTPConnection | BaseHTTPSConnection | None:
+        return self._connection
+
+    @property
+    def retries(self) -> Retry | None:
+        return self._retries
+
+    @retries.setter
+    def retries(self, retries: Retry | None) -> None:
+        # Override the request_url if retries has a redirect location.
+        self._retries = retries
+
+    def stream(
+        self, amt: int | None = 2**16, decode_content: bool | None = None
+    ) -> typing.Generator[bytes]:
+        """
+        A generator wrapper for the read() method. A call will block until
+        ``amt`` bytes have been read from the connection or until the
+        connection is closed.
+
+        :param amt:
+            How much of the content to read. The generator will return up to
+            much data per iteration, but may return less. This is particularly
+            likely when using compressed data. However, the empty string will
+            never be returned.
+
+        :param decode_content:
+            If True, will attempt to decode the body based on the
+            'content-encoding' header.
+        """
+        while True:
+            data = self.read(amt=amt, decode_content=decode_content)
+
+            if data:
+                yield data
+            else:
+                break
+
+    def _init_length(self, request_method: str | None) -> int | None:
+        length: int | None
+        content_length: str | None = self.headers.get("content-length")
+
+        if content_length is not None:
+            try:
+                # RFC 7230 section 3.3.2 specifies multiple content lengths can
+                # be sent in a single Content-Length header
+                # (e.g. Content-Length: 42, 42). This line ensures the values
+                # are all valid ints and that as long as the `set` length is 1,
+                # all values are the same. Otherwise, the header is invalid.
+                lengths = {int(val) for val in content_length.split(",")}
+                if len(lengths) > 1:
+                    raise InvalidHeader(
+                        "Content-Length contained multiple "
+                        "unmatching values (%s)" % content_length
+                    )
+                length = lengths.pop()
+            except ValueError:
+                length = None
+            else:
+                if length < 0:
+                    length = None
+
+        else:  # if content_length is None
+            length = None
+
+        # Check for responses that shouldn't include a body
+        if (
+            self.status in (204, 304)
+            or 100 <= self.status < 200
+            or request_method == "HEAD"
+        ):
+            length = 0
+
+        return length
+
+    def read(
+        self,
+        amt: int | None = None,
+        decode_content: bool | None = None,  # ignored because browser decodes always
+        cache_content: bool = False,
+    ) -> bytes:
+        if (
+            self._closed
+            or self._response is None
+            or (isinstance(self._response.body, IOBase) and self._response.body.closed)
+        ):
+            return b""
+
+        with self._error_catcher():
+            # body has been preloaded as a string by XmlHttpRequest
+            if not isinstance(self._response.body, IOBase):
+                self.length_remaining = len(self._response.body)
+                self.length_is_certain = True
+                # wrap body in IOStream
+                self._response.body = BytesIO(self._response.body)
+            if amt is not None and amt >= 0:
+                # don't cache partial content
+                cache_content = False
+                data = self._response.body.read(amt)
+            else:  # read all we can (and cache it)
+                data = self._response.body.read()
+                if cache_content:
+                    self._body = data
+            if self.length_remaining is not None:
+                self.length_remaining = max(self.length_remaining - len(data), 0)
+            if len(data) == 0 or (
+                self.length_is_certain and self.length_remaining == 0
+            ):
+                # definitely finished reading, close response stream
+                self._response.body.close()
+            return typing.cast(bytes, data)
+
+    def read_chunked(
+        self,
+        amt: int | None = None,
+        decode_content: bool | None = None,
+    ) -> typing.Generator[bytes]:
+        # chunked is handled by browser
+        while True:
+            bytes = self.read(amt, decode_content)
+            if not bytes:
+                break
+            yield bytes
+
+    def release_conn(self) -> None:
+        if not self._pool or not self._connection:
+            return None
+
+        self._pool._put_conn(self._connection)
+        self._connection = None
+
+    def drain_conn(self) -> None:
+        self.close()
+
+    @property
+    def data(self) -> bytes:
+        if self._body:
+            return self._body
+        else:
+            return self.read(cache_content=True)
+
+    def json(self) -> typing.Any:
+        """
+        Deserializes the body of the HTTP response as a Python object.
+
+        The body of the HTTP response must be encoded using UTF-8, as per
+        `RFC 8529 Section 8.1 `_.
+
+        To use a custom JSON decoder pass the result of :attr:`HTTPResponse.data` to
+        your custom decoder instead.
+
+        If the body of the HTTP response is not decodable to UTF-8, a
+        `UnicodeDecodeError` will be raised. If the body of the HTTP response is not a
+        valid JSON document, a `json.JSONDecodeError` will be raised.
+
+        Read more :ref:`here `.
+
+        :returns: The body of the HTTP response as a Python object.
+        """
+        data = self.data.decode("utf-8")
+        return _json.loads(data)
+
+    def close(self) -> None:
+        if not self._closed:
+            if isinstance(self._response.body, IOBase):
+                self._response.body.close()
+            if self._connection:
+                self._connection.close()
+                self._connection = None
+            self._closed = True
+
+    @contextmanager
+    def _error_catcher(self) -> typing.Generator[None]:
+        """
+        Catch Emscripten specific exceptions thrown by fetch.py,
+        instead re-raising urllib3 variants, so that low-level exceptions
+        are not leaked in the high-level api.
+
+        On exit, release the connection back to the pool.
+        """
+        from .fetch import _RequestError, _TimeoutError  # avoid circular import
+
+        clean_exit = False
+
+        try:
+            yield
+            # If no exception is thrown, we should avoid cleaning up
+            # unnecessarily.
+            clean_exit = True
+        except _TimeoutError as e:
+            raise TimeoutError(str(e))
+        except _RequestError as e:
+            raise HTTPException(str(e))
+        finally:
+            # If we didn't terminate cleanly, we need to throw away our
+            # connection.
+            if not clean_exit:
+                # The response may not be closed but we're not going to use it
+                # anymore so close it now
+                if (
+                    isinstance(self._response.body, IOBase)
+                    and not self._response.body.closed
+                ):
+                    self._response.body.close()
+                # release the connection back to the pool
+                self.release_conn()
+            else:
+                # If we have read everything from the response stream,
+                # return the connection back to the pool.
+                if (
+                    isinstance(self._response.body, IOBase)
+                    and self._response.body.closed
+                ):
+                    self.release_conn()
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py
new file mode 100644
index 000000000..a7b16a02b
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py
@@ -0,0 +1,564 @@
+"""
+Module for using pyOpenSSL as a TLS backend. This module was relevant before
+the standard library ``ssl`` module supported SNI, but now that we've dropped
+support for Python 2.7 all relevant Python versions support SNI so
+**this module is no longer recommended**.
+
+This needs the following packages installed:
+
+* `pyOpenSSL`_ (tested with 16.0.0)
+* `cryptography`_ (minimum 1.3.4, from pyopenssl)
+* `idna`_ (minimum 2.0)
+
+However, pyOpenSSL depends on cryptography, so while we use all three directly here we
+end up having relatively few packages required.
+
+You can install them with the following command:
+
+.. code-block:: bash
+
+    $ python -m pip install pyopenssl cryptography idna
+
+To activate certificate checking, call
+:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
+before you begin making HTTP requests. This can be done in a ``sitecustomize``
+module, or at any other time before your application begins using ``urllib3``,
+like this:
+
+.. code-block:: python
+
+    try:
+        import pip._vendor.urllib3.contrib.pyopenssl as pyopenssl
+        pyopenssl.inject_into_urllib3()
+    except ImportError:
+        pass
+
+.. _pyopenssl: https://www.pyopenssl.org
+.. _cryptography: https://cryptography.io
+.. _idna: https://github.com/kjd/idna
+"""
+
+from __future__ import annotations
+
+import OpenSSL.SSL  # type: ignore[import-not-found]
+from cryptography import x509
+
+try:
+    from cryptography.x509 import UnsupportedExtension  # type: ignore[attr-defined]
+except ImportError:
+    # UnsupportedExtension is gone in cryptography >= 2.1.0
+    class UnsupportedExtension(Exception):  # type: ignore[no-redef]
+        pass
+
+
+import logging
+import ssl
+import typing
+from io import BytesIO
+from socket import socket as socket_cls
+from socket import timeout
+
+from .. import util
+
+if typing.TYPE_CHECKING:
+    from OpenSSL.crypto import X509  # type: ignore[import-not-found]
+
+
+__all__ = ["inject_into_urllib3", "extract_from_urllib3"]
+
+# Map from urllib3 to PyOpenSSL compatible parameter-values.
+_openssl_versions: dict[int, int] = {
+    util.ssl_.PROTOCOL_TLS: OpenSSL.SSL.SSLv23_METHOD,  # type: ignore[attr-defined]
+    util.ssl_.PROTOCOL_TLS_CLIENT: OpenSSL.SSL.SSLv23_METHOD,  # type: ignore[attr-defined]
+    ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
+}
+
+if hasattr(ssl, "PROTOCOL_TLSv1_1") and hasattr(OpenSSL.SSL, "TLSv1_1_METHOD"):
+    _openssl_versions[ssl.PROTOCOL_TLSv1_1] = OpenSSL.SSL.TLSv1_1_METHOD
+
+if hasattr(ssl, "PROTOCOL_TLSv1_2") and hasattr(OpenSSL.SSL, "TLSv1_2_METHOD"):
+    _openssl_versions[ssl.PROTOCOL_TLSv1_2] = OpenSSL.SSL.TLSv1_2_METHOD
+
+
+_stdlib_to_openssl_verify = {
+    ssl.CERT_NONE: OpenSSL.SSL.VERIFY_NONE,
+    ssl.CERT_OPTIONAL: OpenSSL.SSL.VERIFY_PEER,
+    ssl.CERT_REQUIRED: OpenSSL.SSL.VERIFY_PEER
+    + OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT,
+}
+_openssl_to_stdlib_verify = {v: k for k, v in _stdlib_to_openssl_verify.items()}
+
+# The SSLvX values are the most likely to be missing in the future
+# but we check them all just to be sure.
+_OP_NO_SSLv2_OR_SSLv3: int = getattr(OpenSSL.SSL, "OP_NO_SSLv2", 0) | getattr(
+    OpenSSL.SSL, "OP_NO_SSLv3", 0
+)
+_OP_NO_TLSv1: int = getattr(OpenSSL.SSL, "OP_NO_TLSv1", 0)
+_OP_NO_TLSv1_1: int = getattr(OpenSSL.SSL, "OP_NO_TLSv1_1", 0)
+_OP_NO_TLSv1_2: int = getattr(OpenSSL.SSL, "OP_NO_TLSv1_2", 0)
+_OP_NO_TLSv1_3: int = getattr(OpenSSL.SSL, "OP_NO_TLSv1_3", 0)
+
+_openssl_to_ssl_minimum_version: dict[int, int] = {
+    ssl.TLSVersion.MINIMUM_SUPPORTED: _OP_NO_SSLv2_OR_SSLv3,
+    ssl.TLSVersion.TLSv1: _OP_NO_SSLv2_OR_SSLv3,
+    ssl.TLSVersion.TLSv1_1: _OP_NO_SSLv2_OR_SSLv3 | _OP_NO_TLSv1,
+    ssl.TLSVersion.TLSv1_2: _OP_NO_SSLv2_OR_SSLv3 | _OP_NO_TLSv1 | _OP_NO_TLSv1_1,
+    ssl.TLSVersion.TLSv1_3: (
+        _OP_NO_SSLv2_OR_SSLv3 | _OP_NO_TLSv1 | _OP_NO_TLSv1_1 | _OP_NO_TLSv1_2
+    ),
+    ssl.TLSVersion.MAXIMUM_SUPPORTED: (
+        _OP_NO_SSLv2_OR_SSLv3 | _OP_NO_TLSv1 | _OP_NO_TLSv1_1 | _OP_NO_TLSv1_2
+    ),
+}
+_openssl_to_ssl_maximum_version: dict[int, int] = {
+    ssl.TLSVersion.MINIMUM_SUPPORTED: (
+        _OP_NO_SSLv2_OR_SSLv3
+        | _OP_NO_TLSv1
+        | _OP_NO_TLSv1_1
+        | _OP_NO_TLSv1_2
+        | _OP_NO_TLSv1_3
+    ),
+    ssl.TLSVersion.TLSv1: (
+        _OP_NO_SSLv2_OR_SSLv3 | _OP_NO_TLSv1_1 | _OP_NO_TLSv1_2 | _OP_NO_TLSv1_3
+    ),
+    ssl.TLSVersion.TLSv1_1: _OP_NO_SSLv2_OR_SSLv3 | _OP_NO_TLSv1_2 | _OP_NO_TLSv1_3,
+    ssl.TLSVersion.TLSv1_2: _OP_NO_SSLv2_OR_SSLv3 | _OP_NO_TLSv1_3,
+    ssl.TLSVersion.TLSv1_3: _OP_NO_SSLv2_OR_SSLv3,
+    ssl.TLSVersion.MAXIMUM_SUPPORTED: _OP_NO_SSLv2_OR_SSLv3,
+}
+
+# OpenSSL will only write 16K at a time
+SSL_WRITE_BLOCKSIZE = 16384
+
+orig_util_SSLContext = util.ssl_.SSLContext
+
+
+log = logging.getLogger(__name__)
+
+
+def inject_into_urllib3() -> None:
+    "Monkey-patch urllib3 with PyOpenSSL-backed SSL-support."
+
+    _validate_dependencies_met()
+
+    util.SSLContext = PyOpenSSLContext  # type: ignore[assignment]
+    util.ssl_.SSLContext = PyOpenSSLContext  # type: ignore[assignment]
+    util.IS_PYOPENSSL = True
+    util.ssl_.IS_PYOPENSSL = True
+
+
+def extract_from_urllib3() -> None:
+    "Undo monkey-patching by :func:`inject_into_urllib3`."
+
+    util.SSLContext = orig_util_SSLContext
+    util.ssl_.SSLContext = orig_util_SSLContext
+    util.IS_PYOPENSSL = False
+    util.ssl_.IS_PYOPENSSL = False
+
+
+def _validate_dependencies_met() -> None:
+    """
+    Verifies that PyOpenSSL's package-level dependencies have been met.
+    Throws `ImportError` if they are not met.
+    """
+    # Method added in `cryptography==1.1`; not available in older versions
+    from cryptography.x509.extensions import Extensions
+
+    if getattr(Extensions, "get_extension_for_class", None) is None:
+        raise ImportError(
+            "'cryptography' module missing required functionality.  "
+            "Try upgrading to v1.3.4 or newer."
+        )
+
+    # pyOpenSSL 0.14 and above use cryptography for OpenSSL bindings. The _x509
+    # attribute is only present on those versions.
+    from OpenSSL.crypto import X509
+
+    x509 = X509()
+    if getattr(x509, "_x509", None) is None:
+        raise ImportError(
+            "'pyOpenSSL' module missing required functionality. "
+            "Try upgrading to v0.14 or newer."
+        )
+
+
+def _dnsname_to_stdlib(name: str) -> str | None:
+    """
+    Converts a dNSName SubjectAlternativeName field to the form used by the
+    standard library on the given Python version.
+
+    Cryptography produces a dNSName as a unicode string that was idna-decoded
+    from ASCII bytes. We need to idna-encode that string to get it back, and
+    then on Python 3 we also need to convert to unicode via UTF-8 (the stdlib
+    uses PyUnicode_FromStringAndSize on it, which decodes via UTF-8).
+
+    If the name cannot be idna-encoded then we return None signalling that
+    the name given should be skipped.
+    """
+
+    def idna_encode(name: str) -> bytes | None:
+        """
+        Borrowed wholesale from the Python Cryptography Project. It turns out
+        that we can't just safely call `idna.encode`: it can explode for
+        wildcard names. This avoids that problem.
+        """
+        from pip._vendor import idna
+
+        try:
+            for prefix in ["*.", "."]:
+                if name.startswith(prefix):
+                    name = name[len(prefix) :]
+                    return prefix.encode("ascii") + idna.encode(name)
+            return idna.encode(name)
+        except idna.core.IDNAError:
+            return None
+
+    # Don't send IPv6 addresses through the IDNA encoder.
+    if ":" in name:
+        return name
+
+    encoded_name = idna_encode(name)
+    if encoded_name is None:
+        return None
+    return encoded_name.decode("utf-8")
+
+
+def get_subj_alt_name(peer_cert: X509) -> list[tuple[str, str]]:
+    """
+    Given an PyOpenSSL certificate, provides all the subject alternative names.
+    """
+    cert = peer_cert.to_cryptography()
+
+    # We want to find the SAN extension. Ask Cryptography to locate it (it's
+    # faster than looping in Python)
+    try:
+        ext = cert.extensions.get_extension_for_class(x509.SubjectAlternativeName).value
+    except x509.ExtensionNotFound:
+        # No such extension, return the empty list.
+        return []
+    except (
+        x509.DuplicateExtension,
+        UnsupportedExtension,
+        x509.UnsupportedGeneralNameType,
+        UnicodeError,
+    ) as e:
+        # A problem has been found with the quality of the certificate. Assume
+        # no SAN field is present.
+        log.warning(
+            "A problem was encountered with the certificate that prevented "
+            "urllib3 from finding the SubjectAlternativeName field. This can "
+            "affect certificate validation. The error was %s",
+            e,
+        )
+        return []
+
+    # We want to return dNSName and iPAddress fields. We need to cast the IPs
+    # back to strings because the match_hostname function wants them as
+    # strings.
+    # Sadly the DNS names need to be idna encoded and then, on Python 3, UTF-8
+    # decoded. This is pretty frustrating, but that's what the standard library
+    # does with certificates, and so we need to attempt to do the same.
+    # We also want to skip over names which cannot be idna encoded.
+    names = [
+        ("DNS", name)
+        for name in map(_dnsname_to_stdlib, ext.get_values_for_type(x509.DNSName))
+        if name is not None
+    ]
+    names.extend(
+        ("IP Address", str(name)) for name in ext.get_values_for_type(x509.IPAddress)
+    )
+
+    return names
+
+
+class WrappedSocket:
+    """API-compatibility wrapper for Python OpenSSL's Connection-class."""
+
+    def __init__(
+        self,
+        connection: OpenSSL.SSL.Connection,
+        socket: socket_cls,
+        suppress_ragged_eofs: bool = True,
+    ) -> None:
+        self.connection = connection
+        self.socket = socket
+        self.suppress_ragged_eofs = suppress_ragged_eofs
+        self._io_refs = 0
+        self._closed = False
+
+    def fileno(self) -> int:
+        return self.socket.fileno()
+
+    # Copy-pasted from Python 3.5 source code
+    def _decref_socketios(self) -> None:
+        if self._io_refs > 0:
+            self._io_refs -= 1
+        if self._closed:
+            self.close()
+
+    def recv(self, *args: typing.Any, **kwargs: typing.Any) -> bytes:
+        try:
+            data = self.connection.recv(*args, **kwargs)
+        except OpenSSL.SSL.SysCallError as e:
+            if self.suppress_ragged_eofs and e.args == (-1, "Unexpected EOF"):
+                return b""
+            else:
+                raise OSError(e.args[0], str(e)) from e
+        except OpenSSL.SSL.ZeroReturnError:
+            if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
+                return b""
+            else:
+                raise
+        except OpenSSL.SSL.WantReadError as e:
+            if not util.wait_for_read(self.socket, self.socket.gettimeout()):
+                raise timeout("The read operation timed out") from e
+            else:
+                return self.recv(*args, **kwargs)
+
+        # TLS 1.3 post-handshake authentication
+        except OpenSSL.SSL.Error as e:
+            raise ssl.SSLError(f"read error: {e!r}") from e
+        else:
+            return data  # type: ignore[no-any-return]
+
+    def recv_into(self, *args: typing.Any, **kwargs: typing.Any) -> int:
+        try:
+            return self.connection.recv_into(*args, **kwargs)  # type: ignore[no-any-return]
+        except OpenSSL.SSL.SysCallError as e:
+            if self.suppress_ragged_eofs and e.args == (-1, "Unexpected EOF"):
+                return 0
+            else:
+                raise OSError(e.args[0], str(e)) from e
+        except OpenSSL.SSL.ZeroReturnError:
+            if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
+                return 0
+            else:
+                raise
+        except OpenSSL.SSL.WantReadError as e:
+            if not util.wait_for_read(self.socket, self.socket.gettimeout()):
+                raise timeout("The read operation timed out") from e
+            else:
+                return self.recv_into(*args, **kwargs)
+
+        # TLS 1.3 post-handshake authentication
+        except OpenSSL.SSL.Error as e:
+            raise ssl.SSLError(f"read error: {e!r}") from e
+
+    def settimeout(self, timeout: float) -> None:
+        return self.socket.settimeout(timeout)
+
+    def _send_until_done(self, data: bytes) -> int:
+        while True:
+            try:
+                return self.connection.send(data)  # type: ignore[no-any-return]
+            except OpenSSL.SSL.WantWriteError as e:
+                if not util.wait_for_write(self.socket, self.socket.gettimeout()):
+                    raise timeout() from e
+                continue
+            except OpenSSL.SSL.SysCallError as e:
+                raise OSError(e.args[0], str(e)) from e
+
+    def sendall(self, data: bytes) -> None:
+        total_sent = 0
+        while total_sent < len(data):
+            sent = self._send_until_done(
+                data[total_sent : total_sent + SSL_WRITE_BLOCKSIZE]
+            )
+            total_sent += sent
+
+    def shutdown(self, how: int) -> None:
+        try:
+            self.connection.shutdown()
+        except OpenSSL.SSL.Error as e:
+            raise ssl.SSLError(f"shutdown error: {e!r}") from e
+
+    def close(self) -> None:
+        self._closed = True
+        if self._io_refs <= 0:
+            self._real_close()
+
+    def _real_close(self) -> None:
+        try:
+            return self.connection.close()  # type: ignore[no-any-return]
+        except OpenSSL.SSL.Error:
+            return
+
+    def getpeercert(
+        self, binary_form: bool = False
+    ) -> dict[str, list[typing.Any]] | None:
+        x509 = self.connection.get_peer_certificate()
+
+        if not x509:
+            return x509  # type: ignore[no-any-return]
+
+        if binary_form:
+            return OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, x509)  # type: ignore[no-any-return]
+
+        return {
+            "subject": ((("commonName", x509.get_subject().CN),),),  # type: ignore[dict-item]
+            "subjectAltName": get_subj_alt_name(x509),
+        }
+
+    def version(self) -> str:
+        return self.connection.get_protocol_version_name()  # type: ignore[no-any-return]
+
+    def selected_alpn_protocol(self) -> str | None:
+        alpn_proto = self.connection.get_alpn_proto_negotiated()
+        return alpn_proto.decode() if alpn_proto else None
+
+
+WrappedSocket.makefile = socket_cls.makefile  # type: ignore[attr-defined]
+
+
+class PyOpenSSLContext:
+    """
+    I am a wrapper class for the PyOpenSSL ``Context`` object. I am responsible
+    for translating the interface of the standard library ``SSLContext`` object
+    to calls into PyOpenSSL.
+    """
+
+    def __init__(self, protocol: int) -> None:
+        self.protocol = _openssl_versions[protocol]
+        self._ctx = OpenSSL.SSL.Context(self.protocol)
+        self._options = 0
+        self.check_hostname = False
+        self._minimum_version: int = ssl.TLSVersion.MINIMUM_SUPPORTED
+        self._maximum_version: int = ssl.TLSVersion.MAXIMUM_SUPPORTED
+        self._verify_flags: int = ssl.VERIFY_X509_TRUSTED_FIRST
+
+    @property
+    def options(self) -> int:
+        return self._options
+
+    @options.setter
+    def options(self, value: int) -> None:
+        self._options = value
+        self._set_ctx_options()
+
+    @property
+    def verify_flags(self) -> int:
+        return self._verify_flags
+
+    @verify_flags.setter
+    def verify_flags(self, value: int) -> None:
+        self._verify_flags = value
+        self._ctx.get_cert_store().set_flags(self._verify_flags)
+
+    @property
+    def verify_mode(self) -> int:
+        return _openssl_to_stdlib_verify[self._ctx.get_verify_mode()]
+
+    @verify_mode.setter
+    def verify_mode(self, value: ssl.VerifyMode) -> None:
+        self._ctx.set_verify(_stdlib_to_openssl_verify[value], _verify_callback)
+
+    def set_default_verify_paths(self) -> None:
+        self._ctx.set_default_verify_paths()
+
+    def set_ciphers(self, ciphers: bytes | str) -> None:
+        if isinstance(ciphers, str):
+            ciphers = ciphers.encode("utf-8")
+        self._ctx.set_cipher_list(ciphers)
+
+    def load_verify_locations(
+        self,
+        cafile: str | None = None,
+        capath: str | None = None,
+        cadata: bytes | None = None,
+    ) -> None:
+        if cafile is not None:
+            cafile = cafile.encode("utf-8")  # type: ignore[assignment]
+        if capath is not None:
+            capath = capath.encode("utf-8")  # type: ignore[assignment]
+        try:
+            self._ctx.load_verify_locations(cafile, capath)
+            if cadata is not None:
+                self._ctx.load_verify_locations(BytesIO(cadata))
+        except OpenSSL.SSL.Error as e:
+            raise ssl.SSLError(f"unable to load trusted certificates: {e!r}") from e
+
+    def load_cert_chain(
+        self,
+        certfile: str,
+        keyfile: str | None = None,
+        password: str | None = None,
+    ) -> None:
+        try:
+            self._ctx.use_certificate_chain_file(certfile)
+            if password is not None:
+                if not isinstance(password, bytes):
+                    password = password.encode("utf-8")  # type: ignore[assignment]
+                self._ctx.set_passwd_cb(lambda *_: password)
+            self._ctx.use_privatekey_file(keyfile or certfile)
+        except OpenSSL.SSL.Error as e:
+            raise ssl.SSLError(f"Unable to load certificate chain: {e!r}") from e
+
+    def set_alpn_protocols(self, protocols: list[bytes | str]) -> None:
+        protocols = [util.util.to_bytes(p, "ascii") for p in protocols]
+        return self._ctx.set_alpn_protos(protocols)  # type: ignore[no-any-return]
+
+    def wrap_socket(
+        self,
+        sock: socket_cls,
+        server_side: bool = False,
+        do_handshake_on_connect: bool = True,
+        suppress_ragged_eofs: bool = True,
+        server_hostname: bytes | str | None = None,
+    ) -> WrappedSocket:
+        cnx = OpenSSL.SSL.Connection(self._ctx, sock)
+
+        # If server_hostname is an IP, don't use it for SNI, per RFC6066 Section 3
+        if server_hostname and not util.ssl_.is_ipaddress(server_hostname):
+            if isinstance(server_hostname, str):
+                server_hostname = server_hostname.encode("utf-8")
+            cnx.set_tlsext_host_name(server_hostname)
+
+        cnx.set_connect_state()
+
+        while True:
+            try:
+                cnx.do_handshake()
+            except OpenSSL.SSL.WantReadError as e:
+                if not util.wait_for_read(sock, sock.gettimeout()):
+                    raise timeout("select timed out") from e
+                continue
+            except OpenSSL.SSL.Error as e:
+                raise ssl.SSLError(f"bad handshake: {e!r}") from e
+            break
+
+        return WrappedSocket(cnx, sock)
+
+    def _set_ctx_options(self) -> None:
+        self._ctx.set_options(
+            self._options
+            | _openssl_to_ssl_minimum_version[self._minimum_version]
+            | _openssl_to_ssl_maximum_version[self._maximum_version]
+        )
+
+    @property
+    def minimum_version(self) -> int:
+        return self._minimum_version
+
+    @minimum_version.setter
+    def minimum_version(self, minimum_version: int) -> None:
+        self._minimum_version = minimum_version
+        self._set_ctx_options()
+
+    @property
+    def maximum_version(self) -> int:
+        return self._maximum_version
+
+    @maximum_version.setter
+    def maximum_version(self, maximum_version: int) -> None:
+        self._maximum_version = maximum_version
+        self._set_ctx_options()
+
+
+def _verify_callback(
+    cnx: OpenSSL.SSL.Connection,
+    x509: X509,
+    err_no: int,
+    err_depth: int,
+    return_code: int,
+) -> bool:
+    return err_no == 0
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py
similarity index 75%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py
index c326e80dd..e3239b569 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 """
 This module contains provisional support for SOCKS proxies from within
 urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and
@@ -38,10 +37,11 @@
     proxy_url="socks5h://:@proxy-host"
 
 """
-from __future__ import absolute_import
+
+from __future__ import annotations
 
 try:
-    import socks
+    import socks  # type: ignore[import-untyped]
 except ImportError:
     import warnings
 
@@ -51,13 +51,13 @@
         (
             "SOCKS support in urllib3 requires the installation of optional "
             "dependencies: specifically, PySocks.  For more information, see "
-            "https://urllib3.readthedocs.io/en/1.26.x/contrib.html#socks-proxies"
+            "https://urllib3.readthedocs.io/en/latest/advanced-usage.html#socks-proxies"
         ),
         DependencyWarning,
     )
     raise
 
-from socket import error as SocketError
+import typing
 from socket import timeout as SocketTimeout
 
 from ..connection import HTTPConnection, HTTPSConnection
@@ -69,7 +69,16 @@
 try:
     import ssl
 except ImportError:
-    ssl = None
+    ssl = None  # type: ignore[assignment]
+
+
+class _TYPE_SOCKS_OPTIONS(typing.TypedDict):
+    socks_version: int
+    proxy_host: str | None
+    proxy_port: str | None
+    username: str | None
+    password: str | None
+    rdns: bool
 
 
 class SOCKSConnection(HTTPConnection):
@@ -77,15 +86,20 @@ class SOCKSConnection(HTTPConnection):
     A plain-text HTTP connection that connects via a SOCKS proxy.
     """
 
-    def __init__(self, *args, **kwargs):
-        self._socks_options = kwargs.pop("_socks_options")
-        super(SOCKSConnection, self).__init__(*args, **kwargs)
-
-    def _new_conn(self):
+    def __init__(
+        self,
+        _socks_options: _TYPE_SOCKS_OPTIONS,
+        *args: typing.Any,
+        **kwargs: typing.Any,
+    ) -> None:
+        self._socks_options = _socks_options
+        super().__init__(*args, **kwargs)
+
+    def _new_conn(self) -> socks.socksocket:
         """
         Establish a new connection via the SOCKS proxy.
         """
-        extra_kw = {}
+        extra_kw: dict[str, typing.Any] = {}
         if self.source_address:
             extra_kw["source_address"] = self.source_address
 
@@ -102,15 +116,14 @@ def _new_conn(self):
                 proxy_password=self._socks_options["password"],
                 proxy_rdns=self._socks_options["rdns"],
                 timeout=self.timeout,
-                **extra_kw
+                **extra_kw,
             )
 
-        except SocketTimeout:
+        except SocketTimeout as e:
             raise ConnectTimeoutError(
                 self,
-                "Connection to %s timed out. (connect timeout=%s)"
-                % (self.host, self.timeout),
-            )
+                f"Connection to {self.host} timed out. (connect timeout={self.timeout})",
+            ) from e
 
         except socks.ProxyError as e:
             # This is fragile as hell, but it seems to be the only way to raise
@@ -120,22 +133,23 @@ def _new_conn(self):
                 if isinstance(error, SocketTimeout):
                     raise ConnectTimeoutError(
                         self,
-                        "Connection to %s timed out. (connect timeout=%s)"
-                        % (self.host, self.timeout),
-                    )
+                        f"Connection to {self.host} timed out. (connect timeout={self.timeout})",
+                    ) from e
                 else:
+                    # Adding `from e` messes with coverage somehow, so it's omitted.
+                    # See #2386.
                     raise NewConnectionError(
-                        self, "Failed to establish a new connection: %s" % error
+                        self, f"Failed to establish a new connection: {error}"
                     )
             else:
                 raise NewConnectionError(
-                    self, "Failed to establish a new connection: %s" % e
-                )
+                    self, f"Failed to establish a new connection: {e}"
+                ) from e
 
-        except SocketError as e:  # Defensive: PySocks should catch all these.
+        except OSError as e:  # Defensive: PySocks should catch all these.
             raise NewConnectionError(
-                self, "Failed to establish a new connection: %s" % e
-            )
+                self, f"Failed to establish a new connection: {e}"
+            ) from e
 
         return conn
 
@@ -169,12 +183,12 @@ class SOCKSProxyManager(PoolManager):
 
     def __init__(
         self,
-        proxy_url,
-        username=None,
-        password=None,
-        num_pools=10,
-        headers=None,
-        **connection_pool_kw
+        proxy_url: str,
+        username: str | None = None,
+        password: str | None = None,
+        num_pools: int = 10,
+        headers: typing.Mapping[str, str] | None = None,
+        **connection_pool_kw: typing.Any,
     ):
         parsed = parse_url(proxy_url)
 
@@ -195,7 +209,7 @@ def __init__(
             socks_version = socks.PROXY_TYPE_SOCKS4
             rdns = True
         else:
-            raise ValueError("Unable to determine SOCKS version from %s" % proxy_url)
+            raise ValueError(f"Unable to determine SOCKS version from {proxy_url}")
 
         self.proxy_url = proxy_url
 
@@ -209,8 +223,6 @@ def __init__(
         }
         connection_pool_kw["_socks_options"] = socks_options
 
-        super(SOCKSProxyManager, self).__init__(
-            num_pools, headers, **connection_pool_kw
-        )
+        super().__init__(num_pools, headers, **connection_pool_kw)
 
         self.pool_classes_by_scheme = SOCKSProxyManager.pool_classes_by_scheme
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/exceptions.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/exceptions.py
new file mode 100644
index 000000000..58723faeb
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/exceptions.py
@@ -0,0 +1,335 @@
+from __future__ import annotations
+
+import socket
+import typing
+import warnings
+from email.errors import MessageDefect
+from http.client import IncompleteRead as httplib_IncompleteRead
+
+if typing.TYPE_CHECKING:
+    from .connection import HTTPConnection
+    from .connectionpool import ConnectionPool
+    from .response import HTTPResponse
+    from .util.retry import Retry
+
+# Base Exceptions
+
+
+class HTTPError(Exception):
+    """Base exception used by this module."""
+
+
+class HTTPWarning(Warning):
+    """Base warning used by this module."""
+
+
+_TYPE_REDUCE_RESULT = tuple[typing.Callable[..., object], tuple[object, ...]]
+
+
+class PoolError(HTTPError):
+    """Base exception for errors caused within a pool."""
+
+    def __init__(self, pool: ConnectionPool, message: str) -> None:
+        self.pool = pool
+        self._message = message
+        super().__init__(f"{pool}: {message}")
+
+    def __reduce__(self) -> _TYPE_REDUCE_RESULT:
+        # For pickling purposes.
+        return self.__class__, (None, self._message)
+
+
+class RequestError(PoolError):
+    """Base exception for PoolErrors that have associated URLs."""
+
+    def __init__(self, pool: ConnectionPool, url: str | None, message: str) -> None:
+        self.url = url
+        super().__init__(pool, message)
+
+    def __reduce__(self) -> _TYPE_REDUCE_RESULT:
+        # For pickling purposes.
+        return self.__class__, (None, self.url, self._message)
+
+
+class SSLError(HTTPError):
+    """Raised when SSL certificate fails in an HTTPS connection."""
+
+
+class ProxyError(HTTPError):
+    """Raised when the connection to a proxy fails."""
+
+    # The original error is also available as __cause__.
+    original_error: Exception
+
+    def __init__(self, message: str, error: Exception) -> None:
+        super().__init__(message, error)
+        self.original_error = error
+
+
+class DecodeError(HTTPError):
+    """Raised when automatic decoding based on Content-Type fails."""
+
+
+class ProtocolError(HTTPError):
+    """Raised when something unexpected happens mid-request/response."""
+
+
+#: Renamed to ProtocolError but aliased for backwards compatibility.
+ConnectionError = ProtocolError
+
+
+# Leaf Exceptions
+
+
+class MaxRetryError(RequestError):
+    """Raised when the maximum number of retries is exceeded.
+
+    :param pool: The connection pool
+    :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool`
+    :param str url: The requested Url
+    :param reason: The underlying error
+    :type reason: :class:`Exception`
+
+    """
+
+    def __init__(
+        self, pool: ConnectionPool, url: str | None, reason: Exception | None = None
+    ) -> None:
+        self.reason = reason
+
+        message = f"Max retries exceeded with url: {url} (Caused by {reason!r})"
+
+        super().__init__(pool, url, message)
+
+    def __reduce__(self) -> _TYPE_REDUCE_RESULT:
+        # For pickling purposes.
+        return self.__class__, (None, self.url, self.reason)
+
+
+class HostChangedError(RequestError):
+    """Raised when an existing pool gets a request for a foreign host."""
+
+    def __init__(
+        self, pool: ConnectionPool, url: str, retries: Retry | int = 3
+    ) -> None:
+        message = f"Tried to open a foreign host with url: {url}"
+        super().__init__(pool, url, message)
+        self.retries = retries
+
+
+class TimeoutStateError(HTTPError):
+    """Raised when passing an invalid state to a timeout"""
+
+
+class TimeoutError(HTTPError):
+    """Raised when a socket timeout error occurs.
+
+    Catching this error will catch both :exc:`ReadTimeoutErrors
+    ` and :exc:`ConnectTimeoutErrors `.
+    """
+
+
+class ReadTimeoutError(TimeoutError, RequestError):
+    """Raised when a socket timeout occurs while receiving data from a server"""
+
+
+# This timeout error does not have a URL attached and needs to inherit from the
+# base HTTPError
+class ConnectTimeoutError(TimeoutError):
+    """Raised when a socket timeout occurs while connecting to a server"""
+
+
+class NewConnectionError(ConnectTimeoutError, HTTPError):
+    """Raised when we fail to establish a new connection. Usually ECONNREFUSED."""
+
+    def __init__(self, conn: HTTPConnection, message: str) -> None:
+        self.conn = conn
+        self._message = message
+        super().__init__(f"{conn}: {message}")
+
+    def __reduce__(self) -> _TYPE_REDUCE_RESULT:
+        # For pickling purposes.
+        return self.__class__, (None, self._message)
+
+    @property
+    def pool(self) -> HTTPConnection:
+        warnings.warn(
+            "The 'pool' property is deprecated and will be removed "
+            "in urllib3 v2.1.0. Use 'conn' instead.",
+            DeprecationWarning,
+            stacklevel=2,
+        )
+
+        return self.conn
+
+
+class NameResolutionError(NewConnectionError):
+    """Raised when host name resolution fails."""
+
+    def __init__(self, host: str, conn: HTTPConnection, reason: socket.gaierror):
+        message = f"Failed to resolve '{host}' ({reason})"
+        self._host = host
+        self._reason = reason
+        super().__init__(conn, message)
+
+    def __reduce__(self) -> _TYPE_REDUCE_RESULT:
+        # For pickling purposes.
+        return self.__class__, (self._host, None, self._reason)
+
+
+class EmptyPoolError(PoolError):
+    """Raised when a pool runs out of connections and no more are allowed."""
+
+
+class FullPoolError(PoolError):
+    """Raised when we try to add a connection to a full pool in blocking mode."""
+
+
+class ClosedPoolError(PoolError):
+    """Raised when a request enters a pool after the pool has been closed."""
+
+
+class LocationValueError(ValueError, HTTPError):
+    """Raised when there is something wrong with a given URL input."""
+
+
+class LocationParseError(LocationValueError):
+    """Raised when get_host or similar fails to parse the URL input."""
+
+    def __init__(self, location: str) -> None:
+        message = f"Failed to parse: {location}"
+        super().__init__(message)
+
+        self.location = location
+
+
+class URLSchemeUnknown(LocationValueError):
+    """Raised when a URL input has an unsupported scheme."""
+
+    def __init__(self, scheme: str):
+        message = f"Not supported URL scheme {scheme}"
+        super().__init__(message)
+
+        self.scheme = scheme
+
+
+class ResponseError(HTTPError):
+    """Used as a container for an error reason supplied in a MaxRetryError."""
+
+    GENERIC_ERROR = "too many error responses"
+    SPECIFIC_ERROR = "too many {status_code} error responses"
+
+
+class SecurityWarning(HTTPWarning):
+    """Warned when performing security reducing actions"""
+
+
+class InsecureRequestWarning(SecurityWarning):
+    """Warned when making an unverified HTTPS request."""
+
+
+class NotOpenSSLWarning(SecurityWarning):
+    """Warned when using unsupported SSL library"""
+
+
+class SystemTimeWarning(SecurityWarning):
+    """Warned when system time is suspected to be wrong"""
+
+
+class InsecurePlatformWarning(SecurityWarning):
+    """Warned when certain TLS/SSL configuration is not available on a platform."""
+
+
+class DependencyWarning(HTTPWarning):
+    """
+    Warned when an attempt is made to import a module with missing optional
+    dependencies.
+    """
+
+
+class ResponseNotChunked(ProtocolError, ValueError):
+    """Response needs to be chunked in order to read it as chunks."""
+
+
+class BodyNotHttplibCompatible(HTTPError):
+    """
+    Body should be :class:`http.client.HTTPResponse` like
+    (have an fp attribute which returns raw chunks) for read_chunked().
+    """
+
+
+class IncompleteRead(HTTPError, httplib_IncompleteRead):
+    """
+    Response length doesn't match expected Content-Length
+
+    Subclass of :class:`http.client.IncompleteRead` to allow int value
+    for ``partial`` to avoid creating large objects on streamed reads.
+    """
+
+    partial: int  # type: ignore[assignment]
+    expected: int
+
+    def __init__(self, partial: int, expected: int) -> None:
+        self.partial = partial
+        self.expected = expected
+
+    def __repr__(self) -> str:
+        return "IncompleteRead(%i bytes read, %i more expected)" % (
+            self.partial,
+            self.expected,
+        )
+
+
+class InvalidChunkLength(HTTPError, httplib_IncompleteRead):
+    """Invalid chunk length in a chunked response."""
+
+    def __init__(self, response: HTTPResponse, length: bytes) -> None:
+        self.partial: int = response.tell()  # type: ignore[assignment]
+        self.expected: int | None = response.length_remaining
+        self.response = response
+        self.length = length
+
+    def __repr__(self) -> str:
+        return "InvalidChunkLength(got length %r, %i bytes read)" % (
+            self.length,
+            self.partial,
+        )
+
+
+class InvalidHeader(HTTPError):
+    """The header provided was somehow invalid."""
+
+
+class ProxySchemeUnknown(AssertionError, URLSchemeUnknown):
+    """ProxyManager does not support the supplied scheme"""
+
+    # TODO(t-8ch): Stop inheriting from AssertionError in v2.0.
+
+    def __init__(self, scheme: str | None) -> None:
+        # 'localhost' is here because our URL parser parses
+        # localhost:8080 -> scheme=localhost, remove if we fix this.
+        if scheme == "localhost":
+            scheme = None
+        if scheme is None:
+            message = "Proxy URL had no scheme, should start with http:// or https://"
+        else:
+            message = f"Proxy URL had unsupported scheme {scheme}, should use http:// or https://"
+        super().__init__(message)
+
+
+class ProxySchemeUnsupported(ValueError):
+    """Fetching HTTPS resources through HTTPS proxies is unsupported"""
+
+
+class HeaderParsingError(HTTPError):
+    """Raised by assert_header_parsing, but we convert it to a log.warning statement."""
+
+    def __init__(
+        self, defects: list[MessageDefect], unparsed_data: bytes | str | None
+    ) -> None:
+        message = f"{defects or 'Unknown'}, unparsed data: {unparsed_data!r}"
+        super().__init__(message)
+
+
+class UnrewindableBodyError(HTTPError):
+    """urllib3 encountered an error when trying to rewind a body"""
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/fields.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/fields.py
new file mode 100644
index 000000000..97c4730cf
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/fields.py
@@ -0,0 +1,341 @@
+from __future__ import annotations
+
+import email.utils
+import mimetypes
+import typing
+
+_TYPE_FIELD_VALUE = typing.Union[str, bytes]
+_TYPE_FIELD_VALUE_TUPLE = typing.Union[
+    _TYPE_FIELD_VALUE,
+    tuple[str, _TYPE_FIELD_VALUE],
+    tuple[str, _TYPE_FIELD_VALUE, str],
+]
+
+
+def guess_content_type(
+    filename: str | None, default: str = "application/octet-stream"
+) -> str:
+    """
+    Guess the "Content-Type" of a file.
+
+    :param filename:
+        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
+    :param default:
+        If no "Content-Type" can be guessed, default to `default`.
+    """
+    if filename:
+        return mimetypes.guess_type(filename)[0] or default
+    return default
+
+
+def format_header_param_rfc2231(name: str, value: _TYPE_FIELD_VALUE) -> str:
+    """
+    Helper function to format and quote a single header parameter using the
+    strategy defined in RFC 2231.
+
+    Particularly useful for header parameters which might contain
+    non-ASCII values, like file names. This follows
+    `RFC 2388 Section 4.4 `_.
+
+    :param name:
+        The name of the parameter, a string expected to be ASCII only.
+    :param value:
+        The value of the parameter, provided as ``bytes`` or `str``.
+    :returns:
+        An RFC-2231-formatted unicode string.
+
+    .. deprecated:: 2.0.0
+        Will be removed in urllib3 v2.1.0. This is not valid for
+        ``multipart/form-data`` header parameters.
+    """
+    import warnings
+
+    warnings.warn(
+        "'format_header_param_rfc2231' is deprecated and will be "
+        "removed in urllib3 v2.1.0. This is not valid for "
+        "multipart/form-data header parameters.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+
+    if isinstance(value, bytes):
+        value = value.decode("utf-8")
+
+    if not any(ch in value for ch in '"\\\r\n'):
+        result = f'{name}="{value}"'
+        try:
+            result.encode("ascii")
+        except (UnicodeEncodeError, UnicodeDecodeError):
+            pass
+        else:
+            return result
+
+    value = email.utils.encode_rfc2231(value, "utf-8")
+    value = f"{name}*={value}"
+
+    return value
+
+
+def format_multipart_header_param(name: str, value: _TYPE_FIELD_VALUE) -> str:
+    """
+    Format and quote a single multipart header parameter.
+
+    This follows the `WHATWG HTML Standard`_ as of 2021/06/10, matching
+    the behavior of current browser and curl versions. Values are
+    assumed to be UTF-8. The ``\\n``, ``\\r``, and ``"`` characters are
+    percent encoded.
+
+    .. _WHATWG HTML Standard:
+        https://html.spec.whatwg.org/multipage/
+        form-control-infrastructure.html#multipart-form-data
+
+    :param name:
+        The name of the parameter, an ASCII-only ``str``.
+    :param value:
+        The value of the parameter, a ``str`` or UTF-8 encoded
+        ``bytes``.
+    :returns:
+        A string ``name="value"`` with the escaped value.
+
+    .. versionchanged:: 2.0.0
+        Matches the WHATWG HTML Standard as of 2021/06/10. Control
+        characters are no longer percent encoded.
+
+    .. versionchanged:: 2.0.0
+        Renamed from ``format_header_param_html5`` and
+        ``format_header_param``. The old names will be removed in
+        urllib3 v2.1.0.
+    """
+    if isinstance(value, bytes):
+        value = value.decode("utf-8")
+
+    # percent encode \n \r "
+    value = value.translate({10: "%0A", 13: "%0D", 34: "%22"})
+    return f'{name}="{value}"'
+
+
+def format_header_param_html5(name: str, value: _TYPE_FIELD_VALUE) -> str:
+    """
+    .. deprecated:: 2.0.0
+        Renamed to :func:`format_multipart_header_param`. Will be
+        removed in urllib3 v2.1.0.
+    """
+    import warnings
+
+    warnings.warn(
+        "'format_header_param_html5' has been renamed to "
+        "'format_multipart_header_param'. The old name will be "
+        "removed in urllib3 v2.1.0.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    return format_multipart_header_param(name, value)
+
+
+def format_header_param(name: str, value: _TYPE_FIELD_VALUE) -> str:
+    """
+    .. deprecated:: 2.0.0
+        Renamed to :func:`format_multipart_header_param`. Will be
+        removed in urllib3 v2.1.0.
+    """
+    import warnings
+
+    warnings.warn(
+        "'format_header_param' has been renamed to "
+        "'format_multipart_header_param'. The old name will be "
+        "removed in urllib3 v2.1.0.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    return format_multipart_header_param(name, value)
+
+
+class RequestField:
+    """
+    A data container for request body parameters.
+
+    :param name:
+        The name of this request field. Must be unicode.
+    :param data:
+        The data/value body.
+    :param filename:
+        An optional filename of the request field. Must be unicode.
+    :param headers:
+        An optional dict-like object of headers to initially use for the field.
+
+    .. versionchanged:: 2.0.0
+        The ``header_formatter`` parameter is deprecated and will
+        be removed in urllib3 v2.1.0.
+    """
+
+    def __init__(
+        self,
+        name: str,
+        data: _TYPE_FIELD_VALUE,
+        filename: str | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        header_formatter: typing.Callable[[str, _TYPE_FIELD_VALUE], str] | None = None,
+    ):
+        self._name = name
+        self._filename = filename
+        self.data = data
+        self.headers: dict[str, str | None] = {}
+        if headers:
+            self.headers = dict(headers)
+
+        if header_formatter is not None:
+            import warnings
+
+            warnings.warn(
+                "The 'header_formatter' parameter is deprecated and "
+                "will be removed in urllib3 v2.1.0.",
+                DeprecationWarning,
+                stacklevel=2,
+            )
+            self.header_formatter = header_formatter
+        else:
+            self.header_formatter = format_multipart_header_param
+
+    @classmethod
+    def from_tuples(
+        cls,
+        fieldname: str,
+        value: _TYPE_FIELD_VALUE_TUPLE,
+        header_formatter: typing.Callable[[str, _TYPE_FIELD_VALUE], str] | None = None,
+    ) -> RequestField:
+        """
+        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.
+
+        Supports constructing :class:`~urllib3.fields.RequestField` from
+        parameter of key/value strings AND key/filetuple. A filetuple is a
+        (filename, data, MIME type) tuple where the MIME type is optional.
+        For example::
+
+            'foo': 'bar',
+            'fakefile': ('foofile.txt', 'contents of foofile'),
+            'realfile': ('barfile.txt', open('realfile').read()),
+            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
+            'nonamefile': 'contents of nonamefile field',
+
+        Field names and filenames must be unicode.
+        """
+        filename: str | None
+        content_type: str | None
+        data: _TYPE_FIELD_VALUE
+
+        if isinstance(value, tuple):
+            if len(value) == 3:
+                filename, data, content_type = value
+            else:
+                filename, data = value
+                content_type = guess_content_type(filename)
+        else:
+            filename = None
+            content_type = None
+            data = value
+
+        request_param = cls(
+            fieldname, data, filename=filename, header_formatter=header_formatter
+        )
+        request_param.make_multipart(content_type=content_type)
+
+        return request_param
+
+    def _render_part(self, name: str, value: _TYPE_FIELD_VALUE) -> str:
+        """
+        Override this method to change how each multipart header
+        parameter is formatted. By default, this calls
+        :func:`format_multipart_header_param`.
+
+        :param name:
+            The name of the parameter, an ASCII-only ``str``.
+        :param value:
+            The value of the parameter, a ``str`` or UTF-8 encoded
+            ``bytes``.
+
+        :meta public:
+        """
+        return self.header_formatter(name, value)
+
+    def _render_parts(
+        self,
+        header_parts: (
+            dict[str, _TYPE_FIELD_VALUE | None]
+            | typing.Sequence[tuple[str, _TYPE_FIELD_VALUE | None]]
+        ),
+    ) -> str:
+        """
+        Helper function to format and quote a single header.
+
+        Useful for single headers that are composed of multiple items. E.g.,
+        'Content-Disposition' fields.
+
+        :param header_parts:
+            A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
+            as `k1="v1"; k2="v2"; ...`.
+        """
+        iterable: typing.Iterable[tuple[str, _TYPE_FIELD_VALUE | None]]
+
+        parts = []
+        if isinstance(header_parts, dict):
+            iterable = header_parts.items()
+        else:
+            iterable = header_parts
+
+        for name, value in iterable:
+            if value is not None:
+                parts.append(self._render_part(name, value))
+
+        return "; ".join(parts)
+
+    def render_headers(self) -> str:
+        """
+        Renders the headers for this request field.
+        """
+        lines = []
+
+        sort_keys = ["Content-Disposition", "Content-Type", "Content-Location"]
+        for sort_key in sort_keys:
+            if self.headers.get(sort_key, False):
+                lines.append(f"{sort_key}: {self.headers[sort_key]}")
+
+        for header_name, header_value in self.headers.items():
+            if header_name not in sort_keys:
+                if header_value:
+                    lines.append(f"{header_name}: {header_value}")
+
+        lines.append("\r\n")
+        return "\r\n".join(lines)
+
+    def make_multipart(
+        self,
+        content_disposition: str | None = None,
+        content_type: str | None = None,
+        content_location: str | None = None,
+    ) -> None:
+        """
+        Makes this request field into a multipart request field.
+
+        This method overrides "Content-Disposition", "Content-Type" and
+        "Content-Location" headers to the request parameter.
+
+        :param content_disposition:
+            The 'Content-Disposition' of the request body. Defaults to 'form-data'
+        :param content_type:
+            The 'Content-Type' of the request body.
+        :param content_location:
+            The 'Content-Location' of the request body.
+
+        """
+        content_disposition = (content_disposition or "form-data") + "; ".join(
+            [
+                "",
+                self._render_parts(
+                    (("name", self._name), ("filename", self._filename))
+                ),
+            ]
+        )
+
+        self.headers["Content-Disposition"] = content_disposition
+        self.headers["Content-Type"] = content_type
+        self.headers["Content-Location"] = content_location
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/filepost.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/filepost.py
new file mode 100644
index 000000000..14f70b05b
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/filepost.py
@@ -0,0 +1,89 @@
+from __future__ import annotations
+
+import binascii
+import codecs
+import os
+import typing
+from io import BytesIO
+
+from .fields import _TYPE_FIELD_VALUE_TUPLE, RequestField
+
+writer = codecs.lookup("utf-8")[3]
+
+_TYPE_FIELDS_SEQUENCE = typing.Sequence[
+    typing.Union[tuple[str, _TYPE_FIELD_VALUE_TUPLE], RequestField]
+]
+_TYPE_FIELDS = typing.Union[
+    _TYPE_FIELDS_SEQUENCE,
+    typing.Mapping[str, _TYPE_FIELD_VALUE_TUPLE],
+]
+
+
+def choose_boundary() -> str:
+    """
+    Our embarrassingly-simple replacement for mimetools.choose_boundary.
+    """
+    return binascii.hexlify(os.urandom(16)).decode()
+
+
+def iter_field_objects(fields: _TYPE_FIELDS) -> typing.Iterable[RequestField]:
+    """
+    Iterate over fields.
+
+    Supports list of (k, v) tuples and dicts, and lists of
+    :class:`~urllib3.fields.RequestField`.
+
+    """
+    iterable: typing.Iterable[RequestField | tuple[str, _TYPE_FIELD_VALUE_TUPLE]]
+
+    if isinstance(fields, typing.Mapping):
+        iterable = fields.items()
+    else:
+        iterable = fields
+
+    for field in iterable:
+        if isinstance(field, RequestField):
+            yield field
+        else:
+            yield RequestField.from_tuples(*field)
+
+
+def encode_multipart_formdata(
+    fields: _TYPE_FIELDS, boundary: str | None = None
+) -> tuple[bytes, str]:
+    """
+    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.
+
+    :param fields:
+        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).
+        Values are processed by :func:`urllib3.fields.RequestField.from_tuples`.
+
+    :param boundary:
+        If not specified, then a random boundary will be generated using
+        :func:`urllib3.filepost.choose_boundary`.
+    """
+    body = BytesIO()
+    if boundary is None:
+        boundary = choose_boundary()
+
+    for field in iter_field_objects(fields):
+        body.write(f"--{boundary}\r\n".encode("latin-1"))
+
+        writer(body).write(field.render_headers())
+        data = field.data
+
+        if isinstance(data, int):
+            data = str(data)  # Backwards compatibility
+
+        if isinstance(data, str):
+            writer(body).write(data)
+        else:
+            body.write(data)
+
+        body.write(b"\r\n")
+
+    body.write(f"--{boundary}--\r\n".encode("latin-1"))
+
+    content_type = f"multipart/form-data; boundary={boundary}"
+
+    return body.getvalue(), content_type
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__init__.py
new file mode 100644
index 000000000..133e1d8f2
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__init__.py
@@ -0,0 +1,53 @@
+from __future__ import annotations
+
+from importlib.metadata import version
+
+__all__ = [
+    "inject_into_urllib3",
+    "extract_from_urllib3",
+]
+
+import typing
+
+orig_HTTPSConnection: typing.Any = None
+
+
+def inject_into_urllib3() -> None:
+    # First check if h2 version is valid
+    h2_version = version("h2")
+    if not h2_version.startswith("4."):
+        raise ImportError(
+            "urllib3 v2 supports h2 version 4.x.x, currently "
+            f"the 'h2' module is compiled with {h2_version!r}. "
+            "See: https://github.com/urllib3/urllib3/issues/3290"
+        )
+
+    # Import here to avoid circular dependencies.
+    from .. import connection as urllib3_connection
+    from .. import util as urllib3_util
+    from ..connectionpool import HTTPSConnectionPool
+    from ..util import ssl_ as urllib3_util_ssl
+    from .connection import HTTP2Connection
+
+    global orig_HTTPSConnection
+    orig_HTTPSConnection = urllib3_connection.HTTPSConnection
+
+    HTTPSConnectionPool.ConnectionCls = HTTP2Connection
+    urllib3_connection.HTTPSConnection = HTTP2Connection  # type: ignore[misc]
+
+    # TODO: Offer 'http/1.1' as well, but for testing purposes this is handy.
+    urllib3_util.ALPN_PROTOCOLS = ["h2"]
+    urllib3_util_ssl.ALPN_PROTOCOLS = ["h2"]
+
+
+def extract_from_urllib3() -> None:
+    from .. import connection as urllib3_connection
+    from .. import util as urllib3_util
+    from ..connectionpool import HTTPSConnectionPool
+    from ..util import ssl_ as urllib3_util_ssl
+
+    HTTPSConnectionPool.ConnectionCls = orig_HTTPSConnection
+    urllib3_connection.HTTPSConnection = orig_HTTPSConnection  # type: ignore[misc]
+
+    urllib3_util.ALPN_PROTOCOLS = ["http/1.1"]
+    urllib3_util_ssl.ALPN_PROTOCOLS = ["http/1.1"]
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..c4e173aa4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/connection.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/connection.cpython-314.pyc
new file mode 100644
index 000000000..ed273a7ee
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/connection.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/probe.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/probe.cpython-314.pyc
new file mode 100644
index 000000000..716293c63
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/__pycache__/probe.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/connection.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/connection.py
new file mode 100644
index 000000000..0a026da0a
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/connection.py
@@ -0,0 +1,356 @@
+from __future__ import annotations
+
+import logging
+import re
+import threading
+import types
+import typing
+
+import h2.config
+import h2.connection
+import h2.events
+
+from .._base_connection import _TYPE_BODY
+from .._collections import HTTPHeaderDict
+from ..connection import HTTPSConnection, _get_default_user_agent
+from ..exceptions import ConnectionError
+from ..response import BaseHTTPResponse
+
+orig_HTTPSConnection = HTTPSConnection
+
+T = typing.TypeVar("T")
+
+log = logging.getLogger(__name__)
+
+RE_IS_LEGAL_HEADER_NAME = re.compile(rb"^[!#$%&'*+\-.^_`|~0-9a-z]+$")
+RE_IS_ILLEGAL_HEADER_VALUE = re.compile(rb"[\0\x00\x0a\x0d\r\n]|^[ \r\n\t]|[ \r\n\t]$")
+
+
+def _is_legal_header_name(name: bytes) -> bool:
+    """
+    "An implementation that validates fields according to the definitions in Sections
+    5.1 and 5.5 of [HTTP] only needs an additional check that field names do not
+    include uppercase characters." (https://httpwg.org/specs/rfc9113.html#n-field-validity)
+
+    `http.client._is_legal_header_name` does not validate the field name according to the
+    HTTP 1.1 spec, so we do that here, in addition to checking for uppercase characters.
+
+    This does not allow for the `:` character in the header name, so should not
+    be used to validate pseudo-headers.
+    """
+    return bool(RE_IS_LEGAL_HEADER_NAME.match(name))
+
+
+def _is_illegal_header_value(value: bytes) -> bool:
+    """
+    "A field value MUST NOT contain the zero value (ASCII NUL, 0x00), line feed
+    (ASCII LF, 0x0a), or carriage return (ASCII CR, 0x0d) at any position. A field
+    value MUST NOT start or end with an ASCII whitespace character (ASCII SP or HTAB,
+    0x20 or 0x09)." (https://httpwg.org/specs/rfc9113.html#n-field-validity)
+    """
+    return bool(RE_IS_ILLEGAL_HEADER_VALUE.search(value))
+
+
+class _LockedObject(typing.Generic[T]):
+    """
+    A wrapper class that hides a specific object behind a lock.
+    The goal here is to provide a simple way to protect access to an object
+    that cannot safely be simultaneously accessed from multiple threads. The
+    intended use of this class is simple: take hold of it with a context
+    manager, which returns the protected object.
+    """
+
+    __slots__ = (
+        "lock",
+        "_obj",
+    )
+
+    def __init__(self, obj: T):
+        self.lock = threading.RLock()
+        self._obj = obj
+
+    def __enter__(self) -> T:
+        self.lock.acquire()
+        return self._obj
+
+    def __exit__(
+        self,
+        exc_type: type[BaseException] | None,
+        exc_val: BaseException | None,
+        exc_tb: types.TracebackType | None,
+    ) -> None:
+        self.lock.release()
+
+
+class HTTP2Connection(HTTPSConnection):
+    def __init__(
+        self, host: str, port: int | None = None, **kwargs: typing.Any
+    ) -> None:
+        self._h2_conn = self._new_h2_conn()
+        self._h2_stream: int | None = None
+        self._headers: list[tuple[bytes, bytes]] = []
+
+        if "proxy" in kwargs or "proxy_config" in kwargs:  # Defensive:
+            raise NotImplementedError("Proxies aren't supported with HTTP/2")
+
+        super().__init__(host, port, **kwargs)
+
+        if self._tunnel_host is not None:
+            raise NotImplementedError("Tunneling isn't supported with HTTP/2")
+
+    def _new_h2_conn(self) -> _LockedObject[h2.connection.H2Connection]:
+        config = h2.config.H2Configuration(client_side=True)
+        return _LockedObject(h2.connection.H2Connection(config=config))
+
+    def connect(self) -> None:
+        super().connect()
+        with self._h2_conn as conn:
+            conn.initiate_connection()
+            if data_to_send := conn.data_to_send():
+                self.sock.sendall(data_to_send)
+
+    def putrequest(  # type: ignore[override]
+        self,
+        method: str,
+        url: str,
+        **kwargs: typing.Any,
+    ) -> None:
+        """putrequest
+        This deviates from the HTTPConnection method signature since we never need to override
+        sending accept-encoding headers or the host header.
+        """
+        if "skip_host" in kwargs:
+            raise NotImplementedError("`skip_host` isn't supported")
+        if "skip_accept_encoding" in kwargs:
+            raise NotImplementedError("`skip_accept_encoding` isn't supported")
+
+        self._request_url = url or "/"
+        self._validate_path(url)  # type: ignore[attr-defined]
+
+        if ":" in self.host:
+            authority = f"[{self.host}]:{self.port or 443}"
+        else:
+            authority = f"{self.host}:{self.port or 443}"
+
+        self._headers.append((b":scheme", b"https"))
+        self._headers.append((b":method", method.encode()))
+        self._headers.append((b":authority", authority.encode()))
+        self._headers.append((b":path", url.encode()))
+
+        with self._h2_conn as conn:
+            self._h2_stream = conn.get_next_available_stream_id()
+
+    def putheader(self, header: str | bytes, *values: str | bytes) -> None:  # type: ignore[override]
+        # TODO SKIPPABLE_HEADERS from urllib3 are ignored.
+        header = header.encode() if isinstance(header, str) else header
+        header = header.lower()  # A lot of upstream code uses capitalized headers.
+        if not _is_legal_header_name(header):
+            raise ValueError(f"Illegal header name {str(header)}")
+
+        for value in values:
+            value = value.encode() if isinstance(value, str) else value
+            if _is_illegal_header_value(value):
+                raise ValueError(f"Illegal header value {str(value)}")
+            self._headers.append((header, value))
+
+    def endheaders(self, message_body: typing.Any = None) -> None:  # type: ignore[override]
+        if self._h2_stream is None:
+            raise ConnectionError("Must call `putrequest` first.")
+
+        with self._h2_conn as conn:
+            conn.send_headers(
+                stream_id=self._h2_stream,
+                headers=self._headers,
+                end_stream=(message_body is None),
+            )
+            if data_to_send := conn.data_to_send():
+                self.sock.sendall(data_to_send)
+        self._headers = []  # Reset headers for the next request.
+
+    def send(self, data: typing.Any) -> None:
+        """Send data to the server.
+        `data` can be: `str`, `bytes`, an iterable, or file-like objects
+        that support a .read() method.
+        """
+        if self._h2_stream is None:
+            raise ConnectionError("Must call `putrequest` first.")
+
+        with self._h2_conn as conn:
+            if data_to_send := conn.data_to_send():
+                self.sock.sendall(data_to_send)
+
+            if hasattr(data, "read"):  # file-like objects
+                while True:
+                    chunk = data.read(self.blocksize)
+                    if not chunk:
+                        break
+                    if isinstance(chunk, str):
+                        chunk = chunk.encode()
+                    conn.send_data(self._h2_stream, chunk, end_stream=False)
+                    if data_to_send := conn.data_to_send():
+                        self.sock.sendall(data_to_send)
+                conn.end_stream(self._h2_stream)
+                return
+
+            if isinstance(data, str):  # str -> bytes
+                data = data.encode()
+
+            try:
+                if isinstance(data, bytes):
+                    conn.send_data(self._h2_stream, data, end_stream=True)
+                    if data_to_send := conn.data_to_send():
+                        self.sock.sendall(data_to_send)
+                else:
+                    for chunk in data:
+                        conn.send_data(self._h2_stream, chunk, end_stream=False)
+                        if data_to_send := conn.data_to_send():
+                            self.sock.sendall(data_to_send)
+                    conn.end_stream(self._h2_stream)
+            except TypeError:
+                raise TypeError(
+                    "`data` should be str, bytes, iterable, or file. got %r"
+                    % type(data)
+                )
+
+    def set_tunnel(
+        self,
+        host: str,
+        port: int | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        scheme: str = "http",
+    ) -> None:
+        raise NotImplementedError(
+            "HTTP/2 does not support setting up a tunnel through a proxy"
+        )
+
+    def getresponse(  # type: ignore[override]
+        self,
+    ) -> HTTP2Response:
+        status = None
+        data = bytearray()
+        with self._h2_conn as conn:
+            end_stream = False
+            while not end_stream:
+                # TODO: Arbitrary read value.
+                if received_data := self.sock.recv(65535):
+                    events = conn.receive_data(received_data)
+                    for event in events:
+                        if isinstance(event, h2.events.ResponseReceived):
+                            headers = HTTPHeaderDict()
+                            for header, value in event.headers:
+                                if header == b":status":
+                                    status = int(value.decode())
+                                else:
+                                    headers.add(
+                                        header.decode("ascii"), value.decode("ascii")
+                                    )
+
+                        elif isinstance(event, h2.events.DataReceived):
+                            data += event.data
+                            conn.acknowledge_received_data(
+                                event.flow_controlled_length, event.stream_id
+                            )
+
+                        elif isinstance(event, h2.events.StreamEnded):
+                            end_stream = True
+
+                if data_to_send := conn.data_to_send():
+                    self.sock.sendall(data_to_send)
+
+        assert status is not None
+        return HTTP2Response(
+            status=status,
+            headers=headers,
+            request_url=self._request_url,
+            data=bytes(data),
+        )
+
+    def request(  # type: ignore[override]
+        self,
+        method: str,
+        url: str,
+        body: _TYPE_BODY | None = None,
+        headers: typing.Mapping[str, str] | None = None,
+        *,
+        preload_content: bool = True,
+        decode_content: bool = True,
+        enforce_content_length: bool = True,
+        **kwargs: typing.Any,
+    ) -> None:
+        """Send an HTTP/2 request"""
+        if "chunked" in kwargs:
+            # TODO this is often present from upstream.
+            # raise NotImplementedError("`chunked` isn't supported with HTTP/2")
+            pass
+
+        if self.sock is not None:
+            self.sock.settimeout(self.timeout)
+
+        self.putrequest(method, url)
+
+        headers = headers or {}
+        for k, v in headers.items():
+            if k.lower() == "transfer-encoding" and v == "chunked":
+                continue
+            else:
+                self.putheader(k, v)
+
+        if b"user-agent" not in dict(self._headers):
+            self.putheader(b"user-agent", _get_default_user_agent())
+
+        if body:
+            self.endheaders(message_body=body)
+            self.send(body)
+        else:
+            self.endheaders()
+
+    def close(self) -> None:
+        with self._h2_conn as conn:
+            try:
+                conn.close_connection()
+                if data := conn.data_to_send():
+                    self.sock.sendall(data)
+            except Exception:
+                pass
+
+        # Reset all our HTTP/2 connection state.
+        self._h2_conn = self._new_h2_conn()
+        self._h2_stream = None
+        self._headers = []
+
+        super().close()
+
+
+class HTTP2Response(BaseHTTPResponse):
+    # TODO: This is a woefully incomplete response object, but works for non-streaming.
+    def __init__(
+        self,
+        status: int,
+        headers: HTTPHeaderDict,
+        request_url: str,
+        data: bytes,
+        decode_content: bool = False,  # TODO: support decoding
+    ) -> None:
+        super().__init__(
+            status=status,
+            headers=headers,
+            # Following CPython, we map HTTP versions to major * 10 + minor integers
+            version=20,
+            version_string="HTTP/2",
+            # No reason phrase in HTTP/2
+            reason=None,
+            decode_content=decode_content,
+            request_url=request_url,
+        )
+        self._data = data
+        self.length_remaining = 0
+
+    @property
+    def data(self) -> bytes:
+        return self._data
+
+    def get_redirect_location(self) -> None:
+        return None
+
+    def close(self) -> None:
+        pass
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/probe.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/probe.py
new file mode 100644
index 000000000..9ea900764
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/http2/probe.py
@@ -0,0 +1,87 @@
+from __future__ import annotations
+
+import threading
+
+
+class _HTTP2ProbeCache:
+    __slots__ = (
+        "_lock",
+        "_cache_locks",
+        "_cache_values",
+    )
+
+    def __init__(self) -> None:
+        self._lock = threading.Lock()
+        self._cache_locks: dict[tuple[str, int], threading.RLock] = {}
+        self._cache_values: dict[tuple[str, int], bool | None] = {}
+
+    def acquire_and_get(self, host: str, port: int) -> bool | None:
+        # By the end of this block we know that
+        # _cache_[values,locks] is available.
+        value = None
+        with self._lock:
+            key = (host, port)
+            try:
+                value = self._cache_values[key]
+                # If it's a known value we return right away.
+                if value is not None:
+                    return value
+            except KeyError:
+                self._cache_locks[key] = threading.RLock()
+                self._cache_values[key] = None
+
+        # If the value is unknown, we acquire the lock to signal
+        # to the requesting thread that the probe is in progress
+        # or that the current thread needs to return their findings.
+        key_lock = self._cache_locks[key]
+        key_lock.acquire()
+        try:
+            # If the by the time we get the lock the value has been
+            # updated we want to return the updated value.
+            value = self._cache_values[key]
+
+        # In case an exception like KeyboardInterrupt is raised here.
+        except BaseException as e:  # Defensive:
+            assert not isinstance(e, KeyError)  # KeyError shouldn't be possible.
+            key_lock.release()
+            raise
+
+        return value
+
+    def set_and_release(
+        self, host: str, port: int, supports_http2: bool | None
+    ) -> None:
+        key = (host, port)
+        key_lock = self._cache_locks[key]
+        with key_lock:  # Uses an RLock, so can be locked again from same thread.
+            if supports_http2 is None and self._cache_values[key] is not None:
+                raise ValueError(
+                    "Cannot reset HTTP/2 support for origin after value has been set."
+                )  # Defensive: not expected in normal usage
+
+        self._cache_values[key] = supports_http2
+        key_lock.release()
+
+    def _values(self) -> dict[tuple[str, int], bool | None]:
+        """This function is for testing purposes only. Gets the current state of the probe cache"""
+        with self._lock:
+            return {k: v for k, v in self._cache_values.items()}
+
+    def _reset(self) -> None:
+        """This function is for testing purposes only. Reset the cache values"""
+        with self._lock:
+            self._cache_locks = {}
+            self._cache_values = {}
+
+
+_HTTP2_PROBE_CACHE = _HTTP2ProbeCache()
+
+set_and_release = _HTTP2_PROBE_CACHE.set_and_release
+acquire_and_get = _HTTP2_PROBE_CACHE.acquire_and_get
+_values = _HTTP2_PROBE_CACHE._values
+_reset = _HTTP2_PROBE_CACHE._reset
+
+__all__ = [
+    "set_and_release",
+    "acquire_and_get",
+]
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py
new file mode 100644
index 000000000..00f9fdced
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py
@@ -0,0 +1,651 @@
+from __future__ import annotations
+
+import functools
+import logging
+import typing
+import warnings
+from types import TracebackType
+from urllib.parse import urljoin
+
+from ._collections import HTTPHeaderDict, RecentlyUsedContainer
+from ._request_methods import RequestMethods
+from .connection import ProxyConfig
+from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, port_by_scheme
+from .exceptions import (
+    LocationValueError,
+    MaxRetryError,
+    ProxySchemeUnknown,
+    URLSchemeUnknown,
+)
+from .response import BaseHTTPResponse
+from .util.connection import _TYPE_SOCKET_OPTIONS
+from .util.proxy import connection_requires_http_tunnel
+from .util.retry import Retry
+from .util.timeout import Timeout
+from .util.url import Url, parse_url
+
+if typing.TYPE_CHECKING:
+    import ssl
+
+    from typing_extensions import Self
+
+__all__ = ["PoolManager", "ProxyManager", "proxy_from_url"]
+
+
+log = logging.getLogger(__name__)
+
+SSL_KEYWORDS = (
+    "key_file",
+    "cert_file",
+    "cert_reqs",
+    "ca_certs",
+    "ca_cert_data",
+    "ssl_version",
+    "ssl_minimum_version",
+    "ssl_maximum_version",
+    "ca_cert_dir",
+    "ssl_context",
+    "key_password",
+    "server_hostname",
+)
+# Default value for `blocksize` - a new parameter introduced to
+# http.client.HTTPConnection & http.client.HTTPSConnection in Python 3.7
+_DEFAULT_BLOCKSIZE = 16384
+
+
+class PoolKey(typing.NamedTuple):
+    """
+    All known keyword arguments that could be provided to the pool manager, its
+    pools, or the underlying connections.
+
+    All custom key schemes should include the fields in this key at a minimum.
+    """
+
+    key_scheme: str
+    key_host: str
+    key_port: int | None
+    key_timeout: Timeout | float | int | None
+    key_retries: Retry | bool | int | None
+    key_block: bool | None
+    key_source_address: tuple[str, int] | None
+    key_key_file: str | None
+    key_key_password: str | None
+    key_cert_file: str | None
+    key_cert_reqs: str | None
+    key_ca_certs: str | None
+    key_ca_cert_data: str | bytes | None
+    key_ssl_version: int | str | None
+    key_ssl_minimum_version: ssl.TLSVersion | None
+    key_ssl_maximum_version: ssl.TLSVersion | None
+    key_ca_cert_dir: str | None
+    key_ssl_context: ssl.SSLContext | None
+    key_maxsize: int | None
+    key_headers: frozenset[tuple[str, str]] | None
+    key__proxy: Url | None
+    key__proxy_headers: frozenset[tuple[str, str]] | None
+    key__proxy_config: ProxyConfig | None
+    key_socket_options: _TYPE_SOCKET_OPTIONS | None
+    key__socks_options: frozenset[tuple[str, str]] | None
+    key_assert_hostname: bool | str | None
+    key_assert_fingerprint: str | None
+    key_server_hostname: str | None
+    key_blocksize: int | None
+
+
+def _default_key_normalizer(
+    key_class: type[PoolKey], request_context: dict[str, typing.Any]
+) -> PoolKey:
+    """
+    Create a pool key out of a request context dictionary.
+
+    According to RFC 3986, both the scheme and host are case-insensitive.
+    Therefore, this function normalizes both before constructing the pool
+    key for an HTTPS request. If you wish to change this behaviour, provide
+    alternate callables to ``key_fn_by_scheme``.
+
+    :param key_class:
+        The class to use when constructing the key. This should be a namedtuple
+        with the ``scheme`` and ``host`` keys at a minimum.
+    :type  key_class: namedtuple
+    :param request_context:
+        A dictionary-like object that contain the context for a request.
+    :type  request_context: dict
+
+    :return: A namedtuple that can be used as a connection pool key.
+    :rtype:  PoolKey
+    """
+    # Since we mutate the dictionary, make a copy first
+    context = request_context.copy()
+    context["scheme"] = context["scheme"].lower()
+    context["host"] = context["host"].lower()
+
+    # These are both dictionaries and need to be transformed into frozensets
+    for key in ("headers", "_proxy_headers", "_socks_options"):
+        if key in context and context[key] is not None:
+            context[key] = frozenset(context[key].items())
+
+    # The socket_options key may be a list and needs to be transformed into a
+    # tuple.
+    socket_opts = context.get("socket_options")
+    if socket_opts is not None:
+        context["socket_options"] = tuple(socket_opts)
+
+    # Map the kwargs to the names in the namedtuple - this is necessary since
+    # namedtuples can't have fields starting with '_'.
+    for key in list(context.keys()):
+        context["key_" + key] = context.pop(key)
+
+    # Default to ``None`` for keys missing from the context
+    for field in key_class._fields:
+        if field not in context:
+            context[field] = None
+
+    # Default key_blocksize to _DEFAULT_BLOCKSIZE if missing from the context
+    if context.get("key_blocksize") is None:
+        context["key_blocksize"] = _DEFAULT_BLOCKSIZE
+
+    return key_class(**context)
+
+
+#: A dictionary that maps a scheme to a callable that creates a pool key.
+#: This can be used to alter the way pool keys are constructed, if desired.
+#: Each PoolManager makes a copy of this dictionary so they can be configured
+#: globally here, or individually on the instance.
+key_fn_by_scheme = {
+    "http": functools.partial(_default_key_normalizer, PoolKey),
+    "https": functools.partial(_default_key_normalizer, PoolKey),
+}
+
+pool_classes_by_scheme = {"http": HTTPConnectionPool, "https": HTTPSConnectionPool}
+
+
+class PoolManager(RequestMethods):
+    """
+    Allows for arbitrary requests while transparently keeping track of
+    necessary connection pools for you.
+
+    :param num_pools:
+        Number of connection pools to cache before discarding the least
+        recently used pool.
+
+    :param headers:
+        Headers to include with all requests, unless other headers are given
+        explicitly.
+
+    :param \\**connection_pool_kw:
+        Additional parameters are used to create fresh
+        :class:`urllib3.connectionpool.ConnectionPool` instances.
+
+    Example:
+
+    .. code-block:: python
+
+        from pip._vendor import urllib3
+
+        http = urllib3.PoolManager(num_pools=2)
+
+        resp1 = http.request("GET", "https://google.com/")
+        resp2 = http.request("GET", "https://google.com/mail")
+        resp3 = http.request("GET", "https://yahoo.com/")
+
+        print(len(http.pools))
+        # 2
+
+    """
+
+    proxy: Url | None = None
+    proxy_config: ProxyConfig | None = None
+
+    def __init__(
+        self,
+        num_pools: int = 10,
+        headers: typing.Mapping[str, str] | None = None,
+        **connection_pool_kw: typing.Any,
+    ) -> None:
+        super().__init__(headers)
+        # PoolManager handles redirects itself in PoolManager.urlopen().
+        # It always passes redirect=False to the underlying connection pool to
+        # suppress per-pool redirect handling. If the user supplied a non-Retry
+        # value (int/bool/etc) for retries and we let the pool normalize it
+        # while redirect=False, the resulting Retry object would have redirect
+        # handling disabled, which can interfere with PoolManager's own
+        # redirect logic. Normalize here so redirects remain governed solely by
+        # PoolManager logic.
+        if "retries" in connection_pool_kw:
+            retries = connection_pool_kw["retries"]
+            if not isinstance(retries, Retry):
+                retries = Retry.from_int(retries)
+                connection_pool_kw = connection_pool_kw.copy()
+                connection_pool_kw["retries"] = retries
+        self.connection_pool_kw = connection_pool_kw
+
+        self.pools: RecentlyUsedContainer[PoolKey, HTTPConnectionPool]
+        self.pools = RecentlyUsedContainer(num_pools)
+
+        # Locally set the pool classes and keys so other PoolManagers can
+        # override them.
+        self.pool_classes_by_scheme = pool_classes_by_scheme
+        self.key_fn_by_scheme = key_fn_by_scheme.copy()
+
+    def __enter__(self) -> Self:
+        return self
+
+    def __exit__(
+        self,
+        exc_type: type[BaseException] | None,
+        exc_val: BaseException | None,
+        exc_tb: TracebackType | None,
+    ) -> typing.Literal[False]:
+        self.clear()
+        # Return False to re-raise any potential exceptions
+        return False
+
+    def _new_pool(
+        self,
+        scheme: str,
+        host: str,
+        port: int,
+        request_context: dict[str, typing.Any] | None = None,
+    ) -> HTTPConnectionPool:
+        """
+        Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
+        any additional pool keyword arguments.
+
+        If ``request_context`` is provided, it is provided as keyword arguments
+        to the pool class used. This method is used to actually create the
+        connection pools handed out by :meth:`connection_from_url` and
+        companion methods. It is intended to be overridden for customization.
+        """
+        pool_cls: type[HTTPConnectionPool] = self.pool_classes_by_scheme[scheme]
+        if request_context is None:
+            request_context = self.connection_pool_kw.copy()
+
+        # Default blocksize to _DEFAULT_BLOCKSIZE if missing or explicitly
+        # set to 'None' in the request_context.
+        if request_context.get("blocksize") is None:
+            request_context["blocksize"] = _DEFAULT_BLOCKSIZE
+
+        # Although the context has everything necessary to create the pool,
+        # this function has historically only used the scheme, host, and port
+        # in the positional args. When an API change is acceptable these can
+        # be removed.
+        for key in ("scheme", "host", "port"):
+            request_context.pop(key, None)
+
+        if scheme == "http":
+            for kw in SSL_KEYWORDS:
+                request_context.pop(kw, None)
+
+        return pool_cls(host, port, **request_context)
+
+    def clear(self) -> None:
+        """
+        Empty our store of pools and direct them all to close.
+
+        This will not affect in-flight connections, but they will not be
+        re-used after completion.
+        """
+        self.pools.clear()
+
+    def connection_from_host(
+        self,
+        host: str | None,
+        port: int | None = None,
+        scheme: str | None = "http",
+        pool_kwargs: dict[str, typing.Any] | None = None,
+    ) -> HTTPConnectionPool:
+        """
+        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.
+
+        If ``port`` isn't given, it will be derived from the ``scheme`` using
+        ``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
+        provided, it is merged with the instance's ``connection_pool_kw``
+        variable and used to create the new connection pool, if one is
+        needed.
+        """
+
+        if not host:
+            raise LocationValueError("No host specified.")
+
+        request_context = self._merge_pool_kwargs(pool_kwargs)
+        request_context["scheme"] = scheme or "http"
+        if not port:
+            port = port_by_scheme.get(request_context["scheme"].lower(), 80)
+        request_context["port"] = port
+        request_context["host"] = host
+
+        return self.connection_from_context(request_context)
+
+    def connection_from_context(
+        self, request_context: dict[str, typing.Any]
+    ) -> HTTPConnectionPool:
+        """
+        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.
+
+        ``request_context`` must at least contain the ``scheme`` key and its
+        value must be a key in ``key_fn_by_scheme`` instance variable.
+        """
+        if "strict" in request_context:
+            warnings.warn(
+                "The 'strict' parameter is no longer needed on Python 3+. "
+                "This will raise an error in urllib3 v2.1.0.",
+                DeprecationWarning,
+            )
+            request_context.pop("strict")
+
+        scheme = request_context["scheme"].lower()
+        pool_key_constructor = self.key_fn_by_scheme.get(scheme)
+        if not pool_key_constructor:
+            raise URLSchemeUnknown(scheme)
+        pool_key = pool_key_constructor(request_context)
+
+        return self.connection_from_pool_key(pool_key, request_context=request_context)
+
+    def connection_from_pool_key(
+        self, pool_key: PoolKey, request_context: dict[str, typing.Any]
+    ) -> HTTPConnectionPool:
+        """
+        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.
+
+        ``pool_key`` should be a namedtuple that only contains immutable
+        objects. At a minimum it must have the ``scheme``, ``host``, and
+        ``port`` fields.
+        """
+        with self.pools.lock:
+            # If the scheme, host, or port doesn't match existing open
+            # connections, open a new ConnectionPool.
+            pool = self.pools.get(pool_key)
+            if pool:
+                return pool
+
+            # Make a fresh ConnectionPool of the desired type
+            scheme = request_context["scheme"]
+            host = request_context["host"]
+            port = request_context["port"]
+            pool = self._new_pool(scheme, host, port, request_context=request_context)
+            self.pools[pool_key] = pool
+
+        return pool
+
+    def connection_from_url(
+        self, url: str, pool_kwargs: dict[str, typing.Any] | None = None
+    ) -> HTTPConnectionPool:
+        """
+        Similar to :func:`urllib3.connectionpool.connection_from_url`.
+
+        If ``pool_kwargs`` is not provided and a new pool needs to be
+        constructed, ``self.connection_pool_kw`` is used to initialize
+        the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
+        is provided, it is used instead. Note that if a new pool does not
+        need to be created for the request, the provided ``pool_kwargs`` are
+        not used.
+        """
+        u = parse_url(url)
+        return self.connection_from_host(
+            u.host, port=u.port, scheme=u.scheme, pool_kwargs=pool_kwargs
+        )
+
+    def _merge_pool_kwargs(
+        self, override: dict[str, typing.Any] | None
+    ) -> dict[str, typing.Any]:
+        """
+        Merge a dictionary of override values for self.connection_pool_kw.
+
+        This does not modify self.connection_pool_kw and returns a new dict.
+        Any keys in the override dictionary with a value of ``None`` are
+        removed from the merged dictionary.
+        """
+        base_pool_kwargs = self.connection_pool_kw.copy()
+        if override:
+            for key, value in override.items():
+                if value is None:
+                    try:
+                        del base_pool_kwargs[key]
+                    except KeyError:
+                        pass
+                else:
+                    base_pool_kwargs[key] = value
+        return base_pool_kwargs
+
+    def _proxy_requires_url_absolute_form(self, parsed_url: Url) -> bool:
+        """
+        Indicates if the proxy requires the complete destination URL in the
+        request.  Normally this is only needed when not using an HTTP CONNECT
+        tunnel.
+        """
+        if self.proxy is None:
+            return False
+
+        return not connection_requires_http_tunnel(
+            self.proxy, self.proxy_config, parsed_url.scheme
+        )
+
+    def urlopen(  # type: ignore[override]
+        self, method: str, url: str, redirect: bool = True, **kw: typing.Any
+    ) -> BaseHTTPResponse:
+        """
+        Same as :meth:`urllib3.HTTPConnectionPool.urlopen`
+        with custom cross-host redirect logic and only sends the request-uri
+        portion of the ``url``.
+
+        The given ``url`` parameter must be absolute, such that an appropriate
+        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
+        """
+        u = parse_url(url)
+
+        if u.scheme is None:
+            warnings.warn(
+                "URLs without a scheme (ie 'https://') are deprecated and will raise an error "
+                "in a future version of urllib3. To avoid this DeprecationWarning ensure all URLs "
+                "start with 'https://' or 'http://'. Read more in this issue: "
+                "https://github.com/urllib3/urllib3/issues/2920",
+                category=DeprecationWarning,
+                stacklevel=2,
+            )
+
+        conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
+
+        kw["assert_same_host"] = False
+        kw["redirect"] = False
+
+        if "headers" not in kw:
+            kw["headers"] = self.headers
+
+        if self._proxy_requires_url_absolute_form(u):
+            response = conn.urlopen(method, url, **kw)
+        else:
+            response = conn.urlopen(method, u.request_uri, **kw)
+
+        redirect_location = redirect and response.get_redirect_location()
+        if not redirect_location:
+            return response
+
+        # Support relative URLs for redirecting.
+        redirect_location = urljoin(url, redirect_location)
+
+        if response.status == 303:
+            # Change the method according to RFC 9110, Section 15.4.4.
+            method = "GET"
+            # And lose the body not to transfer anything sensitive.
+            kw["body"] = None
+            kw["headers"] = HTTPHeaderDict(kw["headers"])._prepare_for_method_change()
+
+        retries = kw.get("retries", response.retries)
+        if not isinstance(retries, Retry):
+            retries = Retry.from_int(retries, redirect=redirect)
+
+        # Strip headers marked as unsafe to forward to the redirected location.
+        # Check remove_headers_on_redirect to avoid a potential network call within
+        # conn.is_same_host() which may use socket.gethostbyname() in the future.
+        if retries.remove_headers_on_redirect and not conn.is_same_host(
+            redirect_location
+        ):
+            new_headers = kw["headers"].copy()
+            for header in kw["headers"]:
+                if header.lower() in retries.remove_headers_on_redirect:
+                    new_headers.pop(header, None)
+            kw["headers"] = new_headers
+
+        try:
+            retries = retries.increment(method, url, response=response, _pool=conn)
+        except MaxRetryError:
+            if retries.raise_on_redirect:
+                response.drain_conn()
+                raise
+            return response
+
+        kw["retries"] = retries
+        kw["redirect"] = redirect
+
+        log.info("Redirecting %s -> %s", url, redirect_location)
+
+        response.drain_conn()
+        return self.urlopen(method, redirect_location, **kw)
+
+
+class ProxyManager(PoolManager):
+    """
+    Behaves just like :class:`PoolManager`, but sends all requests through
+    the defined proxy, using the CONNECT method for HTTPS URLs.
+
+    :param proxy_url:
+        The URL of the proxy to be used.
+
+    :param proxy_headers:
+        A dictionary containing headers that will be sent to the proxy. In case
+        of HTTP they are being sent with each request, while in the
+        HTTPS/CONNECT case they are sent only once. Could be used for proxy
+        authentication.
+
+    :param proxy_ssl_context:
+        The proxy SSL context is used to establish the TLS connection to the
+        proxy when using HTTPS proxies.
+
+    :param use_forwarding_for_https:
+        (Defaults to False) If set to True will forward requests to the HTTPS
+        proxy to be made on behalf of the client instead of creating a TLS
+        tunnel via the CONNECT method. **Enabling this flag means that request
+        and response headers and content will be visible from the HTTPS proxy**
+        whereas tunneling keeps request and response headers and content
+        private.  IP address, target hostname, SNI, and port are always visible
+        to an HTTPS proxy even when this flag is disabled.
+
+    :param proxy_assert_hostname:
+        The hostname of the certificate to verify against.
+
+    :param proxy_assert_fingerprint:
+        The fingerprint of the certificate to verify against.
+
+    Example:
+
+    .. code-block:: python
+
+        from pip._vendor import urllib3
+
+        proxy = urllib3.ProxyManager("https://localhost:3128/")
+
+        resp1 = proxy.request("GET", "https://google.com/")
+        resp2 = proxy.request("GET", "https://httpbin.org/")
+
+        print(len(proxy.pools))
+        # 1
+
+        resp3 = proxy.request("GET", "https://httpbin.org/")
+        resp4 = proxy.request("GET", "https://twitter.com/")
+
+        print(len(proxy.pools))
+        # 3
+
+    """
+
+    def __init__(
+        self,
+        proxy_url: str,
+        num_pools: int = 10,
+        headers: typing.Mapping[str, str] | None = None,
+        proxy_headers: typing.Mapping[str, str] | None = None,
+        proxy_ssl_context: ssl.SSLContext | None = None,
+        use_forwarding_for_https: bool = False,
+        proxy_assert_hostname: None | str | typing.Literal[False] = None,
+        proxy_assert_fingerprint: str | None = None,
+        **connection_pool_kw: typing.Any,
+    ) -> None:
+        if isinstance(proxy_url, HTTPConnectionPool):
+            str_proxy_url = f"{proxy_url.scheme}://{proxy_url.host}:{proxy_url.port}"
+        else:
+            str_proxy_url = proxy_url
+        proxy = parse_url(str_proxy_url)
+
+        if proxy.scheme not in ("http", "https"):
+            raise ProxySchemeUnknown(proxy.scheme)
+
+        if not proxy.port:
+            port = port_by_scheme.get(proxy.scheme, 80)
+            proxy = proxy._replace(port=port)
+
+        self.proxy = proxy
+        self.proxy_headers = proxy_headers or {}
+        self.proxy_ssl_context = proxy_ssl_context
+        self.proxy_config = ProxyConfig(
+            proxy_ssl_context,
+            use_forwarding_for_https,
+            proxy_assert_hostname,
+            proxy_assert_fingerprint,
+        )
+
+        connection_pool_kw["_proxy"] = self.proxy
+        connection_pool_kw["_proxy_headers"] = self.proxy_headers
+        connection_pool_kw["_proxy_config"] = self.proxy_config
+
+        super().__init__(num_pools, headers, **connection_pool_kw)
+
+    def connection_from_host(
+        self,
+        host: str | None,
+        port: int | None = None,
+        scheme: str | None = "http",
+        pool_kwargs: dict[str, typing.Any] | None = None,
+    ) -> HTTPConnectionPool:
+        if scheme == "https":
+            return super().connection_from_host(
+                host, port, scheme, pool_kwargs=pool_kwargs
+            )
+
+        return super().connection_from_host(
+            self.proxy.host, self.proxy.port, self.proxy.scheme, pool_kwargs=pool_kwargs  # type: ignore[union-attr]
+        )
+
+    def _set_proxy_headers(
+        self, url: str, headers: typing.Mapping[str, str] | None = None
+    ) -> typing.Mapping[str, str]:
+        """
+        Sets headers needed by proxies: specifically, the Accept and Host
+        headers. Only sets headers not provided by the user.
+        """
+        headers_ = {"Accept": "*/*"}
+
+        netloc = parse_url(url).netloc
+        if netloc:
+            headers_["Host"] = netloc
+
+        if headers:
+            headers_.update(headers)
+        return headers_
+
+    def urlopen(  # type: ignore[override]
+        self, method: str, url: str, redirect: bool = True, **kw: typing.Any
+    ) -> BaseHTTPResponse:
+        "Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute."
+        u = parse_url(url)
+        if not connection_requires_http_tunnel(self.proxy, self.proxy_config, u.scheme):
+            # For connections using HTTP CONNECT, httplib sets the necessary
+            # headers on the CONNECT to the proxy. If we're not using CONNECT,
+            # we'll definitely need to set 'Host' at the very least.
+            headers = kw.get("headers", self.headers)
+            kw["headers"] = self._set_proxy_headers(url, headers)
+
+        return super().urlopen(method, url, redirect=redirect, **kw)
+
+
+def proxy_from_url(url: str, **kw: typing.Any) -> ProxyManager:
+    return ProxyManager(proxy_url=url, **kw)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/py.typed
new file mode 100644
index 000000000..5f3ea3d91
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/py.typed
@@ -0,0 +1,2 @@
+# Instruct type checkers to look for inline type annotations in this package.
+# See PEP 561.
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/response.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/response.py
new file mode 100644
index 000000000..68f914ddd
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/response.py
@@ -0,0 +1,1474 @@
+from __future__ import annotations
+
+import collections
+import io
+import json as _json
+import logging
+import socket
+import sys
+import typing
+import warnings
+import zlib
+from contextlib import contextmanager
+from http.client import HTTPMessage as _HttplibHTTPMessage
+from http.client import HTTPResponse as _HttplibHTTPResponse
+from socket import timeout as SocketTimeout
+
+if typing.TYPE_CHECKING:
+    from ._base_connection import BaseHTTPConnection
+
+brotli = None
+
+from . import util
+from ._base_connection import _TYPE_BODY
+from ._collections import HTTPHeaderDict
+from .connection import BaseSSLError, HTTPConnection, HTTPException
+from .exceptions import (
+    BodyNotHttplibCompatible,
+    DecodeError,
+    DependencyWarning,
+    HTTPError,
+    IncompleteRead,
+    InvalidChunkLength,
+    InvalidHeader,
+    ProtocolError,
+    ReadTimeoutError,
+    ResponseNotChunked,
+    SSLError,
+)
+from .util.response import is_fp_closed, is_response_to_head
+from .util.retry import Retry
+
+if typing.TYPE_CHECKING:
+    from .connectionpool import HTTPConnectionPool
+
+log = logging.getLogger(__name__)
+
+
+class ContentDecoder:
+    def decompress(self, data: bytes, max_length: int = -1) -> bytes:
+        raise NotImplementedError()
+
+    @property
+    def has_unconsumed_tail(self) -> bool:
+        raise NotImplementedError()
+
+    def flush(self) -> bytes:
+        raise NotImplementedError()
+
+
+class DeflateDecoder(ContentDecoder):
+    def __init__(self) -> None:
+        self._first_try = True
+        self._first_try_data = b""
+        self._unfed_data = b""
+        self._obj = zlib.decompressobj()
+
+    def decompress(self, data: bytes, max_length: int = -1) -> bytes:
+        data = self._unfed_data + data
+        self._unfed_data = b""
+        if not data and not self._obj.unconsumed_tail:
+            return data
+        original_max_length = max_length
+        if original_max_length < 0:
+            max_length = 0
+        elif original_max_length == 0:
+            # We should not pass 0 to the zlib decompressor because 0 is
+            # the default value that will make zlib decompress without a
+            # length limit.
+            # Data should be stored for subsequent calls.
+            self._unfed_data = data
+            return b""
+
+        # Subsequent calls always reuse `self._obj`. zlib requires
+        # passing the unconsumed tail if decompression is to continue.
+        if not self._first_try:
+            return self._obj.decompress(
+                self._obj.unconsumed_tail + data, max_length=max_length
+            )
+
+        # First call tries with RFC 1950 ZLIB format.
+        self._first_try_data += data
+        try:
+            decompressed = self._obj.decompress(data, max_length=max_length)
+            if decompressed:
+                self._first_try = False
+                self._first_try_data = b""
+            return decompressed
+        # On failure, it falls back to RFC 1951 DEFLATE format.
+        except zlib.error:
+            self._first_try = False
+            self._obj = zlib.decompressobj(-zlib.MAX_WBITS)
+            try:
+                return self.decompress(
+                    self._first_try_data, max_length=original_max_length
+                )
+            finally:
+                self._first_try_data = b""
+
+    @property
+    def has_unconsumed_tail(self) -> bool:
+        return bool(self._unfed_data) or (
+            bool(self._obj.unconsumed_tail) and not self._first_try
+        )
+
+    def flush(self) -> bytes:
+        return self._obj.flush()
+
+
+class GzipDecoderState:
+    FIRST_MEMBER = 0
+    OTHER_MEMBERS = 1
+    SWALLOW_DATA = 2
+
+
+class GzipDecoder(ContentDecoder):
+    def __init__(self) -> None:
+        self._obj = zlib.decompressobj(16 + zlib.MAX_WBITS)
+        self._state = GzipDecoderState.FIRST_MEMBER
+        self._unconsumed_tail = b""
+
+    def decompress(self, data: bytes, max_length: int = -1) -> bytes:
+        ret = bytearray()
+        if self._state == GzipDecoderState.SWALLOW_DATA:
+            return bytes(ret)
+
+        if max_length == 0:
+            # We should not pass 0 to the zlib decompressor because 0 is
+            # the default value that will make zlib decompress without a
+            # length limit.
+            # Data should be stored for subsequent calls.
+            self._unconsumed_tail += data
+            return b""
+
+        # zlib requires passing the unconsumed tail to the subsequent
+        # call if decompression is to continue.
+        data = self._unconsumed_tail + data
+        if not data and self._obj.eof:
+            return bytes(ret)
+
+        while True:
+            try:
+                ret += self._obj.decompress(
+                    data, max_length=max(max_length - len(ret), 0)
+                )
+            except zlib.error:
+                previous_state = self._state
+                # Ignore data after the first error
+                self._state = GzipDecoderState.SWALLOW_DATA
+                self._unconsumed_tail = b""
+                if previous_state == GzipDecoderState.OTHER_MEMBERS:
+                    # Allow trailing garbage acceptable in other gzip clients
+                    return bytes(ret)
+                raise
+
+            self._unconsumed_tail = data = (
+                self._obj.unconsumed_tail or self._obj.unused_data
+            )
+            if max_length > 0 and len(ret) >= max_length:
+                break
+
+            if not data:
+                return bytes(ret)
+            # When the end of a gzip member is reached, a new decompressor
+            # must be created for unused (possibly future) data.
+            if self._obj.eof:
+                self._state = GzipDecoderState.OTHER_MEMBERS
+                self._obj = zlib.decompressobj(16 + zlib.MAX_WBITS)
+
+        return bytes(ret)
+
+    @property
+    def has_unconsumed_tail(self) -> bool:
+        return bool(self._unconsumed_tail)
+
+    def flush(self) -> bytes:
+        return self._obj.flush()
+
+
+if brotli is not None:
+
+    class BrotliDecoder(ContentDecoder):
+        # Supports both 'brotlipy' and 'Brotli' packages
+        # since they share an import name. The top branches
+        # are for 'brotlipy' and bottom branches for 'Brotli'
+        def __init__(self) -> None:
+            self._obj = brotli.Decompressor()
+            if hasattr(self._obj, "decompress"):
+                setattr(self, "_decompress", self._obj.decompress)
+            else:
+                setattr(self, "_decompress", self._obj.process)
+
+        # Requires Brotli >= 1.2.0 for `output_buffer_limit`.
+        def _decompress(self, data: bytes, output_buffer_limit: int = -1) -> bytes:
+            raise NotImplementedError()
+
+        def decompress(self, data: bytes, max_length: int = -1) -> bytes:
+            try:
+                if max_length > 0:
+                    return self._decompress(data, output_buffer_limit=max_length)
+                else:
+                    return self._decompress(data)
+            except TypeError:
+                # Fallback for Brotli/brotlicffi/brotlipy versions without
+                # the `output_buffer_limit` parameter.
+                warnings.warn(
+                    "Brotli >= 1.2.0 is required to prevent decompression bombs.",
+                    DependencyWarning,
+                )
+                return self._decompress(data)
+
+        @property
+        def has_unconsumed_tail(self) -> bool:
+            try:
+                return not self._obj.can_accept_more_data()
+            except AttributeError:
+                return False
+
+        def flush(self) -> bytes:
+            if hasattr(self._obj, "flush"):
+                return self._obj.flush()  # type: ignore[no-any-return]
+            return b""
+
+
+try:
+    if sys.version_info >= (3, 14):
+        from compression import zstd
+    else:
+        from backports import zstd
+except ImportError:
+    HAS_ZSTD = False
+else:
+    HAS_ZSTD = True
+
+    class ZstdDecoder(ContentDecoder):
+        def __init__(self) -> None:
+            self._obj = zstd.ZstdDecompressor()
+
+        def decompress(self, data: bytes, max_length: int = -1) -> bytes:
+            if not data and not self.has_unconsumed_tail:
+                return b""
+            if self._obj.eof:
+                data = self._obj.unused_data + data
+                self._obj = zstd.ZstdDecompressor()
+            part = self._obj.decompress(data, max_length=max_length)
+            length = len(part)
+            data_parts = [part]
+            # Every loop iteration is supposed to read data from a separate frame.
+            # The loop breaks when:
+            #   - enough data is read;
+            #   - no more unused data is available;
+            #   - end of the last read frame has not been reached (i.e.,
+            #     more data has to be fed).
+            while (
+                self._obj.eof
+                and self._obj.unused_data
+                and (max_length < 0 or length < max_length)
+            ):
+                unused_data = self._obj.unused_data
+                if not self._obj.needs_input:
+                    self._obj = zstd.ZstdDecompressor()
+                part = self._obj.decompress(
+                    unused_data,
+                    max_length=(max_length - length) if max_length > 0 else -1,
+                )
+                if part_length := len(part):
+                    data_parts.append(part)
+                    length += part_length
+                elif self._obj.needs_input:
+                    break
+            return b"".join(data_parts)
+
+        @property
+        def has_unconsumed_tail(self) -> bool:
+            return not (self._obj.needs_input or self._obj.eof) or bool(
+                self._obj.unused_data
+            )
+
+        def flush(self) -> bytes:
+            if not self._obj.eof:
+                raise DecodeError("Zstandard data is incomplete")
+            return b""
+
+
+class MultiDecoder(ContentDecoder):
+    """
+    From RFC7231:
+        If one or more encodings have been applied to a representation, the
+        sender that applied the encodings MUST generate a Content-Encoding
+        header field that lists the content codings in the order in which
+        they were applied.
+    """
+
+    # Maximum allowed number of chained HTTP encodings in the
+    # Content-Encoding header.
+    max_decode_links = 5
+
+    def __init__(self, modes: str) -> None:
+        encodings = [m.strip() for m in modes.split(",")]
+        if len(encodings) > self.max_decode_links:
+            raise DecodeError(
+                "Too many content encodings in the chain: "
+                f"{len(encodings)} > {self.max_decode_links}"
+            )
+        self._decoders = [_get_decoder(e) for e in encodings]
+
+    def flush(self) -> bytes:
+        return self._decoders[0].flush()
+
+    def decompress(self, data: bytes, max_length: int = -1) -> bytes:
+        if max_length <= 0:
+            for d in reversed(self._decoders):
+                data = d.decompress(data)
+            return data
+
+        ret = bytearray()
+        # Every while loop iteration goes through all decoders once.
+        # It exits when enough data is read or no more data can be read.
+        # It is possible that the while loop iteration does not produce
+        # any data because we retrieve up to `max_length` from every
+        # decoder, and the amount of bytes may be insufficient for the
+        # next decoder to produce enough/any output.
+        while True:
+            any_data = False
+            for d in reversed(self._decoders):
+                data = d.decompress(data, max_length=max_length - len(ret))
+                if data:
+                    any_data = True
+                # We should not break when no data is returned because
+                # next decoders may produce data even with empty input.
+            ret += data
+            if not any_data or len(ret) >= max_length:
+                return bytes(ret)
+            data = b""
+
+    @property
+    def has_unconsumed_tail(self) -> bool:
+        return any(d.has_unconsumed_tail for d in self._decoders)
+
+
+def _get_decoder(mode: str) -> ContentDecoder:
+    if "," in mode:
+        return MultiDecoder(mode)
+
+    # According to RFC 9110 section 8.4.1.3, recipients should
+    # consider x-gzip equivalent to gzip
+    if mode in ("gzip", "x-gzip"):
+        return GzipDecoder()
+
+    if brotli is not None and mode == "br":
+        return BrotliDecoder()
+
+    if HAS_ZSTD and mode == "zstd":
+        return ZstdDecoder()
+
+    return DeflateDecoder()
+
+
+class BytesQueueBuffer:
+    """Memory-efficient bytes buffer
+
+    To return decoded data in read() and still follow the BufferedIOBase API, we need a
+    buffer to always return the correct amount of bytes.
+
+    This buffer should be filled using calls to put()
+
+    Our maximum memory usage is determined by the sum of the size of:
+
+     * self.buffer, which contains the full data
+     * the largest chunk that we will copy in get()
+    """
+
+    def __init__(self) -> None:
+        self.buffer: typing.Deque[bytes | memoryview[bytes]] = collections.deque()
+        self._size: int = 0
+
+    def __len__(self) -> int:
+        return self._size
+
+    def put(self, data: bytes) -> None:
+        self.buffer.append(data)
+        self._size += len(data)
+
+    def get(self, n: int) -> bytes:
+        if n == 0:
+            return b""
+        elif not self.buffer:
+            raise RuntimeError("buffer is empty")
+        elif n < 0:
+            raise ValueError("n should be > 0")
+
+        if len(self.buffer[0]) == n and isinstance(self.buffer[0], bytes):
+            self._size -= n
+            return self.buffer.popleft()
+
+        fetched = 0
+        ret = io.BytesIO()
+        while fetched < n:
+            remaining = n - fetched
+            chunk = self.buffer.popleft()
+            chunk_length = len(chunk)
+            if remaining < chunk_length:
+                chunk = memoryview(chunk)
+                left_chunk, right_chunk = chunk[:remaining], chunk[remaining:]
+                ret.write(left_chunk)
+                self.buffer.appendleft(right_chunk)
+                self._size -= remaining
+                break
+            else:
+                ret.write(chunk)
+                self._size -= chunk_length
+            fetched += chunk_length
+
+            if not self.buffer:
+                break
+
+        return ret.getvalue()
+
+    def get_all(self) -> bytes:
+        buffer = self.buffer
+        if not buffer:
+            assert self._size == 0
+            return b""
+        if len(buffer) == 1:
+            result = buffer.pop()
+            if isinstance(result, memoryview):
+                result = result.tobytes()
+        else:
+            ret = io.BytesIO()
+            ret.writelines(buffer.popleft() for _ in range(len(buffer)))
+            result = ret.getvalue()
+        self._size = 0
+        return result
+
+
+class BaseHTTPResponse(io.IOBase):
+    CONTENT_DECODERS = ["gzip", "x-gzip", "deflate"]
+    if brotli is not None:
+        CONTENT_DECODERS += ["br"]
+    if HAS_ZSTD:
+        CONTENT_DECODERS += ["zstd"]
+    REDIRECT_STATUSES = [301, 302, 303, 307, 308]
+
+    DECODER_ERROR_CLASSES: tuple[type[Exception], ...] = (IOError, zlib.error)
+    if brotli is not None:
+        DECODER_ERROR_CLASSES += (brotli.error,)
+
+    if HAS_ZSTD:
+        DECODER_ERROR_CLASSES += (zstd.ZstdError,)
+
+    def __init__(
+        self,
+        *,
+        headers: typing.Mapping[str, str] | typing.Mapping[bytes, bytes] | None = None,
+        status: int,
+        version: int,
+        version_string: str,
+        reason: str | None,
+        decode_content: bool,
+        request_url: str | None,
+        retries: Retry | None = None,
+    ) -> None:
+        if isinstance(headers, HTTPHeaderDict):
+            self.headers = headers
+        else:
+            self.headers = HTTPHeaderDict(headers)  # type: ignore[arg-type]
+        self.status = status
+        self.version = version
+        self.version_string = version_string
+        self.reason = reason
+        self.decode_content = decode_content
+        self._has_decoded_content = False
+        self._request_url: str | None = request_url
+        self.retries = retries
+
+        self.chunked = False
+        tr_enc = self.headers.get("transfer-encoding", "").lower()
+        # Don't incur the penalty of creating a list and then discarding it
+        encodings = (enc.strip() for enc in tr_enc.split(","))
+        if "chunked" in encodings:
+            self.chunked = True
+
+        self._decoder: ContentDecoder | None = None
+        self.length_remaining: int | None
+
+    def get_redirect_location(self) -> str | None | typing.Literal[False]:
+        """
+        Should we redirect and where to?
+
+        :returns: Truthy redirect location string if we got a redirect status
+            code and valid location. ``None`` if redirect status and no
+            location. ``False`` if not a redirect status code.
+        """
+        if self.status in self.REDIRECT_STATUSES:
+            return self.headers.get("location")
+        return False
+
+    @property
+    def data(self) -> bytes:
+        raise NotImplementedError()
+
+    def json(self) -> typing.Any:
+        """
+        Deserializes the body of the HTTP response as a Python object.
+
+        The body of the HTTP response must be encoded using UTF-8, as per
+        `RFC 8529 Section 8.1 `_.
+
+        To use a custom JSON decoder pass the result of :attr:`HTTPResponse.data` to
+        your custom decoder instead.
+
+        If the body of the HTTP response is not decodable to UTF-8, a
+        `UnicodeDecodeError` will be raised. If the body of the HTTP response is not a
+        valid JSON document, a `json.JSONDecodeError` will be raised.
+
+        Read more :ref:`here `.
+
+        :returns: The body of the HTTP response as a Python object.
+        """
+        data = self.data.decode("utf-8")
+        return _json.loads(data)
+
+    @property
+    def url(self) -> str | None:
+        raise NotImplementedError()
+
+    @url.setter
+    def url(self, url: str | None) -> None:
+        raise NotImplementedError()
+
+    @property
+    def connection(self) -> BaseHTTPConnection | None:
+        raise NotImplementedError()
+
+    @property
+    def retries(self) -> Retry | None:
+        return self._retries
+
+    @retries.setter
+    def retries(self, retries: Retry | None) -> None:
+        # Override the request_url if retries has a redirect location.
+        if retries is not None and retries.history:
+            self.url = retries.history[-1].redirect_location
+        self._retries = retries
+
+    def stream(
+        self, amt: int | None = 2**16, decode_content: bool | None = None
+    ) -> typing.Iterator[bytes]:
+        raise NotImplementedError()
+
+    def read(
+        self,
+        amt: int | None = None,
+        decode_content: bool | None = None,
+        cache_content: bool = False,
+    ) -> bytes:
+        raise NotImplementedError()
+
+    def read1(
+        self,
+        amt: int | None = None,
+        decode_content: bool | None = None,
+    ) -> bytes:
+        raise NotImplementedError()
+
+    def read_chunked(
+        self,
+        amt: int | None = None,
+        decode_content: bool | None = None,
+    ) -> typing.Iterator[bytes]:
+        raise NotImplementedError()
+
+    def release_conn(self) -> None:
+        raise NotImplementedError()
+
+    def drain_conn(self) -> None:
+        raise NotImplementedError()
+
+    def shutdown(self) -> None:
+        raise NotImplementedError()
+
+    def close(self) -> None:
+        raise NotImplementedError()
+
+    def _init_decoder(self) -> None:
+        """
+        Set-up the _decoder attribute if necessary.
+        """
+        # Note: content-encoding value should be case-insensitive, per RFC 7230
+        # Section 3.2
+        content_encoding = self.headers.get("content-encoding", "").lower()
+        if self._decoder is None:
+            if content_encoding in self.CONTENT_DECODERS:
+                self._decoder = _get_decoder(content_encoding)
+            elif "," in content_encoding:
+                encodings = [
+                    e.strip()
+                    for e in content_encoding.split(",")
+                    if e.strip() in self.CONTENT_DECODERS
+                ]
+                if encodings:
+                    self._decoder = _get_decoder(content_encoding)
+
+    def _decode(
+        self,
+        data: bytes,
+        decode_content: bool | None,
+        flush_decoder: bool,
+        max_length: int | None = None,
+    ) -> bytes:
+        """
+        Decode the data passed in and potentially flush the decoder.
+        """
+        if not decode_content:
+            if self._has_decoded_content:
+                raise RuntimeError(
+                    "Calling read(decode_content=False) is not supported after "
+                    "read(decode_content=True) was called."
+                )
+            return data
+
+        if max_length is None or flush_decoder:
+            max_length = -1
+
+        try:
+            if self._decoder:
+                data = self._decoder.decompress(data, max_length=max_length)
+                self._has_decoded_content = True
+        except self.DECODER_ERROR_CLASSES as e:
+            content_encoding = self.headers.get("content-encoding", "").lower()
+            raise DecodeError(
+                "Received response with content-encoding: %s, but "
+                "failed to decode it." % content_encoding,
+                e,
+            ) from e
+        if flush_decoder:
+            data += self._flush_decoder()
+
+        return data
+
+    def _flush_decoder(self) -> bytes:
+        """
+        Flushes the decoder. Should only be called if the decoder is actually
+        being used.
+        """
+        if self._decoder:
+            return self._decoder.decompress(b"") + self._decoder.flush()
+        return b""
+
+    # Compatibility methods for `io` module
+    def readinto(self, b: bytearray) -> int:
+        temp = self.read(len(b))
+        if len(temp) == 0:
+            return 0
+        else:
+            b[: len(temp)] = temp
+            return len(temp)
+
+    # Methods used by dependent libraries
+    def getheaders(self) -> HTTPHeaderDict:
+        return self.headers
+
+    def getheader(self, name: str, default: str | None = None) -> str | None:
+        return self.headers.get(name, default)
+
+    # Compatibility method for http.cookiejar
+    def info(self) -> HTTPHeaderDict:
+        return self.headers
+
+    def geturl(self) -> str | None:
+        return self.url
+
+
+class HTTPResponse(BaseHTTPResponse):
+    """
+    HTTP Response container.
+
+    Backwards-compatible with :class:`http.client.HTTPResponse` but the response ``body`` is
+    loaded and decoded on-demand when the ``data`` property is accessed.  This
+    class is also compatible with the Python standard library's :mod:`io`
+    module, and can hence be treated as a readable object in the context of that
+    framework.
+
+    Extra parameters for behaviour not present in :class:`http.client.HTTPResponse`:
+
+    :param preload_content:
+        If True, the response's body will be preloaded during construction.
+
+    :param decode_content:
+        If True, will attempt to decode the body based on the
+        'content-encoding' header.
+
+    :param original_response:
+        When this HTTPResponse wrapper is generated from an :class:`http.client.HTTPResponse`
+        object, it's convenient to include the original for debug purposes. It's
+        otherwise unused.
+
+    :param retries:
+        The retries contains the last :class:`~urllib3.util.retry.Retry` that
+        was used during the request.
+
+    :param enforce_content_length:
+        Enforce content length checking. Body returned by server must match
+        value of Content-Length header, if present. Otherwise, raise error.
+    """
+
+    def __init__(
+        self,
+        body: _TYPE_BODY = "",
+        headers: typing.Mapping[str, str] | typing.Mapping[bytes, bytes] | None = None,
+        status: int = 0,
+        version: int = 0,
+        version_string: str = "HTTP/?",
+        reason: str | None = None,
+        preload_content: bool = True,
+        decode_content: bool = True,
+        original_response: _HttplibHTTPResponse | None = None,
+        pool: HTTPConnectionPool | None = None,
+        connection: HTTPConnection | None = None,
+        msg: _HttplibHTTPMessage | None = None,
+        retries: Retry | None = None,
+        enforce_content_length: bool = True,
+        request_method: str | None = None,
+        request_url: str | None = None,
+        auto_close: bool = True,
+        sock_shutdown: typing.Callable[[int], None] | None = None,
+    ) -> None:
+        super().__init__(
+            headers=headers,
+            status=status,
+            version=version,
+            version_string=version_string,
+            reason=reason,
+            decode_content=decode_content,
+            request_url=request_url,
+            retries=retries,
+        )
+
+        self.enforce_content_length = enforce_content_length
+        self.auto_close = auto_close
+
+        self._body = None
+        self._fp: _HttplibHTTPResponse | None = None
+        self._original_response = original_response
+        self._fp_bytes_read = 0
+        self.msg = msg
+
+        if body and isinstance(body, (str, bytes)):
+            self._body = body
+
+        self._pool = pool
+        self._connection = connection
+
+        if hasattr(body, "read"):
+            self._fp = body  # type: ignore[assignment]
+        self._sock_shutdown = sock_shutdown
+
+        # Are we using the chunked-style of transfer encoding?
+        self.chunk_left: int | None = None
+
+        # Determine length of response
+        self.length_remaining = self._init_length(request_method)
+
+        # Used to return the correct amount of bytes for partial read()s
+        self._decoded_buffer = BytesQueueBuffer()
+
+        # If requested, preload the body.
+        if preload_content and not self._body:
+            self._body = self.read(decode_content=decode_content)
+
+    def release_conn(self) -> None:
+        if not self._pool or not self._connection:
+            return None
+
+        self._pool._put_conn(self._connection)
+        self._connection = None
+
+    def drain_conn(self) -> None:
+        """
+        Read and discard any remaining HTTP response data in the response connection.
+
+        Unread data in the HTTPResponse connection blocks the connection from being released back to the pool.
+        """
+        try:
+            self.read(
+                # Do not spend resources decoding the content unless
+                # decoding has already been initiated.
+                decode_content=self._has_decoded_content,
+            )
+        except (HTTPError, OSError, BaseSSLError, HTTPException):
+            pass
+
+    @property
+    def data(self) -> bytes:
+        # For backwards-compat with earlier urllib3 0.4 and earlier.
+        if self._body:
+            return self._body  # type: ignore[return-value]
+
+        if self._fp:
+            return self.read(cache_content=True)
+
+        return None  # type: ignore[return-value]
+
+    @property
+    def connection(self) -> HTTPConnection | None:
+        return self._connection
+
+    def isclosed(self) -> bool:
+        return is_fp_closed(self._fp)
+
+    def tell(self) -> int:
+        """
+        Obtain the number of bytes pulled over the wire so far. May differ from
+        the amount of content returned by :meth:``urllib3.response.HTTPResponse.read``
+        if bytes are encoded on the wire (e.g, compressed).
+        """
+        return self._fp_bytes_read
+
+    def _init_length(self, request_method: str | None) -> int | None:
+        """
+        Set initial length value for Response content if available.
+        """
+        length: int | None
+        content_length: str | None = self.headers.get("content-length")
+
+        if content_length is not None:
+            if self.chunked:
+                # This Response will fail with an IncompleteRead if it can't be
+                # received as chunked. This method falls back to attempt reading
+                # the response before raising an exception.
+                log.warning(
+                    "Received response with both Content-Length and "
+                    "Transfer-Encoding set. This is expressly forbidden "
+                    "by RFC 7230 sec 3.3.2. Ignoring Content-Length and "
+                    "attempting to process response as Transfer-Encoding: "
+                    "chunked."
+                )
+                return None
+
+            try:
+                # RFC 7230 section 3.3.2 specifies multiple content lengths can
+                # be sent in a single Content-Length header
+                # (e.g. Content-Length: 42, 42). This line ensures the values
+                # are all valid ints and that as long as the `set` length is 1,
+                # all values are the same. Otherwise, the header is invalid.
+                lengths = {int(val) for val in content_length.split(",")}
+                if len(lengths) > 1:
+                    raise InvalidHeader(
+                        "Content-Length contained multiple "
+                        "unmatching values (%s)" % content_length
+                    )
+                length = lengths.pop()
+            except ValueError:
+                length = None
+            else:
+                if length < 0:
+                    length = None
+
+        else:  # if content_length is None
+            length = None
+
+        # Convert status to int for comparison
+        # In some cases, httplib returns a status of "_UNKNOWN"
+        try:
+            status = int(self.status)
+        except ValueError:
+            status = 0
+
+        # Check for responses that shouldn't include a body
+        if status in (204, 304) or 100 <= status < 200 or request_method == "HEAD":
+            length = 0
+
+        return length
+
+    @contextmanager
+    def _error_catcher(self) -> typing.Generator[None]:
+        """
+        Catch low-level python exceptions, instead re-raising urllib3
+        variants, so that low-level exceptions are not leaked in the
+        high-level api.
+
+        On exit, release the connection back to the pool.
+        """
+        clean_exit = False
+
+        try:
+            try:
+                yield
+
+            except SocketTimeout as e:
+                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
+                # there is yet no clean way to get at it from this context.
+                raise ReadTimeoutError(self._pool, None, "Read timed out.") from e  # type: ignore[arg-type]
+
+            except BaseSSLError as e:
+                # FIXME: Is there a better way to differentiate between SSLErrors?
+                if "read operation timed out" not in str(e):
+                    # SSL errors related to framing/MAC get wrapped and reraised here
+                    raise SSLError(e) from e
+
+                raise ReadTimeoutError(self._pool, None, "Read timed out.") from e  # type: ignore[arg-type]
+
+            except IncompleteRead as e:
+                if (
+                    e.expected is not None
+                    and e.partial is not None
+                    and e.expected == -e.partial
+                ):
+                    arg = "Response may not contain content."
+                else:
+                    arg = f"Connection broken: {e!r}"
+                raise ProtocolError(arg, e) from e
+
+            except (HTTPException, OSError) as e:
+                raise ProtocolError(f"Connection broken: {e!r}", e) from e
+
+            # If no exception is thrown, we should avoid cleaning up
+            # unnecessarily.
+            clean_exit = True
+        finally:
+            # If we didn't terminate cleanly, we need to throw away our
+            # connection.
+            if not clean_exit:
+                # The response may not be closed but we're not going to use it
+                # anymore so close it now to ensure that the connection is
+                # released back to the pool.
+                if self._original_response:
+                    self._original_response.close()
+
+                # Closing the response may not actually be sufficient to close
+                # everything, so if we have a hold of the connection close that
+                # too.
+                if self._connection:
+                    self._connection.close()
+
+            # If we hold the original response but it's closed now, we should
+            # return the connection back to the pool.
+            if self._original_response and self._original_response.isclosed():
+                self.release_conn()
+
+    def _fp_read(
+        self,
+        amt: int | None = None,
+        *,
+        read1: bool = False,
+    ) -> bytes:
+        """
+        Read a response with the thought that reading the number of bytes
+        larger than can fit in a 32-bit int at a time via SSL in some
+        known cases leads to an overflow error that has to be prevented
+        if `amt` or `self.length_remaining` indicate that a problem may
+        happen.
+
+        The known cases:
+          * CPython < 3.9.7 because of a bug
+            https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900.
+          * urllib3 injected with pyOpenSSL-backed SSL-support.
+          * CPython < 3.10 only when `amt` does not fit 32-bit int.
+        """
+        assert self._fp
+        c_int_max = 2**31 - 1
+        if (
+            (amt and amt > c_int_max)
+            or (
+                amt is None
+                and self.length_remaining
+                and self.length_remaining > c_int_max
+            )
+        ) and (util.IS_PYOPENSSL or sys.version_info < (3, 10)):
+            if read1:
+                return self._fp.read1(c_int_max)
+            buffer = io.BytesIO()
+            # Besides `max_chunk_amt` being a maximum chunk size, it
+            # affects memory overhead of reading a response by this
+            # method in CPython.
+            # `c_int_max` equal to 2 GiB - 1 byte is the actual maximum
+            # chunk size that does not lead to an overflow error, but
+            # 256 MiB is a compromise.
+            max_chunk_amt = 2**28
+            while amt is None or amt != 0:
+                if amt is not None:
+                    chunk_amt = min(amt, max_chunk_amt)
+                    amt -= chunk_amt
+                else:
+                    chunk_amt = max_chunk_amt
+                data = self._fp.read(chunk_amt)
+                if not data:
+                    break
+                buffer.write(data)
+                del data  # to reduce peak memory usage by `max_chunk_amt`.
+            return buffer.getvalue()
+        elif read1:
+            return self._fp.read1(amt) if amt is not None else self._fp.read1()
+        else:
+            # StringIO doesn't like amt=None
+            return self._fp.read(amt) if amt is not None else self._fp.read()
+
+    def _raw_read(
+        self,
+        amt: int | None = None,
+        *,
+        read1: bool = False,
+    ) -> bytes:
+        """
+        Reads `amt` of bytes from the socket.
+        """
+        if self._fp is None:
+            return None  # type: ignore[return-value]
+
+        fp_closed = getattr(self._fp, "closed", False)
+
+        with self._error_catcher():
+            data = self._fp_read(amt, read1=read1) if not fp_closed else b""
+            if amt is not None and amt != 0 and not data:
+                # Platform-specific: Buggy versions of Python.
+                # Close the connection when no data is returned
+                #
+                # This is redundant to what httplib/http.client _should_
+                # already do.  However, versions of python released before
+                # December 15, 2012 (http://bugs.python.org/issue16298) do
+                # not properly close the connection in all cases. There is
+                # no harm in redundantly calling close.
+                self._fp.close()
+                if (
+                    self.enforce_content_length
+                    and self.length_remaining is not None
+                    and self.length_remaining != 0
+                ):
+                    # This is an edge case that httplib failed to cover due
+                    # to concerns of backward compatibility. We're
+                    # addressing it here to make sure IncompleteRead is
+                    # raised during streaming, so all calls with incorrect
+                    # Content-Length are caught.
+                    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
+            elif read1 and (
+                (amt != 0 and not data) or self.length_remaining == len(data)
+            ):
+                # All data has been read, but `self._fp.read1` in
+                # CPython 3.12 and older doesn't always close
+                # `http.client.HTTPResponse`, so we close it here.
+                # See https://github.com/python/cpython/issues/113199
+                self._fp.close()
+
+        if data:
+            self._fp_bytes_read += len(data)
+            if self.length_remaining is not None:
+                self.length_remaining -= len(data)
+        return data
+
+    def read(
+        self,
+        amt: int | None = None,
+        decode_content: bool | None = None,
+        cache_content: bool = False,
+    ) -> bytes:
+        """
+        Similar to :meth:`http.client.HTTPResponse.read`, but with two additional
+        parameters: ``decode_content`` and ``cache_content``.
+
+        :param amt:
+            How much of the content to read. If specified, caching is skipped
+            because it doesn't make sense to cache partial content as the full
+            response.
+
+        :param decode_content:
+            If True, will attempt to decode the body based on the
+            'content-encoding' header.
+
+        :param cache_content:
+            If True, will save the returned data such that the same result is
+            returned despite of the state of the underlying file object. This
+            is useful if you want the ``.data`` property to continue working
+            after having ``.read()`` the file object. (Overridden if ``amt`` is
+            set.)
+        """
+        self._init_decoder()
+        if decode_content is None:
+            decode_content = self.decode_content
+
+        if amt and amt < 0:
+            # Negative numbers and `None` should be treated the same.
+            amt = None
+        elif amt is not None:
+            cache_content = False
+
+            if self._decoder and self._decoder.has_unconsumed_tail:
+                decoded_data = self._decode(
+                    b"",
+                    decode_content,
+                    flush_decoder=False,
+                    max_length=amt - len(self._decoded_buffer),
+                )
+                self._decoded_buffer.put(decoded_data)
+            if len(self._decoded_buffer) >= amt:
+                return self._decoded_buffer.get(amt)
+
+        data = self._raw_read(amt)
+
+        flush_decoder = amt is None or (amt != 0 and not data)
+
+        if (
+            not data
+            and len(self._decoded_buffer) == 0
+            and not (self._decoder and self._decoder.has_unconsumed_tail)
+        ):
+            return data
+
+        if amt is None:
+            data = self._decode(data, decode_content, flush_decoder)
+            if cache_content:
+                self._body = data
+        else:
+            # do not waste memory on buffer when not decoding
+            if not decode_content:
+                if self._has_decoded_content:
+                    raise RuntimeError(
+                        "Calling read(decode_content=False) is not supported after "
+                        "read(decode_content=True) was called."
+                    )
+                return data
+
+            decoded_data = self._decode(
+                data,
+                decode_content,
+                flush_decoder,
+                max_length=amt - len(self._decoded_buffer),
+            )
+            self._decoded_buffer.put(decoded_data)
+
+            while len(self._decoded_buffer) < amt and data:
+                # TODO make sure to initially read enough data to get past the headers
+                # For example, the GZ file header takes 10 bytes, we don't want to read
+                # it one byte at a time
+                data = self._raw_read(amt)
+                decoded_data = self._decode(
+                    data,
+                    decode_content,
+                    flush_decoder,
+                    max_length=amt - len(self._decoded_buffer),
+                )
+                self._decoded_buffer.put(decoded_data)
+            data = self._decoded_buffer.get(amt)
+
+        return data
+
+    def read1(
+        self,
+        amt: int | None = None,
+        decode_content: bool | None = None,
+    ) -> bytes:
+        """
+        Similar to ``http.client.HTTPResponse.read1`` and documented
+        in :meth:`io.BufferedReader.read1`, but with an additional parameter:
+        ``decode_content``.
+
+        :param amt:
+            How much of the content to read.
+
+        :param decode_content:
+            If True, will attempt to decode the body based on the
+            'content-encoding' header.
+        """
+        if decode_content is None:
+            decode_content = self.decode_content
+        if amt and amt < 0:
+            # Negative numbers and `None` should be treated the same.
+            amt = None
+        # try and respond without going to the network
+        if self._has_decoded_content:
+            if not decode_content:
+                raise RuntimeError(
+                    "Calling read1(decode_content=False) is not supported after "
+                    "read1(decode_content=True) was called."
+                )
+            if (
+                self._decoder
+                and self._decoder.has_unconsumed_tail
+                and (amt is None or len(self._decoded_buffer) < amt)
+            ):
+                decoded_data = self._decode(
+                    b"",
+                    decode_content,
+                    flush_decoder=False,
+                    max_length=(
+                        amt - len(self._decoded_buffer) if amt is not None else None
+                    ),
+                )
+                self._decoded_buffer.put(decoded_data)
+            if len(self._decoded_buffer) > 0:
+                if amt is None:
+                    return self._decoded_buffer.get_all()
+                return self._decoded_buffer.get(amt)
+        if amt == 0:
+            return b""
+
+        # FIXME, this method's type doesn't say returning None is possible
+        data = self._raw_read(amt, read1=True)
+        if not decode_content or data is None:
+            return data
+
+        self._init_decoder()
+        while True:
+            flush_decoder = not data
+            decoded_data = self._decode(
+                data, decode_content, flush_decoder, max_length=amt
+            )
+            self._decoded_buffer.put(decoded_data)
+            if decoded_data or flush_decoder:
+                break
+            data = self._raw_read(8192, read1=True)
+
+        if amt is None:
+            return self._decoded_buffer.get_all()
+        return self._decoded_buffer.get(amt)
+
+    def stream(
+        self, amt: int | None = 2**16, decode_content: bool | None = None
+    ) -> typing.Generator[bytes]:
+        """
+        A generator wrapper for the read() method. A call will block until
+        ``amt`` bytes have been read from the connection or until the
+        connection is closed.
+
+        :param amt:
+            How much of the content to read. The generator will return up to
+            much data per iteration, but may return less. This is particularly
+            likely when using compressed data. However, the empty string will
+            never be returned.
+
+        :param decode_content:
+            If True, will attempt to decode the body based on the
+            'content-encoding' header.
+        """
+        if self.chunked and self.supports_chunked_reads():
+            yield from self.read_chunked(amt, decode_content=decode_content)
+        else:
+            while (
+                not is_fp_closed(self._fp)
+                or len(self._decoded_buffer) > 0
+                or (self._decoder and self._decoder.has_unconsumed_tail)
+            ):
+                data = self.read(amt=amt, decode_content=decode_content)
+
+                if data:
+                    yield data
+
+    # Overrides from io.IOBase
+    def readable(self) -> bool:
+        return True
+
+    def shutdown(self) -> None:
+        if not self._sock_shutdown:
+            raise ValueError("Cannot shutdown socket as self._sock_shutdown is not set")
+        if self._connection is None:
+            raise RuntimeError(
+                "Cannot shutdown as connection has already been released to the pool"
+            )
+        self._sock_shutdown(socket.SHUT_RD)
+
+    def close(self) -> None:
+        self._sock_shutdown = None
+
+        if not self.closed and self._fp:
+            self._fp.close()
+
+        if self._connection:
+            self._connection.close()
+
+        if not self.auto_close:
+            io.IOBase.close(self)
+
+    @property
+    def closed(self) -> bool:
+        if not self.auto_close:
+            return io.IOBase.closed.__get__(self)  # type: ignore[no-any-return]
+        elif self._fp is None:
+            return True
+        elif hasattr(self._fp, "isclosed"):
+            return self._fp.isclosed()
+        elif hasattr(self._fp, "closed"):
+            return self._fp.closed
+        else:
+            return True
+
+    def fileno(self) -> int:
+        if self._fp is None:
+            raise OSError("HTTPResponse has no file to get a fileno from")
+        elif hasattr(self._fp, "fileno"):
+            return self._fp.fileno()
+        else:
+            raise OSError(
+                "The file-like object this HTTPResponse is wrapped "
+                "around has no file descriptor"
+            )
+
+    def flush(self) -> None:
+        if (
+            self._fp is not None
+            and hasattr(self._fp, "flush")
+            and not getattr(self._fp, "closed", False)
+        ):
+            return self._fp.flush()
+
+    def supports_chunked_reads(self) -> bool:
+        """
+        Checks if the underlying file-like object looks like a
+        :class:`http.client.HTTPResponse` object. We do this by testing for
+        the fp attribute. If it is present we assume it returns raw chunks as
+        processed by read_chunked().
+        """
+        return hasattr(self._fp, "fp")
+
+    def _update_chunk_length(self) -> None:
+        # First, we'll figure out length of a chunk and then
+        # we'll try to read it from socket.
+        if self.chunk_left is not None:
+            return None
+        line = self._fp.fp.readline()  # type: ignore[union-attr]
+        line = line.split(b";", 1)[0]
+        try:
+            self.chunk_left = int(line, 16)
+        except ValueError:
+            self.close()
+            if line:
+                # Invalid chunked protocol response, abort.
+                raise InvalidChunkLength(self, line) from None
+            else:
+                # Truncated at start of next chunk
+                raise ProtocolError("Response ended prematurely") from None
+
+    def _handle_chunk(self, amt: int | None) -> bytes:
+        returned_chunk = None
+        if amt is None:
+            chunk = self._fp._safe_read(self.chunk_left)  # type: ignore[union-attr]
+            returned_chunk = chunk
+            self._fp._safe_read(2)  # type: ignore[union-attr] # Toss the CRLF at the end of the chunk.
+            self.chunk_left = None
+        elif self.chunk_left is not None and amt < self.chunk_left:
+            value = self._fp._safe_read(amt)  # type: ignore[union-attr]
+            self.chunk_left = self.chunk_left - amt
+            returned_chunk = value
+        elif amt == self.chunk_left:
+            value = self._fp._safe_read(amt)  # type: ignore[union-attr]
+            self._fp._safe_read(2)  # type: ignore[union-attr] # Toss the CRLF at the end of the chunk.
+            self.chunk_left = None
+            returned_chunk = value
+        else:  # amt > self.chunk_left
+            returned_chunk = self._fp._safe_read(self.chunk_left)  # type: ignore[union-attr]
+            self._fp._safe_read(2)  # type: ignore[union-attr] # Toss the CRLF at the end of the chunk.
+            self.chunk_left = None
+        return returned_chunk  # type: ignore[no-any-return]
+
+    def read_chunked(
+        self, amt: int | None = None, decode_content: bool | None = None
+    ) -> typing.Generator[bytes]:
+        """
+        Similar to :meth:`HTTPResponse.read`, but with an additional
+        parameter: ``decode_content``.
+
+        :param amt:
+            How much of the content to read. If specified, caching is skipped
+            because it doesn't make sense to cache partial content as the full
+            response.
+
+        :param decode_content:
+            If True, will attempt to decode the body based on the
+            'content-encoding' header.
+        """
+        self._init_decoder()
+        # FIXME: Rewrite this method and make it a class with a better structured logic.
+        if not self.chunked:
+            raise ResponseNotChunked(
+                "Response is not chunked. "
+                "Header 'transfer-encoding: chunked' is missing."
+            )
+        if not self.supports_chunked_reads():
+            raise BodyNotHttplibCompatible(
+                "Body should be http.client.HTTPResponse like. "
+                "It should have have an fp attribute which returns raw chunks."
+            )
+
+        with self._error_catcher():
+            # Don't bother reading the body of a HEAD request.
+            if self._original_response and is_response_to_head(self._original_response):
+                self._original_response.close()
+                return None
+
+            # If a response is already read and closed
+            # then return immediately.
+            if self._fp.fp is None:  # type: ignore[union-attr]
+                return None
+
+            if amt and amt < 0:
+                # Negative numbers and `None` should be treated the same,
+                # but httplib handles only `None` correctly.
+                amt = None
+
+            while True:
+                # First, check if any data is left in the decoder's buffer.
+                if self._decoder and self._decoder.has_unconsumed_tail:
+                    chunk = b""
+                else:
+                    self._update_chunk_length()
+                    if self.chunk_left == 0:
+                        break
+                    chunk = self._handle_chunk(amt)
+                decoded = self._decode(
+                    chunk,
+                    decode_content=decode_content,
+                    flush_decoder=False,
+                    max_length=amt,
+                )
+                if decoded:
+                    yield decoded
+
+            if decode_content:
+                # On CPython and PyPy, we should never need to flush the
+                # decoder. However, on Jython we *might* need to, so
+                # lets defensively do it anyway.
+                decoded = self._flush_decoder()
+                if decoded:  # Platform-specific: Jython.
+                    yield decoded
+
+            # Chunk content ends with \r\n: discard it.
+            while self._fp is not None:
+                line = self._fp.fp.readline()
+                if not line:
+                    # Some sites may not end with '\r\n'.
+                    break
+                if line == b"\r\n":
+                    break
+
+            # We read everything; close the "file".
+            if self._original_response:
+                self._original_response.close()
+
+    @property
+    def url(self) -> str | None:
+        """
+        Returns the URL that was the source of this response.
+        If the request that generated this response redirected, this method
+        will return the final redirect location.
+        """
+        return self._request_url
+
+    @url.setter
+    def url(self, url: str | None) -> None:
+        self._request_url = url
+
+    def __iter__(self) -> typing.Iterator[bytes]:
+        buffer: list[bytes] = []
+        for chunk in self.stream(decode_content=True):
+            if b"\n" in chunk:
+                chunks = chunk.split(b"\n")
+                yield b"".join(buffer) + chunks[0] + b"\n"
+                for x in chunks[1:-1]:
+                    yield x + b"\n"
+                if chunks[-1]:
+                    buffer = [chunks[-1]]
+                else:
+                    buffer = []
+            else:
+                buffer.append(chunk)
+        if buffer:
+            yield b"".join(buffer)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py
new file mode 100644
index 000000000..534126033
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py
@@ -0,0 +1,42 @@
+# For backwards compatibility, provide imports that used to be here.
+from __future__ import annotations
+
+from .connection import is_connection_dropped
+from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers
+from .response import is_fp_closed
+from .retry import Retry
+from .ssl_ import (
+    ALPN_PROTOCOLS,
+    IS_PYOPENSSL,
+    SSLContext,
+    assert_fingerprint,
+    create_urllib3_context,
+    resolve_cert_reqs,
+    resolve_ssl_version,
+    ssl_wrap_socket,
+)
+from .timeout import Timeout
+from .url import Url, parse_url
+from .wait import wait_for_read, wait_for_write
+
+__all__ = (
+    "IS_PYOPENSSL",
+    "SSLContext",
+    "ALPN_PROTOCOLS",
+    "Retry",
+    "Timeout",
+    "Url",
+    "assert_fingerprint",
+    "create_urllib3_context",
+    "is_connection_dropped",
+    "is_fp_closed",
+    "parse_url",
+    "make_headers",
+    "resolve_cert_reqs",
+    "resolve_ssl_version",
+    "ssl_wrap_socket",
+    "wait_for_read",
+    "wait_for_write",
+    "SKIP_HEADER",
+    "SKIPPABLE_HEADERS",
+)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..692a07ea4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-314.pyc
new file mode 100644
index 000000000..dd78552fd
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-314.pyc
new file mode 100644
index 000000000..404aa1ce4
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-314.pyc
new file mode 100644
index 000000000..32b593f0c
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-314.pyc
new file mode 100644
index 000000000..1306f4856
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-314.pyc
new file mode 100644
index 000000000..172a2d76a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-314.pyc
new file mode 100644
index 000000000..2b24a72db
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-314.pyc
new file mode 100644
index 000000000..19b791462
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-314.pyc
new file mode 100644
index 000000000..4e298b37f
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-314.pyc
new file mode 100644
index 000000000..b5dd7aa0d
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-314.pyc
new file mode 100644
index 000000000..d54b4e37a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/util.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/util.cpython-314.pyc
new file mode 100644
index 000000000..30e572882
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/util.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-314.pyc b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-314.pyc
new file mode 100644
index 000000000..bbe54b2d0
Binary files /dev/null and b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/connection.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/connection.py
new file mode 100644
index 000000000..f92519ee9
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/connection.py
@@ -0,0 +1,137 @@
+from __future__ import annotations
+
+import socket
+import typing
+
+from ..exceptions import LocationParseError
+from .timeout import _DEFAULT_TIMEOUT, _TYPE_TIMEOUT
+
+_TYPE_SOCKET_OPTIONS = list[tuple[int, int, typing.Union[int, bytes]]]
+
+if typing.TYPE_CHECKING:
+    from .._base_connection import BaseHTTPConnection
+
+
+def is_connection_dropped(conn: BaseHTTPConnection) -> bool:  # Platform-specific
+    """
+    Returns True if the connection is dropped and should be closed.
+    :param conn: :class:`urllib3.connection.HTTPConnection` object.
+    """
+    return not conn.is_connected
+
+
+# This function is copied from socket.py in the Python 2.7 standard
+# library test suite. Added to its signature is only `socket_options`.
+# One additional modification is that we avoid binding to IPv6 servers
+# discovered in DNS if the system doesn't have IPv6 functionality.
+def create_connection(
+    address: tuple[str, int],
+    timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+    source_address: tuple[str, int] | None = None,
+    socket_options: _TYPE_SOCKET_OPTIONS | None = None,
+) -> socket.socket:
+    """Connect to *address* and return the socket object.
+
+    Convenience function.  Connect to *address* (a 2-tuple ``(host,
+    port)``) and return the socket object.  Passing the optional
+    *timeout* parameter will set the timeout on the socket instance
+    before attempting to connect.  If no *timeout* is supplied, the
+    global default timeout setting returned by :func:`socket.getdefaulttimeout`
+    is used.  If *source_address* is set it must be a tuple of (host, port)
+    for the socket to bind as a source address before making the connection.
+    An host of '' or port 0 tells the OS to use the default.
+    """
+
+    host, port = address
+    if host.startswith("["):
+        host = host.strip("[]")
+    err = None
+
+    # Using the value from allowed_gai_family() in the context of getaddrinfo lets
+    # us select whether to work with IPv4 DNS records, IPv6 records, or both.
+    # The original create_connection function always returns all records.
+    family = allowed_gai_family()
+
+    try:
+        host.encode("idna")
+    except UnicodeError:
+        raise LocationParseError(f"'{host}', label empty or too long") from None
+
+    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
+        af, socktype, proto, canonname, sa = res
+        sock = None
+        try:
+            sock = socket.socket(af, socktype, proto)
+
+            # If provided, set socket level options before connecting.
+            _set_socket_options(sock, socket_options)
+
+            if timeout is not _DEFAULT_TIMEOUT:
+                sock.settimeout(timeout)
+            if source_address:
+                sock.bind(source_address)
+            sock.connect(sa)
+            # Break explicitly a reference cycle
+            err = None
+            return sock
+
+        except OSError as _:
+            err = _
+            if sock is not None:
+                sock.close()
+
+    if err is not None:
+        try:
+            raise err
+        finally:
+            # Break explicitly a reference cycle
+            err = None
+    else:
+        raise OSError("getaddrinfo returns an empty list")
+
+
+def _set_socket_options(
+    sock: socket.socket, options: _TYPE_SOCKET_OPTIONS | None
+) -> None:
+    if options is None:
+        return
+
+    for opt in options:
+        sock.setsockopt(*opt)
+
+
+def allowed_gai_family() -> socket.AddressFamily:
+    """This function is designed to work in the context of
+    getaddrinfo, where family=socket.AF_UNSPEC is the default and
+    will perform a DNS search for both IPv6 and IPv4 records."""
+
+    family = socket.AF_INET
+    if HAS_IPV6:
+        family = socket.AF_UNSPEC
+    return family
+
+
+def _has_ipv6(host: str) -> bool:
+    """Returns True if the system can bind an IPv6 address."""
+    sock = None
+    has_ipv6 = False
+
+    if socket.has_ipv6:
+        # has_ipv6 returns true if cPython was compiled with IPv6 support.
+        # It does not tell us if the system has IPv6 support enabled. To
+        # determine that we must bind to an IPv6 address.
+        # https://github.com/urllib3/urllib3/pull/611
+        # https://bugs.python.org/issue658327
+        try:
+            sock = socket.socket(socket.AF_INET6)
+            sock.bind((host, 0))
+            has_ipv6 = True
+        except Exception:
+            pass
+
+    if sock:
+        sock.close()
+    return has_ipv6
+
+
+HAS_IPV6 = _has_ipv6("::1")
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py
new file mode 100644
index 000000000..908fc6621
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py
@@ -0,0 +1,43 @@
+from __future__ import annotations
+
+import typing
+
+from .url import Url
+
+if typing.TYPE_CHECKING:
+    from ..connection import ProxyConfig
+
+
+def connection_requires_http_tunnel(
+    proxy_url: Url | None = None,
+    proxy_config: ProxyConfig | None = None,
+    destination_scheme: str | None = None,
+) -> bool:
+    """
+    Returns True if the connection requires an HTTP CONNECT through the proxy.
+
+    :param URL proxy_url:
+        URL of the proxy.
+    :param ProxyConfig proxy_config:
+        Proxy configuration from poolmanager.py
+    :param str destination_scheme:
+        The scheme of the destination. (i.e https, http, etc)
+    """
+    # If we're not using a proxy, no way to use a tunnel.
+    if proxy_url is None:
+        return False
+
+    # HTTP destinations never require tunneling, we always forward.
+    if destination_scheme == "http":
+        return False
+
+    # Support for forwarding with HTTPS proxies and HTTPS destinations.
+    if (
+        proxy_url.scheme == "https"
+        and proxy_config
+        and proxy_config.use_forwarding_for_https
+    ):
+        return False
+
+    # Otherwise always use a tunnel.
+    return True
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/request.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/request.py
new file mode 100644
index 000000000..b0d271777
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/request.py
@@ -0,0 +1,254 @@
+from __future__ import annotations
+
+import io
+import sys
+import typing
+from base64 import b64encode
+from enum import Enum
+
+from ..exceptions import UnrewindableBodyError
+from .util import to_bytes
+
+if typing.TYPE_CHECKING:
+    from typing import Final
+
+# Pass as a value within ``headers`` to skip
+# emitting some HTTP headers that are added automatically.
+# The only headers that are supported are ``Accept-Encoding``,
+# ``Host``, and ``User-Agent``.
+SKIP_HEADER = "@@@SKIP_HEADER@@@"
+SKIPPABLE_HEADERS = frozenset(["accept-encoding", "host", "user-agent"])
+
+ACCEPT_ENCODING = "gzip,deflate"
+
+try:
+    if sys.version_info >= (3, 14):
+        from compression import zstd as _unused_module_zstd  # noqa: F401
+    else:
+        from backports import zstd as _unused_module_zstd  # noqa: F401
+except ImportError:
+    pass
+else:
+    ACCEPT_ENCODING += ",zstd"
+
+
+class _TYPE_FAILEDTELL(Enum):
+    token = 0
+
+
+_FAILEDTELL: Final[_TYPE_FAILEDTELL] = _TYPE_FAILEDTELL.token
+
+_TYPE_BODY_POSITION = typing.Union[int, _TYPE_FAILEDTELL]
+
+# When sending a request with these methods we aren't expecting
+# a body so don't need to set an explicit 'Content-Length: 0'
+# The reason we do this in the negative instead of tracking methods
+# which 'should' have a body is because unknown methods should be
+# treated as if they were 'POST' which *does* expect a body.
+_METHODS_NOT_EXPECTING_BODY = {"GET", "HEAD", "DELETE", "TRACE", "OPTIONS", "CONNECT"}
+
+
+def make_headers(
+    keep_alive: bool | None = None,
+    accept_encoding: bool | list[str] | str | None = None,
+    user_agent: str | None = None,
+    basic_auth: str | None = None,
+    proxy_basic_auth: str | None = None,
+    disable_cache: bool | None = None,
+) -> dict[str, str]:
+    """
+    Shortcuts for generating request headers.
+
+    :param keep_alive:
+        If ``True``, adds 'connection: keep-alive' header.
+
+    :param accept_encoding:
+        Can be a boolean, list, or string.
+        ``True`` translates to 'gzip,deflate'.  If the dependencies for
+        Brotli (either the ``brotli`` or ``brotlicffi`` package) and/or
+        Zstandard (the ``backports.zstd`` package for Python before 3.14)
+        algorithms are installed, then their encodings are
+        included in the string ('br' and 'zstd', respectively).
+        List will get joined by comma.
+        String will be used as provided.
+
+    :param user_agent:
+        String representing the user-agent you want, such as
+        "python-urllib3/0.6"
+
+    :param basic_auth:
+        Colon-separated username:password string for 'authorization: basic ...'
+        auth header.
+
+    :param proxy_basic_auth:
+        Colon-separated username:password string for 'proxy-authorization: basic ...'
+        auth header.
+
+    :param disable_cache:
+        If ``True``, adds 'cache-control: no-cache' header.
+
+    Example:
+
+    .. code-block:: python
+
+        from pip._vendor import urllib3
+
+        print(urllib3.util.make_headers(keep_alive=True, user_agent="Batman/1.0"))
+        # {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
+        print(urllib3.util.make_headers(accept_encoding=True))
+        # {'accept-encoding': 'gzip,deflate'}
+    """
+    headers: dict[str, str] = {}
+    if accept_encoding:
+        if isinstance(accept_encoding, str):
+            pass
+        elif isinstance(accept_encoding, list):
+            accept_encoding = ",".join(accept_encoding)
+        else:
+            accept_encoding = ACCEPT_ENCODING
+        headers["accept-encoding"] = accept_encoding
+
+    if user_agent:
+        headers["user-agent"] = user_agent
+
+    if keep_alive:
+        headers["connection"] = "keep-alive"
+
+    if basic_auth:
+        headers["authorization"] = (
+            f"Basic {b64encode(basic_auth.encode('latin-1')).decode()}"
+        )
+
+    if proxy_basic_auth:
+        headers["proxy-authorization"] = (
+            f"Basic {b64encode(proxy_basic_auth.encode('latin-1')).decode()}"
+        )
+
+    if disable_cache:
+        headers["cache-control"] = "no-cache"
+
+    return headers
+
+
+def set_file_position(
+    body: typing.Any, pos: _TYPE_BODY_POSITION | None
+) -> _TYPE_BODY_POSITION | None:
+    """
+    If a position is provided, move file to that point.
+    Otherwise, we'll attempt to record a position for future use.
+    """
+    if pos is not None:
+        rewind_body(body, pos)
+    elif getattr(body, "tell", None) is not None:
+        try:
+            pos = body.tell()
+        except OSError:
+            # This differentiates from None, allowing us to catch
+            # a failed `tell()` later when trying to rewind the body.
+            pos = _FAILEDTELL
+
+    return pos
+
+
+def rewind_body(body: typing.IO[typing.AnyStr], body_pos: _TYPE_BODY_POSITION) -> None:
+    """
+    Attempt to rewind body to a certain position.
+    Primarily used for request redirects and retries.
+
+    :param body:
+        File-like object that supports seek.
+
+    :param int pos:
+        Position to seek to in file.
+    """
+    body_seek = getattr(body, "seek", None)
+    if body_seek is not None and isinstance(body_pos, int):
+        try:
+            body_seek(body_pos)
+        except OSError as e:
+            raise UnrewindableBodyError(
+                "An error occurred when rewinding request body for redirect/retry."
+            ) from e
+    elif body_pos is _FAILEDTELL:
+        raise UnrewindableBodyError(
+            "Unable to record file position for rewinding "
+            "request body during a redirect/retry."
+        )
+    else:
+        raise ValueError(
+            f"body_pos must be of type integer, instead it was {type(body_pos)}."
+        )
+
+
+class ChunksAndContentLength(typing.NamedTuple):
+    chunks: typing.Iterable[bytes] | None
+    content_length: int | None
+
+
+def body_to_chunks(
+    body: typing.Any | None, method: str, blocksize: int
+) -> ChunksAndContentLength:
+    """Takes the HTTP request method, body, and blocksize and
+    transforms them into an iterable of chunks to pass to
+    socket.sendall() and an optional 'Content-Length' header.
+
+    A 'Content-Length' of 'None' indicates the length of the body
+    can't be determined so should use 'Transfer-Encoding: chunked'
+    for framing instead.
+    """
+
+    chunks: typing.Iterable[bytes] | None
+    content_length: int | None
+
+    # No body, we need to make a recommendation on 'Content-Length'
+    # based on whether that request method is expected to have
+    # a body or not.
+    if body is None:
+        chunks = None
+        if method.upper() not in _METHODS_NOT_EXPECTING_BODY:
+            content_length = 0
+        else:
+            content_length = None
+
+    # Bytes or strings become bytes
+    elif isinstance(body, (str, bytes)):
+        chunks = (to_bytes(body),)
+        content_length = len(chunks[0])
+
+    # File-like object, TODO: use seek() and tell() for length?
+    elif hasattr(body, "read"):
+
+        def chunk_readable() -> typing.Iterable[bytes]:
+            encode = isinstance(body, io.TextIOBase)
+            while True:
+                datablock = body.read(blocksize)
+                if not datablock:
+                    break
+                if encode:
+                    datablock = datablock.encode("utf-8")
+                yield datablock
+
+        chunks = chunk_readable()
+        content_length = None
+
+    # Otherwise we need to start checking via duck-typing.
+    else:
+        try:
+            # Check if the body implements the buffer API.
+            mv = memoryview(body)
+        except TypeError:
+            try:
+                # Check if the body is an iterable
+                chunks = iter(body)
+                content_length = None
+            except TypeError:
+                raise TypeError(
+                    f"'body' must be a bytes-like object, file-like "
+                    f"object, or iterable. Instead was {body!r}"
+                ) from None
+        else:
+            # Since it implements the buffer API can be passed directly to socket.sendall()
+            chunks = (body,)
+            content_length = mv.nbytes
+
+    return ChunksAndContentLength(chunks=chunks, content_length=content_length)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/response.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/response.py
new file mode 100644
index 000000000..0f4578696
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/response.py
@@ -0,0 +1,101 @@
+from __future__ import annotations
+
+import http.client as httplib
+from email.errors import MultipartInvariantViolationDefect, StartBoundaryNotFoundDefect
+
+from ..exceptions import HeaderParsingError
+
+
+def is_fp_closed(obj: object) -> bool:
+    """
+    Checks whether a given file-like object is closed.
+
+    :param obj:
+        The file-like object to check.
+    """
+
+    try:
+        # Check `isclosed()` first, in case Python3 doesn't set `closed`.
+        # GH Issue #928
+        return obj.isclosed()  # type: ignore[no-any-return, attr-defined]
+    except AttributeError:
+        pass
+
+    try:
+        # Check via the official file-like-object way.
+        return obj.closed  # type: ignore[no-any-return, attr-defined]
+    except AttributeError:
+        pass
+
+    try:
+        # Check if the object is a container for another file-like object that
+        # gets released on exhaustion (e.g. HTTPResponse).
+        return obj.fp is None  # type: ignore[attr-defined]
+    except AttributeError:
+        pass
+
+    raise ValueError("Unable to determine whether fp is closed.")
+
+
+def assert_header_parsing(headers: httplib.HTTPMessage) -> None:
+    """
+    Asserts whether all headers have been successfully parsed.
+    Extracts encountered errors from the result of parsing headers.
+
+    Only works on Python 3.
+
+    :param http.client.HTTPMessage headers: Headers to verify.
+
+    :raises urllib3.exceptions.HeaderParsingError:
+        If parsing errors are found.
+    """
+
+    # This will fail silently if we pass in the wrong kind of parameter.
+    # To make debugging easier add an explicit check.
+    if not isinstance(headers, httplib.HTTPMessage):
+        raise TypeError(f"expected httplib.Message, got {type(headers)}.")
+
+    unparsed_data = None
+
+    # get_payload is actually email.message.Message.get_payload;
+    # we're only interested in the result if it's not a multipart message
+    if not headers.is_multipart():
+        payload = headers.get_payload()
+
+        if isinstance(payload, (bytes, str)):
+            unparsed_data = payload
+
+    # httplib is assuming a response body is available
+    # when parsing headers even when httplib only sends
+    # header data to parse_headers() This results in
+    # defects on multipart responses in particular.
+    # See: https://github.com/urllib3/urllib3/issues/800
+
+    # So we ignore the following defects:
+    # - StartBoundaryNotFoundDefect:
+    #     The claimed start boundary was never found.
+    # - MultipartInvariantViolationDefect:
+    #     A message claimed to be a multipart but no subparts were found.
+    defects = [
+        defect
+        for defect in headers.defects
+        if not isinstance(
+            defect, (StartBoundaryNotFoundDefect, MultipartInvariantViolationDefect)
+        )
+    ]
+
+    if defects or unparsed_data:
+        raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
+
+
+def is_response_to_head(response: httplib.HTTPResponse) -> bool:
+    """
+    Checks whether the request of a response has been a HEAD-request.
+
+    :param http.client.HTTPResponse response:
+        Response to check if the originating request
+        used 'HEAD' as a method.
+    """
+    # FIXME: Can we do this somehow without accessing private httplib _method?
+    method_str = response._method  # type: str  # type: ignore[attr-defined]
+    return method_str.upper() == "HEAD"
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/retry.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/retry.py
new file mode 100644
index 000000000..b21b4b64e
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/retry.py
@@ -0,0 +1,549 @@
+from __future__ import annotations
+
+import email
+import logging
+import random
+import re
+import time
+import typing
+from itertools import takewhile
+from types import TracebackType
+
+from ..exceptions import (
+    ConnectTimeoutError,
+    InvalidHeader,
+    MaxRetryError,
+    ProtocolError,
+    ProxyError,
+    ReadTimeoutError,
+    ResponseError,
+)
+from .util import reraise
+
+if typing.TYPE_CHECKING:
+    from typing_extensions import Self
+
+    from ..connectionpool import ConnectionPool
+    from ..response import BaseHTTPResponse
+
+log = logging.getLogger(__name__)
+
+
+# Data structure for representing the metadata of requests that result in a retry.
+class RequestHistory(typing.NamedTuple):
+    method: str | None
+    url: str | None
+    error: Exception | None
+    status: int | None
+    redirect_location: str | None
+
+
+class Retry:
+    """Retry configuration.
+
+    Each retry attempt will create a new Retry object with updated values, so
+    they can be safely reused.
+
+    Retries can be defined as a default for a pool:
+
+    .. code-block:: python
+
+        retries = Retry(connect=5, read=2, redirect=5)
+        http = PoolManager(retries=retries)
+        response = http.request("GET", "https://example.com/")
+
+    Or per-request (which overrides the default for the pool):
+
+    .. code-block:: python
+
+        response = http.request("GET", "https://example.com/", retries=Retry(10))
+
+    Retries can be disabled by passing ``False``:
+
+    .. code-block:: python
+
+        response = http.request("GET", "https://example.com/", retries=False)
+
+    Errors will be wrapped in :class:`~urllib3.exceptions.MaxRetryError` unless
+    retries are disabled, in which case the causing exception will be raised.
+
+    :param int total:
+        Total number of retries to allow. Takes precedence over other counts.
+
+        Set to ``None`` to remove this constraint and fall back on other
+        counts.
+
+        Set to ``0`` to fail on the first retry.
+
+        Set to ``False`` to disable and imply ``raise_on_redirect=False``.
+
+    :param int connect:
+        How many connection-related errors to retry on.
+
+        These are errors raised before the request is sent to the remote server,
+        which we assume has not triggered the server to process the request.
+
+        Set to ``0`` to fail on the first retry of this type.
+
+    :param int read:
+        How many times to retry on read errors.
+
+        These errors are raised after the request was sent to the server, so the
+        request may have side-effects.
+
+        Set to ``0`` to fail on the first retry of this type.
+
+    :param int redirect:
+        How many redirects to perform. Limit this to avoid infinite redirect
+        loops.
+
+        A redirect is a HTTP response with a status code 301, 302, 303, 307 or
+        308.
+
+        Set to ``0`` to fail on the first retry of this type.
+
+        Set to ``False`` to disable and imply ``raise_on_redirect=False``.
+
+    :param int status:
+        How many times to retry on bad status codes.
+
+        These are retries made on responses, where status code matches
+        ``status_forcelist``.
+
+        Set to ``0`` to fail on the first retry of this type.
+
+    :param int other:
+        How many times to retry on other errors.
+
+        Other errors are errors that are not connect, read, redirect or status errors.
+        These errors might be raised after the request was sent to the server, so the
+        request might have side-effects.
+
+        Set to ``0`` to fail on the first retry of this type.
+
+        If ``total`` is not set, it's a good idea to set this to 0 to account
+        for unexpected edge cases and avoid infinite retry loops.
+
+    :param Collection allowed_methods:
+        Set of uppercased HTTP method verbs that we should retry on.
+
+        By default, we only retry on methods which are considered to be
+        idempotent (multiple requests with the same parameters end with the
+        same state). See :attr:`Retry.DEFAULT_ALLOWED_METHODS`.
+
+        Set to a ``None`` value to retry on any verb.
+
+    :param Collection status_forcelist:
+        A set of integer HTTP status codes that we should force a retry on.
+        A retry is initiated if the request method is in ``allowed_methods``
+        and the response status code is in ``status_forcelist``.
+
+        By default, this is disabled with ``None``.
+
+    :param float backoff_factor:
+        A backoff factor to apply between attempts after the second try
+        (most errors are resolved immediately by a second try without a
+        delay). urllib3 will sleep for::
+
+            {backoff factor} * (2 ** ({number of previous retries}))
+
+        seconds. If `backoff_jitter` is non-zero, this sleep is extended by::
+
+            random.uniform(0, {backoff jitter})
+
+        seconds. For example, if the backoff_factor is 0.1, then :func:`Retry.sleep` will
+        sleep for [0.0s, 0.2s, 0.4s, 0.8s, ...] between retries. No backoff will ever
+        be longer than `backoff_max`.
+
+        By default, backoff is disabled (factor set to 0).
+
+    :param bool raise_on_redirect: Whether, if the number of redirects is
+        exhausted, to raise a MaxRetryError, or to return a response with a
+        response code in the 3xx range.
+
+    :param bool raise_on_status: Similar meaning to ``raise_on_redirect``:
+        whether we should raise an exception, or return a response,
+        if status falls in ``status_forcelist`` range and retries have
+        been exhausted.
+
+    :param tuple history: The history of the request encountered during
+        each call to :meth:`~Retry.increment`. The list is in the order
+        the requests occurred. Each list item is of class :class:`RequestHistory`.
+
+    :param bool respect_retry_after_header:
+        Whether to respect Retry-After header on status codes defined as
+        :attr:`Retry.RETRY_AFTER_STATUS_CODES` or not.
+
+    :param Collection remove_headers_on_redirect:
+        Sequence of headers to remove from the request when a response
+        indicating a redirect is returned before firing off the redirected
+        request.
+
+    :param int retry_after_max: Number of seconds to allow as the maximum for
+        Retry-After headers. Defaults to :attr:`Retry.DEFAULT_RETRY_AFTER_MAX`.
+        Any Retry-After headers larger than this value will be limited to this
+        value.
+    """
+
+    #: Default methods to be used for ``allowed_methods``
+    DEFAULT_ALLOWED_METHODS = frozenset(
+        ["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE"]
+    )
+
+    #: Default status codes to be used for ``status_forcelist``
+    RETRY_AFTER_STATUS_CODES = frozenset([413, 429, 503])
+
+    #: Default headers to be used for ``remove_headers_on_redirect``
+    DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset(
+        ["Cookie", "Authorization", "Proxy-Authorization"]
+    )
+
+    #: Default maximum backoff time.
+    DEFAULT_BACKOFF_MAX = 120
+
+    # This is undocumented in the RFC. Setting to 6 hours matches other popular libraries.
+    #: Default maximum allowed value for Retry-After headers in seconds
+    DEFAULT_RETRY_AFTER_MAX: typing.Final[int] = 21600
+
+    # Backward compatibility; assigned outside of the class.
+    DEFAULT: typing.ClassVar[Retry]
+
+    def __init__(
+        self,
+        total: bool | int | None = 10,
+        connect: int | None = None,
+        read: int | None = None,
+        redirect: bool | int | None = None,
+        status: int | None = None,
+        other: int | None = None,
+        allowed_methods: typing.Collection[str] | None = DEFAULT_ALLOWED_METHODS,
+        status_forcelist: typing.Collection[int] | None = None,
+        backoff_factor: float = 0,
+        backoff_max: float = DEFAULT_BACKOFF_MAX,
+        raise_on_redirect: bool = True,
+        raise_on_status: bool = True,
+        history: tuple[RequestHistory, ...] | None = None,
+        respect_retry_after_header: bool = True,
+        remove_headers_on_redirect: typing.Collection[
+            str
+        ] = DEFAULT_REMOVE_HEADERS_ON_REDIRECT,
+        backoff_jitter: float = 0.0,
+        retry_after_max: int = DEFAULT_RETRY_AFTER_MAX,
+    ) -> None:
+        self.total = total
+        self.connect = connect
+        self.read = read
+        self.status = status
+        self.other = other
+
+        if redirect is False or total is False:
+            redirect = 0
+            raise_on_redirect = False
+
+        self.redirect = redirect
+        self.status_forcelist = status_forcelist or set()
+        self.allowed_methods = allowed_methods
+        self.backoff_factor = backoff_factor
+        self.backoff_max = backoff_max
+        self.retry_after_max = retry_after_max
+        self.raise_on_redirect = raise_on_redirect
+        self.raise_on_status = raise_on_status
+        self.history = history or ()
+        self.respect_retry_after_header = respect_retry_after_header
+        self.remove_headers_on_redirect = frozenset(
+            h.lower() for h in remove_headers_on_redirect
+        )
+        self.backoff_jitter = backoff_jitter
+
+    def new(self, **kw: typing.Any) -> Self:
+        params = dict(
+            total=self.total,
+            connect=self.connect,
+            read=self.read,
+            redirect=self.redirect,
+            status=self.status,
+            other=self.other,
+            allowed_methods=self.allowed_methods,
+            status_forcelist=self.status_forcelist,
+            backoff_factor=self.backoff_factor,
+            backoff_max=self.backoff_max,
+            retry_after_max=self.retry_after_max,
+            raise_on_redirect=self.raise_on_redirect,
+            raise_on_status=self.raise_on_status,
+            history=self.history,
+            remove_headers_on_redirect=self.remove_headers_on_redirect,
+            respect_retry_after_header=self.respect_retry_after_header,
+            backoff_jitter=self.backoff_jitter,
+        )
+
+        params.update(kw)
+        return type(self)(**params)  # type: ignore[arg-type]
+
+    @classmethod
+    def from_int(
+        cls,
+        retries: Retry | bool | int | None,
+        redirect: bool | int | None = True,
+        default: Retry | bool | int | None = None,
+    ) -> Retry:
+        """Backwards-compatibility for the old retries format."""
+        if retries is None:
+            retries = default if default is not None else cls.DEFAULT
+
+        if isinstance(retries, Retry):
+            return retries
+
+        redirect = bool(redirect) and None
+        new_retries = cls(retries, redirect=redirect)
+        log.debug("Converted retries value: %r -> %r", retries, new_retries)
+        return new_retries
+
+    def get_backoff_time(self) -> float:
+        """Formula for computing the current backoff
+
+        :rtype: float
+        """
+        # We want to consider only the last consecutive errors sequence (Ignore redirects).
+        consecutive_errors_len = len(
+            list(
+                takewhile(lambda x: x.redirect_location is None, reversed(self.history))
+            )
+        )
+        if consecutive_errors_len <= 1:
+            return 0
+
+        backoff_value = self.backoff_factor * (2 ** (consecutive_errors_len - 1))
+        if self.backoff_jitter != 0.0:
+            backoff_value += random.random() * self.backoff_jitter
+        return float(max(0, min(self.backoff_max, backoff_value)))
+
+    def parse_retry_after(self, retry_after: str) -> float:
+        seconds: float
+        # Whitespace: https://tools.ietf.org/html/rfc7230#section-3.2.4
+        if re.match(r"^\s*[0-9]+\s*$", retry_after):
+            seconds = int(retry_after)
+        else:
+            retry_date_tuple = email.utils.parsedate_tz(retry_after)
+            if retry_date_tuple is None:
+                raise InvalidHeader(f"Invalid Retry-After header: {retry_after}")
+
+            retry_date = email.utils.mktime_tz(retry_date_tuple)
+            seconds = retry_date - time.time()
+
+        seconds = max(seconds, 0)
+
+        # Check the seconds do not exceed the specified maximum
+        if seconds > self.retry_after_max:
+            seconds = self.retry_after_max
+
+        return seconds
+
+    def get_retry_after(self, response: BaseHTTPResponse) -> float | None:
+        """Get the value of Retry-After in seconds."""
+
+        retry_after = response.headers.get("Retry-After")
+
+        if retry_after is None:
+            return None
+
+        return self.parse_retry_after(retry_after)
+
+    def sleep_for_retry(self, response: BaseHTTPResponse) -> bool:
+        retry_after = self.get_retry_after(response)
+        if retry_after:
+            time.sleep(retry_after)
+            return True
+
+        return False
+
+    def _sleep_backoff(self) -> None:
+        backoff = self.get_backoff_time()
+        if backoff <= 0:
+            return
+        time.sleep(backoff)
+
+    def sleep(self, response: BaseHTTPResponse | None = None) -> None:
+        """Sleep between retry attempts.
+
+        This method will respect a server's ``Retry-After`` response header
+        and sleep the duration of the time requested. If that is not present, it
+        will use an exponential backoff. By default, the backoff factor is 0 and
+        this method will return immediately.
+        """
+
+        if self.respect_retry_after_header and response:
+            slept = self.sleep_for_retry(response)
+            if slept:
+                return
+
+        self._sleep_backoff()
+
+    def _is_connection_error(self, err: Exception) -> bool:
+        """Errors when we're fairly sure that the server did not receive the
+        request, so it should be safe to retry.
+        """
+        if isinstance(err, ProxyError):
+            err = err.original_error
+        return isinstance(err, ConnectTimeoutError)
+
+    def _is_read_error(self, err: Exception) -> bool:
+        """Errors that occur after the request has been started, so we should
+        assume that the server began processing it.
+        """
+        return isinstance(err, (ReadTimeoutError, ProtocolError))
+
+    def _is_method_retryable(self, method: str) -> bool:
+        """Checks if a given HTTP method should be retried upon, depending if
+        it is included in the allowed_methods
+        """
+        if self.allowed_methods and method.upper() not in self.allowed_methods:
+            return False
+        return True
+
+    def is_retry(
+        self, method: str, status_code: int, has_retry_after: bool = False
+    ) -> bool:
+        """Is this method/status code retryable? (Based on allowlists and control
+        variables such as the number of total retries to allow, whether to
+        respect the Retry-After header, whether this header is present, and
+        whether the returned status code is on the list of status codes to
+        be retried upon on the presence of the aforementioned header)
+        """
+        if not self._is_method_retryable(method):
+            return False
+
+        if self.status_forcelist and status_code in self.status_forcelist:
+            return True
+
+        return bool(
+            self.total
+            and self.respect_retry_after_header
+            and has_retry_after
+            and (status_code in self.RETRY_AFTER_STATUS_CODES)
+        )
+
+    def is_exhausted(self) -> bool:
+        """Are we out of retries?"""
+        retry_counts = [
+            x
+            for x in (
+                self.total,
+                self.connect,
+                self.read,
+                self.redirect,
+                self.status,
+                self.other,
+            )
+            if x
+        ]
+        if not retry_counts:
+            return False
+
+        return min(retry_counts) < 0
+
+    def increment(
+        self,
+        method: str | None = None,
+        url: str | None = None,
+        response: BaseHTTPResponse | None = None,
+        error: Exception | None = None,
+        _pool: ConnectionPool | None = None,
+        _stacktrace: TracebackType | None = None,
+    ) -> Self:
+        """Return a new Retry object with incremented retry counters.
+
+        :param response: A response object, or None, if the server did not
+            return a response.
+        :type response: :class:`~urllib3.response.BaseHTTPResponse`
+        :param Exception error: An error encountered during the request, or
+            None if the response was received successfully.
+
+        :return: A new ``Retry`` object.
+        """
+        if self.total is False and error:
+            # Disabled, indicate to re-raise the error.
+            raise reraise(type(error), error, _stacktrace)
+
+        total = self.total
+        if total is not None:
+            total -= 1
+
+        connect = self.connect
+        read = self.read
+        redirect = self.redirect
+        status_count = self.status
+        other = self.other
+        cause = "unknown"
+        status = None
+        redirect_location = None
+
+        if error and self._is_connection_error(error):
+            # Connect retry?
+            if connect is False:
+                raise reraise(type(error), error, _stacktrace)
+            elif connect is not None:
+                connect -= 1
+
+        elif error and self._is_read_error(error):
+            # Read retry?
+            if read is False or method is None or not self._is_method_retryable(method):
+                raise reraise(type(error), error, _stacktrace)
+            elif read is not None:
+                read -= 1
+
+        elif error:
+            # Other retry?
+            if other is not None:
+                other -= 1
+
+        elif response and response.get_redirect_location():
+            # Redirect retry?
+            if redirect is not None:
+                redirect -= 1
+            cause = "too many redirects"
+            response_redirect_location = response.get_redirect_location()
+            if response_redirect_location:
+                redirect_location = response_redirect_location
+            status = response.status
+
+        else:
+            # Incrementing because of a server error like a 500 in
+            # status_forcelist and the given method is in the allowed_methods
+            cause = ResponseError.GENERIC_ERROR
+            if response and response.status:
+                if status_count is not None:
+                    status_count -= 1
+                cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
+                status = response.status
+
+        history = self.history + (
+            RequestHistory(method, url, error, status, redirect_location),
+        )
+
+        new_retry = self.new(
+            total=total,
+            connect=connect,
+            read=read,
+            redirect=redirect,
+            status=status_count,
+            other=other,
+            history=history,
+        )
+
+        if new_retry.is_exhausted():
+            reason = error or ResponseError(cause)
+            raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
+
+        log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
+
+        return new_retry
+
+    def __repr__(self) -> str:
+        return (
+            f"{type(self).__name__}(total={self.total}, connect={self.connect}, "
+            f"read={self.read}, redirect={self.redirect}, status={self.status})"
+        )
+
+
+# For backwards compatibility (equivalent to pre-v1.9):
+Retry.DEFAULT = Retry(3)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py
new file mode 100644
index 000000000..56fe9093a
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py
@@ -0,0 +1,527 @@
+from __future__ import annotations
+
+import hashlib
+import hmac
+import os
+import socket
+import sys
+import typing
+import warnings
+from binascii import unhexlify
+
+from ..exceptions import ProxySchemeUnsupported, SSLError
+from .url import _BRACELESS_IPV6_ADDRZ_RE, _IPV4_RE
+
+SSLContext = None
+SSLTransport = None
+HAS_NEVER_CHECK_COMMON_NAME = False
+IS_PYOPENSSL = False
+ALPN_PROTOCOLS = ["http/1.1"]
+
+_TYPE_VERSION_INFO = tuple[int, int, int, str, int]
+
+# Maps the length of a digest to a possible hash function producing this digest
+HASHFUNC_MAP = {
+    length: getattr(hashlib, algorithm, None)
+    for length, algorithm in ((32, "md5"), (40, "sha1"), (64, "sha256"))
+}
+
+
+def _is_bpo_43522_fixed(
+    implementation_name: str,
+    version_info: _TYPE_VERSION_INFO,
+    pypy_version_info: _TYPE_VERSION_INFO | None,
+) -> bool:
+    """Return True for CPython 3.9.3+ or 3.10+ and PyPy 7.3.8+ where
+    setting SSLContext.hostname_checks_common_name to False works.
+
+    Outside of CPython and PyPy we don't know which implementations work
+    or not so we conservatively use our hostname matching as we know that works
+    on all implementations.
+
+    https://github.com/urllib3/urllib3/issues/2192#issuecomment-821832963
+    https://foss.heptapod.net/pypy/pypy/-/issues/3539
+    """
+    if implementation_name == "pypy":
+        # https://foss.heptapod.net/pypy/pypy/-/issues/3129
+        return pypy_version_info >= (7, 3, 8)  # type: ignore[operator]
+    elif implementation_name == "cpython":
+        major_minor = version_info[:2]
+        micro = version_info[2]
+        return (major_minor == (3, 9) and micro >= 3) or major_minor >= (3, 10)
+    else:  # Defensive:
+        return False
+
+
+def _is_has_never_check_common_name_reliable(
+    openssl_version: str,
+    openssl_version_number: int,
+    implementation_name: str,
+    version_info: _TYPE_VERSION_INFO,
+    pypy_version_info: _TYPE_VERSION_INFO | None,
+) -> bool:
+    # As of May 2023, all released versions of LibreSSL fail to reject certificates with
+    # only common names, see https://github.com/urllib3/urllib3/pull/3024
+    is_openssl = openssl_version.startswith("OpenSSL ")
+    # Before fixing OpenSSL issue #14579, the SSL_new() API was not copying hostflags
+    # like X509_CHECK_FLAG_NEVER_CHECK_SUBJECT, which tripped up CPython.
+    # https://github.com/openssl/openssl/issues/14579
+    # This was released in OpenSSL 1.1.1l+ (>=0x101010cf)
+    is_openssl_issue_14579_fixed = openssl_version_number >= 0x101010CF
+
+    return is_openssl and (
+        is_openssl_issue_14579_fixed
+        or _is_bpo_43522_fixed(implementation_name, version_info, pypy_version_info)
+    )
+
+
+if typing.TYPE_CHECKING:
+    from ssl import VerifyMode
+    from typing import TypedDict
+
+    from .ssltransport import SSLTransport as SSLTransportType
+
+    class _TYPE_PEER_CERT_RET_DICT(TypedDict, total=False):
+        subjectAltName: tuple[tuple[str, str], ...]
+        subject: tuple[tuple[tuple[str, str], ...], ...]
+        serialNumber: str
+
+
+# Mapping from 'ssl.PROTOCOL_TLSX' to 'TLSVersion.X'
+_SSL_VERSION_TO_TLS_VERSION: dict[int, int] = {}
+
+try:  # Do we have ssl at all?
+    import ssl
+    from ssl import (  # type: ignore[assignment]
+        CERT_REQUIRED,
+        HAS_NEVER_CHECK_COMMON_NAME,
+        OP_NO_COMPRESSION,
+        OP_NO_TICKET,
+        OPENSSL_VERSION,
+        OPENSSL_VERSION_NUMBER,
+        PROTOCOL_TLS,
+        PROTOCOL_TLS_CLIENT,
+        VERIFY_X509_STRICT,
+        OP_NO_SSLv2,
+        OP_NO_SSLv3,
+        SSLContext,
+        TLSVersion,
+    )
+
+    PROTOCOL_SSLv23 = PROTOCOL_TLS
+
+    # Needed for Python 3.9 which does not define this
+    VERIFY_X509_PARTIAL_CHAIN = getattr(ssl, "VERIFY_X509_PARTIAL_CHAIN", 0x80000)
+
+    # Setting SSLContext.hostname_checks_common_name = False didn't work before CPython
+    # 3.9.3, and 3.10 (but OK on PyPy) or OpenSSL 1.1.1l+
+    if HAS_NEVER_CHECK_COMMON_NAME and not _is_has_never_check_common_name_reliable(
+        OPENSSL_VERSION,
+        OPENSSL_VERSION_NUMBER,
+        sys.implementation.name,
+        sys.version_info,
+        sys.pypy_version_info if sys.implementation.name == "pypy" else None,  # type: ignore[attr-defined]
+    ):  # Defensive: for Python < 3.9.3
+        HAS_NEVER_CHECK_COMMON_NAME = False
+
+    # Need to be careful here in case old TLS versions get
+    # removed in future 'ssl' module implementations.
+    for attr in ("TLSv1", "TLSv1_1", "TLSv1_2"):
+        try:
+            _SSL_VERSION_TO_TLS_VERSION[getattr(ssl, f"PROTOCOL_{attr}")] = getattr(
+                TLSVersion, attr
+            )
+        except AttributeError:  # Defensive:
+            continue
+
+    from .ssltransport import SSLTransport  # type: ignore[assignment]
+except ImportError:
+    OP_NO_COMPRESSION = 0x20000  # type: ignore[assignment, misc]
+    OP_NO_TICKET = 0x4000  # type: ignore[assignment, misc]
+    OP_NO_SSLv2 = 0x1000000  # type: ignore[assignment, misc]
+    OP_NO_SSLv3 = 0x2000000  # type: ignore[assignment, misc]
+    PROTOCOL_SSLv23 = PROTOCOL_TLS = 2  # type: ignore[assignment, misc]
+    PROTOCOL_TLS_CLIENT = 16  # type: ignore[assignment, misc]
+    VERIFY_X509_PARTIAL_CHAIN = 0x80000
+    VERIFY_X509_STRICT = 0x20  # type: ignore[assignment, misc]
+
+
+_TYPE_PEER_CERT_RET = typing.Union["_TYPE_PEER_CERT_RET_DICT", bytes, None]
+
+
+def assert_fingerprint(cert: bytes | None, fingerprint: str) -> None:
+    """
+    Checks if given fingerprint matches the supplied certificate.
+
+    :param cert:
+        Certificate as bytes object.
+    :param fingerprint:
+        Fingerprint as string of hexdigits, can be interspersed by colons.
+    """
+
+    if cert is None:
+        raise SSLError("No certificate for the peer.")
+
+    fingerprint = fingerprint.replace(":", "").lower()
+    digest_length = len(fingerprint)
+    if digest_length not in HASHFUNC_MAP:
+        raise SSLError(f"Fingerprint of invalid length: {fingerprint}")
+    hashfunc = HASHFUNC_MAP.get(digest_length)
+    if hashfunc is None:
+        raise SSLError(
+            f"Hash function implementation unavailable for fingerprint length: {digest_length}"
+        )
+
+    # We need encode() here for py32; works on py2 and p33.
+    fingerprint_bytes = unhexlify(fingerprint.encode())
+
+    cert_digest = hashfunc(cert).digest()
+
+    if not hmac.compare_digest(cert_digest, fingerprint_bytes):
+        raise SSLError(
+            f'Fingerprints did not match. Expected "{fingerprint}", got "{cert_digest.hex()}"'
+        )
+
+
+def resolve_cert_reqs(candidate: None | int | str) -> VerifyMode:
+    """
+    Resolves the argument to a numeric constant, which can be passed to
+    the wrap_socket function/method from the ssl module.
+    Defaults to :data:`ssl.CERT_REQUIRED`.
+    If given a string it is assumed to be the name of the constant in the
+    :mod:`ssl` module or its abbreviation.
+    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
+    If it's neither `None` nor a string we assume it is already the numeric
+    constant which can directly be passed to wrap_socket.
+    """
+    if candidate is None:
+        return CERT_REQUIRED
+
+    if isinstance(candidate, str):
+        res = getattr(ssl, candidate, None)
+        if res is None:
+            res = getattr(ssl, "CERT_" + candidate)
+        return res  # type: ignore[no-any-return]
+
+    return candidate  # type: ignore[return-value]
+
+
+def resolve_ssl_version(candidate: None | int | str) -> int:
+    """
+    like resolve_cert_reqs
+    """
+    if candidate is None:
+        return PROTOCOL_TLS
+
+    if isinstance(candidate, str):
+        res = getattr(ssl, candidate, None)
+        if res is None:
+            res = getattr(ssl, "PROTOCOL_" + candidate)
+        return typing.cast(int, res)
+
+    return candidate
+
+
+def create_urllib3_context(
+    ssl_version: int | None = None,
+    cert_reqs: int | None = None,
+    options: int | None = None,
+    ciphers: str | None = None,
+    ssl_minimum_version: int | None = None,
+    ssl_maximum_version: int | None = None,
+    verify_flags: int | None = None,
+) -> ssl.SSLContext:
+    """Creates and configures an :class:`ssl.SSLContext` instance for use with urllib3.
+
+    :param ssl_version:
+        The desired protocol version to use. This will default to
+        PROTOCOL_SSLv23 which will negotiate the highest protocol that both
+        the server and your installation of OpenSSL support.
+
+        This parameter is deprecated instead use 'ssl_minimum_version'.
+    :param ssl_minimum_version:
+        The minimum version of TLS to be used. Use the 'ssl.TLSVersion' enum for specifying the value.
+    :param ssl_maximum_version:
+        The maximum version of TLS to be used. Use the 'ssl.TLSVersion' enum for specifying the value.
+        Not recommended to set to anything other than 'ssl.TLSVersion.MAXIMUM_SUPPORTED' which is the
+        default value.
+    :param cert_reqs:
+        Whether to require the certificate verification. This defaults to
+        ``ssl.CERT_REQUIRED``.
+    :param options:
+        Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
+        ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``, and ``ssl.OP_NO_TICKET``.
+    :param ciphers:
+        Which cipher suites to allow the server to select. Defaults to either system configured
+        ciphers if OpenSSL 1.1.1+, otherwise uses a secure default set of ciphers.
+    :param verify_flags:
+        The flags for certificate verification operations. These default to
+        ``ssl.VERIFY_X509_PARTIAL_CHAIN`` and ``ssl.VERIFY_X509_STRICT`` for Python 3.13+.
+    :returns:
+        Constructed SSLContext object with specified options
+    :rtype: SSLContext
+    """
+    if SSLContext is None:
+        raise TypeError("Can't create an SSLContext object without an ssl module")
+
+    # This means 'ssl_version' was specified as an exact value.
+    if ssl_version not in (None, PROTOCOL_TLS, PROTOCOL_TLS_CLIENT):
+        # Disallow setting 'ssl_version' and 'ssl_minimum|maximum_version'
+        # to avoid conflicts.
+        if ssl_minimum_version is not None or ssl_maximum_version is not None:
+            raise ValueError(
+                "Can't specify both 'ssl_version' and either "
+                "'ssl_minimum_version' or 'ssl_maximum_version'"
+            )
+
+        # 'ssl_version' is deprecated and will be removed in the future.
+        else:
+            # Use 'ssl_minimum_version' and 'ssl_maximum_version' instead.
+            ssl_minimum_version = _SSL_VERSION_TO_TLS_VERSION.get(
+                ssl_version, TLSVersion.MINIMUM_SUPPORTED
+            )
+            ssl_maximum_version = _SSL_VERSION_TO_TLS_VERSION.get(
+                ssl_version, TLSVersion.MAXIMUM_SUPPORTED
+            )
+
+            # This warning message is pushing users to use 'ssl_minimum_version'
+            # instead of both min/max. Best practice is to only set the minimum version and
+            # keep the maximum version to be it's default value: 'TLSVersion.MAXIMUM_SUPPORTED'
+            warnings.warn(
+                "'ssl_version' option is deprecated and will be "
+                "removed in urllib3 v2.6.0. Instead use 'ssl_minimum_version'",
+                category=DeprecationWarning,
+                stacklevel=2,
+            )
+
+    # PROTOCOL_TLS is deprecated in Python 3.10 so we always use PROTOCOL_TLS_CLIENT
+    context = SSLContext(PROTOCOL_TLS_CLIENT)
+
+    if ssl_minimum_version is not None:
+        context.minimum_version = ssl_minimum_version
+    else:  # Python <3.10 defaults to 'MINIMUM_SUPPORTED' so explicitly set TLSv1.2 here
+        context.minimum_version = TLSVersion.TLSv1_2
+
+    if ssl_maximum_version is not None:
+        context.maximum_version = ssl_maximum_version
+
+    # Unless we're given ciphers defer to either system ciphers in
+    # the case of OpenSSL 1.1.1+ or use our own secure default ciphers.
+    if ciphers:
+        context.set_ciphers(ciphers)
+
+    # Setting the default here, as we may have no ssl module on import
+    cert_reqs = ssl.CERT_REQUIRED if cert_reqs is None else cert_reqs
+
+    if options is None:
+        options = 0
+        # SSLv2 is easily broken and is considered harmful and dangerous
+        options |= OP_NO_SSLv2
+        # SSLv3 has several problems and is now dangerous
+        options |= OP_NO_SSLv3
+        # Disable compression to prevent CRIME attacks for OpenSSL 1.0+
+        # (issue #309)
+        options |= OP_NO_COMPRESSION
+        # TLSv1.2 only. Unless set explicitly, do not request tickets.
+        # This may save some bandwidth on wire, and although the ticket is encrypted,
+        # there is a risk associated with it being on wire,
+        # if the server is not rotating its ticketing keys properly.
+        options |= OP_NO_TICKET
+
+    context.options |= options
+
+    if verify_flags is None:
+        verify_flags = 0
+        # In Python 3.13+ ssl.create_default_context() sets VERIFY_X509_PARTIAL_CHAIN
+        # and VERIFY_X509_STRICT so we do the same
+        if sys.version_info >= (3, 13):
+            verify_flags |= VERIFY_X509_PARTIAL_CHAIN
+            verify_flags |= VERIFY_X509_STRICT
+
+    context.verify_flags |= verify_flags
+
+    # Enable post-handshake authentication for TLS 1.3, see GH #1634. PHA is
+    # necessary for conditional client cert authentication with TLS 1.3.
+    # The attribute is None for OpenSSL <= 1.1.0 or does not exist when using
+    # an SSLContext created by pyOpenSSL.
+    if getattr(context, "post_handshake_auth", None) is not None:
+        context.post_handshake_auth = True
+
+    # The order of the below lines setting verify_mode and check_hostname
+    # matter due to safe-guards SSLContext has to prevent an SSLContext with
+    # check_hostname=True, verify_mode=NONE/OPTIONAL.
+    # We always set 'check_hostname=False' for pyOpenSSL so we rely on our own
+    # 'ssl.match_hostname()' implementation.
+    if cert_reqs == ssl.CERT_REQUIRED and not IS_PYOPENSSL:
+        context.verify_mode = cert_reqs
+        context.check_hostname = True
+    else:
+        context.check_hostname = False
+        context.verify_mode = cert_reqs
+
+    try:
+        context.hostname_checks_common_name = False
+    except AttributeError:  # Defensive: for CPython < 3.9.3; for PyPy < 7.3.8
+        pass
+
+    if "SSLKEYLOGFILE" in os.environ:
+        sslkeylogfile = os.path.expandvars(os.environ.get("SSLKEYLOGFILE"))
+    else:
+        sslkeylogfile = None
+    if sslkeylogfile:
+        context.keylog_filename = sslkeylogfile
+
+    return context
+
+
+@typing.overload
+def ssl_wrap_socket(
+    sock: socket.socket,
+    keyfile: str | None = ...,
+    certfile: str | None = ...,
+    cert_reqs: int | None = ...,
+    ca_certs: str | None = ...,
+    server_hostname: str | None = ...,
+    ssl_version: int | None = ...,
+    ciphers: str | None = ...,
+    ssl_context: ssl.SSLContext | None = ...,
+    ca_cert_dir: str | None = ...,
+    key_password: str | None = ...,
+    ca_cert_data: None | str | bytes = ...,
+    tls_in_tls: typing.Literal[False] = ...,
+) -> ssl.SSLSocket: ...
+
+
+@typing.overload
+def ssl_wrap_socket(
+    sock: socket.socket,
+    keyfile: str | None = ...,
+    certfile: str | None = ...,
+    cert_reqs: int | None = ...,
+    ca_certs: str | None = ...,
+    server_hostname: str | None = ...,
+    ssl_version: int | None = ...,
+    ciphers: str | None = ...,
+    ssl_context: ssl.SSLContext | None = ...,
+    ca_cert_dir: str | None = ...,
+    key_password: str | None = ...,
+    ca_cert_data: None | str | bytes = ...,
+    tls_in_tls: bool = ...,
+) -> ssl.SSLSocket | SSLTransportType: ...
+
+
+def ssl_wrap_socket(
+    sock: socket.socket,
+    keyfile: str | None = None,
+    certfile: str | None = None,
+    cert_reqs: int | None = None,
+    ca_certs: str | None = None,
+    server_hostname: str | None = None,
+    ssl_version: int | None = None,
+    ciphers: str | None = None,
+    ssl_context: ssl.SSLContext | None = None,
+    ca_cert_dir: str | None = None,
+    key_password: str | None = None,
+    ca_cert_data: None | str | bytes = None,
+    tls_in_tls: bool = False,
+) -> ssl.SSLSocket | SSLTransportType:
+    """
+    All arguments except for server_hostname, ssl_context, tls_in_tls, ca_cert_data and
+    ca_cert_dir have the same meaning as they do when using
+    :func:`ssl.create_default_context`, :meth:`ssl.SSLContext.load_cert_chain`,
+    :meth:`ssl.SSLContext.set_ciphers` and :meth:`ssl.SSLContext.wrap_socket`.
+
+    :param server_hostname:
+        When SNI is supported, the expected hostname of the certificate
+    :param ssl_context:
+        A pre-made :class:`SSLContext` object. If none is provided, one will
+        be created using :func:`create_urllib3_context`.
+    :param ciphers:
+        A string of ciphers we wish the client to support.
+    :param ca_cert_dir:
+        A directory containing CA certificates in multiple separate files, as
+        supported by OpenSSL's -CApath flag or the capath argument to
+        SSLContext.load_verify_locations().
+    :param key_password:
+        Optional password if the keyfile is encrypted.
+    :param ca_cert_data:
+        Optional string containing CA certificates in PEM format suitable for
+        passing as the cadata parameter to SSLContext.load_verify_locations()
+    :param tls_in_tls:
+        Use SSLTransport to wrap the existing socket.
+    """
+    context = ssl_context
+    if context is None:
+        # Note: This branch of code and all the variables in it are only used in tests.
+        # We should consider deprecating and removing this code.
+        context = create_urllib3_context(ssl_version, cert_reqs, ciphers=ciphers)
+
+    if ca_certs or ca_cert_dir or ca_cert_data:
+        try:
+            context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
+        except OSError as e:
+            raise SSLError(e) from e
+
+    elif ssl_context is None and hasattr(context, "load_default_certs"):
+        # try to load OS default certs; works well on Windows.
+        context.load_default_certs()
+
+    # Attempt to detect if we get the goofy behavior of the
+    # keyfile being encrypted and OpenSSL asking for the
+    # passphrase via the terminal and instead error out.
+    if keyfile and key_password is None and _is_key_file_encrypted(keyfile):
+        raise SSLError("Client private key is encrypted, password is required")
+
+    if certfile:
+        if key_password is None:
+            context.load_cert_chain(certfile, keyfile)
+        else:
+            context.load_cert_chain(certfile, keyfile, key_password)
+
+    context.set_alpn_protocols(ALPN_PROTOCOLS)
+
+    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
+    return ssl_sock
+
+
+def is_ipaddress(hostname: str | bytes) -> bool:
+    """Detects whether the hostname given is an IPv4 or IPv6 address.
+    Also detects IPv6 addresses with Zone IDs.
+
+    :param str hostname: Hostname to examine.
+    :return: True if the hostname is an IP address, False otherwise.
+    """
+    if isinstance(hostname, bytes):
+        # IDN A-label bytes are ASCII compatible.
+        hostname = hostname.decode("ascii")
+    return bool(_IPV4_RE.match(hostname) or _BRACELESS_IPV6_ADDRZ_RE.match(hostname))
+
+
+def _is_key_file_encrypted(key_file: str) -> bool:
+    """Detects if a key file is encrypted or not."""
+    with open(key_file) as f:
+        for line in f:
+            # Look for Proc-Type: 4,ENCRYPTED
+            if "ENCRYPTED" in line:
+                return True
+
+    return False
+
+
+def _ssl_wrap_socket_impl(
+    sock: socket.socket,
+    ssl_context: ssl.SSLContext,
+    tls_in_tls: bool,
+    server_hostname: str | None = None,
+) -> ssl.SSLSocket | SSLTransportType:
+    if tls_in_tls:
+        if not SSLTransport:
+            # Import error, ssl is not available.
+            raise ProxySchemeUnsupported(
+                "TLS in TLS requires support for the 'ssl' module"
+            )
+
+        SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context)
+        return SSLTransport(sock, ssl_context, server_hostname)
+
+    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py
new file mode 100644
index 000000000..25d910004
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py
@@ -0,0 +1,159 @@
+"""The match_hostname() function from Python 3.5, essential when using SSL."""
+
+# Note: This file is under the PSF license as the code comes from the python
+# stdlib.   http://docs.python.org/3/license.html
+# It is modified to remove commonName support.
+
+from __future__ import annotations
+
+import ipaddress
+import re
+import typing
+from ipaddress import IPv4Address, IPv6Address
+
+if typing.TYPE_CHECKING:
+    from .ssl_ import _TYPE_PEER_CERT_RET_DICT
+
+__version__ = "3.5.0.1"
+
+
+class CertificateError(ValueError):
+    pass
+
+
+def _dnsname_match(
+    dn: typing.Any, hostname: str, max_wildcards: int = 1
+) -> typing.Match[str] | None | bool:
+    """Matching according to RFC 6125, section 6.4.3
+
+    http://tools.ietf.org/html/rfc6125#section-6.4.3
+    """
+    pats = []
+    if not dn:
+        return False
+
+    # Ported from python3-syntax:
+    # leftmost, *remainder = dn.split(r'.')
+    parts = dn.split(r".")
+    leftmost = parts[0]
+    remainder = parts[1:]
+
+    wildcards = leftmost.count("*")
+    if wildcards > max_wildcards:
+        # Issue #17980: avoid denials of service by refusing more
+        # than one wildcard per fragment.  A survey of established
+        # policy among SSL implementations showed it to be a
+        # reasonable choice.
+        raise CertificateError(
+            "too many wildcards in certificate DNS name: " + repr(dn)
+        )
+
+    # speed up common case w/o wildcards
+    if not wildcards:
+        return bool(dn.lower() == hostname.lower())
+
+    # RFC 6125, section 6.4.3, subitem 1.
+    # The client SHOULD NOT attempt to match a presented identifier in which
+    # the wildcard character comprises a label other than the left-most label.
+    if leftmost == "*":
+        # When '*' is a fragment by itself, it matches a non-empty dotless
+        # fragment.
+        pats.append("[^.]+")
+    elif leftmost.startswith("xn--") or hostname.startswith("xn--"):
+        # RFC 6125, section 6.4.3, subitem 3.
+        # The client SHOULD NOT attempt to match a presented identifier
+        # where the wildcard character is embedded within an A-label or
+        # U-label of an internationalized domain name.
+        pats.append(re.escape(leftmost))
+    else:
+        # Otherwise, '*' matches any dotless string, e.g. www*
+        pats.append(re.escape(leftmost).replace(r"\*", "[^.]*"))
+
+    # add the remaining fragments, ignore any wildcards
+    for frag in remainder:
+        pats.append(re.escape(frag))
+
+    pat = re.compile(r"\A" + r"\.".join(pats) + r"\Z", re.IGNORECASE)
+    return pat.match(hostname)
+
+
+def _ipaddress_match(ipname: str, host_ip: IPv4Address | IPv6Address) -> bool:
+    """Exact matching of IP addresses.
+
+    RFC 9110 section 4.3.5: "A reference identity of IP-ID contains the decoded
+    bytes of the IP address. An IP version 4 address is 4 octets, and an IP
+    version 6 address is 16 octets. [...] A reference identity of type IP-ID
+    matches if the address is identical to an iPAddress value of the
+    subjectAltName extension of the certificate."
+    """
+    # OpenSSL may add a trailing newline to a subjectAltName's IP address
+    # Divergence from upstream: ipaddress can't handle byte str
+    ip = ipaddress.ip_address(ipname.rstrip())
+    return bool(ip.packed == host_ip.packed)
+
+
+def match_hostname(
+    cert: _TYPE_PEER_CERT_RET_DICT | None,
+    hostname: str,
+    hostname_checks_common_name: bool = False,
+) -> None:
+    """Verify that *cert* (in decoded format as returned by
+    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
+    rules are followed, but IP addresses are not accepted for *hostname*.
+
+    CertificateError is raised on failure. On success, the function
+    returns nothing.
+    """
+    if not cert:
+        raise ValueError(
+            "empty or no certificate, match_hostname needs a "
+            "SSL socket or SSL context with either "
+            "CERT_OPTIONAL or CERT_REQUIRED"
+        )
+    try:
+        # Divergence from upstream: ipaddress can't handle byte str
+        #
+        # The ipaddress module shipped with Python < 3.9 does not support
+        # scoped IPv6 addresses so we unconditionally strip the Zone IDs for
+        # now. Once we drop support for Python 3.9 we can remove this branch.
+        if "%" in hostname:
+            host_ip = ipaddress.ip_address(hostname[: hostname.rfind("%")])
+        else:
+            host_ip = ipaddress.ip_address(hostname)
+
+    except ValueError:
+        # Not an IP address (common case)
+        host_ip = None
+    dnsnames = []
+    san: tuple[tuple[str, str], ...] = cert.get("subjectAltName", ())
+    key: str
+    value: str
+    for key, value in san:
+        if key == "DNS":
+            if host_ip is None and _dnsname_match(value, hostname):
+                return
+            dnsnames.append(value)
+        elif key == "IP Address":
+            if host_ip is not None and _ipaddress_match(value, host_ip):
+                return
+            dnsnames.append(value)
+
+    # We only check 'commonName' if it's enabled and we're not verifying
+    # an IP address. IP addresses aren't valid within 'commonName'.
+    if hostname_checks_common_name and host_ip is None and not dnsnames:
+        for sub in cert.get("subject", ()):
+            for key, value in sub:
+                if key == "commonName":
+                    if _dnsname_match(value, hostname):
+                        return
+                    dnsnames.append(value)  # Defensive: for Python < 3.9.3
+
+    if len(dnsnames) > 1:
+        raise CertificateError(
+            "hostname %r "
+            "doesn't match either of %s" % (hostname, ", ".join(map(repr, dnsnames)))
+        )
+    elif len(dnsnames) == 1:
+        raise CertificateError(f"hostname {hostname!r} doesn't match {dnsnames[0]!r}")
+    else:
+        raise CertificateError("no appropriate subjectAltName fields were found")
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py
new file mode 100644
index 000000000..6d59bc3bc
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py
@@ -0,0 +1,271 @@
+from __future__ import annotations
+
+import io
+import socket
+import ssl
+import typing
+
+from ..exceptions import ProxySchemeUnsupported
+
+if typing.TYPE_CHECKING:
+    from typing_extensions import Self
+
+    from .ssl_ import _TYPE_PEER_CERT_RET, _TYPE_PEER_CERT_RET_DICT
+
+
+_WriteBuffer = typing.Union[bytearray, memoryview]
+_ReturnValue = typing.TypeVar("_ReturnValue")
+
+SSL_BLOCKSIZE = 16384
+
+
+class SSLTransport:
+    """
+    The SSLTransport wraps an existing socket and establishes an SSL connection.
+
+    Contrary to Python's implementation of SSLSocket, it allows you to chain
+    multiple TLS connections together. It's particularly useful if you need to
+    implement TLS within TLS.
+
+    The class supports most of the socket API operations.
+    """
+
+    @staticmethod
+    def _validate_ssl_context_for_tls_in_tls(ssl_context: ssl.SSLContext) -> None:
+        """
+        Raises a ProxySchemeUnsupported if the provided ssl_context can't be used
+        for TLS in TLS.
+
+        The only requirement is that the ssl_context provides the 'wrap_bio'
+        methods.
+        """
+
+        if not hasattr(ssl_context, "wrap_bio"):
+            raise ProxySchemeUnsupported(
+                "TLS in TLS requires SSLContext.wrap_bio() which isn't "
+                "available on non-native SSLContext"
+            )
+
+    def __init__(
+        self,
+        socket: socket.socket,
+        ssl_context: ssl.SSLContext,
+        server_hostname: str | None = None,
+        suppress_ragged_eofs: bool = True,
+    ) -> None:
+        """
+        Create an SSLTransport around socket using the provided ssl_context.
+        """
+        self.incoming = ssl.MemoryBIO()
+        self.outgoing = ssl.MemoryBIO()
+
+        self.suppress_ragged_eofs = suppress_ragged_eofs
+        self.socket = socket
+
+        self.sslobj = ssl_context.wrap_bio(
+            self.incoming, self.outgoing, server_hostname=server_hostname
+        )
+
+        # Perform initial handshake.
+        self._ssl_io_loop(self.sslobj.do_handshake)
+
+    def __enter__(self) -> Self:
+        return self
+
+    def __exit__(self, *_: typing.Any) -> None:
+        self.close()
+
+    def fileno(self) -> int:
+        return self.socket.fileno()
+
+    def read(self, len: int = 1024, buffer: typing.Any | None = None) -> int | bytes:
+        return self._wrap_ssl_read(len, buffer)
+
+    def recv(self, buflen: int = 1024, flags: int = 0) -> int | bytes:
+        if flags != 0:
+            raise ValueError("non-zero flags not allowed in calls to recv")
+        return self._wrap_ssl_read(buflen)
+
+    def recv_into(
+        self,
+        buffer: _WriteBuffer,
+        nbytes: int | None = None,
+        flags: int = 0,
+    ) -> None | int | bytes:
+        if flags != 0:
+            raise ValueError("non-zero flags not allowed in calls to recv_into")
+        if nbytes is None:
+            nbytes = len(buffer)
+        return self.read(nbytes, buffer)
+
+    def sendall(self, data: bytes, flags: int = 0) -> None:
+        if flags != 0:
+            raise ValueError("non-zero flags not allowed in calls to sendall")
+        count = 0
+        with memoryview(data) as view, view.cast("B") as byte_view:
+            amount = len(byte_view)
+            while count < amount:
+                v = self.send(byte_view[count:])
+                count += v
+
+    def send(self, data: bytes, flags: int = 0) -> int:
+        if flags != 0:
+            raise ValueError("non-zero flags not allowed in calls to send")
+        return self._ssl_io_loop(self.sslobj.write, data)
+
+    def makefile(
+        self,
+        mode: str,
+        buffering: int | None = None,
+        *,
+        encoding: str | None = None,
+        errors: str | None = None,
+        newline: str | None = None,
+    ) -> typing.BinaryIO | typing.TextIO | socket.SocketIO:
+        """
+        Python's httpclient uses makefile and buffered io when reading HTTP
+        messages and we need to support it.
+
+        This is unfortunately a copy and paste of socket.py makefile with small
+        changes to point to the socket directly.
+        """
+        if not set(mode) <= {"r", "w", "b"}:
+            raise ValueError(f"invalid mode {mode!r} (only r, w, b allowed)")
+
+        writing = "w" in mode
+        reading = "r" in mode or not writing
+        assert reading or writing
+        binary = "b" in mode
+        rawmode = ""
+        if reading:
+            rawmode += "r"
+        if writing:
+            rawmode += "w"
+        raw = socket.SocketIO(self, rawmode)  # type: ignore[arg-type]
+        self.socket._io_refs += 1  # type: ignore[attr-defined]
+        if buffering is None:
+            buffering = -1
+        if buffering < 0:
+            buffering = io.DEFAULT_BUFFER_SIZE
+        if buffering == 0:
+            if not binary:
+                raise ValueError("unbuffered streams must be binary")
+            return raw
+        buffer: typing.BinaryIO
+        if reading and writing:
+            buffer = io.BufferedRWPair(raw, raw, buffering)  # type: ignore[assignment]
+        elif reading:
+            buffer = io.BufferedReader(raw, buffering)
+        else:
+            assert writing
+            buffer = io.BufferedWriter(raw, buffering)
+        if binary:
+            return buffer
+        text = io.TextIOWrapper(buffer, encoding, errors, newline)
+        text.mode = mode  # type: ignore[misc]
+        return text
+
+    def unwrap(self) -> None:
+        self._ssl_io_loop(self.sslobj.unwrap)
+
+    def close(self) -> None:
+        self.socket.close()
+
+    @typing.overload
+    def getpeercert(
+        self, binary_form: typing.Literal[False] = ...
+    ) -> _TYPE_PEER_CERT_RET_DICT | None: ...
+
+    @typing.overload
+    def getpeercert(self, binary_form: typing.Literal[True]) -> bytes | None: ...
+
+    def getpeercert(self, binary_form: bool = False) -> _TYPE_PEER_CERT_RET:
+        return self.sslobj.getpeercert(binary_form)  # type: ignore[return-value]
+
+    def version(self) -> str | None:
+        return self.sslobj.version()
+
+    def cipher(self) -> tuple[str, str, int] | None:
+        return self.sslobj.cipher()
+
+    def selected_alpn_protocol(self) -> str | None:
+        return self.sslobj.selected_alpn_protocol()
+
+    def shared_ciphers(self) -> list[tuple[str, str, int]] | None:
+        return self.sslobj.shared_ciphers()
+
+    def compression(self) -> str | None:
+        return self.sslobj.compression()
+
+    def settimeout(self, value: float | None) -> None:
+        self.socket.settimeout(value)
+
+    def gettimeout(self) -> float | None:
+        return self.socket.gettimeout()
+
+    def _decref_socketios(self) -> None:
+        self.socket._decref_socketios()  # type: ignore[attr-defined]
+
+    def _wrap_ssl_read(self, len: int, buffer: bytearray | None = None) -> int | bytes:
+        try:
+            return self._ssl_io_loop(self.sslobj.read, len, buffer)
+        except ssl.SSLError as e:
+            if e.errno == ssl.SSL_ERROR_EOF and self.suppress_ragged_eofs:
+                return 0  # eof, return 0.
+            else:
+                raise
+
+    # func is sslobj.do_handshake or sslobj.unwrap
+    @typing.overload
+    def _ssl_io_loop(self, func: typing.Callable[[], None]) -> None: ...
+
+    # func is sslobj.write, arg1 is data
+    @typing.overload
+    def _ssl_io_loop(self, func: typing.Callable[[bytes], int], arg1: bytes) -> int: ...
+
+    # func is sslobj.read, arg1 is len, arg2 is buffer
+    @typing.overload
+    def _ssl_io_loop(
+        self,
+        func: typing.Callable[[int, bytearray | None], bytes],
+        arg1: int,
+        arg2: bytearray | None,
+    ) -> bytes: ...
+
+    def _ssl_io_loop(
+        self,
+        func: typing.Callable[..., _ReturnValue],
+        arg1: None | bytes | int = None,
+        arg2: bytearray | None = None,
+    ) -> _ReturnValue:
+        """Performs an I/O loop between incoming/outgoing and the socket."""
+        should_loop = True
+        ret = None
+
+        while should_loop:
+            errno = None
+            try:
+                if arg1 is None and arg2 is None:
+                    ret = func()
+                elif arg2 is None:
+                    ret = func(arg1)
+                else:
+                    ret = func(arg1, arg2)
+            except ssl.SSLError as e:
+                if e.errno not in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE):
+                    # WANT_READ, and WANT_WRITE are expected, others are not.
+                    raise e
+                errno = e.errno
+
+            buf = self.outgoing.read()
+            self.socket.sendall(buf)
+
+            if errno is None:
+                should_loop = False
+            elif errno == ssl.SSL_ERROR_WANT_READ:
+                buf = self.socket.recv(SSL_BLOCKSIZE)
+                if buf:
+                    self.incoming.write(buf)
+                else:
+                    self.incoming.write_eof()
+        return typing.cast(_ReturnValue, ret)
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py
similarity index 75%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py
rename to Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py
index 78e18a627..c6cdb352a 100644
--- a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py
@@ -1,44 +1,56 @@
-from __future__ import absolute_import
+from __future__ import annotations
 
 import time
-
-# The default socket timeout, used by httplib to indicate that no timeout was; specified by the user
-from socket import _GLOBAL_DEFAULT_TIMEOUT, getdefaulttimeout
+import typing
+from enum import Enum
+from socket import getdefaulttimeout
 
 from ..exceptions import TimeoutStateError
 
-# A sentinel value to indicate that no timeout was specified by the user in
-# urllib3
-_Default = object()
+if typing.TYPE_CHECKING:
+    from typing import Final
+
+
+class _TYPE_DEFAULT(Enum):
+    # This value should never be passed to socket.settimeout() so for safety we use a -1.
+    # socket.settimout() raises a ValueError for negative values.
+    token = -1
+
 
+_DEFAULT_TIMEOUT: Final[_TYPE_DEFAULT] = _TYPE_DEFAULT.token
 
-# Use time.monotonic if available.
-current_time = getattr(time, "monotonic", time.time)
+_TYPE_TIMEOUT = typing.Optional[typing.Union[float, _TYPE_DEFAULT]]
 
 
-class Timeout(object):
+class Timeout:
     """Timeout configuration.
 
     Timeouts can be defined as a default for a pool:
 
     .. code-block:: python
 
-       timeout = Timeout(connect=2.0, read=7.0)
-       http = PoolManager(timeout=timeout)
-       response = http.request('GET', 'http://example.com/')
+        from pip._vendor import urllib3
+
+        timeout = urllib3.util.Timeout(connect=2.0, read=7.0)
+
+        http = urllib3.PoolManager(timeout=timeout)
+
+        resp = http.request("GET", "https://example.com/")
+
+        print(resp.status)
 
     Or per-request (which overrides the default for the pool):
 
     .. code-block:: python
 
-       response = http.request('GET', 'http://example.com/', timeout=Timeout(10))
+       response = http.request("GET", "https://example.com/", timeout=Timeout(10))
 
     Timeouts can be disabled by setting all the parameters to ``None``:
 
     .. code-block:: python
 
        no_timeout = Timeout(connect=None, read=None)
-       response = http.request('GET', 'http://example.com/, timeout=no_timeout)
+       response = http.request("GET", "https://example.com/", timeout=no_timeout)
 
 
     :param total:
@@ -89,38 +101,34 @@ class Timeout(object):
         the case; if a server streams one byte every fifteen seconds, a timeout
         of 20 seconds will not trigger, even though the request will take
         several minutes to complete.
-
-        If your goal is to cut off any request after a set amount of wall clock
-        time, consider having a second "watcher" thread to cut off a slow
-        request.
     """
 
     #: A sentinel object representing the default timeout value
-    DEFAULT_TIMEOUT = _GLOBAL_DEFAULT_TIMEOUT
-
-    def __init__(self, total=None, connect=_Default, read=_Default):
+    DEFAULT_TIMEOUT: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT
+
+    def __init__(
+        self,
+        total: _TYPE_TIMEOUT = None,
+        connect: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+        read: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT,
+    ) -> None:
         self._connect = self._validate_timeout(connect, "connect")
         self._read = self._validate_timeout(read, "read")
         self.total = self._validate_timeout(total, "total")
-        self._start_connect = None
+        self._start_connect: float | None = None
 
-    def __repr__(self):
-        return "%s(connect=%r, read=%r, total=%r)" % (
-            type(self).__name__,
-            self._connect,
-            self._read,
-            self.total,
-        )
+    def __repr__(self) -> str:
+        return f"{type(self).__name__}(connect={self._connect!r}, read={self._read!r}, total={self.total!r})"
 
     # __str__ provided for backwards compatibility
     __str__ = __repr__
 
-    @classmethod
-    def resolve_default_timeout(cls, timeout):
-        return getdefaulttimeout() if timeout is cls.DEFAULT_TIMEOUT else timeout
+    @staticmethod
+    def resolve_default_timeout(timeout: _TYPE_TIMEOUT) -> float | None:
+        return getdefaulttimeout() if timeout is _DEFAULT_TIMEOUT else timeout
 
     @classmethod
-    def _validate_timeout(cls, value, name):
+    def _validate_timeout(cls, value: _TYPE_TIMEOUT, name: str) -> _TYPE_TIMEOUT:
         """Check that a timeout attribute is valid.
 
         :param value: The timeout value to validate
@@ -130,10 +138,7 @@ def _validate_timeout(cls, value, name):
         :raises ValueError: If it is a numeric value less than or equal to
             zero, or the type is not an integer, float, or None.
         """
-        if value is _Default:
-            return cls.DEFAULT_TIMEOUT
-
-        if value is None or value is cls.DEFAULT_TIMEOUT:
+        if value is None or value is _DEFAULT_TIMEOUT:
             return value
 
         if isinstance(value, bool):
@@ -147,7 +152,7 @@ def _validate_timeout(cls, value, name):
             raise ValueError(
                 "Timeout value %s was %s, but it must be an "
                 "int, float or None." % (name, value)
-            )
+            ) from None
 
         try:
             if value <= 0:
@@ -157,16 +162,15 @@ def _validate_timeout(cls, value, name):
                     "than or equal to 0." % (name, value)
                 )
         except TypeError:
-            # Python 3
             raise ValueError(
                 "Timeout value %s was %s, but it must be an "
                 "int, float or None." % (name, value)
-            )
+            ) from None
 
         return value
 
     @classmethod
-    def from_float(cls, timeout):
+    def from_float(cls, timeout: _TYPE_TIMEOUT) -> Timeout:
         """Create a new Timeout from a legacy timeout value.
 
         The timeout value used by httplib.py sets the same timeout on the
@@ -175,13 +179,13 @@ def from_float(cls, timeout):
         passed to this function.
 
         :param timeout: The legacy timeout value.
-        :type timeout: integer, float, sentinel default object, or None
+        :type timeout: integer, float, :attr:`urllib3.util.Timeout.DEFAULT_TIMEOUT`, or None
         :return: Timeout object
         :rtype: :class:`Timeout`
         """
         return Timeout(read=timeout, connect=timeout)
 
-    def clone(self):
+    def clone(self) -> Timeout:
         """Create a copy of the timeout object
 
         Timeout properties are stored per-pool but each request needs a fresh
@@ -195,7 +199,7 @@ def clone(self):
         # detect the user default.
         return Timeout(connect=self._connect, read=self._read, total=self.total)
 
-    def start_connect(self):
+    def start_connect(self) -> float:
         """Start the timeout clock, used during a connect() attempt
 
         :raises urllib3.exceptions.TimeoutStateError: if you attempt
@@ -203,10 +207,10 @@ def start_connect(self):
         """
         if self._start_connect is not None:
             raise TimeoutStateError("Timeout timer has already been started.")
-        self._start_connect = current_time()
+        self._start_connect = time.monotonic()
         return self._start_connect
 
-    def get_connect_duration(self):
+    def get_connect_duration(self) -> float:
         """Gets the time elapsed since the call to :meth:`start_connect`.
 
         :return: Elapsed time in seconds.
@@ -218,10 +222,10 @@ def get_connect_duration(self):
             raise TimeoutStateError(
                 "Can't get connect duration for timer that has not started."
             )
-        return current_time() - self._start_connect
+        return time.monotonic() - self._start_connect
 
     @property
-    def connect_timeout(self):
+    def connect_timeout(self) -> _TYPE_TIMEOUT:
         """Get the value to use when setting a connection timeout.
 
         This will be a positive float or integer, the value None
@@ -233,13 +237,13 @@ def connect_timeout(self):
         if self.total is None:
             return self._connect
 
-        if self._connect is None or self._connect is self.DEFAULT_TIMEOUT:
+        if self._connect is None or self._connect is _DEFAULT_TIMEOUT:
             return self.total
 
-        return min(self._connect, self.total)
+        return min(self._connect, self.total)  # type: ignore[type-var]
 
     @property
-    def read_timeout(self):
+    def read_timeout(self) -> float | None:
         """Get the value for the read timeout.
 
         This assumes some time has elapsed in the connection timeout and
@@ -251,21 +255,21 @@ def read_timeout(self):
         raised.
 
         :return: Value to use for the read timeout.
-        :rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None
+        :rtype: int, float or None
         :raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
             has not yet been called on this object.
         """
         if (
             self.total is not None
-            and self.total is not self.DEFAULT_TIMEOUT
+            and self.total is not _DEFAULT_TIMEOUT
             and self._read is not None
-            and self._read is not self.DEFAULT_TIMEOUT
+            and self._read is not _DEFAULT_TIMEOUT
         ):
             # In case the connect timeout has not yet been established.
             if self._start_connect is None:
                 return self._read
             return max(0, min(self.total - self.get_connect_duration(), self._read))
-        elif self.total is not None and self.total is not self.DEFAULT_TIMEOUT:
+        elif self.total is not None and self.total is not _DEFAULT_TIMEOUT:
             return max(0, self.total - self.get_connect_duration())
         else:
-            return self._read
+            return self.resolve_default_timeout(self._read)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/url.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/url.py
new file mode 100644
index 000000000..82b174ceb
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/url.py
@@ -0,0 +1,469 @@
+from __future__ import annotations
+
+import re
+import typing
+
+from ..exceptions import LocationParseError
+from .util import to_str
+
+# We only want to normalize urls with an HTTP(S) scheme.
+# urllib3 infers URLs without a scheme (None) to be http.
+_NORMALIZABLE_SCHEMES = ("http", "https", None)
+
+# Almost all of these patterns were derived from the
+# 'rfc3986' module: https://github.com/python-hyper/rfc3986
+_PERCENT_RE = re.compile(r"%[a-fA-F0-9]{2}")
+_SCHEME_RE = re.compile(r"^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)")
+_URI_RE = re.compile(
+    r"^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?"
+    r"(?://([^\\/?#]*))?"
+    r"([^?#]*)"
+    r"(?:\?([^#]*))?"
+    r"(?:#(.*))?$",
+    re.UNICODE | re.DOTALL,
+)
+
+_IPV4_PAT = r"(?:[0-9]{1,3}\.){3}[0-9]{1,3}"
+_HEX_PAT = "[0-9A-Fa-f]{1,4}"
+_LS32_PAT = "(?:{hex}:{hex}|{ipv4})".format(hex=_HEX_PAT, ipv4=_IPV4_PAT)
+_subs = {"hex": _HEX_PAT, "ls32": _LS32_PAT}
+_variations = [
+    #                            6( h16 ":" ) ls32
+    "(?:%(hex)s:){6}%(ls32)s",
+    #                       "::" 5( h16 ":" ) ls32
+    "::(?:%(hex)s:){5}%(ls32)s",
+    # [               h16 ] "::" 4( h16 ":" ) ls32
+    "(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)s",
+    # [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+    "(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)s",
+    # [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+    "(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)s",
+    # [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
+    "(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)s",
+    # [ *4( h16 ":" ) h16 ] "::"              ls32
+    "(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)s",
+    # [ *5( h16 ":" ) h16 ] "::"              h16
+    "(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)s",
+    # [ *6( h16 ":" ) h16 ] "::"
+    "(?:(?:%(hex)s:){0,6}%(hex)s)?::",
+]
+
+_UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~"
+_IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")"
+_ZONE_ID_PAT = "(?:%25|%)(?:[" + _UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+"
+_IPV6_ADDRZ_PAT = r"\[" + _IPV6_PAT + r"(?:" + _ZONE_ID_PAT + r")?\]"
+_REG_NAME_PAT = r"(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*"
+_TARGET_RE = re.compile(r"^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$")
+
+_IPV4_RE = re.compile("^" + _IPV4_PAT + "$")
+_IPV6_RE = re.compile("^" + _IPV6_PAT + "$")
+_IPV6_ADDRZ_RE = re.compile("^" + _IPV6_ADDRZ_PAT + "$")
+_BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + _IPV6_ADDRZ_PAT[2:-2] + "$")
+_ZONE_ID_RE = re.compile("(" + _ZONE_ID_PAT + r")\]$")
+
+_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$") % (
+    _REG_NAME_PAT,
+    _IPV4_PAT,
+    _IPV6_ADDRZ_PAT,
+)
+_HOST_PORT_RE = re.compile(_HOST_PORT_PAT, re.UNICODE | re.DOTALL)
+
+_UNRESERVED_CHARS = set(
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~"
+)
+_SUB_DELIM_CHARS = set("!$&'()*+,;=")
+_USERINFO_CHARS = _UNRESERVED_CHARS | _SUB_DELIM_CHARS | {":"}
+_PATH_CHARS = _USERINFO_CHARS | {"@", "/"}
+_QUERY_CHARS = _FRAGMENT_CHARS = _PATH_CHARS | {"?"}
+
+
+class Url(
+    typing.NamedTuple(
+        "Url",
+        [
+            ("scheme", typing.Optional[str]),
+            ("auth", typing.Optional[str]),
+            ("host", typing.Optional[str]),
+            ("port", typing.Optional[int]),
+            ("path", typing.Optional[str]),
+            ("query", typing.Optional[str]),
+            ("fragment", typing.Optional[str]),
+        ],
+    )
+):
+    """
+    Data structure for representing an HTTP URL. Used as a return value for
+    :func:`parse_url`. Both the scheme and host are normalized as they are
+    both case-insensitive according to RFC 3986.
+    """
+
+    def __new__(  # type: ignore[no-untyped-def]
+        cls,
+        scheme: str | None = None,
+        auth: str | None = None,
+        host: str | None = None,
+        port: int | None = None,
+        path: str | None = None,
+        query: str | None = None,
+        fragment: str | None = None,
+    ):
+        if path and not path.startswith("/"):
+            path = "/" + path
+        if scheme is not None:
+            scheme = scheme.lower()
+        return super().__new__(cls, scheme, auth, host, port, path, query, fragment)
+
+    @property
+    def hostname(self) -> str | None:
+        """For backwards-compatibility with urlparse. We're nice like that."""
+        return self.host
+
+    @property
+    def request_uri(self) -> str:
+        """Absolute path including the query string."""
+        uri = self.path or "/"
+
+        if self.query is not None:
+            uri += "?" + self.query
+
+        return uri
+
+    @property
+    def authority(self) -> str | None:
+        """
+        Authority component as defined in RFC 3986 3.2.
+        This includes userinfo (auth), host and port.
+
+        i.e.
+            userinfo@host:port
+        """
+        userinfo = self.auth
+        netloc = self.netloc
+        if netloc is None or userinfo is None:
+            return netloc
+        else:
+            return f"{userinfo}@{netloc}"
+
+    @property
+    def netloc(self) -> str | None:
+        """
+        Network location including host and port.
+
+        If you need the equivalent of urllib.parse's ``netloc``,
+        use the ``authority`` property instead.
+        """
+        if self.host is None:
+            return None
+        if self.port:
+            return f"{self.host}:{self.port}"
+        return self.host
+
+    @property
+    def url(self) -> str:
+        """
+        Convert self into a url
+
+        This function should more or less round-trip with :func:`.parse_url`. The
+        returned url may not be exactly the same as the url inputted to
+        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
+        with a blank port will have : removed).
+
+        Example:
+
+        .. code-block:: python
+
+            from pip._vendor import urllib3
+
+            U = urllib3.util.parse_url("https://google.com/mail/")
+
+            print(U.url)
+            # "https://google.com/mail/"
+
+            print( urllib3.util.Url("https", "username:password",
+                                    "host.com", 80, "/path", "query", "fragment"
+                                    ).url
+                )
+            # "https://username:password@host.com:80/path?query#fragment"
+        """
+        scheme, auth, host, port, path, query, fragment = self
+        url = ""
+
+        # We use "is not None" we want things to happen with empty strings (or 0 port)
+        if scheme is not None:
+            url += scheme + "://"
+        if auth is not None:
+            url += auth + "@"
+        if host is not None:
+            url += host
+        if port is not None:
+            url += ":" + str(port)
+        if path is not None:
+            url += path
+        if query is not None:
+            url += "?" + query
+        if fragment is not None:
+            url += "#" + fragment
+
+        return url
+
+    def __str__(self) -> str:
+        return self.url
+
+
+@typing.overload
+def _encode_invalid_chars(
+    component: str, allowed_chars: typing.Container[str]
+) -> str:  # Abstract
+    ...
+
+
+@typing.overload
+def _encode_invalid_chars(
+    component: None, allowed_chars: typing.Container[str]
+) -> None:  # Abstract
+    ...
+
+
+def _encode_invalid_chars(
+    component: str | None, allowed_chars: typing.Container[str]
+) -> str | None:
+    """Percent-encodes a URI component without reapplying
+    onto an already percent-encoded component.
+    """
+    if component is None:
+        return component
+
+    component = to_str(component)
+
+    # Normalize existing percent-encoded bytes.
+    # Try to see if the component we're encoding is already percent-encoded
+    # so we can skip all '%' characters but still encode all others.
+    component, percent_encodings = _PERCENT_RE.subn(
+        lambda match: match.group(0).upper(), component
+    )
+
+    uri_bytes = component.encode("utf-8", "surrogatepass")
+    is_percent_encoded = percent_encodings == uri_bytes.count(b"%")
+    encoded_component = bytearray()
+
+    for i in range(0, len(uri_bytes)):
+        # Will return a single character bytestring
+        byte = uri_bytes[i : i + 1]
+        byte_ord = ord(byte)
+        if (is_percent_encoded and byte == b"%") or (
+            byte_ord < 128 and byte.decode() in allowed_chars
+        ):
+            encoded_component += byte
+            continue
+        encoded_component.extend(b"%" + (hex(byte_ord)[2:].encode().zfill(2).upper()))
+
+    return encoded_component.decode()
+
+
+def _remove_path_dot_segments(path: str) -> str:
+    # See http://tools.ietf.org/html/rfc3986#section-5.2.4 for pseudo-code
+    segments = path.split("/")  # Turn the path into a list of segments
+    output = []  # Initialize the variable to use to store output
+
+    for segment in segments:
+        # '.' is the current directory, so ignore it, it is superfluous
+        if segment == ".":
+            continue
+        # Anything other than '..', should be appended to the output
+        if segment != "..":
+            output.append(segment)
+        # In this case segment == '..', if we can, we should pop the last
+        # element
+        elif output:
+            output.pop()
+
+    # If the path starts with '/' and the output is empty or the first string
+    # is non-empty
+    if path.startswith("/") and (not output or output[0]):
+        output.insert(0, "")
+
+    # If the path starts with '/.' or '/..' ensure we add one more empty
+    # string to add a trailing '/'
+    if path.endswith(("/.", "/..")):
+        output.append("")
+
+    return "/".join(output)
+
+
+@typing.overload
+def _normalize_host(host: None, scheme: str | None) -> None: ...
+
+
+@typing.overload
+def _normalize_host(host: str, scheme: str | None) -> str: ...
+
+
+def _normalize_host(host: str | None, scheme: str | None) -> str | None:
+    if host:
+        if scheme in _NORMALIZABLE_SCHEMES:
+            is_ipv6 = _IPV6_ADDRZ_RE.match(host)
+            if is_ipv6:
+                # IPv6 hosts of the form 'a::b%zone' are encoded in a URL as
+                # such per RFC 6874: 'a::b%25zone'. Unquote the ZoneID
+                # separator as necessary to return a valid RFC 4007 scoped IP.
+                match = _ZONE_ID_RE.search(host)
+                if match:
+                    start, end = match.span(1)
+                    zone_id = host[start:end]
+
+                    if zone_id.startswith("%25") and zone_id != "%25":
+                        zone_id = zone_id[3:]
+                    else:
+                        zone_id = zone_id[1:]
+                    zone_id = _encode_invalid_chars(zone_id, _UNRESERVED_CHARS)
+                    return f"{host[:start].lower()}%{zone_id}{host[end:]}"
+                else:
+                    return host.lower()
+            elif not _IPV4_RE.match(host):
+                return to_str(
+                    b".".join([_idna_encode(label) for label in host.split(".")]),
+                    "ascii",
+                )
+    return host
+
+
+def _idna_encode(name: str) -> bytes:
+    if not name.isascii():
+        try:
+            from pip._vendor import idna
+        except ImportError:
+            raise LocationParseError(
+                "Unable to parse URL without the 'idna' module"
+            ) from None
+
+        try:
+            return idna.encode(name.lower(), strict=True, std3_rules=True)
+        except idna.IDNAError:
+            raise LocationParseError(
+                f"Name '{name}' is not a valid IDNA label"
+            ) from None
+
+    return name.lower().encode("ascii")
+
+
+def _encode_target(target: str) -> str:
+    """Percent-encodes a request target so that there are no invalid characters
+
+    Pre-condition for this function is that 'target' must start with '/'.
+    If that is the case then _TARGET_RE will always produce a match.
+    """
+    match = _TARGET_RE.match(target)
+    if not match:  # Defensive:
+        raise LocationParseError(f"{target!r} is not a valid request URI")
+
+    path, query = match.groups()
+    encoded_target = _encode_invalid_chars(path, _PATH_CHARS)
+    if query is not None:
+        query = _encode_invalid_chars(query, _QUERY_CHARS)
+        encoded_target += "?" + query
+    return encoded_target
+
+
+def parse_url(url: str) -> Url:
+    """
+    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
+    performed to parse incomplete urls. Fields not provided will be None.
+    This parser is RFC 3986 and RFC 6874 compliant.
+
+    The parser logic and helper functions are based heavily on
+    work done in the ``rfc3986`` module.
+
+    :param str url: URL to parse into a :class:`.Url` namedtuple.
+
+    Partly backwards-compatible with :mod:`urllib.parse`.
+
+    Example:
+
+    .. code-block:: python
+
+        from pip._vendor import urllib3
+
+        print( urllib3.util.parse_url('http://google.com/mail/'))
+        # Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
+
+        print( urllib3.util.parse_url('google.com:80'))
+        # Url(scheme=None, host='google.com', port=80, path=None, ...)
+
+        print( urllib3.util.parse_url('/foo?bar'))
+        # Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
+    """
+    if not url:
+        # Empty
+        return Url()
+
+    source_url = url
+    if not _SCHEME_RE.search(url):
+        url = "//" + url
+
+    scheme: str | None
+    authority: str | None
+    auth: str | None
+    host: str | None
+    port: str | None
+    port_int: int | None
+    path: str | None
+    query: str | None
+    fragment: str | None
+
+    try:
+        scheme, authority, path, query, fragment = _URI_RE.match(url).groups()  # type: ignore[union-attr]
+        normalize_uri = scheme is None or scheme.lower() in _NORMALIZABLE_SCHEMES
+
+        if scheme:
+            scheme = scheme.lower()
+
+        if authority:
+            auth, _, host_port = authority.rpartition("@")
+            auth = auth or None
+            host, port = _HOST_PORT_RE.match(host_port).groups()  # type: ignore[union-attr]
+            if auth and normalize_uri:
+                auth = _encode_invalid_chars(auth, _USERINFO_CHARS)
+            if port == "":
+                port = None
+        else:
+            auth, host, port = None, None, None
+
+        if port is not None:
+            port_int = int(port)
+            if not (0 <= port_int <= 65535):
+                raise LocationParseError(url)
+        else:
+            port_int = None
+
+        host = _normalize_host(host, scheme)
+
+        if normalize_uri and path:
+            path = _remove_path_dot_segments(path)
+            path = _encode_invalid_chars(path, _PATH_CHARS)
+        if normalize_uri and query:
+            query = _encode_invalid_chars(query, _QUERY_CHARS)
+        if normalize_uri and fragment:
+            fragment = _encode_invalid_chars(fragment, _FRAGMENT_CHARS)
+
+    except (ValueError, AttributeError) as e:
+        raise LocationParseError(source_url) from e
+
+    # For the sake of backwards compatibility we put empty
+    # string values for path if there are any defined values
+    # beyond the path in the URL.
+    # TODO: Remove this when we break backwards compatibility.
+    if not path:
+        if query is not None or fragment is not None:
+            path = ""
+        else:
+            path = None
+
+    return Url(
+        scheme=scheme,
+        auth=auth,
+        host=host,
+        port=port_int,
+        path=path,
+        query=query,
+        fragment=fragment,
+    )
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/util.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/util.py
new file mode 100644
index 000000000..35c77e402
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/util.py
@@ -0,0 +1,42 @@
+from __future__ import annotations
+
+import typing
+from types import TracebackType
+
+
+def to_bytes(
+    x: str | bytes, encoding: str | None = None, errors: str | None = None
+) -> bytes:
+    if isinstance(x, bytes):
+        return x
+    elif not isinstance(x, str):
+        raise TypeError(f"not expecting type {type(x).__name__}")
+    if encoding or errors:
+        return x.encode(encoding or "utf-8", errors=errors or "strict")
+    return x.encode()
+
+
+def to_str(
+    x: str | bytes, encoding: str | None = None, errors: str | None = None
+) -> str:
+    if isinstance(x, str):
+        return x
+    elif not isinstance(x, bytes):
+        raise TypeError(f"not expecting type {type(x).__name__}")
+    if encoding or errors:
+        return x.decode(encoding or "utf-8", errors=errors or "strict")
+    return x.decode()
+
+
+def reraise(
+    tp: type[BaseException] | None,
+    value: BaseException,
+    tb: TracebackType | None = None,
+) -> typing.NoReturn:
+    try:
+        if value.__traceback__ is not tb:
+            raise value.with_traceback(tb)
+        raise value
+    finally:
+        value = None  # type: ignore[assignment]
+        tb = None
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/wait.py b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/wait.py
new file mode 100644
index 000000000..aeca0c7ad
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/urllib3/util/wait.py
@@ -0,0 +1,124 @@
+from __future__ import annotations
+
+import select
+import socket
+from functools import partial
+
+__all__ = ["wait_for_read", "wait_for_write"]
+
+
+# How should we wait on sockets?
+#
+# There are two types of APIs you can use for waiting on sockets: the fancy
+# modern stateful APIs like epoll/kqueue, and the older stateless APIs like
+# select/poll. The stateful APIs are more efficient when you have a lots of
+# sockets to keep track of, because you can set them up once and then use them
+# lots of times. But we only ever want to wait on a single socket at a time
+# and don't want to keep track of state, so the stateless APIs are actually
+# more efficient. So we want to use select() or poll().
+#
+# Now, how do we choose between select() and poll()? On traditional Unixes,
+# select() has a strange calling convention that makes it slow, or fail
+# altogether, for high-numbered file descriptors. The point of poll() is to fix
+# that, so on Unixes, we prefer poll().
+#
+# On Windows, there is no poll() (or at least Python doesn't provide a wrapper
+# for it), but that's OK, because on Windows, select() doesn't have this
+# strange calling convention; plain select() works fine.
+#
+# So: on Windows we use select(), and everywhere else we use poll(). We also
+# fall back to select() in case poll() is somehow broken or missing.
+
+
+def select_wait_for_socket(
+    sock: socket.socket,
+    read: bool = False,
+    write: bool = False,
+    timeout: float | None = None,
+) -> bool:
+    if not read and not write:
+        raise RuntimeError("must specify at least one of read=True, write=True")
+    rcheck = []
+    wcheck = []
+    if read:
+        rcheck.append(sock)
+    if write:
+        wcheck.append(sock)
+    # When doing a non-blocking connect, most systems signal success by
+    # marking the socket writable. Windows, though, signals success by marked
+    # it as "exceptional". We paper over the difference by checking the write
+    # sockets for both conditions. (The stdlib selectors module does the same
+    # thing.)
+    fn = partial(select.select, rcheck, wcheck, wcheck)
+    rready, wready, xready = fn(timeout)
+    return bool(rready or wready or xready)
+
+
+def poll_wait_for_socket(
+    sock: socket.socket,
+    read: bool = False,
+    write: bool = False,
+    timeout: float | None = None,
+) -> bool:
+    if not read and not write:
+        raise RuntimeError("must specify at least one of read=True, write=True")
+    mask = 0
+    if read:
+        mask |= select.POLLIN
+    if write:
+        mask |= select.POLLOUT
+    poll_obj = select.poll()
+    poll_obj.register(sock, mask)
+
+    # For some reason, poll() takes timeout in milliseconds
+    def do_poll(t: float | None) -> list[tuple[int, int]]:
+        if t is not None:
+            t *= 1000
+        return poll_obj.poll(t)
+
+    return bool(do_poll(timeout))
+
+
+def _have_working_poll() -> bool:
+    # Apparently some systems have a select.poll that fails as soon as you try
+    # to use it, either due to strange configuration or broken monkeypatching
+    # from libraries like eventlet/greenlet.
+    try:
+        poll_obj = select.poll()
+        poll_obj.poll(0)
+    except (AttributeError, OSError):
+        return False
+    else:
+        return True
+
+
+def wait_for_socket(
+    sock: socket.socket,
+    read: bool = False,
+    write: bool = False,
+    timeout: float | None = None,
+) -> bool:
+    # We delay choosing which implementation to use until the first time we're
+    # called. We could do it at import time, but then we might make the wrong
+    # decision if someone goes wild with monkeypatching select.poll after
+    # we're imported.
+    global wait_for_socket
+    if _have_working_poll():
+        wait_for_socket = poll_wait_for_socket
+    elif hasattr(select, "select"):
+        wait_for_socket = select_wait_for_socket
+    return wait_for_socket(sock, read, write, timeout)
+
+
+def wait_for_read(sock: socket.socket, timeout: float | None = None) -> bool:
+    """Waits for reading to be available on a given socket.
+    Returns True if the socket is readable, or False if the timeout expired.
+    """
+    return wait_for_socket(sock, read=True, timeout=timeout)
+
+
+def wait_for_write(sock: socket.socket, timeout: float | None = None) -> bool:
+    """Waits for writing to be available on a given socket.
+    Returns True if the socket is readable, or False if the timeout expired.
+    """
+    return wait_for_socket(sock, write=True, timeout=timeout)
diff --git a/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/vendor.txt b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/vendor.txt
new file mode 100644
index 000000000..4e85aef47
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/site-packages/pip/_vendor/vendor.txt
@@ -0,0 +1,18 @@
+CacheControl==0.14.4
+distlib==0.4.0
+distro==1.9.0
+msgpack==1.1.2
+packaging==26.2
+platformdirs==4.5.1
+pyproject-hooks==1.2.0
+requests==2.33.1
+    certifi==2026.2.25
+    idna==3.11
+    urllib3==2.6.3
+rich==14.2.0
+    pygments==2.19.2
+resolvelib==1.2.1
+setuptools==70.3.0
+tomli==2.3.1
+tomli-w==1.2.0
+truststore==0.10.4
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/py.typed b/Python314_6_x64_Template/Lib/site-packages/pip/py.typed
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/py.typed
rename to Python314_6_x64_Template/Lib/site-packages/pip/py.typed
diff --git a/Python314_4_x64_Template/Lib/site.py b/Python314_6_x64_Template/Lib/site.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site.py
rename to Python314_6_x64_Template/Lib/site.py
diff --git a/Python314_4_x64_Template/Lib/smtplib.py b/Python314_6_x64_Template/Lib/smtplib.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/smtplib.py
rename to Python314_6_x64_Template/Lib/smtplib.py
index 72093f7f8..4cfc2338d 100644
--- a/Python314_4_x64_Template/Lib/smtplib.py
+++ b/Python314_6_x64_Template/Lib/smtplib.py
@@ -251,7 +251,6 @@ def __init__(self, host='', port=0, local_hostname=None,
         will be used.
 
         """
-        self._host = host
         self.timeout = timeout
         self.esmtp_features = {}
         self.command_encoding = 'ascii'
@@ -342,6 +341,7 @@ def connect(self, host='localhost', port=0, source_address=None):
                     port = int(port)
                 except ValueError:
                     raise OSError("nonnumeric port")
+        self._host = host
         if not port:
             port = self.default_port
         sys.audit("smtplib.connect", self, host, port)
diff --git a/Python314_4_x64_Template/Lib/socket.py b/Python314_6_x64_Template/Lib/socket.py
similarity index 98%
rename from Python314_4_x64_Template/Lib/socket.py
rename to Python314_6_x64_Template/Lib/socket.py
index 727b0e75f..bbb476f2f 100644
--- a/Python314_4_x64_Template/Lib/socket.py
+++ b/Python314_6_x64_Template/Lib/socket.py
@@ -640,18 +640,22 @@ def _fallback_socketpair(family=AF_INET, type=SOCK_STREAM, proto=0):
     # Authenticating avoids using a connection from something else
     # able to connect to {host}:{port} instead of us.
     # We expect only AF_INET and AF_INET6 families.
-    try:
-        if (
-            ssock.getsockname() != csock.getpeername()
-            or csock.getsockname() != ssock.getpeername()
-        ):
-            raise ConnectionError("Unexpected peer connection")
-    except:
-        # getsockname() and getpeername() can fail
-        # if either socket isn't connected.
-        ssock.close()
-        csock.close()
-        raise
+    #
+    # Note that we skip this on WASI because on that platorm the client socket
+    # may not have finished connecting by the time we've reached this point (gh-146139).
+    if sys.platform != "wasi":
+        try:
+            if (
+                    ssock.getsockname() != csock.getpeername()
+                    or csock.getsockname() != ssock.getpeername()
+            ):
+                raise ConnectionError("Unexpected peer connection")
+        except:
+            # getsockname() and getpeername() can fail
+            # if either socket isn't connected.
+            ssock.close()
+            csock.close()
+            raise
 
     return (ssock, csock)
 
diff --git a/Python314_4_x64_Template/Lib/socketserver.py b/Python314_6_x64_Template/Lib/socketserver.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/socketserver.py
rename to Python314_6_x64_Template/Lib/socketserver.py
diff --git a/Python314_4_x64_Template/Lib/sqlite3/__init__.py b/Python314_6_x64_Template/Lib/sqlite3/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sqlite3/__init__.py
rename to Python314_6_x64_Template/Lib/sqlite3/__init__.py
diff --git a/Python314_4_x64_Template/Lib/sqlite3/__main__.py b/Python314_6_x64_Template/Lib/sqlite3/__main__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sqlite3/__main__.py
rename to Python314_6_x64_Template/Lib/sqlite3/__main__.py
diff --git a/Python314_4_x64_Template/Lib/sqlite3/dbapi2.py b/Python314_6_x64_Template/Lib/sqlite3/dbapi2.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sqlite3/dbapi2.py
rename to Python314_6_x64_Template/Lib/sqlite3/dbapi2.py
diff --git a/Python314_4_x64_Template/Lib/sqlite3/dump.py b/Python314_6_x64_Template/Lib/sqlite3/dump.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sqlite3/dump.py
rename to Python314_6_x64_Template/Lib/sqlite3/dump.py
diff --git a/Python314_4_x64_Template/Lib/sre_compile.py b/Python314_6_x64_Template/Lib/sre_compile.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sre_compile.py
rename to Python314_6_x64_Template/Lib/sre_compile.py
diff --git a/Python314_4_x64_Template/Lib/sre_constants.py b/Python314_6_x64_Template/Lib/sre_constants.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sre_constants.py
rename to Python314_6_x64_Template/Lib/sre_constants.py
diff --git a/Python314_4_x64_Template/Lib/sre_parse.py b/Python314_6_x64_Template/Lib/sre_parse.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sre_parse.py
rename to Python314_6_x64_Template/Lib/sre_parse.py
diff --git a/Python314_4_x64_Template/Lib/ssl.py b/Python314_6_x64_Template/Lib/ssl.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/ssl.py
rename to Python314_6_x64_Template/Lib/ssl.py
diff --git a/Python314_4_x64_Template/Lib/stat.py b/Python314_6_x64_Template/Lib/stat.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/stat.py
rename to Python314_6_x64_Template/Lib/stat.py
diff --git a/Python314_4_x64_Template/Lib/statistics.py b/Python314_6_x64_Template/Lib/statistics.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/statistics.py
rename to Python314_6_x64_Template/Lib/statistics.py
diff --git a/Python314_4_x64_Template/Lib/string/__init__.py b/Python314_6_x64_Template/Lib/string/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/string/__init__.py
rename to Python314_6_x64_Template/Lib/string/__init__.py
diff --git a/Python314_6_x64_Template/Lib/string/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/string/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..3afc3c669
Binary files /dev/null and b/Python314_6_x64_Template/Lib/string/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/string/templatelib.py b/Python314_6_x64_Template/Lib/string/templatelib.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/string/templatelib.py
rename to Python314_6_x64_Template/Lib/string/templatelib.py
diff --git a/Python314_4_x64_Template/Lib/stringprep.py b/Python314_6_x64_Template/Lib/stringprep.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/stringprep.py
rename to Python314_6_x64_Template/Lib/stringprep.py
diff --git a/Python314_4_x64_Template/Lib/struct.py b/Python314_6_x64_Template/Lib/struct.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/struct.py
rename to Python314_6_x64_Template/Lib/struct.py
diff --git a/Python314_4_x64_Template/Lib/subprocess.py b/Python314_6_x64_Template/Lib/subprocess.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/subprocess.py
rename to Python314_6_x64_Template/Lib/subprocess.py
diff --git a/Python314_4_x64_Template/Lib/symtable.py b/Python314_6_x64_Template/Lib/symtable.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/symtable.py
rename to Python314_6_x64_Template/Lib/symtable.py
diff --git a/Python314_4_x64_Template/Lib/sysconfig/__init__.py b/Python314_6_x64_Template/Lib/sysconfig/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sysconfig/__init__.py
rename to Python314_6_x64_Template/Lib/sysconfig/__init__.py
diff --git a/Python314_4_x64_Template/Lib/sysconfig/__main__.py b/Python314_6_x64_Template/Lib/sysconfig/__main__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/sysconfig/__main__.py
rename to Python314_6_x64_Template/Lib/sysconfig/__main__.py
diff --git a/Python314_6_x64_Template/Lib/sysconfig/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/sysconfig/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..f328c9764
Binary files /dev/null and b/Python314_6_x64_Template/Lib/sysconfig/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/tabnanny.py b/Python314_6_x64_Template/Lib/tabnanny.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tabnanny.py
rename to Python314_6_x64_Template/Lib/tabnanny.py
diff --git a/Python314_4_x64_Template/Lib/tarfile.py b/Python314_6_x64_Template/Lib/tarfile.py
similarity index 98%
rename from Python314_4_x64_Template/Lib/tarfile.py
rename to Python314_6_x64_Template/Lib/tarfile.py
index 414aefe97..e6734db24 100644
--- a/Python314_4_x64_Template/Lib/tarfile.py
+++ b/Python314_6_x64_Template/Lib/tarfile.py
@@ -498,7 +498,7 @@ def _init_read_gz(self):
 
         if flag & 4:
             xlen = ord(self.__read(1)) + 256 * ord(self.__read(1))
-            self.read(xlen)
+            self.__read(xlen)
         if flag & 8:
             while True:
                 s = self.__read(1)
@@ -830,16 +830,22 @@ def _get_filtered_attrs(member, dest_path, for_data=True):
         if member.islnk() or member.issym():
             if os.path.isabs(member.linkname):
                 raise AbsoluteLinkError(member)
+            # A link member that resolves to the destination directory itself
+            # would replace it with a (sym)link, redirecting the destination
+            # for all subsequent members.
+            if target_path == dest_path:
+                raise OutsideDestinationError(member, target_path)
             normalized = os.path.normpath(member.linkname)
             if normalized != member.linkname:
                 new_attrs['linkname'] = normalized
             if member.issym():
-                target_path = os.path.join(dest_path,
-                                           os.path.dirname(name),
-                                           member.linkname)
+                # The symlink is created at `name` with trailing separators
+                # stripped, so its target is relative to the directory
+                # containing that path.
+                link_dir = os.path.dirname(name.rstrip('/' + os.sep))
+                target_path = os.path.join(dest_path, link_dir, normalized)
             else:
-                target_path = os.path.join(dest_path,
-                                           member.linkname)
+                target_path = os.path.join(dest_path, normalized)
             target_path = os.path.realpath(target_path,
                                            strict=os.path.ALLOW_MISSING)
             if os.path.commonpath([target_path, dest_path]) != dest_path:
@@ -893,11 +899,14 @@ class TarInfo(object):
         size = 'Size in bytes.',
         mtime = 'Time of last modification.',
         chksum = 'Header checksum.',
-        type = ('File type. type is usually one of these constants: '
-                'REGTYPE, AREGTYPE, LNKTYPE, SYMTYPE, DIRTYPE, FIFOTYPE, '
-                'CONTTYPE, CHRTYPE, BLKTYPE, GNUTYPE_SPARSE.'),
+        type = ('File type.  type is usually one of these constants: '
+                'REGTYPE,\n'
+                'AREGTYPE, LNKTYPE, SYMTYPE, DIRTYPE, FIFOTYPE, '
+                'CONTTYPE, CHRTYPE,\n'
+                'BLKTYPE, GNUTYPE_SPARSE.'),
         linkname = ('Name of the target file name, which is only present '
-                    'in TarInfo objects of type LNKTYPE and SYMTYPE.'),
+                    'in TarInfo\n'
+                    'objects of type LNKTYPE and SYMTYPE.'),
         uname = 'User name.',
         gname = 'Group name.',
         devmajor = 'Device major number.',
@@ -905,7 +914,8 @@ class TarInfo(object):
         offset = 'The tar header starts here.',
         offset_data = "The file's data starts here.",
         pax_headers = ('A dictionary containing key-value pairs of an '
-                       'associated pax extended header.'),
+                       'associated pax\n'
+                       'extended header.'),
         sparse = 'Sparse member information.',
         _tarfile = None,
         _sparse_structs = None,
@@ -2267,10 +2277,11 @@ def gettarinfo(self, name=None, arcname=None, fileobj=None):
         return tarinfo
 
     def list(self, verbose=True, *, members=None):
-        """Print a table of contents to sys.stdout. If 'verbose' is False, only
-           the names of the members are printed. If it is True, an 'ls -l'-like
-           output is produced. 'members' is optional and must be a subset of the
-           list returned by getmembers().
+        """Print a table of contents to sys.stdout.
+
+        If 'verbose' is False, only the names of the members are printed.
+        If it is True, an 'ls -l'-like output is produced.  'members' is
+        optional and must be a subset of the list returned by getmembers().
         """
         # Convert tarinfo type to stat type.
         type2mode = {REGTYPE: stat.S_IFREG, SYMTYPE: stat.S_IFLNK,
@@ -2361,10 +2372,12 @@ def add(self, name, arcname=None, recursive=True, *, filter=None):
             self.addfile(tarinfo)
 
     def addfile(self, tarinfo, fileobj=None):
-        """Add the TarInfo object 'tarinfo' to the archive. If 'tarinfo' represents
-           a non zero-size regular file, the 'fileobj' argument should be a binary file,
-           and tarinfo.size bytes are read from it and added to the archive.
-           You can create TarInfo objects directly, or by using gettarinfo().
+        """Add the TarInfo object 'tarinfo' to the archive.
+
+        If 'tarinfo' represents a non zero-size regular file, the 'fileobj'
+        argument should be a binary file, and tarinfo.size bytes are read
+        from it and added to the archive. You can create TarInfo objects
+        directly, or by using gettarinfo().
         """
         self._check("awx")
 
diff --git a/Python314_4_x64_Template/Lib/tempfile.py b/Python314_6_x64_Template/Lib/tempfile.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tempfile.py
rename to Python314_6_x64_Template/Lib/tempfile.py
diff --git a/Python314_4_x64_Template/Lib/textwrap.py b/Python314_6_x64_Template/Lib/textwrap.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/textwrap.py
rename to Python314_6_x64_Template/Lib/textwrap.py
diff --git a/Python314_4_x64_Template/Lib/this.py b/Python314_6_x64_Template/Lib/this.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/this.py
rename to Python314_6_x64_Template/Lib/this.py
diff --git a/Python314_4_x64_Template/Lib/threading.py b/Python314_6_x64_Template/Lib/threading.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/threading.py
rename to Python314_6_x64_Template/Lib/threading.py
diff --git a/Python314_4_x64_Template/Lib/timeit.py b/Python314_6_x64_Template/Lib/timeit.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/timeit.py
rename to Python314_6_x64_Template/Lib/timeit.py
index e767f0187..0451f66bd 100644
--- a/Python314_4_x64_Template/Lib/timeit.py
+++ b/Python314_6_x64_Template/Lib/timeit.py
@@ -319,7 +319,7 @@ def main(args=None, *, _wrap_timer=None):
         callback = None
         if verbose:
             def callback(number, time_taken):
-                msg = "{num} loop{s} -> {secs:.{prec}g} secs"
+                msg = "{num} loop{s} -> {secs:.{prec}g} sec"
                 plural = (number != 1)
                 print(msg.format(num=number, s='s' if plural else '',
                                  secs=time_taken, prec=precision))
diff --git a/Python314_4_x64_Template/Lib/token.py b/Python314_6_x64_Template/Lib/token.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/token.py
rename to Python314_6_x64_Template/Lib/token.py
diff --git a/Python314_4_x64_Template/Lib/tokenize.py b/Python314_6_x64_Template/Lib/tokenize.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tokenize.py
rename to Python314_6_x64_Template/Lib/tokenize.py
diff --git a/Python314_4_x64_Template/Lib/tomllib/__init__.py b/Python314_6_x64_Template/Lib/tomllib/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tomllib/__init__.py
rename to Python314_6_x64_Template/Lib/tomllib/__init__.py
diff --git a/Python314_6_x64_Template/Lib/tomllib/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/tomllib/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..5d316eab5
Binary files /dev/null and b/Python314_6_x64_Template/Lib/tomllib/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/tomllib/__pycache__/_parser.cpython-314.pyc b/Python314_6_x64_Template/Lib/tomllib/__pycache__/_parser.cpython-314.pyc
new file mode 100644
index 000000000..08016e55a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/tomllib/__pycache__/_parser.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/tomllib/__pycache__/_re.cpython-314.pyc b/Python314_6_x64_Template/Lib/tomllib/__pycache__/_re.cpython-314.pyc
new file mode 100644
index 000000000..f2c13ee3a
Binary files /dev/null and b/Python314_6_x64_Template/Lib/tomllib/__pycache__/_re.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/tomllib/_parser.py b/Python314_6_x64_Template/Lib/tomllib/_parser.py
new file mode 100644
index 000000000..84e70495d
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/tomllib/_parser.py
@@ -0,0 +1,765 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
+# Licensed to PSF under a Contributor Agreement.
+
+from __future__ import annotations
+
+import sys
+from types import MappingProxyType
+
+from ._re import (
+    RE_DATETIME,
+    RE_LOCALTIME,
+    RE_NUMBER,
+    match_to_datetime,
+    match_to_localtime,
+    match_to_number,
+)
+
+TYPE_CHECKING = False
+if TYPE_CHECKING:
+    from collections.abc import Iterable
+    from typing import IO, Any, Final
+
+    from ._types import Key, ParseFloat, Pos
+
+# Pathologically excessive number of parts in a key runs into quadratic
+# behavior (e.g. in Flags.is_).
+# Even if keys aren't currently parsed using recursion, they name a
+# recursive structure, so it makes sense to limit it using getrecursionlimit()
+# and RecursionError.
+MAX_KEY_PARTS: Final = sys.getrecursionlimit()
+
+ASCII_CTRL = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
+
+# Neither of these sets include quotation mark or backslash. They are
+# currently handled as separate cases in the parser functions.
+ILLEGAL_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t")
+ILLEGAL_MULTILINE_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t\n")
+
+ILLEGAL_LITERAL_STR_CHARS = ILLEGAL_BASIC_STR_CHARS
+ILLEGAL_MULTILINE_LITERAL_STR_CHARS = ILLEGAL_MULTILINE_BASIC_STR_CHARS
+
+ILLEGAL_COMMENT_CHARS = ILLEGAL_BASIC_STR_CHARS
+
+TOML_WS = frozenset(" \t")
+TOML_WS_AND_NEWLINE = TOML_WS | frozenset("\n")
+BARE_KEY_CHARS = frozenset(
+    "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
+)
+KEY_INITIAL_CHARS = BARE_KEY_CHARS | frozenset("\"'")
+HEXDIGIT_CHARS = frozenset("abcdef" "ABCDEF" "0123456789")
+
+BASIC_STR_ESCAPE_REPLACEMENTS = MappingProxyType(
+    {
+        "\\b": "\u0008",  # backspace
+        "\\t": "\u0009",  # tab
+        "\\n": "\u000A",  # linefeed
+        "\\f": "\u000C",  # form feed
+        "\\r": "\u000D",  # carriage return
+        '\\"': "\u0022",  # quote
+        "\\\\": "\u005C",  # backslash
+    }
+)
+
+
+class DEPRECATED_DEFAULT:
+    """Sentinel to be used as default arg during deprecation
+    period of TOMLDecodeError's free-form arguments."""
+
+
+class TOMLDecodeError(ValueError):
+    """An error raised if a document is not valid TOML.
+
+    Adds the following attributes to ValueError:
+    msg: The unformatted error message
+    doc: The TOML document being parsed
+    pos: The index of doc where parsing failed
+    lineno: The line corresponding to pos
+    colno: The column corresponding to pos
+    """
+
+    def __init__(
+        self,
+        msg: str = DEPRECATED_DEFAULT,  # type: ignore[assignment]
+        doc: str = DEPRECATED_DEFAULT,  # type: ignore[assignment]
+        pos: Pos = DEPRECATED_DEFAULT,  # type: ignore[assignment]
+        *args: Any,
+    ):
+        if (
+            args
+            or not isinstance(msg, str)
+            or not isinstance(doc, str)
+            or not isinstance(pos, int)
+        ):
+            import warnings
+
+            warnings.warn(
+                "Free-form arguments for TOMLDecodeError are deprecated. "
+                "Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.",
+                DeprecationWarning,
+                stacklevel=2,
+            )
+            if pos is not DEPRECATED_DEFAULT:  # type: ignore[comparison-overlap]
+                args = pos, *args
+            if doc is not DEPRECATED_DEFAULT:  # type: ignore[comparison-overlap]
+                args = doc, *args
+            if msg is not DEPRECATED_DEFAULT:  # type: ignore[comparison-overlap]
+                args = msg, *args
+            ValueError.__init__(self, *args)
+            return
+
+        lineno = doc.count("\n", 0, pos) + 1
+        if lineno == 1:
+            colno = pos + 1
+        else:
+            colno = pos - doc.rindex("\n", 0, pos)
+
+        if pos >= len(doc):
+            coord_repr = "end of document"
+        else:
+            coord_repr = f"line {lineno}, column {colno}"
+        errmsg = f"{msg} (at {coord_repr})"
+        ValueError.__init__(self, errmsg)
+
+        self.msg = msg
+        self.doc = doc
+        self.pos = pos
+        self.lineno = lineno
+        self.colno = colno
+
+
+def load(fp: IO[bytes], /, *, parse_float: ParseFloat = float) -> dict[str, Any]:
+    """Parse TOML from a binary file object."""
+    b = fp.read()
+    try:
+        s = b.decode()
+    except AttributeError:
+        raise TypeError(
+            "File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
+        ) from None
+    return loads(s, parse_float=parse_float)
+
+
+def loads(s: str, /, *, parse_float: ParseFloat = float) -> dict[str, Any]:  # noqa: C901
+    """Parse TOML from a string."""
+
+    # The spec allows converting "\r\n" to "\n", even in string
+    # literals. Let's do so to simplify parsing.
+    try:
+        src = s.replace("\r\n", "\n")
+    except (AttributeError, TypeError):
+        raise TypeError(
+            f"Expected str object, not '{type(s).__qualname__}'"
+        ) from None
+    pos = 0
+    out = Output()
+    header: Key = ()
+    parse_float = make_safe_parse_float(parse_float)
+
+    # Parse one statement at a time
+    # (typically means one line in TOML source)
+    while True:
+        # 1. Skip line leading whitespace
+        pos = skip_chars(src, pos, TOML_WS)
+
+        # 2. Parse rules. Expect one of the following:
+        #    - end of file
+        #    - end of line
+        #    - comment
+        #    - key/value pair
+        #    - append dict to list (and move to its namespace)
+        #    - create dict (and move to its namespace)
+        # Skip trailing whitespace when applicable.
+        try:
+            char = src[pos]
+        except IndexError:
+            break
+        if char == "\n":
+            pos += 1
+            continue
+        if char in KEY_INITIAL_CHARS:
+            pos = key_value_rule(src, pos, out, header, parse_float)
+            pos = skip_chars(src, pos, TOML_WS)
+        elif char == "[":
+            try:
+                second_char: str | None = src[pos + 1]
+            except IndexError:
+                second_char = None
+            out.flags.finalize_pending()
+            if second_char == "[":
+                pos, header = create_list_rule(src, pos, out)
+            else:
+                pos, header = create_dict_rule(src, pos, out)
+            pos = skip_chars(src, pos, TOML_WS)
+        elif char != "#":
+            raise TOMLDecodeError("Invalid statement", src, pos)
+
+        # 3. Skip comment
+        pos = skip_comment(src, pos)
+
+        # 4. Expect end of line or end of file
+        try:
+            char = src[pos]
+        except IndexError:
+            break
+        if char != "\n":
+            raise TOMLDecodeError(
+                "Expected newline or end of document after a statement", src, pos
+            )
+        pos += 1
+
+    return out.data.dict
+
+
+class Flags:
+    """Flags that map to parsed keys/namespaces."""
+
+    # Marks an immutable namespace (inline array or inline table).
+    FROZEN = 0
+    # Marks a nest that has been explicitly created and can no longer
+    # be opened using the "[table]" syntax.
+    EXPLICIT_NEST = 1
+
+    def __init__(self) -> None:
+        self._flags: dict[str, dict[Any, Any]] = {}
+        self._pending_flags: set[tuple[Key, int]] = set()
+
+    def add_pending(self, key: Key, flag: int) -> None:
+        self._pending_flags.add((key, flag))
+
+    def finalize_pending(self) -> None:
+        for key, flag in self._pending_flags:
+            self.set(key, flag, recursive=False)
+        self._pending_flags.clear()
+
+    def unset_all(self, key: Key) -> None:
+        cont = self._flags
+        for k in key[:-1]:
+            if k not in cont:
+                return
+            cont = cont[k]["nested"]
+        cont.pop(key[-1], None)
+
+    def set(self, key: Key, flag: int, *, recursive: bool) -> None:  # noqa: A003
+        cont = self._flags
+        key_parent, key_stem = key[:-1], key[-1]
+        for k in key_parent:
+            if k not in cont:
+                cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
+            cont = cont[k]["nested"]
+        if key_stem not in cont:
+            cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
+        cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
+
+    def is_(self, key: Key, flag: int) -> bool:
+        if not key:
+            return False  # document root has no flags
+        cont = self._flags
+        for k in key[:-1]:
+            if k not in cont:
+                return False
+            inner_cont = cont[k]
+            if flag in inner_cont["recursive_flags"]:
+                return True
+            cont = inner_cont["nested"]
+        key_stem = key[-1]
+        if key_stem in cont:
+            cont = cont[key_stem]
+            return flag in cont["flags"] or flag in cont["recursive_flags"]
+        return False
+
+
+class NestedDict:
+    def __init__(self) -> None:
+        # The parsed content of the TOML document
+        self.dict: dict[str, Any] = {}
+
+    def get_or_create_nest(
+        self,
+        key: Key,
+        *,
+        access_lists: bool = True,
+    ) -> dict[str, Any]:
+        cont: Any = self.dict
+        for k in key:
+            if k not in cont:
+                cont[k] = {}
+            cont = cont[k]
+            if access_lists and isinstance(cont, list):
+                cont = cont[-1]
+            if not isinstance(cont, dict):
+                raise KeyError("There is no nest behind this key")
+        return cont  # type: ignore[no-any-return]
+
+    def append_nest_to_list(self, key: Key) -> None:
+        cont = self.get_or_create_nest(key[:-1])
+        last_key = key[-1]
+        if last_key in cont:
+            list_ = cont[last_key]
+            if not isinstance(list_, list):
+                raise KeyError("An object other than list found behind this key")
+            list_.append({})
+        else:
+            cont[last_key] = [{}]
+
+
+class Output:
+    def __init__(self) -> None:
+        self.data = NestedDict()
+        self.flags = Flags()
+
+
+def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
+    try:
+        while src[pos] in chars:
+            pos += 1
+    except IndexError:
+        pass
+    return pos
+
+
+def skip_until(
+    src: str,
+    pos: Pos,
+    expect: str,
+    *,
+    error_on: frozenset[str],
+    error_on_eof: bool,
+) -> Pos:
+    try:
+        new_pos = src.index(expect, pos)
+    except ValueError:
+        new_pos = len(src)
+        if error_on_eof:
+            raise TOMLDecodeError(f"Expected {expect!r}", src, new_pos) from None
+
+    if not error_on.isdisjoint(src[pos:new_pos]):
+        while src[pos] not in error_on:
+            pos += 1
+        raise TOMLDecodeError(f"Found invalid character {src[pos]!r}", src, pos)
+    return new_pos
+
+
+def skip_comment(src: str, pos: Pos) -> Pos:
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+    if char == "#":
+        return skip_until(
+            src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
+        )
+    return pos
+
+
+def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
+    while True:
+        pos_before_skip = pos
+        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
+        pos = skip_comment(src, pos)
+        if pos == pos_before_skip:
+            return pos
+
+
+def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
+    pos += 1  # Skip "["
+    pos = skip_chars(src, pos, TOML_WS)
+    pos, key = parse_key(src, pos)
+
+    if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
+        raise TOMLDecodeError(f"Cannot declare {key} twice", src, pos)
+    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
+    try:
+        out.data.get_or_create_nest(key)
+    except KeyError:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+
+    if not src.startswith("]", pos):
+        raise TOMLDecodeError(
+            "Expected ']' at the end of a table declaration", src, pos
+        )
+    return pos + 1, key
+
+
+def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
+    pos += 2  # Skip "[["
+    pos = skip_chars(src, pos, TOML_WS)
+    pos, key = parse_key(src, pos)
+
+    if out.flags.is_(key, Flags.FROZEN):
+        raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
+    # Free the namespace now that it points to another empty list item...
+    out.flags.unset_all(key)
+    # ...but this key precisely is still prohibited from table declaration
+    out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
+    try:
+        out.data.append_nest_to_list(key)
+    except KeyError:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+
+    if not src.startswith("]]", pos):
+        raise TOMLDecodeError(
+            "Expected ']]' at the end of an array declaration", src, pos
+        )
+    return pos + 2, key
+
+
+def key_value_rule(
+    src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
+) -> Pos:
+    pos, key, value = parse_key_value_pair(src, pos, parse_float)
+    key_parent, key_stem = key[:-1], key[-1]
+    abs_key_parent = header + key_parent
+
+    relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
+    for cont_key in relative_path_cont_keys:
+        # Check that dotted key syntax does not redefine an existing table
+        if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
+            raise TOMLDecodeError(f"Cannot redefine namespace {cont_key}", src, pos)
+        # Containers in the relative path can't be opened with the table syntax or
+        # dotted key/value syntax in following table sections.
+        out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)
+
+    if out.flags.is_(abs_key_parent, Flags.FROZEN):
+        raise TOMLDecodeError(
+            f"Cannot mutate immutable namespace {abs_key_parent}", src, pos
+        )
+
+    try:
+        nest = out.data.get_or_create_nest(abs_key_parent)
+    except KeyError:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+    if key_stem in nest:
+        raise TOMLDecodeError("Cannot overwrite a value", src, pos)
+    # Mark inline table and array namespaces recursively immutable
+    if isinstance(value, (dict, list)):
+        out.flags.set(header + key, Flags.FROZEN, recursive=True)
+    nest[key_stem] = value
+    return pos
+
+
+def parse_key_value_pair(
+    src: str, pos: Pos, parse_float: ParseFloat
+) -> tuple[Pos, Key, Any]:
+    pos, key = parse_key(src, pos)
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+    if char != "=":
+        raise TOMLDecodeError("Expected '=' after a key in a key/value pair", src, pos)
+    pos += 1
+    pos = skip_chars(src, pos, TOML_WS)
+    pos, value = parse_value(src, pos, parse_float)
+    return pos, key, value
+
+
+def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
+    pos, key_part = parse_key_part(src, pos)
+    key: Key = (key_part,)
+    pos = skip_chars(src, pos, TOML_WS)
+    while True:
+        try:
+            char: str | None = src[pos]
+        except IndexError:
+            char = None
+        if char != ".":
+            return pos, key
+        pos += 1
+        pos = skip_chars(src, pos, TOML_WS)
+        pos, key_part = parse_key_part(src, pos)
+        key += (key_part,)
+        if len(key) > MAX_KEY_PARTS:
+            raise RecursionError(
+                f"TOML key has more than the allowed {MAX_KEY_PARTS} parts"
+            )
+        pos = skip_chars(src, pos, TOML_WS)
+
+
+def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+    if char in BARE_KEY_CHARS:
+        start_pos = pos
+        pos = skip_chars(src, pos, BARE_KEY_CHARS)
+        return pos, src[start_pos:pos]
+    if char == "'":
+        return parse_literal_str(src, pos)
+    if char == '"':
+        return parse_one_line_basic_str(src, pos)
+    raise TOMLDecodeError("Invalid initial character for a key part", src, pos)
+
+
+def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
+    pos += 1
+    return parse_basic_str(src, pos, multiline=False)
+
+
+def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list[Any]]:
+    pos += 1
+    array: list[Any] = []
+
+    pos = skip_comments_and_array_ws(src, pos)
+    if src.startswith("]", pos):
+        return pos + 1, array
+    while True:
+        pos, val = parse_value(src, pos, parse_float)
+        array.append(val)
+        pos = skip_comments_and_array_ws(src, pos)
+
+        c = src[pos : pos + 1]
+        if c == "]":
+            return pos + 1, array
+        if c != ",":
+            raise TOMLDecodeError("Unclosed array", src, pos)
+        pos += 1
+
+        pos = skip_comments_and_array_ws(src, pos)
+        if src.startswith("]", pos):
+            return pos + 1, array
+
+
+def parse_inline_table(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, dict[str, Any]]:
+    pos += 1
+    nested_dict = NestedDict()
+    flags = Flags()
+
+    pos = skip_chars(src, pos, TOML_WS)
+    if src.startswith("}", pos):
+        return pos + 1, nested_dict.dict
+    while True:
+        pos, key, value = parse_key_value_pair(src, pos, parse_float)
+        key_parent, key_stem = key[:-1], key[-1]
+        if flags.is_(key, Flags.FROZEN):
+            raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
+        try:
+            nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
+        except KeyError:
+            raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
+        if key_stem in nest:
+            raise TOMLDecodeError(f"Duplicate inline table key {key_stem!r}", src, pos)
+        nest[key_stem] = value
+        pos = skip_chars(src, pos, TOML_WS)
+        c = src[pos : pos + 1]
+        if c == "}":
+            return pos + 1, nested_dict.dict
+        if c != ",":
+            raise TOMLDecodeError("Unclosed inline table", src, pos)
+        if isinstance(value, (dict, list)):
+            flags.set(key, Flags.FROZEN, recursive=True)
+        pos += 1
+        pos = skip_chars(src, pos, TOML_WS)
+
+
+def parse_basic_str_escape(
+    src: str, pos: Pos, *, multiline: bool = False
+) -> tuple[Pos, str]:
+    escape_id = src[pos : pos + 2]
+    pos += 2
+    if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
+        # Skip whitespace until next non-whitespace character or end of
+        # the doc. Error if non-whitespace is found before newline.
+        if escape_id != "\\\n":
+            pos = skip_chars(src, pos, TOML_WS)
+            try:
+                char = src[pos]
+            except IndexError:
+                return pos, ""
+            if char != "\n":
+                raise TOMLDecodeError("Unescaped '\\' in a string", src, pos)
+            pos += 1
+        pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
+        return pos, ""
+    if escape_id == "\\u":
+        return parse_hex_char(src, pos, 4)
+    if escape_id == "\\U":
+        return parse_hex_char(src, pos, 8)
+    try:
+        return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
+    except KeyError:
+        raise TOMLDecodeError("Unescaped '\\' in a string", src, pos) from None
+
+
+def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
+    return parse_basic_str_escape(src, pos, multiline=True)
+
+
+def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
+    hex_str = src[pos : pos + hex_len]
+    if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
+        raise TOMLDecodeError("Invalid hex value", src, pos)
+    pos += hex_len
+    hex_int = int(hex_str, 16)
+    if not is_unicode_scalar_value(hex_int):
+        raise TOMLDecodeError(
+            "Escaped character is not a Unicode scalar value", src, pos
+        )
+    return pos, chr(hex_int)
+
+
+def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
+    pos += 1  # Skip starting apostrophe
+    start_pos = pos
+    pos = skip_until(
+        src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
+    )
+    return pos + 1, src[start_pos:pos]  # Skip ending apostrophe
+
+
+def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
+    pos += 3
+    if src.startswith("\n", pos):
+        pos += 1
+
+    if literal:
+        delim = "'"
+        end_pos = skip_until(
+            src,
+            pos,
+            "'''",
+            error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
+            error_on_eof=True,
+        )
+        result = src[pos:end_pos]
+        pos = end_pos + 3
+    else:
+        delim = '"'
+        pos, result = parse_basic_str(src, pos, multiline=True)
+
+    # Add at maximum two extra apostrophes/quotes if the end sequence
+    # is 4 or 5 chars long instead of just 3.
+    if not src.startswith(delim, pos):
+        return pos, result
+    pos += 1
+    if not src.startswith(delim, pos):
+        return pos, result + delim
+    pos += 1
+    return pos, result + (delim * 2)
+
+
+def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
+    if multiline:
+        error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
+        parse_escapes = parse_basic_str_escape_multiline
+    else:
+        error_on = ILLEGAL_BASIC_STR_CHARS
+        parse_escapes = parse_basic_str_escape
+    result = ""
+    start_pos = pos
+    while True:
+        try:
+            char = src[pos]
+        except IndexError:
+            raise TOMLDecodeError("Unterminated string", src, pos) from None
+        if char == '"':
+            if not multiline:
+                return pos + 1, result + src[start_pos:pos]
+            if src.startswith('"""', pos):
+                return pos + 3, result + src[start_pos:pos]
+            pos += 1
+            continue
+        if char == "\\":
+            result += src[start_pos:pos]
+            pos, parsed_escape = parse_escapes(src, pos)
+            result += parsed_escape
+            start_pos = pos
+            continue
+        if char in error_on:
+            raise TOMLDecodeError(f"Illegal character {char!r}", src, pos)
+        pos += 1
+
+
+def parse_value(  # noqa: C901
+    src: str, pos: Pos, parse_float: ParseFloat
+) -> tuple[Pos, Any]:
+    try:
+        char: str | None = src[pos]
+    except IndexError:
+        char = None
+
+    # IMPORTANT: order conditions based on speed of checking and likelihood
+
+    # Basic strings
+    if char == '"':
+        if src.startswith('"""', pos):
+            return parse_multiline_str(src, pos, literal=False)
+        return parse_one_line_basic_str(src, pos)
+
+    # Literal strings
+    if char == "'":
+        if src.startswith("'''", pos):
+            return parse_multiline_str(src, pos, literal=True)
+        return parse_literal_str(src, pos)
+
+    # Booleans
+    if char == "t":
+        if src.startswith("true", pos):
+            return pos + 4, True
+    if char == "f":
+        if src.startswith("false", pos):
+            return pos + 5, False
+
+    # Arrays
+    if char == "[":
+        return parse_array(src, pos, parse_float)
+
+    # Inline tables
+    if char == "{":
+        return parse_inline_table(src, pos, parse_float)
+
+    # Dates and times
+    datetime_match = RE_DATETIME.match(src, pos)
+    if datetime_match:
+        try:
+            datetime_obj = match_to_datetime(datetime_match)
+        except ValueError as e:
+            raise TOMLDecodeError("Invalid date or datetime", src, pos) from e
+        return datetime_match.end(), datetime_obj
+    localtime_match = RE_LOCALTIME.match(src, pos)
+    if localtime_match:
+        return localtime_match.end(), match_to_localtime(localtime_match)
+
+    # Integers and "normal" floats.
+    # The regex will greedily match any type starting with a decimal
+    # char, so needs to be located after handling of dates and times.
+    number_match = RE_NUMBER.match(src, pos)
+    if number_match:
+        return number_match.end(), match_to_number(number_match, parse_float)
+
+    # Special floats
+    first_three = src[pos : pos + 3]
+    if first_three in {"inf", "nan"}:
+        return pos + 3, parse_float(first_three)
+    first_four = src[pos : pos + 4]
+    if first_four in {"-inf", "+inf", "-nan", "+nan"}:
+        return pos + 4, parse_float(first_four)
+
+    raise TOMLDecodeError("Invalid value", src, pos)
+
+
+def is_unicode_scalar_value(codepoint: int) -> bool:
+    return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)
+
+
+def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
+    """A decorator to make `parse_float` safe.
+
+    `parse_float` must not return dicts or lists, because these types
+    would be mixed with parsed TOML tables and arrays, thus confusing
+    the parser. The returned decorated callable raises `ValueError`
+    instead of returning illegal types.
+    """
+    # The default `float` callable never returns illegal types. Optimize it.
+    if parse_float is float:
+        return float
+
+    def safe_parse_float(float_str: str) -> Any:
+        float_value = parse_float(float_str)
+        if isinstance(float_value, (dict, list)):
+            raise ValueError("parse_float must not return dicts or lists")
+        return float_value
+
+    return safe_parse_float
diff --git a/Python314_4_x64_Template/Lib/tomllib/_re.py b/Python314_6_x64_Template/Lib/tomllib/_re.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tomllib/_re.py
rename to Python314_6_x64_Template/Lib/tomllib/_re.py
diff --git a/Python314_4_x64_Template/Lib/tomllib/_types.py b/Python314_6_x64_Template/Lib/tomllib/_types.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tomllib/_types.py
rename to Python314_6_x64_Template/Lib/tomllib/_types.py
diff --git a/Python314_4_x64_Template/Lib/tomllib/mypy.ini b/Python314_6_x64_Template/Lib/tomllib/mypy.ini
similarity index 89%
rename from Python314_4_x64_Template/Lib/tomllib/mypy.ini
rename to Python314_6_x64_Template/Lib/tomllib/mypy.ini
index 1761dce45..f7eeffd57 100644
--- a/Python314_4_x64_Template/Lib/tomllib/mypy.ini
+++ b/Python314_6_x64_Template/Lib/tomllib/mypy.ini
@@ -12,6 +12,4 @@ pretty = True
 # Enable most stricter settings
 enable_error_code = ignore-without-code
 strict = True
-strict_bytes = True
-local_partial_types = True
 warn_unreachable = True
diff --git a/Python314_4_x64_Template/Lib/trace.py b/Python314_6_x64_Template/Lib/trace.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/trace.py
rename to Python314_6_x64_Template/Lib/trace.py
diff --git a/Python314_4_x64_Template/Lib/traceback.py b/Python314_6_x64_Template/Lib/traceback.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/traceback.py
rename to Python314_6_x64_Template/Lib/traceback.py
index 79f67b987..227ca8efa 100644
--- a/Python314_4_x64_Template/Lib/traceback.py
+++ b/Python314_6_x64_Template/Lib/traceback.py
@@ -74,10 +74,10 @@ def extract_tb(tb, limit=None):
     This is useful for alternate formatting of stack traces.  If
     'limit' is omitted or None, all entries are extracted.  A
     pre-processed stack trace entry is a FrameSummary object
-    containing attributes filename, lineno, name, and line
-    representing the information that is usually printed for a stack
-    trace.  The line is a string with leading and trailing
-    whitespace stripped; if the source is not available it is None.
+    representing the information that is usually printed for a
+    stack trace. The line attribute is a string with
+    leading and trailing whitespace stripped; if the source is not
+    available the corresponding attribute is None.
     """
     return StackSummary._extract_from_extended_frame_gen(
         _walk_tb_with_full_positions(tb), limit=limit)
@@ -253,9 +253,8 @@ def extract_stack(f=None, limit=None):
 
     The return value has the same format as for extract_tb().  The
     optional 'f' and 'limit' arguments have the same meaning as for
-    print_stack().  Each item in the list is a quadruple (filename,
-    line number, function name, text), and the entries are in order
-    from oldest to newest stack frame.
+    print_stack().  Each item in the list is a FrameSummary object,
+    and the entries are in order from oldest to newest stack frame.
     """
     if f is None:
         f = sys._getframe().f_back
@@ -283,7 +282,7 @@ class FrameSummary:
       active when the frame was captured.
     - :attr:`name` The name of the function or method that was executing
       when the frame was captured.
-    - :attr:`line` The text from the linecache module for the
+    - :attr:`line` The text from the linecache module for the line
       of code that was running when the frame was captured.
     - :attr:`locals` Either None if locals were not supplied, or a dict
       mapping the name to the repr() of the variable.
@@ -958,7 +957,7 @@ def setup_positions(expr, force_valid=True):
 _WIDE_CHAR_SPECIFIERS = "WF"
 
 def _display_width(line, offset=None):
-    """Calculate the extra amount of width space the given source
+    """Calculate the amount of width space the given source
     code segment might take if it were to be displayed on a fixed
     width output device. Supports wide unicode characters and emojis."""
 
@@ -1044,7 +1043,7 @@ class TracebackException:
     def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None,
             lookup_lines=True, capture_locals=False, compact=False,
             max_group_width=15, max_group_depth=10, save_exc_type=True, _seen=None):
-        # NB: we need to accept exc_traceback, exc_value, exc_traceback to
+        # NB: we need to accept exc_type, exc_value, exc_traceback to
         # permit backwards compat with the existing API, otherwise we
         # need stub thunk objects just to glue it together.
         # Handle loops in __cause__ or __context__.
diff --git a/Python314_4_x64_Template/Lib/tracemalloc.py b/Python314_6_x64_Template/Lib/tracemalloc.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tracemalloc.py
rename to Python314_6_x64_Template/Lib/tracemalloc.py
diff --git a/Python314_4_x64_Template/Lib/tty.py b/Python314_6_x64_Template/Lib/tty.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/tty.py
rename to Python314_6_x64_Template/Lib/tty.py
diff --git a/Python314_4_x64_Template/Lib/types.py b/Python314_6_x64_Template/Lib/types.py
similarity index 95%
rename from Python314_4_x64_Template/Lib/types.py
rename to Python314_6_x64_Template/Lib/types.py
index fa6324fb4..60a4b22c2 100644
--- a/Python314_4_x64_Template/Lib/types.py
+++ b/Python314_6_x64_Template/Lib/types.py
@@ -189,18 +189,19 @@ class Baz(list[str]): ...
 class DynamicClassAttribute:
     """Route attribute access on a class to __getattr__.
 
-    This is a descriptor, used to define attributes that act differently when
-    accessed through an instance and through a class.  Instance access remains
-    normal, but access to an attribute through a class will be routed to the
-    class's __getattr__ method; this is done by raising AttributeError.
-
-    This allows one to have properties active on an instance, and have virtual
-    attributes on the class with the same name.  (Enum used this between Python
-    versions 3.4 - 3.9 .)
-
-    Subclass from this to use a different method of accessing virtual attributes
-    and still be treated properly by the inspect module. (Enum uses this since
-    Python 3.10 .)
+    This is a descriptor, used to define attributes that act differently
+    when accessed through an instance and through a class.  Instance access
+    remains normal, but access to an attribute through a class will be
+    routed to the class's __getattr__ method; this is done by raising
+    AttributeError.
+
+    This allows one to have properties active on an instance, and have
+    virtual attributes on the class with the same name.  (Enum used this
+    between Python versions 3.4 - 3.9 .)
+
+    Subclass from this to use a different method of accessing virtual
+    attributes and still be treated properly by the inspect module.  (Enum
+    uses this since Python 3.10 .)
 
     """
     def __init__(self, fget=None, fset=None, fdel=None, doc=None):
diff --git a/Python314_4_x64_Template/Lib/typing.py b/Python314_6_x64_Template/Lib/typing.py
similarity index 97%
rename from Python314_4_x64_Template/Lib/typing.py
rename to Python314_6_x64_Template/Lib/typing.py
index 380211183..8c36399a6 100644
--- a/Python314_4_x64_Template/Lib/typing.py
+++ b/Python314_6_x64_Template/Lib/typing.py
@@ -5,7 +5,7 @@
 * Generic, Protocol, and internal machinery to support generic aliases.
   All subscripted types like X[int], Union[int, str] are generic aliases.
 * Various "special forms" that have unique meanings in type annotations:
-  NoReturn, Never, ClassVar, Self, Concatenate, Unpack, and others.
+  Any, Never, ClassVar, Self, Concatenate, Unpack, and others.
 * Classes whose instances can be type arguments to generic classes and functions:
   TypeVar, ParamSpec, TypeVarTuple.
 * Public helper functions: get_type_hints, overload, cast, final, and others.
@@ -588,12 +588,12 @@ def __repr__(self):
 class Any(metaclass=_AnyMeta):
     """Special type indicating an unconstrained type.
 
-    - Any is compatible with every type.
-    - Any assumed to have all methods.
-    - All values assumed to be instances of Any.
+    - Any is assignable to every type.
+    - Any assumed to have all methods and attributes.
+    - All values are assignable to Any.
 
     Note that all the above statements are true from the point of view of
-    static type checkers. At runtime, Any should not be used with instance
+    static type checkers. At runtime, Any cannot be used with instance
     checks.
     """
 
@@ -712,7 +712,7 @@ class Starship:
 
     ClassVar accepts only types and cannot be further subscribed.
 
-    Note that ClassVar is not a class itself, and should not
+    Note that ClassVar is not a class itself, and cannot
     be used with isinstance() or issubclass().
     """
     item = _type_check(parameters, f'{self} accepts only single type.', allow_special_forms=True)
@@ -742,7 +742,7 @@ class FastConnector(Connection):
 
 @_SpecialForm
 def Optional(self, parameters):
-    """Optional[X] is equivalent to Union[X, None]."""
+    """Optional[X] is equivalent to X | None."""
     arg = _type_check(parameters, f"{self} requires a single type.")
     return Union[arg, type(None)]
 
@@ -785,7 +785,7 @@ def open_helper(file: str, mode: MODE) -> str:
 def TypeAlias(self, parameters):
     """Special form for marking type aliases.
 
-    Use TypeAlias to indicate that an assignment should
+    TypeAlias can be used to indicate that an assignment should
     be recognized as a proper type alias definition by type
     checkers.
 
@@ -1780,7 +1780,7 @@ class Movie(TypedDict):
         def foo(**kwargs: Unpack[Movie]): ...
 
     Note that there is only some runtime checking of this operator. Not
-    everything the runtime allows may be accepted by static type checkers.
+    everything the runtime allows is accepted by static type checkers.
 
     For more information, see PEPs 646 and 692.
     """
@@ -2261,7 +2261,7 @@ def runtime_checkable(cls):
     Such protocol can be used with isinstance() and issubclass().
     Raise TypeError if applied to a non-protocol class.
     This allows a simple-minded structural check very similar to
-    one trick ponies in collections.abc such as Iterable.
+    one-trick ponies in collections.abc such as Iterable.
 
     For example::
 
@@ -2328,8 +2328,8 @@ def get_type_hints(obj, globalns=None, localns=None, include_extras=False,
                    *, format=None):
     """Return type hints for an object.
 
-    This is often the same as obj.__annotations__, but it handles
-    forward references encoded as string literals and recursively replaces all
+    This is often the same as annotationlib.get_annotations(obj) or obj.__annotations__,
+    but it handles forward references encoded as string literals and recursively replaces all
     'Annotated[T, ...]' with 'T' (unless 'include_extras=True').
 
     The argument may be a module, class, method, or function. The annotations
@@ -2416,8 +2416,12 @@ def get_type_hints(obj, globalns=None, localns=None, include_extras=False,
         else:
             nsobj = obj
             # Find globalns for the unwrapped object.
+            seen = {id(nsobj)}
             while hasattr(nsobj, '__wrapped__'):
                 nsobj = nsobj.__wrapped__
+                if id(nsobj) in seen:
+                    raise ValueError(f'wrapper loop when unwrapping {obj!r}')
+                seen.add(id(nsobj))
             globalns = getattr(nsobj, '__globals__', {})
         if localns is None:
             localns = globalns
@@ -2537,7 +2541,7 @@ def get_args(tp):
 
 
 def is_typeddict(tp):
-    """Check if an annotation is a TypedDict class.
+    """Check if an object is a TypedDict class.
 
     For example::
 
@@ -2651,10 +2655,10 @@ def _overload_dummy(*args, **kwds):
 def overload(func):
     """Decorator for overloaded functions/methods.
 
-    In a stub file, place two or more stub definitions for the same
-    function in a row, each decorated with @overload.
-
-    For example::
+    In a non-stub file, place two or more stub definitions for the same
+    function in a row, each decorated with @overload, followed
+    by an implementation.  The implementation should *not*
+    be decorated with @overload::
 
         @overload
         def utf8(value: None) -> None: ...
@@ -2662,10 +2666,11 @@ def utf8(value: None) -> None: ...
         def utf8(value: bytes) -> bytes: ...
         @overload
         def utf8(value: str) -> bytes: ...
+        def utf8(value):
+            ...  # implementation goes here
 
-    In a non-stub file (i.e. a regular .py file), do the same but
-    follow it with an implementation.  The implementation should *not*
-    be decorated with @overload::
+    In a stub file or in an abstract method (for example, in a Protocol definition),
+    the implementation may be omitted::
 
         @overload
         def utf8(value: None) -> None: ...
@@ -2673,8 +2678,6 @@ def utf8(value: None) -> None: ...
         def utf8(value: bytes) -> bytes: ...
         @overload
         def utf8(value: str) -> bytes: ...
-        def utf8(value):
-            ...  # implementation goes here
 
     The overloads for a function can be retrieved at runtime using the
     get_overloads() function.
@@ -2710,7 +2713,7 @@ def final(f):
     """Decorator to indicate final methods and final classes.
 
     Use this decorator to indicate to type checkers that the decorated
-    method cannot be overridden, and decorated class cannot be subclassed.
+    method cannot be overridden, and the decorated class cannot be subclassed.
 
     For example::
 
@@ -2752,7 +2755,7 @@ class Other(Leaf):  # Error reported by type checker
 V_co = TypeVar('V_co', covariant=True)  # Any type covariant containers.
 VT_co = TypeVar('VT_co', covariant=True)  # Value type covariant containers.
 T_contra = TypeVar('T_contra', contravariant=True)  # Ditto contravariant.
-# Internal type variable used for Type[].
+# Internal type bound to class object types.
 CT_co = TypeVar('CT_co', covariant=True, bound=type)
 
 
@@ -2843,7 +2846,7 @@ class TeamUser(User): ...
     And a function that takes a class argument that's a subclass of
     User and returns an instance of the corresponding class::
 
-        def new_user[U](user_class: Type[U]) -> U:
+        def new_user[U](user_class: type[U]) -> U:
             user = user_class()
             # (Here we could write the user object to a database)
             return user
@@ -2856,7 +2859,7 @@ def new_user[U](user_class: Type[U]) -> U:
 
 @runtime_checkable
 class SupportsInt(Protocol):
-    """An ABC with one abstract method __int__."""
+    """A protocol with one abstract method __int__."""
 
     __slots__ = ()
 
@@ -2867,7 +2870,7 @@ def __int__(self) -> int:
 
 @runtime_checkable
 class SupportsFloat(Protocol):
-    """An ABC with one abstract method __float__."""
+    """A protocol with one abstract method __float__."""
 
     __slots__ = ()
 
@@ -2878,7 +2881,7 @@ def __float__(self) -> float:
 
 @runtime_checkable
 class SupportsComplex(Protocol):
-    """An ABC with one abstract method __complex__."""
+    """A protocol with one abstract method __complex__."""
 
     __slots__ = ()
 
@@ -2889,7 +2892,7 @@ def __complex__(self) -> complex:
 
 @runtime_checkable
 class SupportsBytes(Protocol):
-    """An ABC with one abstract method __bytes__."""
+    """A protocol with one abstract method __bytes__."""
 
     __slots__ = ()
 
@@ -2900,7 +2903,7 @@ def __bytes__(self) -> bytes:
 
 @runtime_checkable
 class SupportsIndex(Protocol):
-    """An ABC with one abstract method __index__."""
+    """A protocol with one abstract method __index__."""
 
     __slots__ = ()
 
@@ -2911,7 +2914,7 @@ def __index__(self) -> int:
 
 @runtime_checkable
 class SupportsAbs[T](Protocol):
-    """An ABC with one abstract method __abs__ that is covariant in its return type."""
+    """A protocol with one abstract method __abs__ that is covariant in its return type."""
 
     __slots__ = ()
 
@@ -2922,7 +2925,7 @@ def __abs__(self) -> T:
 
 @runtime_checkable
 class SupportsRound[T](Protocol):
-    """An ABC with one abstract method __round__ that is covariant in its return type."""
+    """A protocol with one abstract method __round__ that is covariant in its return type."""
 
     __slots__ = ()
 
@@ -3039,7 +3042,7 @@ def annotate(format):
 
 
 def NamedTuple(typename, fields=_sentinel, /, **kwargs):
-    """Typed version of namedtuple.
+    """Typed version of collections.namedtuple.
 
     Usage::
 
@@ -3051,8 +3054,8 @@ class Employee(NamedTuple):
 
         Employee = collections.namedtuple('Employee', ['name', 'id'])
 
-    The resulting class has an extra __annotations__ attribute, giving a
-    dict that maps field names to types.  (The field names are also in
+    The types for each field name can be retrieved by calling
+    annotationlib.get_annotations(Employee).  (The field names are also in
     the _fields attribute, which is part of the namedtuple API.)
     An alternative equivalent functional syntax is also accepted::
 
@@ -3141,7 +3144,7 @@ def __new__(cls, name, bases, ns, total=True):
 
         This method is called when TypedDict is subclassed,
         or when TypedDict is instantiated. This way
-        TypedDict supports all three syntax forms described in its docstring.
+        TypedDict classes can be created through both class-based and functional syntax.
         Subclasses and instances of TypedDict return actual dictionaries.
         """
         for base in bases:
@@ -3290,14 +3293,22 @@ def TypedDict(typename, fields=_sentinel, /, *, total=True):
         >>> Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')
         True
 
-    The type info can be accessed via the Point2D.__annotations__ dict, and
-    the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
+    The type info can be accessed by calling annotationlib.get_annotations(Point2D), and
+    via the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
     TypedDict supports an additional equivalent form::
 
         Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})
 
     By default, all keys must be present in a TypedDict. It is possible
-    to override this by specifying totality::
+    to override this by using the NotRequired and Required special forms::
+
+        class Point2D(TypedDict):
+            x: int               # the "x" key must always be present (Required is the default)
+            y: NotRequired[int]  # the "y" key can be omitted
+
+    This means that a Point2D TypedDict can have the "y" key omitted, but the "x" key must be present.
+    Items are required by default, so the Required special form is not necessary in this example.
+    In addition, the total argument to the TypedDict function can be used to make all items not required::
 
         class Point2D(TypedDict, total=False):
             x: int
@@ -3306,16 +3317,8 @@ class Point2D(TypedDict, total=False):
     This means that a Point2D TypedDict can have any of the keys omitted. A type
     checker is only expected to support a literal False or True as the value of
     the total argument. True is the default, and makes all items defined in the
-    class body be required.
-
-    The Required and NotRequired special forms can also be used to mark
-    individual keys as being required or not required::
-
-        class Point2D(TypedDict):
-            x: int               # the "x" key must always be present (Required is the default)
-            y: NotRequired[int]  # the "y" key can be omitted
-
-    See PEP 655 for more details on Required and NotRequired.
+    class body be required. The Required special form can be used to mark individual
+    keys as required in a total=False TypedDict.
 
     The ReadOnly special form can be used
     to mark individual keys as immutable for type checkers::
@@ -3324,6 +3327,7 @@ class DatabaseUser(TypedDict):
             id: ReadOnly[int]  # the "id" key must not be modified
             username: str      # the "username" key can be changed
 
+    See PEPs 589, 655, and 705 for more information.
     """
     if fields is _sentinel or fields is None:
         import warnings
@@ -3370,7 +3374,7 @@ class Movie(TypedDict, total=False):
             year: int
 
         m = Movie(
-            title='The Matrix',  # typechecker error if key is omitted
+            title='The Matrix',  # type checker error if key is omitted
             year=1999,
         )
 
@@ -3392,7 +3396,7 @@ class Movie(TypedDict):
             year: NotRequired[int]
 
         m = Movie(
-            title='The Matrix',  # typechecker error if key is omitted
+            title='The Matrix',  # type checker error if key is omitted
             year=1999,
         )
     """
@@ -3412,7 +3416,7 @@ class Movie(TypedDict):
 
         def mutate_movie(m: Movie) -> None:
             m["year"] = 1992  # allowed
-            m["title"] = "The Matrix"  # typechecker error
+            m["title"] = "The Matrix"  # type checker error
 
     There is no runtime checking for this property.
     """
@@ -3499,8 +3503,8 @@ class IO(Generic[AnyStr]):
     classes (text vs. binary, read vs. write vs. read/write,
     append-only, unbuffered).  The TextIO and BinaryIO subclasses
     below capture the distinctions between text vs. binary, which is
-    pervasive in the interface; however we currently do not offer a
-    way to track the other distinctions in the type system.
+    pervasive in the interface. For more precise types, define a custom
+    Protocol.
     """
 
     __slots__ = ()
@@ -3590,7 +3594,7 @@ def __exit__(self, type, value, traceback) -> None:
 
 
 class BinaryIO(IO[bytes]):
-    """Typed version of the return of open() in binary mode."""
+    """Typed approximation of the return of open() in binary mode."""
 
     __slots__ = ()
 
@@ -3604,7 +3608,7 @@ def __enter__(self) -> BinaryIO:
 
 
 class TextIO(IO[str]):
-    """Typed version of the return of open() in text mode."""
+    """Typed approximation of the return of open() in text mode."""
 
     __slots__ = ()
 
@@ -3671,7 +3675,7 @@ def dataclass_transform(
     field_specifiers: tuple[type[Any] | Callable[..., Any], ...] = (),
     **kwargs: Any,
 ) -> _IdentityCallable:
-    """Decorator to mark an object as providing dataclass-like behaviour.
+    """Decorator to mark an object as providing dataclass-like behavior.
 
     The decorator can be applied to a function, class, or metaclass.
 
diff --git a/Python314_4_x64_Template/Lib/unittest/__init__.py b/Python314_6_x64_Template/Lib/unittest/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/__init__.py
rename to Python314_6_x64_Template/Lib/unittest/__init__.py
diff --git a/Python314_4_x64_Template/Lib/unittest/__main__.py b/Python314_6_x64_Template/Lib/unittest/__main__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/__main__.py
rename to Python314_6_x64_Template/Lib/unittest/__main__.py
diff --git a/Python314_4_x64_Template/Lib/unittest/_log.py b/Python314_6_x64_Template/Lib/unittest/_log.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/_log.py
rename to Python314_6_x64_Template/Lib/unittest/_log.py
diff --git a/Python314_4_x64_Template/Lib/unittest/async_case.py b/Python314_6_x64_Template/Lib/unittest/async_case.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/async_case.py
rename to Python314_6_x64_Template/Lib/unittest/async_case.py
diff --git a/Python314_4_x64_Template/Lib/unittest/case.py b/Python314_6_x64_Template/Lib/unittest/case.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/case.py
rename to Python314_6_x64_Template/Lib/unittest/case.py
diff --git a/Python314_4_x64_Template/Lib/unittest/loader.py b/Python314_6_x64_Template/Lib/unittest/loader.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/loader.py
rename to Python314_6_x64_Template/Lib/unittest/loader.py
diff --git a/Python314_4_x64_Template/Lib/unittest/main.py b/Python314_6_x64_Template/Lib/unittest/main.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/main.py
rename to Python314_6_x64_Template/Lib/unittest/main.py
diff --git a/Python314_4_x64_Template/Lib/unittest/mock.py b/Python314_6_x64_Template/Lib/unittest/mock.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/unittest/mock.py
rename to Python314_6_x64_Template/Lib/unittest/mock.py
index 92b81d158..5a8fccf59 100644
--- a/Python314_4_x64_Template/Lib/unittest/mock.py
+++ b/Python314_6_x64_Template/Lib/unittest/mock.py
@@ -3121,6 +3121,10 @@ def _mock_call(self, *args, **kwargs):
 
         return ret_value
 
+    def _increment_mock_call(self, /, *args, **kwargs):
+        with self._mock_calls_events_lock:
+            super()._increment_mock_call(*args, **kwargs)
+
     def wait_until_called(self, *, timeout=_timeout_unset):
         """Wait until the mock object is called.
 
diff --git a/Python314_4_x64_Template/Lib/unittest/result.py b/Python314_6_x64_Template/Lib/unittest/result.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/result.py
rename to Python314_6_x64_Template/Lib/unittest/result.py
diff --git a/Python314_4_x64_Template/Lib/unittest/runner.py b/Python314_6_x64_Template/Lib/unittest/runner.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/runner.py
rename to Python314_6_x64_Template/Lib/unittest/runner.py
diff --git a/Python314_4_x64_Template/Lib/unittest/signals.py b/Python314_6_x64_Template/Lib/unittest/signals.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/signals.py
rename to Python314_6_x64_Template/Lib/unittest/signals.py
diff --git a/Python314_4_x64_Template/Lib/unittest/suite.py b/Python314_6_x64_Template/Lib/unittest/suite.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/suite.py
rename to Python314_6_x64_Template/Lib/unittest/suite.py
diff --git a/Python314_4_x64_Template/Lib/unittest/util.py b/Python314_6_x64_Template/Lib/unittest/util.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/unittest/util.py
rename to Python314_6_x64_Template/Lib/unittest/util.py
diff --git a/Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py b/Python314_6_x64_Template/Lib/urllib/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py
rename to Python314_6_x64_Template/Lib/urllib/__init__.py
diff --git a/Python314_6_x64_Template/Lib/urllib/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/urllib/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..6d14464f7
Binary files /dev/null and b/Python314_6_x64_Template/Lib/urllib/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/urllib/__pycache__/error.cpython-314.pyc b/Python314_6_x64_Template/Lib/urllib/__pycache__/error.cpython-314.pyc
similarity index 88%
rename from Python314_4_x64_Template/Lib/urllib/__pycache__/error.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/urllib/__pycache__/error.cpython-314.pyc
index 3ec82d2cf..6d84ae551 100644
Binary files a/Python314_4_x64_Template/Lib/urllib/__pycache__/error.cpython-314.pyc and b/Python314_6_x64_Template/Lib/urllib/__pycache__/error.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/urllib/__pycache__/parse.cpython-314.pyc b/Python314_6_x64_Template/Lib/urllib/__pycache__/parse.cpython-314.pyc
similarity index 97%
rename from Python314_4_x64_Template/Lib/urllib/__pycache__/parse.cpython-314.pyc
rename to Python314_6_x64_Template/Lib/urllib/__pycache__/parse.cpython-314.pyc
index fc4be03e7..22b2b5b46 100644
Binary files a/Python314_4_x64_Template/Lib/urllib/__pycache__/parse.cpython-314.pyc and b/Python314_6_x64_Template/Lib/urllib/__pycache__/parse.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/urllib/__pycache__/request.cpython-314.pyc b/Python314_6_x64_Template/Lib/urllib/__pycache__/request.cpython-314.pyc
new file mode 100644
index 000000000..95b473ec6
Binary files /dev/null and b/Python314_6_x64_Template/Lib/urllib/__pycache__/request.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/urllib/__pycache__/response.cpython-314.pyc b/Python314_6_x64_Template/Lib/urllib/__pycache__/response.cpython-314.pyc
new file mode 100644
index 000000000..8e9a9d750
Binary files /dev/null and b/Python314_6_x64_Template/Lib/urllib/__pycache__/response.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/urllib/error.py b/Python314_6_x64_Template/Lib/urllib/error.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/urllib/error.py
rename to Python314_6_x64_Template/Lib/urllib/error.py
diff --git a/Python314_4_x64_Template/Lib/urllib/parse.py b/Python314_6_x64_Template/Lib/urllib/parse.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/urllib/parse.py
rename to Python314_6_x64_Template/Lib/urllib/parse.py
diff --git a/Python314_4_x64_Template/Lib/urllib/request.py b/Python314_6_x64_Template/Lib/urllib/request.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/urllib/request.py
rename to Python314_6_x64_Template/Lib/urllib/request.py
diff --git a/Python314_4_x64_Template/Lib/urllib/response.py b/Python314_6_x64_Template/Lib/urllib/response.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/urllib/response.py
rename to Python314_6_x64_Template/Lib/urllib/response.py
diff --git a/Python314_6_x64_Template/Lib/urllib/robotparser.py b/Python314_6_x64_Template/Lib/urllib/robotparser.py
new file mode 100644
index 000000000..e70eae800
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/urllib/robotparser.py
@@ -0,0 +1,355 @@
+""" robotparser.py
+
+    Copyright (C) 2000  Bastian Kleineidam
+
+    You can choose between two licenses when using this package:
+    1) GNU GPLv2
+    2) PSF license for Python 2.2
+
+    The robots.txt Exclusion Protocol is implemented as specified in
+    RFC 9309
+"""
+
+import collections
+import re
+import urllib.error
+import urllib.parse
+import urllib.request
+
+__all__ = ["RobotFileParser"]
+
+RequestRate = collections.namedtuple("RequestRate", "requests seconds")
+
+
+class RobotFileParser:
+    """ This class provides a set of methods to read, parse and answer
+    questions about a single robots.txt file.
+
+    """
+
+    def __init__(self, url=''):
+        self.entries = []
+        self.groups = {}
+        self.sitemaps = []
+        self.default_entry = None
+        self.disallow_all = False
+        self.allow_all = False
+        self.set_url(url)
+        self.last_checked = 0
+
+    def mtime(self):
+        """Returns the time the robots.txt file was last fetched.
+
+        This is useful for long-running web spiders that need to
+        check for new robots.txt files periodically.
+
+        """
+        return self.last_checked
+
+    def modified(self):
+        """Sets the time the robots.txt file was last fetched to the
+        current time.
+
+        """
+        import time
+        self.last_checked = time.time()
+
+    def set_url(self, url):
+        """Sets the URL referring to a robots.txt file."""
+        self.url = url
+        self.host, self.path = urllib.parse.urlsplit(url)[1:3]
+
+    def read(self):
+        """Reads the robots.txt URL and feeds it to the parser."""
+        try:
+            f = urllib.request.urlopen(self.url)
+        except urllib.error.HTTPError as err:
+            if err.code in (401, 403):
+                self.disallow_all = True
+            elif err.code >= 400 and err.code < 500:
+                self.allow_all = True
+            err.close()
+        else:
+            raw = f.read()
+            self.parse(raw.decode("utf-8", "surrogateescape").splitlines())
+
+    def _add_entry(self, entry):
+        self.entries.append(entry)
+        for agent in entry.useragents:
+            agent = agent.lower()
+            if agent not in self.groups:
+                self.groups[agent] = entry
+            else:
+                self.groups[agent] = merge_entries(self.groups[agent], entry)
+
+    def parse(self, lines):
+        """Parse the input lines from a robots.txt file.
+
+        We allow that a user-agent: line is not preceded by
+        one or more blank lines.
+        """
+        entries = []
+        # states:
+        #   0: start state
+        #   1: saw user-agent line
+        #   2: saw an allow or disallow line
+        state = 0
+        entry = Entry()
+
+        self.modified()
+        for line in lines:
+            # remove optional comment and strip line
+            i = line.find('#')
+            if i >= 0:
+                line = line[:i]
+            line = line.strip()
+            if not line:
+                continue
+            line = line.split(':', 1)
+            if len(line) == 2:
+                line[0] = line[0].strip().lower()
+                line[1] = line[1].strip()
+                if line[0] == "user-agent":
+                    if state == 2:
+                        self._add_entry(entry)
+                        entry = Entry()
+                    product_token = line[1]
+                    entry.useragents.append(product_token)
+                    state = 1
+                elif line[0] == "disallow":
+                    if state != 0:
+                        state = 2
+                        try:
+                            entry.rulelines.append(RuleLine(line[1], False))
+                        except ValueError:
+                            pass
+                elif line[0] == "allow":
+                    if state != 0:
+                        state = 2
+                        try:
+                            entry.rulelines.append(RuleLine(line[1], True))
+                        except ValueError:
+                            pass
+                elif line[0] == "crawl-delay":
+                    if state != 0:
+                        # before trying to convert to int we need to make
+                        # sure that robots.txt has valid syntax otherwise
+                        # it will crash
+                        if line[1].strip().isdigit():
+                            entry.delay = int(line[1])
+                        state = 2
+                elif line[0] == "request-rate":
+                    if state != 0:
+                        numbers = line[1].split('/')
+                        # check if all values are sane
+                        if (len(numbers) == 2 and numbers[0].strip().isdigit()
+                            and numbers[1].strip().isdigit()):
+                            entry.req_rate = RequestRate(int(numbers[0]), int(numbers[1]))
+                        state = 2
+                elif line[0] == "sitemap":
+                    # According to http://www.sitemaps.org/protocol.html
+                    # "This directive is independent of the user-agent line,
+                    #  so it doesn't matter where you place it in your file."
+                    # Therefore we do not change the state of the parser.
+                    self.sitemaps.append(line[1])
+        if state != 0:
+            self._add_entry(entry)
+
+    def _find_entry(self, useragent):
+        entry = self.groups.get(useragent.lower())
+        if entry is not None:
+            return entry
+        for entry in self.groups.values():
+            if entry.applies_to(useragent):
+                return entry
+        return self.groups.get('*')
+
+    def can_fetch(self, useragent, url):
+        """using the parsed robots.txt decide if useragent can fetch url"""
+        if self.disallow_all:
+            return False
+        if self.allow_all:
+            return True
+        # Until the robots.txt file has been read or found not
+        # to exist, we must assume that no url is allowable.
+        # This prevents false positives when a user erroneously
+        # calls can_fetch() before calling read().
+        if not self.last_checked:
+            return False
+        # TODO: The private API is used in order to preserve an empty query.
+        # This is temporary until the public API starts supporting this feature.
+        parsed_url = urllib.parse._urlsplit(url, '')
+        url = urllib.parse._urlunsplit(None, None, *parsed_url[2:])
+        url = normalize_uri(url)
+        if not url:
+            url = "/"
+        if url == '/robots.txt':
+            # The /robots.txt URI is implicitly allowed.
+            return True
+        entry = self._find_entry(useragent)
+        if entry is None:
+            return True
+        return entry.allowance(url)
+
+    def crawl_delay(self, useragent):
+        if not self.mtime():
+            return None
+        entry = self._find_entry(useragent)
+        if entry is None:
+            return None
+        return entry.delay
+
+    def request_rate(self, useragent):
+        if not self.mtime():
+            return None
+        entry = self._find_entry(useragent)
+        if entry is None:
+            return None
+        return entry.req_rate
+
+    def site_maps(self):
+        if not self.sitemaps:
+            return None
+        return self.sitemaps
+
+    def __str__(self):
+        entries = self.entries
+        if self.default_entry is not None:
+            entries = entries + [self.default_entry]
+        return '\n\n'.join(filter(None, map(str, entries)))
+
+class RuleLine:
+    """A rule line is a single "Allow:" (allowance==True) or "Disallow:"
+       (allowance==False) followed by a path."""
+    def __init__(self, path, allowance):
+        if path == '' and not allowance:
+            # an empty value means allow all
+            allowance = True
+        path = re.sub(r'[*]{2,}', '*', path)
+        path = re.sub(r'[$][$*]+', '$', path)
+        path = normalize_pattern(path)
+        self.fullmatch = path.endswith('$')
+        path = path.rstrip('$')
+        if '$' in path:
+            raise ValueError('$ not at the end of path')
+        self.matcher = None
+        if '*' in path:
+            pattern = re.compile(translate_pattern(path), re.DOTALL)
+            if self.fullmatch:
+                self.matcher = pattern.fullmatch
+            else:
+                self.matcher = pattern.match
+        self.path = path
+        self.allowance = allowance
+
+    def applies_to(self, filename):
+        # If the filename matches the rule, return the matching length plus 1.
+        # If it does not match, return 0.
+        if self.matcher is not None:
+            m = self.matcher(filename)
+            if m:
+                return m.end() + 1
+        else:
+            if self.fullmatch:
+                if filename == self.path:
+                    return len(self.path) + 1
+            else:
+                if filename.startswith(self.path):
+                    return len(self.path) + 1
+        return 0
+
+    def __str__(self):
+        return (("Allow" if self.allowance else "Disallow") + ": " + self.path
+                + ('$' if self.fullmatch else ''))
+
+
+class Entry:
+    """An entry has one or more user-agents and zero or more rulelines"""
+    def __init__(self):
+        self.useragents = []
+        self.rulelines = []
+        self.delay = None
+        self.req_rate = None
+
+    def __str__(self):
+        if not self.useragents:
+            return ''
+        ret = []
+        for agent in self.useragents:
+            ret.append(f"User-agent: {agent}")
+        if self.delay is not None:
+            ret.append(f"Crawl-delay: {self.delay}")
+        if self.req_rate is not None:
+            rate = self.req_rate
+            ret.append(f"Request-rate: {rate.requests}/{rate.seconds}")
+        if self.rulelines:
+            ret.extend(map(str, self.rulelines))
+        else:
+            ret.append("Allow:")
+        return '\n'.join(ret)
+
+    def applies_to(self, useragent):
+        """check if this entry applies to the specified agent"""
+        if useragent is None:
+            return '*' in self.useragents
+        # split the name token and make it lower case
+        useragent = useragent.split("/")[0].lower()
+        for agent in self.useragents:
+            if agent != '*':
+                agent = agent.lower()
+                if agent in useragent:
+                    return True
+        return False
+
+    def allowance(self, filename):
+        """Preconditions:
+        - our agent applies to this entry
+        - filename is URL encoded
+        """
+        best_match = -1
+        allowance = True
+        for line in self.rulelines:
+            m = line.applies_to(filename)
+            if m:
+                if m > best_match:
+                    best_match = m
+                    allowance = line.allowance
+                elif m == best_match and not allowance:
+                    allowance = line.allowance
+        return allowance
+
+
+def normalize(path):
+    unquoted = urllib.parse.unquote(path, errors='surrogateescape')
+    return urllib.parse.quote(unquoted, errors='surrogateescape')
+
+def normalize_uri(path):
+    path, sep, query = path.partition('?')
+    path = normalize(path)
+    if sep:
+        query = re.sub(r'[^=&]+', lambda m: normalize(m[0]), query)
+        path += '?' + query
+    return path
+
+def normalize_pattern(path):
+    path, sep, query = path.partition('?')
+    path = re.sub(r'[^*$]+', lambda m: normalize(m[0]), path)
+    if sep:
+        query = re.sub(r'[^=&*$]+', lambda m: normalize(m[0]), query)
+        path += '?' + query
+    return path
+
+def translate_pattern(path):
+    parts = list(map(re.escape, path.split('*')))
+    for i in range(1, len(parts)-1):
+        parts[i] = f'(?>.*?{parts[i]})'
+    parts[-1] = f'.*{parts[-1]}'
+    return ''.join(parts)
+
+def merge_entries(e1, e2):
+    entry = Entry()
+    entry.useragents = list(filter(set(e2.useragents).__contains__, e1.useragents))
+    entry.rulelines = e1.rulelines + e2.rulelines
+    entry.delay = e1.delay if e2.delay is None else e2.delay
+    entry.req_rate = e1.req_rate if e2.req_rate is None else e2.req_rate
+    return entry
diff --git a/Python314_4_x64_Template/Lib/uuid.py b/Python314_6_x64_Template/Lib/uuid.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/uuid.py
rename to Python314_6_x64_Template/Lib/uuid.py
index 313f2fc46..043ad7bcb 100644
--- a/Python314_4_x64_Template/Lib/uuid.py
+++ b/Python314_6_x64_Template/Lib/uuid.py
@@ -961,7 +961,7 @@ def main():
                         default="uuid4",
                         help="function to generate the UUID")
     parser.add_argument("-n", "--namespace",
-                        choices=["any UUID", *namespaces.keys()],
+                        metavar=f"{{any UUID,{','.join(namespaces)}}}",
                         help="uuid3/uuid5 only: "
                         "a UUID, or a well-known predefined UUID addressed "
                         "by namespace name")
@@ -983,7 +983,13 @@ def main():
                 f"{args.uuid} requires a namespace and a name. "
                 "Run 'python -m uuid -h' for more information."
             )
-        namespace = namespaces[namespace] if namespace in namespaces else UUID(namespace)
+        if namespace in namespaces:
+            namespace = namespaces[namespace]
+        else:
+            try:
+                namespace = UUID(namespace)
+            except ValueError as exc:
+                parser.error(f"{exc}: {args.namespace!r}")
         for _ in range(args.count):
             print(uuid_func(namespace, name))
     else:
diff --git a/Python314_4_x64_Template/Lib/venv/__init__.py b/Python314_6_x64_Template/Lib/venv/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/venv/__init__.py
rename to Python314_6_x64_Template/Lib/venv/__init__.py
diff --git a/Python314_4_x64_Template/Lib/venv/__main__.py b/Python314_6_x64_Template/Lib/venv/__main__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/venv/__main__.py
rename to Python314_6_x64_Template/Lib/venv/__main__.py
diff --git a/Python314_6_x64_Template/Lib/venv/scripts/common/Activate.ps1 b/Python314_6_x64_Template/Lib/venv/scripts/common/Activate.ps1
new file mode 100644
index 000000000..6687ae05d
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/venv/scripts/common/Activate.ps1
@@ -0,0 +1,545 @@
+<#
+.Synopsis
+Activate a Python virtual environment for the current PowerShell session.
+
+.Description
+Pushes the python executable for a virtual environment to the front of the
+$Env:PATH environment variable and sets the prompt to signify that you are
+in a Python virtual environment. Makes use of the command line switches as
+well as the `pyvenv.cfg` file values present in the virtual environment.
+
+.Parameter VenvDir
+Path to the directory that contains the virtual environment to activate. The
+default value for this is the parent of the directory that the Activate.ps1
+script is located within.
+
+.Parameter Prompt
+The prompt prefix to display when this virtual environment is activated. By
+default, this prompt is the name of the virtual environment folder (VenvDir)
+surrounded by parentheses and followed by a single space (ie. '(.venv) ').
+
+.Example
+Activate.ps1
+Activates the Python virtual environment that contains the Activate.ps1 script.
+
+.Example
+Activate.ps1 -Verbose
+Activates the Python virtual environment that contains the Activate.ps1 script,
+and shows extra information about the activation as it executes.
+
+.Example
+Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
+Activates the Python virtual environment located in the specified location.
+
+.Example
+Activate.ps1 -Prompt "MyPython"
+Activates the Python virtual environment that contains the Activate.ps1 script,
+and prefixes the current prompt with the specified string (surrounded in
+parentheses) while the virtual environment is active.
+
+.Notes
+On Windows, it may be required to enable this Activate.ps1 script by setting the
+execution policy for the user. You can do this by issuing the following PowerShell
+command:
+
+PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
+
+For more information on Execution Policies: 
+https://go.microsoft.com/fwlink/?LinkID=135170
+
+#>
+Param(
+    [Parameter(Mandatory = $false)]
+    [String]
+    $VenvDir,
+    [Parameter(Mandatory = $false)]
+    [String]
+    $Prompt
+)
+
+<# Function declarations --------------------------------------------------- #>
+
+<#
+.Synopsis
+Remove all shell session elements added by the Activate script, including the
+addition of the virtual environment's Python executable from the beginning of
+the PATH variable.
+
+.Parameter NonDestructive
+If present, do not remove this function from the global namespace for the
+session.
+
+#>
+function global:deactivate ([switch]$NonDestructive) {
+    # Revert to original values
+
+    # The prior prompt:
+    if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
+        Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
+        Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
+    }
+
+    # The prior PYTHONHOME:
+    if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
+        Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
+        Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
+    }
+
+    # The prior PATH:
+    if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
+        Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
+        Remove-Item -Path Env:_OLD_VIRTUAL_PATH
+    }
+
+    # Just remove the VIRTUAL_ENV altogether:
+    if (Test-Path -Path Env:VIRTUAL_ENV) {
+        Remove-Item -Path env:VIRTUAL_ENV
+    }
+
+    # Just remove VIRTUAL_ENV_PROMPT altogether.
+    if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
+        Remove-Item -Path env:VIRTUAL_ENV_PROMPT
+    }
+
+    # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
+    if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
+        Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
+    }
+
+    # Leave deactivate function in the global namespace if requested:
+    if (-not $NonDestructive) {
+        Remove-Item -Path function:deactivate
+    }
+}
+
+<#
+.Description
+Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
+given folder, and returns them in a map.
+
+For each line in the pyvenv.cfg file, if that line can be parsed into exactly
+two strings separated by `=` (with any amount of whitespace surrounding the =)
+then it is considered a `key = value` line. The left hand string is the key,
+the right hand is the value.
+
+If the value starts with a `'` or a `"` then the first and last character is
+stripped from the value before being captured.
+
+.Parameter ConfigDir
+Path to the directory that contains the `pyvenv.cfg` file.
+#>
+function Get-PyVenvConfig(
+    [String]
+    $ConfigDir
+) {
+    Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
+
+    # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
+    $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
+
+    # An empty map will be returned if no config file is found.
+    $pyvenvConfig = @{ }
+
+    if ($pyvenvConfigPath) {
+
+        Write-Verbose "File exists, parse `key = value` lines"
+        $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
+
+        $pyvenvConfigContent | ForEach-Object {
+            $keyval = $PSItem -split "\s*=\s*", 2
+            if ($keyval[0] -and $keyval[1]) {
+                $val = $keyval[1]
+
+                # Remove extraneous quotations around a string value.
+                if ("'""".Contains($val.Substring(0, 1))) {
+                    $val = $val.Substring(1, $val.Length - 2)
+                }
+
+                $pyvenvConfig[$keyval[0]] = $val
+                Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
+            }
+        }
+    }
+    return $pyvenvConfig
+}
+
+
+<# Begin Activate script --------------------------------------------------- #>
+
+# Determine the containing directory of this script
+$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
+$VenvExecDir = Get-Item -Path $VenvExecPath
+
+Write-Verbose "Activation script is located in path: '$VenvExecPath'"
+Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
+Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
+
+# Set values required in priority: CmdLine, ConfigFile, Default
+# First, get the location of the virtual environment, it might not be
+# VenvExecDir if specified on the command line.
+if ($VenvDir) {
+    Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
+}
+else {
+    Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
+    $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
+    Write-Verbose "VenvDir=$VenvDir"
+}
+
+# Next, read the `pyvenv.cfg` file to determine any required value such
+# as `prompt`.
+$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
+
+# Next, set the prompt from the command line, or the config file, or
+# just use the name of the virtual environment folder.
+if ($Prompt) {
+    Write-Verbose "Prompt specified as argument, using '$Prompt'"
+}
+else {
+    Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
+    if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
+        Write-Verbose "  Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
+        $Prompt = $pyvenvCfg['prompt'];
+    }
+    else {
+        Write-Verbose "  Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
+        Write-Verbose "  Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
+        $Prompt = Split-Path -Path $venvDir -Leaf
+    }
+}
+
+Write-Verbose "Prompt = '$Prompt'"
+Write-Verbose "VenvDir='$VenvDir'"
+
+# Deactivate any currently active virtual environment, but leave the
+# deactivate function in place.
+deactivate -nondestructive
+
+# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
+# that there is an activated venv.
+$env:VIRTUAL_ENV = $VenvDir
+
+$env:VIRTUAL_ENV_PROMPT = $Prompt
+
+if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
+
+    Write-Verbose "Setting prompt to '$Prompt'"
+
+    # Set the prompt to include the env name
+    # Make sure _OLD_VIRTUAL_PROMPT is global
+    function global:_OLD_VIRTUAL_PROMPT { "" }
+    Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
+    New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
+
+    function global:prompt {
+        Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
+        _OLD_VIRTUAL_PROMPT
+    }
+}
+
+# Clear PYTHONHOME
+if (Test-Path -Path Env:PYTHONHOME) {
+    Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
+    Remove-Item -Path Env:PYTHONHOME
+}
+
+# Add the venv to the PATH
+Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
+$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
+
+# SIG # Begin signature block
+# MII27gYJKoZIhvcNAQcCoII23zCCNtsCAQExDzANBglghkgBZQMEAgEFADB5Bgor
+# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
+# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBALKwKRFIhr2RY
+# IW/WJLd9pc8a9sj/IoThKU92fTfKsKCCG1wwggXMMIIDtKADAgECAhBUmNLR1FsZ
+# lUgTecgRwIeZMA0GCSqGSIb3DQEBDAUAMHcxCzAJBgNVBAYTAlVTMR4wHAYDVQQK
+# ExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xSDBGBgNVBAMTP01pY3Jvc29mdCBJZGVu
+# dGl0eSBWZXJpZmljYXRpb24gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgMjAy
+# MDAeFw0yMDA0MTYxODM2MTZaFw00NTA0MTYxODQ0NDBaMHcxCzAJBgNVBAYTAlVT
+# MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xSDBGBgNVBAMTP01pY3Jv
+# c29mdCBJZGVudGl0eSBWZXJpZmljYXRpb24gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRo
+# b3JpdHkgMjAyMDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALORKgeD
+# Bmf9np3gx8C3pOZCBH8Ppttf+9Va10Wg+3cL8IDzpm1aTXlT2KCGhFdFIMeiVPvH
+# or+Kx24186IVxC9O40qFlkkN/76Z2BT2vCcH7kKbK/ULkgbk/WkTZaiRcvKYhOuD
+# PQ7k13ESSCHLDe32R0m3m/nJxxe2hE//uKya13NnSYXjhr03QNAlhtTetcJtYmrV
+# qXi8LW9J+eVsFBT9FMfTZRY33stuvF4pjf1imxUs1gXmuYkyM6Nix9fWUmcIxC70
+# ViueC4fM7Ke0pqrrBc0ZV6U6CwQnHJFnni1iLS8evtrAIMsEGcoz+4m+mOJyoHI1
+# vnnhnINv5G0Xb5DzPQCGdTiO0OBJmrvb0/gwytVXiGhNctO/bX9x2P29Da6SZEi3
+# W295JrXNm5UhhNHvDzI9e1eM80UHTHzgXhgONXaLbZ7LNnSrBfjgc10yVpRnlyUK
+# xjU9lJfnwUSLgP3B+PR0GeUw9gb7IVc+BhyLaxWGJ0l7gpPKWeh1R+g/OPTHU3mg
+# trTiXFHvvV84wRPmeAyVWi7FQFkozA8kwOy6CXcjmTimthzax7ogttc32H83rwjj
+# O3HbbnMbfZlysOSGM1l0tRYAe1BtxoYT2v3EOYI9JACaYNq6lMAFUSw0rFCZE4e7
+# swWAsk0wAly4JoNdtGNz764jlU9gKL431VulAgMBAAGjVDBSMA4GA1UdDwEB/wQE
+# AwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIftJqhSobyhmYBAcnz1AQ
+# T2ioojAQBgkrBgEEAYI3FQEEAwIBADANBgkqhkiG9w0BAQwFAAOCAgEAr2rd5hnn
+# LZRDGU7L6VCVZKUDkQKL4jaAOxWiUsIWGbZqWl10QzD0m/9gdAmxIR6QFm3FJI9c
+# Zohj9E/MffISTEAQiwGf2qnIrvKVG8+dBetJPnSgaFvlVixlHIJ+U9pW2UYXeZJF
+# xBA2CFIpF8svpvJ+1Gkkih6PsHMNzBxKq7Kq7aeRYwFkIqgyuH4yKLNncy2RtNwx
+# AQv3Rwqm8ddK7VZgxCwIo3tAsLx0J1KH1r6I3TeKiW5niB31yV2g/rarOoDXGpc8
+# FzYiQR6sTdWD5jw4vU8w6VSp07YEwzJ2YbuwGMUrGLPAgNW3lbBeUU0i/OxYqujY
+# lLSlLu2S3ucYfCFX3VVj979tzR/SpncocMfiWzpbCNJbTsgAlrPhgzavhgplXHT2
+# 6ux6anSg8Evu75SjrFDyh+3XOjCDyft9V77l4/hByuVkrrOj7FjshZrM77nq81YY
+# uVxzmq/FdxeDWds3GhhyVKVB0rYjdaNDmuV3fJZ5t0GNv+zcgKCf0Xd1WF81E+Al
+# GmcLfc4l+gcK5GEh2NQc5QfGNpn0ltDGFf5Ozdeui53bFv0ExpK91IjmqaOqu/dk
+# ODtfzAzQNb50GQOmxapMomE2gj4d8yu8l13bS3g7LfU772Aj6PXsCyM2la+YZr9T
+# 03u4aUoqlmZpxJTG9F9urJh4iIAGXKKy7aIwgga6MIIEoqADAgECAhMzAAHIhZeB
+# 2/6ekA+iAAAAAciFMA0GCSqGSIb3DQEBDAUAMFoxCzAJBgNVBAYTAlVTMR4wHAYD
+# VQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKzApBgNVBAMTIk1pY3Jvc29mdCBJ
+# RCBWZXJpZmllZCBDUyBFT0MgQ0EgMDQwHhcNMjYwNjA5MDczNDU4WhcNMjYwNjEy
+# MDczNDU4WjB8MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29uMRIwEAYDVQQH
+# EwlCZWF2ZXJ0b24xIzAhBgNVBAoTGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9u
+# MSMwIQYDVQQDExpQeXRob24gU29mdHdhcmUgRm91bmRhdGlvbjCCAaIwDQYJKoZI
+# hvcNAQEBBQADggGPADCCAYoCggGBANcX+arbvSkVVmuJGWWlAuGSi7FglNahEZRG
+# LSoAMmb7oqE7TaJ3wMNC/IYUGSWjHxtj71D+dUNbyS+aAfgNP9Pu9I2/FjqPR1wI
+# Vwb9j1IL2fYkheNO6XQwDpM0y4u9b0ZXLDNqvoY0c7zoJ2YYROLbexrUtTFVD8u2
+# EBQYe7WiBWGXVAT296ibfYHANwx9T2tsjB5sj3WQihCO9Uko3GAYcR23RCnO46+X
+# k/oy6bPqhvx/PE3/G27gUwNotkBgyWrpfioAcRQs4azKCrNn5WG3s5x4Leb5ZoYv
+# YnSbctRr3dDMbhfUvrzYU0M7kBT9EOLCAH5YV18GKiqDYEvBxYZ2c16Nl8n3djL+
+# EaPbd8mSgT4wWccovVSvV62fkkWXylq1BjASr3xoxrlX7Jus/+3EpxfiZp4k0ybt
+# g+FIvzAi5eQrBUs3BSgpCH6OCUbDPAKJCxPkDHYAcYCfYj1jPx3HCI6H0uHKCEbF
+# sxVkIgDpi7Sv4rU4auRprWgtyv+5LQIDAQABo4IB1TCCAdEwDAYDVR0TAQH/BAIw
+# ADAOBgNVHQ8BAf8EBAMCB4AwPAYDVR0lBDUwMwYKKwYBBAGCN2EBAAYIKwYBBQUH
+# AwMGGysGAQQBgjdhgqKNuwqmkohkgZH0oEWCk/3hbzAdBgNVHQ4EFgQUEkEL8r5h
+# 8/XBz4UblHllib1XNgIwHwYDVR0jBBgwFoAUmvFUd3UMhxY3RqCs3nn59H/BeOkw
+# ZwYDVR0fBGAwXjBcoFqgWIZWaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9w
+# cy9jcmwvTWljcm9zb2Z0JTIwSUQlMjBWZXJpZmllZCUyMENTJTIwRU9DJTIwQ0El
+# MjAwNC5jcmwwdAYIKwYBBQUHAQEEaDBmMGQGCCsGAQUFBzAChlhodHRwOi8vd3d3
+# Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY3Jvc29mdCUyMElEJTIwVmVy
+# aWZpZWQlMjBDUyUyMEVPQyUyMENBJTIwMDQuY3J0MFQGA1UdIARNMEswSQYEVR0g
+# ADBBMD8GCCsGAQUFBwIBFjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3Bz
+# L0RvY3MvUmVwb3NpdG9yeS5odG0wDQYJKoZIhvcNAQEMBQADggIBAHqfMgMp8RvG
+# 7SoR839Vl1fIwBCweNevlXkTZ58QuS6mot9US23maXbv2FLtAgURwN76M3RXkNWd
+# XtyRP2OILwyneuYudwKqEIdMRx1NZpx2zNz1f5YLBCvFbrIKPUW0zfck296RH6+S
+# uzIEisKzwfh6YjHwZRbbx4tigxWyJ9O003K2QFdv+5WRLkFAtsTt73NNpYqUSnyy
+# RZlSXE7BO7ZUyfihUK18Kf/QMKtSunAmtK2yHym4RMCW0h1X4WuZ/k2QJK+5lBg+
+# E9RPhs96c5Gy1p8lhKYgoMhfEA6NWo7eF3d+9Ikbql3QHqdfsj1VCp360qOTdM29
+# iHcKsI4s4hAnJBoUFWa0s7TDgnL0J4SXCGPtSsS7TBG67iSy5tF6vQlZG4dnc1+A
+# 8HyzjO8CQVCps5hVbS/EnQh4R+wZRQKMbRtHicymfczDnhLiIm9oh81KQxi9vgxd
+# //zu8jrMzvqAGAEX/MWeMZQn4HX9WBRnJjw8+D1PznbwJIDbFaJywJbIwYjOGLEE
+# q3nFVpE+PV6F2M83qxmVet4V0ffMIIS8TpWRmSYUye0xIHSi8bS7gyESVJMrOyAb
+# fSME+R41djTwaHrmbw/gZxdTSDgK8tRovUKyGJb5ba1P8OVQoneDUpRFV1+UluVK
+# Ybi8rJNYH36wvDryDBHRs/ElaCf9diEfMIIHKDCCBRCgAwIBAgITMwAAABcnRQkL
+# i4evxgAAAAAAFzANBgkqhkiG9w0BAQwFADBjMQswCQYDVQQGEwJVUzEeMBwGA1UE
+# ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTQwMgYDVQQDEytNaWNyb3NvZnQgSUQg
+# VmVyaWZpZWQgQ29kZSBTaWduaW5nIFBDQSAyMDIxMB4XDTI2MDMyNjE4MTEzMVoX
+# DTMxMDMyNjE4MTEzMVowWjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29m
+# dCBDb3Jwb3JhdGlvbjErMCkGA1UEAxMiTWljcm9zb2Z0IElEIFZlcmlmaWVkIENT
+# IEVPQyBDQSAwNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAILHZP4D
+# D2YqAZXMn5OrQ8yfj0beK0ixilvHsKUtJEcV7VEQt09xnWwipY6GxJ/LrLKoRqkK
+# UYf0l70VcDVxCBm++lBuSD5AidUuv/QQ+tUELCsz3qVtEjY/E14LBcb0uzJbaEbo
+# pCCKe0OY0IGjjOkMivfvumVV1KWJmbpQHusfCa8GdHTZBPq2euparaKHMHqVElVM
+# TO6HQ5p/Mgx4ydgzT7H697kQ4sd1+Kr4deIx/0lvtgse1iDIciIkDttNYuoVIsZp
+# OHtmVvFuwtcD3U46ugSm/s6PMW67e2SkL0V+UDgOnYS6rj6o+bFSp8an5NfSAtEm
+# n00k7PMguNxMPeuQUUVvFS/XHKDpq+K8UMu2goGEzZN3Xfy6YTWk05pxqe5Ji08c
+# h5AeYHqFoWLrhq8sEvBNMCb9FuK3zrRwVdHvbCr7lCHiFKZ7MeopcRFY+lUF74A+
+# sngipz5o94yYiSgJZlA7bYecs0VQVJeOLDIhuC+Uf8sgAkSpNp9PPENmAqGUtTvO
+# vqDCyrdY2lxhAjo27FafCHdVUMPIXuidCoqzkuXtuV5U3RjxW+qATjmmnIFu/Co3
+# 9G6fl8wIJHPdpgxjSRmEo73Z4/u3jMepnltAwCBnS0TY/P+NvTCLKRQX89yg6qqT
+# e9UuJENiy3q93cYQw3MylRS9By8Ebjr4I4hvAgMBAAGjggHcMIIB2DAOBgNVHQ8B
+# Af8EBAMCAYYwEAYJKwYBBAGCNxUBBAMCAQAwHQYDVR0OBBYEFJrxVHd1DIcWN0ag
+# rN55+fR/wXjpMFQGA1UdIARNMEswSQYEVR0gADBBMD8GCCsGAQUFBwIBFjNodHRw
+# Oi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL0RvY3MvUmVwb3NpdG9yeS5odG0w
+# GQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwEgYDVR0TAQH/BAgwBgEB/wIBADAf
+# BgNVHSMEGDAWgBTZQSmwDw9jbO9p1/XNKZ6kSGow5jBwBgNVHR8EaTBnMGWgY6Bh
+# hl9odHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNyb3NvZnQl
+# MjBJRCUyMFZlcmlmaWVkJTIwQ29kZSUyMFNpZ25pbmclMjBQQ0ElMjAyMDIxLmNy
+# bDB9BggrBgEFBQcBAQRxMG8wbQYIKwYBBQUHMAKGYWh0dHA6Ly93d3cubWljcm9z
+# b2Z0LmNvbS9wa2lvcHMvY2VydHMvTWljcm9zb2Z0JTIwSUQlMjBWZXJpZmllZCUy
+# MENvZGUlMjBTaWduaW5nJTIwUENBJTIwMjAyMS5jcnQwDQYJKoZIhvcNAQEMBQAD
+# ggIBAJB1Whn9TSbfyXaIppkWWzFq+m2mg4vJpHVr1krZNIXWQ6cUmEwOx7oqQKCy
+# 96iISNdNVzpe3zogoefvo2TmpkHQFe/aIxFDaCIAmZi9lyay2hmp8HYzcp3nCcmF
+# Qk60X9voeypJ6VjqeGsXTrOivWUOYNCLEFlwsH3NHX5EpCyjWN6Q3Fi5ST4do3eT
+# VLnuqTQ7/9huTBTSYQsJbTg3m8gIxnHlPlzs2r/u4u9tWEJ0Pt/ZtmkDhTu86QHW
+# igHgBoRHemOgnQxp3ksXKLo1r2n1m7+Gst46NTkUi1LljGyq+V9fEBOEnXvoKaRi
+# y0pGbK1IdnsmEpF9Xp71l+2T84Nv8IrikZUBWqw5/jffttAas4ccJDci832CadS4
+# OHwl29uF6hY8fEg3UYHmxSJjnzi1c3vF0PwsJKxGom9Dx7treBlZOBWK6BGzVBar
+# 43Qb02N7okeU3UKMl6GB74fk8aS0mNr6O4YSvQ/66RKRwvqppnEVBOHdIMjvWW9b
+# 77duX8TN3pI7w31R3D6t6jK9EcLJOJKymVlBIFNUl0+ajeoKka7IcW0+jkIGff8U
+# 9OKol3cz0Eeiop3Qb0qaDp8ZwC8XCcs1cDaSi/vbvBGWMvfKl+ovuIBP9ienG6Xp
+# HAdGVw5/10MaDVFG+v3Y0/8JZVchvryB5Hau9T82x+a2MXXAMIIHnjCCBYagAwIB
+# AgITMwAAAAeHozSje6WOHAAAAAAABzANBgkqhkiG9w0BAQwFADB3MQswCQYDVQQG
+# EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMUgwRgYDVQQDEz9N
+# aWNyb3NvZnQgSWRlbnRpdHkgVmVyaWZpY2F0aW9uIFJvb3QgQ2VydGlmaWNhdGUg
+# QXV0aG9yaXR5IDIwMjAwHhcNMjEwNDAxMjAwNTIwWhcNMzYwNDAxMjAxNTIwWjBj
+# MQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTQw
+# MgYDVQQDEytNaWNyb3NvZnQgSUQgVmVyaWZpZWQgQ29kZSBTaWduaW5nIFBDQSAy
+# MDIxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsvDArxmIKOLdVHpM
+# SWxpCFUJtFL/ekr4weslKPdnF3cpTeuV8veqtmKVgok2rO0D05BpyvUDCg1wdsoE
+# tuxACEGcgHfjPF/nZsOkg7c0mV8hpMT/GvB4uhDvWXMIeQPsDgCzUGzTvoi76YDp
+# xDOxhgf8JuXWJzBDoLrmtThX01CE1TCCvH2sZD/+Hz3RDwl2MsvDSdX5rJDYVuR3
+# bjaj2QfzZFmwfccTKqMAHlrz4B7ac8g9zyxlTpkTuJGtFnLBGasoOnn5NyYlf0xF
+# 9/bjVRo4Gzg2Yc7KR7yhTVNiuTGH5h4eB9ajm1OCShIyhrKqgOkc4smz6obxO+Hx
+# KeJ9bYmPf6KLXVNLz8UaeARo0BatvJ82sLr2gqlFBdj1sYfqOf00Qm/3B4XGFPDK
+# /H04kteZEZsBRc3VT2d/iVd7OTLpSH9yCORV3oIZQB/Qr4nD4YT/lWkhVtw2v2s0
+# TnRJubL/hFMIQa86rcaGMhNsJrhysLNNMeBhiMezU1s5zpusf54qlYu2v5sZ5zL0
+# KvBDLHtL8F9gn6jOy3v7Jm0bbBHjrW5yQW7S36ALAt03QDpwW1JG1Hxu/FUXJbBO
+# 2AwwVG4Fre+ZQ5Od8ouwt59FpBxVOBGfN4vN2m3fZx1gqn52GvaiBz6ozorgIEjn
+# +PhUXILhAV5Q/ZgCJ0u2+ldFGjcCAwEAAaOCAjUwggIxMA4GA1UdDwEB/wQEAwIB
+# hjAQBgkrBgEEAYI3FQEEAwIBADAdBgNVHQ4EFgQU2UEpsA8PY2zvadf1zSmepEhq
+# MOYwVAYDVR0gBE0wSzBJBgRVHSAAMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cu
+# bWljcm9zb2Z0LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5Lmh0bTAZBgkrBgEE
+# AYI3FAIEDB4KAFMAdQBiAEMAQTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaA
+# FMh+0mqFKhvKGZgEByfPUBBPaKiiMIGEBgNVHR8EfTB7MHmgd6B1hnNodHRwOi8v
+# d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNyb3NvZnQlMjBJZGVudGl0
+# eSUyMFZlcmlmaWNhdGlvbiUyMFJvb3QlMjBDZXJ0aWZpY2F0ZSUyMEF1dGhvcml0
+# eSUyMDIwMjAuY3JsMIHDBggrBgEFBQcBAQSBtjCBszCBgQYIKwYBBQUHMAKGdWh0
+# dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY2VydHMvTWljcm9zb2Z0JTIw
+# SWRlbnRpdHklMjBWZXJpZmljYXRpb24lMjBSb290JTIwQ2VydGlmaWNhdGUlMjBB
+# dXRob3JpdHklMjAyMDIwLmNydDAtBggrBgEFBQcwAYYhaHR0cDovL29uZW9jc3Au
+# bWljcm9zb2Z0LmNvbS9vY3NwMA0GCSqGSIb3DQEBDAUAA4ICAQB/JSqe/tSr6t1m
+# CttXI0y6XmyQ41uGWzl9xw+WYhvOL47BV09Dgfnm/tU4ieeZ7NAR5bguorTCNr58
+# HOcA1tcsHQqt0wJsdClsu8bpQD9e/al+lUgTUJEV80Xhco7xdgRrehbyhUf4pkeA
+# hBEjABvIUpD2LKPho5Z4DPCT5/0TlK02nlPwUbv9URREhVYCtsDM+31OFU3fDV8B
+# mQXv5hT2RurVsJHZgP4y26dJDVF+3pcbtvh7R6NEDuYHYihfmE2HdQRq5jRvLE1E
+# b59PYwISFCX2DaLZ+zpU4bX0I16ntKq4poGOFaaKtjIA1vRElItaOKcwtc04CBrX
+# SfyL2Op6mvNIxTk4OaswIkTXbFL81ZKGD+24uMCwo/pLNhn7VHLfnxlMVzHQVL+b
+# Ha9KhTyzwdG/L6uderJQn0cGpLQMStUuNDArxW2wF16QGZ1NtBWgKA8Kqv48M8Hf
+# FqNifN6+zt6J0GwzvU8g0rYGgTZR8zDEIJfeZxwWDHpSxB5FJ1VVU1LIAtB7o9PX
+# bjXzGifaIMYTzU4YKt4vMNwwBmetQDHhdAtTPplOXrnI9SI6HeTtjDD3iUN/7ygb
+# ahmYOHk7VB7fwT4ze+ErCbMh6gHV1UuXPiLciloNxH6K4aMfZN1oLVk6YFeIJEok
+# uPgNPa6EnTiOL60cPqfny+Fq8UiuZzGCGugwghrkAgEBMHEwWjELMAkGA1UEBhMC
+# VVMxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjErMCkGA1UEAxMiTWlj
+# cm9zb2Z0IElEIFZlcmlmaWVkIENTIEVPQyBDQSAwNAITMwAByIWXgdv+npAPogAA
+# AAHIhTANBglghkgBZQMEAgEFAKCBsjAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIB
+# BDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQxIgQg
+# Kld7dFLdvZygPQIm94QeWCWq09RhnYWpKs5R8/oLpjgwRgYKKwYBBAGCNwIBDDE4
+# MDagMIAuAFAAeQB0AGgAbwBuACAAMwAuADEANAAuADYAIAAoAGMANgAzAGEAZQBj
+# ADYAKaECgAAwDQYJKoZIhvcNAQEBBQAEggGAB6TqI3uwlh/pgdMwSCj6qhCPpPZs
+# nwptwex97+ykuKcn1PsVSrNgx5ftUwnM2E9KXNGxfCAZ+Azg9t9ikOlQLuoyNLP+
+# u+tlzDEAXYZ06rXrXMR7ETaou8KKdmECBFm7YPI6GsUuqHUhdyXjlciH7KFUgFWa
+# 92/IAH/NnjmG0WBvqxpyE/znp6095tTFOC60JaR0hlgi90x8uqP8jY1e4QjmNPkk
+# TOObfWnQqM/AhyVW2U2OhvcCs1oUj0p8knA8bOBXR6/9WmS6vsCnXDCcj/5aT+Rq
+# JNK5g6N2Qln3XNw4u2ciNnJBsifxmCvrNzIlEfPTaa9wipma2vPYvtqtydEtu6lC
+# WjOTgFkfj0cpuAhbM5hNKrmIU18mBHXtZJ5OrC5PR/vclAYWF2v+dU2lyuW55sAt
+# MsvXz3TyC353E9rKZ7aEg10nVyqm1FA7UhP4MCW0iDr6E5VNk/31PC8evQVzGRsN
+# mumhn2renRRboHlrUAeVZD5j8Un49j6FQMTGoYIYEzCCGA8GCisGAQQBgjcDAwEx
+# ghf/MIIX+wYJKoZIhvcNAQcCoIIX7DCCF+gCAQMxDzANBglghkgBZQMEAgEFADCC
+# AWEGCyqGSIb3DQEJEAEEoIIBUASCAUwwggFIAgEBBgorBgEEAYRZCgMBMDEwDQYJ
+# YIZIAWUDBAIBBQAEICoD/U27WnAZDt9Dk9xZ/3/38EFMSFlD1j8bLA5sO+akAgZp
+# 6IFmT1sYEjIwMjYwNjEwMTEyODU1LjYzWjAEgAIB9KCB4aSB3jCB2zELMAkGA1UE
+# BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAc
+# BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0
+# IEFtZXJpY2EgT3BlcmF0aW9uczEnMCUGA1UECxMeblNoaWVsZCBUU1MgRVNOOjdE
+# MDAtMDVFMC1EOTQ3MTUwMwYDVQQDEyxNaWNyb3NvZnQgUHVibGljIFJTQSBUaW1l
+# IFN0YW1waW5nIEF1dGhvcml0eaCCDyEwggeCMIIFaqADAgECAhMzAAAABeXPD/9m
+# LsmHAAAAAAAFMA0GCSqGSIb3DQEBDAUAMHcxCzAJBgNVBAYTAlVTMR4wHAYDVQQK
+# ExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xSDBGBgNVBAMTP01pY3Jvc29mdCBJZGVu
+# dGl0eSBWZXJpZmljYXRpb24gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgMjAy
+# MDAeFw0yMDExMTkyMDMyMzFaFw0zNTExMTkyMDQyMzFaMGExCzAJBgNVBAYTAlVT
+# MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jv
+# c29mdCBQdWJsaWMgUlNBIFRpbWVzdGFtcGluZyBDQSAyMDIwMIICIjANBgkqhkiG
+# 9w0BAQEFAAOCAg8AMIICCgKCAgEAnnznUmP94MWfBX1jtQYioxwe1+eXM9ETBb1l
+# Rkd3kcFdcG9/sqtDlwxKoVIcaqDb+omFio5DHC4RBcbyQHjXCwMk/l3TOYtgoBjx
+# nG/eViS4sOx8y4gSq8Zg49REAf5huXhIkQRKe3Qxs8Sgp02KHAznEa/Ssah8nWo5
+# hJM1xznkRsFPu6rfDHeZeG1Wa1wISvlkpOQooTULFm809Z0ZYlQ8Lp7i5F9YciFl
+# yAKwn6yjN/kR4fkquUWfGmMopNq/B8U/pdoZkZZQbxNlqJOiBGgCWpx69uKqKhTP
+# Vi3gVErnc/qi+dR8A2MiAz0kN0nh7SqINGbmw5OIRC0EsZ31WF3Uxp3GgZwetEKx
+# Lms73KG/Z+MkeuaVDQQheangOEMGJ4pQZH55ngI0Tdy1bi69INBV5Kn2HVJo9XxR
+# YR/JPGAaM6xGl57Ei95HUw9NV/uC3yFjrhc087qLJQawSC3xzY/EXzsT4I7sDbxO
+# mM2rl4uKK6eEpurRduOQ2hTkmG1hSuWYBunFGNv21Kt4N20AKmbeuSnGnsBCd2cj
+# RKG79+TX+sTehawOoxfeOO/jR7wo3liwkGdzPJYHgnJ54UxbckF914AqHOiEV7xT
+# nD1a69w/UTxwjEugpIPMIIE67SFZ2PMo27xjlLAHWW3l1CEAFjLNHd3EQ79PUr8F
+# UXetXr0CAwEAAaOCAhswggIXMA4GA1UdDwEB/wQEAwIBhjAQBgkrBgEEAYI3FQEE
+# AwIBADAdBgNVHQ4EFgQUa2koOjUvSGNAz3vYr0npPtk92yEwVAYDVR0gBE0wSzBJ
+# BgRVHSAAMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9w
+# a2lvcHMvRG9jcy9SZXBvc2l0b3J5Lmh0bTATBgNVHSUEDDAKBggrBgEFBQcDCDAZ
+# BgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTAPBgNVHRMBAf8EBTADAQH/MB8GA1Ud
+# IwQYMBaAFMh+0mqFKhvKGZgEByfPUBBPaKiiMIGEBgNVHR8EfTB7MHmgd6B1hnNo
+# dHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNyb3NvZnQlMjBJ
+# ZGVudGl0eSUyMFZlcmlmaWNhdGlvbiUyMFJvb3QlMjBDZXJ0aWZpY2F0ZSUyMEF1
+# dGhvcml0eSUyMDIwMjAuY3JsMIGUBggrBgEFBQcBAQSBhzCBhDCBgQYIKwYBBQUH
+# MAKGdWh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY2VydHMvTWljcm9z
+# b2Z0JTIwSWRlbnRpdHklMjBWZXJpZmljYXRpb24lMjBSb290JTIwQ2VydGlmaWNh
+# dGUlMjBBdXRob3JpdHklMjAyMDIwLmNydDANBgkqhkiG9w0BAQwFAAOCAgEAX4h2
+# x35ttVoVdedMeGj6TuHYRJklFaW4sTQ5r+k77iB79cSLNe+GzRjv4pVjJviceW6A
+# F6ycWoEYR0LYhaa0ozJLU5Yi+LCmcrdovkl53DNt4EXs87KDogYb9eGEndSpZ5ZM
+# 74LNvVzY0/nPISHz0Xva71QjD4h+8z2XMOZzY7YQ0Psw+etyNZ1CesufU211rLsl
+# LKsO8F2aBs2cIo1k+aHOhrw9xw6JCWONNboZ497mwYW5EfN0W3zL5s3ad4Xtm7yF
+# M7Ujrhc0aqy3xL7D5FR2J7x9cLWMq7eb0oYioXhqV2tgFqbKHeDick+P8tHYIFov
+# IP7YG4ZkJWag1H91KlELGWi3SLv10o4KGag42pswjybTi4toQcC/irAodDW8HNtX
+# +cbz0sMptFJK+KObAnDFHEsukxD+7jFfEV9Hh/+CSxKRsmnuiovCWIOb+H7DRon9
+# TlxydiFhvu88o0w35JkNbJxTk4MhF/KgaXn0GxdH8elEa2Imq45gaa8D+mTm8LWV
+# ydt4ytxYP/bqjN49D9NZ81coE6aQWm88TwIf4R4YZbOpMKN0CyejaPNN41LGXHeC
+# UMYmBx3PkP8ADHD1J2Cr/6tjuOOCztfp+o9Nc+ZoIAkpUcA/X2gSMkgHAPUvIdto
+# SAHEUKiBhI6JQivRepyvWcl+JYbYbBh7pmgAXVswggeXMIIFf6ADAgECAhMzAAAA
+# VdndaSYo+fjiAAAAAABVMA0GCSqGSIb3DQEBDAUAMGExCzAJBgNVBAYTAlVTMR4w
+# HAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29m
+# dCBQdWJsaWMgUlNBIFRpbWVzdGFtcGluZyBDQSAyMDIwMB4XDTI1MTAyMzIwNDY0
+# OVoXDTI2MTAyMjIwNDY0OVowgdsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNo
+# aW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29y
+# cG9yYXRpb24xJTAjBgNVBAsTHE1pY3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMx
+# JzAlBgNVBAsTHm5TaGllbGQgVFNTIEVTTjo3RDAwLTA1RTAtRDk0NzE1MDMGA1UE
+# AxMsTWljcm9zb2Z0IFB1YmxpYyBSU0EgVGltZSBTdGFtcGluZyBBdXRob3JpdHkw
+# ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9uR+SHllIs/QwJRZp9rD8
+# pmhVm72JDHyvknCFm92tSLzpSMIIVA42NBqesjEYX2FEYhktBnnSAessL7h+lQQl
+# 9/m3ThXAHJYLb9tY66To2ZpOH0mk9kNwbM1H3lCWvKN8SO2X6DGPXbM08R0AM+mV
+# V/O3xxhFYUHH8Vt9yHTyTo/2nuNfarWMU9tTFZgn7E7IYLVoqEMZjlv7zAvf2/qo
+# LQcUjH+/fL5t6n5oReigrxWh5Yr6zN9oWNejxhNy9DxQvizO70cVO5k2/q++gnsm
+# 76jlpOPnWymH7T4VdbfxOUv+sMF3mJrv2OyQu054dsOORuWOKXDN6BzG/2Lj0XTl
+# mtL/kQtkIJjVVqo7sQ4spVrHF0A7mjLW9vQHHRlFVfWbEWNjNrLYQLTnWTrIYkeb
+# nzLWh7YgpFr9IzX4FMax7q8c2LlDZ3lmehH0A4BQMPAkgipEjitnPYxKKeHXVatd
+# Mb26sXa6jJ3lV77yHF6z0AF4/Y9hAqVdhMDG91p5qcNND+/Cacz7JNxbOtWbzhnf
+# xdUXDgbun9k1naexy+/q6u7YB69dzJXW3yFruJaaGGBNYE0GtWK4OVzeI+87PZJU
+# 9s96qHJj81fA1kICBzYfmk7O27ozBDEMiO17dcz8WQoHEeh9LZps1P/Qcb7Fm0Wp
+# QkNrGBslrqU3XOHuymO5DwIDAQABo4IByzCCAccwHQYDVR0OBBYEFFYEXxBt3AgD
+# 8Mi/qckWysHXrGW2MB8GA1UdIwQYMBaAFGtpKDo1L0hjQM972K9J6T7ZPdshMGwG
+# A1UdHwRlMGMwYaBfoF2GW2h0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMv
+# Y3JsL01pY3Jvc29mdCUyMFB1YmxpYyUyMFJTQSUyMFRpbWVzdGFtcGluZyUyMENB
+# JTIwMjAyMC5jcmwweQYIKwYBBQUHAQEEbTBrMGkGCCsGAQUFBzAChl1odHRwOi8v
+# d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY3Jvc29mdCUyMFB1Ymxp
+# YyUyMFJTQSUyMFRpbWVzdGFtcGluZyUyMENBJTIwMjAyMC5jcnQwDAYDVR0TAQH/
+# BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDAOBgNVHQ8BAf8EBAMCB4AwZgYD
+# VR0gBF8wXTBRBgwrBgEEAYI3TIN9AQEwQTA/BggrBgEFBQcCARYzaHR0cDovL3d3
+# dy5taWNyb3NvZnQuY29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnkuaHRtMAgGBmeB
+# DAEEAjANBgkqhkiG9w0BAQwFAAOCAgEAUh7hklR72pQpxZ5bKlyEHnx9cT9kha/Y
+# Plc/n+T+0HssI30G+Y1JUpndV5yVAz3vzB8S+690xBJS/pjbRuggzwMrUrUhT1w/
+# bUwbQTGIfFqqOuKR/apt+tciKngR/e/Zs1gpDELE3dJzOnVJfQfu6orYvk6F8MSJ
+# d/XmKi7mGH4Q9pqqnj1zM1CkkM5H+98mCFRz+pyyUM+GgJmlnHxvY4O/LAZA1fCq
+# VuyYJLbi4aYSRDdQfklR43pz3XJqxVyFLvyuIyubpH1mkCI7ml80owZTYwubUDem
+# nT3wNxsVMBz3keHpC+SH//bwX9d7ZswVvoMvtLDRk73m/SC/RlPIl/FL8sLF+tp4
+# Qgj0VIU4oAwSnXM0VKza57QYaMG33IQQxTC/Gr0TEXPRpnNibyK8l99+khUOdf/6
+# tVFNhzEiRDIViyUiFiVYX1KMLDmvj2pqSMxE2Hxb07tpqiiVJVmV5BmMa3QrwnMy
+# XKnqGnaVtbpepHHZw4dtvEkPGYQ3OiEZTOIjXeUjaDYF/mqJt8Lhso1Gkmj2VsTw
+# dRtjSomITy7dJTx4NBrJI9c4SEmPFEJDDA696NiYEbk/sJyRA0FKeeXXb4UpEqA+
+# iPQy/7Pk4yGP3PYy2luccsCR6nSh1AKUTLIIb+5Hm0rmtbqZkfk6rnpRZLQ0jo1X
+# UkZLsmuLqMUxggdGMIIHQgIBATB4MGExCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVN
+# aWNyb3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBQdWJsaWMg
+# UlNBIFRpbWVzdGFtcGluZyBDQSAyMDIwAhMzAAAAVdndaSYo+fjiAAAAAABVMA0G
+# CWCGSAFlAwQCAQUAoIIEnzARBgsqhkiG9w0BCRACDzECBQAwGgYJKoZIhvcNAQkD
+# MQ0GCyqGSIb3DQEJEAEEMBwGCSqGSIb3DQEJBTEPFw0yNjA2MTAxMTI4NTVaMC8G
+# CSqGSIb3DQEJBDEiBCCLqy6RKjrMiuUMxgryvo2/QAUJRsU8rLthWGfwrNfIejCB
+# uQYLKoZIhvcNAQkQAi8xgakwgaYwgaMwgaAEINi5PJdkhmK7v33+/g9qqyZ5LMHG
+# HSuqRiruxhhq+P7NMHwwZaRjMGExCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVNaWNy
+# b3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBQdWJsaWMgUlNB
+# IFRpbWVzdGFtcGluZyBDQSAyMDIwAhMzAAAAVdndaSYo+fjiAAAAAABVMIIDYQYL
+# KoZIhvcNAQkQAhIxggNQMIIDTKGCA0gwggNEMIICLAIBATCCAQmhgeGkgd4wgdsx
+# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt
+# b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJTAjBgNVBAsTHE1p
+# Y3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMxJzAlBgNVBAsTHm5TaGllbGQgVFNT
+# IEVTTjo3RDAwLTA1RTAtRDk0NzE1MDMGA1UEAxMsTWljcm9zb2Z0IFB1YmxpYyBS
+# U0EgVGltZSBTdGFtcGluZyBBdXRob3JpdHmiIwoBATAHBgUrDgMCGgMVAB07VAGC
+# Zb+24FlXkQaOF+xXhw3qoGcwZaRjMGExCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVN
+# aWNyb3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBQdWJsaWMg
+# UlNBIFRpbWVzdGFtcGluZyBDQSAyMDIwMA0GCSqGSIb3DQEBCwUAAgUA7dOY8DAi
+# GA8yMDI2MDYxMDA4MDQwMFoYDzIwMjYwNjExMDgwNDAwWjB3MD0GCisGAQQBhFkK
+# BAExLzAtMAoCBQDt05jwAgEAMAoCAQACAgpcAgH/MAcCAQACAhL0MAoCBQDt1Opw
+# AgEAMDYGCisGAQQBhFkKBAIxKDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSCh
+# CjAIAgEAAgMBhqAwDQYJKoZIhvcNAQELBQADggEBAFHit6iEwOdRtGtjQ3M6IEYK
+# m18i8e8OODiTvqqRlkJogLXAcPBkYjrgbdst8nUSPz3hnpoFi3pNrfpJeXTgGjeF
+# S+QxCAD1Q+LekwOogcBMyfVNPGVp4wVDYJOWakeHVQeb5SW4gLjjaERYoZp7pFDk
+# NsBYqvZWWKPbMY0KDifODxs1z6LeRoAtO8oA1eNhKc2dHORuHQOfWP4QY1ccXWUK
+# eGQVnjR2skIQEuaqOexABhnJ6ZvG1dg8dM9aPkZz+MtyiRzKFJz5sSnSHxKSgu2P
+# BWDXu1AW1cC0qHfZi2T2MqZZm0JvaNV/zg56NRf/LFPSffYWrw30RC0K5chhZl8w
+# DQYJKoZIhvcNAQEBBQAEggIAgueQQ6DEZqxwIPyywp5BOHfeBghV6CiSFSlyt305
+# zyGf/wb+cjDdvimpYM3VdmqJ/J8+IEX5e6/yVRgO1ZR0wwkgD3m+dEXkUaOD4NCM
+# Om7u4Lw0zxxXhytwf/GbXffVts06Ieg2fDnEBlmT1VK21npT4ie4RouPsF8VHHY1
+# EGwym7PxWm6Xu88Fp9QeCfGNZO4+Xgxdn/sbAWwfM+9+8eO7oEWOpQGPhT35djpw
+# rB1an/Hn2soW5ukWhTgO39lG9iGHDc6ZMHnOKAI/JkV+GW+7WErt6yce1lsuJIN9
+# lBmoYUPdnnG7uy0JYDC/vsA/kazA2ZhAhPanpaoby/yLn2X1KIfkyximZzVWQjhD
+# f0Ruilz5lkQnlP4XnrCZILxnw/xwCpOuVts8zg9YXfaWLZ/Ox3VdmeLazOBYDTNb
+# uaJ9938ijPT4HRbzSFh9ur5h5rLvxOlPWX6abNl3hBrGy2D+G75U5uWZG5zadhe0
+# bu2B/Vk17wxhFj3Y2kX8rvQULzXcHmyaGut/3duKI/oaReGwlY/ZkRrrUeAwOZLr
+# g/31ou4qrKA4ZsPfR49NIItMHz+2EpClwZ9mvwlxWFLGm682BB6DREFTKFzmZfJR
+# 2eYgmDRy/XirJZwanEsb6jkhezinQ9qjZqTHHh/q2g7+Fmj4Mu9HyybN7AO5Fn6m
+# iik=
+# SIG # End signature block
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/common/activate b/Python314_6_x64_Template/Lib/venv/scripts/common/activate
similarity index 97%
rename from Python314_4_x64_Template/Lib/venv/scripts/common/activate
rename to Python314_6_x64_Template/Lib/venv/scripts/common/activate
index 70673a265..241a8650b 100644
--- a/Python314_4_x64_Template/Lib/venv/scripts/common/activate
+++ b/Python314_6_x64_Template/Lib/venv/scripts/common/activate
@@ -17,7 +17,7 @@ deactivate () {
     # Call hash to forget past locations. Without forgetting
     # past locations the $PATH changes we made may not be respected.
     # See "man bash" for more details. hash is usually a builtin of your shell
-    hash -r 2> /dev/null
+    hash -r 2> /dev/null || true
 
     if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
         PS1="${_OLD_VIRTUAL_PS1:-}"
@@ -73,4 +73,4 @@ fi
 
 # Call hash to forget past commands. Without forgetting
 # past commands the $PATH changes we made may not be respected
-hash -r 2> /dev/null
+hash -r 2> /dev/null || true
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/common/activate.fish b/Python314_6_x64_Template/Lib/venv/scripts/common/activate.fish
similarity index 100%
rename from Python314_4_x64_Template/Lib/venv/scripts/common/activate.fish
rename to Python314_6_x64_Template/Lib/venv/scripts/common/activate.fish
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/nt/activate.bat b/Python314_6_x64_Template/Lib/venv/scripts/nt/activate.bat
similarity index 100%
rename from Python314_4_x64_Template/Lib/venv/scripts/nt/activate.bat
rename to Python314_6_x64_Template/Lib/venv/scripts/nt/activate.bat
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/nt/deactivate.bat b/Python314_6_x64_Template/Lib/venv/scripts/nt/deactivate.bat
similarity index 100%
rename from Python314_4_x64_Template/Lib/venv/scripts/nt/deactivate.bat
rename to Python314_6_x64_Template/Lib/venv/scripts/nt/deactivate.bat
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/nt/venvlauncher.exe b/Python314_6_x64_Template/Lib/venv/scripts/nt/venvlauncher.exe
similarity index 96%
rename from Python314_4_x64_Template/Lib/venv/scripts/nt/venvlauncher.exe
rename to Python314_6_x64_Template/Lib/venv/scripts/nt/venvlauncher.exe
index cb8c9dc7e..7067b2df3 100644
Binary files a/Python314_4_x64_Template/Lib/venv/scripts/nt/venvlauncher.exe and b/Python314_6_x64_Template/Lib/venv/scripts/nt/venvlauncher.exe differ
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/nt/venvwlauncher.exe b/Python314_6_x64_Template/Lib/venv/scripts/nt/venvwlauncher.exe
similarity index 97%
rename from Python314_4_x64_Template/Lib/venv/scripts/nt/venvwlauncher.exe
rename to Python314_6_x64_Template/Lib/venv/scripts/nt/venvwlauncher.exe
index 02cd7f737..f005ae791 100644
Binary files a/Python314_4_x64_Template/Lib/venv/scripts/nt/venvwlauncher.exe and b/Python314_6_x64_Template/Lib/venv/scripts/nt/venvwlauncher.exe differ
diff --git a/Python314_4_x64_Template/Lib/venv/scripts/posix/activate.csh b/Python314_6_x64_Template/Lib/venv/scripts/posix/activate.csh
similarity index 100%
rename from Python314_4_x64_Template/Lib/venv/scripts/posix/activate.csh
rename to Python314_6_x64_Template/Lib/venv/scripts/posix/activate.csh
diff --git a/Python314_4_x64_Template/Lib/warnings.py b/Python314_6_x64_Template/Lib/warnings.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/warnings.py
rename to Python314_6_x64_Template/Lib/warnings.py
diff --git a/Python314_4_x64_Template/Lib/wave.py b/Python314_6_x64_Template/Lib/wave.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wave.py
rename to Python314_6_x64_Template/Lib/wave.py
diff --git a/Python314_4_x64_Template/Lib/weakref.py b/Python314_6_x64_Template/Lib/weakref.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/weakref.py
rename to Python314_6_x64_Template/Lib/weakref.py
diff --git a/Python314_4_x64_Template/Lib/webbrowser.py b/Python314_6_x64_Template/Lib/webbrowser.py
similarity index 99%
rename from Python314_4_x64_Template/Lib/webbrowser.py
rename to Python314_6_x64_Template/Lib/webbrowser.py
index 0e0b5034e..97aad6eea 100644
--- a/Python314_4_x64_Template/Lib/webbrowser.py
+++ b/Python314_6_x64_Template/Lib/webbrowser.py
@@ -274,7 +274,6 @@ def _invoke(self, args, remote, autoraise, url=None):
 
     def open(self, url, new=0, autoraise=True):
         sys.audit("webbrowser.open", url)
-        self._check_url(url)
         if new == 0:
             action = self.remote_action
         elif new == 1:
@@ -288,7 +287,9 @@ def open(self, url, new=0, autoraise=True):
             raise Error("Bad 'new' parameter to open(); "
                         f"expected 0, 1, or 2, got {new}")
 
-        args = [arg.replace("%s", url).replace("%action", action)
+        self._check_url(url.replace("%action", action))
+
+        args = [arg.replace("%action", action).replace("%s", url)
                 for arg in self.remote_args]
         args = [arg for arg in args if arg]
         success = self._invoke(args, True, autoraise, url)
diff --git a/Python314_4_x64_Template/Lib/wsgiref/__init__.py b/Python314_6_x64_Template/Lib/wsgiref/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wsgiref/__init__.py
rename to Python314_6_x64_Template/Lib/wsgiref/__init__.py
diff --git a/Python314_4_x64_Template/Lib/wsgiref/handlers.py b/Python314_6_x64_Template/Lib/wsgiref/handlers.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wsgiref/handlers.py
rename to Python314_6_x64_Template/Lib/wsgiref/handlers.py
diff --git a/Python314_4_x64_Template/Lib/wsgiref/headers.py b/Python314_6_x64_Template/Lib/wsgiref/headers.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wsgiref/headers.py
rename to Python314_6_x64_Template/Lib/wsgiref/headers.py
diff --git a/Python314_4_x64_Template/Lib/wsgiref/simple_server.py b/Python314_6_x64_Template/Lib/wsgiref/simple_server.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wsgiref/simple_server.py
rename to Python314_6_x64_Template/Lib/wsgiref/simple_server.py
diff --git a/Python314_4_x64_Template/Lib/wsgiref/types.py b/Python314_6_x64_Template/Lib/wsgiref/types.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wsgiref/types.py
rename to Python314_6_x64_Template/Lib/wsgiref/types.py
diff --git a/Python314_4_x64_Template/Lib/wsgiref/util.py b/Python314_6_x64_Template/Lib/wsgiref/util.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wsgiref/util.py
rename to Python314_6_x64_Template/Lib/wsgiref/util.py
diff --git a/Python314_4_x64_Template/Lib/wsgiref/validate.py b/Python314_6_x64_Template/Lib/wsgiref/validate.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/wsgiref/validate.py
rename to Python314_6_x64_Template/Lib/wsgiref/validate.py
diff --git a/Python314_4_x64_Template/Lib/xml/__init__.py b/Python314_6_x64_Template/Lib/xml/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/__init__.py
rename to Python314_6_x64_Template/Lib/xml/__init__.py
diff --git a/Python314_6_x64_Template/Lib/xml/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/xml/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..9adba0dff
Binary files /dev/null and b/Python314_6_x64_Template/Lib/xml/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/xml/dom/NodeFilter.py b/Python314_6_x64_Template/Lib/xml/dom/NodeFilter.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/NodeFilter.py
rename to Python314_6_x64_Template/Lib/xml/dom/NodeFilter.py
diff --git a/Python314_4_x64_Template/Lib/xml/dom/__init__.py b/Python314_6_x64_Template/Lib/xml/dom/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/__init__.py
rename to Python314_6_x64_Template/Lib/xml/dom/__init__.py
diff --git a/Python314_4_x64_Template/Lib/xml/dom/domreg.py b/Python314_6_x64_Template/Lib/xml/dom/domreg.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/domreg.py
rename to Python314_6_x64_Template/Lib/xml/dom/domreg.py
diff --git a/Python314_4_x64_Template/Lib/xml/dom/expatbuilder.py b/Python314_6_x64_Template/Lib/xml/dom/expatbuilder.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/expatbuilder.py
rename to Python314_6_x64_Template/Lib/xml/dom/expatbuilder.py
diff --git a/Python314_4_x64_Template/Lib/xml/dom/minicompat.py b/Python314_6_x64_Template/Lib/xml/dom/minicompat.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/minicompat.py
rename to Python314_6_x64_Template/Lib/xml/dom/minicompat.py
diff --git a/Python314_4_x64_Template/Lib/xml/dom/minidom.py b/Python314_6_x64_Template/Lib/xml/dom/minidom.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/minidom.py
rename to Python314_6_x64_Template/Lib/xml/dom/minidom.py
diff --git a/Python314_4_x64_Template/Lib/xml/dom/pulldom.py b/Python314_6_x64_Template/Lib/xml/dom/pulldom.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/pulldom.py
rename to Python314_6_x64_Template/Lib/xml/dom/pulldom.py
diff --git a/Python314_4_x64_Template/Lib/xml/dom/xmlbuilder.py b/Python314_6_x64_Template/Lib/xml/dom/xmlbuilder.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/dom/xmlbuilder.py
rename to Python314_6_x64_Template/Lib/xml/dom/xmlbuilder.py
diff --git a/Python314_4_x64_Template/Lib/xml/etree/ElementInclude.py b/Python314_6_x64_Template/Lib/xml/etree/ElementInclude.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/etree/ElementInclude.py
rename to Python314_6_x64_Template/Lib/xml/etree/ElementInclude.py
diff --git a/Python314_4_x64_Template/Lib/xml/etree/ElementPath.py b/Python314_6_x64_Template/Lib/xml/etree/ElementPath.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/etree/ElementPath.py
rename to Python314_6_x64_Template/Lib/xml/etree/ElementPath.py
diff --git a/Python314_4_x64_Template/Lib/xml/etree/ElementTree.py b/Python314_6_x64_Template/Lib/xml/etree/ElementTree.py
similarity index 97%
rename from Python314_4_x64_Template/Lib/xml/etree/ElementTree.py
rename to Python314_6_x64_Template/Lib/xml/etree/ElementTree.py
index dafe5b1b8..0a4203d37 100644
--- a/Python314_4_x64_Template/Lib/xml/etree/ElementTree.py
+++ b/Python314_6_x64_Template/Lib/xml/etree/ElementTree.py
@@ -8,8 +8,8 @@
     2. Element represents a single node in this tree.
 
  Interactions with the whole document (reading and writing to/from files) are
- usually done on the ElementTree level.  Interactions with a single XML element
- and its sub-elements are done on the Element level.
+ usually done on the ElementTree level.  Interactions with a single XML
+ element and its sub-elements are done on the Element level.
 
  Element is a flexible container object designed to store hierarchical data
  structures in memory. It can be described as a cross between a list and a
@@ -277,7 +277,8 @@ def find(self, path, namespaces=None):
         """Find first matching element by tag name or path.
 
         *path* is a string having either an element tag or an XPath,
-        *namespaces* is an optional mapping from namespace prefix to full name.
+        *namespaces* is an optional mapping from namespace prefix to full
+        name.
 
         Return the first matching element, or None if no element was found.
 
@@ -289,7 +290,8 @@ def findtext(self, path, default=None, namespaces=None):
 
         *path* is a string having either an element tag or an XPath,
         *default* is the value to return if the element was not found,
-        *namespaces* is an optional mapping from namespace prefix to full name.
+        *namespaces* is an optional mapping from namespace prefix to full
+        name.
 
         Return text content of first matching element, or default value if
         none was found.  Note that if an element is found having no text
@@ -302,7 +304,8 @@ def findall(self, path, namespaces=None):
         """Find all matching subelements by tag name or path.
 
         *path* is a string having either an element tag or an XPath,
-        *namespaces* is an optional mapping from namespace prefix to full name.
+        *namespaces* is an optional mapping from namespace prefix to full
+        name.
 
         Returns list containing all matching elements in document order.
 
@@ -313,7 +316,8 @@ def iterfind(self, path, namespaces=None):
         """Find all matching subelements by tag name or path.
 
         *path* is a string having either an element tag or an XPath,
-        *namespaces* is an optional mapping from namespace prefix to full name.
+        *namespaces* is an optional mapping from namespace prefix to full
+        name.
 
         Return an iterable yielding all matching elements in document order.
 
@@ -553,8 +557,8 @@ def _setroot(self, element):
     def parse(self, source, parser=None):
         """Load external XML document into element tree.
 
-        *source* is a file name or file object, *parser* is an optional parser
-        instance that defaults to XMLParser.
+        *source* is a file name or file object, *parser* is an optional
+        parser instance that defaults to XMLParser.
 
         ParseError is raised if the parser fails to parse the document.
 
@@ -587,7 +591,8 @@ def parse(self, source, parser=None):
     def iter(self, tag=None):
         """Create and return tree iterator for the root element.
 
-        The iterator loops over all elements in this tree, in document order.
+        The iterator loops over all elements in this tree, in document
+        order.
 
         *tag* is a string with the tag name to iterate over
         (default is to return all elements).
@@ -602,7 +607,8 @@ def find(self, path, namespaces=None):
         Same as getroot().find(path), which is Element.find()
 
         *path* is a string having either an element tag or an XPath,
-        *namespaces* is an optional mapping from namespace prefix to full name.
+        *namespaces* is an optional mapping from namespace prefix to full
+        name.
 
         Return the first matching element, or None if no element was found.
 
@@ -624,7 +630,8 @@ def findtext(self, path, default=None, namespaces=None):
         Same as getroot().findtext(path),  which is Element.findtext()
 
         *path* is a string having either an element tag or an XPath,
-        *namespaces* is an optional mapping from namespace prefix to full name.
+        *namespaces* is an optional mapping from namespace prefix to full
+        name.
 
         Return the first matching element, or None if no element was found.
 
@@ -646,7 +653,8 @@ def findall(self, path, namespaces=None):
         Same as getroot().findall(path), which is Element.findall().
 
         *path* is a string having either an element tag or an XPath,
-        *namespaces* is an optional mapping from namespace prefix to full name.
+        *namespaces* is an optional mapping from namespace prefix to full
+        name.
 
         Return list containing all matching elements in document order.
 
@@ -693,24 +701,26 @@ def write(self, file_or_filename,
         """Write element tree to a file as XML.
 
         Arguments:
-          *file_or_filename* -- file name or a file object opened for writing
+          *file_or_filename* -- file name or a file object opened for
+                                writing
 
           *encoding* -- the output encoding (default: US-ASCII)
 
-          *xml_declaration* -- bool indicating if an XML declaration should be
-                               added to the output. If None, an XML declaration
-                               is added if encoding IS NOT either of:
-                               US-ASCII, UTF-8, or Unicode
+          *xml_declaration* -- bool indicating if an XML declaration should
+                               be added to the output. If None, an XML
+                               declaration is added if encoding IS NOT
+                               either of: US-ASCII, UTF-8, or Unicode
 
-          *default_namespace* -- sets the default XML namespace (for "xmlns")
+          *default_namespace* -- sets the default XML namespace (for
+                                 "xmlns")
 
           *method* -- either "xml" (default), "html, "text", or "c14n"
 
           *short_empty_elements* -- controls the formatting of elements
-                                    that contain no content. If True (default)
-                                    they are emitted as a single self-closed
-                                    tag, otherwise they are emitted as a pair
-                                    of start/end tags
+                                    that contain no content.  If True
+                                    (default) they are emitted as a single
+                                    self-closed tag, otherwise they are
+                                    emitted as a pair of start/end tags
 
         """
         if self._root is None:
@@ -907,9 +917,12 @@ def _serialize_xml(write, elem, qnames, namespaces,
     if elem.tail:
         write(_escape_cdata(elem.tail))
 
+_CDATA_CONTENT_ELEMENTS = {"script", "style", "xmp", "iframe", "noembed",
+                           "noframes", "plaintext"}
+
 HTML_EMPTY = {"area", "base", "basefont", "br", "col", "embed", "frame", "hr",
               "img", "input", "isindex", "link", "meta", "param", "source",
-              "track", "wbr"}
+              "track", "wbr", "plaintext"}
 
 def _serialize_html(write, elem, qnames, namespaces, **kwargs):
     tag = elem.tag
@@ -950,7 +963,7 @@ def _serialize_html(write, elem, qnames, namespaces, **kwargs):
             write(">")
             ltag = tag.lower()
             if text:
-                if ltag == "script" or ltag == "style":
+                if ltag in _CDATA_CONTENT_ELEMENTS:
                     write(text)
                 else:
                     write(_escape_cdata(text))
@@ -1083,9 +1096,9 @@ def tostring(element, encoding=None, method=None, *,
     is returned. Otherwise a bytestring is returned.
 
     *element* is an Element instance, *encoding* is an optional output
-    encoding defaulting to US-ASCII, *method* is an optional output which can
-    be one of "xml" (default), "html", "text" or "c14n", *default_namespace*
-    sets the default XML namespace (for "xmlns").
+    encoding defaulting to US-ASCII, *method* is an optional output which
+    can be one of "xml" (default), "html", "text" or "c14n",
+    *default_namespace* sets the default XML namespace (for "xmlns").
 
     Returns an (optionally) encoded string containing the XML data.
 
@@ -1225,7 +1238,8 @@ def iterparse(source, events=None, parser=None):
     "end" events are reported.
 
     *source* is a filename or file object containing XML data, *events* is
-    a list of events to report back, *parser* is an optional parser instance.
+    a list of events to report back, *parser* is an optional parser
+    instance.
 
     Returns an iterator providing (event, elem) pairs.
 
@@ -1757,10 +1771,11 @@ def flush(self):
 def canonicalize(xml_data=None, *, out=None, from_file=None, **options):
     """Convert XML to its C14N 2.0 serialised form.
 
-    If *out* is provided, it must be a file or file-like object that receives
-    the serialised canonical XML output (text, not bytes) through its ``.write()``
-    method.  To write to a file, open it in text mode with encoding "utf-8".
-    If *out* is not provided, this function returns the output as text string.
+    If *out* is provided, it must be a file or file-like object that
+    receives the serialised canonical XML output (text, not bytes) through
+    its ``.write()`` method.  To write to a file, open it in text mode with
+    encoding "utf-8".  If *out* is not provided, this function returns the
+    output as text string.
 
     Either *xml_data* (an XML string) or *from_file* (a file path or
     file-like object) must be provided as input.
@@ -1794,19 +1809,22 @@ class C14NWriterTarget:
     Serialises parse events to XML C14N 2.0.
 
     The *write* function is used for writing out the resulting data stream
-    as text (not bytes).  To write to a file, open it in text mode with encoding
-    "utf-8" and pass its ``.write`` method.
+    as text (not bytes).  To write to a file, open it in text mode with
+    encoding "utf-8" and pass its ``.write`` method.
 
     Configuration options:
 
     - *with_comments*: set to true to include comments
-    - *strip_text*: set to true to strip whitespace before and after text content
-    - *rewrite_prefixes*: set to true to replace namespace prefixes by "n{number}"
+    - *strip_text*: set to true to strip whitespace before and after text
+                    content
+    - *rewrite_prefixes*: set to true to replace namespace prefixes by
+                          "n{number}"
     - *qname_aware_tags*: a set of qname aware tag names in which prefixes
                           should be replaced in text content
-    - *qname_aware_attrs*: a set of qname aware attribute names in which prefixes
-                           should be replaced in text content
-    - *exclude_attrs*: a set of attribute names that should not be serialised
+    - *qname_aware_attrs*: a set of qname aware attribute names in which
+                           prefixes should be replaced in text content
+    - *exclude_attrs*: a set of attribute names that should not be
+                       serialised
     - *exclude_tags*: a set of tag names that should not be serialised
     """
     def __init__(self, write, *,
diff --git a/Python314_4_x64_Template/Lib/xml/etree/__init__.py b/Python314_6_x64_Template/Lib/xml/etree/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/etree/__init__.py
rename to Python314_6_x64_Template/Lib/xml/etree/__init__.py
diff --git a/Python314_4_x64_Template/Lib/xml/etree/cElementTree.py b/Python314_6_x64_Template/Lib/xml/etree/cElementTree.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/etree/cElementTree.py
rename to Python314_6_x64_Template/Lib/xml/etree/cElementTree.py
diff --git a/Python314_4_x64_Template/Lib/xml/parsers/__init__.py b/Python314_6_x64_Template/Lib/xml/parsers/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/parsers/__init__.py
rename to Python314_6_x64_Template/Lib/xml/parsers/__init__.py
diff --git a/Python314_6_x64_Template/Lib/xml/parsers/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/xml/parsers/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..eaf2b5c37
Binary files /dev/null and b/Python314_6_x64_Template/Lib/xml/parsers/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/xml/parsers/__pycache__/expat.cpython-314.pyc b/Python314_6_x64_Template/Lib/xml/parsers/__pycache__/expat.cpython-314.pyc
new file mode 100644
index 000000000..b364269f1
Binary files /dev/null and b/Python314_6_x64_Template/Lib/xml/parsers/__pycache__/expat.cpython-314.pyc differ
diff --git a/Python314_4_x64_Template/Lib/xml/parsers/expat.py b/Python314_6_x64_Template/Lib/xml/parsers/expat.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/parsers/expat.py
rename to Python314_6_x64_Template/Lib/xml/parsers/expat.py
diff --git a/Python314_4_x64_Template/Lib/xml/sax/__init__.py b/Python314_6_x64_Template/Lib/xml/sax/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/sax/__init__.py
rename to Python314_6_x64_Template/Lib/xml/sax/__init__.py
diff --git a/Python314_4_x64_Template/Lib/xml/sax/_exceptions.py b/Python314_6_x64_Template/Lib/xml/sax/_exceptions.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/sax/_exceptions.py
rename to Python314_6_x64_Template/Lib/xml/sax/_exceptions.py
diff --git a/Python314_4_x64_Template/Lib/xml/sax/expatreader.py b/Python314_6_x64_Template/Lib/xml/sax/expatreader.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/sax/expatreader.py
rename to Python314_6_x64_Template/Lib/xml/sax/expatreader.py
diff --git a/Python314_4_x64_Template/Lib/xml/sax/handler.py b/Python314_6_x64_Template/Lib/xml/sax/handler.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/sax/handler.py
rename to Python314_6_x64_Template/Lib/xml/sax/handler.py
diff --git a/Python314_4_x64_Template/Lib/xml/sax/saxutils.py b/Python314_6_x64_Template/Lib/xml/sax/saxutils.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/sax/saxutils.py
rename to Python314_6_x64_Template/Lib/xml/sax/saxutils.py
diff --git a/Python314_4_x64_Template/Lib/xml/sax/xmlreader.py b/Python314_6_x64_Template/Lib/xml/sax/xmlreader.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xml/sax/xmlreader.py
rename to Python314_6_x64_Template/Lib/xml/sax/xmlreader.py
diff --git a/Python314_4_x64_Template/Lib/xmlrpc/__init__.py b/Python314_6_x64_Template/Lib/xmlrpc/__init__.py
similarity index 100%
rename from Python314_4_x64_Template/Lib/xmlrpc/__init__.py
rename to Python314_6_x64_Template/Lib/xmlrpc/__init__.py
diff --git a/Python314_6_x64_Template/Lib/xmlrpc/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/xmlrpc/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 000000000..f97e81d51
Binary files /dev/null and b/Python314_6_x64_Template/Lib/xmlrpc/__pycache__/__init__.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/xmlrpc/__pycache__/client.cpython-314.pyc b/Python314_6_x64_Template/Lib/xmlrpc/__pycache__/client.cpython-314.pyc
new file mode 100644
index 000000000..95e7cc453
Binary files /dev/null and b/Python314_6_x64_Template/Lib/xmlrpc/__pycache__/client.cpython-314.pyc differ
diff --git a/Python314_6_x64_Template/Lib/xmlrpc/client.py b/Python314_6_x64_Template/Lib/xmlrpc/client.py
new file mode 100644
index 000000000..84e4e4d11
--- /dev/null
+++ b/Python314_6_x64_Template/Lib/xmlrpc/client.py
@@ -0,0 +1,1503 @@
+#
+# XML-RPC CLIENT LIBRARY
+# $Id$
+#
+# an XML-RPC client interface for Python.
+#
+# the marshalling and response parser code can also be used to
+# implement XML-RPC servers.
+#
+# Notes:
+# this version is designed to work with Python 2.1 or newer.
+#
+# History:
+# 1999-01-14 fl  Created
+# 1999-01-15 fl  Changed dateTime to use localtime
+# 1999-01-16 fl  Added Binary/base64 element, default to RPC2 service
+# 1999-01-19 fl  Fixed array data element (from Skip Montanaro)
+# 1999-01-21 fl  Fixed dateTime constructor, etc.
+# 1999-02-02 fl  Added fault handling, handle empty sequences, etc.
+# 1999-02-10 fl  Fixed problem with empty responses (from Skip Montanaro)
+# 1999-06-20 fl  Speed improvements, pluggable parsers/transports (0.9.8)
+# 2000-11-28 fl  Changed boolean to check the truth value of its argument
+# 2001-02-24 fl  Added encoding/Unicode/SafeTransport patches
+# 2001-02-26 fl  Added compare support to wrappers (0.9.9/1.0b1)
+# 2001-03-28 fl  Make sure response tuple is a singleton
+# 2001-03-29 fl  Don't require empty params element (from Nicholas Riley)
+# 2001-06-10 fl  Folded in _xmlrpclib accelerator support (1.0b2)
+# 2001-08-20 fl  Base xmlrpclib.Error on built-in Exception (from Paul Prescod)
+# 2001-09-03 fl  Allow Transport subclass to override getparser
+# 2001-09-10 fl  Lazy import of urllib, cgi, xmllib (20x import speedup)
+# 2001-10-01 fl  Remove containers from memo cache when done with them
+# 2001-10-01 fl  Use faster escape method (80% dumps speedup)
+# 2001-10-02 fl  More dumps microtuning
+# 2001-10-04 fl  Make sure import expat gets a parser (from Guido van Rossum)
+# 2001-10-10 sm  Allow long ints to be passed as ints if they don't overflow
+# 2001-10-17 sm  Test for int and long overflow (allows use on 64-bit systems)
+# 2001-11-12 fl  Use repr() to marshal doubles (from Paul Felix)
+# 2002-03-17 fl  Avoid buffered read when possible (from James Rucker)
+# 2002-04-07 fl  Added pythondoc comments
+# 2002-04-16 fl  Added __str__ methods to datetime/binary wrappers
+# 2002-05-15 fl  Added error constants (from Andrew Kuchling)
+# 2002-06-27 fl  Merged with Python CVS version
+# 2002-10-22 fl  Added basic authentication (based on code from Phillip Eby)
+# 2003-01-22 sm  Add support for the bool type
+# 2003-02-27 gvr Remove apply calls
+# 2003-04-24 sm  Use cStringIO if available
+# 2003-04-25 ak  Add support for nil
+# 2003-06-15 gn  Add support for time.struct_time
+# 2003-07-12 gp  Correct marshalling of Faults
+# 2003-10-31 mvl Add multicall support
+# 2004-08-20 mvl Bump minimum supported Python version to 2.1
+# 2014-12-02 ch/doko  Add workaround for gzip bomb vulnerability
+#
+# Copyright (c) 1999-2002 by Secret Labs AB.
+# Copyright (c) 1999-2002 by Fredrik Lundh.
+#
+# info@pythonware.com
+# http://www.pythonware.com
+#
+# --------------------------------------------------------------------
+# The XML-RPC client interface is
+#
+# Copyright (c) 1999-2002 by Secret Labs AB
+# Copyright (c) 1999-2002 by Fredrik Lundh
+#
+# By obtaining, using, and/or copying this software and/or its
+# associated documentation, you agree that you have read, understood,
+# and will comply with the following terms and conditions:
+#
+# Permission to use, copy, modify, and distribute this software and
+# its associated documentation for any purpose and without fee is
+# hereby granted, provided that the above copyright notice appears in
+# all copies, and that both that copyright notice and this permission
+# notice appear in supporting documentation, and that the name of
+# Secret Labs AB or the author not be used in advertising or publicity
+# pertaining to distribution of the software without specific, written
+# prior permission.
+#
+# SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
+# TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
+# ABILITY AND FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
+# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+# --------------------------------------------------------------------
+
+"""
+An XML-RPC client interface for Python.
+
+The marshalling and response parser code can also be used to
+implement XML-RPC servers.
+
+Exported exceptions:
+
+  Error          Base class for client errors
+  ProtocolError  Indicates an HTTP protocol error
+  ResponseError  Indicates a broken response package
+  Fault          Indicates an XML-RPC fault package
+
+Exported classes:
+
+  ServerProxy    Represents a logical connection to an XML-RPC server
+
+  MultiCall      Executor of boxcared xmlrpc requests
+  DateTime       dateTime wrapper for an ISO 8601 string or time tuple or
+                 localtime integer value to generate a "dateTime.iso8601"
+                 XML-RPC value
+  Binary         binary data wrapper
+
+  Marshaller     Generate an XML-RPC params chunk from a Python data structure
+  Unmarshaller   Unmarshal an XML-RPC response from incoming XML event message
+  Transport      Handles an HTTP transaction to an XML-RPC server
+  SafeTransport  Handles an HTTPS transaction to an XML-RPC server
+
+Exported constants:
+
+  (none)
+
+Exported functions:
+
+  getparser      Create instance of the fastest available parser & attach
+                 to an unmarshalling object
+  dumps          Convert an argument tuple or a Fault instance to an XML-RPC
+                 request (or response, if the methodresponse option is used).
+  loads          Convert an XML-RPC packet to unmarshalled data plus a method
+                 name (None if not present).
+"""
+
+import base64
+import sys
+import time
+from datetime import datetime
+from decimal import Decimal
+import http.client
+import urllib.parse
+from xml.parsers import expat
+import errno
+from io import BytesIO
+try:
+    import gzip
+except ImportError:
+    gzip = None #python can be built without zlib/gzip support
+
+# --------------------------------------------------------------------
+# Internal stuff
+
+def escape(s):
+    s = s.replace("&", "&")
+    s = s.replace("<", "<")
+    return s.replace(">", ">",)
+
+# used in User-Agent header sent
+__version__ = '%d.%d' % sys.version_info[:2]
+
+# xmlrpc integer limits
+MAXINT =  2**31-1
+MININT = -2**31
+
+# --------------------------------------------------------------------
+# Error constants (from Dan Libby's specification at
+# http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php)
+
+# Ranges of errors
+PARSE_ERROR       = -32700
+SERVER_ERROR      = -32600
+APPLICATION_ERROR = -32500
+SYSTEM_ERROR      = -32400
+TRANSPORT_ERROR   = -32300
+
+# Specific errors
+NOT_WELLFORMED_ERROR  = -32700
+UNSUPPORTED_ENCODING  = -32701
+INVALID_ENCODING_CHAR = -32702
+INVALID_XMLRPC        = -32600
+METHOD_NOT_FOUND      = -32601
+INVALID_METHOD_PARAMS = -32602
+INTERNAL_ERROR        = -32603
+
+# --------------------------------------------------------------------
+# Exceptions
+
+##
+# Base class for all kinds of client-side errors.
+
+class Error(Exception):
+    """Base class for client errors."""
+    __str__ = object.__str__
+
+##
+# Indicates an HTTP-level protocol error.  This is raised by the HTTP
+# transport layer, if the server returns an error code other than 200
+# (OK).
+#
+# @param url The target URL.
+# @param errcode The HTTP error code.
+# @param errmsg The HTTP error message.
+# @param headers The HTTP header dictionary.
+
+class ProtocolError(Error):
+    """Indicates an HTTP protocol error."""
+    def __init__(self, url, errcode, errmsg, headers):
+        Error.__init__(self)
+        self.url = url
+        self.errcode = errcode
+        self.errmsg = errmsg
+        self.headers = headers
+    def __repr__(self):
+        return (
+            "<%s for %s: %s %s>" %
+            (self.__class__.__name__, self.url, self.errcode, self.errmsg)
+            )
+
+##
+# Indicates a broken XML-RPC response package.  This exception is
+# raised by the unmarshalling layer, if the XML-RPC response is
+# malformed.
+
+class ResponseError(Error):
+    """Indicates a broken response package."""
+    pass
+
+##
+# Indicates an XML-RPC fault response package.  This exception is
+# raised by the unmarshalling layer, if the XML-RPC response contains
+# a fault string.  This exception can also be used as a class, to
+# generate a fault XML-RPC message.
+#
+# @param faultCode The XML-RPC fault code.
+# @param faultString The XML-RPC fault string.
+
+class Fault(Error):
+    """Indicates an XML-RPC fault package."""
+    def __init__(self, faultCode, faultString, **extra):
+        Error.__init__(self)
+        self.faultCode = faultCode
+        self.faultString = faultString
+    def __repr__(self):
+        return "<%s %s: %r>" % (self.__class__.__name__,
+                                self.faultCode, self.faultString)
+
+# --------------------------------------------------------------------
+# Special values
+
+##
+# Backwards compatibility
+boolean = Boolean = bool
+
+
+def _iso8601_format(value):
+    if value.tzinfo is not None:
+        # XML-RPC only uses the naive portion of the datetime
+        value = value.replace(tzinfo=None)
+    # XML-RPC doesn't use '-' separator in the date part
+    return value.isoformat(timespec='seconds').replace('-', '')
+
+
+def _strftime(value):
+    if isinstance(value, datetime):
+        return _iso8601_format(value)
+
+    if not isinstance(value, (tuple, time.struct_time)):
+        if value == 0:
+            value = time.time()
+        value = time.localtime(value)
+
+    return "%04d%02d%02dT%02d:%02d:%02d" % value[:6]
+
+class DateTime:
+    """DateTime wrapper for an ISO 8601 string or time tuple or
+    localtime integer value to generate 'dateTime.iso8601' XML-RPC
+    value.
+    """
+
+    def __init__(self, value=0):
+        if isinstance(value, str):
+            self.value = value
+        else:
+            self.value = _strftime(value)
+
+    def make_comparable(self, other):
+        if isinstance(other, DateTime):
+            s = self.value
+            o = other.value
+        elif isinstance(other, datetime):
+            s = self.value
+            o = _iso8601_format(other)
+        elif isinstance(other, str):
+            s = self.value
+            o = other
+        elif hasattr(other, "timetuple"):
+            s = self.timetuple()
+            o = other.timetuple()
+        else:
+            s = self
+            o = NotImplemented
+        return s, o
+
+    def __lt__(self, other):
+        s, o = self.make_comparable(other)
+        if o is NotImplemented:
+            return NotImplemented
+        return s < o
+
+    def __le__(self, other):
+        s, o = self.make_comparable(other)
+        if o is NotImplemented:
+            return NotImplemented
+        return s <= o
+
+    def __gt__(self, other):
+        s, o = self.make_comparable(other)
+        if o is NotImplemented:
+            return NotImplemented
+        return s > o
+
+    def __ge__(self, other):
+        s, o = self.make_comparable(other)
+        if o is NotImplemented:
+            return NotImplemented
+        return s >= o
+
+    def __eq__(self, other):
+        s, o = self.make_comparable(other)
+        if o is NotImplemented:
+            return NotImplemented
+        return s == o
+
+    def timetuple(self):
+        return time.strptime(self.value, "%Y%m%dT%H:%M:%S")
+
+    ##
+    # Get date/time value.
+    #
+    # @return Date/time value, as an ISO 8601 string.
+
+    def __str__(self):
+        return self.value
+
+    def __repr__(self):
+        return "<%s %r at %#x>" % (self.__class__.__name__, self.value, id(self))
+
+    def decode(self, data):
+        self.value = str(data).strip()
+
+    def encode(self, out):
+        out.write("")
+        out.write(self.value)
+        out.write("\n")
+
+def _datetime(data):
+    # decode xml element contents into a DateTime structure.
+    value = DateTime()
+    value.decode(data)
+    return value
+
+def _datetime_type(data):
+    return datetime.strptime(data, "%Y%m%dT%H:%M:%S")
+
+##
+# Wrapper for binary data.  This can be used to transport any kind
+# of binary data over XML-RPC, using BASE64 encoding.
+#
+# @param data An 8-bit string containing arbitrary data.
+
+class Binary:
+    """Wrapper for binary data."""
+
+    def __init__(self, data=None):
+        if data is None:
+            data = b""
+        else:
+            if not isinstance(data, (bytes, bytearray)):
+                raise TypeError("expected bytes or bytearray, not %s" %
+                                data.__class__.__name__)
+            data = bytes(data)  # Make a copy of the bytes!
+        self.data = data
+
+    ##
+    # Get buffer contents.
+    #
+    # @return Buffer contents, as an 8-bit string.
+
+    def __str__(self):
+        return str(self.data, "latin-1")  # XXX encoding?!
+
+    def __eq__(self, other):
+        if isinstance(other, Binary):
+            other = other.data
+        return self.data == other
+
+    def decode(self, data):
+        self.data = base64.decodebytes(data)
+
+    def encode(self, out):
+        out.write("\n")
+        encoded = base64.encodebytes(self.data)
+        out.write(encoded.decode('ascii'))
+        out.write("\n")
+
+def _binary(data):
+    # decode xml element contents into a Binary structure
+    value = Binary()
+    value.decode(data)
+    return value
+
+WRAPPERS = (DateTime, Binary)
+
+# --------------------------------------------------------------------
+# XML parsers
+
+class ExpatParser:
+    # fast expat parser for Python 2.0 and later.
+    def __init__(self, target):
+        self._parser = parser = expat.ParserCreate(None, None)
+        self._target = target
+        parser.StartElementHandler = target.start
+        parser.EndElementHandler = target.end
+        parser.CharacterDataHandler = target.data
+        encoding = None
+        target.xml(encoding, None)
+
+    def feed(self, data):
+        self._parser.Parse(data, False)
+
+    def close(self):
+        try:
+            parser = self._parser
+        except AttributeError:
+            pass
+        else:
+            del self._target, self._parser # get rid of circular references
+            parser.Parse(b"", True) # end of data
+
+# --------------------------------------------------------------------
+# XML-RPC marshalling and unmarshalling code
+
+##
+# XML-RPC marshaller.
+#
+# @param encoding Default encoding for 8-bit strings.  The default
+#     value is None (interpreted as UTF-8).
+# @see dumps
+
+class Marshaller:
+    """Generate an XML-RPC params chunk from a Python data structure.
+
+    Create a Marshaller instance for each set of parameters, and use
+    the "dumps" method to convert your data (represented as a tuple)
+    to an XML-RPC params chunk.  To write a fault response, pass a
+    Fault instance instead.  You may prefer to use the "dumps" module
+    function for this purpose.
+    """
+
+    # by the way, if you don't understand what's going on in here,
+    # that's perfectly ok.
+
+    def __init__(self, encoding=None, allow_none=False):
+        self.memo = {}
+        self.data = None
+        self.encoding = encoding
+        self.allow_none = allow_none
+
+    dispatch = {}
+
+    def dumps(self, values):
+        out = []
+        write = out.append
+        dump = self.__dump
+        if isinstance(values, Fault):
+            # fault instance
+            write("\n")
+            dump({'faultCode': values.faultCode,
+                  'faultString': values.faultString},
+                 write)
+            write("\n")
+        else:
+            # parameter block
+            # FIXME: the xml-rpc specification allows us to leave out
+            # the entire  block if there are no parameters.
+            # however, changing this may break older code (including
+            # old versions of xmlrpclib.py), so this is better left as
+            # is for now.  See @XMLRPC3 for more information. /F
+            write("\n")
+            for v in values:
+                write("\n")
+                dump(v, write)
+                write("\n")
+            write("\n")
+        result = "".join(out)
+        return result
+
+    def __dump(self, value, write):
+        try:
+            f = self.dispatch[type(value)]
+        except KeyError:
+            # check if this object can be marshalled as a structure
+            if not hasattr(value, '__dict__'):
+                raise TypeError("cannot marshal %s objects" % type(value))
+            # check if this class is a sub-class of a basic type,
+            # because we don't know how to marshal these types
+            # (e.g. a string sub-class)
+            for type_ in type(value).__mro__:
+                if type_ in self.dispatch.keys():
+                    raise TypeError("cannot marshal %s objects" % type(value))
+            # XXX(twouters): using "_arbitrary_instance" as key as a quick-fix
+            # for the p3yk merge, this should probably be fixed more neatly.
+            f = self.dispatch["_arbitrary_instance"]
+        f(self, value, write)
+
+    def dump_nil (self, value, write):
+        if not self.allow_none:
+            raise TypeError("cannot marshal None unless allow_none is enabled")
+        write("")
+    dispatch[type(None)] = dump_nil
+
+    def dump_bool(self, value, write):
+        write("")
+        write(value and "1" or "0")
+        write("\n")
+    dispatch[bool] = dump_bool
+
+    def dump_long(self, value, write):
+        if value > MAXINT or value < MININT:
+            raise OverflowError("int exceeds XML-RPC limits")
+        write("")
+        write(str(int(value)))
+        write("\n")
+    dispatch[int] = dump_long
+
+    # backward compatible
+    dump_int = dump_long
+
+    def dump_double(self, value, write):
+        write("")
+        write(repr(value))
+        write("\n")
+    dispatch[float] = dump_double
+
+    def dump_unicode(self, value, write, escape=escape):
+        write("")
+        write(escape(value))
+        write("\n")
+    dispatch[str] = dump_unicode
+
+    def dump_bytes(self, value, write):
+        write("\n")
+        encoded = base64.encodebytes(value)
+        write(encoded.decode('ascii'))
+        write("\n")
+    dispatch[bytes] = dump_bytes
+    dispatch[bytearray] = dump_bytes
+
+    def dump_array(self, value, write):
+        i = id(value)
+        if i in self.memo:
+            raise TypeError("cannot marshal recursive sequences")
+        self.memo[i] = None
+        dump = self.__dump
+        write("\n")
+        for v in value:
+            dump(v, write)
+        write("\n")
+        del self.memo[i]
+    dispatch[tuple] = dump_array
+    dispatch[list] = dump_array
+
+    def dump_struct(self, value, write, escape=escape):
+        i = id(value)
+        if i in self.memo:
+            raise TypeError("cannot marshal recursive dictionaries")
+        self.memo[i] = None
+        dump = self.__dump
+        write("\n")
+        for k, v in value.items():
+            write("\n")
+            if not isinstance(k, str):
+                raise TypeError("dictionary key must be string")
+            write("%s\n" % escape(k))
+            dump(v, write)
+            write("\n")
+        write("\n")
+        del self.memo[i]
+    dispatch[dict] = dump_struct
+
+    def dump_datetime(self, value, write):
+        write("")
+        write(_strftime(value))
+        write("\n")
+    dispatch[datetime] = dump_datetime
+
+    def dump_instance(self, value, write):
+        # check for special wrappers
+        if value.__class__ in WRAPPERS:
+            self.write = write
+            value.encode(self)
+            del self.write
+        else:
+            # store instance attributes as a struct (really?)
+            self.dump_struct(value.__dict__, write)
+    dispatch[DateTime] = dump_instance
+    dispatch[Binary] = dump_instance
+    # XXX(twouters): using "_arbitrary_instance" as key as a quick-fix
+    # for the p3yk merge, this should probably be fixed more neatly.
+    dispatch["_arbitrary_instance"] = dump_instance
+
+##
+# XML-RPC unmarshaller.
+#
+# @see loads
+
+class Unmarshaller:
+    """Unmarshal an XML-RPC response, based on incoming XML event
+    messages (start, data, end).  Call close() to get the resulting
+    data structure.
+
+    Note that this reader is fairly tolerant, and gladly accepts bogus
+    XML-RPC data without complaining (but not bogus XML).
+    """
+
+    # and again, if you don't understand what's going on in here,
+    # that's perfectly ok.
+
+    def __init__(self, use_datetime=False, use_builtin_types=False):
+        self._type = None
+        self._stack = []
+        self._marks = []
+        self._data = []
+        self._value = False
+        self._methodname = None
+        self._encoding = "utf-8"
+        self.append = self._stack.append
+        self._use_datetime = use_builtin_types or use_datetime
+        self._use_bytes = use_builtin_types
+
+    def close(self):
+        # return response tuple and target method
+        if self._type is None or self._marks:
+            raise ResponseError()
+        if self._type == "fault":
+            raise Fault(**self._stack[0])
+        return tuple(self._stack)
+
+    def getmethodname(self):
+        return self._methodname
+
+    #
+    # event handlers
+
+    def xml(self, encoding, standalone):
+        self._encoding = encoding
+        # FIXME: assert standalone == 1 ???
+
+    def start(self, tag, attrs):
+        # prepare to handle this element
+        if ':' in tag:
+            tag = tag.split(':')[-1]
+        if tag == "array" or tag == "struct":
+            self._marks.append(len(self._stack))
+        self._data = []
+        if self._value and tag not in self.dispatch:
+            raise ResponseError("unknown tag %r" % tag)
+        self._value = (tag == "value")
+
+    def data(self, text):
+        self._data.append(text)
+
+    def end(self, tag):
+        # call the appropriate end tag handler
+        try:
+            f = self.dispatch[tag]
+        except KeyError:
+            if ':' not in tag:
+                return # unknown tag ?
+            try:
+                f = self.dispatch[tag.split(':')[-1]]
+            except KeyError:
+                return # unknown tag ?
+        return f(self, "".join(self._data))
+
+    #
+    # accelerator support
+
+    def end_dispatch(self, tag, data):
+        # dispatch data
+        try:
+            f = self.dispatch[tag]
+        except KeyError:
+            if ':' not in tag:
+                return # unknown tag ?
+            try:
+                f = self.dispatch[tag.split(':')[-1]]
+            except KeyError:
+                return # unknown tag ?
+        return f(self, data)
+
+    #
+    # element decoders
+
+    dispatch = {}
+
+    def end_nil (self, data):
+        self.append(None)
+        self._value = 0
+    dispatch["nil"] = end_nil
+
+    def end_boolean(self, data):
+        if data == "0":
+            self.append(False)
+        elif data == "1":
+            self.append(True)
+        else:
+            raise TypeError("bad boolean value")
+        self._value = 0
+    dispatch["boolean"] = end_boolean
+
+    def end_int(self, data):
+        self.append(int(data))
+        self._value = 0
+    dispatch["i1"] = end_int
+    dispatch["i2"] = end_int
+    dispatch["i4"] = end_int
+    dispatch["i8"] = end_int
+    dispatch["int"] = end_int
+    dispatch["biginteger"] = end_int
+
+    def end_double(self, data):
+        self.append(float(data))
+        self._value = 0
+    dispatch["double"] = end_double
+    dispatch["float"] = end_double
+
+    def end_bigdecimal(self, data):
+        self.append(Decimal(data))
+        self._value = 0
+    dispatch["bigdecimal"] = end_bigdecimal
+
+    def end_string(self, data):
+        if self._encoding:
+            data = data.decode(self._encoding)
+        self.append(data)
+        self._value = 0
+    dispatch["string"] = end_string
+    dispatch["name"] = end_string # struct keys are always strings
+
+    def end_array(self, data):
+        mark = self._marks.pop()
+        # map arrays to Python lists
+        self._stack[mark:] = [self._stack[mark:]]
+        self._value = 0
+    dispatch["array"] = end_array
+
+    def end_struct(self, data):
+        mark = self._marks.pop()
+        # map structs to Python dictionaries
+        dict = {}
+        items = self._stack[mark:]
+        for i in range(0, len(items), 2):
+            dict[items[i]] = items[i+1]
+        self._stack[mark:] = [dict]
+        self._value = 0
+    dispatch["struct"] = end_struct
+
+    def end_base64(self, data):
+        value = Binary()
+        value.decode(data.encode("ascii"))
+        if self._use_bytes:
+            value = value.data
+        self.append(value)
+        self._value = 0
+    dispatch["base64"] = end_base64
+
+    def end_dateTime(self, data):
+        value = DateTime()
+        value.decode(data)
+        if self._use_datetime:
+            value = _datetime_type(data)
+        self.append(value)
+    dispatch["dateTime.iso8601"] = end_dateTime
+
+    def end_value(self, data):
+        # if we stumble upon a value element with no internal
+        # elements, treat it as a string element
+        if self._value:
+            self.end_string(data)
+    dispatch["value"] = end_value
+
+    def end_params(self, data):
+        self._type = "params"
+    dispatch["params"] = end_params
+
+    def end_fault(self, data):
+        self._type = "fault"
+    dispatch["fault"] = end_fault
+
+    def end_methodName(self, data):
+        if self._encoding:
+            data = data.decode(self._encoding)
+        self._methodname = data
+        self._type = "methodName" # no params
+    dispatch["methodName"] = end_methodName
+
+## Multicall support
+#
+
+class _MultiCallMethod:
+    # some lesser magic to store calls made to a MultiCall object
+    # for batch execution
+    def __init__(self, call_list, name):
+        self.__call_list = call_list
+        self.__name = name
+    def __getattr__(self, name):
+        return _MultiCallMethod(self.__call_list, "%s.%s" % (self.__name, name))
+    def __call__(self, *args):
+        self.__call_list.append((self.__name, args))
+
+class MultiCallIterator:
+    """Iterates over the results of a multicall. Exceptions are
+    raised in response to xmlrpc faults."""
+
+    def __init__(self, results):
+        self.results = results
+
+    def __getitem__(self, i):
+        item = self.results[i]
+        if isinstance(item, dict):
+            raise Fault(item['faultCode'], item['faultString'])
+        elif isinstance(item, list):
+            return item[0]
+        else:
+            raise ValueError("unexpected type in multicall result")
+
+class MultiCall:
+    """server -> an object used to boxcar method calls
+
+    server should be a ServerProxy object.
+
+    Methods can be added to the MultiCall using normal
+    method call syntax e.g.:
+
+    multicall = MultiCall(server_proxy)
+    multicall.add(2,3)
+    multicall.get_address("Guido")
+
+    To execute the multicall, call the MultiCall object e.g.:
+
+    add_result, address = multicall()
+    """
+
+    def __init__(self, server):
+        self.__server = server
+        self.__call_list = []
+
+    def __repr__(self):
+        return "<%s at %#x>" % (self.__class__.__name__, id(self))
+
+    def __getattr__(self, name):
+        return _MultiCallMethod(self.__call_list, name)
+
+    def __call__(self):
+        marshalled_list = []
+        for name, args in self.__call_list:
+            marshalled_list.append({'methodName' : name, 'params' : args})
+
+        return MultiCallIterator(self.__server.system.multicall(marshalled_list))
+
+# --------------------------------------------------------------------
+# convenience functions
+
+FastMarshaller = FastParser = FastUnmarshaller = None
+
+##
+# Create a parser object, and connect it to an unmarshalling instance.
+# This function picks the fastest available XML parser.
+#
+# return A (parser, unmarshaller) tuple.
+
+def getparser(use_datetime=False, use_builtin_types=False):
+    """getparser() -> parser, unmarshaller
+
+    Create an instance of the fastest available parser, and attach it
+    to an unmarshalling object.  Return both objects.
+    """
+    if FastParser and FastUnmarshaller:
+        if use_builtin_types:
+            mkdatetime = _datetime_type
+            mkbytes = base64.decodebytes
+        elif use_datetime:
+            mkdatetime = _datetime_type
+            mkbytes = _binary
+        else:
+            mkdatetime = _datetime
+            mkbytes = _binary
+        target = FastUnmarshaller(True, False, mkbytes, mkdatetime, Fault)
+        parser = FastParser(target)
+    else:
+        target = Unmarshaller(use_datetime=use_datetime, use_builtin_types=use_builtin_types)
+        if FastParser:
+            parser = FastParser(target)
+        else:
+            parser = ExpatParser(target)
+    return parser, target
+
+##
+# Convert a Python tuple or a Fault instance to an XML-RPC packet.
+#
+# @def dumps(params, **options)
+# @param params A tuple or Fault instance.
+# @keyparam methodname If given, create a methodCall request for
+#     this method name.
+# @keyparam methodresponse If given, create a methodResponse packet.
+#     If used with a tuple, the tuple must be a singleton (that is,
+#     it must contain exactly one element).
+# @keyparam encoding The packet encoding.
+# @return A string containing marshalled data.
+
+def dumps(params, methodname=None, methodresponse=None, encoding=None,
+          allow_none=False):
+    """data [,options] -> marshalled data
+
+    Convert an argument tuple or a Fault instance to an XML-RPC
+    request (or response, if the methodresponse option is used).
+
+    In addition to the data object, the following options can be given
+    as keyword arguments:
+
+        methodname: the method name for a methodCall packet
+
+        methodresponse: true to create a methodResponse packet.
+        If this option is used with a tuple, the tuple must be
+        a singleton (i.e. it can contain only one element).
+
+        encoding: the packet encoding (default is UTF-8)
+
+    All byte strings in the data structure are assumed to use the
+    packet encoding.  Unicode strings are automatically converted,
+    where necessary.
+    """
+
+    assert isinstance(params, (tuple, Fault)), "argument must be tuple or Fault instance"
+    if isinstance(params, Fault):
+        methodresponse = 1
+    elif methodresponse and isinstance(params, tuple):
+        assert len(params) == 1, "response tuple must be a singleton"
+
+    if not encoding:
+        encoding = "utf-8"
+
+    if FastMarshaller:
+        m = FastMarshaller(encoding)
+    else:
+        m = Marshaller(encoding, allow_none)
+
+    data = m.dumps(params)
+
+    if encoding != "utf-8":
+        xmlheader = "\n" % str(encoding)
+    else:
+        xmlheader = "\n" # utf-8 is default
+
+    # standard XML-RPC wrappings
+    if methodname:
+        # a method call
+        data = (
+            xmlheader,
+            "\n"
+            "", escape(methodname), "\n",
+            data,
+            "\n"
+            )
+    elif methodresponse:
+        # a method response, or a fault structure
+        data = (
+            xmlheader,
+            "\n",
+            data,
+            "\n"
+            )
+    else:
+        return data # return as is
+    return "".join(data)
+
+##
+# Convert an XML-RPC packet to a Python object.  If the XML-RPC packet
+# represents a fault condition, this function raises a Fault exception.
+#
+# @param data An XML-RPC packet, given as an 8-bit string.
+# @return A tuple containing the unpacked data, and the method name
+#     (None if not present).
+# @see Fault
+
+def loads(data, use_datetime=False, use_builtin_types=False):
+    """data -> unmarshalled data, method name
+
+    Convert an XML-RPC packet to unmarshalled data plus a method
+    name (None if not present).
+
+    If the XML-RPC packet represents a fault condition, this function
+    raises a Fault exception.
+    """
+    p, u = getparser(use_datetime=use_datetime, use_builtin_types=use_builtin_types)
+    p.feed(data)
+    p.close()
+    return u.close(), u.getmethodname()
+
+##
+# Encode a string using the gzip content encoding such as specified by the
+# Content-Encoding: gzip
+# in the HTTP header, as described in RFC 1952
+#
+# @param data the unencoded data
+# @return the encoded data
+
+def gzip_encode(data):
+    """data -> gzip encoded data
+
+    Encode data using the gzip content encoding as described in RFC 1952
+    """
+    if not gzip:
+        raise NotImplementedError
+    f = BytesIO()
+    with gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1) as gzf:
+        gzf.write(data)
+    return f.getvalue()
+
+##
+# Decode a string using the gzip content encoding such as specified by the
+# Content-Encoding: gzip
+# in the HTTP header, as described in RFC 1952
+#
+# @param data The encoded data
+# @keyparam max_decode Maximum bytes to decode (20 MiB default), use negative
+#    values for unlimited decoding
+# @return the unencoded data
+# @raises ValueError if data is not correctly coded.
+# @raises ValueError if max gzipped payload length exceeded
+
+def gzip_decode(data, max_decode=20971520):
+    """gzip encoded data -> unencoded data
+
+    Decode data using the gzip content encoding as described in RFC 1952
+    """
+    if not gzip:
+        raise NotImplementedError
+    with gzip.GzipFile(mode="rb", fileobj=BytesIO(data)) as gzf:
+        try:
+            if max_decode < 0: # no limit
+                decoded = gzf.read()
+            else:
+                decoded = gzf.read(max_decode + 1)
+        except OSError:
+            raise ValueError("invalid data")
+    if max_decode >= 0 and len(decoded) > max_decode:
+        raise ValueError("max gzipped payload length exceeded")
+    return decoded
+
+##
+# Return a decoded file-like object for the gzip encoding
+# as described in RFC 1952.
+#
+# @param response A stream supporting a read() method
+# @return a file-like object that the decoded data can be read() from
+
+class GzipDecodedResponse(gzip.GzipFile if gzip else object):
+    """a file-like object to decode a response encoded with the gzip
+    method, as described in RFC 1952.
+    """
+    def __init__(self, response):
+        #response doesn't support tell() and read(), required by
+        #GzipFile
+        if not gzip:
+            raise NotImplementedError
+        self.io = BytesIO(response.read())
+        gzip.GzipFile.__init__(self, mode="rb", fileobj=self.io)
+
+    def close(self):
+        try:
+            gzip.GzipFile.close(self)
+        finally:
+            self.io.close()
+
+
+# --------------------------------------------------------------------
+# request dispatcher
+
+class _Method:
+    # some magic to bind an XML-RPC method to an RPC server.
+    # supports "nested" methods (e.g. examples.getStateName)
+    def __init__(self, send, name):
+        self.__send = send
+        self.__name = name
+    def __getattr__(self, name):
+        return _Method(self.__send, "%s.%s" % (self.__name, name))
+    def __call__(self, *args):
+        return self.__send(self.__name, args)
+
+##
+# Standard transport class for XML-RPC over HTTP.
+# 

+# You can create custom transports by subclassing this method, and +# overriding selected methods. + +class Transport: + """Handles an HTTP transaction to an XML-RPC server.""" + + # client identifier (may be overridden) + user_agent = "Python-xmlrpc/%s" % __version__ + + #if true, we'll request gzip encoding + accept_gzip_encoding = True + + # if positive, encode request using gzip if it exceeds this threshold + # note that many servers will get confused, so only use it if you know + # that they can decode such a request + encode_threshold = None #None = don't encode + + def __init__(self, use_datetime=False, use_builtin_types=False, + *, headers=()): + self._use_datetime = use_datetime + self._use_builtin_types = use_builtin_types + self._connection = (None, None) + self._headers = list(headers) + self._extra_headers = [] + + ## + # Send a complete request, and parse the response. + # Retry request if a cached connection has disconnected. + # + # @param host Target host. + # @param handler Target PRC handler. + # @param request_body XML-RPC request body. + # @param verbose Debugging flag. + # @return Parsed response. + + def request(self, host, handler, request_body, verbose=False): + #retry request once if cached connection has gone cold + for i in (0, 1): + try: + return self.single_request(host, handler, request_body, verbose) + except http.client.RemoteDisconnected: + if i: + raise + except OSError as e: + if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, + errno.EPIPE): + raise + + def single_request(self, host, handler, request_body, verbose=False): + # issue XML-RPC request + try: + http_conn = self.send_request(host, handler, request_body, verbose) + resp = http_conn.getresponse() + if resp.status == 200: + self.verbose = verbose + return self.parse_response(resp) + + except Fault: + raise + except Exception: + #All unexpected errors leave connection in + # a strange state, so we clear it. + self.close() + raise + + #We got an error response. + #Discard any response data and raise exception + if resp.getheader("content-length", ""): + resp.read() + raise ProtocolError( + host + handler, + resp.status, resp.reason, + dict(resp.getheaders()) + ) + + + ## + # Create parser. + # + # @return A 2-tuple containing a parser and an unmarshaller. + + def getparser(self): + # get parser and unmarshaller + return getparser(use_datetime=self._use_datetime, + use_builtin_types=self._use_builtin_types) + + ## + # Get authorization info from host parameter + # Host may be a string, or a (host, x509-dict) tuple; if a string, + # it is checked for a "user:pw@host" format, and a "Basic + # Authentication" header is added if appropriate. + # + # @param host Host descriptor (URL or (URL, x509 info) tuple). + # @return A 3-tuple containing (actual host, extra headers, + # x509 info). The header and x509 fields may be None. + + def get_host_info(self, host): + + x509 = {} + if isinstance(host, tuple): + host, x509 = host + + auth, host = urllib.parse._splituser(host) + + if auth: + auth = urllib.parse.unquote_to_bytes(auth) + auth = base64.encodebytes(auth).decode("utf-8") + auth = "".join(auth.split()) # get rid of whitespace + extra_headers = [ + ("Authorization", "Basic " + auth) + ] + else: + extra_headers = [] + + return host, extra_headers, x509 + + ## + # Connect to server. + # + # @param host Target host. + # @return An HTTPConnection object + + def make_connection(self, host): + #return an existing connection if possible. This allows + #HTTP/1.1 keep-alive. + if self._connection and host == self._connection[0]: + return self._connection[1] + # create a HTTP connection object from a host descriptor + chost, self._extra_headers, x509 = self.get_host_info(host) + self._connection = host, http.client.HTTPConnection(chost) + return self._connection[1] + + ## + # Clear any cached connection object. + # Used in the event of socket errors. + # + def close(self): + host, connection = self._connection + if connection: + self._connection = (None, None) + connection.close() + + ## + # Send HTTP request. + # + # @param host Host descriptor (URL or (URL, x509 info) tuple). + # @param handler Target RPC handler (a path relative to host) + # @param request_body The XML-RPC request body + # @param debug Enable debugging if debug is true. + # @return An HTTPConnection. + + def send_request(self, host, handler, request_body, debug): + connection = self.make_connection(host) + headers = self._headers + self._extra_headers + if debug: + connection.set_debuglevel(1) + if self.accept_gzip_encoding and gzip: + connection.putrequest("POST", handler, skip_accept_encoding=True) + headers.append(("Accept-Encoding", "gzip")) + else: + connection.putrequest("POST", handler) + headers.append(("Content-Type", "text/xml")) + headers.append(("User-Agent", self.user_agent)) + self.send_headers(connection, headers) + self.send_content(connection, request_body) + return connection + + ## + # Send request headers. + # This function provides a useful hook for subclassing + # + # @param connection httpConnection. + # @param headers list of key,value pairs for HTTP headers + + def send_headers(self, connection, headers): + for key, val in headers: + connection.putheader(key, val) + + ## + # Send request body. + # This function provides a useful hook for subclassing + # + # @param connection httpConnection. + # @param request_body XML-RPC request body. + + def send_content(self, connection, request_body): + #optionally encode the request + if (self.encode_threshold is not None and + self.encode_threshold < len(request_body) and + gzip): + connection.putheader("Content-Encoding", "gzip") + request_body = gzip_encode(request_body) + + connection.putheader("Content-Length", str(len(request_body))) + connection.endheaders(request_body) + + ## + # Parse response. + # + # @param file Stream. + # @return Response tuple and target method. + + def parse_response(self, response): + # read response data from httpresponse, and parse it + # Check for new http response object, otherwise it is a file object. + if hasattr(response, 'getheader'): + if response.getheader("Content-Encoding", "") == "gzip": + stream = GzipDecodedResponse(response) + else: + stream = response + else: + stream = response + + p, u = self.getparser() + + while data := stream.read(1024): + if self.verbose: + print("body:", repr(data)) + p.feed(data) + + if stream is not response: + stream.close() + p.close() + + return u.close() + +## +# Standard transport class for XML-RPC over HTTPS. + +class SafeTransport(Transport): + """Handles an HTTPS transaction to an XML-RPC server.""" + + def __init__(self, use_datetime=False, use_builtin_types=False, + *, headers=(), context=None): + super().__init__(use_datetime=use_datetime, + use_builtin_types=use_builtin_types, + headers=headers) + self.context = context + + # FIXME: mostly untested + + def make_connection(self, host): + if self._connection and host == self._connection[0]: + return self._connection[1] + + if not hasattr(http.client, "HTTPSConnection"): + raise NotImplementedError( + "your version of http.client doesn't support HTTPS") + # create a HTTPS connection object from a host descriptor + # host may be a string, or a (host, x509-dict) tuple + chost, self._extra_headers, x509 = self.get_host_info(host) + self._connection = host, http.client.HTTPSConnection(chost, + None, context=self.context, **(x509 or {})) + return self._connection[1] + +## +# Standard server proxy. This class establishes a virtual connection +# to an XML-RPC server. +#

+# This class is available as ServerProxy and Server. New code should +# use ServerProxy, to avoid confusion. +# +# @def ServerProxy(uri, **options) +# @param uri The connection point on the server. +# @keyparam transport A transport factory, compatible with the +# standard transport class. +# @keyparam encoding The default encoding used for 8-bit strings +# (default is UTF-8). +# @keyparam verbose Use a true value to enable debugging output. +# (printed to standard output). +# @see Transport + +class ServerProxy: + """uri [,options] -> a logical connection to an XML-RPC server + + uri is the connection point on the server, given as + scheme://host/target. + + The standard implementation always supports the "http" scheme. If + SSL socket support is available (Python 2.0), it also supports + "https". + + If the target part and the slash preceding it are both omitted, + "/RPC2" is assumed. + + The following options can be given as keyword arguments: + + transport: a transport factory + encoding: the request encoding (default is UTF-8) + + All 8-bit strings passed to the server proxy are assumed to use + the given encoding. + """ + + def __init__(self, uri, transport=None, encoding=None, verbose=False, + allow_none=False, use_datetime=False, use_builtin_types=False, + *, headers=(), context=None): + # establish a "logical" server connection + + # get the url + p = urllib.parse.urlsplit(uri) + if p.scheme not in ("http", "https"): + raise OSError("unsupported XML-RPC protocol") + self.__host = p.netloc + self.__handler = urllib.parse.urlunsplit(["", "", *p[2:]]) + if not self.__handler: + self.__handler = "/RPC2" + + if transport is None: + if p.scheme == "https": + handler = SafeTransport + extra_kwargs = {"context": context} + else: + handler = Transport + extra_kwargs = {} + transport = handler(use_datetime=use_datetime, + use_builtin_types=use_builtin_types, + headers=headers, + **extra_kwargs) + self.__transport = transport + + self.__encoding = encoding or 'utf-8' + self.__verbose = verbose + self.__allow_none = allow_none + + def __close(self): + self.__transport.close() + + def __request(self, methodname, params): + # call a method on the remote server + + request = dumps(params, methodname, encoding=self.__encoding, + allow_none=self.__allow_none).encode(self.__encoding, 'xmlcharrefreplace') + + response = self.__transport.request( + self.__host, + self.__handler, + request, + verbose=self.__verbose + ) + + if len(response) == 1: + response = response[0] + + return response + + def __repr__(self): + return ( + "<%s for %s%s>" % + (self.__class__.__name__, self.__host, self.__handler) + ) + + def __getattr__(self, name): + # magic method dispatcher + return _Method(self.__request, name) + + # note: to call a remote object with a non-standard name, use + # result getattr(server, "strange-python-name")(args) + + def __call__(self, attr): + """A workaround to get special attributes on the ServerProxy + without interfering with the magic __getattr__ + """ + if attr == "close": + return self.__close + elif attr == "transport": + return self.__transport + raise AttributeError("Attribute %r not found" % (attr,)) + + def __enter__(self): + return self + + def __exit__(self, *args): + self.__close() + +# compatibility + +Server = ServerProxy + +# -------------------------------------------------------------------- +# test code + +if __name__ == "__main__": + + # simple test program (from the XML-RPC specification) + + # local server, available from Lib/xmlrpc/server.py + server = ServerProxy("http://localhost:8000") + + try: + print(server.currentTime.getCurrentTime()) + except Error as v: + print("ERROR", v) + + multi = MultiCall(server) + multi.getData() + multi.pow(2,9) + multi.add(1,2) + try: + for response in multi(): + print(response) + except Error as v: + print("ERROR", v) diff --git a/Python314_4_x64_Template/Lib/xmlrpc/server.py b/Python314_6_x64_Template/Lib/xmlrpc/server.py similarity index 100% rename from Python314_4_x64_Template/Lib/xmlrpc/server.py rename to Python314_6_x64_Template/Lib/xmlrpc/server.py diff --git a/Python314_4_x64_Template/Lib/zipapp.py b/Python314_6_x64_Template/Lib/zipapp.py similarity index 100% rename from Python314_4_x64_Template/Lib/zipapp.py rename to Python314_6_x64_Template/Lib/zipapp.py diff --git a/Python314_6_x64_Template/Lib/zipfile/__init__.py b/Python314_6_x64_Template/Lib/zipfile/__init__.py new file mode 100644 index 000000000..2b6e6163b --- /dev/null +++ b/Python314_6_x64_Template/Lib/zipfile/__init__.py @@ -0,0 +1,2454 @@ +""" +Read and write ZIP files. + +XXX references to utf-8 need further investigation. +""" +import binascii +import importlib.util +import io +import os +import shutil +import stat +import struct +import sys +import threading +import time + +try: + import zlib # We may need its compression method + crc32 = zlib.crc32 +except ImportError: + zlib = None + crc32 = binascii.crc32 + +try: + import bz2 # We may need its compression method +except ImportError: + bz2 = None + +try: + import lzma # We may need its compression method +except ImportError: + lzma = None + +try: + from compression import zstd # We may need its compression method +except ImportError: + zstd = None + +__all__ = ["BadZipFile", "BadZipfile", "error", + "ZIP_STORED", "ZIP_DEFLATED", "ZIP_BZIP2", "ZIP_LZMA", + "ZIP_ZSTANDARD", "is_zipfile", "ZipInfo", "ZipFile", "PyZipFile", + "LargeZipFile", "Path"] + +class BadZipFile(Exception): + pass + + +class LargeZipFile(Exception): + """ + Raised when writing a zipfile, the zipfile requires ZIP64 extensions + and those extensions are disabled. + """ + +error = BadZipfile = BadZipFile # Pre-3.2 compatibility names + + +ZIP64_LIMIT = (1 << 31) - 1 +ZIP_FILECOUNT_LIMIT = (1 << 16) - 1 +ZIP_MAX_COMMENT = (1 << 16) - 1 + +# constants for Zip file compression methods +ZIP_STORED = 0 +ZIP_DEFLATED = 8 +ZIP_BZIP2 = 12 +ZIP_LZMA = 14 +ZIP_ZSTANDARD = 93 +# Other ZIP compression methods not supported + +DEFAULT_VERSION = 20 +ZIP64_VERSION = 45 +BZIP2_VERSION = 46 +LZMA_VERSION = 63 +ZSTANDARD_VERSION = 63 +# we recognize (but not necessarily support) all features up to that version +MAX_EXTRACT_VERSION = 63 + +# Below are some formats and associated data for reading/writing headers using +# the struct module. The names and structures of headers/records are those used +# in the PKWARE description of the ZIP file format: +# http://www.pkware.com/documents/casestudies/APPNOTE.TXT +# (URL valid as of January 2008) + +# The "end of central directory" structure, magic number, size, and indices +# (section V.I in the format document) +structEndArchive = b"<4s4H2LH" +stringEndArchive = b"PK\005\006" +sizeEndCentDir = struct.calcsize(structEndArchive) + +_ECD_SIGNATURE = 0 +_ECD_DISK_NUMBER = 1 +_ECD_DISK_START = 2 +_ECD_ENTRIES_THIS_DISK = 3 +_ECD_ENTRIES_TOTAL = 4 +_ECD_SIZE = 5 +_ECD_OFFSET = 6 +_ECD_COMMENT_SIZE = 7 +# These last two indices are not part of the structure as defined in the +# spec, but they are used internally by this module as a convenience +_ECD_COMMENT = 8 +_ECD_LOCATION = 9 + +# The "central directory" structure, magic number, size, and indices +# of entries in the structure (section V.F in the format document) +structCentralDir = "<4s4B4HL2L5H2L" +stringCentralDir = b"PK\001\002" +sizeCentralDir = struct.calcsize(structCentralDir) + +# indexes of entries in the central directory structure +_CD_SIGNATURE = 0 +_CD_CREATE_VERSION = 1 +_CD_CREATE_SYSTEM = 2 +_CD_EXTRACT_VERSION = 3 +_CD_EXTRACT_SYSTEM = 4 +_CD_FLAG_BITS = 5 +_CD_COMPRESS_TYPE = 6 +_CD_TIME = 7 +_CD_DATE = 8 +_CD_CRC = 9 +_CD_COMPRESSED_SIZE = 10 +_CD_UNCOMPRESSED_SIZE = 11 +_CD_FILENAME_LENGTH = 12 +_CD_EXTRA_FIELD_LENGTH = 13 +_CD_COMMENT_LENGTH = 14 +_CD_DISK_NUMBER_START = 15 +_CD_INTERNAL_FILE_ATTRIBUTES = 16 +_CD_EXTERNAL_FILE_ATTRIBUTES = 17 +_CD_LOCAL_HEADER_OFFSET = 18 + +# General purpose bit flags +# Zip Appnote: 4.4.4 general purpose bit flag: (2 bytes) +_MASK_ENCRYPTED = 1 << 0 +# Bits 1 and 2 have different meanings depending on the compression used. +_MASK_COMPRESS_OPTION_1 = 1 << 1 +# _MASK_COMPRESS_OPTION_2 = 1 << 2 +# _MASK_USE_DATA_DESCRIPTOR: If set, crc-32, compressed size and uncompressed +# size are zero in the local header and the real values are written in the data +# descriptor immediately following the compressed data. +_MASK_USE_DATA_DESCRIPTOR = 1 << 3 +# Bit 4: Reserved for use with compression method 8, for enhanced deflating. +# _MASK_RESERVED_BIT_4 = 1 << 4 +_MASK_COMPRESSED_PATCH = 1 << 5 +_MASK_STRONG_ENCRYPTION = 1 << 6 +# _MASK_UNUSED_BIT_7 = 1 << 7 +# _MASK_UNUSED_BIT_8 = 1 << 8 +# _MASK_UNUSED_BIT_9 = 1 << 9 +# _MASK_UNUSED_BIT_10 = 1 << 10 +_MASK_UTF_FILENAME = 1 << 11 +# Bit 12: Reserved by PKWARE for enhanced compression. +# _MASK_RESERVED_BIT_12 = 1 << 12 +# _MASK_ENCRYPTED_CENTRAL_DIR = 1 << 13 +# Bit 14, 15: Reserved by PKWARE +# _MASK_RESERVED_BIT_14 = 1 << 14 +# _MASK_RESERVED_BIT_15 = 1 << 15 + +# The "local file header" structure, magic number, size, and indices +# (section V.A in the format document) +structFileHeader = "<4s2B4HL2L2H" +stringFileHeader = b"PK\003\004" +sizeFileHeader = struct.calcsize(structFileHeader) + +_FH_SIGNATURE = 0 +_FH_EXTRACT_VERSION = 1 +_FH_EXTRACT_SYSTEM = 2 +_FH_GENERAL_PURPOSE_FLAG_BITS = 3 +_FH_COMPRESSION_METHOD = 4 +_FH_LAST_MOD_TIME = 5 +_FH_LAST_MOD_DATE = 6 +_FH_CRC = 7 +_FH_COMPRESSED_SIZE = 8 +_FH_UNCOMPRESSED_SIZE = 9 +_FH_FILENAME_LENGTH = 10 +_FH_EXTRA_FIELD_LENGTH = 11 + +# The "Zip64 end of central directory locator" structure, magic number, and size +structEndArchive64Locator = "<4sLQL" +stringEndArchive64Locator = b"PK\x06\x07" +sizeEndCentDir64Locator = struct.calcsize(structEndArchive64Locator) + +# The "Zip64 end of central directory" record, magic number, size, and indices +# (section V.G in the format document) +structEndArchive64 = "<4sQ2H2L4Q" +stringEndArchive64 = b"PK\x06\x06" +sizeEndCentDir64 = struct.calcsize(structEndArchive64) + +_CD64_SIGNATURE = 0 +_CD64_DIRECTORY_RECSIZE = 1 +_CD64_CREATE_VERSION = 2 +_CD64_EXTRACT_VERSION = 3 +_CD64_DISK_NUMBER = 4 +_CD64_DISK_NUMBER_START = 5 +_CD64_NUMBER_ENTRIES_THIS_DISK = 6 +_CD64_NUMBER_ENTRIES_TOTAL = 7 +_CD64_DIRECTORY_SIZE = 8 +_CD64_OFFSET_START_CENTDIR = 9 + +_DD_SIGNATURE = 0x08074b50 + + +class _Extra(bytes): + FIELD_STRUCT = struct.Struct('= sizeCentralDir: + data = fp.read(sizeCentralDir) # CD is where we expect it to be + if len(data) == sizeCentralDir: + centdir = struct.unpack(structCentralDir, data) # CD is the right size + if centdir[_CD_SIGNATURE] == stringCentralDir: + return True # First central directory entry has correct magic number + except OSError: + pass + return False + +def is_zipfile(filename): + """Quickly see if a file is a ZIP file by checking the magic number. + + The filename argument may be a file or file-like object too. + """ + result = False + try: + if hasattr(filename, "read"): + pos = filename.tell() + result = _check_zipfile(fp=filename) + filename.seek(pos) + else: + with open(filename, "rb") as fp: + result = _check_zipfile(fp) + except (OSError, BadZipFile): + pass + return result + +def _handle_prepended_data(endrec, debug=0): + size_cd = endrec[_ECD_SIZE] # bytes in central directory + offset_cd = endrec[_ECD_OFFSET] # offset of central directory + + # "concat" is zero, unless zip was concatenated to another file + concat = endrec[_ECD_LOCATION] - size_cd - offset_cd + + if debug > 2: + inferred = concat + offset_cd + print("given, inferred, offset", offset_cd, inferred, concat) + + return offset_cd, concat + +def _EndRecData64(fpin, offset, endrec): + """ + Read the ZIP64 end-of-archive records and use that to update endrec + """ + offset -= sizeEndCentDir64Locator + if offset < 0: + # The file is not large enough to contain a ZIP64 + # end-of-archive record, so just return the end record we were given. + return endrec + fpin.seek(offset) + data = fpin.read(sizeEndCentDir64Locator) + if len(data) != sizeEndCentDir64Locator: + raise OSError("Unknown I/O error") + sig, diskno, reloff, disks = struct.unpack(structEndArchive64Locator, data) + if sig != stringEndArchive64Locator: + return endrec + + if diskno != 0 or disks > 1: + raise BadZipFile("zipfiles that span multiple disks are not supported") + + offset -= sizeEndCentDir64 + if reloff > offset: + raise BadZipFile("Corrupt zip64 end of central directory locator") + # First, check the assumption that there is no prepended data. + fpin.seek(reloff) + extrasz = offset - reloff + data = fpin.read(sizeEndCentDir64) + if len(data) != sizeEndCentDir64: + raise OSError("Unknown I/O error") + if not data.startswith(stringEndArchive64) and reloff != offset: + # Since we already have seen the Zip64 EOCD Locator, it's + # possible we got here because there is prepended data. + # Assume no 'zip64 extensible data' + fpin.seek(offset) + extrasz = 0 + data = fpin.read(sizeEndCentDir64) + if len(data) != sizeEndCentDir64: + raise OSError("Unknown I/O error") + if not data.startswith(stringEndArchive64): + raise BadZipFile("Zip64 end of central directory record not found") + + sig, sz, create_version, read_version, disk_num, disk_dir, \ + dircount, dircount2, dirsize, diroffset = \ + struct.unpack(structEndArchive64, data) + if (diroffset + dirsize != reloff or + sz + 12 != sizeEndCentDir64 + extrasz): + raise BadZipFile("Corrupt zip64 end of central directory record") + + # Update the original endrec using data from the ZIP64 record + endrec[_ECD_SIGNATURE] = sig + endrec[_ECD_DISK_NUMBER] = disk_num + endrec[_ECD_DISK_START] = disk_dir + endrec[_ECD_ENTRIES_THIS_DISK] = dircount + endrec[_ECD_ENTRIES_TOTAL] = dircount2 + endrec[_ECD_SIZE] = dirsize + endrec[_ECD_OFFSET] = diroffset + endrec[_ECD_LOCATION] = offset - extrasz + return endrec + + +def _EndRecData(fpin): + """Return data from the "End of Central Directory" record, or None. + + The data is a list of the nine items in the ZIP "End of central dir" + record followed by a tenth item, the file seek offset of this record.""" + + # Determine file size + fpin.seek(0, 2) + filesize = fpin.tell() + + # Check to see if this is ZIP file with no archive comment (the + # "end of central directory" structure should be the last item in the + # file if this is the case). + try: + fpin.seek(-sizeEndCentDir, 2) + except OSError: + return None + data = fpin.read(sizeEndCentDir) + if (len(data) == sizeEndCentDir and + data[0:4] == stringEndArchive and + data[-2:] == b"\000\000"): + # the signature is correct and there's no comment, unpack structure + endrec = struct.unpack(structEndArchive, data) + endrec=list(endrec) + + # Append a blank comment and record start offset + endrec.append(b"") + endrec.append(filesize - sizeEndCentDir) + + # Try to read the "Zip64 end of central directory" structure + return _EndRecData64(fpin, filesize - sizeEndCentDir, endrec) + + # Either this is not a ZIP file, or it is a ZIP file with an archive + # comment. Search the end of the file for the "end of central directory" + # record signature. The comment is the last item in the ZIP file and may be + # up to 64K long. It is assumed that the "end of central directory" magic + # number does not appear in the comment. + maxCommentStart = max(filesize - ZIP_MAX_COMMENT - sizeEndCentDir, 0) + fpin.seek(maxCommentStart, 0) + data = fpin.read(ZIP_MAX_COMMENT + sizeEndCentDir) + start = data.rfind(stringEndArchive) + if start >= 0: + # found the magic number; attempt to unpack and interpret + recData = data[start:start+sizeEndCentDir] + if len(recData) != sizeEndCentDir: + # Zip file is corrupted. + return None + endrec = list(struct.unpack(structEndArchive, recData)) + commentSize = endrec[_ECD_COMMENT_SIZE] #as claimed by the zip file + comment = data[start+sizeEndCentDir:start+sizeEndCentDir+commentSize] + endrec.append(comment) + endrec.append(maxCommentStart + start) + + # Try to read the "Zip64 end of central directory" structure + return _EndRecData64(fpin, maxCommentStart + start, endrec) + + # Unable to find a valid end of central directory structure + return None + +def _sanitize_filename(filename): + """Terminate the file name at the first null byte and + ensure paths always use forward slashes as the directory separator.""" + + # Terminate the file name at the first null byte. Null bytes in file + # names are used as tricks by viruses in archives. + null_byte = filename.find(chr(0)) + if null_byte >= 0: + filename = filename[0:null_byte] + # This is used to ensure paths in generated ZIP files always use + # forward slashes as the directory separator, as required by the + # ZIP format specification. + if os.sep != "/" and os.sep in filename: + filename = filename.replace(os.sep, "/") + if os.altsep and os.altsep != "/" and os.altsep in filename: + filename = filename.replace(os.altsep, "/") + return filename + + +class ZipInfo: + """Class with attributes describing each file in the ZIP archive.""" + + __slots__ = ( + 'orig_filename', + 'filename', + 'date_time', + 'compress_type', + 'compress_level', + 'comment', + 'extra', + 'create_system', + 'create_version', + 'extract_version', + 'reserved', + 'flag_bits', + 'volume', + 'internal_attr', + 'external_attr', + 'header_offset', + 'CRC', + 'compress_size', + 'file_size', + '_raw_time', + '_end_offset', + ) + + def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): + self.orig_filename = filename # Original file name in archive + + # Terminate the file name at the first null byte and + # ensure paths always use forward slashes as the directory separator. + filename = _sanitize_filename(filename) + + self.filename = filename # Normalized file name + self.date_time = date_time # year, month, day, hour, min, sec + + if date_time[0] < 1980: + raise ValueError('ZIP does not support timestamps before 1980') + + # Standard values: + self.compress_type = ZIP_STORED # Type of compression for the file + self.compress_level = None # Level for the compressor + self.comment = b"" # Comment for each file + self.extra = b"" # ZIP extra data + if sys.platform == 'win32': + self.create_system = 0 # System which created ZIP archive + else: + # Assume everything else is unix-y + self.create_system = 3 # System which created ZIP archive + self.create_version = DEFAULT_VERSION # Version which created ZIP archive + self.extract_version = DEFAULT_VERSION # Version needed to extract archive + self.reserved = 0 # Must be zero + self.flag_bits = 0 # ZIP flag bits + self.volume = 0 # Volume number of file header + self.internal_attr = 0 # Internal attributes + self.external_attr = 0 # External file attributes + self.compress_size = 0 # Size of the compressed file + self.file_size = 0 # Size of the uncompressed file + self._end_offset = None # Start of the next local header or central directory + # Other attributes are set by class ZipFile: + # header_offset Byte offset to the file header + # CRC CRC-32 of the uncompressed file + + # Maintain backward compatibility with the old protected attribute name. + @property + def _compresslevel(self): + return self.compress_level + + @_compresslevel.setter + def _compresslevel(self, value): + self.compress_level = value + + def __repr__(self): + result = ['<%s filename=%r' % (self.__class__.__name__, self.filename)] + if self.compress_type != ZIP_STORED: + result.append(' compress_type=%s' % + compressor_names.get(self.compress_type, + self.compress_type)) + hi = self.external_attr >> 16 + lo = self.external_attr & 0xFFFF + if hi: + result.append(' filemode=%r' % stat.filemode(hi)) + if lo: + result.append(' external_attr=%#x' % lo) + isdir = self.is_dir() + if not isdir or self.file_size: + result.append(' file_size=%r' % self.file_size) + if ((not isdir or self.compress_size) and + (self.compress_type != ZIP_STORED or + self.file_size != self.compress_size)): + result.append(' compress_size=%r' % self.compress_size) + result.append('>') + return ''.join(result) + + def FileHeader(self, zip64=None): + """Return the per-file header as a bytes object. + + When the optional zip64 arg is None rather than a bool, we will + decide based upon the file_size and compress_size, if known, + False otherwise. + """ + dt = self.date_time + dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] + dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2) + if self.flag_bits & _MASK_USE_DATA_DESCRIPTOR: + # Set these to zero because we write them after the file data + CRC = compress_size = file_size = 0 + else: + CRC = self.CRC + compress_size = self.compress_size + file_size = self.file_size + + extra = self.extra + + min_version = 0 + if zip64 is None: + # We always explicitly pass zip64 within this module.... This + # remains for anyone using ZipInfo.FileHeader as a public API. + zip64 = file_size > ZIP64_LIMIT or compress_size > ZIP64_LIMIT + if zip64: + fmt = '= 4: + tp, ln = unpack(' len(extra): + raise BadZipFile("Corrupt extra field %04x (size=%d)" % (tp, ln)) + if tp == 0x0001: + data = extra[4:ln+4] + # ZIP64 extension (large files and/or large archives) + try: + if self.file_size in (0xFFFF_FFFF_FFFF_FFFF, 0xFFFF_FFFF): + field = "File size" + self.file_size, = unpack(' 2107: + date_time = (2107, 12, 31, 23, 59, 59) + # Create ZipInfo instance to store file information + if arcname is None: + arcname = filename + arcname = os.path.normpath(os.path.splitdrive(arcname)[1]) + while arcname[0] in (os.sep, os.altsep): + arcname = arcname[1:] + if isdir: + arcname += '/' + zinfo = cls(arcname, date_time) + zinfo.external_attr = (st.st_mode & 0xFFFF) << 16 # Unix attributes + if isdir: + zinfo.file_size = 0 + zinfo.external_attr |= 0x10 # MS-DOS directory flag + else: + zinfo.file_size = st.st_size + + return zinfo + + def _for_archive(self, archive): + """Resolve suitable defaults from the archive. + + Resolve the date_time, compression attributes, and external attributes + to suitable defaults as used by :method:`ZipFile.writestr`. + + Return self. + """ + # gh-91279: Set the SOURCE_DATE_EPOCH to a specific timestamp + source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH') + + if source_date_epoch: + self.date_time = time.gmtime(int(source_date_epoch))[:6] + else: + self.date_time = time.localtime(time.time())[:6] + + self.compress_type = archive.compression + self.compress_level = archive.compresslevel + if self.filename.endswith('/'): # pragma: no cover + self.external_attr = 0o40775 << 16 # drwxrwxr-x + self.external_attr |= 0x10 # MS-DOS directory flag + else: + self.external_attr = 0o600 << 16 # ?rw------- + return self + + def is_dir(self): + """Return True if this archive member is a directory.""" + if self.filename.endswith('/'): + return True + # The ZIP format specification requires to use forward slashes + # as the directory separator, but in practice some ZIP files + # created on Windows can use backward slashes. For compatibility + # with the extraction code which already handles this: + if os.path.altsep: + return self.filename.endswith((os.path.sep, os.path.altsep)) + return False + + +# ZIP encryption uses the CRC32 one-byte primitive for scrambling some +# internal keys. We noticed that a direct implementation is faster than +# relying on binascii.crc32(). + +_crctable = None +def _gen_crc(crc): + for j in range(8): + if crc & 1: + crc = (crc >> 1) ^ 0xEDB88320 + else: + crc >>= 1 + return crc + +# ZIP supports a password-based form of encryption. Even though known +# plaintext attacks have been found against it, it is still useful +# to be able to get data out of such a file. +# +# Usage: +# zd = _ZipDecrypter(mypwd) +# plain_bytes = zd(cypher_bytes) + +def _ZipDecrypter(pwd): + key0 = 305419896 + key1 = 591751049 + key2 = 878082192 + + global _crctable + if _crctable is None: + _crctable = list(map(_gen_crc, range(256))) + crctable = _crctable + + def crc32(ch, crc): + """Compute the CRC32 primitive on one byte.""" + return (crc >> 8) ^ crctable[(crc ^ ch) & 0xFF] + + def update_keys(c): + nonlocal key0, key1, key2 + key0 = crc32(c, key0) + key1 = (key1 + (key0 & 0xFF)) & 0xFFFFFFFF + key1 = (key1 * 134775813 + 1) & 0xFFFFFFFF + key2 = crc32(key1 >> 24, key2) + + for p in pwd: + update_keys(p) + + def decrypter(data): + """Decrypt a bytes object.""" + result = bytearray() + append = result.append + for c in data: + k = key2 | 2 + c ^= ((k * (k^1)) >> 8) & 0xFF + update_keys(c) + append(c) + return bytes(result) + + return decrypter + + +class LZMACompressor: + + def __init__(self): + self._comp = None + + def _init(self): + props = lzma._encode_filter_properties({'id': lzma.FILTER_LZMA1}) + self._comp = lzma.LZMACompressor(lzma.FORMAT_RAW, filters=[ + lzma._decode_filter_properties(lzma.FILTER_LZMA1, props) + ]) + return struct.pack('> 8) & 0xff + else: + # compare against the CRC otherwise + check_byte = (zipinfo.CRC >> 24) & 0xff + h = self._init_decrypter() + if h != check_byte: + raise RuntimeError("Bad password for file %r" % zipinfo.orig_filename) + + + def _init_decrypter(self): + self._decrypter = _ZipDecrypter(self._pwd) + # The first 12 bytes in the cypher stream is an encryption header + # used to strengthen the algorithm. The first 11 bytes are + # completely random, while the 12th contains the MSB of the CRC, + # or the MSB of the file time depending on the header type + # and is used to check the correctness of the password. + header = self._fileobj.read(12) + self._compress_left -= 12 + return self._decrypter(header)[11] + + def __repr__(self): + result = ['<%s.%s' % (self.__class__.__module__, + self.__class__.__qualname__)] + if not self.closed: + result.append(' name=%r' % (self.name,)) + if self._compress_type != ZIP_STORED: + result.append(' compress_type=%s' % + compressor_names.get(self._compress_type, + self._compress_type)) + else: + result.append(' [closed]') + result.append('>') + return ''.join(result) + + def readline(self, limit=-1): + """Read and return a line from the stream. + + If limit is specified, at most limit bytes will be read. + """ + + if limit < 0: + # Shortcut common case - newline found in buffer. + i = self._readbuffer.find(b'\n', self._offset) + 1 + if i > 0: + line = self._readbuffer[self._offset: i] + self._offset = i + return line + + return io.BufferedIOBase.readline(self, limit) + + def peek(self, n=1): + """Returns buffered bytes without advancing the position.""" + if n > len(self._readbuffer) - self._offset: + chunk = self.read(n) + if len(chunk) > self._offset: + self._readbuffer = chunk + self._readbuffer[self._offset:] + self._offset = 0 + else: + self._offset -= len(chunk) + + # Return up to 512 bytes to reduce allocation overhead for tight loops. + return self._readbuffer[self._offset: self._offset + 512] + + def readable(self): + if self.closed: + raise ValueError("I/O operation on closed file.") + return True + + def read(self, n=-1): + """Read and return up to n bytes. + If the argument is omitted, None, or negative, data is read and returned until EOF is reached. + """ + if self.closed: + raise ValueError("read from closed file.") + if n is None or n < 0: + buf = self._readbuffer[self._offset:] + self._readbuffer = b'' + self._offset = 0 + while not self._eof: + buf += self._read1(self.MAX_N) + return buf + + end = n + self._offset + if end < len(self._readbuffer): + buf = self._readbuffer[self._offset:end] + self._offset = end + return buf + + n = end - len(self._readbuffer) + buf = self._readbuffer[self._offset:] + self._readbuffer = b'' + self._offset = 0 + while n > 0 and not self._eof: + data = self._read1(n) + if n < len(data): + self._readbuffer = data + self._offset = n + buf += data[:n] + break + buf += data + n -= len(data) + return buf + + def _update_crc(self, newdata): + # Update the CRC using the given data. + if self._expected_crc is None: + # No need to compute the CRC if we don't have a reference value + return + self._running_crc = crc32(newdata, self._running_crc) + # Check the CRC if we're at the end of the file + if self._eof and self._running_crc != self._expected_crc: + raise BadZipFile("Bad CRC-32 for file %r" % self.name) + + def read1(self, n): + """Read up to n bytes with at most one read() system call.""" + + if n is None or n < 0: + buf = self._readbuffer[self._offset:] + self._readbuffer = b'' + self._offset = 0 + while not self._eof: + data = self._read1(self.MAX_N) + if data: + buf += data + break + return buf + + end = n + self._offset + if end < len(self._readbuffer): + buf = self._readbuffer[self._offset:end] + self._offset = end + return buf + + n = end - len(self._readbuffer) + buf = self._readbuffer[self._offset:] + self._readbuffer = b'' + self._offset = 0 + if n > 0: + while not self._eof: + data = self._read1(n) + if n < len(data): + self._readbuffer = data + self._offset = n + buf += data[:n] + break + if data: + buf += data + break + return buf + + def _read1(self, n): + # Read up to n compressed bytes with at most one read() system call, + # decrypt and decompress them. + if self._eof or n <= 0: + return b'' + + # Read from file. + if self._compress_type == ZIP_DEFLATED: + ## Handle unconsumed data. + data = self._decompressor.unconsumed_tail + if n > len(data): + data += self._read2(n - len(data)) + else: + data = self._read2(n) + + if self._compress_type == ZIP_STORED: + self._eof = self._compress_left <= 0 + elif self._compress_type == ZIP_DEFLATED: + n = max(n, self.MIN_READ_SIZE) + data = self._decompressor.decompress(data, n) + self._eof = (self._decompressor.eof or + self._compress_left <= 0 and + not self._decompressor.unconsumed_tail) + if self._eof: + data += self._decompressor.flush() + else: + data = self._decompressor.decompress(data) + self._eof = self._decompressor.eof or self._compress_left <= 0 + + data = data[:self._left] + self._left -= len(data) + if self._left <= 0: + self._eof = True + self._update_crc(data) + return data + + def _read2(self, n): + if self._compress_left <= 0: + return b'' + + n = max(n, self.MIN_READ_SIZE) + n = min(n, self._compress_left) + + data = self._fileobj.read(n) + self._compress_left -= len(data) + if not data: + raise EOFError + + if self._decrypter is not None: + data = self._decrypter(data) + return data + + def close(self): + try: + if self._close_fileobj: + self._fileobj.close() + finally: + super().close() + + def seekable(self): + if self.closed: + raise ValueError("I/O operation on closed file.") + return self._seekable + + def seek(self, offset, whence=os.SEEK_SET): + if self.closed: + raise ValueError("seek on closed file.") + if not self._seekable: + raise io.UnsupportedOperation("underlying stream is not seekable") + curr_pos = self.tell() + if whence == os.SEEK_SET: + new_pos = offset + elif whence == os.SEEK_CUR: + new_pos = curr_pos + offset + elif whence == os.SEEK_END: + new_pos = self._orig_file_size + offset + else: + raise ValueError("whence must be os.SEEK_SET (0), " + "os.SEEK_CUR (1), or os.SEEK_END (2)") + + if new_pos > self._orig_file_size: + new_pos = self._orig_file_size + + if new_pos < 0: + new_pos = 0 + + read_offset = new_pos - curr_pos + buff_offset = read_offset + self._offset + + if buff_offset >= 0 and buff_offset < len(self._readbuffer): + # Just move the _offset index if the new position is in the _readbuffer + self._offset = buff_offset + read_offset = 0 + # Fast seek uncompressed unencrypted file + elif self._compress_type == ZIP_STORED and self._decrypter is None and read_offset != 0: + # disable CRC checking after first seeking - it would be invalid + self._expected_crc = None + # seek actual file taking already buffered data into account + read_offset -= len(self._readbuffer) - self._offset + self._fileobj.seek(read_offset, os.SEEK_CUR) + self._left -= read_offset + self._compress_left -= read_offset + self._eof = self._left <= 0 + read_offset = 0 + # flush read buffer + self._readbuffer = b'' + self._offset = 0 + elif read_offset < 0: + # Position is before the current position. Reset the ZipExtFile + self._fileobj.seek(self._orig_compress_start) + self._running_crc = self._orig_start_crc + self._expected_crc = self._orig_crc + self._compress_left = self._orig_compress_size + self._left = self._orig_file_size + self._readbuffer = b'' + self._offset = 0 + self._decompressor = _get_decompressor(self._compress_type) + self._eof = False + read_offset = new_pos + if self._decrypter is not None: + self._init_decrypter() + + while read_offset > 0: + read_len = min(self.MAX_SEEK_READ, read_offset) + self.read(read_len) + read_offset -= read_len + + return self.tell() + + def tell(self): + if self.closed: + raise ValueError("tell on closed file.") + if not self._seekable: + raise io.UnsupportedOperation("underlying stream is not seekable") + filepos = self._orig_file_size - self._left - len(self._readbuffer) + self._offset + return filepos + + +class _ZipWriteFile(io.BufferedIOBase): + def __init__(self, zf, zinfo, zip64): + self._zinfo = zinfo + self._zip64 = zip64 + self._zipfile = zf + self._compressor = _get_compressor(zinfo.compress_type, + zinfo.compress_level) + self._file_size = 0 + self._compress_size = 0 + self._crc = 0 + + @property + def _fileobj(self): + return self._zipfile.fp + + @property + def name(self): + return self._zinfo.filename + + @property + def mode(self): + return 'wb' + + def writable(self): + return True + + def write(self, data): + if self.closed: + raise ValueError('I/O operation on closed file.') + + # Accept any data that supports the buffer protocol + if isinstance(data, (bytes, bytearray)): + nbytes = len(data) + else: + data = memoryview(data) + nbytes = data.nbytes + self._file_size += nbytes + + self._crc = crc32(data, self._crc) + if self._compressor: + data = self._compressor.compress(data) + self._compress_size += len(data) + self._fileobj.write(data) + return nbytes + + def close(self): + if self.closed: + return + try: + super().close() + # Flush any data from the compressor, and update header info + if self._compressor: + buf = self._compressor.flush() + self._compress_size += len(buf) + self._fileobj.write(buf) + self._zinfo.compress_size = self._compress_size + else: + self._zinfo.compress_size = self._file_size + self._zinfo.CRC = self._crc + self._zinfo.file_size = self._file_size + + if not self._zip64: + if self._file_size > ZIP64_LIMIT: + raise RuntimeError("File size too large, try using force_zip64") + if self._compress_size > ZIP64_LIMIT: + raise RuntimeError("Compressed size too large, try using force_zip64") + + # Write updated header info + if self._zinfo.flag_bits & _MASK_USE_DATA_DESCRIPTOR: + # Write CRC and file sizes after the file data + fmt = '') + return ''.join(result) + + def _RealGetContents(self): + """Read in the table of contents for the ZIP file.""" + fp = self.fp + try: + endrec = _EndRecData(fp) + except OSError: + raise BadZipFile("File is not a zip file") + if not endrec: + raise BadZipFile("File is not a zip file") + if self.debug > 1: + print(endrec) + self._comment = endrec[_ECD_COMMENT] # archive comment + + offset_cd, concat = _handle_prepended_data(endrec, self.debug) + + # self.start_dir: Position of start of central directory + self.start_dir = offset_cd + concat + + if self.start_dir < 0: + raise BadZipFile("Bad offset for central directory") + fp.seek(self.start_dir, 0) + size_cd = endrec[_ECD_SIZE] + data = fp.read(size_cd) + fp = io.BytesIO(data) + total = 0 + while total < size_cd: + centdir = fp.read(sizeCentralDir) + if len(centdir) != sizeCentralDir: + raise BadZipFile("Truncated central directory") + centdir = struct.unpack(structCentralDir, centdir) + if centdir[_CD_SIGNATURE] != stringCentralDir: + raise BadZipFile("Bad magic number for central directory") + if self.debug > 2: + print(centdir) + filename = fp.read(centdir[_CD_FILENAME_LENGTH]) + orig_filename_crc = crc32(filename) + flags = centdir[_CD_FLAG_BITS] + if flags & _MASK_UTF_FILENAME: + # UTF-8 file names extension + filename = filename.decode('utf-8') + else: + # Historical ZIP filename encoding + filename = filename.decode(self.metadata_encoding or 'cp437') + # Create ZipInfo instance to store file information + x = ZipInfo(filename) + x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH]) + x.comment = fp.read(centdir[_CD_COMMENT_LENGTH]) + x.header_offset = centdir[_CD_LOCAL_HEADER_OFFSET] + (x.create_version, x.create_system, x.extract_version, x.reserved, + x.flag_bits, x.compress_type, t, d, + x.CRC, x.compress_size, x.file_size) = centdir[1:12] + if x.extract_version > MAX_EXTRACT_VERSION: + raise NotImplementedError("zip file version %.1f" % + (x.extract_version / 10)) + x.volume, x.internal_attr, x.external_attr = centdir[15:18] + # Convert date/time code to (year, month, day, hour, min, sec) + x._raw_time = t + x.date_time = ( (d>>9)+1980, (d>>5)&0xF, d&0x1F, + t>>11, (t>>5)&0x3F, (t&0x1F) * 2 ) + x._decodeExtra(orig_filename_crc) + x.header_offset = x.header_offset + concat + self.filelist.append(x) + self.NameToInfo[x.filename] = x + + # update total bytes read from central directory + total = (total + sizeCentralDir + centdir[_CD_FILENAME_LENGTH] + + centdir[_CD_EXTRA_FIELD_LENGTH] + + centdir[_CD_COMMENT_LENGTH]) + + if self.debug > 2: + print("total", total) + + end_offset = self.start_dir + for zinfo in reversed(sorted(self.filelist, + key=lambda zinfo: zinfo.header_offset)): + zinfo._end_offset = end_offset + end_offset = zinfo.header_offset + + def namelist(self): + """Return a list of file names in the archive.""" + return [data.filename for data in self.filelist] + + def infolist(self): + """Return a list of class ZipInfo instances for files in the + archive.""" + return self.filelist + + def printdir(self, file=None): + """Print a table of contents for the zip file.""" + print("%-46s %19s %12s" % ("File Name", "Modified ", "Size"), + file=file) + for zinfo in self.filelist: + date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time[:6] + print("%-46s %s %12d" % (zinfo.filename, date, zinfo.file_size), + file=file) + + def testzip(self): + """Read all the files and check the CRC. + + Return None if all files could be read successfully, or the name + of the offending file otherwise.""" + chunk_size = 2 ** 20 + for zinfo in self.filelist: + try: + # Read by chunks, to avoid an OverflowError or a + # MemoryError with very large embedded files. + with self.open(zinfo.filename, "r") as f: + while f.read(chunk_size): # Check CRC-32 + pass + except BadZipFile: + return zinfo.filename + + def getinfo(self, name): + """Return the instance of ZipInfo given 'name'.""" + info = self.NameToInfo.get(name) + if info is None: + raise KeyError( + 'There is no item named %r in the archive' % name) + + return info + + def setpassword(self, pwd): + """Set default password for encrypted files.""" + if pwd and not isinstance(pwd, bytes): + raise TypeError("pwd: expected bytes, got %s" % type(pwd).__name__) + if pwd: + self.pwd = pwd + else: + self.pwd = None + + @property + def comment(self): + """The comment text associated with the ZIP file.""" + return self._comment + + @comment.setter + def comment(self, comment): + if not isinstance(comment, bytes): + raise TypeError("comment: expected bytes, got %s" % type(comment).__name__) + # check for valid comment length + if len(comment) > ZIP_MAX_COMMENT: + import warnings + warnings.warn('Archive comment is too long; truncating to %d bytes' + % ZIP_MAX_COMMENT, stacklevel=2) + comment = comment[:ZIP_MAX_COMMENT] + self._comment = comment + self._didModify = True + + def read(self, name, pwd=None): + """Return file bytes for name. 'pwd' is the password to decrypt + encrypted files.""" + with self.open(name, "r", pwd) as fp: + return fp.read() + + def open(self, name, mode="r", pwd=None, *, force_zip64=False): + """Return file-like object for 'name'. + + name is a string for the file name within the ZIP file, or a ZipInfo + object. + + mode should be 'r' to read a file already in the ZIP file, or 'w' to + write to a file newly added to the archive. + + pwd is the password to decrypt files (only used for reading). + + When writing, if the file size is not known in advance but may + exceed 2 GiB, pass force_zip64 to use the ZIP64 format, which can + handle large files. If the size is known in advance, it is best to + pass a ZipInfo instance for name, with zinfo.file_size set. + """ + if mode not in {"r", "w"}: + raise ValueError('open() requires mode "r" or "w"') + if pwd and (mode == "w"): + raise ValueError("pwd is only supported for reading files") + if not self.fp: + raise ValueError( + "Attempt to use ZIP archive that was already closed") + + # Make sure we have an info object + if isinstance(name, ZipInfo): + # 'name' is already an info object + zinfo = name + elif mode == 'w': + zinfo = ZipInfo(name) + zinfo.compress_type = self.compression + zinfo.compress_level = self.compresslevel + else: + # Get info object for name + zinfo = self.getinfo(name) + + if mode == 'w': + return self._open_to_write(zinfo, force_zip64=force_zip64) + + if self._writing: + raise ValueError("Can't read from the ZIP file while there " + "is an open writing handle on it. " + "Close the writing handle before trying to read.") + + # Open for reading: + self._fileRefCnt += 1 + zef_file = _SharedFile(self.fp, zinfo.header_offset, + self._fpclose, self._lock, lambda: self._writing) + try: + # Skip the file header: + fheader = zef_file.read(sizeFileHeader) + if len(fheader) != sizeFileHeader: + raise BadZipFile("Truncated file header") + fheader = struct.unpack(structFileHeader, fheader) + if fheader[_FH_SIGNATURE] != stringFileHeader: + raise BadZipFile("Bad magic number for file header") + + fname = zef_file.read(fheader[_FH_FILENAME_LENGTH]) + if fheader[_FH_EXTRA_FIELD_LENGTH]: + zef_file.seek(fheader[_FH_EXTRA_FIELD_LENGTH], whence=1) + + if zinfo.flag_bits & _MASK_COMPRESSED_PATCH: + # Zip 2.7: compressed patched data + raise NotImplementedError("compressed patched data (flag bit 5)") + + if zinfo.flag_bits & _MASK_STRONG_ENCRYPTION: + # strong encryption + raise NotImplementedError("strong encryption (flag bit 6)") + + if fheader[_FH_GENERAL_PURPOSE_FLAG_BITS] & _MASK_UTF_FILENAME: + # UTF-8 filename + fname_str = fname.decode("utf-8") + else: + fname_str = fname.decode(self.metadata_encoding or "cp437") + + if fname_str != zinfo.orig_filename: + raise BadZipFile( + 'File name in directory %r and header %r differ.' + % (zinfo.orig_filename, fname)) + + if (zinfo._end_offset is not None and + zef_file.tell() + zinfo.compress_size > zinfo._end_offset): + if zinfo._end_offset == zinfo.header_offset: + import warnings + warnings.warn( + f"Overlapped entries: {zinfo.orig_filename!r} " + f"(possible zip bomb)", + skip_file_prefixes=(os.path.dirname(__file__),)) + else: + raise BadZipFile( + f"Overlapped entries: {zinfo.orig_filename!r} " + f"(possible zip bomb)") + + # check for encrypted flag & handle password + is_encrypted = zinfo.flag_bits & _MASK_ENCRYPTED + if is_encrypted: + if not pwd: + pwd = self.pwd + if pwd and not isinstance(pwd, bytes): + raise TypeError("pwd: expected bytes, got %s" % type(pwd).__name__) + if not pwd: + raise RuntimeError("File %r is encrypted, password " + "required for extraction" % name) + else: + pwd = None + + return ZipExtFile(zef_file, mode + 'b', zinfo, pwd, True) + except: + zef_file.close() + raise + + def _open_to_write(self, zinfo, force_zip64=False): + if force_zip64 and not self._allowZip64: + raise ValueError( + "force_zip64 is True, but allowZip64 was False when opening " + "the ZIP file." + ) + if self._writing: + raise ValueError("Can't write to the ZIP file while there is " + "another write handle open on it. " + "Close the first handle before opening another.") + + # Size and CRC are overwritten with correct data after processing the file + zinfo.compress_size = 0 + zinfo.CRC = 0 + + zinfo.flag_bits = _MASK_UTF_FILENAME + if zinfo.compress_type == ZIP_LZMA: + # Compressed data includes an end-of-stream (EOS) marker + zinfo.flag_bits |= _MASK_COMPRESS_OPTION_1 + if not self._seekable: + zinfo.flag_bits |= _MASK_USE_DATA_DESCRIPTOR + + if not zinfo.external_attr: + zinfo.external_attr = 0o600 << 16 # permissions: ?rw------- + + # Compressed size can be larger than uncompressed size + zip64 = force_zip64 or (zinfo.file_size * 1.05 > ZIP64_LIMIT) + if not self._allowZip64 and zip64: + raise LargeZipFile("Filesize would require ZIP64 extensions") + + if self._seekable: + self.fp.seek(self.start_dir) + zinfo.header_offset = self.fp.tell() + + self._writecheck(zinfo) + self._didModify = True + + self.fp.write(zinfo.FileHeader(zip64)) + + self._writing = True + return _ZipWriteFile(self, zinfo, zip64) + + def extract(self, member, path=None, pwd=None): + """Extract a member from the archive to the current working directory, + using its full name. Its file information is extracted as accurately + as possible. 'member' may be a filename or a ZipInfo object. You can + specify a different directory using 'path'. You can specify the + password to decrypt the file using 'pwd'. + """ + if path is None: + path = os.getcwd() + else: + path = os.fspath(path) + + return self._extract_member(member, path, pwd) + + def extractall(self, path=None, members=None, pwd=None): + """Extract all members from the archive to the current working + directory. 'path' specifies a different directory to extract to. + 'members' is optional and must be a subset of the list returned + by namelist(). You can specify the password to decrypt all files + using 'pwd'. + """ + if members is None: + members = self.namelist() + + if path is None: + path = os.getcwd() + else: + path = os.fspath(path) + + for zipinfo in members: + self._extract_member(zipinfo, path, pwd) + + @classmethod + def _sanitize_windows_name(cls, arcname, pathsep): + """Replace bad characters and remove trailing dots from parts.""" + table = cls._windows_illegal_name_trans_table + if not table: + illegal = ':<>|"?*' + table = str.maketrans(illegal, '_' * len(illegal)) + cls._windows_illegal_name_trans_table = table + arcname = arcname.translate(table) + # remove trailing dots and spaces + arcname = (x.rstrip(' .') for x in arcname.split(pathsep)) + # rejoin, removing empty parts. + arcname = pathsep.join(x for x in arcname if x) + return arcname + + def _extract_member(self, member, targetpath, pwd): + """Extract the ZipInfo object 'member' to a physical + file on the path targetpath. + """ + if not isinstance(member, ZipInfo): + member = self.getinfo(member) + + # build the destination pathname, replacing + # forward slashes to platform specific separators. + arcname = member.filename + if os.path.sep != '/': + arcname = arcname.replace('/', os.path.sep) + if os.path.altsep and os.path.altsep != '/': + arcname = arcname.replace(os.path.altsep, os.path.sep) + # interpret absolute pathname as relative, remove drive letter or + # UNC path, redundant separators, "." and ".." components. + drive, root, arcname = os.path.splitroot(arcname) + if self._ignore_invalid_names and (drive or root): + return None + if self._ignore_invalid_names and os.path.pardir in arcname.split(os.path.sep): + return None + invalid_path_parts = ('', os.path.curdir, os.path.pardir) + arcname = os.path.sep.join(x for x in arcname.split(os.path.sep) + if x not in invalid_path_parts) + if os.path.sep == '\\': + # filter illegal characters on Windows + arcname2 = self._sanitize_windows_name(arcname, os.path.sep) + if self._ignore_invalid_names and arcname2 != arcname: + return None + arcname = arcname2 + + if not arcname and not member.is_dir(): + if self._ignore_invalid_names: + return None + raise ValueError("Empty filename.") + + targetpath = os.path.join(targetpath, arcname) + targetpath = os.path.normpath(targetpath) + + # Create all upper directories if necessary. + upperdirs = os.path.dirname(targetpath) + if upperdirs and not os.path.exists(upperdirs): + os.makedirs(upperdirs, exist_ok=True) + + if member.is_dir(): + if not os.path.isdir(targetpath): + try: + os.mkdir(targetpath) + except FileExistsError: + if not os.path.isdir(targetpath): + raise + return targetpath + + with self.open(member, pwd=pwd) as source, \ + open(targetpath, "wb") as target: + shutil.copyfileobj(source, target) + + return targetpath + + def _writecheck(self, zinfo): + """Check for errors before writing a file to the archive.""" + if zinfo.filename in self.NameToInfo: + import warnings + warnings.warn('Duplicate name: %r' % zinfo.filename, stacklevel=3) + if self.mode not in ('w', 'x', 'a'): + raise ValueError("write() requires mode 'w', 'x', or 'a'") + if not self.fp: + raise ValueError( + "Attempt to write ZIP archive that was already closed") + _check_compression(zinfo.compress_type) + if not self._allowZip64: + requires_zip64 = None + if len(self.filelist) >= ZIP_FILECOUNT_LIMIT: + requires_zip64 = "Files count" + elif zinfo.file_size > ZIP64_LIMIT: + requires_zip64 = "Filesize" + elif zinfo.header_offset > ZIP64_LIMIT: + requires_zip64 = "Zipfile size" + if requires_zip64: + raise LargeZipFile(requires_zip64 + + " would require ZIP64 extensions") + + def write(self, filename, arcname=None, + compress_type=None, compresslevel=None): + """Put the bytes from filename into the archive under the name + arcname.""" + if not self.fp: + raise ValueError( + "Attempt to write to ZIP archive that was already closed") + if self._writing: + raise ValueError( + "Can't write to ZIP archive while an open writing handle exists" + ) + + zinfo = ZipInfo.from_file(filename, arcname, + strict_timestamps=self._strict_timestamps) + + if zinfo.is_dir(): + zinfo.compress_size = 0 + zinfo.CRC = 0 + self.mkdir(zinfo) + else: + if compress_type is not None: + zinfo.compress_type = compress_type + else: + zinfo.compress_type = self.compression + + if compresslevel is not None: + zinfo.compress_level = compresslevel + else: + zinfo.compress_level = self.compresslevel + + with open(filename, "rb") as src, self.open(zinfo, 'w') as dest: + shutil.copyfileobj(src, dest, 1024*8) + + def writestr(self, zinfo_or_arcname, data, + compress_type=None, compresslevel=None): + """Write a file into the archive. The contents is 'data', which + may be either a 'str' or a 'bytes' instance; if it is a 'str', + it is encoded as UTF-8 first. + 'zinfo_or_arcname' is either a ZipInfo instance or + the name of the file in the archive.""" + if isinstance(data, str): + data = data.encode("utf-8") + if isinstance(zinfo_or_arcname, ZipInfo): + zinfo = zinfo_or_arcname + else: + zinfo = ZipInfo(zinfo_or_arcname)._for_archive(self) + + if not self.fp: + raise ValueError( + "Attempt to write to ZIP archive that was already closed") + if self._writing: + raise ValueError( + "Can't write to ZIP archive while an open writing handle exists." + ) + + if compress_type is not None: + zinfo.compress_type = compress_type + + if compresslevel is not None: + zinfo.compress_level = compresslevel + + zinfo.file_size = len(data) # Uncompressed size + with self._lock: + with self.open(zinfo, mode='w') as dest: + dest.write(data) + + def mkdir(self, zinfo_or_directory_name, mode=511): + """Creates a directory inside the zip archive.""" + if isinstance(zinfo_or_directory_name, ZipInfo): + zinfo = zinfo_or_directory_name + if not zinfo.is_dir(): + raise ValueError("The given ZipInfo does not describe a directory") + elif isinstance(zinfo_or_directory_name, str): + directory_name = zinfo_or_directory_name + if not directory_name.endswith("/"): + directory_name += "/" + zinfo = ZipInfo(directory_name) + zinfo.compress_size = 0 + zinfo.CRC = 0 + zinfo.external_attr = ((0o40000 | mode) & 0xFFFF) << 16 + zinfo.file_size = 0 + zinfo.external_attr |= 0x10 + else: + raise TypeError("Expected type str or ZipInfo") + + with self._lock: + if self._seekable: + self.fp.seek(self.start_dir) + zinfo.header_offset = self.fp.tell() # Start of header bytes + if zinfo.compress_type == ZIP_LZMA: + # Compressed data includes an end-of-stream (EOS) marker + zinfo.flag_bits |= _MASK_COMPRESS_OPTION_1 + + self._writecheck(zinfo) + self._didModify = True + + self.filelist.append(zinfo) + self.NameToInfo[zinfo.filename] = zinfo + self.fp.write(zinfo.FileHeader(False)) + self.start_dir = self.fp.tell() + + def __del__(self): + """Call the "close()" method in case the user forgot.""" + self.close() + + def close(self): + """Close the file, and for mode 'w', 'x' and 'a' write the ending + records.""" + if self.fp is None: + return + + if self._writing: + raise ValueError("Can't close the ZIP file while there is " + "an open writing handle on it. " + "Close the writing handle before closing the zip.") + + try: + if self.mode in ('w', 'x', 'a') and self._didModify: # write ending records + with self._lock: + if self._seekable: + self.fp.seek(self.start_dir) + self._write_end_record() + finally: + fp = self.fp + self.fp = None + self._fpclose(fp) + + def _write_end_record(self): + for zinfo in self.filelist: # write central directory + dt = zinfo.date_time + dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] + dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2) + extra = [] + if zinfo.file_size > ZIP64_LIMIT \ + or zinfo.compress_size > ZIP64_LIMIT: + extra.append(zinfo.file_size) + extra.append(zinfo.compress_size) + file_size = 0xffffffff + compress_size = 0xffffffff + else: + file_size = zinfo.file_size + compress_size = zinfo.compress_size + + if zinfo.header_offset > ZIP64_LIMIT: + extra.append(zinfo.header_offset) + header_offset = 0xffffffff + else: + header_offset = zinfo.header_offset + + extra_data = zinfo.extra + min_version = 0 + if extra: + # Append a ZIP64 field to the extra's + extra_data = _Extra.strip(extra_data, (1,)) + extra_data = struct.pack( + ' ZIP_FILECOUNT_LIMIT: + requires_zip64 = "Files count" + elif centDirOffset > ZIP64_LIMIT: + requires_zip64 = "Central directory offset" + elif centDirSize > ZIP64_LIMIT: + requires_zip64 = "Central directory size" + if requires_zip64: + # Need to write the ZIP64 end-of-archive records + if not self._allowZip64: + raise LargeZipFile(requires_zip64 + + " would require ZIP64 extensions") + zip64endrec = struct.pack( + structEndArchive64, stringEndArchive64, + sizeEndCentDir64 - 12, 45, 45, 0, 0, centDirCount, centDirCount, + centDirSize, centDirOffset) + self.fp.write(zip64endrec) + + zip64locrec = struct.pack( + structEndArchive64Locator, + stringEndArchive64Locator, 0, pos2, 1) + self.fp.write(zip64locrec) + centDirCount = min(centDirCount, 0xFFFF) + centDirSize = min(centDirSize, 0xFFFFFFFF) + centDirOffset = min(centDirOffset, 0xFFFFFFFF) + + endrec = struct.pack(structEndArchive, stringEndArchive, + 0, 0, centDirCount, centDirCount, + centDirSize, centDirOffset, len(self._comment)) + self.fp.write(endrec) + self.fp.write(self._comment) + if self.mode == "a": + self.fp.truncate() + self.fp.flush() + + def _fpclose(self, fp): + assert self._fileRefCnt > 0 + self._fileRefCnt -= 1 + if not self._fileRefCnt and not self._filePassed: + fp.close() + + +class PyZipFile(ZipFile): + """Class to create ZIP archives with Python library files and packages.""" + + def __init__(self, file, mode="r", compression=ZIP_STORED, + allowZip64=True, optimize=-1): + ZipFile.__init__(self, file, mode=mode, compression=compression, + allowZip64=allowZip64) + self._optimize = optimize + + def writepy(self, pathname, basename="", filterfunc=None): + """Add all files from "pathname" to the ZIP archive. + + If pathname is a package directory, search the directory and + all package subdirectories recursively for all *.py and enter + the modules into the archive. If pathname is a plain + directory, listdir *.py and enter all modules. Else, pathname + must be a Python *.py file and the module will be put into the + archive. Added modules are always module.pyc. + This method will compile the module.py into module.pyc if + necessary. + If filterfunc(pathname) is given, it is called with every argument. + When it is False, the file or directory is skipped. + """ + pathname = os.fspath(pathname) + if filterfunc and not filterfunc(pathname): + if self.debug: + label = 'path' if os.path.isdir(pathname) else 'file' + print('%s %r skipped by filterfunc' % (label, pathname)) + return + dir, name = os.path.split(pathname) + if os.path.isdir(pathname): + initname = os.path.join(pathname, "__init__.py") + if os.path.isfile(initname): + # This is a package directory, add it + if basename: + basename = "%s/%s" % (basename, name) + else: + basename = name + if self.debug: + print("Adding package in", pathname, "as", basename) + fname, arcname = self._get_codename(initname[0:-3], basename) + if self.debug: + print("Adding", arcname) + self.write(fname, arcname) + dirlist = sorted(os.listdir(pathname)) + dirlist.remove("__init__.py") + # Add all *.py files and package subdirectories + for filename in dirlist: + path = os.path.join(pathname, filename) + root, ext = os.path.splitext(filename) + if os.path.isdir(path): + if os.path.isfile(os.path.join(path, "__init__.py")): + # This is a package directory, add it + self.writepy(path, basename, + filterfunc=filterfunc) # Recursive call + elif ext == ".py": + if filterfunc and not filterfunc(path): + if self.debug: + print('file %r skipped by filterfunc' % path) + continue + fname, arcname = self._get_codename(path[0:-3], + basename) + if self.debug: + print("Adding", arcname) + self.write(fname, arcname) + else: + # This is NOT a package directory, add its files at top level + if self.debug: + print("Adding files from directory", pathname) + for filename in sorted(os.listdir(pathname)): + path = os.path.join(pathname, filename) + root, ext = os.path.splitext(filename) + if ext == ".py": + if filterfunc and not filterfunc(path): + if self.debug: + print('file %r skipped by filterfunc' % path) + continue + fname, arcname = self._get_codename(path[0:-3], + basename) + if self.debug: + print("Adding", arcname) + self.write(fname, arcname) + else: + if pathname[-3:] != ".py": + raise RuntimeError( + 'Files added with writepy() must end with ".py"') + fname, arcname = self._get_codename(pathname[0:-3], basename) + if self.debug: + print("Adding file", arcname) + self.write(fname, arcname) + + def _get_codename(self, pathname, basename): + """Return (filename, archivename) for the path. + + Given a module name path, return the correct file path and + archive name, compiling if necessary. For example, given + /python/lib/string, return (/python/lib/string.pyc, string). + """ + def _compile(file, optimize=-1): + import py_compile + if self.debug: + print("Compiling", file) + try: + py_compile.compile(file, doraise=True, optimize=optimize) + except py_compile.PyCompileError as err: + print(err.msg) + return False + return True + + file_py = pathname + ".py" + file_pyc = pathname + ".pyc" + pycache_opt0 = importlib.util.cache_from_source(file_py, optimization='') + pycache_opt1 = importlib.util.cache_from_source(file_py, optimization=1) + pycache_opt2 = importlib.util.cache_from_source(file_py, optimization=2) + if self._optimize == -1: + # legacy mode: use whatever file is present + if (os.path.isfile(file_pyc) and + os.stat(file_pyc).st_mtime >= os.stat(file_py).st_mtime): + # Use .pyc file. + arcname = fname = file_pyc + elif (os.path.isfile(pycache_opt0) and + os.stat(pycache_opt0).st_mtime >= os.stat(file_py).st_mtime): + # Use the __pycache__/*.pyc file, but write it to the legacy pyc + # file name in the archive. + fname = pycache_opt0 + arcname = file_pyc + elif (os.path.isfile(pycache_opt1) and + os.stat(pycache_opt1).st_mtime >= os.stat(file_py).st_mtime): + # Use the __pycache__/*.pyc file, but write it to the legacy pyc + # file name in the archive. + fname = pycache_opt1 + arcname = file_pyc + elif (os.path.isfile(pycache_opt2) and + os.stat(pycache_opt2).st_mtime >= os.stat(file_py).st_mtime): + # Use the __pycache__/*.pyc file, but write it to the legacy pyc + # file name in the archive. + fname = pycache_opt2 + arcname = file_pyc + else: + # Compile py into PEP 3147 pyc file. + if _compile(file_py): + if sys.flags.optimize == 0: + fname = pycache_opt0 + elif sys.flags.optimize == 1: + fname = pycache_opt1 + else: + fname = pycache_opt2 + arcname = file_pyc + else: + fname = arcname = file_py + else: + # new mode: use given optimization level + if self._optimize == 0: + fname = pycache_opt0 + arcname = file_pyc + else: + arcname = file_pyc + if self._optimize == 1: + fname = pycache_opt1 + elif self._optimize == 2: + fname = pycache_opt2 + else: + msg = "invalid value for 'optimize': {!r}".format(self._optimize) + raise ValueError(msg) + if not (os.path.isfile(fname) and + os.stat(fname).st_mtime >= os.stat(file_py).st_mtime): + if not _compile(file_py, optimize=self._optimize): + fname = arcname = file_py + archivename = os.path.split(arcname)[1] + if basename: + archivename = "%s/%s" % (basename, archivename) + return (fname, archivename) + + +def main(args=None): + import argparse + + description = 'A simple command-line interface for zipfile module.' + parser = argparse.ArgumentParser(description=description, color=True) + group = parser.add_mutually_exclusive_group(required=True) + group.add_argument('-l', '--list', metavar='', + help='Show listing of a zipfile') + group.add_argument('-e', '--extract', nargs=2, + metavar=('', ''), + help='Extract zipfile into target dir') + group.add_argument('-c', '--create', nargs='+', + metavar=('', ''), + help='Create zipfile from sources') + group.add_argument('-t', '--test', metavar='', + help='Test if a zipfile is valid') + parser.add_argument('--metadata-encoding', metavar='', + help='Specify encoding of member names for -l, -e and -t') + args = parser.parse_args(args) + + encoding = args.metadata_encoding + + if args.test is not None: + src = args.test + with ZipFile(src, 'r', metadata_encoding=encoding) as zf: + badfile = zf.testzip() + if badfile: + print("The following enclosed file is corrupted: {!r}".format(badfile)) + print("Done testing") + + elif args.list is not None: + src = args.list + with ZipFile(src, 'r', metadata_encoding=encoding) as zf: + zf.printdir() + + elif args.extract is not None: + src, curdir = args.extract + with ZipFile(src, 'r', metadata_encoding=encoding) as zf: + zf.extractall(curdir) + + elif args.create is not None: + if encoding: + print("Non-conforming encodings not supported with -c.", + file=sys.stderr) + sys.exit(1) + + zip_name = args.create.pop(0) + files = args.create + + def addToZip(zf, path, zippath): + if os.path.isfile(path): + zf.write(path, zippath, ZIP_DEFLATED) + elif os.path.isdir(path): + if zippath: + zf.write(path, zippath) + for nm in sorted(os.listdir(path)): + addToZip(zf, + os.path.join(path, nm), os.path.join(zippath, nm)) + # else: ignore + + with ZipFile(zip_name, 'w') as zf: + for path in files: + zippath = os.path.basename(path) + if not zippath: + zippath = os.path.basename(os.path.dirname(path)) + if zippath in ('', os.curdir, os.pardir): + zippath = '' + addToZip(zf, path, zippath) + + +from ._path import ( # noqa: E402 + Path, + + # used privately for tests + CompleteDirs, # noqa: F401 +) diff --git a/Python314_4_x64_Template/Lib/zipfile/__main__.py b/Python314_6_x64_Template/Lib/zipfile/__main__.py similarity index 100% rename from Python314_4_x64_Template/Lib/zipfile/__main__.py rename to Python314_6_x64_Template/Lib/zipfile/__main__.py diff --git a/Python314_6_x64_Template/Lib/zipfile/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/zipfile/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 000000000..8cd3c278d Binary files /dev/null and b/Python314_6_x64_Template/Lib/zipfile/__pycache__/__init__.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/zipfile/_path/__init__.py b/Python314_6_x64_Template/Lib/zipfile/_path/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/zipfile/_path/__init__.py rename to Python314_6_x64_Template/Lib/zipfile/_path/__init__.py diff --git a/Python314_6_x64_Template/Lib/zipfile/_path/__pycache__/__init__.cpython-314.pyc b/Python314_6_x64_Template/Lib/zipfile/_path/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 000000000..0eb2ba3ae Binary files /dev/null and b/Python314_6_x64_Template/Lib/zipfile/_path/__pycache__/__init__.cpython-314.pyc differ diff --git a/Python314_6_x64_Template/Lib/zipfile/_path/__pycache__/glob.cpython-314.pyc b/Python314_6_x64_Template/Lib/zipfile/_path/__pycache__/glob.cpython-314.pyc new file mode 100644 index 000000000..068de959e Binary files /dev/null and b/Python314_6_x64_Template/Lib/zipfile/_path/__pycache__/glob.cpython-314.pyc differ diff --git a/Python314_4_x64_Template/Lib/zipfile/_path/glob.py b/Python314_6_x64_Template/Lib/zipfile/_path/glob.py similarity index 100% rename from Python314_4_x64_Template/Lib/zipfile/_path/glob.py rename to Python314_6_x64_Template/Lib/zipfile/_path/glob.py diff --git a/Python314_4_x64_Template/Lib/zipimport.py b/Python314_6_x64_Template/Lib/zipimport.py similarity index 100% rename from Python314_4_x64_Template/Lib/zipimport.py rename to Python314_6_x64_Template/Lib/zipimport.py diff --git a/Python314_4_x64_Template/Lib/zoneinfo/__init__.py b/Python314_6_x64_Template/Lib/zoneinfo/__init__.py similarity index 100% rename from Python314_4_x64_Template/Lib/zoneinfo/__init__.py rename to Python314_6_x64_Template/Lib/zoneinfo/__init__.py diff --git a/Python314_4_x64_Template/Lib/zoneinfo/_common.py b/Python314_6_x64_Template/Lib/zoneinfo/_common.py similarity index 100% rename from Python314_4_x64_Template/Lib/zoneinfo/_common.py rename to Python314_6_x64_Template/Lib/zoneinfo/_common.py diff --git a/Python314_4_x64_Template/Lib/zoneinfo/_tzpath.py b/Python314_6_x64_Template/Lib/zoneinfo/_tzpath.py similarity index 100% rename from Python314_4_x64_Template/Lib/zoneinfo/_tzpath.py rename to Python314_6_x64_Template/Lib/zoneinfo/_tzpath.py diff --git a/Python314_4_x64_Template/Lib/zoneinfo/_zoneinfo.py b/Python314_6_x64_Template/Lib/zoneinfo/_zoneinfo.py similarity index 100% rename from Python314_4_x64_Template/Lib/zoneinfo/_zoneinfo.py rename to Python314_6_x64_Template/Lib/zoneinfo/_zoneinfo.py diff --git a/Python314_4_x64_Template/NEWS.txt b/Python314_6_x64_Template/NEWS.txt similarity index 98% rename from Python314_4_x64_Template/NEWS.txt rename to Python314_6_x64_Template/NEWS.txt index 6b05d9f3c..0f5410d5c 100644 --- a/Python314_4_x64_Template/NEWS.txt +++ b/Python314_6_x64_Template/NEWS.txt @@ -2,6 +2,618 @@ Python News +++++++++++ +What's New in Python 3.14.6 final? +================================== + +*Release date: 2026-06-10* + +Security +-------- + +- gh-151159: Update Android and iOS installers to use OpenSSL 3.5.7. + +- gh-150599: Fix a possible stack buffer overflow in :mod:`bz2` when a + :class:`bz2.BZ2Decompressor` is reused after a decompression error. The + decompressor now becomes unusable after libbz2 reports an error. + +- gh-149835: :func:`shutil.move` now resolves symlinks via + :func:`os.path.realpath` when checking whether the destination is inside + the source directory, preventing a symlink-based bypass of that guard. + +- gh-149698: Update bundled `libexpat `_ to + version 2.8.1 for the fix for :cve:`2026-45186`. + +- gh-87451: The :mod:`ftplib` module's undocumented ``ftpcp`` function no + longer trusts the IPv4 address value returned from the source server in + response to the ``PASV`` command by default, completing the fix for + CVE-2021-4189. As with :class:`ftplib.FTP`, the former behavior can be + re-enabled by setting the ``trust_server_pasv_ipv4_address`` attribute on + the source :class:`ftplib.FTP` instance to ``True``. Thanks to Qi Deng at + Aurascape AI for the report. + +- gh-149486: :func:`tarfile.data_filter` now validates link targets using + the same normalised value that is written to disk, strips trailing + separators from the member name when resolving a symlink's directory, and + rejects link members that would replace the destination directory itself. + This closes several path-traversal bypasses of the ``data`` extraction + filter. + +- gh-149079: Fix a potential denial of service in + :func:`unicodedata.normalize`. The canonical ordering step of Unicode + normalization used a quadratic-time insertion sort for reordering + combining characters, which could be exploited with crafted input + containing many combining characters in non-canonical order. Replaced with + a linear-time counting sort for long runs. + +- gh-149018: Improved protection against XML hash-flooding attacks in + :mod:`xml.parsers.expat` and :mod:`xml.etree.ElementTree` when Python is + compiled with libExpat 2.8.0 or later. + +Core and Builtins +----------------- + +- gh-151112: Fix a crash in the compiler that could occur when running out + of memory. + +- gh-151126: Fix a crash, when there's no memory left on a device, which + happened in: + + - code compilation - :func:`!_winapi.CreateProcess` + + Now these places raise proper :exc:`MemoryError` errors. + +- gh-150700: Fix a :exc:`SystemError` when compiling a class-scope + comprehension containing a ``lambda`` that references ``__class__``, + ``__classdict__``, or ``__conditional_annotations__``. Patch by Bartosz + Sławecki. + +- gh-150633: Fix the frozen importer accepting module names with embedded + null bytes, which caused it to bypass the :data:`sys.modules` cache and + create duplicate module objects. + +- gh-148613: Fix a data race in the free-threaded build between + :func:`gc.set_threshold` and garbage collection scheduling during object + allocation. + +- gh-149156: Fix an intermittent crash after :func:`os.fork` when perf + trampoline profiling is enabled and the child returns through trampoline + frames inherited from the parent process. + +- gh-149449: Fix a use-after-free crash when the :mod:`unicodedata` module + was removed from :data:`sys.modules` and garbage-collected between calls + that decode ``\N{...}`` escapes or use the ``namereplace`` codec error + handler. + +- gh-150207: Fix a crash when a memory allocation fails during tokenizer + initialization. A proper :exc:`MemoryError` is now raised instead. + +- gh-150107: :mod:`asyncio`: ``sendfile()`` and ``sock_sendfile()`` event + loop methods now call ``file.seek(offset)`` if *file* has a ``seek()`` + method, even if *offset* is ``0`` (default value). + +- gh-150146: Fix a crash on a complex type variable substitution. + + ``from typing import TypeVar; memoryview[TypeVar("")][*typing.Mapping[..., + ...]]`` used to fail due to missing ``NULL`` check on ``_unpack_args`` C + function call. + +- gh-149590: Fix crash when faulthandler is imported more than once. + +- gh-149816: Fix a race condition in ``_PyBytes_FromList`` in free-threading + mode. + +- gh-149816: Fix a race condition in :class:`memoryview` with + free-threading. + +- gh-149805: Fix a :exc:`SystemError` when compiling a compiling + ``__classdict__`` class annotation. Found by OSS-Fuzz in + :oss-fuzz:`512907042`. + +- gh-149738: :mod:`sqlite3`: Disallow removing ``row_factory`` and + ``text_factory`` attributes of a connection to prevent a crash on a query. + +- gh-139808: Add branch protections for AArch64 (BTI/PAC) in assembly code + used by :option:`-X perf_jit <-X>` (Linux perf profiler integration). + +- gh-148450: Fix ``abc.register()`` so it invalidates type version tags for + registered classes. + +Library +------- + +- gh-151039: Fix a crash when static :mod:`datetime` types outlive the + ``_datetime`` module. + +- gh-150913: Fix :class:`sqlite3.Blob` slice assignment to raise + :exc:`TypeError` and :exc:`IndexError` for type and size mismatches + respectively, even when the target slice is empty. + +- gh-143008: Fix race conditions when re-initializing a + :class:`io.TextIOWrapper` object. + +- gh-150750: Fix a race condition in :meth:`collections.deque.index` with + free-threading. + +- gh-150685: Update bundled pip to 26.1.2 + +- gh-150406: Fix a possible crash occurring during :mod:`socket` module + initialization when the system is out of memory on platforms without a + reentrant ``gethostbyname``. + +- gh-150372: :mod:`readline`: Fix a potential crash during tab completion + caused by an out-of-memory error during module initialization. + +- gh-150157: Fix a crash in free-threaded builds that occurs when pickling + by name objects without a ``__module__`` attribute while + :data:`sys.modules` is concurrently being modified. + +- gh-150175: Fix race condition in :class:`unittest.mock.ThreadingMock` + where concurrent calls could lose increments to ``call_count`` and other + attributes due to a missing lock in ``_increment_mock_call``. + +- gh-84353: Preserve non-UTF-8 encoded filenames when appending to a + :class:`zipfile.ZipFile`. Previously, non-ASCII names stored in a legacy + encoding (without the UTF-8 flag bit set) could be corrupted when the + central directory was rewritten: they were decoded as cp437 and then + re-stored as UTF-8. + +- gh-149816: Fix race condition in :attr:`ssl.SSLContext.sni_callback` + +- gh-149995: Update various docstrings in :mod:`typing`. + +- gh-88726: The :mod:`email` package now uses standard MIME charset names + "gb2312" and "big5" instead of non-standard names "eucgb2312_cn" and + "big5_tw". + +- gh-149571: Fix the C implementation of + :meth:`xml.etree.ElementTree.Element.itertext`: it no longer emits text + for comments and processing instructions. + +- gh-149921: Fix reference leaks in error paths of the + :mod:`!_interpchannels` and :mod:`!_interpqueues` extension modules. + +- gh-149816: Fix a race condition in ``_random.Random.__init__`` method in + free-threading mode. + +- gh-149801: Add IANA registered names and aliases with leading zeros before + number (like IBM00858, CP00858, IBM01140, CP01140) for corresponding + codecs. + +- gh-149701: Fix bad return code from Lib/venv/bin/activate if hashing is + disabled + +- gh-112821: In the REPL, autocompletion might run arbitrary code in the + getter of a descriptor. If that getter raised an exception, autocompletion + would fail to present any options for the entire object. Autocompletion + now works as expected for these objects. + +- gh-149489: Fix :mod:`~xml.etree.ElementTree` serialization to HTML. The + content of elements "xmp", "iframe", "noembed", "noframes", and + "plaintext" is no longer escaped. The "plaintext" element no longer have + the closing tag. + +- gh-149231: In :mod:`tomllib`, the number of parts in TOML keys is now + limited. + +- gh-149046: :mod:`io`: Fix :class:`io.StringIO` serialization: no longer + call ``str(obj)`` on :class:`str` subclasses. Patch by Thomas Kowalski. + +- gh-148954: Fix XML injection vulnerability in :func:`xmlrpc.client.dumps` + where the ``methodname`` was not being escaped before interpolation into + the XML body. + +- gh-148441: :mod:`xml.parsers.expat`: prevent a crash in + :meth:`~xml.parsers.expat.xmlparser.CharacterDataHandler` when the + character data size exceeds the parser's :attr:`buffer size + `. + +- gh-146452: Fix segfault in :mod:`pickle` when pickling a dictionary + concurrently mutated by another thread in the free-threaded build. + +- gh-142831: Fix a crash in the :mod:`json` module where a use-after-free + could occur if the object being encoded is modified during serialization. + +- gh-90949: Add + :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionActivationThreshold` + and + :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification` + to :ref:`xmlparser ` objects to tune protections + against `billion laughs + `_ attacks. Patch by + Bénédikt Tran. + +- gh-134261: zip: On reproducible builds, ZipFile uses UTC instead of the + local time when writing file datetimes to avoid underflows. + +- gh-128110: Fix bug in the parsing of :mod:`email` address headers that + could result in extraneous spaces in the decoded text when using a modern + email policy. Space between pairs of adjacent :rfc:`2047` encoded-words is + now ignored, per section 6.2 (and consistent with existing parsing of + unstructured headers like *Subject*). + +- gh-107398: Fix :mod:`tarfile` stream mode exception when process the file + with the gzip extra field. + +- gh-123853: Update the table of Windows language code identifiers (LCIDs) + used by :func:`locale.getdefaultlocale` on Windows to protocol version + 16.0 (2024-04-23). + +- gh-91099: :meth:`imaplib.IMAP4.login` now raises exceptions with + :class:`str` instead of :class:`bytes`. Patch by Florian Best. + +Documentation +------------- + +- gh-150319: Generic builtin and standard library types now document the + meaning of their type parameters. + +- gh-109503: Fix documentation for :func:`shutil.move` on usage of + :func:`os.rename` since nonatomic move might be used even if the files are + on the same filesystem. Patch by Fang Li + +Tests +----- + +- gh-151130: Add more tests for ``PyWeakref_*`` C API. + +- gh-149776: Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite + tests if it's not supported. Patch by Victor Stinner. + +Build +----- + +- gh-148294: Corrected the use of ``AC_PATH_TOOL`` in ``configure.ac`` to + allow a C++ compiler to be found on :envvar:`!PATH`. + +Windows +------- + +- gh-151159: Updated bundled version of OpenSSL to 3.5.7. + +macOS +----- + +- gh-151159: Update macOS installer to use OpenSSL 3.5.7. + +- gh-150644: When system logging is enabled (with + ``config.use_system_logger``, messages are now tagged as public. This + allows the macOS 26 system logger to view messages without special + configuration. + +- gh-115119: Update macOS installer to use libmpdecimal 4.0.1. + +IDLE +---- + +- bpo-6699: Warn the user if a file will be overwritten when saving. + +C API +----- + +- gh-150907: Fix ``dynamic_annotations.h`` header file when built with C++ + and Valgrind: add ``extern "C++" scope`` for the C++ template. Patch by + Victor Stinner. + +- gh-145235: Made :c:func:`PyDict_AddWatcher`, + :c:func:`PyDict_ClearWatcher`, :c:func:`PyDict_Watch`, and + :c:func:`PyDict_Unwatch` thread-safe on the :term:`free threaded ` build. + + +What's New in Python 3.14.5 final? +================================== + +*Release date: 2026-05-10* + +Security +-------- + +- gh-148178: Hardened :mod:`!_remote_debugging` by validating remote debug + offset tables before using them to size memory reads or interpret remote + layouts. + +Core and Builtins +----------------- + +- gh-146270: Fix a sequential consistency bug in ``structmember.c``. + +- gh-137293: Fix :exc:`SystemError` when searching ELF Files in + :func:`sys.remote_exec`. + +Library +------- + +- gh-149388: Make :class:`!asyncio.windows_utils.PipeHandle` closing + idempotent. + +- gh-149377: Update bundled pip to 26.1.1 + +- gh-138907: Support :rfc:`9309` in :mod:`urllib.robotparser`. + +- gh-148615: Fix :mod:`pdb` to accept standard -- end of options separator. + Reported by haampie. Patched by Shrey Naithani. + +- gh-130750: Restore quoting of choices in :mod:`argparse` error messages + for improved clarity and consistency with documentation. + +- gh-141449: Improve tests and documentation for non-function callables as + :term:`annotate functions `. + +Tests +----- + +- gh-149425: Increase time delta in + ``test.test_zipfile.test_core.OtherTests.test_write_without_source_date_epoch`` + +- gh-145736: Fix test_tkinter test_configure_values test case backport miss + for Tk 9. + +macOS +----- + +- gh-142295: For Python macOS framework builds, update Info.plist files to + be more compliant with current Apple guidelines. Original patch + contributed by Martinus Verburg. + +- gh-124111: Update macOS installer to use Tcl/Tk 9.0.3. + + +What's New in Python 3.14.5 release candidate 1? +================================================ + +*Release date: 2026-05-04* + +Security +-------- + +- gh-149254: Update Android and iOS installer to use OpenSSL 3.0.20. + +- gh-149017: Update bundled `libexpat `_ to + version 2.8.0. + +- gh-90309: Base64-encode values when embedding cookies to JavaScript using + the :meth:`http.cookies.BaseCookie.js_output` method to avoid injection + and escaping. + +- gh-148808: Added buffer boundary check when using ``nbytes`` parameter + with :meth:`!asyncio.AbstractEventLoop.sock_recvfrom_into`. Only relevant + for Windows and the :class:`asyncio.ProactorEventLoop`. + +- gh-148395: Fix a dangling input pointer in :class:`lzma.LZMADecompressor`, + :class:`bz2.BZ2Decompressor`, and internal + :class:`!zlib._ZlibDecompressor` when memory allocation fails with + :exc:`MemoryError`, which could let a subsequent :meth:`!decompress` call + read or write through a stale pointer to the already-released caller + buffer. + +- gh-148169: A bypass in :mod:`webbrowser` allowed URLs prefixed with + ``%action`` to pass the dash-prefix safety check. + +- gh-146581: Fix vulnerability in :func:`shutil.unpack_archive` for ZIP + files on Windows which allowed to write files outside of the destination + tree if the patch in the archive contains a Windows drive prefix. Now such + invalid paths will be skipped. Files containing ".." in the name (like + "foo..bar") are no longer skipped. + +- gh-146333: Fix quadratic backtracking in + :class:`configparser.RawConfigParser` option parsing regexes (``OPTCRE`` + and ``OPTCRE_NV``). A crafted configuration line with many whitespace + characters could cause excessive CPU usage. + +- gh-146211: Reject CR/LF characters in tunnel request headers for the + HTTPConnection.set_tunnel() method. + +Core and Builtins +----------------- + +- gh-149122: Fix a crash in optimized calls to :func:`all`, :func:`any`, + :func:`tuple`, :func:`list`, and :func:`set` with an async generator + expression argument (for example, ``tuple(await x for x in y)``). These + calls now correctly raise ``TypeError`` instead of crashing. + +- gh-113956: Fix a data race in :func:`sys.intern` in the free-threaded + build when interning a string owned by another thread. An interned copy + owned by the current thread is used instead when it is not safe to + immortalize the original. + +- gh-148820: Fix a race in :c:type:`!_PyRawMutex` on the free-threaded build + where a ``Py_PARK_INTR`` return from ``_PySemaphore_Wait`` could let the + waiter destroy its semaphore before the unlocking thread's + ``_PySemaphore_Wakeup`` completed, causing a fatal ``ReleaseSemaphore`` + error. + +- gh-148653: Forbid :mod:`marshalling ` recursive code objects and + :class:`slice` objects which cannot be correctly unmarshalled. + +- gh-142516: Forward-port the generational cycle garbage collector to the + default 3.14 build, replacing the incremental collector while leaving the + free-threaded collector unchanged. + +- gh-148390: Fix an undefined behavior in :class:`memoryview` when using the + native boolean format (``?``) in :meth:`~memoryview.cast`. Previously, on + some common platforms, calling ``memoryview(b).cast("?").tolist()`` + incorrectly returned ``[False]`` instead of ``[True]`` for any even byte + *b*. Patch by Bénédikt Tran. + +- gh-148418: Fix a possible reference leak in a corrupted ``TYPE_CODE`` + marshal stream. + +- gh-148393: Fix data races between :c:func:`PyDict_Watch` / + :c:func:`PyDict_Unwatch` and concurrent dict mutation in the + :term:`free-threaded build`. + +- gh-148284: Fix high stack consumption in Python's interpreter loop on + Clang 22 by setting function limits for inlining when building with + computed gotos. + +- gh-148037: Remove critical section from :c:func:`!PyCode_Addr2Line` in + free-threading. + +- gh-148222: Fix vectorcall support in :class:`types.GenericAlias` when the + underlying type does not support the vectorcall protocol. Fix possible + leaks in :class:`types.GenericAlias` and :class:`types.UnionType` in case + of memory error. + +- gh-148208: Fix recursion depth leak in :c:func:`PyObject_Print` + +- gh-137814: Fix the ``__qualname__`` attribute of ``__annotate__`` + functions on functions. + +- gh-147998: Fixed a memory leak in interpreter helper calls so cleanup + works when an operation falls across interpreter boundaries. Patch by + Maurycy Pawłowski-Wieroński. + +- gh-146455: Fix O(N²) compile-time regression in constant folding after it + was moved from AST to CFG optimizer. + +Library +------- + +- gh-149221: Catch rare math domain error for + :func:`random.binomialvariate`. + +- gh-149117: Fix :func:`runpy.run_module` and :func:`runpy.run_path` to set + the :attr:`~ImportError.name` attribute on the :exc:`ImportError` they + raise. + +- gh-149148: :mod:`ensurepip`: Upgrade bundled pip to 26.1. This version + fixes the :cve:`2026-3219` vulnerability. Patch by Victor Stinner. + +- gh-148093: Fix an out-of-bounds read of one byte in + :func:`binascii.a2b_uu`. Raise :exc:`binascii.Error`, instead of reading + past the buffer end. + +- gh-148914: Fix memoization of in-band :class:`~pickle.PickleBuffer` in the + Python implementation of :mod:`pickle`. Previously, identical + :class:`!PickleBuffer`\ s did not preserve identity, and empty writable + :class:`!PickleBuffer` memoized an empty bytearray object in place of + ``b''``, so the following references to ``b''`` were unpickled as an empty + bytearray object. + +- gh-148947: Fix crash in :deco:`dataclasses.dataclass` with ``slots=True`` + that occurred when a function found within the class had an empty + ``__class__`` cell. + +- gh-148680: ``ForwardRef`` objects that contain internal names to represent + known objects now show the ``type_repr`` of the known object rather than + the internal ``__annotationlib_name_x__`` name when evaluated as strings. + +- gh-148801: :mod:`xml.etree.ElementTree`: Fix a crash in + :meth:`Element.__deepcopy__ ` on deeply nested trees. + +- gh-148735: :mod:`xml.etree.ElementTree`: Fix a use-after-free in + :meth:`Element.findtext ` when the + element tree is mutated concurrently during the search. + +- gh-148740: Fix usage for :mod:`uuid` command-line interface to support a + custom namespace be provided for uuid3 and uuid5. + +- gh-148651: Fix reference leak in + :class:`compression.zstd.ZstdDecompressor` when an invalid option key is + passed. + +- gh-146553: Fix infinite loop in :func:`typing.get_type_hints` when + ``__wrapped__`` forms a cycle. Patch by Shamil Abdulaev. + +- gh-148508: An intermittent timing error when running SSL tests on iOS has + been resolved. + +- gh-148518: If an email containing an address header that ended in an open + double quote was parsed with a non-``compat32`` policy, accessing the + ``username`` attribute of the mailbox accessed through that header object + would result in an ``IndexError``. It now correctly returns an empty + string as the result. + +- gh-148464: Add missing ``__ctype_le/be__`` attributes for + :class:`~ctypes.c_float_complex` and :class:`~ctypes.c_double_complex`. + Patch by Sergey B Kirpichev. + +- gh-148370: :mod:`configparser`: prevent quadratic behavior when a + :exc:`~configparser.ParsingError` is raised after a parser fails to parse + multiple lines. Patch by Bénédikt Tran. + +- gh-148254: Use singular "sec" instead of "secs" in :mod:`timeit` verbose + output for consistency with other time units. + +- gh-148192: ``email.generator.Generator._make_boundary`` could fail to + detect a duplicate boundary string if linesep was not \n. It now correctly + detects boundary strings when linesep is \r\n as well. + +- gh-146313: Fix a deadlock in :mod:`multiprocessing`'s resource tracker + where the parent process could hang indefinitely in :func:`os.waitpid` + during interpreter shutdown if a child created via :func:`os.fork` still + held the resource tracker's pipe open. + +- gh-145831: Fix :func:`!email.quoprimime.decode` leaving a stray ``\r`` + when ``eol='\r\n'`` by stripping the full *eol* string instead of one + character. + +- gh-145105: Fix crash in :mod:`csv` reader when iterating with a re-entrant + iterator that calls :func:`next` on the same reader from within + ``__next__``. + +- gh-105936: Attempting to mutate non-field attributes of :mod:`dataclasses` + with both *frozen* and *slots* being ``True`` now raises + :class:`~dataclasses.FrozenInstanceError` instead of :class:`TypeError`. + Their non-dataclass subclasses can now freely mutate non-field attributes, + and the original non-slotted class can be garbage collected. + +- gh-140287: The :mod:`asyncio` REPL now handles exceptions when executing + :envvar:`PYTHONSTARTUP` scripts. Patch by Bartosz Sławecki. + +- gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines file + with :mod:`JSON CLI `. + +- gh-70039: Fixed bug where :meth:`smtplib.SMTP.starttls` could fail if + :meth:`smtplib.SMTP.connect` is called explicitly rather than implicitly. + +- gh-83281: :mod:`email`: improve handling trailing garbage in address lists + to avoid throwing AttributeError in certain edge cases + +Documentation +------------- + +- gh-148663: Document that :class:`calendar.IllegalMonthError` is a subclass + of both :exc:`ValueError` and :exc:`IndexError` since Python 3.12. + +- gh-146646: Document that :func:`glob.glob`, :func:`glob.iglob`, + :meth:`pathlib.Path.glob`, and :meth:`pathlib.Path.rglob` silently + suppress :exc:`OSError` exceptions raised from scanning the filesystem. + +Build +----- + +- gh-149351: Avoid possible broken macOS framework install names when + DESTDIR is specified during builds. + +- gh-146475: Block Apple Clang from being used to build the JIT as it ships + without required LLVM tools. + +- gh-148535: No longer use the ``gcc -fprofile-update=atomic`` flag on i686. + The flag has been added to fix a random GCC internal error on PGO build + (:gh:`145801`) caused by corruption of profile data (.gcda files). The + problem is that it makes the PGO build way slower (up to 47x slower) on + i686. Since the GCC internal error was not seen on i686 so far, don't use + ``-fprofile-update=atomic`` on i686 anymore. Patch by Victor Stinner. + +- gh-146264: Fix static module builds on non-WASI targets by linking HACL + dependencies as static libraries when ``MODULE_BUILDTYPE=static``, + preventing duplicate ``_Py_LibHacl_*`` symbol errors at link time. + +Windows +------- + +- gh-149254: Updated bundled version of OpenSSL to 3.0.20. + +- gh-146458: Fix incorrect REPL height and width tracking on console window + resize on Windows. + +macOS +----- + +- gh-149254: Update macOS installer to use OpenSSL 3.0.20. + + What's New in Python 3.14.4 final? ================================== @@ -1322,9 +1934,9 @@ Library :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold` and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification` - to :ref:`xmlparser ` objects to prevent use of - disproportional amounts of dynamic memory from within an Expat parser. - Patch by Bénédikt Tran. + to :ref:`xmlparser ` objects to tune protections + against disproportional amounts of dynamic memory usage from within an + Expat parser. Patch by Bénédikt Tran. - gh-139210: Fix use-after-free when reporting unknown event in :func:`xml.etree.ElementTree.iterparse`. Patch by Ken Jin. diff --git a/Python314_4_x64_Template/Scripts/pip.exe b/Python314_6_x64_Template/Scripts/pip.exe similarity index 99% rename from Python314_4_x64_Template/Scripts/pip.exe rename to Python314_6_x64_Template/Scripts/pip.exe index 76b8fe3ba..a33286b62 100644 Binary files a/Python314_4_x64_Template/Scripts/pip.exe and b/Python314_6_x64_Template/Scripts/pip.exe differ diff --git a/Python314_4_x64_Template/Scripts/pip3.14.exe b/Python314_6_x64_Template/Scripts/pip3.14.exe similarity index 99% rename from Python314_4_x64_Template/Scripts/pip3.14.exe rename to Python314_6_x64_Template/Scripts/pip3.14.exe index 76b8fe3ba..a33286b62 100644 Binary files a/Python314_4_x64_Template/Scripts/pip3.14.exe and b/Python314_6_x64_Template/Scripts/pip3.14.exe differ diff --git a/Python314_4_x64_Template/Scripts/pip3.exe b/Python314_6_x64_Template/Scripts/pip3.exe similarity index 99% rename from Python314_4_x64_Template/Scripts/pip3.exe rename to Python314_6_x64_Template/Scripts/pip3.exe index 76b8fe3ba..a33286b62 100644 Binary files a/Python314_4_x64_Template/Scripts/pip3.exe and b/Python314_6_x64_Template/Scripts/pip3.exe differ diff --git a/Python314_4_x64_Template/include/Python.h b/Python314_6_x64_Template/include/Python.h similarity index 100% rename from Python314_4_x64_Template/include/Python.h rename to Python314_6_x64_Template/include/Python.h diff --git a/Python314_4_x64_Template/include/abstract.h b/Python314_6_x64_Template/include/abstract.h similarity index 100% rename from Python314_4_x64_Template/include/abstract.h rename to Python314_6_x64_Template/include/abstract.h diff --git a/Python314_4_x64_Template/include/audit.h b/Python314_6_x64_Template/include/audit.h similarity index 100% rename from Python314_4_x64_Template/include/audit.h rename to Python314_6_x64_Template/include/audit.h diff --git a/Python314_4_x64_Template/include/bltinmodule.h b/Python314_6_x64_Template/include/bltinmodule.h similarity index 100% rename from Python314_4_x64_Template/include/bltinmodule.h rename to Python314_6_x64_Template/include/bltinmodule.h diff --git a/Python314_4_x64_Template/include/boolobject.h b/Python314_6_x64_Template/include/boolobject.h similarity index 100% rename from Python314_4_x64_Template/include/boolobject.h rename to Python314_6_x64_Template/include/boolobject.h diff --git a/Python314_4_x64_Template/include/bytearrayobject.h b/Python314_6_x64_Template/include/bytearrayobject.h similarity index 100% rename from Python314_4_x64_Template/include/bytearrayobject.h rename to Python314_6_x64_Template/include/bytearrayobject.h diff --git a/Python314_4_x64_Template/include/bytesobject.h b/Python314_6_x64_Template/include/bytesobject.h similarity index 100% rename from Python314_4_x64_Template/include/bytesobject.h rename to Python314_6_x64_Template/include/bytesobject.h diff --git a/Python314_4_x64_Template/include/ceval.h b/Python314_6_x64_Template/include/ceval.h similarity index 100% rename from Python314_4_x64_Template/include/ceval.h rename to Python314_6_x64_Template/include/ceval.h diff --git a/Python314_4_x64_Template/include/codecs.h b/Python314_6_x64_Template/include/codecs.h similarity index 100% rename from Python314_4_x64_Template/include/codecs.h rename to Python314_6_x64_Template/include/codecs.h diff --git a/Python314_4_x64_Template/include/compile.h b/Python314_6_x64_Template/include/compile.h similarity index 100% rename from Python314_4_x64_Template/include/compile.h rename to Python314_6_x64_Template/include/compile.h diff --git a/Python314_4_x64_Template/include/complexobject.h b/Python314_6_x64_Template/include/complexobject.h similarity index 100% rename from Python314_4_x64_Template/include/complexobject.h rename to Python314_6_x64_Template/include/complexobject.h diff --git a/Python314_4_x64_Template/include/cpython/abstract.h b/Python314_6_x64_Template/include/cpython/abstract.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/abstract.h rename to Python314_6_x64_Template/include/cpython/abstract.h diff --git a/Python314_4_x64_Template/include/cpython/audit.h b/Python314_6_x64_Template/include/cpython/audit.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/audit.h rename to Python314_6_x64_Template/include/cpython/audit.h diff --git a/Python314_4_x64_Template/include/cpython/bytearrayobject.h b/Python314_6_x64_Template/include/cpython/bytearrayobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/bytearrayobject.h rename to Python314_6_x64_Template/include/cpython/bytearrayobject.h diff --git a/Python314_4_x64_Template/include/cpython/bytesobject.h b/Python314_6_x64_Template/include/cpython/bytesobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/bytesobject.h rename to Python314_6_x64_Template/include/cpython/bytesobject.h diff --git a/Python314_4_x64_Template/include/cpython/cellobject.h b/Python314_6_x64_Template/include/cpython/cellobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/cellobject.h rename to Python314_6_x64_Template/include/cpython/cellobject.h diff --git a/Python314_4_x64_Template/include/cpython/ceval.h b/Python314_6_x64_Template/include/cpython/ceval.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/ceval.h rename to Python314_6_x64_Template/include/cpython/ceval.h diff --git a/Python314_4_x64_Template/include/cpython/classobject.h b/Python314_6_x64_Template/include/cpython/classobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/classobject.h rename to Python314_6_x64_Template/include/cpython/classobject.h diff --git a/Python314_4_x64_Template/include/cpython/code.h b/Python314_6_x64_Template/include/cpython/code.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/code.h rename to Python314_6_x64_Template/include/cpython/code.h diff --git a/Python314_4_x64_Template/include/cpython/compile.h b/Python314_6_x64_Template/include/cpython/compile.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/compile.h rename to Python314_6_x64_Template/include/cpython/compile.h diff --git a/Python314_4_x64_Template/include/cpython/complexobject.h b/Python314_6_x64_Template/include/cpython/complexobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/complexobject.h rename to Python314_6_x64_Template/include/cpython/complexobject.h diff --git a/Python314_4_x64_Template/include/cpython/context.h b/Python314_6_x64_Template/include/cpython/context.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/context.h rename to Python314_6_x64_Template/include/cpython/context.h diff --git a/Python314_4_x64_Template/include/cpython/critical_section.h b/Python314_6_x64_Template/include/cpython/critical_section.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/critical_section.h rename to Python314_6_x64_Template/include/cpython/critical_section.h diff --git a/Python314_4_x64_Template/include/cpython/descrobject.h b/Python314_6_x64_Template/include/cpython/descrobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/descrobject.h rename to Python314_6_x64_Template/include/cpython/descrobject.h diff --git a/Python314_4_x64_Template/include/cpython/dictobject.h b/Python314_6_x64_Template/include/cpython/dictobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/dictobject.h rename to Python314_6_x64_Template/include/cpython/dictobject.h diff --git a/Python314_4_x64_Template/include/cpython/fileobject.h b/Python314_6_x64_Template/include/cpython/fileobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/fileobject.h rename to Python314_6_x64_Template/include/cpython/fileobject.h diff --git a/Python314_4_x64_Template/include/cpython/fileutils.h b/Python314_6_x64_Template/include/cpython/fileutils.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/fileutils.h rename to Python314_6_x64_Template/include/cpython/fileutils.h diff --git a/Python314_4_x64_Template/include/cpython/floatobject.h b/Python314_6_x64_Template/include/cpython/floatobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/floatobject.h rename to Python314_6_x64_Template/include/cpython/floatobject.h diff --git a/Python314_4_x64_Template/include/cpython/frameobject.h b/Python314_6_x64_Template/include/cpython/frameobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/frameobject.h rename to Python314_6_x64_Template/include/cpython/frameobject.h diff --git a/Python314_4_x64_Template/include/cpython/funcobject.h b/Python314_6_x64_Template/include/cpython/funcobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/funcobject.h rename to Python314_6_x64_Template/include/cpython/funcobject.h diff --git a/Python314_4_x64_Template/include/cpython/genobject.h b/Python314_6_x64_Template/include/cpython/genobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/genobject.h rename to Python314_6_x64_Template/include/cpython/genobject.h diff --git a/Python314_4_x64_Template/include/cpython/import.h b/Python314_6_x64_Template/include/cpython/import.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/import.h rename to Python314_6_x64_Template/include/cpython/import.h diff --git a/Python314_4_x64_Template/include/cpython/initconfig.h b/Python314_6_x64_Template/include/cpython/initconfig.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/initconfig.h rename to Python314_6_x64_Template/include/cpython/initconfig.h diff --git a/Python314_4_x64_Template/include/cpython/listobject.h b/Python314_6_x64_Template/include/cpython/listobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/listobject.h rename to Python314_6_x64_Template/include/cpython/listobject.h diff --git a/Python314_4_x64_Template/include/cpython/lock.h b/Python314_6_x64_Template/include/cpython/lock.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/lock.h rename to Python314_6_x64_Template/include/cpython/lock.h diff --git a/Python314_4_x64_Template/include/cpython/longintrepr.h b/Python314_6_x64_Template/include/cpython/longintrepr.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/longintrepr.h rename to Python314_6_x64_Template/include/cpython/longintrepr.h diff --git a/Python314_4_x64_Template/include/cpython/longobject.h b/Python314_6_x64_Template/include/cpython/longobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/longobject.h rename to Python314_6_x64_Template/include/cpython/longobject.h diff --git a/Python314_4_x64_Template/include/cpython/memoryobject.h b/Python314_6_x64_Template/include/cpython/memoryobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/memoryobject.h rename to Python314_6_x64_Template/include/cpython/memoryobject.h diff --git a/Python314_4_x64_Template/include/cpython/methodobject.h b/Python314_6_x64_Template/include/cpython/methodobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/methodobject.h rename to Python314_6_x64_Template/include/cpython/methodobject.h diff --git a/Python314_4_x64_Template/include/cpython/modsupport.h b/Python314_6_x64_Template/include/cpython/modsupport.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/modsupport.h rename to Python314_6_x64_Template/include/cpython/modsupport.h diff --git a/Python314_4_x64_Template/include/cpython/monitoring.h b/Python314_6_x64_Template/include/cpython/monitoring.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/monitoring.h rename to Python314_6_x64_Template/include/cpython/monitoring.h diff --git a/Python314_4_x64_Template/include/cpython/object.h b/Python314_6_x64_Template/include/cpython/object.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/object.h rename to Python314_6_x64_Template/include/cpython/object.h diff --git a/Python314_4_x64_Template/include/cpython/objimpl.h b/Python314_6_x64_Template/include/cpython/objimpl.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/objimpl.h rename to Python314_6_x64_Template/include/cpython/objimpl.h diff --git a/Python314_4_x64_Template/include/cpython/odictobject.h b/Python314_6_x64_Template/include/cpython/odictobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/odictobject.h rename to Python314_6_x64_Template/include/cpython/odictobject.h diff --git a/Python314_4_x64_Template/include/cpython/picklebufobject.h b/Python314_6_x64_Template/include/cpython/picklebufobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/picklebufobject.h rename to Python314_6_x64_Template/include/cpython/picklebufobject.h diff --git a/Python314_4_x64_Template/include/cpython/pthread_stubs.h b/Python314_6_x64_Template/include/cpython/pthread_stubs.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pthread_stubs.h rename to Python314_6_x64_Template/include/cpython/pthread_stubs.h diff --git a/Python314_4_x64_Template/include/cpython/pyatomic.h b/Python314_6_x64_Template/include/cpython/pyatomic.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyatomic.h rename to Python314_6_x64_Template/include/cpython/pyatomic.h diff --git a/Python314_4_x64_Template/include/cpython/pyatomic_gcc.h b/Python314_6_x64_Template/include/cpython/pyatomic_gcc.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyatomic_gcc.h rename to Python314_6_x64_Template/include/cpython/pyatomic_gcc.h diff --git a/Python314_4_x64_Template/include/cpython/pyatomic_msc.h b/Python314_6_x64_Template/include/cpython/pyatomic_msc.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyatomic_msc.h rename to Python314_6_x64_Template/include/cpython/pyatomic_msc.h diff --git a/Python314_4_x64_Template/include/cpython/pyatomic_std.h b/Python314_6_x64_Template/include/cpython/pyatomic_std.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyatomic_std.h rename to Python314_6_x64_Template/include/cpython/pyatomic_std.h diff --git a/Python314_4_x64_Template/include/cpython/pyctype.h b/Python314_6_x64_Template/include/cpython/pyctype.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyctype.h rename to Python314_6_x64_Template/include/cpython/pyctype.h diff --git a/Python314_4_x64_Template/include/cpython/pydebug.h b/Python314_6_x64_Template/include/cpython/pydebug.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pydebug.h rename to Python314_6_x64_Template/include/cpython/pydebug.h diff --git a/Python314_4_x64_Template/include/cpython/pyerrors.h b/Python314_6_x64_Template/include/cpython/pyerrors.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyerrors.h rename to Python314_6_x64_Template/include/cpython/pyerrors.h diff --git a/Python314_4_x64_Template/include/cpython/pyfpe.h b/Python314_6_x64_Template/include/cpython/pyfpe.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyfpe.h rename to Python314_6_x64_Template/include/cpython/pyfpe.h diff --git a/Python314_4_x64_Template/include/cpython/pyframe.h b/Python314_6_x64_Template/include/cpython/pyframe.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyframe.h rename to Python314_6_x64_Template/include/cpython/pyframe.h diff --git a/Python314_4_x64_Template/include/cpython/pyhash.h b/Python314_6_x64_Template/include/cpython/pyhash.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pyhash.h rename to Python314_6_x64_Template/include/cpython/pyhash.h diff --git a/Python314_4_x64_Template/include/cpython/pylifecycle.h b/Python314_6_x64_Template/include/cpython/pylifecycle.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pylifecycle.h rename to Python314_6_x64_Template/include/cpython/pylifecycle.h diff --git a/Python314_4_x64_Template/include/cpython/pymem.h b/Python314_6_x64_Template/include/cpython/pymem.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pymem.h rename to Python314_6_x64_Template/include/cpython/pymem.h diff --git a/Python314_4_x64_Template/include/cpython/pystate.h b/Python314_6_x64_Template/include/cpython/pystate.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pystate.h rename to Python314_6_x64_Template/include/cpython/pystate.h diff --git a/Python314_4_x64_Template/include/cpython/pystats.h b/Python314_6_x64_Template/include/cpython/pystats.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pystats.h rename to Python314_6_x64_Template/include/cpython/pystats.h diff --git a/Python314_4_x64_Template/include/cpython/pythonrun.h b/Python314_6_x64_Template/include/cpython/pythonrun.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pythonrun.h rename to Python314_6_x64_Template/include/cpython/pythonrun.h diff --git a/Python314_4_x64_Template/include/cpython/pythread.h b/Python314_6_x64_Template/include/cpython/pythread.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pythread.h rename to Python314_6_x64_Template/include/cpython/pythread.h diff --git a/Python314_4_x64_Template/include/cpython/pytime.h b/Python314_6_x64_Template/include/cpython/pytime.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/pytime.h rename to Python314_6_x64_Template/include/cpython/pytime.h diff --git a/Python314_4_x64_Template/include/cpython/setobject.h b/Python314_6_x64_Template/include/cpython/setobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/setobject.h rename to Python314_6_x64_Template/include/cpython/setobject.h diff --git a/Python314_4_x64_Template/include/cpython/traceback.h b/Python314_6_x64_Template/include/cpython/traceback.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/traceback.h rename to Python314_6_x64_Template/include/cpython/traceback.h diff --git a/Python314_4_x64_Template/include/cpython/tracemalloc.h b/Python314_6_x64_Template/include/cpython/tracemalloc.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/tracemalloc.h rename to Python314_6_x64_Template/include/cpython/tracemalloc.h diff --git a/Python314_4_x64_Template/include/cpython/tupleobject.h b/Python314_6_x64_Template/include/cpython/tupleobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/tupleobject.h rename to Python314_6_x64_Template/include/cpython/tupleobject.h diff --git a/Python314_4_x64_Template/include/cpython/unicodeobject.h b/Python314_6_x64_Template/include/cpython/unicodeobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/unicodeobject.h rename to Python314_6_x64_Template/include/cpython/unicodeobject.h diff --git a/Python314_4_x64_Template/include/cpython/warnings.h b/Python314_6_x64_Template/include/cpython/warnings.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/warnings.h rename to Python314_6_x64_Template/include/cpython/warnings.h diff --git a/Python314_4_x64_Template/include/cpython/weakrefobject.h b/Python314_6_x64_Template/include/cpython/weakrefobject.h similarity index 100% rename from Python314_4_x64_Template/include/cpython/weakrefobject.h rename to Python314_6_x64_Template/include/cpython/weakrefobject.h diff --git a/Python314_4_x64_Template/include/critical_section.h b/Python314_6_x64_Template/include/critical_section.h similarity index 100% rename from Python314_4_x64_Template/include/critical_section.h rename to Python314_6_x64_Template/include/critical_section.h diff --git a/Python314_4_x64_Template/include/datetime.h b/Python314_6_x64_Template/include/datetime.h similarity index 100% rename from Python314_4_x64_Template/include/datetime.h rename to Python314_6_x64_Template/include/datetime.h diff --git a/Python314_4_x64_Template/include/descrobject.h b/Python314_6_x64_Template/include/descrobject.h similarity index 100% rename from Python314_4_x64_Template/include/descrobject.h rename to Python314_6_x64_Template/include/descrobject.h diff --git a/Python314_4_x64_Template/include/dictobject.h b/Python314_6_x64_Template/include/dictobject.h similarity index 100% rename from Python314_4_x64_Template/include/dictobject.h rename to Python314_6_x64_Template/include/dictobject.h diff --git a/Python314_4_x64_Template/include/dynamic_annotations.h b/Python314_6_x64_Template/include/dynamic_annotations.h similarity index 99% rename from Python314_4_x64_Template/include/dynamic_annotations.h rename to Python314_6_x64_Template/include/dynamic_annotations.h index 4d4def9bf..5290319dd 100644 --- a/Python314_4_x64_Template/include/dynamic_annotations.h +++ b/Python314_6_x64_Template/include/dynamic_annotations.h @@ -461,6 +461,7 @@ int RunningOnValgrind(void); #if DYNAMIC_ANNOTATIONS_ENABLED != 0 && defined(__cplusplus) +extern "C++" { /* _Py_ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads. Instead of doing @@ -476,6 +477,8 @@ int RunningOnValgrind(void); _Py_ANNOTATE_IGNORE_READS_END(); return res; } +} + /* Apply _Py_ANNOTATE_BENIGN_RACE_SIZED to a static variable. */ #define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) \ namespace { \ diff --git a/Python314_4_x64_Template/include/enumobject.h b/Python314_6_x64_Template/include/enumobject.h similarity index 100% rename from Python314_4_x64_Template/include/enumobject.h rename to Python314_6_x64_Template/include/enumobject.h diff --git a/Python314_4_x64_Template/include/errcode.h b/Python314_6_x64_Template/include/errcode.h similarity index 100% rename from Python314_4_x64_Template/include/errcode.h rename to Python314_6_x64_Template/include/errcode.h diff --git a/Python314_4_x64_Template/include/exports.h b/Python314_6_x64_Template/include/exports.h similarity index 100% rename from Python314_4_x64_Template/include/exports.h rename to Python314_6_x64_Template/include/exports.h diff --git a/Python314_4_x64_Template/include/fileobject.h b/Python314_6_x64_Template/include/fileobject.h similarity index 100% rename from Python314_4_x64_Template/include/fileobject.h rename to Python314_6_x64_Template/include/fileobject.h diff --git a/Python314_4_x64_Template/include/fileutils.h b/Python314_6_x64_Template/include/fileutils.h similarity index 100% rename from Python314_4_x64_Template/include/fileutils.h rename to Python314_6_x64_Template/include/fileutils.h diff --git a/Python314_4_x64_Template/include/floatobject.h b/Python314_6_x64_Template/include/floatobject.h similarity index 100% rename from Python314_4_x64_Template/include/floatobject.h rename to Python314_6_x64_Template/include/floatobject.h diff --git a/Python314_4_x64_Template/include/frameobject.h b/Python314_6_x64_Template/include/frameobject.h similarity index 100% rename from Python314_4_x64_Template/include/frameobject.h rename to Python314_6_x64_Template/include/frameobject.h diff --git a/Python314_4_x64_Template/include/genericaliasobject.h b/Python314_6_x64_Template/include/genericaliasobject.h similarity index 100% rename from Python314_4_x64_Template/include/genericaliasobject.h rename to Python314_6_x64_Template/include/genericaliasobject.h diff --git a/Python314_4_x64_Template/include/import.h b/Python314_6_x64_Template/include/import.h similarity index 100% rename from Python314_4_x64_Template/include/import.h rename to Python314_6_x64_Template/include/import.h diff --git a/Python314_4_x64_Template/include/internal/mimalloc/mimalloc.h b/Python314_6_x64_Template/include/internal/mimalloc/mimalloc.h similarity index 100% rename from Python314_4_x64_Template/include/internal/mimalloc/mimalloc.h rename to Python314_6_x64_Template/include/internal/mimalloc/mimalloc.h diff --git a/Python314_4_x64_Template/include/internal/mimalloc/mimalloc/atomic.h b/Python314_6_x64_Template/include/internal/mimalloc/mimalloc/atomic.h similarity index 100% rename from Python314_4_x64_Template/include/internal/mimalloc/mimalloc/atomic.h rename to Python314_6_x64_Template/include/internal/mimalloc/mimalloc/atomic.h diff --git a/Python314_4_x64_Template/include/internal/mimalloc/mimalloc/internal.h b/Python314_6_x64_Template/include/internal/mimalloc/mimalloc/internal.h similarity index 100% rename from Python314_4_x64_Template/include/internal/mimalloc/mimalloc/internal.h rename to Python314_6_x64_Template/include/internal/mimalloc/mimalloc/internal.h diff --git a/Python314_4_x64_Template/include/internal/mimalloc/mimalloc/prim.h b/Python314_6_x64_Template/include/internal/mimalloc/mimalloc/prim.h similarity index 100% rename from Python314_4_x64_Template/include/internal/mimalloc/mimalloc/prim.h rename to Python314_6_x64_Template/include/internal/mimalloc/mimalloc/prim.h diff --git a/Python314_4_x64_Template/include/internal/mimalloc/mimalloc/track.h b/Python314_6_x64_Template/include/internal/mimalloc/mimalloc/track.h similarity index 100% rename from Python314_4_x64_Template/include/internal/mimalloc/mimalloc/track.h rename to Python314_6_x64_Template/include/internal/mimalloc/mimalloc/track.h diff --git a/Python314_4_x64_Template/include/internal/mimalloc/mimalloc/types.h b/Python314_6_x64_Template/include/internal/mimalloc/mimalloc/types.h similarity index 100% rename from Python314_4_x64_Template/include/internal/mimalloc/mimalloc/types.h rename to Python314_6_x64_Template/include/internal/mimalloc/mimalloc/types.h diff --git a/Python314_4_x64_Template/include/internal/pycore_abstract.h b/Python314_6_x64_Template/include/internal/pycore_abstract.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_abstract.h rename to Python314_6_x64_Template/include/internal/pycore_abstract.h diff --git a/Python314_4_x64_Template/include/internal/pycore_asdl.h b/Python314_6_x64_Template/include/internal/pycore_asdl.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_asdl.h rename to Python314_6_x64_Template/include/internal/pycore_asdl.h diff --git a/Python314_4_x64_Template/include/internal/pycore_ast.h b/Python314_6_x64_Template/include/internal/pycore_ast.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_ast.h rename to Python314_6_x64_Template/include/internal/pycore_ast.h diff --git a/Python314_4_x64_Template/include/internal/pycore_ast_state.h b/Python314_6_x64_Template/include/internal/pycore_ast_state.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_ast_state.h rename to Python314_6_x64_Template/include/internal/pycore_ast_state.h diff --git a/Python314_4_x64_Template/include/internal/pycore_atexit.h b/Python314_6_x64_Template/include/internal/pycore_atexit.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_atexit.h rename to Python314_6_x64_Template/include/internal/pycore_atexit.h diff --git a/Python314_4_x64_Template/include/internal/pycore_audit.h b/Python314_6_x64_Template/include/internal/pycore_audit.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_audit.h rename to Python314_6_x64_Template/include/internal/pycore_audit.h diff --git a/Python314_4_x64_Template/include/internal/pycore_backoff.h b/Python314_6_x64_Template/include/internal/pycore_backoff.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_backoff.h rename to Python314_6_x64_Template/include/internal/pycore_backoff.h diff --git a/Python314_4_x64_Template/include/internal/pycore_bitutils.h b/Python314_6_x64_Template/include/internal/pycore_bitutils.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_bitutils.h rename to Python314_6_x64_Template/include/internal/pycore_bitutils.h diff --git a/Python314_4_x64_Template/include/internal/pycore_blocks_output_buffer.h b/Python314_6_x64_Template/include/internal/pycore_blocks_output_buffer.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_blocks_output_buffer.h rename to Python314_6_x64_Template/include/internal/pycore_blocks_output_buffer.h diff --git a/Python314_4_x64_Template/include/internal/pycore_brc.h b/Python314_6_x64_Template/include/internal/pycore_brc.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_brc.h rename to Python314_6_x64_Template/include/internal/pycore_brc.h diff --git a/Python314_4_x64_Template/include/internal/pycore_bytes_methods.h b/Python314_6_x64_Template/include/internal/pycore_bytes_methods.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_bytes_methods.h rename to Python314_6_x64_Template/include/internal/pycore_bytes_methods.h diff --git a/Python314_4_x64_Template/include/internal/pycore_bytesobject.h b/Python314_6_x64_Template/include/internal/pycore_bytesobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_bytesobject.h rename to Python314_6_x64_Template/include/internal/pycore_bytesobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_c_array.h b/Python314_6_x64_Template/include/internal/pycore_c_array.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_c_array.h rename to Python314_6_x64_Template/include/internal/pycore_c_array.h diff --git a/Python314_4_x64_Template/include/internal/pycore_call.h b/Python314_6_x64_Template/include/internal/pycore_call.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_call.h rename to Python314_6_x64_Template/include/internal/pycore_call.h diff --git a/Python314_4_x64_Template/include/internal/pycore_capsule.h b/Python314_6_x64_Template/include/internal/pycore_capsule.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_capsule.h rename to Python314_6_x64_Template/include/internal/pycore_capsule.h diff --git a/Python314_4_x64_Template/include/internal/pycore_cell.h b/Python314_6_x64_Template/include/internal/pycore_cell.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_cell.h rename to Python314_6_x64_Template/include/internal/pycore_cell.h diff --git a/Python314_4_x64_Template/include/internal/pycore_ceval.h b/Python314_6_x64_Template/include/internal/pycore_ceval.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_ceval.h rename to Python314_6_x64_Template/include/internal/pycore_ceval.h diff --git a/Python314_4_x64_Template/include/internal/pycore_ceval_state.h b/Python314_6_x64_Template/include/internal/pycore_ceval_state.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_ceval_state.h rename to Python314_6_x64_Template/include/internal/pycore_ceval_state.h diff --git a/Python314_4_x64_Template/include/internal/pycore_code.h b/Python314_6_x64_Template/include/internal/pycore_code.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_code.h rename to Python314_6_x64_Template/include/internal/pycore_code.h diff --git a/Python314_4_x64_Template/include/internal/pycore_codecs.h b/Python314_6_x64_Template/include/internal/pycore_codecs.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_codecs.h rename to Python314_6_x64_Template/include/internal/pycore_codecs.h diff --git a/Python314_4_x64_Template/include/internal/pycore_compile.h b/Python314_6_x64_Template/include/internal/pycore_compile.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_compile.h rename to Python314_6_x64_Template/include/internal/pycore_compile.h diff --git a/Python314_4_x64_Template/include/internal/pycore_complexobject.h b/Python314_6_x64_Template/include/internal/pycore_complexobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_complexobject.h rename to Python314_6_x64_Template/include/internal/pycore_complexobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_condvar.h b/Python314_6_x64_Template/include/internal/pycore_condvar.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_condvar.h rename to Python314_6_x64_Template/include/internal/pycore_condvar.h diff --git a/Python314_4_x64_Template/include/internal/pycore_context.h b/Python314_6_x64_Template/include/internal/pycore_context.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_context.h rename to Python314_6_x64_Template/include/internal/pycore_context.h diff --git a/Python314_4_x64_Template/include/internal/pycore_critical_section.h b/Python314_6_x64_Template/include/internal/pycore_critical_section.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_critical_section.h rename to Python314_6_x64_Template/include/internal/pycore_critical_section.h diff --git a/Python314_4_x64_Template/include/internal/pycore_crossinterp.h b/Python314_6_x64_Template/include/internal/pycore_crossinterp.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_crossinterp.h rename to Python314_6_x64_Template/include/internal/pycore_crossinterp.h diff --git a/Python314_4_x64_Template/include/internal/pycore_crossinterp_data_registry.h b/Python314_6_x64_Template/include/internal/pycore_crossinterp_data_registry.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_crossinterp_data_registry.h rename to Python314_6_x64_Template/include/internal/pycore_crossinterp_data_registry.h diff --git a/Python314_4_x64_Template/include/internal/pycore_debug_offsets.h b/Python314_6_x64_Template/include/internal/pycore_debug_offsets.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_debug_offsets.h rename to Python314_6_x64_Template/include/internal/pycore_debug_offsets.h diff --git a/Python314_4_x64_Template/include/internal/pycore_descrobject.h b/Python314_6_x64_Template/include/internal/pycore_descrobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_descrobject.h rename to Python314_6_x64_Template/include/internal/pycore_descrobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_dict.h b/Python314_6_x64_Template/include/internal/pycore_dict.h similarity index 98% rename from Python314_4_x64_Template/include/internal/pycore_dict.h rename to Python314_6_x64_Template/include/internal/pycore_dict.h index cfdc63f4d..77d99891b 100644 --- a/Python314_4_x64_Template/include/internal/pycore_dict.h +++ b/Python314_6_x64_Template/include/internal/pycore_dict.h @@ -286,7 +286,7 @@ _PyDict_NotifyEvent(PyInterpreterState *interp, PyObject *value) { assert(Py_REFCNT((PyObject*)mp) > 0); - int watcher_bits = mp->_ma_watcher_tag & DICT_WATCHER_MASK; + int watcher_bits = FT_ATOMIC_LOAD_UINT64_ACQUIRE(mp->_ma_watcher_tag) & DICT_WATCHER_MASK; if (watcher_bits) { RARE_EVENT_STAT_INC(watched_dict_modification); _PyDict_SendEvent(watcher_bits, event, mp, key, value); @@ -362,7 +362,7 @@ PyDictObject *_PyObject_MaterializeManagedDict_LockHeld(PyObject *); static inline Py_ssize_t _PyDict_UniqueId(PyDictObject *mp) { - return (Py_ssize_t)(mp->_ma_watcher_tag >> DICT_UNIQUE_ID_SHIFT); + return (Py_ssize_t)(FT_ATOMIC_LOAD_UINT64_RELAXED(mp->_ma_watcher_tag) >> DICT_UNIQUE_ID_SHIFT); } static inline void diff --git a/Python314_4_x64_Template/include/internal/pycore_dict_state.h b/Python314_6_x64_Template/include/internal/pycore_dict_state.h similarity index 76% rename from Python314_4_x64_Template/include/internal/pycore_dict_state.h rename to Python314_6_x64_Template/include/internal/pycore_dict_state.h index 11932b8d1..bb6fe2625 100644 --- a/Python314_4_x64_Template/include/internal/pycore_dict_state.h +++ b/Python314_6_x64_Template/include/internal/pycore_dict_state.h @@ -13,6 +13,8 @@ extern "C" { struct _Py_dict_state { uint32_t next_keys_version; + PyMutex watcher_mutex; // Protects the watchers array (free-threaded builds) + _PyOnceFlag watcher_setup_once; // One-time optimizer watcher setup PyDict_WatchCallback watchers[DICT_MAX_WATCHERS]; }; diff --git a/Python314_4_x64_Template/include/internal/pycore_dtoa.h b/Python314_6_x64_Template/include/internal/pycore_dtoa.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_dtoa.h rename to Python314_6_x64_Template/include/internal/pycore_dtoa.h diff --git a/Python314_4_x64_Template/include/internal/pycore_emscripten_signal.h b/Python314_6_x64_Template/include/internal/pycore_emscripten_signal.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_emscripten_signal.h rename to Python314_6_x64_Template/include/internal/pycore_emscripten_signal.h diff --git a/Python314_4_x64_Template/include/internal/pycore_emscripten_trampoline.h b/Python314_6_x64_Template/include/internal/pycore_emscripten_trampoline.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_emscripten_trampoline.h rename to Python314_6_x64_Template/include/internal/pycore_emscripten_trampoline.h diff --git a/Python314_4_x64_Template/include/internal/pycore_exceptions.h b/Python314_6_x64_Template/include/internal/pycore_exceptions.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_exceptions.h rename to Python314_6_x64_Template/include/internal/pycore_exceptions.h diff --git a/Python314_4_x64_Template/include/internal/pycore_faulthandler.h b/Python314_6_x64_Template/include/internal/pycore_faulthandler.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_faulthandler.h rename to Python314_6_x64_Template/include/internal/pycore_faulthandler.h diff --git a/Python314_4_x64_Template/include/internal/pycore_fileutils.h b/Python314_6_x64_Template/include/internal/pycore_fileutils.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_fileutils.h rename to Python314_6_x64_Template/include/internal/pycore_fileutils.h diff --git a/Python314_4_x64_Template/include/internal/pycore_fileutils_windows.h b/Python314_6_x64_Template/include/internal/pycore_fileutils_windows.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_fileutils_windows.h rename to Python314_6_x64_Template/include/internal/pycore_fileutils_windows.h diff --git a/Python314_4_x64_Template/include/internal/pycore_floatobject.h b/Python314_6_x64_Template/include/internal/pycore_floatobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_floatobject.h rename to Python314_6_x64_Template/include/internal/pycore_floatobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_flowgraph.h b/Python314_6_x64_Template/include/internal/pycore_flowgraph.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_flowgraph.h rename to Python314_6_x64_Template/include/internal/pycore_flowgraph.h diff --git a/Python314_4_x64_Template/include/internal/pycore_format.h b/Python314_6_x64_Template/include/internal/pycore_format.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_format.h rename to Python314_6_x64_Template/include/internal/pycore_format.h diff --git a/Python314_4_x64_Template/include/internal/pycore_frame.h b/Python314_6_x64_Template/include/internal/pycore_frame.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_frame.h rename to Python314_6_x64_Template/include/internal/pycore_frame.h diff --git a/Python314_4_x64_Template/include/internal/pycore_freelist.h b/Python314_6_x64_Template/include/internal/pycore_freelist.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_freelist.h rename to Python314_6_x64_Template/include/internal/pycore_freelist.h diff --git a/Python314_4_x64_Template/include/internal/pycore_freelist_state.h b/Python314_6_x64_Template/include/internal/pycore_freelist_state.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_freelist_state.h rename to Python314_6_x64_Template/include/internal/pycore_freelist_state.h diff --git a/Python314_4_x64_Template/include/internal/pycore_function.h b/Python314_6_x64_Template/include/internal/pycore_function.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_function.h rename to Python314_6_x64_Template/include/internal/pycore_function.h diff --git a/Python314_4_x64_Template/include/internal/pycore_gc.h b/Python314_6_x64_Template/include/internal/pycore_gc.h similarity index 90% rename from Python314_4_x64_Template/include/internal/pycore_gc.h rename to Python314_6_x64_Template/include/internal/pycore_gc.h index fd284d0e4..bfe52f42f 100644 --- a/Python314_4_x64_Template/include/internal/pycore_gc.h +++ b/Python314_6_x64_Template/include/internal/pycore_gc.h @@ -118,21 +118,6 @@ static inline void _PyObject_GC_SET_SHARED(PyObject *op) { /* Bit 1 is set when the object is in generation which is GCed currently. */ #define _PyGC_PREV_MASK_COLLECTING ((uintptr_t)2) -/* Bit 0 in _gc_next is the old space bit. - * It is set as follows: - * Young: gcstate->visited_space - * old[0]: 0 - * old[1]: 1 - * permanent: 0 - * - * During a collection all objects handled should have the bit set to - * gcstate->visited_space, as objects are moved from the young gen - * and the increment into old[gcstate->visited_space]. - * When object are moved from the pending space, old[gcstate->visited_space^1] - * into the increment, the old space bit is flipped. -*/ -#define _PyGC_NEXT_MASK_OLD_SPACE_1 1 - #define _PyGC_PREV_SHIFT 2 #define _PyGC_PREV_MASK (((uintptr_t) -1) << _PyGC_PREV_SHIFT) @@ -159,13 +144,11 @@ typedef enum { // Lowest bit of _gc_next is used for flags only in GC. // But it is always 0 for normal code. static inline PyGC_Head* _PyGCHead_NEXT(PyGC_Head *gc) { - uintptr_t next = gc->_gc_next & _PyGC_PREV_MASK; + uintptr_t next = gc->_gc_next; return (PyGC_Head*)next; } static inline void _PyGCHead_SET_NEXT(PyGC_Head *gc, PyGC_Head *next) { - uintptr_t unext = (uintptr_t)next; - assert((unext & ~_PyGC_PREV_MASK) == 0); - gc->_gc_next = (gc->_gc_next & ~_PyGC_PREV_MASK) | unext; + gc->_gc_next = (uintptr_t)next; } // Lowest two bits of _gc_prev is used for _PyGC_PREV_MASK_* flags. @@ -207,10 +190,6 @@ static inline void _PyGC_CLEAR_FINALIZED(PyObject *op) { extern void _Py_ScheduleGC(PyThreadState *tstate); -#ifndef Py_GIL_DISABLED -extern void _Py_TriggerGC(struct _gc_runtime_state *gcstate); -#endif - /* Tell the GC to track this object. * @@ -220,7 +199,7 @@ extern void _Py_TriggerGC(struct _gc_runtime_state *gcstate); * ob_traverse method. * * Internal note: interp->gc.generation0->_gc_prev doesn't have any bit flags - * because it's not object header. So we don't use _PyGCHead_PREV() and + * because it's not an object header. So we don't use _PyGCHead_PREV() and * _PyGCHead_SET_PREV() for it to avoid unnecessary bitwise operations. * * See also the public PyObject_GC_Track() function. @@ -245,18 +224,13 @@ static inline void _PyObject_GC_TRACK( filename, lineno, __func__); struct _gc_runtime_state *gcstate = &_PyInterpreterState_GET()->gc; - PyGC_Head *generation0 = &gcstate->young.head; + PyGC_Head *generation0 = gcstate->generation0; PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev); _PyGCHead_SET_NEXT(last, gc); _PyGCHead_SET_PREV(gc, last); - uintptr_t not_visited = 1 ^ gcstate->visited_space; - gc->_gc_next = ((uintptr_t)generation0) | not_visited; + _PyGCHead_SET_NEXT(gc, generation0); generation0->_gc_prev = (uintptr_t)gc; - gcstate->young.count++; /* number of tracked GC objects */ gcstate->heap_size++; - if (gcstate->young.count > gcstate->young.threshold) { - _Py_TriggerGC(gcstate); - } #endif } @@ -292,9 +266,6 @@ static inline void _PyObject_GC_UNTRACK( gc->_gc_next = 0; gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED; struct _gc_runtime_state *gcstate = &_PyInterpreterState_GET()->gc; - if (gcstate->young.count > 0) { - gcstate->young.count--; - } gcstate->heap_size--; #endif } diff --git a/Python314_4_x64_Template/include/internal/pycore_genobject.h b/Python314_6_x64_Template/include/internal/pycore_genobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_genobject.h rename to Python314_6_x64_Template/include/internal/pycore_genobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_getopt.h b/Python314_6_x64_Template/include/internal/pycore_getopt.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_getopt.h rename to Python314_6_x64_Template/include/internal/pycore_getopt.h diff --git a/Python314_4_x64_Template/include/internal/pycore_gil.h b/Python314_6_x64_Template/include/internal/pycore_gil.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_gil.h rename to Python314_6_x64_Template/include/internal/pycore_gil.h diff --git a/Python314_4_x64_Template/include/internal/pycore_global_objects.h b/Python314_6_x64_Template/include/internal/pycore_global_objects.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_global_objects.h rename to Python314_6_x64_Template/include/internal/pycore_global_objects.h diff --git a/Python314_4_x64_Template/include/internal/pycore_global_objects_fini_generated.h b/Python314_6_x64_Template/include/internal/pycore_global_objects_fini_generated.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_global_objects_fini_generated.h rename to Python314_6_x64_Template/include/internal/pycore_global_objects_fini_generated.h diff --git a/Python314_4_x64_Template/include/internal/pycore_global_strings.h b/Python314_6_x64_Template/include/internal/pycore_global_strings.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_global_strings.h rename to Python314_6_x64_Template/include/internal/pycore_global_strings.h diff --git a/Python314_4_x64_Template/include/internal/pycore_hamt.h b/Python314_6_x64_Template/include/internal/pycore_hamt.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_hamt.h rename to Python314_6_x64_Template/include/internal/pycore_hamt.h diff --git a/Python314_4_x64_Template/include/internal/pycore_hashtable.h b/Python314_6_x64_Template/include/internal/pycore_hashtable.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_hashtable.h rename to Python314_6_x64_Template/include/internal/pycore_hashtable.h diff --git a/Python314_4_x64_Template/include/internal/pycore_import.h b/Python314_6_x64_Template/include/internal/pycore_import.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_import.h rename to Python314_6_x64_Template/include/internal/pycore_import.h diff --git a/Python314_4_x64_Template/include/internal/pycore_importdl.h b/Python314_6_x64_Template/include/internal/pycore_importdl.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_importdl.h rename to Python314_6_x64_Template/include/internal/pycore_importdl.h diff --git a/Python314_4_x64_Template/include/internal/pycore_index_pool.h b/Python314_6_x64_Template/include/internal/pycore_index_pool.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_index_pool.h rename to Python314_6_x64_Template/include/internal/pycore_index_pool.h diff --git a/Python314_4_x64_Template/include/internal/pycore_initconfig.h b/Python314_6_x64_Template/include/internal/pycore_initconfig.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_initconfig.h rename to Python314_6_x64_Template/include/internal/pycore_initconfig.h diff --git a/Python314_4_x64_Template/include/internal/pycore_instruction_sequence.h b/Python314_6_x64_Template/include/internal/pycore_instruction_sequence.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_instruction_sequence.h rename to Python314_6_x64_Template/include/internal/pycore_instruction_sequence.h diff --git a/Python314_4_x64_Template/include/internal/pycore_instruments.h b/Python314_6_x64_Template/include/internal/pycore_instruments.h similarity index 97% rename from Python314_4_x64_Template/include/internal/pycore_instruments.h rename to Python314_6_x64_Template/include/internal/pycore_instruments.h index 7658adca7..98684ff10 100644 --- a/Python314_4_x64_Template/include/internal/pycore_instruments.h +++ b/Python314_6_x64_Template/include/internal/pycore_instruments.h @@ -62,9 +62,6 @@ extern void _Py_call_instrumentation_exc2(PyThreadState *tstate, int event, _PyInterpreterFrame *frame, _Py_CODEUNIT *instr, PyObject *arg0, PyObject *arg1); -extern int -_Py_Instrumentation_GetLine(PyCodeObject *code, int index); - extern PyObject _PyInstrumentation_MISSING; extern PyObject _PyInstrumentation_DISABLE; @@ -120,6 +117,8 @@ typedef struct _PyCoMonitoringData { uint8_t *per_instruction_tools; } _PyCoMonitoringData; +extern int +_Py_Instrumentation_GetLine(PyCodeObject *code, _PyCoLineInstrumentationData *line_data, int index); #ifdef __cplusplus } diff --git a/Python314_4_x64_Template/include/internal/pycore_interp.h b/Python314_6_x64_Template/include/internal/pycore_interp.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_interp.h rename to Python314_6_x64_Template/include/internal/pycore_interp.h diff --git a/Python314_4_x64_Template/include/internal/pycore_interp_structs.h b/Python314_6_x64_Template/include/internal/pycore_interp_structs.h similarity index 97% rename from Python314_4_x64_Template/include/internal/pycore_interp_structs.h rename to Python314_6_x64_Template/include/internal/pycore_interp_structs.h index c3d9533e9..b93d6d3c8 100644 --- a/Python314_4_x64_Template/include/internal/pycore_interp_structs.h +++ b/Python314_6_x64_Template/include/internal/pycore_interp_structs.h @@ -195,11 +195,6 @@ struct gc_generation_stats { Py_ssize_t uncollectable; }; -enum _GCPhase { - GC_PHASE_MARK = 0, - GC_PHASE_COLLECT = 1 -}; - /* If we change this, we need to change the default value in the signature of gc.collect. */ #define NUM_GENERATIONS 3 @@ -215,8 +210,13 @@ struct _gc_runtime_state { int enabled; int debug; /* linked lists of container objects */ +#ifndef Py_GIL_DISABLED + struct gc_generation generations[NUM_GENERATIONS]; +#else struct gc_generation young; struct gc_generation old[2]; +#endif + /* a permanent generation which won't be collected */ struct gc_generation permanent_generation; struct gc_generation_stats generation_stats[NUM_GENERATIONS]; @@ -227,13 +227,14 @@ struct _gc_runtime_state { /* a list of callbacks to be invoked when collection is performed */ PyObject *callbacks; + /* The number of live objects. */ Py_ssize_t heap_size; - Py_ssize_t work_to_do; - /* Which of the old spaces is the visited space */ - int visited_space; - int phase; -#ifdef Py_GIL_DISABLED + /* dummy members to preserve other offsets */ + Py_ssize_t dummy1; /* was work_to_do */ + int dummy2; /* was visited_space */ + int dummy3; /* was phase */ + /* This is the number of objects that survived the last full collection. It approximates the number of long lived objects tracked by the GC. @@ -246,6 +247,7 @@ struct _gc_runtime_state { the first time. */ Py_ssize_t long_lived_pending; +#ifdef Py_GIL_DISABLED /* True if gc.freeze() has been used. */ int freeze_active; @@ -258,9 +260,28 @@ struct _gc_runtime_state { /* Mutex held for gc_should_collect_mem_usage(). */ PyMutex mutex; +#else + PyGC_Head *generation0; #endif }; +#ifndef Py_GIL_DISABLED +#define GC_GENERATION_INIT \ + .generations = { \ + { .threshold = 2000, }, \ + { .threshold = 10, }, \ + { .threshold = 10, }, \ + }, \ + .heap_size = 0, +#else +#define GC_GENERATION_INIT \ + .young = { .threshold = 2000, }, \ + .old = { \ + { .threshold = 10, }, \ + { .threshold = 10, }, \ + }, +#endif + #include "pycore_gil.h" // struct _gil_runtime_state /**** Import ********/ diff --git a/Python314_4_x64_Template/include/internal/pycore_interpframe.h b/Python314_6_x64_Template/include/internal/pycore_interpframe.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_interpframe.h rename to Python314_6_x64_Template/include/internal/pycore_interpframe.h diff --git a/Python314_4_x64_Template/include/internal/pycore_interpframe_structs.h b/Python314_6_x64_Template/include/internal/pycore_interpframe_structs.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_interpframe_structs.h rename to Python314_6_x64_Template/include/internal/pycore_interpframe_structs.h diff --git a/Python314_4_x64_Template/include/internal/pycore_interpolation.h b/Python314_6_x64_Template/include/internal/pycore_interpolation.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_interpolation.h rename to Python314_6_x64_Template/include/internal/pycore_interpolation.h diff --git a/Python314_4_x64_Template/include/internal/pycore_intrinsics.h b/Python314_6_x64_Template/include/internal/pycore_intrinsics.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_intrinsics.h rename to Python314_6_x64_Template/include/internal/pycore_intrinsics.h diff --git a/Python314_4_x64_Template/include/internal/pycore_jit.h b/Python314_6_x64_Template/include/internal/pycore_jit.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_jit.h rename to Python314_6_x64_Template/include/internal/pycore_jit.h diff --git a/Python314_4_x64_Template/include/internal/pycore_list.h b/Python314_6_x64_Template/include/internal/pycore_list.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_list.h rename to Python314_6_x64_Template/include/internal/pycore_list.h diff --git a/Python314_4_x64_Template/include/internal/pycore_llist.h b/Python314_6_x64_Template/include/internal/pycore_llist.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_llist.h rename to Python314_6_x64_Template/include/internal/pycore_llist.h diff --git a/Python314_4_x64_Template/include/internal/pycore_lock.h b/Python314_6_x64_Template/include/internal/pycore_lock.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_lock.h rename to Python314_6_x64_Template/include/internal/pycore_lock.h diff --git a/Python314_4_x64_Template/include/internal/pycore_long.h b/Python314_6_x64_Template/include/internal/pycore_long.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_long.h rename to Python314_6_x64_Template/include/internal/pycore_long.h diff --git a/Python314_4_x64_Template/include/internal/pycore_magic_number.h b/Python314_6_x64_Template/include/internal/pycore_magic_number.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_magic_number.h rename to Python314_6_x64_Template/include/internal/pycore_magic_number.h diff --git a/Python314_4_x64_Template/include/internal/pycore_memoryobject.h b/Python314_6_x64_Template/include/internal/pycore_memoryobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_memoryobject.h rename to Python314_6_x64_Template/include/internal/pycore_memoryobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_mimalloc.h b/Python314_6_x64_Template/include/internal/pycore_mimalloc.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_mimalloc.h rename to Python314_6_x64_Template/include/internal/pycore_mimalloc.h diff --git a/Python314_4_x64_Template/include/internal/pycore_modsupport.h b/Python314_6_x64_Template/include/internal/pycore_modsupport.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_modsupport.h rename to Python314_6_x64_Template/include/internal/pycore_modsupport.h diff --git a/Python314_4_x64_Template/include/internal/pycore_moduleobject.h b/Python314_6_x64_Template/include/internal/pycore_moduleobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_moduleobject.h rename to Python314_6_x64_Template/include/internal/pycore_moduleobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_namespace.h b/Python314_6_x64_Template/include/internal/pycore_namespace.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_namespace.h rename to Python314_6_x64_Template/include/internal/pycore_namespace.h diff --git a/Python314_4_x64_Template/include/internal/pycore_object.h b/Python314_6_x64_Template/include/internal/pycore_object.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_object.h rename to Python314_6_x64_Template/include/internal/pycore_object.h diff --git a/Python314_4_x64_Template/include/internal/pycore_object_alloc.h b/Python314_6_x64_Template/include/internal/pycore_object_alloc.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_object_alloc.h rename to Python314_6_x64_Template/include/internal/pycore_object_alloc.h diff --git a/Python314_4_x64_Template/include/internal/pycore_object_deferred.h b/Python314_6_x64_Template/include/internal/pycore_object_deferred.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_object_deferred.h rename to Python314_6_x64_Template/include/internal/pycore_object_deferred.h diff --git a/Python314_4_x64_Template/include/internal/pycore_object_stack.h b/Python314_6_x64_Template/include/internal/pycore_object_stack.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_object_stack.h rename to Python314_6_x64_Template/include/internal/pycore_object_stack.h diff --git a/Python314_4_x64_Template/include/internal/pycore_object_state.h b/Python314_6_x64_Template/include/internal/pycore_object_state.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_object_state.h rename to Python314_6_x64_Template/include/internal/pycore_object_state.h diff --git a/Python314_4_x64_Template/include/internal/pycore_obmalloc.h b/Python314_6_x64_Template/include/internal/pycore_obmalloc.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_obmalloc.h rename to Python314_6_x64_Template/include/internal/pycore_obmalloc.h diff --git a/Python314_4_x64_Template/include/internal/pycore_obmalloc_init.h b/Python314_6_x64_Template/include/internal/pycore_obmalloc_init.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_obmalloc_init.h rename to Python314_6_x64_Template/include/internal/pycore_obmalloc_init.h diff --git a/Python314_4_x64_Template/include/internal/pycore_opcode_metadata.h b/Python314_6_x64_Template/include/internal/pycore_opcode_metadata.h similarity index 99% rename from Python314_4_x64_Template/include/internal/pycore_opcode_metadata.h rename to Python314_6_x64_Template/include/internal/pycore_opcode_metadata.h index ccd10e90f..273e1d838 100644 --- a/Python314_4_x64_Template/include/internal/pycore_opcode_metadata.h +++ b/Python314_6_x64_Template/include/internal/pycore_opcode_metadata.h @@ -1271,7 +1271,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = { [SEND_GEN] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG }, [SETUP_ANNOTATIONS] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, [SET_ADD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, - [SET_FUNCTION_ATTRIBUTE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG }, + [SET_FUNCTION_ATTRIBUTE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, [SET_UPDATE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, [STORE_ATTR] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, [STORE_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IXC000, HAS_EXIT_FLAG | HAS_ESCAPES_FLAG }, @@ -1304,7 +1304,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = { [UNPACK_SEQUENCE_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG }, [UNPACK_SEQUENCE_TWO_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG }, [WITH_EXCEPT_START] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, - [YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG }, + [YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ESCAPES_FLAG }, [ANNOTATIONS_PLACEHOLDER] = { true, -1, HAS_PURE_FLAG }, [JUMP] = { true, -1, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, [JUMP_IF_FALSE] = { true, -1, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, diff --git a/Python314_4_x64_Template/include/internal/pycore_opcode_utils.h b/Python314_6_x64_Template/include/internal/pycore_opcode_utils.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_opcode_utils.h rename to Python314_6_x64_Template/include/internal/pycore_opcode_utils.h diff --git a/Python314_4_x64_Template/include/internal/pycore_optimizer.h b/Python314_6_x64_Template/include/internal/pycore_optimizer.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_optimizer.h rename to Python314_6_x64_Template/include/internal/pycore_optimizer.h diff --git a/Python314_4_x64_Template/include/internal/pycore_parking_lot.h b/Python314_6_x64_Template/include/internal/pycore_parking_lot.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_parking_lot.h rename to Python314_6_x64_Template/include/internal/pycore_parking_lot.h diff --git a/Python314_4_x64_Template/include/internal/pycore_parser.h b/Python314_6_x64_Template/include/internal/pycore_parser.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_parser.h rename to Python314_6_x64_Template/include/internal/pycore_parser.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pathconfig.h b/Python314_6_x64_Template/include/internal/pycore_pathconfig.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pathconfig.h rename to Python314_6_x64_Template/include/internal/pycore_pathconfig.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pyarena.h b/Python314_6_x64_Template/include/internal/pycore_pyarena.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pyarena.h rename to Python314_6_x64_Template/include/internal/pycore_pyarena.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pyatomic_ft_wrappers.h b/Python314_6_x64_Template/include/internal/pycore_pyatomic_ft_wrappers.h similarity index 90% rename from Python314_4_x64_Template/include/internal/pycore_pyatomic_ft_wrappers.h rename to Python314_6_x64_Template/include/internal/pycore_pyatomic_ft_wrappers.h index be0335a23..bcb9e01a5 100644 --- a/Python314_4_x64_Template/include/internal/pycore_pyatomic_ft_wrappers.h +++ b/Python314_6_x64_Template/include/internal/pycore_pyatomic_ft_wrappers.h @@ -47,6 +47,10 @@ extern "C" { _Py_atomic_load_uint16_relaxed(&value) #define FT_ATOMIC_LOAD_UINT32_RELAXED(value) \ _Py_atomic_load_uint32_relaxed(&value) +#define FT_ATOMIC_LOAD_UINT64_ACQUIRE(value) \ + _Py_atomic_load_uint64_acquire(&value) +#define FT_ATOMIC_LOAD_UINT64_RELAXED(value) \ + _Py_atomic_load_uint64_relaxed(&value) #define FT_ATOMIC_LOAD_ULONG_RELAXED(value) \ _Py_atomic_load_ulong_relaxed(&value) #define FT_ATOMIC_STORE_PTR_RELAXED(value, new_value) \ @@ -63,6 +67,12 @@ extern "C" { _Py_atomic_store_uint16_relaxed(&value, new_value) #define FT_ATOMIC_STORE_UINT32_RELAXED(value, new_value) \ _Py_atomic_store_uint32_relaxed(&value, new_value) +#define FT_ATOMIC_AND_UINT64(value, new_value) \ + (void)_Py_atomic_and_uint64(&value, new_value) +#define FT_ATOMIC_OR_UINT64(value, new_value) \ + (void)_Py_atomic_or_uint64(&value, new_value) +#define FT_ATOMIC_ADD_UINT64(value, new_value) \ + (void)_Py_atomic_add_uint64(&value, new_value) #define FT_ATOMIC_STORE_CHAR_RELAXED(value, new_value) \ _Py_atomic_store_char_relaxed(&value, new_value) #define FT_ATOMIC_LOAD_CHAR_RELAXED(value) \ @@ -122,6 +132,7 @@ extern "C" { #define FT_ATOMIC_ADD_SSIZE(value, new_value) \ (void)_Py_atomic_add_ssize(&value, new_value) #define FT_MUTEX_LOCK(lock) PyMutex_Lock(lock) +#define FT_MUTEX_LOCK_FLAGS(lock, flags) PyMutex_LockFlags(lock, flags) #define FT_MUTEX_UNLOCK(lock) PyMutex_Unlock(lock) #else @@ -139,6 +150,8 @@ extern "C" { #define FT_ATOMIC_LOAD_UINT8_RELAXED(value) value #define FT_ATOMIC_LOAD_UINT16_RELAXED(value) value #define FT_ATOMIC_LOAD_UINT32_RELAXED(value) value +#define FT_ATOMIC_LOAD_UINT64_ACQUIRE(value) value +#define FT_ATOMIC_LOAD_UINT64_RELAXED(value) value #define FT_ATOMIC_LOAD_ULONG_RELAXED(value) value #define FT_ATOMIC_STORE_PTR_RELAXED(value, new_value) value = new_value #define FT_ATOMIC_STORE_PTR_RELEASE(value, new_value) value = new_value @@ -148,6 +161,9 @@ extern "C" { #define FT_ATOMIC_STORE_UINT8_RELAXED(value, new_value) value = new_value #define FT_ATOMIC_STORE_UINT16_RELAXED(value, new_value) value = new_value #define FT_ATOMIC_STORE_UINT32_RELAXED(value, new_value) value = new_value +#define FT_ATOMIC_AND_UINT64(value, new_value) (void)(value &= new_value) +#define FT_ATOMIC_OR_UINT64(value, new_value) (void)(value |= new_value) +#define FT_ATOMIC_ADD_UINT64(value, new_value) (void)(value += new_value) #define FT_ATOMIC_LOAD_CHAR_RELAXED(value) value #define FT_ATOMIC_STORE_CHAR_RELAXED(value, new_value) value = new_value #define FT_ATOMIC_LOAD_UCHAR_RELAXED(value) value @@ -177,6 +193,7 @@ extern "C" { #define FT_ATOMIC_STORE_ULLONG_RELAXED(value, new_value) value = new_value #define FT_ATOMIC_ADD_SSIZE(value, new_value) (void)(value += new_value) #define FT_MUTEX_LOCK(lock) do {} while (0) +#define FT_MUTEX_LOCK_FLAGS(lock, flags) do {} while (0) #define FT_MUTEX_UNLOCK(lock) do {} while (0) #endif diff --git a/Python314_4_x64_Template/include/internal/pycore_pybuffer.h b/Python314_6_x64_Template/include/internal/pycore_pybuffer.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pybuffer.h rename to Python314_6_x64_Template/include/internal/pycore_pybuffer.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pyerrors.h b/Python314_6_x64_Template/include/internal/pycore_pyerrors.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pyerrors.h rename to Python314_6_x64_Template/include/internal/pycore_pyerrors.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pyhash.h b/Python314_6_x64_Template/include/internal/pycore_pyhash.h similarity index 90% rename from Python314_4_x64_Template/include/internal/pycore_pyhash.h rename to Python314_6_x64_Template/include/internal/pycore_pyhash.h index 84cb72fa6..3056dc44c 100644 --- a/Python314_4_x64_Template/include/internal/pycore_pyhash.h +++ b/Python314_6_x64_Template/include/internal/pycore_pyhash.h @@ -27,14 +27,14 @@ _Py_HashPointerRaw(const void *ptr) * pppppppp ssssssss ........ fnv -- two Py_hash_t * k0k0k0k0 k1k1k1k1 ........ siphash -- two uint64_t * ........ ........ ssssssss djbx33a -- 16 bytes padding + one Py_hash_t - * ........ ........ eeeeeeee pyexpat XML hash salt + * eeeeeeee eeeeeeee eeeeeeee pyexpat XML hash salt * * memory layout on 32 bit systems * cccccccc cccccccc cccccccc uc * ppppssss ........ ........ fnv -- two Py_hash_t * k0k0k0k0 k1k1k1k1 ........ siphash -- two uint64_t (*) * ........ ........ ssss.... djbx33a -- 16 bytes padding + one Py_hash_t - * ........ ........ eeee.... pyexpat XML hash salt + * eeeeeeee eeeeeeee eeee.... pyexpat XML hash salt * * (*) The siphash member may not be available on 32 bit platforms without * an unsigned int64 data type. @@ -58,7 +58,9 @@ typedef union { Py_hash_t suffix; } djbx33a; struct { - unsigned char padding[16]; + /* 16 bytes for XML_SetHashSalt16Bytes */ + uint8_t hashsalt16[16]; + /* 4/8 bytes for legacy XML_SetHashSalt */ Py_hash_t hashsalt; } expat; } _Py_HashSecret_t; diff --git a/Python314_4_x64_Template/include/internal/pycore_pylifecycle.h b/Python314_6_x64_Template/include/internal/pycore_pylifecycle.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pylifecycle.h rename to Python314_6_x64_Template/include/internal/pycore_pylifecycle.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pymath.h b/Python314_6_x64_Template/include/internal/pycore_pymath.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pymath.h rename to Python314_6_x64_Template/include/internal/pycore_pymath.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pymem.h b/Python314_6_x64_Template/include/internal/pycore_pymem.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pymem.h rename to Python314_6_x64_Template/include/internal/pycore_pymem.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pymem_init.h b/Python314_6_x64_Template/include/internal/pycore_pymem_init.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pymem_init.h rename to Python314_6_x64_Template/include/internal/pycore_pymem_init.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pystate.h b/Python314_6_x64_Template/include/internal/pycore_pystate.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pystate.h rename to Python314_6_x64_Template/include/internal/pycore_pystate.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pystats.h b/Python314_6_x64_Template/include/internal/pycore_pystats.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pystats.h rename to Python314_6_x64_Template/include/internal/pycore_pystats.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pythonrun.h b/Python314_6_x64_Template/include/internal/pycore_pythonrun.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pythonrun.h rename to Python314_6_x64_Template/include/internal/pycore_pythonrun.h diff --git a/Python314_4_x64_Template/include/internal/pycore_pythread.h b/Python314_6_x64_Template/include/internal/pycore_pythread.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_pythread.h rename to Python314_6_x64_Template/include/internal/pycore_pythread.h diff --git a/Python314_4_x64_Template/include/internal/pycore_qsbr.h b/Python314_6_x64_Template/include/internal/pycore_qsbr.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_qsbr.h rename to Python314_6_x64_Template/include/internal/pycore_qsbr.h diff --git a/Python314_4_x64_Template/include/internal/pycore_range.h b/Python314_6_x64_Template/include/internal/pycore_range.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_range.h rename to Python314_6_x64_Template/include/internal/pycore_range.h diff --git a/Python314_4_x64_Template/include/internal/pycore_runtime.h b/Python314_6_x64_Template/include/internal/pycore_runtime.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_runtime.h rename to Python314_6_x64_Template/include/internal/pycore_runtime.h diff --git a/Python314_4_x64_Template/include/internal/pycore_runtime_init.h b/Python314_6_x64_Template/include/internal/pycore_runtime_init.h similarity index 97% rename from Python314_4_x64_Template/include/internal/pycore_runtime_init.h rename to Python314_6_x64_Template/include/internal/pycore_runtime_init.h index 4200d91a2..e250d84d2 100644 --- a/Python314_4_x64_Template/include/internal/pycore_runtime_init.h +++ b/Python314_6_x64_Template/include/internal/pycore_runtime_init.h @@ -137,13 +137,7 @@ extern PyTypeObject _PyExc_MemoryError; }, \ .gc = { \ .enabled = 1, \ - .young = { .threshold = 2000, }, \ - .old = { \ - { .threshold = 10, }, \ - { .threshold = 0, }, \ - }, \ - .work_to_do = -5000, \ - .phase = GC_PHASE_MARK, \ + GC_GENERATION_INIT \ }, \ .qsbr = { \ .wr_seq = QSBR_INITIAL, \ diff --git a/Python314_4_x64_Template/include/internal/pycore_runtime_init_generated.h b/Python314_6_x64_Template/include/internal/pycore_runtime_init_generated.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_runtime_init_generated.h rename to Python314_6_x64_Template/include/internal/pycore_runtime_init_generated.h diff --git a/Python314_4_x64_Template/include/internal/pycore_runtime_structs.h b/Python314_6_x64_Template/include/internal/pycore_runtime_structs.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_runtime_structs.h rename to Python314_6_x64_Template/include/internal/pycore_runtime_structs.h diff --git a/Python314_4_x64_Template/include/internal/pycore_semaphore.h b/Python314_6_x64_Template/include/internal/pycore_semaphore.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_semaphore.h rename to Python314_6_x64_Template/include/internal/pycore_semaphore.h diff --git a/Python314_4_x64_Template/include/internal/pycore_setobject.h b/Python314_6_x64_Template/include/internal/pycore_setobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_setobject.h rename to Python314_6_x64_Template/include/internal/pycore_setobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_signal.h b/Python314_6_x64_Template/include/internal/pycore_signal.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_signal.h rename to Python314_6_x64_Template/include/internal/pycore_signal.h diff --git a/Python314_4_x64_Template/include/internal/pycore_sliceobject.h b/Python314_6_x64_Template/include/internal/pycore_sliceobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_sliceobject.h rename to Python314_6_x64_Template/include/internal/pycore_sliceobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_stackref.h b/Python314_6_x64_Template/include/internal/pycore_stackref.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_stackref.h rename to Python314_6_x64_Template/include/internal/pycore_stackref.h diff --git a/Python314_4_x64_Template/include/internal/pycore_stats.h b/Python314_6_x64_Template/include/internal/pycore_stats.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_stats.h rename to Python314_6_x64_Template/include/internal/pycore_stats.h diff --git a/Python314_4_x64_Template/include/internal/pycore_strhex.h b/Python314_6_x64_Template/include/internal/pycore_strhex.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_strhex.h rename to Python314_6_x64_Template/include/internal/pycore_strhex.h diff --git a/Python314_4_x64_Template/include/internal/pycore_structs.h b/Python314_6_x64_Template/include/internal/pycore_structs.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_structs.h rename to Python314_6_x64_Template/include/internal/pycore_structs.h diff --git a/Python314_4_x64_Template/include/internal/pycore_structseq.h b/Python314_6_x64_Template/include/internal/pycore_structseq.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_structseq.h rename to Python314_6_x64_Template/include/internal/pycore_structseq.h diff --git a/Python314_4_x64_Template/include/internal/pycore_symtable.h b/Python314_6_x64_Template/include/internal/pycore_symtable.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_symtable.h rename to Python314_6_x64_Template/include/internal/pycore_symtable.h diff --git a/Python314_4_x64_Template/include/internal/pycore_sysmodule.h b/Python314_6_x64_Template/include/internal/pycore_sysmodule.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_sysmodule.h rename to Python314_6_x64_Template/include/internal/pycore_sysmodule.h diff --git a/Python314_4_x64_Template/include/internal/pycore_template.h b/Python314_6_x64_Template/include/internal/pycore_template.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_template.h rename to Python314_6_x64_Template/include/internal/pycore_template.h diff --git a/Python314_4_x64_Template/include/internal/pycore_time.h b/Python314_6_x64_Template/include/internal/pycore_time.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_time.h rename to Python314_6_x64_Template/include/internal/pycore_time.h diff --git a/Python314_4_x64_Template/include/internal/pycore_token.h b/Python314_6_x64_Template/include/internal/pycore_token.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_token.h rename to Python314_6_x64_Template/include/internal/pycore_token.h diff --git a/Python314_4_x64_Template/include/internal/pycore_traceback.h b/Python314_6_x64_Template/include/internal/pycore_traceback.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_traceback.h rename to Python314_6_x64_Template/include/internal/pycore_traceback.h diff --git a/Python314_4_x64_Template/include/internal/pycore_tracemalloc.h b/Python314_6_x64_Template/include/internal/pycore_tracemalloc.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_tracemalloc.h rename to Python314_6_x64_Template/include/internal/pycore_tracemalloc.h diff --git a/Python314_4_x64_Template/include/internal/pycore_tstate.h b/Python314_6_x64_Template/include/internal/pycore_tstate.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_tstate.h rename to Python314_6_x64_Template/include/internal/pycore_tstate.h diff --git a/Python314_4_x64_Template/include/internal/pycore_tuple.h b/Python314_6_x64_Template/include/internal/pycore_tuple.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_tuple.h rename to Python314_6_x64_Template/include/internal/pycore_tuple.h diff --git a/Python314_4_x64_Template/include/internal/pycore_typedefs.h b/Python314_6_x64_Template/include/internal/pycore_typedefs.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_typedefs.h rename to Python314_6_x64_Template/include/internal/pycore_typedefs.h diff --git a/Python314_4_x64_Template/include/internal/pycore_typeobject.h b/Python314_6_x64_Template/include/internal/pycore_typeobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_typeobject.h rename to Python314_6_x64_Template/include/internal/pycore_typeobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_typevarobject.h b/Python314_6_x64_Template/include/internal/pycore_typevarobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_typevarobject.h rename to Python314_6_x64_Template/include/internal/pycore_typevarobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_ucnhash.h b/Python314_6_x64_Template/include/internal/pycore_ucnhash.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_ucnhash.h rename to Python314_6_x64_Template/include/internal/pycore_ucnhash.h diff --git a/Python314_4_x64_Template/include/internal/pycore_unicodeobject.h b/Python314_6_x64_Template/include/internal/pycore_unicodeobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_unicodeobject.h rename to Python314_6_x64_Template/include/internal/pycore_unicodeobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_unicodeobject_generated.h b/Python314_6_x64_Template/include/internal/pycore_unicodeobject_generated.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_unicodeobject_generated.h rename to Python314_6_x64_Template/include/internal/pycore_unicodeobject_generated.h diff --git a/Python314_4_x64_Template/include/internal/pycore_unionobject.h b/Python314_6_x64_Template/include/internal/pycore_unionobject.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_unionobject.h rename to Python314_6_x64_Template/include/internal/pycore_unionobject.h diff --git a/Python314_4_x64_Template/include/internal/pycore_uniqueid.h b/Python314_6_x64_Template/include/internal/pycore_uniqueid.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_uniqueid.h rename to Python314_6_x64_Template/include/internal/pycore_uniqueid.h diff --git a/Python314_4_x64_Template/include/internal/pycore_uop_ids.h b/Python314_6_x64_Template/include/internal/pycore_uop_ids.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_uop_ids.h rename to Python314_6_x64_Template/include/internal/pycore_uop_ids.h diff --git a/Python314_4_x64_Template/include/internal/pycore_uop_metadata.h b/Python314_6_x64_Template/include/internal/pycore_uop_metadata.h similarity index 99% rename from Python314_4_x64_Template/include/internal/pycore_uop_metadata.h rename to Python314_6_x64_Template/include/internal/pycore_uop_metadata.h index 2166a6900..efdd9395d 100644 --- a/Python314_4_x64_Template/include/internal/pycore_uop_metadata.h +++ b/Python314_6_x64_Template/include/internal/pycore_uop_metadata.h @@ -122,7 +122,7 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = { [_GET_ANEXT] = HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG, [_GET_AWAITABLE] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_SEND_GEN_FRAME] = HAS_ARG_FLAG | HAS_DEOPT_FLAG, - [_YIELD_VALUE] = HAS_ARG_FLAG, + [_YIELD_VALUE] = HAS_ARG_FLAG | HAS_ESCAPES_FLAG, [_POP_EXCEPT] = HAS_ESCAPES_FLAG, [_LOAD_COMMON_CONSTANT] = HAS_ARG_FLAG, [_LOAD_BUILD_CLASS] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, @@ -277,7 +277,7 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = { [_CALL_KW_NON_PY] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_MAKE_CALLARGS_A_TUPLE] = HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG, [_MAKE_FUNCTION] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, - [_SET_FUNCTION_ATTRIBUTE] = HAS_ARG_FLAG, + [_SET_FUNCTION_ATTRIBUTE] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_RETURN_GENERATOR] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_BUILD_SLICE] = HAS_ARG_FLAG | HAS_ERROR_FLAG, [_CONVERT_VALUE] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, diff --git a/Python314_4_x64_Template/include/internal/pycore_warnings.h b/Python314_6_x64_Template/include/internal/pycore_warnings.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_warnings.h rename to Python314_6_x64_Template/include/internal/pycore_warnings.h diff --git a/Python314_4_x64_Template/include/internal/pycore_weakref.h b/Python314_6_x64_Template/include/internal/pycore_weakref.h similarity index 100% rename from Python314_4_x64_Template/include/internal/pycore_weakref.h rename to Python314_6_x64_Template/include/internal/pycore_weakref.h diff --git a/Python314_4_x64_Template/include/intrcheck.h b/Python314_6_x64_Template/include/intrcheck.h similarity index 100% rename from Python314_4_x64_Template/include/intrcheck.h rename to Python314_6_x64_Template/include/intrcheck.h diff --git a/Python314_4_x64_Template/include/iterobject.h b/Python314_6_x64_Template/include/iterobject.h similarity index 100% rename from Python314_4_x64_Template/include/iterobject.h rename to Python314_6_x64_Template/include/iterobject.h diff --git a/Python314_4_x64_Template/include/listobject.h b/Python314_6_x64_Template/include/listobject.h similarity index 100% rename from Python314_4_x64_Template/include/listobject.h rename to Python314_6_x64_Template/include/listobject.h diff --git a/Python314_4_x64_Template/include/lock.h b/Python314_6_x64_Template/include/lock.h similarity index 100% rename from Python314_4_x64_Template/include/lock.h rename to Python314_6_x64_Template/include/lock.h diff --git a/Python314_4_x64_Template/include/longobject.h b/Python314_6_x64_Template/include/longobject.h similarity index 100% rename from Python314_4_x64_Template/include/longobject.h rename to Python314_6_x64_Template/include/longobject.h diff --git a/Python314_4_x64_Template/include/marshal.h b/Python314_6_x64_Template/include/marshal.h similarity index 100% rename from Python314_4_x64_Template/include/marshal.h rename to Python314_6_x64_Template/include/marshal.h diff --git a/Python314_4_x64_Template/include/memoryobject.h b/Python314_6_x64_Template/include/memoryobject.h similarity index 100% rename from Python314_4_x64_Template/include/memoryobject.h rename to Python314_6_x64_Template/include/memoryobject.h diff --git a/Python314_4_x64_Template/include/methodobject.h b/Python314_6_x64_Template/include/methodobject.h similarity index 100% rename from Python314_4_x64_Template/include/methodobject.h rename to Python314_6_x64_Template/include/methodobject.h diff --git a/Python314_4_x64_Template/include/modsupport.h b/Python314_6_x64_Template/include/modsupport.h similarity index 100% rename from Python314_4_x64_Template/include/modsupport.h rename to Python314_6_x64_Template/include/modsupport.h diff --git a/Python314_4_x64_Template/include/moduleobject.h b/Python314_6_x64_Template/include/moduleobject.h similarity index 100% rename from Python314_4_x64_Template/include/moduleobject.h rename to Python314_6_x64_Template/include/moduleobject.h diff --git a/Python314_4_x64_Template/include/monitoring.h b/Python314_6_x64_Template/include/monitoring.h similarity index 100% rename from Python314_4_x64_Template/include/monitoring.h rename to Python314_6_x64_Template/include/monitoring.h diff --git a/Python314_4_x64_Template/include/object.h b/Python314_6_x64_Template/include/object.h similarity index 100% rename from Python314_4_x64_Template/include/object.h rename to Python314_6_x64_Template/include/object.h diff --git a/Python314_4_x64_Template/include/objimpl.h b/Python314_6_x64_Template/include/objimpl.h similarity index 100% rename from Python314_4_x64_Template/include/objimpl.h rename to Python314_6_x64_Template/include/objimpl.h diff --git a/Python314_4_x64_Template/include/opcode.h b/Python314_6_x64_Template/include/opcode.h similarity index 100% rename from Python314_4_x64_Template/include/opcode.h rename to Python314_6_x64_Template/include/opcode.h diff --git a/Python314_4_x64_Template/include/opcode_ids.h b/Python314_6_x64_Template/include/opcode_ids.h similarity index 100% rename from Python314_4_x64_Template/include/opcode_ids.h rename to Python314_6_x64_Template/include/opcode_ids.h diff --git a/Python314_4_x64_Template/include/osdefs.h b/Python314_6_x64_Template/include/osdefs.h similarity index 100% rename from Python314_4_x64_Template/include/osdefs.h rename to Python314_6_x64_Template/include/osdefs.h diff --git a/Python314_4_x64_Template/include/osmodule.h b/Python314_6_x64_Template/include/osmodule.h similarity index 100% rename from Python314_4_x64_Template/include/osmodule.h rename to Python314_6_x64_Template/include/osmodule.h diff --git a/Python314_4_x64_Template/include/patchlevel.h b/Python314_6_x64_Template/include/patchlevel.h similarity index 95% rename from Python314_4_x64_Template/include/patchlevel.h rename to Python314_6_x64_Template/include/patchlevel.h index ba0a27457..0fbcdc460 100644 --- a/Python314_4_x64_Template/include/patchlevel.h +++ b/Python314_6_x64_Template/include/patchlevel.h @@ -19,12 +19,12 @@ /*--start constants--*/ #define PY_MAJOR_VERSION 3 #define PY_MINOR_VERSION 14 -#define PY_MICRO_VERSION 4 +#define PY_MICRO_VERSION 6 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 0 /* Version as a string */ -#define PY_VERSION "3.14.4" +#define PY_VERSION "3.14.6" /*--end constants--*/ diff --git a/Python314_4_x64_Template/include/py_curses.h b/Python314_6_x64_Template/include/py_curses.h similarity index 100% rename from Python314_4_x64_Template/include/py_curses.h rename to Python314_6_x64_Template/include/py_curses.h diff --git a/Python314_4_x64_Template/include/pyatomic.h b/Python314_6_x64_Template/include/pyatomic.h similarity index 100% rename from Python314_4_x64_Template/include/pyatomic.h rename to Python314_6_x64_Template/include/pyatomic.h diff --git a/Python314_4_x64_Template/include/pybuffer.h b/Python314_6_x64_Template/include/pybuffer.h similarity index 100% rename from Python314_4_x64_Template/include/pybuffer.h rename to Python314_6_x64_Template/include/pybuffer.h diff --git a/Python314_4_x64_Template/include/pycapsule.h b/Python314_6_x64_Template/include/pycapsule.h similarity index 100% rename from Python314_4_x64_Template/include/pycapsule.h rename to Python314_6_x64_Template/include/pycapsule.h diff --git a/Python314_4_x64_Template/include/pyconfig.h b/Python314_6_x64_Template/include/pyconfig.h similarity index 100% rename from Python314_4_x64_Template/include/pyconfig.h rename to Python314_6_x64_Template/include/pyconfig.h diff --git a/Python314_4_x64_Template/include/pydtrace.h b/Python314_6_x64_Template/include/pydtrace.h similarity index 100% rename from Python314_4_x64_Template/include/pydtrace.h rename to Python314_6_x64_Template/include/pydtrace.h diff --git a/Python314_4_x64_Template/include/pyerrors.h b/Python314_6_x64_Template/include/pyerrors.h similarity index 100% rename from Python314_4_x64_Template/include/pyerrors.h rename to Python314_6_x64_Template/include/pyerrors.h diff --git a/Python314_4_x64_Template/include/pyexpat.h b/Python314_6_x64_Template/include/pyexpat.h similarity index 86% rename from Python314_4_x64_Template/include/pyexpat.h rename to Python314_6_x64_Template/include/pyexpat.h index 04548b768..a676e16a7 100644 --- a/Python314_4_x64_Template/include/pyexpat.h +++ b/Python314_6_x64_Template/include/pyexpat.h @@ -57,6 +57,14 @@ struct PyExpat_CAPI XML_Parser parser, unsigned long long activationThresholdBytes); XML_Bool (*SetAllocTrackerMaximumAmplification)( XML_Parser parser, float maxAmplificationFactor); + /* might be NULL for expat < 2.4.0 */ + XML_Bool (*SetBillionLaughsAttackProtectionActivationThreshold)( + XML_Parser parser, unsigned long long activationThresholdBytes); + XML_Bool (*SetBillionLaughsAttackProtectionMaximumAmplification)( + XML_Parser parser, float maxAmplificationFactor); + /* might be NULL for expat < 2.8.0 */ + XML_Bool (*SetHashSalt16Bytes)( + XML_Parser parser, const uint8_t entropy[16]); /* always add new stuff to the end! */ }; diff --git a/Python314_4_x64_Template/include/pyframe.h b/Python314_6_x64_Template/include/pyframe.h similarity index 100% rename from Python314_4_x64_Template/include/pyframe.h rename to Python314_6_x64_Template/include/pyframe.h diff --git a/Python314_4_x64_Template/include/pyhash.h b/Python314_6_x64_Template/include/pyhash.h similarity index 100% rename from Python314_4_x64_Template/include/pyhash.h rename to Python314_6_x64_Template/include/pyhash.h diff --git a/Python314_4_x64_Template/include/pylifecycle.h b/Python314_6_x64_Template/include/pylifecycle.h similarity index 100% rename from Python314_4_x64_Template/include/pylifecycle.h rename to Python314_6_x64_Template/include/pylifecycle.h diff --git a/Python314_4_x64_Template/include/pymacconfig.h b/Python314_6_x64_Template/include/pymacconfig.h similarity index 100% rename from Python314_4_x64_Template/include/pymacconfig.h rename to Python314_6_x64_Template/include/pymacconfig.h diff --git a/Python314_4_x64_Template/include/pymacro.h b/Python314_6_x64_Template/include/pymacro.h similarity index 100% rename from Python314_4_x64_Template/include/pymacro.h rename to Python314_6_x64_Template/include/pymacro.h diff --git a/Python314_4_x64_Template/include/pymath.h b/Python314_6_x64_Template/include/pymath.h similarity index 100% rename from Python314_4_x64_Template/include/pymath.h rename to Python314_6_x64_Template/include/pymath.h diff --git a/Python314_4_x64_Template/include/pymem.h b/Python314_6_x64_Template/include/pymem.h similarity index 100% rename from Python314_4_x64_Template/include/pymem.h rename to Python314_6_x64_Template/include/pymem.h diff --git a/Python314_4_x64_Template/include/pyport.h b/Python314_6_x64_Template/include/pyport.h similarity index 100% rename from Python314_4_x64_Template/include/pyport.h rename to Python314_6_x64_Template/include/pyport.h diff --git a/Python314_4_x64_Template/include/pystate.h b/Python314_6_x64_Template/include/pystate.h similarity index 100% rename from Python314_4_x64_Template/include/pystate.h rename to Python314_6_x64_Template/include/pystate.h diff --git a/Python314_4_x64_Template/include/pystats.h b/Python314_6_x64_Template/include/pystats.h similarity index 100% rename from Python314_4_x64_Template/include/pystats.h rename to Python314_6_x64_Template/include/pystats.h diff --git a/Python314_4_x64_Template/include/pystrcmp.h b/Python314_6_x64_Template/include/pystrcmp.h similarity index 100% rename from Python314_4_x64_Template/include/pystrcmp.h rename to Python314_6_x64_Template/include/pystrcmp.h diff --git a/Python314_4_x64_Template/include/pystrtod.h b/Python314_6_x64_Template/include/pystrtod.h similarity index 100% rename from Python314_4_x64_Template/include/pystrtod.h rename to Python314_6_x64_Template/include/pystrtod.h diff --git a/Python314_4_x64_Template/include/pythonrun.h b/Python314_6_x64_Template/include/pythonrun.h similarity index 100% rename from Python314_4_x64_Template/include/pythonrun.h rename to Python314_6_x64_Template/include/pythonrun.h diff --git a/Python314_4_x64_Template/include/pythread.h b/Python314_6_x64_Template/include/pythread.h similarity index 100% rename from Python314_4_x64_Template/include/pythread.h rename to Python314_6_x64_Template/include/pythread.h diff --git a/Python314_4_x64_Template/include/pytypedefs.h b/Python314_6_x64_Template/include/pytypedefs.h similarity index 100% rename from Python314_4_x64_Template/include/pytypedefs.h rename to Python314_6_x64_Template/include/pytypedefs.h diff --git a/Python314_4_x64_Template/include/rangeobject.h b/Python314_6_x64_Template/include/rangeobject.h similarity index 100% rename from Python314_4_x64_Template/include/rangeobject.h rename to Python314_6_x64_Template/include/rangeobject.h diff --git a/Python314_4_x64_Template/include/refcount.h b/Python314_6_x64_Template/include/refcount.h similarity index 100% rename from Python314_4_x64_Template/include/refcount.h rename to Python314_6_x64_Template/include/refcount.h diff --git a/Python314_4_x64_Template/include/setobject.h b/Python314_6_x64_Template/include/setobject.h similarity index 100% rename from Python314_4_x64_Template/include/setobject.h rename to Python314_6_x64_Template/include/setobject.h diff --git a/Python314_4_x64_Template/include/sliceobject.h b/Python314_6_x64_Template/include/sliceobject.h similarity index 100% rename from Python314_4_x64_Template/include/sliceobject.h rename to Python314_6_x64_Template/include/sliceobject.h diff --git a/Python314_4_x64_Template/include/structmember.h b/Python314_6_x64_Template/include/structmember.h similarity index 100% rename from Python314_4_x64_Template/include/structmember.h rename to Python314_6_x64_Template/include/structmember.h diff --git a/Python314_4_x64_Template/include/structseq.h b/Python314_6_x64_Template/include/structseq.h similarity index 100% rename from Python314_4_x64_Template/include/structseq.h rename to Python314_6_x64_Template/include/structseq.h diff --git a/Python314_4_x64_Template/include/sysmodule.h b/Python314_6_x64_Template/include/sysmodule.h similarity index 100% rename from Python314_4_x64_Template/include/sysmodule.h rename to Python314_6_x64_Template/include/sysmodule.h diff --git a/Python314_4_x64_Template/include/traceback.h b/Python314_6_x64_Template/include/traceback.h similarity index 100% rename from Python314_4_x64_Template/include/traceback.h rename to Python314_6_x64_Template/include/traceback.h diff --git a/Python314_4_x64_Template/include/tupleobject.h b/Python314_6_x64_Template/include/tupleobject.h similarity index 100% rename from Python314_4_x64_Template/include/tupleobject.h rename to Python314_6_x64_Template/include/tupleobject.h diff --git a/Python314_4_x64_Template/include/typeslots.h b/Python314_6_x64_Template/include/typeslots.h similarity index 100% rename from Python314_4_x64_Template/include/typeslots.h rename to Python314_6_x64_Template/include/typeslots.h diff --git a/Python314_4_x64_Template/include/unicodeobject.h b/Python314_6_x64_Template/include/unicodeobject.h similarity index 100% rename from Python314_4_x64_Template/include/unicodeobject.h rename to Python314_6_x64_Template/include/unicodeobject.h diff --git a/Python314_4_x64_Template/include/warnings.h b/Python314_6_x64_Template/include/warnings.h similarity index 100% rename from Python314_4_x64_Template/include/warnings.h rename to Python314_6_x64_Template/include/warnings.h diff --git a/Python314_4_x64_Template/include/weakrefobject.h b/Python314_6_x64_Template/include/weakrefobject.h similarity index 100% rename from Python314_4_x64_Template/include/weakrefobject.h rename to Python314_6_x64_Template/include/weakrefobject.h diff --git a/Python314_4_x64_Template/libs/python3.lib b/Python314_6_x64_Template/libs/python3.lib similarity index 99% rename from Python314_4_x64_Template/libs/python3.lib rename to Python314_6_x64_Template/libs/python3.lib index 78e94b387..6d3c977ab 100644 Binary files a/Python314_4_x64_Template/libs/python3.lib and b/Python314_6_x64_Template/libs/python3.lib differ diff --git a/Python314_4_x64_Template/libs/python314.lib b/Python314_6_x64_Template/libs/python314.lib similarity index 99% rename from Python314_4_x64_Template/libs/python314.lib rename to Python314_6_x64_Template/libs/python314.lib index 3028b95e3..a1a03a523 100644 Binary files a/Python314_4_x64_Template/libs/python314.lib and b/Python314_6_x64_Template/libs/python314.lib differ diff --git a/Python314_4_x64_Template/python.exe b/Python314_6_x64_Template/python.exe similarity index 93% rename from Python314_4_x64_Template/python.exe rename to Python314_6_x64_Template/python.exe index d4653e158..7e714d066 100644 Binary files a/Python314_4_x64_Template/python.exe and b/Python314_6_x64_Template/python.exe differ diff --git a/Python314_4_x64_Template/python3.dll b/Python314_6_x64_Template/python3.dll similarity index 88% rename from Python314_4_x64_Template/python3.dll rename to Python314_6_x64_Template/python3.dll index 2266809db..74d22c022 100644 Binary files a/Python314_4_x64_Template/python3.dll and b/Python314_6_x64_Template/python3.dll differ diff --git a/Python314_6_x64_Template/python314.dll b/Python314_6_x64_Template/python314.dll new file mode 100644 index 000000000..60f7f2c88 Binary files /dev/null and b/Python314_6_x64_Template/python314.dll differ diff --git a/Python314_4_x64_Template/pythonw.exe b/Python314_6_x64_Template/pythonw.exe similarity index 93% rename from Python314_4_x64_Template/pythonw.exe rename to Python314_6_x64_Template/pythonw.exe index d542f8d4e..5f4df69e1 100644 Binary files a/Python314_4_x64_Template/pythonw.exe and b/Python314_6_x64_Template/pythonw.exe differ diff --git a/Python314_4_x64_Template/vcruntime140.dll b/Python314_6_x64_Template/vcruntime140.dll similarity index 100% rename from Python314_4_x64_Template/vcruntime140.dll rename to Python314_6_x64_Template/vcruntime140.dll diff --git a/Python314_4_x64_Template/vcruntime140_1.dll b/Python314_6_x64_Template/vcruntime140_1.dll similarity index 100% rename from Python314_4_x64_Template/vcruntime140_1.dll rename to Python314_6_x64_Template/vcruntime140_1.dll