Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address deprecation warnings #237

Open
theferrit32 opened this issue Oct 17, 2024 · 0 comments
Open

Address deprecation warnings #237

theferrit32 opened this issue Oct 17, 2024 · 0 comments

Comments

@theferrit32
Copy link
Contributor

These are the ones that come up when running the tests. There may be others.

clinvar_ingest/api/model/requests.py:142
  /Users/kferrite/dev/clinvar-ingest/clinvar_ingest/api/model/requests.py:142: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.9/migration/
    @validator("root")

clinvar_ingest/api/model/requests.py:159
  /Users/kferrite/dev/clinvar-ingest/clinvar_ingest/api/model/requests.py:159: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.9/migration/
    @validator("root")

clinvar_ingest/api/status_file.py:25
  /Users/kferrite/dev/clinvar-ingest/clinvar_ingest/api/status_file.py:25: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    timestamp: str = datetime.utcnow().isoformat(),

test/api/test_main.py:25
  /Users/kferrite/dev/clinvar-ingest/test/api/test_main.py:25: PytestUnknownMarkWarning: Unknown pytest.mark.integration - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.integration

test/api/test_main.py::test_copy_endpoint_success
  /Users/kferrite/dev/clinvar-ingest/test/api/test_main.py:28: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    StepStatus.STARTED, StepName.COPY, datetime.utcnow().isoformat()

test/api/test_main.py::test_copy_endpoint_success
  /Users/kferrite/dev/clinvar-ingest/test/api/test_main.py:31: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    StepStatus.SUCCEEDED, StepName.COPY, datetime.utcnow().isoformat()

test/api/test_main.py::test_copy_endpoint_success
  /Users/kferrite/dev/clinvar-ingest/test/api/test_main.py:66: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    timestamp=datetime.utcnow(),

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant