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.
(
self, override: dict[str, typing.Any] | None
)
| 386 | ) |
| 387 | |
| 388 | def _merge_pool_kwargs( |
| 389 | self, override: dict[str, typing.Any] | None |
| 390 | ) -> dict[str, typing.Any]: |
| 391 | """ |
| 392 | Merge a dictionary of override values for self.connection_pool_kw. |
| 393 | |
| 394 | This does not modify self.connection_pool_kw and returns a new dict. |
| 395 | Any keys in the override dictionary with a value of ``None`` are |
| 396 | removed from the merged dictionary. |
| 397 | """ |
| 398 | base_pool_kwargs = self.connection_pool_kw.copy() |
| 399 | if override: |
| 400 | for key, value in override.items(): |
| 401 | if value is None: |
| 402 | try: |
| 403 | del base_pool_kwargs[key] |
| 404 | except KeyError: |
| 405 | pass |
| 406 | else: |
| 407 | base_pool_kwargs[key] = value |
| 408 | return base_pool_kwargs |
| 409 | |
| 410 | def _proxy_requires_url_absolute_form(self, parsed_url: Url) -> bool: |
| 411 | """ |