Skip to content

Commit

Permalink
Merge pull request #113 from cloudblue/LITE-31003-bump_deps
Browse files Browse the repository at this point in the history
LITE-31003: Bump dependencies & deprecate Python 3.8
  • Loading branch information
Sainomori authored Sep 12, 2024
2 parents 652e28a + 6d7306e commit 8b3efb5
Show file tree
Hide file tree
Showing 7 changed files with 862 additions and 805 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Install

`Connect EaaS Core` requires python 3.8 or later.
`Connect EaaS Core` requires python 3.9 or later.


`Connect EaaS Core` can be installed from [pypi.org](https://pypi.org/project/connect-eaas-core/) using pip:
Expand Down
1 change: 1 addition & 0 deletions connect/eaas/core/testing/testclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ def _get_application(self):
handlers = self._webapp_class.get_exception_handlers(handlers)
app = FastAPI(
exception_handlers=handlers,
root_path='/public/v1',
)

auth_router, no_auth_router = self._webapp_class.get_routers()
Expand Down
2 changes: 1 addition & 1 deletion connect/eaas/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def client_error_exception_handler(request: Request, exc: ClientError):


def get_correlation_id(connect_correlation_id):
if type(connect_correlation_id) != str:
if type(connect_correlation_id) is not str:
return None
operation_id = connect_correlation_id[3:34]
span_id = os.urandom(8).hex()
Expand Down
1,621 changes: 839 additions & 782 deletions poetry.lock

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,45 @@ classifiers = [
"Environment :: Console",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries",
]

[tool.poetry.dependencies]
python = ">=3.8,<4"
python = ">=3.9,<4"
connect-openapi-client = ">=25.20"
pydantic = "^1.10.7"
fastapi = "^0.95.0"
fastapi-utils = "^0.2.1"
logzio-python-handler = "^3.1.1"
anvil-uplink = "^0.4.0"
pydantic = "^1.10"
fastapi = "^0.114.0"
fastapi-utils = "^0.7.0"
logzio-python-handler = ">=3.1.1,<4.2"
anvil-uplink = "^0.5.1"
toml = "^0.10.2"
PyYAML = "^6.0"
typing-extensions = "<4.6.0"
urllib3 = "<2"
typing-extensions = "<5"

[tool.poetry.group.test.dependencies]
pytest = ">=6.1.2,<8"
pytest-cov = ">=2.10.1,<5"
pytest-mock = "^3.3.1"
pytest-mock = "^3.14.0"
coverage = {extras = ["toml"], version = ">=5.3,<7"}
flake8 = ">=3.8,<6"
flake8 = ">=3.8,<8"
flake8-bugbear = ">=20,<23"
flake8-cognitive-complexity = "^0.1"
flake8-commas = "~2.1"
flake8-commas = "^4.0"
flake8-future-import = "~0.4"
flake8-broken-line = ">=0.3,<0.7"
flake8-broken-line = ">=0.3,<1.1"
flake8-pyproject = "^1.2.2"
pytest-asyncio = "^0.20.1"
mock = { version = "^4.0.3", markers = "python_version < '3.8'" }
fs = "^2.4.12"
responses = ">=0.14.0,<1"
pytest-httpx = ">=0.20"
Faker = "^14.2.0"
flake8-isort = "^6.0.0"
flake8-isort = "^6.1.0"
django-rql = "^4.4.0"

[tool.poetry.group.docs.dependencies]
Expand Down
12 changes: 6 additions & 6 deletions tests/connect/eaas/core/testing/test_testclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,19 @@ def test_middlewares(webapp_mock):

assert len(client.app.user_middleware) == 3
assert client.app.user_middleware[0].cls.__name__ == 'MiddlewareTimingClassWithParams'
assert client.app.user_middleware[0].options['log_level'] == 40
assert client.app.user_middleware[0].options['threshold'] == 40.0
assert client.app.user_middleware[0].kwargs['log_level'] == 40
assert client.app.user_middleware[0].kwargs['threshold'] == 40.0
assert client.app.user_middleware[1].cls.__name__ == 'MiddlewareTimingClass'
assert client.app.user_middleware[1].options == {}
assert client.app.user_middleware[1].kwargs == {}
assert client.app.user_middleware[2].cls.__name__ == 'BaseHTTPMiddleware'
assert 'dispatch' in client.app.user_middleware[2].options
assert client.app.user_middleware[2].options['dispatch'].__name__ == 'middleware_timing'
assert 'dispatch' in client.app.user_middleware[2].kwargs
assert client.app.user_middleware[2].kwargs['dispatch'].__name__ == 'middleware_timing'


def test_exception_handlers(webapp_mock):
client = WebAppTestClient(webapp_mock)

assert len(client.app.exception_handlers) == 3
assert len(client.app.exception_handlers) == 4
assert ClientError in client.app.exception_handlers
assert RequestValidationError in client.app.exception_handlers

Expand Down

0 comments on commit 8b3efb5

Please sign in to comment.