Skip to content

Commit c300893

Browse files
Dhanush010karenc-bq
authored andcommitted
Add Python 3.12 and 3.13 support
- Add Python 3.12 and 3.13 to package classifiers - Update CI/CD workflows to test against Python 3.12 and 3.13 - Add Gradle test tasks for Python 3.12 and 3.13 (MySQL and PostgreSQL) - Update Java and Python enum types to include 3.12 and 3.13 - Add Docker image mappings for Python 3.12 and 3.13 - Update documentation to reflect Python 3.8-3.13 support Resolves #967
1 parent 60b69cb commit c300893

File tree

12 files changed

+98
-6
lines changed

12 files changed

+98
-6
lines changed

.github/workflows/integration_tests_codebuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: [ "3.8", "3.11" ]
16+
python-version: [ "3.8", "3.11", "3.12", "3.13" ]
1717
environment: [ "mysql", "pg" ]
1818

1919
runs-on: ubuntu-latest

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
strategy:
3434
matrix:
35-
python-version: ["3.8", "3.9", "3.10", "3.11"]
35+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
3636
poetry-version: ["1.8.2"]
3737

3838
steps:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ For all other questions, please use [GitHub discussions](https://github.com/awsl
205205

206206
1. Set up your environment by following the directions in the [Development Guide](./docs/development-guide/DevelopmentGuide.md).
207207
2. To contribute, first make a fork of this project.
208-
3. Make any changes on your fork. Make sure you are aware of the requirements for the project (e.g. do not require Python 3.7 if we are supporting Python 3.8 - 3.11 (inclusive)).
208+
3. Make any changes on your fork. Make sure you are aware of the requirements for the project (e.g. do not require Python 3.7 if we are supporting Python 3.8 - 3.13 (inclusive)).
209209
4. Create a pull request from your fork.
210210
5. Pull requests need to be approved and merged by maintainers into the main branch. <br />
211211

docs/GettingStarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Before using the AWS Advanced Python Driver, you must install:
66

7-
- Python 3.8 - 3.11 (inclusive).
7+
- Python 3.8 - 3.13 (inclusive).
88
- The AWS Advanced Python Driver.
99
- Your choice of underlying Python driver.
1010
- To use the wrapper with Aurora with PostgreSQL compatibility, install [Psycopg](https://github.com/psycopg/psycopg).

docs/development-guide/DevelopmentGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Development Guide
22

33
### Setup
4-
Make sure you have Python 3.8 - 3.11 (inclusive) installed, along with your choice of underlying Python driver (see [minimum requirements](../GettingStarted.md#minimum-requirements)).
4+
Make sure you have Python 3.8 - 3.13 (inclusive) installed, along with your choice of underlying Python driver (see [minimum requirements](../GettingStarted.md#minimum-requirements)).
55

66
Clone the AWS Advanced Python Driver repository:
77

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ classifiers = [
1818
"Programming Language :: Python :: 3 :: Only",
1919
"Programming Language :: Python :: 3.10",
2020
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
2123
]
2224

2325
[tool.poetry.dependencies]

tests/integration/container/utils/target_python_version.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717

1818
class TargetPythonVersion(Enum):
1919
PYTHON_3_11 = "PYTHON_3_11"
20+
PYTHON_3_12 = "PYTHON_3_12"
21+
PYTHON_3_13 = "PYTHON_3_13"

tests/integration/host/build.gradle.kts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ tasks.register<Test>("test-python-3.11-mysql") {
6868
filter.includeTestsMatching("integration.host.TestRunner.runTests")
6969
doFirst {
7070
systemProperty("exclude-performance", "true")
71+
systemProperty("exclude-python-312", "true")
72+
systemProperty("exclude-python-313", "true")
7173
systemProperty("exclude-multi-az-cluster", "true")
7274
systemProperty("exclude-multi-az-instance", "true")
7375
systemProperty("exclude-bg", "true")
@@ -83,6 +85,76 @@ tasks.register<Test>("test-python-3.11-pg") {
8385
filter.includeTestsMatching("integration.host.TestRunner.runTests")
8486
doFirst {
8587
systemProperty("exclude-performance", "true")
88+
systemProperty("exclude-python-312", "true")
89+
systemProperty("exclude-python-313", "true")
90+
systemProperty("exclude-multi-az-cluster", "true")
91+
systemProperty("exclude-multi-az-instance", "true")
92+
systemProperty("exclude-bg", "true")
93+
systemProperty("exclude-mysql-driver", "true")
94+
systemProperty("exclude-mysql-engine", "true")
95+
systemProperty("exclude-mariadb-driver", "true")
96+
systemProperty("exclude-mariadb-engine", "true")
97+
}
98+
}
99+
100+
tasks.register<Test>("test-python-3.12-mysql") {
101+
group = "verification"
102+
filter.includeTestsMatching("integration.host.TestRunner.runTests")
103+
doFirst {
104+
systemProperty("exclude-performance", "true")
105+
systemProperty("exclude-python-311", "true")
106+
systemProperty("exclude-python-313", "true")
107+
systemProperty("exclude-multi-az-cluster", "true")
108+
systemProperty("exclude-multi-az-instance", "true")
109+
systemProperty("exclude-traces-telemetry", "true")
110+
systemProperty("exclude-metrics-telemetry", "true")
111+
systemProperty("exclude-bg", "true")
112+
systemProperty("exclude-pg-driver", "true")
113+
systemProperty("exclude-pg-engine", "true")
114+
}
115+
}
116+
117+
tasks.register<Test>("test-python-3.12-pg") {
118+
group = "verification"
119+
filter.includeTestsMatching("integration.host.TestRunner.runTests")
120+
doFirst {
121+
systemProperty("exclude-performance", "true")
122+
systemProperty("exclude-python-311", "true")
123+
systemProperty("exclude-python-313", "true")
124+
systemProperty("exclude-multi-az-cluster", "true")
125+
systemProperty("exclude-multi-az-instance", "true")
126+
systemProperty("exclude-bg", "true")
127+
systemProperty("exclude-mysql-driver", "true")
128+
systemProperty("exclude-mysql-engine", "true")
129+
systemProperty("exclude-mariadb-driver", "true")
130+
systemProperty("exclude-mariadb-engine", "true")
131+
}
132+
}
133+
134+
tasks.register<Test>("test-python-3.13-mysql") {
135+
group = "verification"
136+
filter.includeTestsMatching("integration.host.TestRunner.runTests")
137+
doFirst {
138+
systemProperty("exclude-performance", "true")
139+
systemProperty("exclude-python-311", "true")
140+
systemProperty("exclude-python-312", "true")
141+
systemProperty("exclude-multi-az-cluster", "true")
142+
systemProperty("exclude-multi-az-instance", "true")
143+
systemProperty("exclude-bg", "true")
144+
systemProperty("exclude-traces-telemetry", "true")
145+
systemProperty("exclude-metrics-telemetry", "true")
146+
systemProperty("exclude-pg-driver", "true")
147+
systemProperty("exclude-pg-engine", "true")
148+
}
149+
}
150+
151+
tasks.register<Test>("test-python-3.13-pg") {
152+
group = "verification"
153+
filter.includeTestsMatching("integration.host.TestRunner.runTests")
154+
doFirst {
155+
systemProperty("exclude-performance", "true")
156+
systemProperty("exclude-python-311", "true")
157+
systemProperty("exclude-python-312", "true")
86158
systemProperty("exclude-multi-az-cluster", "true")
87159
systemProperty("exclude-multi-az-instance", "true")
88160
systemProperty("exclude-bg", "true")

tests/integration/host/src/test/java/integration/TargetPythonVersion.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
package integration;
1818

1919
public enum TargetPythonVersion {
20-
PYTHON_3_11
20+
PYTHON_3_11,
21+
PYTHON_3_12,
22+
PYTHON_3_13
2123
}

tests/integration/host/src/test/java/integration/host/TestEnvironment.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,10 @@ private static String getContainerBaseImageName(TestEnvironmentRequest request)
11451145
return "python:3.8.18";
11461146
case PYTHON_3_11:
11471147
return "python:3.11.5";
1148+
case PYTHON_3_12:
1149+
return "python:3.12";
1150+
case PYTHON_3_13:
1151+
return "python:3.13";
11481152
default:
11491153
throw new NotImplementedException(request.getTargetPythonVersion().toString());
11501154
}

0 commit comments

Comments
 (0)