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

chore!: drop python 3.6 support #2247

Merged
merged 6 commits into from
Jul 5, 2023
Merged
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
10 changes: 2 additions & 8 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
include:
- os: "ubuntu-20.04"
python-version: "3.6"
python-version: ["3.9", "3.10"]
uses: ./.github/workflows/tests.yml
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -29,10 +26,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
include:
- os: "ubuntu-20.04"
python-version: "3.6"
python-version: ["3.9", "3.10"]
uses: ./.github/workflows/tests-indy.yml
with:
python-version: ${{ matrix.python-version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
name: Tests
uses: ./.github/workflows/tests.yml
with:
python-version: "3.6"
os: "ubuntu-20.04"
python-version: "3.9"
os: "ubuntu-latest"

tests-indy:
name: Tests (Indy)
uses: ./.github/workflows/tests-indy.yml
with:
python-version: "3.6"
python-version: "3.9"
indy-version: "1.16.0"
os: "ubuntu-20.04"
os: "ubuntu-latest"
2 changes: 1 addition & 1 deletion .github/workflows/publish-indy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.9']
python-version: ['3.9']

name: Publish ACA-Py Image (Indy)
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.9']
python-version: ['3.9']

name: Publish ACA-Py Image
runs-on: ubuntu-latest
Expand Down
5 changes: 0 additions & 5 deletions ContainerImagesAndGithubActions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,8 @@ Below is a table of all generated images and their tags:

Tag | Variant | Example | Description |
------------------------|----------|--------------------------|-------------------------------------------------------------------------------------------------|
py3.6-X.Y.Z | Standard | py3.6-0.7.4 | Standard image variant built on Python 3.6 for ACA-Py version X.Y.Z |
py3.7-X.Y.Z | Standard | py3.7-0.7.4 | Standard image variant built on Python 3.7 for ACA-Py version X.Y.Z |
py3.8-X.Y.Z | Standard | py3.8-0.7.4 | Standard image variant built on Python 3.8 for ACA-Py version X.Y.Z |
py3.9-X.Y.Z | Standard | py3.9-0.7.4 | Standard image variant built on Python 3.9 for ACA-Py version X.Y.Z |
py3.10-X.Y.Z | Standard | py3.10-0.7.4 | Standard image variant built on Python 3.10 for ACA-Py version X.Y.Z |
py3.7-indy-A.B.C-X.Y.Z | Indy | py3.7-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.7 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |
py3.8-indy-A.B.C-X.Y.Z | Indy | py3.8-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.8 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |
py3.9-indy-A.B.C-X.Y.Z | Indy | py3.9-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.9 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |
py3.10-indy-A.B.C-X.Y.Z | Indy | py3.10-indy-1.16.0-0.7.4 | Standard image variant built on Python 3.10 for ACA-Py version X.Y.Z and Indy SDK Version A.B.C |

Expand Down
2 changes: 1 addition & 1 deletion demo/docker-agent/Dockerfile.acapy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgovimages/aries-cloudagent:py36-1.16-1_1.0.0-rc0
FROM ghcr.io/hyperledger/aries-cloudagent-python:py3.9-indy-1.16.0-0.8.1

USER root

Expand Down
1 change: 0 additions & 1 deletion demo/docker-test/docker-compose-agent.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: "3"
services:
vcr-agent:
#image: bcgovimages/aries-cloudagent:py36-1.16-1_0.7.5
build:
context: ../../
dockerfile: docker/Dockerfile.run
Expand Down
2 changes: 1 addition & 1 deletion demo/multi-demo/Dockerfile.acapy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgovimages/aries-cloudagent:py36-1.16-1_1.0.0-rc0
FROM ghcr.io/hyperledger/aries-cloudagent-python:py3.9-indy-1.16.0-0.8.1

USER root

Expand Down
1 change: 1 addition & 0 deletions demo/run_bdd
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ AGENT_PORT=8020
AGENT_PORT_RANGE=8020-8079

echo "Preparing agent image..."
docker build -q -t indy-base -f ../docker/Dockerfile.indy --target=indy-base .. || exit 1
dbluhm marked this conversation as resolved.
Show resolved Hide resolved
docker build -q -t faber-alice-demo -f ../docker/Dockerfile.demo .. || exit 1
docker build -q -t aries-bdd-image -f ../docker/Dockerfile.bdd .. || exit 1

Expand Down
12 changes: 8 additions & 4 deletions demo/runners/support/agent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
from concurrent.futures import ThreadPoolExecutor
import asyncpg
import base64
import functools
Expand Down Expand Up @@ -185,6 +186,7 @@ def __init__(
self.params = params
self.proc = None
self.client_session: ClientSession = ClientSession()
self.thread_pool_executor = ThreadPoolExecutor(20)

if self.endorser_role and self.endorser_role == "author":
seed = None
Expand Down Expand Up @@ -695,13 +697,13 @@ def _process(self, args, env, loop):
close_fds=True,
)
loop.run_in_executor(
None,
self.thread_pool_executor,
output_reader,
proc.stdout,
functools.partial(self.handle_output, source="stdout"),
)
loop.run_in_executor(
None,
self.thread_pool_executor,
output_reader,
proc.stderr,
functools.partial(self.handle_output, source="stderr"),
Expand All @@ -726,7 +728,9 @@ async def start_process(self, python_path: str = None, wait: bool = True):

# start agent sub-process
loop = asyncio.get_event_loop()
future = loop.run_in_executor(None, self._process, agent_args, my_env, loop)
future = loop.run_in_executor(
self.thread_pool_executor, self._process, agent_args, my_env, loop
)
self.proc = await asyncio.wait_for(future, 20, loop=loop)
if wait:
await asyncio.sleep(1.0)
Expand All @@ -753,7 +757,7 @@ async def terminate(self):
# now shut down the agent
loop = asyncio.get_event_loop()
if self.proc:
future = loop.run_in_executor(None, self._terminate)
future = loop.run_in_executor(self.thread_pool_executor, self._terminate)
result = await asyncio.wait_for(future, 10, loop=loop)

async def listen_webhooks(self, webhook_port):
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.demo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgovimages/von-image:py36-1.15-1
FROM indy-base

ENV ENABLE_PTVSD 0
ENV ENABLE_PYDEVD_PYCHARM 0
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG python_version=3.6.13
FROM python:${python_version}-slim-buster
ARG python_version=3.9.16
FROM python:${python_version}-slim-bullseye

RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def parse_requirements(filename):
"bbs": parse_requirements("requirements.bbs.txt"),
"uvloop": {"uvloop": "^=0.14.0"},
},
python_requires=">=3.6.3",
python_requires=">=3.9",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
Expand Down