Skip to content

Commit b972a20

Browse files
svrooijbaywetAndrew Omondi
authored
feat: adds support for python 3.13
* Add support for Python 3.13 Fixes #704 Add support for Python 3.13 and update dependencies. * **pyproject.toml** - Add Python 3.13 to the `requires-python` field. - Add Python 3.13 to the `classifiers` field. - Set higher requirement for all `microsoft-kiota-....` packages to at least 1.8.0. * **.github/workflows/build.yml** - Add Python 3.13 to the `matrix` for testing. * **requirements-dev.txt** - Update dependencies to be compatible with Python 3.13. * **tests/conftest.py** - Add a test to check for Python 3.13 compatibility. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoftgraph/msgraph-sdk-python-core/issues/704?shareId=XXXX-XXXX-XXXX-XXXX). * Update `pyproject.toml` to support Python 3.13 and set higher package requirements * Add Python 3.13 to the `requires-python` field * Add Python 3.13 to the `classifiers` field * Set higher requirement for all `microsoft-kiota-....` packages to at least 1.8.0 * chore: Copilot added something it shouldn't had * fix(ci): Publish pipeline to 3.13 * fix: Python 3.13 changes to typing * chore: revert typing changes --------- Co-authored-by: Vincent Biret <vibiret@microsoft.com> Co-authored-by: Andrew Omondi <andrew.omondi@microsoft.com>
1 parent 471018e commit b972a20

File tree

5 files changed

+51
-7
lines changed

5 files changed

+51
-7
lines changed

.devcontainer/devcontainer.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
// "image": "mcr.microsoft.com/devcontainers/python:3.9-bookworm",
7+
// "image": "mcr.microsoft.com/devcontainers/python:3.10-bookworm",
8+
// "image": "mcr.microsoft.com/devcontainers/python:3.11-bookworm",
9+
// "image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm",
10+
// "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
11+
// "image": "mcr.microsoft.com/devcontainers/python:3.13-bookworm",
12+
"image": "mcr.microsoft.com/devcontainers/python:3.13-bullseye",
13+
14+
"features": {
15+
"ghcr.io/hspaans/devcontainer-features/pytest:1": {},
16+
"ghcr.io/devcontainers-extra/features/pylint:2": {},
17+
"ghcr.io/devcontainers-extra/features/poetry:2": {}
18+
},
19+
20+
// Features to add to the dev container. More info: https://containers.dev/features.
21+
// "features": {},
22+
23+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
24+
// "forwardPorts": [],
25+
26+
// Use 'postCreateCommand' to run commands after the container is created.
27+
"postCreateCommand": "git config --global core.autocrlf true && pip3 install --user -r requirements-dev.txt",
28+
29+
// Configure tool-specific properties.
30+
"customizations": {
31+
"vscode": {
32+
"extensions": ["ms-python.python"]
33+
}
34+
}
35+
36+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
37+
// "remoteUser": "root"
38+
}

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
max-parallel: 5
1919
matrix:
20-
python-version: ["3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2121

2222
steps:
2323
- uses: actions/checkout@v4

.github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
steps:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
21-
- name: Set up Python 3.12
21+
- name: Set up Python 3.13
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: 3.12
24+
python-version: 3.13
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip

.vscode/settings.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"editor.formatOnSave": true
2+
"editor.formatOnSave": true,
3+
"python.testing.pytestArgs": [
4+
"tests"
5+
],
6+
"python.testing.unittestEnabled": false,
7+
"python.testing.pytestEnabled": true
38
}

pyproject.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ version = "1.2.1"
1111
authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}]
1212
description = "Core component of the Microsoft Graph Python SDK"
1313
dependencies = [
14-
"microsoft-kiota-abstractions >=1.0.0,<2.0.0",
15-
"microsoft-kiota-authentication-azure >=1.0.0,<2.0.0",
16-
"microsoft-kiota-http >=1.0.0,<2.0.0",
14+
"microsoft-kiota-abstractions >=1.8.0,<2.0.0",
15+
"microsoft-kiota-authentication-azure >=1.8.0,<2.0.0",
16+
"microsoft-kiota-http >=1.8.0,<2.0.0",
1717
"httpx[http2] >=0.23.0",
1818
]
1919
requires-python = ">=3.9"
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: 3.10",
2727
"Programming Language :: Python :: 3.11",
2828
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
2930
"License :: OSI Approved :: MIT License",
3031
]
3132

0 commit comments

Comments
 (0)