-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bug V1Bug related to Pydantic V1.XBug related to Pydantic V1.X
Description
Bug
- OS: ubuntu 18.04
- Python version
import sys; print(sys.version): 3.7.5 (default, Nov 7 2019, 10:50:52) - Pydantic version
import pydantic; print(pydantic.VERSION):1.0b1or1.2, but works fine with0.32
import os
from pydantic import BaseSettings
class MyBaseSettings(BaseSettings):
var: int = 10
class MySubSettings(MyBaseSettings):
class Config:
env_prefix = 'PREFIX_'
os.environ['PREFIX_VAR'] = '2'
k = MySubSettings()
print(k.var) # 10, but should be 2We expect that k.var will be equal to 2, but it has default value 10.
It's reproduced since 1.0b1.
fa1l, livestreamx, ashibaev, orangeatom, 2shsh and 9 morekataev and Apollon76
Metadata
Metadata
Assignees
Labels
bug V1Bug related to Pydantic V1.XBug related to Pydantic V1.X