Skip to content

Reuse one SOAP client per URL and stop turning off SSL verification - #161

Merged
micah-prime merged 1 commit into
mainfrom
slaughter-next
Oct 29, 2026
Merged

micah-prime merged 1 commit into
mainfrom
slaughter-next

Conversation

@aeslaughter

Copy link
Copy Markdown
Contributor

no_ssl_verification swapped requests.Session.merge_environment_settings for the whole process while a SNOTEL request ran, so a request on another thread could run with verification off. The AWDB endpoint now verifies (checked against the live WSDL), so the SNOTEL client no longer uses it. metloom.request_utils stays importable, but no_ssl_verification now raises a DeprecationWarning, ahead of its removal in a later release.

Every request also built a new zeep client, which downloads and parses the WSDL: about 0.6 s, against 0.14 s for a metadata call. The client is now built once per URL and shared.

no_ssl_verification swapped requests.Session.merge_environment_settings for
the whole process while a SNOTEL request ran, so a request on another thread
could run with verification off. The AWDB endpoint now verifies (checked
against the live WSDL), so the SNOTEL client no longer uses it.
metloom.request_utils stays importable, but no_ssl_verification now raises a
DeprecationWarning, ahead of its removal in a later release.

Every request also built a new zeep client, which downloads and parses the
WSDL: about 0.6 s, against 0.14 s for a metadata call. The client is now
built once per URL and shared.
Comment thread metloom/pointdata/snotel_client.py Resolved
Comment thread metloom/pointdata/snotel_client.py Resolved
@micah-prime
micah-prime merged commit 3702cb6 into main Oct 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants