Skip to content

Conversation

swelborn
Copy link
Contributor

@swelborn swelborn commented Aug 23, 2024

Change Summary

Nats also supports the wss scheme, and this is failing with:

NATS_SERVER_URL="wss://nats-url" python run.py 
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pydantic_settings/main.py", line 144, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 193, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
NATS_SERVER_URL
  URL scheme should be 'nats', 'tls' or 'ws' [type=url_scheme, input_value='wss://nats-url', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/url_scheme

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist -- unsure
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @sydney-runkle

@swelborn
Copy link
Contributor Author

please review

Copy link

codspeed-hq bot commented Aug 23, 2024

CodSpeed Performance Report

Merging #10224 will not alter performance

Comparing swelborn:allow-wss-natsdsn (3179eb5) with main (4a70cec)

Summary

✅ 17 untouched benchmarks

@sydney-runkle
Copy link
Contributor

Looks good, please use formatting with make format (we use ruff) to ensure our linting tests pass!

Copy link
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@swelborn
Copy link
Contributor Author

please review

@sydney-runkle sydney-runkle merged commit 69ea94d into pydantic:main Aug 26, 2024
59 checks passed
@swelborn swelborn deleted the allow-wss-natsdsn branch August 27, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants