-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82801db
commit 46e93cc
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ Contents | |
:maxdepth: 2 | ||
|
||
usage/usage | ||
migration_guide | ||
reference/reference | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Migration Guide | ||
=============== | ||
|
||
This guide helps you to easily migrate to ConfZ 2, which supports pydantic 2 and | ||
improves naming conventions. | ||
|
||
New Class Names | ||
--------------- | ||
|
||
We renamed many classes to better reflect their purpose instead of being tied to the | ||
package name. The following table summarizes all changes. Please make sure you adjust | ||
your imports accordingly. | ||
|
||
==================== =============== | ||
ConfZ v1 ConfZ v2 | ||
==================== =============== | ||
ConfZ BaseConfig | ||
ConfZSource ConfigSource | ||
ConfZSources ConfigSources | ||
ConfZCLArgSource CLArgSource | ||
ConfZDataSource DataSource | ||
ConfZEnvSource EnvSource | ||
ConfZFileSource FileSource | ||
ConfZException ConfigException | ||
ConfZUpdateException UpdateException | ||
ConfZFileException FileException | ||
==================== =============== | ||
|
||
Pydantic v2 | ||
----------- | ||
|
||
Once initialized, a confz BaseConfig class behaves mostly like a regular pydantic | ||
BaseModel class. Pydantic 2 comes with quite some changes, which might affect your code, | ||
depending on the used functionalities. Check out the | ||
`migration guide <https://docs.pydantic.dev/latest/migration/>`_. |