You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecation warning (PydanticDeprecatedSince20) from class Config in sas.py/SASBase. #68
While using planetary_computer, I saw the following deprecation warning during import:
/usr/local/lib/python3.11/site-packages/pydantic/_internal/_config.py:291: PydanticDeprecatedSince20: Support forclass-based `config` is deprecated, use ConfigDict instead. Deprecatedin Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)
This originates from planetary_computer/sas.py, where a Pydantic model defines a class Config:
classSASBase(BaseModel):
"""Base model for responses."""expiry: datetime=Field(alias="msft:expiry")
"""RFC339 datetime format of the time this token will expire"""classConfig:
if_PYDANTIC_2_0:
populate_by_name=Trueelse:
allow_population_by_field_name=Truejson_encoders= {datetime: datetime_to_str}
As a fix, if you want to support both v1 and v2, we can consider using something like:
Activity