Skip to content

Commit

Permalink
Add OSB support for Python 3.10 and 3.11 (#225)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Hoang <[email protected]>
Co-authored-by: Ian Hoang <[email protected]>
  • Loading branch information
IanHoang and Ian Hoang authored Mar 9, 2023
1 parent 5cc8d37 commit c808af8
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 14 deletions.
12 changes: 8 additions & 4 deletions .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,20 @@ function build_it {
# ensure pyenv shims are added to PATH, see https://github.com/pyenv/pyenv/issues/1906
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
pip install opensearch-benchmark
docker pull datadog/squid:latest

python3_version=`python3 --version`
echo "Python3 version is ... $python3_version"

python3 -m pip install opensearch-benchmark
docker pull ubuntu/squid:latest

make prereq
make install
make precommit

if [[ "$1" == "Python_3.8" ]]; then
if [[ "$1" == "3.8" ]]; then
make it38
elif [[ "$1" == "Python_3.9" ]]; then
elif [[ "$1" == "3.9" ]]; then
make it39
fi
}
Expand Down
2 changes: 2 additions & 0 deletions .ci/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"python_versions": {
"PY38": "3.8.12",
"PY39": "3.9.10",
"PY310": "3.10.6",
"PY311": "3.11.1",
"MIN_PY_VER": "3.8.12"
}
}
9 changes: 7 additions & 2 deletions .github/workflows/manual-integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ jobs:
strategy:
matrix:
python-version:
- Python_3.8
- Python_3.9
- "3.8"
- "3.9"
- "3.10"
- "3.11"
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Check out repository code
uses: actions/checkout@v2
- name: Clone pyenv
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ PY_BIN = python3
PIP_WRAPPER = $(PY_BIN) -m pip
export PY38 = $(shell jq -r '.python_versions.PY38' .ci/variables.json)
export PY39 = $(shell jq -r '.python_versions.PY39' .ci/variables.json)
export PY310 = $(shell jq -r '.python_versions.PY310' .ci/variables.json)
export PY311 = $(shell jq -r '.python_versions.PY311' .ci/variables.json)
VENV_NAME ?= .venv
VENV_ACTIVATE_FILE = $(VENV_NAME)/bin/activate
VENV_ACTIVATE = . $(VENV_ACTIVATE_FILE)
Expand All @@ -35,6 +37,8 @@ VE_MISSING_HELP = "\033[0;31mIMPORTANT\033[0m: Couldn't find $(PWD)/$(VENV_NAME)
prereq:
pyenv install --skip-existing $(PY38)
pyenv install --skip-existing $(PY39)
pyenv install --skip-existing $(PY310)
pyenv install --skip-existing $(PY311)
pyenv local $(PY38)
@# Ensure all Python versions are registered for this project
@ jq -r '.python_versions | [.[] | tostring] | join("\n")' .ci/variables.json > .python-version
Expand Down
2 changes: 1 addition & 1 deletion it/proxy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def http_proxy():
lines = process.run_subprocess_with_output(f"docker run --rm --name squid -d "
f"-v {config_dir}/squidpasswords:/etc/squid/squidpasswords "
f"-v {config_dir}/squid.conf:/etc/squid/squid.conf "
f"-p 3128:3128 datadog/squid")
f"-p 3128:3128 ubuntu/squid")
proxy_container_id = lines[0].strip()
proxy = HttpProxy(authenticated_url="http://testuser:[email protected]:3128",
anonymous_url="http://127.0.0.1:3128")
Expand Down
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def str_from_file(name):
long_description = str_from_file("README.md")

# tuples of (major, minor) of supported Python versions ordered from lowest to highest
supported_python_versions = [(3, 8), (3, 9)]
supported_python_versions = [(3, 8), (3, 9), (3, 10), (3, 11)]

################################################################################################
#
Expand All @@ -66,7 +66,7 @@ def str_from_file(name):
# License: MIT
"py-cpuinfo==7.0.0",
# License: MIT
"tabulate==0.8.7",
"tabulate==0.9.0",
# License: MIT
"jsonschema==3.1.1",
# License: BSD
Expand All @@ -81,15 +81,17 @@ def str_from_file(name):
# License: MPL 2.0
"certifi",
# License: Apache 2.0
"yappi==1.2.3",
"yappi==1.4.0",
# License: BSD
"ijson==2.6.1",
# License: Apache 2.0
# transitive dependencies:
# google-crc32c: Apache 2.0
"google-resumable-media==1.1.0",
# License: Apache 2.0
"google-auth==1.22.1"
"google-auth==1.22.1",
# License: MIT
"wheel==0.38.4"
]

s3_require = [
Expand All @@ -103,7 +105,7 @@ def str_from_file(name):

tests_require = [
"ujson",
"pytest==5.4.0",
"pytest==7.2.2",
"pytest-benchmark==3.2.2",
"pytest-asyncio==0.14.0"
]
Expand All @@ -113,7 +115,7 @@ def str_from_file(name):
"tox==3.14.0",
"coverage==5.5",
"twine==1.15.0",
"wheel==0.33.6",
"wheel==0.38.4",
"github3.py==1.3.0",
"pylint==2.6.0",
"pylint-quotes==0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.2.0

0 comments on commit c808af8

Please sign in to comment.