Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
Expand Down
8 changes: 1 addition & 7 deletions connect/eaas/runner/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,7 @@ def notify_process_restarted(process_type):

def iter_entry_points(group, name=None):
eps = entry_points()

# Support for Python 3.10+ where .select() is available
if hasattr(eps, 'select'):
matches = eps.select(group=group)
else:
# Older versions (pre-3.10)
matches = eps.get(group, [])
matches = eps.select(group=group)

for ep in matches:
if name is None or ep.name == name:
Expand Down
9 changes: 3 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ classifiers = [
"Environment :: Console",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -27,7 +26,7 @@ classifiers = [
cextrun = 'connect.eaas.runner.main:main'

[tool.poetry.dependencies]
python = ">=3.9,<4"
python = ">=3.10,<3.13"
websockets = "13.*"
connect-openapi-client = ">=29.0,<38"
logzio-python-handler = "^4.1.4"
Expand Down
12 changes: 7 additions & 5 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
import logging
import os
import subprocess
from importlib.metadata import (
EntryPoint,
EntryPoints,
)

import pytest
from freezegun import (
Expand Down Expand Up @@ -491,13 +495,11 @@ def test_notify_process_restarted_client_error(mocker, responses, caplog):


def test_iter_entry_points(mocker):
ep1 = mocker.MagicMock()
ep1.name = 'ep1'
ep2 = mocker.MagicMock()
ep2.name = 'ep2'
ep1 = EntryPoint('ep1', 'value1', group='ep.group')
ep2 = EntryPoint('ep2', 'value2', group='ep.group')
mocker.patch(
'connect.eaas.runner.helpers.entry_points',
return_value={'ep.group': [ep1, ep2]},
return_value=EntryPoints([ep1, ep2]),
)

assert list(iter_entry_points('ep.group', name='ep1')) == [ep1]
Expand Down
Loading