Skip to content

Commit

Permalink
[v2] Upgrade bundled Python interpreter to version 3.12 (#8917)
Browse files Browse the repository at this point in the history
  • Loading branch information
aemous authored Sep 16, 2024
1 parent 4167b28 commit aa65e58
Show file tree
Hide file tree
Showing 35 changed files with 673 additions and 539 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/ehancement-python-83586.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "ehancement",
"category": "python",
"description": "Update bundled Python interpreter version to 3.12.6"
}
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Create changelog
run: |
python scripts/new-change -t '${{ github.event.inputs.type }}' -c '${{ github.event.inputs.category }}' -d '${{ github.event.inputs.description }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-dep-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
# macOS pinned to 13 due to 14+ defaulting to arm64 hardware
os: [ubuntu-latest, macOS-13, windows-latest]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macOS-latest, windows-latest]
# Python 3.8 and 3.9 do not run on m1 hardware which is now standard for
# macOS-latest.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/source-dist-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
# macOS pinned to 13 due to 14+ defaulting to arm64 hardware
os: [ubuntu-latest, macOS-13, windows-latest]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
os: [macOS-latest, windows-latest]

steps:
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The aws-cli package works on Python versions:
* 3.9.x
* 3.10.x
* 3.11.x
* 3.12.x

.. attention::
We recommend that all customers regularly monitor the
Expand Down
7 changes: 7 additions & 0 deletions awscli/customizations/eks/kubeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ def has_cluster(self, name):
return name in [cluster['name']
for cluster in self.content['clusters'] if 'name' in cluster]

def __eq__(self, other):
return (
isinstance(other, Kubeconfig)
and self.path == other.path
and self.content == other.content
)


