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

Tempo fix for v2 compatibility #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion redbird/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
import warnings

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

from redbird.exc import ConversionWarning, DataToItemError, KeyFoundError, ItemToDataError, _handle_conversion_error
from redbird.utils.case import to_case
Expand Down
2 changes: 1 addition & 1 deletion redbird/repos/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import csv

from pydantic import BaseModel, Field, PrivateAttr
from pydantic.v1 import BaseModel, Field, PrivateAttr
from redbird import BaseRepo, BaseResult
from redbird.base import Data, Item
from redbird.templates import TemplateRepo
Expand Down
2 changes: 1 addition & 1 deletion redbird/repos/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import csv, json

from pydantic import BaseModel, PrivateAttr
from pydantic.v1 import BaseModel, PrivateAttr
from redbird import BaseRepo, BaseResult
from redbird.base import Data, Item
from redbird.templates import TemplateRepo
Expand Down
2 changes: 1 addition & 1 deletion redbird/repos/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from operator import getitem
from typing import Any, Dict, List

from pydantic import BaseModel, Field, PrivateAttr
from pydantic.v1 import BaseModel, Field, PrivateAttr
from redbird import BaseRepo, BaseResult
from redbird.templates import TemplateRepo
from redbird.exc import KeyFoundError
Expand Down
2 changes: 1 addition & 1 deletion redbird/repos/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import TYPE_CHECKING, Any, Dict, Optional, Union


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

from redbird.base import BaseResult, BaseRepo
from redbird.exc import KeyFoundError
Expand Down
2 changes: 1 addition & 1 deletion redbird/repos/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import urllib.parse as urlparse
from typing import Any, Callable, Dict, Iterable, List, Optional, Union

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

from redbird.packages import requests
from redbird.oper import GreaterEqual, GreaterThan, LessEqual, LessThan, NotEqual, Operation
Expand Down
2 changes: 1 addition & 1 deletion redbird/repos/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import typing
import sys

from pydantic import BaseModel, Field, PrivateAttr
from pydantic.v1 import BaseModel, Field, PrivateAttr
from redbird import BaseRepo, BaseResult
from redbird.dummy import DummySession
from redbird.templates import TemplateRepo
Expand Down
4 changes: 2 additions & 2 deletions redbird/sql/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from redbird.oper import Between, In, Operation, skip
from redbird.packages import sqlalchemy, import_exists

from pydantic import BaseModel
from pydantic.v1 import BaseModel


try:
Expand Down Expand Up @@ -707,7 +707,7 @@ def create_from_model(self, model:BaseModel, primary_column=None):
for name, field in model.__fields__.items()
]
self.create(sql_cols)

def execute(self, *args, **kwargs):
"""Execute SQL statement or raw SQL.

Expand Down
2 changes: 1 addition & 1 deletion redbird/test/common/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from redbird.repos.mongo import MongoRepo
from redbird.oper import greater_equal, greater_than, less_equal, less_than, not_equal

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

# ------------------------
# TEST ITEMS
Expand Down
2 changes: 1 addition & 1 deletion redbird/test/common/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from redbird.repos.mongo import MongoRepo
from redbird.oper import in_, skip, between, greater_equal, greater_than, less_equal, less_than, not_equal

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


TEST_CASES = [
Expand Down
2 changes: 1 addition & 1 deletion redbird/test/logging/test_handler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import logging
from typing import Optional
from pydantic import BaseModel
from pydantic.v1 import BaseModel

import pytest

Expand Down
2 changes: 1 addition & 1 deletion redbird/test/repo/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Optional

from redbird.repos import CSVFileRepo
from pydantic import BaseModel
from pydantic.v1 import BaseModel

class Item(BaseModel):
id: str
Expand Down
2 changes: 1 addition & 1 deletion redbird/test/repo/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

from redbird.repos import JSONDirectoryRepo
from pydantic import BaseModel
from pydantic.v1 import BaseModel

class Item(BaseModel):
id: str
Expand Down
2 changes: 1 addition & 1 deletion redbird/test/repo/test_mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from redbird.repos import MongoRepo

import pytest
from pydantic import BaseModel
from pydantic.v1 import BaseModel

class Item(BaseModel):
id: str
Expand Down
2 changes: 1 addition & 1 deletion redbird/test/repo/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import typing
import pytest
from redbird.repos import SQLRepo
from pydantic import BaseModel
from pydantic.v1 import BaseModel

try:
from typing import Literal
Expand Down
2 changes: 1 addition & 1 deletion redbird/test/sql/test_create.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Optional
from pydantic import BaseModel
from pydantic.v1 import BaseModel
from datetime import date
import pytest

Expand Down
2 changes: 1 addition & 1 deletion redbird/test/test_creation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from pydantic import BaseModel
from pydantic.v1 import BaseModel
import pytest
from redbird import BaseRepo, BaseResult
from redbird.repos import MemoryRepo
Expand Down