diff --git a/api/namex/services/payment/models/__init__.py b/api/namex/services/payment/models/__init__.py index efacaf86f..30998c310 100644 --- a/api/namex/services/payment/models/__init__.py +++ b/api/namex/services/payment/models/__init__.py @@ -3,7 +3,7 @@ from decimal import Decimal from pydantic.dataclasses import dataclass as pydantic_dataclass -from pydantic import Field +from pydantic import ConfigDict, Field from datetime import date from .abstract import Serializable @@ -122,13 +122,10 @@ class PaymentRequest(Serializable): details: list = field(default_factory=PaymentDetailItem) -class PydanticConfig: - """Pydantic config to ignore extra fields.""" - extra = 'ignore' - underscore_attrs_are_private = False +_pydantic_config = ConfigDict(extra='ignore') -@pydantic_dataclass(config=PydanticConfig) +@pydantic_dataclass(config=_pydantic_config) class PaymentRefundInvoice: refundId: int refundAmount: Decimal @@ -136,7 +133,7 @@ class PaymentRefundInvoice: isPartialRefund: bool -@pydantic_dataclass(config=PydanticConfig) +@pydantic_dataclass(config=_pydantic_config) class PaymentInvoice(Serializable): id: int serviceFees: float @@ -193,7 +190,7 @@ class Receipt(Serializable): receiptNumber: str = '' -@pydantic_dataclass(config=PydanticConfig) +@pydantic_dataclass(config=_pydantic_config) class ReceiptResponse(Serializable): bcOnlineAccountNumber: Optional[str] = None filingIdentifier: Optional[str] = None diff --git a/api/pyproject.toml b/api/pyproject.toml index f609da487..922b79435 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -29,7 +29,7 @@ jinja2 = "^3.1.2" markupSafe = "^2.1.1" itsdangerous = "^2.1.2" werkzeug = "^3.0.0" -protobuf = "^3.20.1" +protobuf = "^5.0.0" marshmallow-sqlalchemy = "^0.28.1" marshmallow = "^3.18.0" inflect = "^6.0.0" @@ -61,7 +61,7 @@ pkgutil_resolve_name = "^1.3.10" pronouncing = "^0.2.0" pyasn1 = "^0.4.8" pycountry = "^22.3.5" -pydantic = "^1.10.2" +pydantic = "^2.0.0" pyparsing = "^3.0.9" pyrsistent = "^0.18.1" pysolr = "^3.9.0" diff --git a/services/auto-analyze/requirements.txt b/services/auto-analyze/requirements.txt index 02e604dae..2a59673e4 100644 --- a/services/auto-analyze/requirements.txt +++ b/services/auto-analyze/requirements.txt @@ -1,34 +1,34 @@ -Flask-SQLAlchemy==2.5.1 -Flask==1.1.2 -Hypercorn==0.11.2 -Jinja2==2.11.3 -MarkupSafe==1.1.1 -Quart==0.10.0 -SQLAlchemy==1.4.11 -Werkzeug==1.0.1 -aiofiles==0.7.0 -blinker==1.4 +Flask-SQLAlchemy==3.1.1 +Flask==3.1.0 +Hypercorn==0.17.3 +Jinja2==3.1.4 +MarkupSafe==2.1.5 +Quart==0.19.6 +SQLAlchemy==2.0.36 +Werkzeug==3.0.6 +aiofiles==24.1.0 +blinker==1.9.0 certifi==2020.12.5 chardet==4.0.0 -click==7.1.2 -flask-marshmallow==0.14.0 -greenlet==1.0.0 -h11==0.12.0 +click==8.1.7 +flask-marshmallow==1.1.0 +greenlet==3.1.1 +h11==0.14.0 h2==4.0.0 hpack==4.0.0 hyperframe==6.0.1 idna==2.10 inflect==5.3.0 -itsdangerous==1.1.0 +itsdangerous==2.2.0 joblib==1.0.1 jsonpickle==2.0.0 lxml==4.6.3 -marshmallow-sqlalchemy==0.24.3 +marshmallow-sqlalchemy==1.1.0 marshmallow==3.11.1 nltk==3.6.2 numpy==1.20.2 pandas==1.2.4 -priority==1.3.0 +priority==2.0.0 pysolr==3.9.0 python-dateutil==2.8.1 pytz==2021.1 @@ -38,7 +38,7 @@ six==1.15.0 toml==0.10.2 tqdm==4.60.0 urllib3==1.26.4 -wsproto==1.0.0 +wsproto==1.2.0 git+https://github.com/bcgov/namex.git#egg=namex&subdirectory=api git+https://github.com/bcgov/namex-synonyms-api-py-client.git#egg=swagger_client -git+https://github.com/bcgov/namex-payment-api-py-client.git@dev#egg=openapi_client \ No newline at end of file +git+https://github.com/bcgov/namex-payment-api-py-client.git@dev#egg=openapi_client diff --git a/services/auto-analyze/src/auto_analyze/__init__.py b/services/auto-analyze/src/auto_analyze/__init__.py index aedb6ef82..616f60d7c 100644 --- a/services/auto-analyze/src/auto_analyze/__init__.py +++ b/services/auto-analyze/src/auto_analyze/__init__.py @@ -12,14 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. """The service that analyzes an array of names.""" -# This is important as this will add modules purporting to be Flask modules for later use by the extension. -# Without this, Flask-SQLAlchemy may not work! -# Thanks! import asyncio import os import config # pylint: disable=wrong-import-order; # noqa: I001 -import quart.flask_patch from namex import models from namex.models import db, ma from namex.services.name_request.auto_analyse.protected_name_analysis import ProtectedNameAnalysisService