Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -27,7 +27,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install pipenv
run: pip install pipenv==2023.5.19
run: pip install pipenv==2024.4.1

- name: Install dependencies
run: pipenv install --skip-lock -d
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.13"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -16,7 +16,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install pipenv
run: pip install pipenv==2023.5.19
run: pip install pipenv==2024.4.1

- name: Install dependencies
run: pipenv install --skip-lock -d
Expand All @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -41,7 +41,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install pipenv
run: pip install pipenv==2023.5.19
run: pip install pipenv==2024.4.1

- name: Install dependencies
run: pipenv install --skip-lock -d
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.11.3
FROM python:3.13.2
WORKDIR /usr/local/app
RUN apt-get update && apt-get install -y groff-base
ADD Pipfile /usr/local/app
RUN pip install pipenv==2023.5.19 && pipenv install --skip-lock -d
RUN pip install pipenv==2024.4.1 && pipenv install --skip-lock -d
ENTRYPOINT ["pipenv", "run"]
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify_ssl = true
name = "pypi"

[packages]
botocore = "==1.31.1"
botocore = "==1.37.10"

[dev-packages]
isort = "*"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It works by feeding AWS-SDK-compatible model JSONs to botocore module.

## Requirements

- Python 3.7 or later
- Python 3.8 or later

## How to Install

Expand Down
24 changes: 22 additions & 2 deletions nifcloud/session.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
import ssl

from botocore import __version__ as botocore_version
from botocore import session
from botocore.httpsession import URLLib3Session
from botocore.session import get_session # noqa: F401

import nifcloud

# for ncl4lb
extra_ciphers = "AES256-SHA256"

ssl_context = ssl.create_default_context()
default_ciphers = ssl_context.get_ciphers()
default_cipher_names = ":".join(c['name'] for c in default_ciphers)
ssl_context.set_ciphers(f"{default_cipher_names}:{extra_ciphers}")


class CustomURLLib3Session(URLLib3Session):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._manager.connection_pool_kw['ssl_context'] = ssl_context


class Session(session.Session):

Expand All @@ -19,10 +36,13 @@ def create_client(self, service_name, region_name=None, api_version=None,
use_ssl=True, verify=None, endpoint_url=None,
nifcloud_access_key_id=None, nifcloud_secret_access_key=None,
nifcloud_session_token=None, config=None):
return super(Session, self).create_client(
client = super(Session, self).create_client(
service_name, region_name=region_name, api_version=api_version, use_ssl=use_ssl,
verify=verify, endpoint_url=endpoint_url, aws_access_key_id=nifcloud_access_key_id,
aws_secret_access_key=nifcloud_secret_access_key, aws_session_token=nifcloud_session_token, config=config)
aws_secret_access_key=nifcloud_secret_access_key, aws_session_token=nifcloud_session_token, config=config
)
client._endpoint.http_session = CustomURLLib3Session()
return client


session.Session = Session
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def find_version(*file_paths):
package_data={'nifcloud': ['data/*.json',
'data/*/*/*.json']},
include_package_data=True,
install_requires=['botocore==1.31.1'],
install_requires=['botocore==1.37.10'],
license='Apache License 2.0',
classifiers=(
'Development Status :: 5 - Production/Stable',
Expand All @@ -45,10 +45,11 @@ def find_version(*file_paths):
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'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',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
),
)