From 8605f6238407d94f8d49aed782b97e48b179e304 Mon Sep 17 00:00:00 2001 From: Stephan van Rooij <1292510+svrooij@users.noreply.github.com> Date: Thu, 6 Feb 2025 15:30:21 +0000 Subject: [PATCH 1/2] feat: Python 3.13 support Fixed add support for python 3.13 #927 --- .devcontainer/devcontainer.json | 38 +++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 2 +- pyproject.toml | 14 ++++++------ requirements-dev.txt | 1 - 5 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..910000f8d72 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,38 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + // "image": "mcr.microsoft.com/devcontainers/python:3.9-bookworm", + // "image": "mcr.microsoft.com/devcontainers/python:3.10-bookworm", + // "image": "mcr.microsoft.com/devcontainers/python:3.11-bookworm", + // "image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm", + // "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", + //"image": "mcr.microsoft.com/devcontainers/python:3.13-bookworm", + "image": "mcr.microsoft.com/devcontainers/python:3.13-bullseye", + + "features": { + "ghcr.io/hspaans/devcontainer-features/pytest:1": {}, + //"ghcr.io/devcontainers-extra/features/pylint:2": {}, + //"ghcr.io/devcontainers-extra/features/poetry:2": {} + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "git config --global core.autocrlf true && pip3 install --user -r requirements-dev.txt", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": ["ms-python.python"] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3737672fc8..0f1c25dae1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: strategy: max-parallel: 5 matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8d01c3cbc2b..93de9b16306 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: 3.13 - name: Install flit run: | pip install flit diff --git a/pyproject.toml b/pyproject.toml index 46f65f9940d..0e191c2ed5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,14 +12,11 @@ authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] description = "The Microsoft Graph Python SDK" dependencies = [ "azure-identity >=1.12.0", - "microsoft-kiota-abstractions >=1.3.0,<2.0.0", - "microsoft-kiota-authentication-azure >=1.0.0,<2.0.0", - "microsoft-kiota-serialization-json >=1.3.0,<2.0.0", - "microsoft-kiota-serialization-text >=1.0.0,<2.0.0", - "microsoft-kiota-serialization-form >=0.1.0", - "microsoft-kiota-serialization-multipart >=0.1.0", - "microsoft-kiota-http >=1.0.0,<2.0.0", - "msgraph_core >=1.0.0" + "microsoft-kiota-serialization-json >=1.8.0,<2.0.0", + "microsoft-kiota-serialization-text >=1.8.0,<2.0.0", + "microsoft-kiota-serialization-form >=1.8.0,<2.0.0", + "microsoft-kiota-serialization-multipart >=1.8.0,<2.0.0", + "msgraph_core >=1.3.1" ] requires-python = ">=3.9" @@ -32,6 +29,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 :: MIT License", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 3decadcf2dc..91d2c44ba41 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -51,7 +51,6 @@ opentelemetry-sdk==1.30.0 opentelemetry-semantic-conventions==0.51b0 packaging==24.2 pathlib2==2.3.7.post1 -pendulum==3.0.0 platformdirs==4.3.6 portalocker==2.10.1 pycparser==2.22 From 1d21bdd6d6ca9f2517f786bf27df30de2b42db8a Mon Sep 17 00:00:00 2001 From: Stephan van Rooij <1292510+svrooij@users.noreply.github.com> Date: Thu, 6 Feb 2025 15:52:53 +0000 Subject: [PATCH 2/2] fix: Bump kiota versions Related to #1103 --- requirements-dev.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 91d2c44ba41..45d0c20d557 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -33,16 +33,16 @@ lazy-object-proxy==1.10.0 lexid==2021.1006 looseversion==1.3.0 mccabe==0.7.0 -microsoft-kiota-abstractions==1.9.1 -microsoft-kiota-authentication-azure==1.9.1 -microsoft-kiota-http==1.9.1 -microsoft-kiota-serialization-form==1.9.1 -microsoft-kiota-serialization-json==1.9.1 -microsoft-kiota-serialization-multipart==1.9.1 -microsoft-kiota-serialization-text==1.9.1 +microsoft-kiota-abstractions==1.9.2 +microsoft-kiota-authentication-azure==1.9.2 +microsoft-kiota-http==1.9.2 +microsoft-kiota-serialization-form==1.9.2 +microsoft-kiota-serialization-json==1.9.2 +microsoft-kiota-serialization-multipart==1.9.2 +microsoft-kiota-serialization-text==1.9.2 msal==1.31.1 msal-extensions==1.2.0 -msgraph-core==1.3.0 +msgraph-core==1.3.1 multidict==6.1.0 mypy==1.15.0 mypy-extensions==1.0.0