Skip to content

Commit

Permalink
Bump pydantic (#1432)
Browse files Browse the repository at this point in the history
* Bump pydantic

* [no ci] fix `WORKER_MAX_REQUESTS`/`WORKER_MAX_REQUESTS_JITTER` default value
  • Loading branch information
purplesmoke05 authored Sep 26, 2023
1 parent 951e35b commit de2a538
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 133 deletions.
4 changes: 2 additions & 2 deletions bin/run_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function start () {
# gunicorn parameters
WORKER_COUNT=${WORKER_COUNT:-2}
WORKER_TIMEOUT=${WORKER_TIMEOUT:-60}
WORKER_MAX_REQUESTS=${WORKER_MAX_REQUESTS:-500}
WORKER_MAX_REQUESTS_JITTER=${WORKER_MAX_REQUESTS_JITTER:-200}
WORKER_MAX_REQUESTS=${WORKER_MAX_REQUESTS:-2500}
WORKER_MAX_REQUESTS_JITTER=${WORKER_MAX_REQUESTS_JITTER:-1000}
KEEP_ALIVE=${KEEP_ALIVE:-2}

# start
Expand Down
221 changes: 113 additions & 108 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ hexbytes = "~0.3.0"
orjson = "~3.9.2"
PyMySQL = {extras = ["rsa"], version = "~1.1.0"}
psycopg = {extras = ["c"], version = "^3.1.10"}
pydantic = {extras = ["email"], version = "~2.1.1"}
pydantic = {extras = ["email"], version = "~2.4.0"}
sqlalchemy = "~2.0.8"
uvicorn = "~0.23.1"
web3 = "~6.9.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/app/eth_GetTransactionCount_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ def test_transactioncount_error_4(self, client: TestClient, session: Session):
"code": 88,
"description": [
{
"ctx": {"expected": "'latest','earliest' or 'pending'"},
"ctx": {"expected": "'latest', 'earliest' or 'pending'"},
"input": "hoge",
"loc": ["query", "block_identifier"],
"msg": "Input should be 'latest','earliest' or 'pending'",
"msg": "Input should be 'latest', 'earliest' or 'pending'",
"type": "enum",
}
],
Expand Down
4 changes: 2 additions & 2 deletions tests/app/events_IbetEscrowEvents_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,13 @@ def test_error_3(self, client: TestClient, session: Session, shared_contract):
"description": [
{
"ctx": {
"expected": "'Deposited','Withdrawn','EscrowCreated','EscrowCanceled' "
"expected": "'Deposited', 'Withdrawn', 'EscrowCreated', 'EscrowCanceled' "
"or 'EscrowFinished'"
},
"input": "some_event",
"loc": ["query", "event"],
"msg": "Input should be "
"'Deposited','Withdrawn','EscrowCreated','EscrowCanceled' "
"'Deposited', 'Withdrawn', 'EscrowCreated', 'EscrowCanceled' "
"or 'EscrowFinished'",
"type": "enum",
}
Expand Down
14 changes: 9 additions & 5 deletions tests/app/events_IbetSecurityTokenEscrowEvents_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,14 +1234,18 @@ def test_error_3_1(self, client: TestClient, session: Session, shared_contract):
"description": [
{
"ctx": {
"expected": "'Deposited','Withdrawn','EscrowCreated','EscrowCanceled','EscrowFinished','ApplyForTransfer','CancelTransfer','ApproveTransfer' "
"or 'FinishTransfer'"
"expected": "'Deposited', 'Withdrawn', "
"'EscrowCreated', 'EscrowCanceled', "
"'EscrowFinished', 'ApplyForTransfer', "
"'CancelTransfer', 'ApproveTransfer' or "
"'FinishTransfer'"
},
"input": "some_event",
"loc": ["query", "event"],
"msg": "Input should be "
"'Deposited','Withdrawn','EscrowCreated','EscrowCanceled','EscrowFinished','ApplyForTransfer','CancelTransfer','ApproveTransfer' "
"or 'FinishTransfer'",
"msg": "Input should be 'Deposited', 'Withdrawn', "
"'EscrowCreated', 'EscrowCanceled', 'EscrowFinished', "
"'ApplyForTransfer', 'CancelTransfer', "
"'ApproveTransfer' or 'FinishTransfer'",
"type": "enum",
}
],
Expand Down
15 changes: 11 additions & 4 deletions tests/app/events_IbetSecurityTokenInterfaceEvents_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,14 +1356,21 @@ def test_error_3_1(self, client: TestClient, session: Session, shared_contract):
"description": [
{
"ctx": {
"expected": "'Allot','ApplyForOffering','ApplyForTransfer','ApproveTransfer','CancelTransfer','ChangeOfferingStatus','ChangeStatus','ChangeTransferApprovalRequired','Issue','Lock','Redeem','Transfer' "
"expected": "'Allot', 'ApplyForOffering', "
"'ApplyForTransfer', 'ApproveTransfer', "
"'CancelTransfer', "
"'ChangeOfferingStatus', 'ChangeStatus', "
"'ChangeTransferApprovalRequired', "
"'Issue', 'Lock', 'Redeem', 'Transfer' "
"or 'Unlock'"
},
"input": "invalid",
"loc": ["query", "event"],
"msg": "Input should be "
"'Allot','ApplyForOffering','ApplyForTransfer','ApproveTransfer','CancelTransfer','ChangeOfferingStatus','ChangeStatus','ChangeTransferApprovalRequired','Issue','Lock','Redeem','Transfer' "
"or 'Unlock'",
"msg": "Input should be 'Allot', 'ApplyForOffering', "
"'ApplyForTransfer', 'ApproveTransfer', "
"'CancelTransfer', 'ChangeOfferingStatus', "
"'ChangeStatus', 'ChangeTransferApprovalRequired', "
"'Issue', 'Lock', 'Redeem', 'Transfer' or 'Unlock'",
"type": "enum",
}
],
Expand Down
28 changes: 19 additions & 9 deletions tests/app/notification_Notifications_GET_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,25 @@ def test_error_1(self, client: TestClient, session: Session):
},
{
"ctx": {
"expected": "'NewOrder','NewOrderCounterpart','CancelOrder','CancelOrderCounterpart','ForceCancelOrder','BuyAgreement','BuySettlementOK','BuySettlementNG','SellAgreement','SellSettlementOK','SellSettlementNG','Transfer','ApplyForTransfer','ApproveTransfer' "
"expected": "'NewOrder', 'NewOrderCounterpart', "
"'CancelOrder', "
"'CancelOrderCounterpart', "
"'ForceCancelOrder', 'BuyAgreement', "
"'BuySettlementOK', 'BuySettlementNG', "
"'SellAgreement', 'SellSettlementOK', "
"'SellSettlementNG', 'Transfer', "
"'ApplyForTransfer', 'ApproveTransfer' "
"or 'CancelTransfer'"
},
"input": "hoge",
"loc": ["query", "notification_type"],
"msg": "Input should be "
"'NewOrder','NewOrderCounterpart','CancelOrder','CancelOrderCounterpart','ForceCancelOrder','BuyAgreement','BuySettlementOK','BuySettlementNG','SellAgreement','SellSettlementOK','SellSettlementNG','Transfer','ApplyForTransfer','ApproveTransfer' "
"or 'CancelTransfer'",
"msg": "Input should be 'NewOrder', 'NewOrderCounterpart', "
"'CancelOrder', 'CancelOrderCounterpart', "
"'ForceCancelOrder', 'BuyAgreement', "
"'BuySettlementOK', 'BuySettlementNG', "
"'SellAgreement', 'SellSettlementOK', "
"'SellSettlementNG', 'Transfer', 'ApplyForTransfer', "
"'ApproveTransfer' or 'CancelTransfer'",
"type": "enum",
},
{
Expand All @@ -548,14 +559,13 @@ def test_error_1(self, client: TestClient, session: Session):
},
{
"ctx": {
"expected": "'notification_type','priority','block_timestamp' "
"or 'created'"
"expected": "'notification_type', 'priority', "
"'block_timestamp' or 'created'"
},
"input": "fuga",
"loc": ["query", "sort_item"],
"msg": "Input should be "
"'notification_type','priority','block_timestamp' or "
"'created'",
"msg": "Input should be 'notification_type', 'priority', "
"'block_timestamp' or 'created'",
"type": "enum",
},
{
Expand Down

0 comments on commit de2a538

Please sign in to comment.