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

Added python 3.11 and 3.12 to tests CI #570

Merged
merged 5 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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 .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion packages/opal-client/opal_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ async def maybe_init_healthcheck_policy(self):
raise ValueError("OPA health check policy not found!")

try:
healthcheck_policy_code = open(healthcheck_policy_path, "r").read()
with open(healthcheck_policy_path, "r") as file:
healthcheck_policy_code = file.read()
except IOError as err:
logger.error(
"Critical: Cannot read healthcheck policy: {err}", err=repr(err)
Expand Down
6 changes: 4 additions & 2 deletions packages/opal-common/opal_common/authentication/casting.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def cast_private_key(

key_path = os.path.expanduser(value)
if os.path.isfile(key_path):
raw_key = open(key_path, "rb").read()
with open(key_path, "rb") as file:
raw_key = file.read()
else:
raw_key = maybe_decode_multiline_key(value)

Expand Down Expand Up @@ -84,7 +85,8 @@ def cast_public_key(value: str, key_format: EncryptionKeyFormat) -> Optional[Pub

key_path = os.path.expanduser(value)
if os.path.isfile(key_path):
raw_key = open(key_path, "rb").read()
with open(key_path, "rb") as file:
raw_key = file.read()
elif key_format == EncryptionKeyFormat.ssh: # ssh key format is one line
raw_key = to_bytes(value)
else:
Expand Down
2 changes: 1 addition & 1 deletion packages/opal-common/requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pyjwt[crypto]>=2.4.0,<3
python-decouple>=3.6,<4
tenacity>=8.0.1,<9
datadog>=0.44.0, <1
ddtrace>=2,<3
ddtrace>=2.8.1,<3
2 changes: 1 addition & 1 deletion packages/requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ typer>=0.4.1,<1
fastapi>=0.109.1,<1
fastapi_websocket_pubsub==0.3.7
fastapi_websocket_rpc>=0.1.21,<1
gunicorn>=20.1.0,<21
gunicorn>=22.0.0,<23
pydantic[email]>=1.9.1,<2
typing-extensions;python_version<'3.8'
uvicorn[standard]>=0.17.6,<1
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-e ./packages/opal-common
-e ./packages/opal-client
-e ./packages/opal-server
ipython
ipython>=8.10.0
pytest
pytest-asyncio
pytest-rerunfailures
wheel
wheel>=0.38.0
twine
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
Loading