Skip to content

SNOW-896926 adjust vendored urllib3 and requests#2505

Merged
sfc-gh-pczajka merged 7 commits intoSNOW-896926-upgrade-vendored-urllib3-and-requestsfrom
SNOW-896926-adjust-vendored-urllib3-and-requests
Sep 19, 2025
Merged

SNOW-896926 adjust vendored urllib3 and requests#2505
sfc-gh-pczajka merged 7 commits intoSNOW-896926-upgrade-vendored-urllib3-and-requestsfrom
SNOW-896926-adjust-vendored-urllib3-and-requests

Conversation

@sfc-gh-mmishchenko
Copy link
Contributor

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #NNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

  4. (Optional) PR for stored-proc connector:

@sfc-gh-mmishchenko sfc-gh-mmishchenko requested a review from a team as a code owner August 25, 2025 13:28
@sfc-gh-mmishchenko sfc-gh-mmishchenko force-pushed the SNOW-896926-upgrade-vendored-urllib3-and-requests branch 2 times, most recently from 9f3d417 to 2e84e1b Compare September 5, 2025 10:18
from .. import urllib3

from .exceptions import RequestsDependencyWarning

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below in this file we have 2 more imports from urllib3 (line 131 and 143) - did we deliberately leave those unchanged?

from ..urllib3.util.retry import Retry

from .auth import _basic_auth_str
from .compat import basestring, urlparse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 59 we have from urllib3.contrib.socks import SOCKSProxyManager - was it intentional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have:

  1. one in line 24 of help.py
  2. one in contrib/emscripten/init.py -> import urllib3.connection

@sfc-gh-fpawlowski
Copy link
Contributor

Do we know a source of the E AttributeError: 'SSLSocket' object has no attribute 'connection' errors in tests?

@sfc-gh-pczajka sfc-gh-pczajka force-pushed the SNOW-896926-upgrade-vendored-urllib3-and-requests branch from 2e84e1b to e5d14e0 Compare September 18, 2025 12:20
@sfc-gh-pczajka sfc-gh-pczajka force-pushed the SNOW-896926-adjust-vendored-urllib3-and-requests branch from 9aa9f9d to c208c4b Compare September 18, 2025 12:28
"and could be missing the host."
)
proxy_manager = self.proxy_manager_for(proxy)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The piece of logic below is the custom one we introduced. Can we override proxy_manager_for instead and avoid isinstance call?

ca_certs_in_args = len(args) > ca_certs_index

if not isinstance(ssl_context, PyOpenSSLContext):
if FEATURE_OCSP_MODE != OCSPMode.DISABLE_OCSP_CHECKS:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need more explanation on this before I approve

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated after #2520

@sfc-gh-pczajka sfc-gh-pczajka force-pushed the SNOW-896926-upgrade-vendored-urllib3-and-requests branch from 3687964 to 78955fb Compare September 19, 2025 13:36
@sfc-gh-pczajka sfc-gh-pczajka force-pushed the SNOW-896926-adjust-vendored-urllib3-and-requests branch from c0eae8e to 4fb6b3e Compare September 19, 2025 13:43
@sfc-gh-pczajka sfc-gh-pczajka merged commit 0c67a10 into SNOW-896926-upgrade-vendored-urllib3-and-requests Sep 19, 2025
123 of 182 checks passed
@sfc-gh-pczajka sfc-gh-pczajka deleted the SNOW-896926-adjust-vendored-urllib3-and-requests branch September 19, 2025 15:55
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants