From bef0470ff2ae353cf9ea79bcdb176d23afbd2f30 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 00:04:59 +0300 Subject: [PATCH] Update Python version support: Remove 3.9 (EOL), Add 3.13 (#1741) --- .github/workflows/ci.yml | 2 +- .pipelines/templates/lint-build-test.yml | 20 ++++++++++---------- docs/installation.md | 2 +- docs/samples/python/gliner.md | 3 --- presidio-analyzer/pyproject.toml | 4 ++-- presidio-anonymizer/pyproject.toml | 4 ++-- presidio-cli/README.md | 2 +- presidio-cli/pyproject.toml | 5 +++-- presidio-image-redactor/pyproject.toml | 5 ++--- presidio-structured/pyproject.toml | 5 ++--- 10 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c3f372e6..14bb8d347 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] component: - name: 'Analyzer' path: 'presidio-analyzer' diff --git a/.pipelines/templates/lint-build-test.yml b/.pipelines/templates/lint-build-test.yml index 14b0d55dd..4b93eee05 100644 --- a/.pipelines/templates/lint-build-test.yml +++ b/.pipelines/templates/lint-build-test.yml @@ -32,14 +32,14 @@ stages: vmImage: 'ubuntu-latest' strategy: matrix: - Python39: - python.version: '3.9' Python310: python.version: '3.10' Python311: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' steps: - task: UsePythonVersion@0 @@ -54,14 +54,14 @@ stages: vmImage: 'ubuntu-latest' strategy: matrix: - Python39: - python.version: '3.9' Python310: python.version: '3.10' Python311: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' steps: - task: UsePythonVersion@0 @@ -76,14 +76,14 @@ stages: vmImage: 'ubuntu-latest' strategy: matrix: - Python39: - python.version: '3.9' Python310: python.version: '3.10' Python311: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' steps: - task: UsePythonVersion@0 @@ -98,14 +98,14 @@ stages: vmImage: 'ubuntu-latest' strategy: matrix: - Python39: - python.version: '3.9' Python310: python.version: '3.10' Python311: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' steps: - task: UsePythonVersion@0 @@ -120,14 +120,14 @@ stages: vmImage: 'ubuntu-latest' strategy: matrix: - Python39: - python.version: '3.9' Python310: python.version: '3.10' Python311: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' steps: - task: UsePythonVersion@0 diff --git a/docs/installation.md b/docs/installation.md index 52e27d008..978930887 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -17,10 +17,10 @@ Presidio suite using `pip` (as Python packages) or using `Docker` (As containeri Presidio is supported for the following python versions: -* 3.9 * 3.10 * 3.11 * 3.12 +* 3.13 ### PII anonymization on text diff --git a/docs/samples/python/gliner.md b/docs/samples/python/gliner.md index 7e8bfc99f..57896b526 100644 --- a/docs/samples/python/gliner.md +++ b/docs/samples/python/gliner.md @@ -26,9 +26,6 @@ To use GLiNER with Presidio, you need to install the `presidio-analyzer` with th pip install 'presidio-analyzer[gliner]' ``` -!!! note - GLiNER only supports python 3.10 and above, while Presidio supports version 3.9 and above. - ### Example ```python diff --git a/presidio-analyzer/pyproject.toml b/presidio-analyzer/pyproject.toml index 7fe7fc552..cf30a0785 100644 --- a/presidio-analyzer/pyproject.toml +++ b/presidio-analyzer/pyproject.toml @@ -11,17 +11,17 @@ license = "MIT" classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] keywords = ["presidio_analyzer"] urls = {Homepage = "https://github.com/Microsoft/presidio"} readme = "README.md" include = ["conf/*",] -requires-python = ">=3.9,<3.14" +requires-python = ">=3.10,<3.14" dependencies = [ "spacy (>=3.4.4, !=3.7.0)", "regex", diff --git a/presidio-anonymizer/pyproject.toml b/presidio-anonymizer/pyproject.toml index 6d6eb768c..a44dfad5b 100644 --- a/presidio-anonymizer/pyproject.toml +++ b/presidio-anonymizer/pyproject.toml @@ -11,16 +11,16 @@ license = "MIT" classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] keywords = ["presidio_anonymizer"] urls = {Homepage = "https://github.com/Microsoft/presidio"} readme = "README.md" -requires-python = ">=3.9,<4.0" +requires-python = ">=3.10,<4.0" dependencies = [ "cryptography (<44.1)" ] diff --git a/presidio-cli/README.md b/presidio-cli/README.md index 7c5b1068b..12da55ce1 100644 --- a/presidio-cli/README.md +++ b/presidio-cli/README.md @@ -10,7 +10,7 @@ CLI tool that analyzes text for PII Entities using Presidio Analyzer. ## Prerequisites -`Python` version: 3.9, 3.10, 3.11 +`Python` version: 3.10, 3.11, 3.12, 3.13 `poetry` tool installed: diff --git a/presidio-cli/pyproject.toml b/presidio-cli/pyproject.toml index 80b50dfb8..e50fa7b60 100644 --- a/presidio-cli/pyproject.toml +++ b/presidio-cli/pyproject.toml @@ -11,16 +11,16 @@ license = "MIT" classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] keywords = ["pii", "checker", "presidio_cli"] urls = {Homepage = "https://github.com/microsoft/presidio"} readme = "README.md" include = ["conf/*", ".presidiocli"] -requires-python = ">=3.9,<4.0" +requires-python = ">=3.10,<3.14" dependencies = [ "presidio-analyzer (>= 2.2)", @@ -31,6 +31,7 @@ dependencies = [ [project.scripts] presidio = "presidio_cli.cli:run" + [tool.poetry.group.dev.dependencies] pip = "*" ruff = "*" diff --git a/presidio-image-redactor/pyproject.toml b/presidio-image-redactor/pyproject.toml index 0aeec1c1f..3cbddbc5e 100644 --- a/presidio-image-redactor/pyproject.toml +++ b/presidio-image-redactor/pyproject.toml @@ -11,15 +11,15 @@ license = "MIT" classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] keywords = ["presidio_image_redactor"] urls = {Homepage = "https://github.com/Microsoft/presidio"} readme = "README.md" -requires-python = ">=3.9,<3.14" +requires-python = ">=3.10,<3.14" dependencies = [ "pillow (>=9.0)", @@ -31,7 +31,6 @@ dependencies = [ "azure-ai-formrecognizer (>=3.3.0,<4.0.0)", "opencv-python (>=4.0.0,<5.0.0)", "python-gdcm (>=3.0.24.1)", - "spacy <3.8.4 ; python_version == '3.9'", #Remove once 3.9 is EOL "spacy >=3.8.7,<4.0.0 ; python_version >= '3.13'"] [project.optional-dependencies] diff --git a/presidio-structured/pyproject.toml b/presidio-structured/pyproject.toml index 903e969b5..a8bb2fea7 100644 --- a/presidio-structured/pyproject.toml +++ b/presidio-structured/pyproject.toml @@ -11,21 +11,20 @@ license = "MIT" classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] keywords = ["presidio_structured"] urls = {Homepage = "https://github.com/microsoft/presidio"} readme = "README.md" -requires-python = ">=3.9,<4.0" +requires-python = ">=3.10,<4.0" dependencies = [ "presidio-analyzer (>=2.2)", "presidio-anonymizer (>=2.2)", "pandas (>=1.5.2)", - "spacy (<3.8.4) ; python_version<'3.10'" #Remove once 3.9 is EOL ] [tool.poetry.group.dev.dependencies]