class KubeconfigValidator(object):
def __init__(self):
Expand Down
36 changes: 33 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,28 @@ classifiers = [
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
'Programming Language :: Python :: 3 :: Only',
"Programming Language :: Python :: 3",
"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',
]
dependencies = [
"colorama>=0.2.5,<0.4.7",
"docutils>=0.10,<0.20",
"cryptography>=3.3.2,<40.0.2",
"cryptography>=40.0.0,<40.0.2",
"ruamel.yaml>=0.15.0,<=0.17.21",
# ruamel.yaml only requires ruamel.yaml.clib for Python versions
# less than or equal to Python 3.10. In order to ensure we have
# a consistent dependency closure across all Python versions,
# we explicitly include ruamel.yaml.clib as a dependency.
"ruamel.yaml.clib>=0.2.0,<=0.2.7",
"ruamel.yaml.clib>=0.2.0,<=0.2.8",
"prompt-toolkit>=3.0.24,<3.0.39",
"distro>=1.5.0,<1.9.0",
"awscrt>=0.19.18,<=0.21.2",
"python-dateutil>=2.1,<=2.8.2",
"python-dateutil>=2.1,<=2.9.0",
"jmespath>=0.7.1,<1.1.0",
"urllib3>=1.25.4,<1.27",
]
Expand Down Expand Up @@ -76,6 +78,31 @@ filterwarnings = [
"error::DeprecationWarning",
"error::PendingDeprecationWarning",

# Python 3.12 introduced a new DeprecationWarning in python-dateutil's
# datetime.now() functions and they're scheduled for removal in a future
# version. When we fully switch over to timezone-aware calls instead,
# we should be able to remove these filters.
'default:datetime\.datetime\.utcnow\(\) is deprecated:DeprecationWarning',

# Python 3.12 introduced a new DeprecationWarning in python-dateutil's
# datetime.utcfromtimestamp() functions and they're scheduled for removal in
# a future version. When we fully switch over to timezone-aware calls instead,
# we should be able to remove these filters.
'default:datetime\.datetime\.utcfromtimestamp\(\) is deprecated:DeprecationWarning',

# Python 3.12 introduced a new DeprecationWarning in calls to ast.Str, which
# flit-core uses. When they release the removal of such calls, we should
# be able to remove these filters.
'default:ast\.Str is deprecated and will be removed:DeprecationWarning',

# Python 3.12 introduced a new DeprecationWarning in flit-core. When they release the
# removal of reference to 'attribute s', we should be able to remove these filters.
'default:Attribute s is deprecated and will be removed:DeprecationWarning',

# Python 3.12 introduced a new DeprecationWarning which gets raised in our call to build_sdist of
# pep517 backend. When we explicitly address this change, we should be able to remove these filters.
'default:Python 3\.14 will, by default, filter extracted tar archives and reject files or modify their metadata:DeprecationWarning',

# Do not error out on deprecation warnings stemming from our current
# version of setuptools (57.5.0) in a Python 3.10 environment. When we add
# support for the latest version of setuptools, we should be able to remove
Expand All @@ -96,6 +123,9 @@ filterwarnings = [
# https://github.com/pytest-dev/pytest-xdist/issues/825
'default:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning'
]
markers = [
"slow"
]

[tool.black]
line-length = 80
50 changes: 25 additions & 25 deletions requirements-build-lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ altgraph==0.17.4 \
# via
# macholib
# pyinstaller
importlib-metadata==8.2.0 \
--hash=sha256:11901fa0c2f97919b288679932bb64febaeacf289d18ac84dd68cb2e74213369 \
--hash=sha256:72e8d4399996132204f9a16dcc751af254a48f8d1b20b9ff0f98d4a8f901e73d
importlib-metadata==8.5.0 \
--hash=sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b \
--hash=sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7
# via pyinstaller-hooks-contrib
macholib==1.16.3 \
--hash=sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30 \
Expand All @@ -26,37 +26,37 @@ pefile==2023.2.7 \
--hash=sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc \
--hash=sha256:da185cd2af68c08a6cd4481f7325ed600a88f6a813bad9dea07ab3ef73d8d8d6
# via -r requirements-build-win.txt
pyinstaller==5.12.0 \
--hash=sha256:2f70e2d9b032e5f24a336f41affcb4624e66a84cd863ba58f6a92bd6040653bb \
--hash=sha256:303952c2a8ece894b655c2a0783a0bdc844282f47790707446bde3eaf355f0da \
--hash=sha256:3605ac72311318455907a88efb4a4b334b844659673a2a371bbaac2d8b52843a \
--hash=sha256:62d75bb70cdbeea1a0d55067d7201efa2f7d7c19e56c241291c03d551b531684 \
--hash=sha256:7eed9996c12aeee7530cbc7c57350939f46391ecf714ac176579190dbd3ec7bf \
--hash=sha256:92eeacd052092a0a4368f50ddecbeb6e020b5a70cdf113243fbd6bd8ee25524e \
--hash=sha256:96ad645347671c9fce190506c09523c02f01a503fe3ea65f79bb0cfe22a8c83e \
--hash=sha256:a1c2667120730604c3ad1e0739a45bb72ca4a502a91e2f5c5b220fbfbb05f0d4 \
--hash=sha256:b64d8a3056e6c7e4ed4d1f95e793ef401bf5b166ef00ad544b5812be0ac63b4b \
--hash=sha256:c3ceb6c3a34b9407ba16fb68a32f83d5fd94f21d43d9fe38d8f752feb75ca5bb \
--hash=sha256:d14c1c2b753af5efed96584f075a6740ea634ca55789113d325dc8c32aef50fe \
--hash=sha256:edcb6eb6618f3b763c11487db1d3516111d54bd5598b9470e295c1f628a95496
pyinstaller==5.13.2 \
--hash=sha256:16cbd66b59a37f4ee59373a003608d15df180a0d9eb1a29ff3bfbfae64b23d0f \
--hash=sha256:27cd64e7cc6b74c5b1066cbf47d75f940b71356166031deb9778a2579bb874c6 \
--hash=sha256:2c2fe9c52cb4577a3ac39626b84cf16cf30c2792f785502661286184f162ae0d \
--hash=sha256:421cd24f26144f19b66d3868b49ed673176765f92fa9f7914cd2158d25b6d17e \
--hash=sha256:65133ed89467edb2862036b35d7c5ebd381670412e1e4361215e289c786dd4e6 \
--hash=sha256:7d51734423685ab2a4324ab2981d9781b203dcae42839161a9ee98bfeaabdade \
--hash=sha256:8f6dd0e797ae7efdd79226f78f35eb6a4981db16c13325e962a83395c0ec7420 \
--hash=sha256:aadafb6f213549a5906829bb252e586e2cf72a7fbdb5731810695e6516f0ab30 \
--hash=sha256:b2e1c7f5cceb5e9800927ddd51acf9cc78fbaa9e79e822c48b0ee52d9ce3c892 \
--hash=sha256:c63ef6133eefe36c4b2f4daf4cfea3d6412ece2ca218f77aaf967e52a95ac9b8 \
--hash=sha256:c8e5d3489c3a7cc5f8401c2d1f48a70e588f9967e391c3b06ddac1f685f8d5d2 \
--hash=sha256:ddcc2b36052a70052479a9e5da1af067b4496f43686ca3cdda99f8367d0627e4
# via -r requirements-build.txt
pyinstaller-hooks-contrib==2024.7 \
--hash=sha256:8bf0775771fbaf96bcd2f4dfd6f7ae6c1dd1b1efe254c7e50477b3c08e7841d8 \
--hash=sha256:fd5f37dcf99bece184e40642af88be16a9b89613ecb958a8bd1136634fc9fac5
pyinstaller-hooks-contrib==2024.8 \
--hash=sha256:0057fe9a5c398d3f580e73e58793a1d4a8315ca91c3df01efea1c14ed557825a \
--hash=sha256:29b68d878ab739e967055b56a93eb9b58e529d5b054fbab7a2f2bacf80cef3e2
# via pyinstaller
pywin32-ctypes==0.2.2 \
--hash=sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60 \
--hash=sha256:bf490a1a709baf35d688fe0ecf980ed4de11d2b3e37b51e5442587a75d9957e7
# via -r requirements-build-win.txt
zipp==3.19.2 \
--hash=sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19 \
--hash=sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c
zipp==3.20.1 \
--hash=sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064 \
--hash=sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
setuptools==72.1.0 \
--hash=sha256:5a03e1860cf56bb6ef48ce186b0e557fdba433237481a9a625176c2831be15d1 \
--hash=sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec
setuptools==74.1.2 \
--hash=sha256:5f4c08aa4d3ebcb57a50c33b1b07e94315d7fc7230f7115e47fc99776c8ce308 \
--hash=sha256:95b40ed940a1c67eb70fc099094bd6e99c6ee7c23aa2306f4d2697ba7916f9c6
# via
# pyinstaller
# pyinstaller-hooks-contrib
2 changes: 1 addition & 1 deletion requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Requirements we need to run our build jobs for the installers.
# We create the separation for cases where we're doing installation
# from a local dependency directory instead of requirements.txt.
PyInstaller==5.12.0
PyInstaller==5.13.2
Loading

0 comments on commit aa65e58

Please sign in to comment.