From 111d29d7e09b51e09153c9b340959bfc6ec7e45f Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Sat, 29 Jun 2024 19:01:06 +0000 Subject: [PATCH] Admin: Support Py 3.13 --- .github/workflows/build.yml | 9 +++++++-- .github/workflows/tests_decoratormode.yml | 2 +- moto/ses/models.py | 2 +- setup.cfg | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f38344ca2697..2b8c40350a54 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12" ] + python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13.0-rc.1" ] steps: - uses: actions/checkout@v4 @@ -30,6 +30,11 @@ jobs: if: ${{ steps.pip-cache.outputs.cache-hit != 'true' }} run: | python -m pip install --upgrade pip + - name: Install XML dependencies + if: ${{ matrix.python-version == '3.13.0-rc.1' }} + run: | + echo "The libxml dependency needs these system packages to compile in Python 3.13" + sudo apt install -y libxml2-dev libxslt-dev - name: Install project dependencies if: ${{ steps.pip-cache.outputs.cache-hit != 'true' }} run: | @@ -42,7 +47,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13.0-rc.1"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/tests_decoratormode.yml b/.github/workflows/tests_decoratormode.yml index a348851370eb..8cdc43aba12a 100644 --- a/.github/workflows/tests_decoratormode.yml +++ b/.github/workflows/tests_decoratormode.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13.0-rc.1"] steps: - uses: actions/checkout@v4 diff --git a/moto/ses/models.py b/moto/ses/models.py index e8d26a9456c5..ccb252bbe8ee 100644 --- a/moto/ses/models.py +++ b/moto/ses/models.py @@ -358,7 +358,7 @@ def send_raw_email( f"Did not have authority to send from email {source}" ) - fieldvalues = [message.get(header, "") for header in ["TO", "CC", "BCC"]] + fieldvalues = [message[header] for header in ["TO", "CC", "BCC"] if header in message] destinations += [ formataddr((realname, email_address)) for realname, email_address in getaddresses(fieldvalues) diff --git a/setup.cfg b/setup.cfg index 28b41da354ec..03d5fdb5c336 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,6 +15,7 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 License :: OSI Approved :: Apache Software License Topic :: Software Development :: Testing keywords = aws ec2 s3 boto3 mock