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

Adjust supported python versions to ^3.8 #312

Merged
merged 9 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/test-data-plane/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true
python_version:
description: 'The version of Python to use'
required: false
default: '3.9'

outputs:
index_name:
Expand All @@ -37,7 +41,7 @@ runs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: ${{ inputs.python_version }}

- name: Setup Poetry
uses: ./.github/actions/setup-poetry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
python-version: [3.8, 3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
106 changes: 93 additions & 13 deletions .github/workflows/testing-dependency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ jobs:
matrix:
python-version:
- 3.8
# - 3.9
# - "3.10"
# - 3.11
- 3.9
- "3.10"
grpcio-version:
- 1.44.0
# - 1.46.5
Expand Down Expand Up @@ -63,15 +62,12 @@ jobs:
- 1.62.0
grpc-gateway-protoc-gen-openapiv2-version:
- 0.1.0

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
Expand All @@ -85,7 +81,6 @@ jobs:
run: poetry add protobuf==${{ matrix.protobuf-version }}
- name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }}
run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }}

- uses: nick-fields/retry@v3
with:
timeout_minutes: 5
Expand All @@ -96,8 +91,58 @@ jobs:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }}



dependency-matrix-grpc-312:
name: Deps (GRPC)
needs: dependency-matrix-setup
runs-on: ubuntu-latest
strategy:
max-parallel: 5
fail-fast: false
matrix:
python-version:
- 3.11
- 3.12
grpcio-version:
- 1.59.3
- 1.60.0
Comment on lines +89 to +90
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This range is different for 3.11 and 3.12 vs earlier versions.

lz4-version:
- 3.1.3
- 4.3.3
protobuf-version:
- 3.20.3
googleapis-common-protos-version:
- 1.53.0
- 1.62.0
grpc-gateway-protoc-gen-openapiv2-version:
- 0.1.0
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: true
include_types: false
- name: Install grpcio ${{ matrix.grpcio-version }}
run: poetry add grpcio==${{ matrix.grpcio-version }}
- name: Install lz4 ${{ matrix.lz4-version }}
run: poetry add lz4==${{ matrix.lz4-version }}
- name: Install protobuf ${{ matrix.protobuf-version }}
run: poetry add protobuf==${{ matrix.protobuf-version }}
- name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }}
run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }}
- uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: poetry run pytest tests/dependency/grpc -s -v
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }}

dependency-matrix-rest:
name: Deps (REST)
Expand All @@ -109,15 +154,50 @@ jobs:
matrix:
python-version:
- 3.8
- 3.9
- '3.10'
- 3.11
urllib3-version:
- 1.26.0
- 1.26.18
- 2.0.2
- 2.0.5
- 2.1.0
- 2.2.1
steps:
- uses: actions/checkout@v4
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: false
include_types: false
- name: 'Install urllib3 ${{ matrix.urllib3-version }}'
run: 'poetry add urllib3==${{ matrix.urllib3-version }}'
- uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: poetry run pytest tests/dependency/rest -s -v
env:
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
INDEX_NAME: '${{ needs.dependency-matrix-setup.outputs.index_name }}'

dependency-matrix-rest-312:
name: Deps (REST)
runs-on: ubuntu-latest
needs: dependency-matrix-setup
strategy:
max-parallel: 5
fail-fast: false
matrix:
python-version:
- 3.12
urllib3-version:
- 1.26.5
- 1.26.18
- 2.0.2
- 2.2.1
steps:
- uses: actions/checkout@v4
- name: 'Set up Python ${{ matrix.python-version }}'
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/testing-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: [3.8, 3.12]
use_grpc: [true, false]
metric:
- cosine
Expand All @@ -20,6 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-data-plane
with:
python_version: '${{ matrix.python_version }}'
use_grpc: '${{ matrix.use_grpc }}'
metric: '${{ matrix.metric }}'
spec: '${{ matrix.spec }}'
Expand Down Expand Up @@ -55,7 +57,7 @@ jobs:
testConfig:
- python-version: 3.8
pod: { environment: 'us-east1-gcp'}
- python-version: 3.11
- python-version: 3.12
pod: { environment: 'us-east4-gcp'}
fail-fast: false
steps:
Expand Down Expand Up @@ -88,9 +90,6 @@ jobs:
DIMENSION: 1536
METRIC: 'cosine'




control-rest-serverless:
name: control plane serverless
runs-on: ubuntu-latest
Expand All @@ -102,7 +101,7 @@ jobs:
- python-version: 3.8 # Do one test run with 3.8 for sanity check
pod: { environment: 'us-east1-gcp'}
serverless: { cloud: 'aws', region: 'us-west-2'}
- python-version: 3.11
- python-version: 3.12
pod: { environment: 'us-east1-gcp'}
serverless: { cloud: 'aws', region: 'us-west-2'}
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/testing-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- 3.9
- '3.10'
- 3.11
- 3.12
use_grpc:
- true
- false
Expand Down
42 changes: 11 additions & 31 deletions poetry.lock

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

18 changes: 13 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ classifiers=[
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Database",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
Expand All @@ -47,15 +49,21 @@ classifiers=[
]

[tool.poetry.dependencies]
python = ">=3.8,<3.13"
python = "^3.8"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the requested change that motivated me to start poking around with this.

typing-extensions = ">=3.7.4"
urllib3 = ">=1.26.0"
urllib3 = [
{ version = ">=1.26.0", python = ">=3.8,<3.12" },
{ version = ">=1.26.5", python = "^3.12" }
]
tqdm = ">=4.64.1"
# certifi does not follow semver. Should always be
# on latest but setting a broad range to have maximum
# compatibility with libraries that may pin version.
certifi = ">=2019.11.17"
grpcio = { version = ">=1.44.0", optional = true }
grpcio = [
{ version = ">=1.44.0", optional = true, python = "^3.8,<3.11" },
{ version = "^1.59.0", optional = true, python = "^3.11" }
]
grpc-gateway-protoc-gen-openapiv2 = { version = "0.1.0", optional = true }
googleapis-common-protos = { version = ">=1.53.0", optional = true }
lz4 = { version = ">=3.1.3", optional = true }
Expand All @@ -82,11 +90,11 @@ numpy = [
]
pandas = ">=1.3.5"
pdoc = "^14.1.0"
pytest = "7.2.0"
pytest = "8.0.0"
pytest-asyncio = "0.15.1"
pytest-cov = "2.10.1"
pytest-mock = "3.6.1"
pytest-timeout = ">=1.4.2"
pytest-timeout = "2.2.0"
Copy link
Collaborator Author

@jhamon jhamon Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We needed to bump these pytest dev dependencies to work with python 3.12.

urllib3_mock = "0.3.3"
responses = ">=0.8.1"

Expand Down