Skip to content

Commit

Permalink
add support for python 3.10 and 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
danabens committed Mar 1, 2023
1 parent caf7b14 commit db8a283
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
uses: actions/setup-python
with:
python-version: 3.9
- name: Setup Python 3.10
uses: actions/setup-python
with:
python-version: 3.10
- name: Setup Python 3.11
uses: actions/setup-python
with:
python-version: 3.11
- name: Install Dependencies
run: pip install tox
# runs unit tests for each python version
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ def read(fname):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
setup_requires=["setuptools_scm", "setuptools"],
install_requires=required_packages,
extras_require={
"test": [
"tox==3.13.1",
"flake8",
"pytest==4.4.1",
"pytest",
"pytest-cov",
"pytest-coverage",
"pytest-rerunfailures",
Expand Down
9 changes: 6 additions & 3 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ def boto3_session():


def test_sagemaker_client_endpoint_env_set():
current = os.environ.get("SAGEMAKER_ENDPOINT")
current_endpoint = os.environ.get("SAGEMAKER_ENDPOINT")
current_region = os.environ.get("AWS_REGION")

os.environ["SAGEMAKER_ENDPOINT"] = "https://notexist.amazon.com"
os.environ["AWS_REGION"] = "arc-north-1"

client = _utils.sagemaker_client()

assert client._endpoint.host == "https://notexist.amazon.com"

if current is not None:
os.environ["SAGEMAKER_ENDPOINT"] = current
os.environ["SAGEMAKER_ENDPOINT"] = current_endpoint if current_endpoint is not None else ""
os.environ["AWS_REGION"] = current_region if current_region is not None else ""


def test_get_or_create_default_bucket_bucket_already_owned(boto3_session):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39}
envlist = py{37,38,39,310,311}

skip_missing_interpreters = False
ignore_basepython_conflict = True
Expand Down

0 comments on commit db8a283

Please sign in to comment.