Skip to content

Commit

Permalink
Making cfripper compatible with Python3.10 (#219)
Browse files Browse the repository at this point in the history
* first iteration for making cfripper compatible with Python3.10

* update changelog and version

* update version to 1.9.0

* PR suggestions - removing docker dev dependency and including extra requirements provided by moto

* update CHANGELOG.md

Co-authored-by: Ramon <ramon.guimera@skyscanner.net>
Co-authored-by: Jordi Soucheiron <jsoucheiron@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 19, 2022
1 parent e1dea01 commit f567d4e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']

name: Python ${{ matrix.python-version }}

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ All notable changes to this project will be documented in this file.

## [1.9.0]
### Improvements
- CFRipper is now compatible with Python3.10
- CFRipper is now able to detect new types of wildcard usage.

### Updates
- Bump dev dependency `moto` to allow `>=3.0.0`.

## [1.8.0]
### Improvements
- Pin `click` to at least version `8.0.0`.
Expand Down
2 changes: 1 addition & 1 deletion cfripper/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION = (1, 8, 0)
VERSION = (1, 9, 0)

__version__ = ".".join(map(str, VERSION))
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.9
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# make freeze
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"pytest>=3.6",
"pytest-cov>=2.5.1",
"pip-tools>=5.3.1",
"moto==1.3.14",
"moto[cloudformation,s3]>=3.0.0",
]

docs_requires = [
Expand Down
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ def default_allow_all_config():
),
],
)


@pytest.fixture
def default_aws_region() -> str:
return "eu-west-1"
10 changes: 6 additions & 4 deletions tests/test_boto3_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@


@pytest.fixture
def s3_bucket():
def s3_bucket(default_aws_region):
with mock_s3():
boto3.client("s3").create_bucket(Bucket=TEST_BUCKET_NAME)
boto3.client("s3").create_bucket(
Bucket=TEST_BUCKET_NAME, CreateBucketConfiguration={"LocationConstraint": default_aws_region}
)
yield boto3.resource("s3").Bucket(TEST_BUCKET_NAME)


@pytest.fixture
def boto3_client():
def boto3_client(default_aws_region):
with mock_sts():
yield Boto3Client("123456789", "eu-west-1", "stack-id")
yield Boto3Client("123456789", default_aws_region, "stack-id")


@pytest.mark.parametrize(
Expand Down

0 comments on commit f567d4e

Please sign in to comment.