Skip to content

Commit aa24ff5

Browse files
authored
pydantic V2 is released (#99)
1 parent 107e8de commit aa24ff5

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
Settings management using Pydantic, this is the new official home of Pydantic's `BaseSettings`.
99

10-
**Currently a work in progress.**
11-
12-
This package will be officially released as V2 when pydantic V2 is released.
13-
1410
This package was kindly donated to the [Pydantic organisation](https://github.com/pydantic) by Daniel Daniels, see [pydantic/pydantic#4492](https://github.com/pydantic/pydantic/pull/4492) for discussion.
1511

1612
For the old "Hipster-orgazmic tool to mange application settings" package, see [version 0.2.5](https://pypi.org/project/pydantic-settings/0.2.5/).

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ print(Settings().model_dump())
6060
{
6161
'auth_key': 'xxx',
6262
'redis_dsn': Url('redis://user:pass@localhost:6379/1'),
63-
'pg_dsn': Url('postgres://user:pass@localhost:5432/foobar'),
63+
'pg_dsn': MultiHostUrl('postgres://user:pass@localhost:5432/foobar'),
6464
'amqp_dsn': Url('amqp://user:pass@localhost:5672/'),
6565
'special_function': math.cos,
6666
'domains': set(),
@@ -502,7 +502,7 @@ class Settings(BaseSettings):
502502

503503

504504
print(Settings(database_dsn='postgres://postgres@localhost:5432/kwargs_db'))
505-
#> database_dsn=Url('postgres://postgres@localhost:5432/kwargs_db')
505+
#> database_dsn=MultiHostUrl('postgres://postgres@localhost:5432/kwargs_db')
506506
```
507507

508508
By flipping `env_settings` and `init_settings`, environment variables now have precedence over `__init__` kwargs.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ classifiers = [
4040
]
4141
requires-python = '>=3.7'
4242
dependencies = [
43-
'pydantic>=2.0b3',
43+
'pydantic>=2.0',
4444
'python-dotenv>=0.21.0',
4545
]
4646
dynamic = ['version']

requirements/pyproject.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.7
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
55
# pip-compile --output-file=requirements/pyproject.txt pyproject.toml
66
#
77
annotated-types==0.4.0
88
# via pydantic
9-
pydantic==2.0b3
9+
pydantic==2.0
1010
# via pydantic-settings (pyproject.toml)
11-
pydantic-core==0.39.0
11+
pydantic-core==2.0.1
1212
# via pydantic
1313
python-dotenv==0.21.1
1414
# via pydantic-settings (pyproject.toml)
1515
typing-extensions==4.6.2
1616
# via
17-
# annotated-types
1817
# pydantic
1918
# pydantic-core

0 commit comments

Comments
 (0)