Skip to content

Deprecation warning in dump_prescales.py #157

@mmarchegiani

Description

@mmarchegiani

Opening this issue to keep track of a deprecation warning.
When running the dump_prescales.py script to extract the prescale factors:

python scripts/dump_prescale.py --HLT BTagMu_AK8DiJet170_Mu5 -l $PARAMS_DIR/Cert_Collisions2022_355100_362760_Golden.json

one gets the following deprecation warning:

/afs/cern.ch/work/m/mmarcheg/BTV/BTVNanoCommissioning/scripts/dump_prescale.py:114: PydanticDeprecatedSince20:
The `parse_obj` method is deprecated; use `model_validate` instead.
Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.11/migration/

Probably the pars_obj function needs to be replace by the recommended one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions