Skip to content

Commit

Permalink
Update to compliance-trestle ~= 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Aug 13, 2024
1 parent ea1915f commit 2951f07
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions c2p/common/c2p_base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from typing import Any, Dict, Optional, Type, TypeVar

import orjson
from pydantic import BaseModel
from pydantic.parse import load_file
from pydantic.v1 import BaseModel
from pydantic.v1.parse import load_file
from trestle.core.base_model import robust_datetime_serialization

import c2p.common.err as err
Expand Down
2 changes: 1 addition & 1 deletion c2p/framework/c2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import pathlib
from typing import Dict, List, Optional

from pydantic import BaseModel
from pydantic.v1 import BaseModel
from trestle import __version__ as TRESTLE_VERSION
from trestle.oscal import OSCAL_VERSION
from trestle.oscal.assessment_results import (
Expand Down
2 changes: 1 addition & 1 deletion c2p/framework/models/c2p_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from enum import Enum
from typing import Dict, List, Literal, Optional, Union

from pydantic import Field
from pydantic.v1 import Field

from c2p.common.c2p_base_model import C2PBaseModel
from c2p.framework.models import PVPResult
Expand Down
2 changes: 1 addition & 1 deletion c2p/framework/models/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from typing import Dict, List, Optional

from pydantic import Field
from pydantic.v1 import Field

from c2p.common.c2p_base_model import C2PBaseModel

Expand Down
2 changes: 1 addition & 1 deletion c2p/framework/models/pvp_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from enum import Enum
from typing import List, Optional

from pydantic import Field
from pydantic.v1 import Field

from c2p.common.c2p_base_model import C2PBaseModel

Expand Down
2 changes: 1 addition & 1 deletion c2p/framework/models/raw_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from typing import Any, Dict, Optional

from pydantic import Field
from pydantic.v1 import Field

from c2p.common.c2p_base_model import C2PBaseModel

Expand Down
6 changes: 3 additions & 3 deletions c2p/framework/oscal_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
from typing import Any, Dict, List, Union
from uuid import uuid4

from pydantic import BaseModel
from pydantic.v1 import BaseModel
from trestle.common.common_types import TypeWithProps
from trestle.common.list_utils import as_list
from trestle.oscal.assessment_results import (
from trestle.oscal.common import (
ControlSelection,
Property,
ReviewedControls,
SelectControlById,
)
from trestle.oscal.common import Property
from trestle.oscal.component import ComponentDefinition

from c2p.common.oscal import is_component_type_validation
Expand Down
2 changes: 1 addition & 1 deletion c2p/framework/plugin_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from abc import ABC, abstractmethod
from typing import Any

from pydantic import BaseModel
from pydantic.v1 import BaseModel

from c2p.framework.models.policy import Policy
from c2p.framework.models.pvp_result import PVPResult
Expand Down
2 changes: 1 addition & 1 deletion c2p/tools/viewer/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from typing import Dict, List, Optional

from jinja2 import Template
from pydantic import BaseModel
from pydantic.v1 import BaseModel
from trestle.oscal.assessment_results import AssessmentResults, Observation
from trestle.oscal.common import Property
from trestle.oscal.component import ComponentDefinition, DefinedComponent
Expand Down
4 changes: 2 additions & 2 deletions plugins_public/plugins/auditree.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from pathlib import Path
from typing import List, Optional, Tuple, Union

from pydantic import Field
from pydantic.utils import deep_update
from pydantic.v1 import Field
from pydantic.v1.utils import deep_update

from c2p.common.logging import getLogger
from c2p.common.utils import get_dict_safely
Expand Down
2 changes: 1 addition & 1 deletion plugins_public/plugins/kyverno.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import yaml
from jinja2 import Template
from pydantic import Field
from pydantic.v1 import Field

from c2p.common.err import C2PError
from c2p.common.logging import getLogger
Expand Down
2 changes: 1 addition & 1 deletion plugins_public/plugins/ocm.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from typing import Any, Dict, List, Optional, TypeVar

import yaml
from pydantic import BaseModel, Field
from pydantic.v1 import BaseModel, Field

from c2p.common.err import C2PError
from c2p.common.logging import getLogger
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"compliance-trestle==2.2.1",
"compliance-trestle~=3.3",
"PyGithub==1.58.0",
"jq==1.6.0",
"pluggy",
Expand Down
2 changes: 1 addition & 1 deletion tests/c2p/framework/test_c2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import pathlib
from typing import Any, Dict, Tuple

from pydantic import BaseModel
from pydantic.v1 import BaseModel
from trestle.oscal.assessment_results import AssessmentResults

from c2p.framework.c2p import C2P
Expand Down
4 changes: 2 additions & 2 deletions tests/data/framework/c2p/assessment-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"metadata": {
"title": "TEST Assessment Results",
"last_modified": "2024-03-22T08:28:11.000+00:00",
"version": "2.2.1",
"oscal_version": "1.0.4"
"version": "3.3.0",
"oscal_version": "1.1.2"
},
"import_ap": {
"href": "https://not-available-for-now"
Expand Down

0 comments on commit 2951f07

Please sign in to comment.