Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 51 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ jobs:
with:
fail-on-severity: low
allow-licenses: MIT, MIT-CMU, Apache-2.0, BSD-3-Clause, 0BSD, 0BSD AND Apache-2.0 AND BSD-3-Clause AND MIT
# Existing transitive dependencies whose licenses fall outside allow-licenses;
# exempted by name so version bumps (e.g. security fixes) are not blocked.
# Existing dependencies whose licenses fall outside allow-licenses.
# Exempted by name so version bumps (e.g. security fixes) are not blocked.
allow-dependencies-licenses: >-
pkg:pypi/blis, pkg:pypi/certifi, pkg:pypi/cffi, pkg:pypi/distlib,
pkg:pypi/emoji, pkg:pypi/kiwisolver, pkg:pypi/matplotlib, pkg:pypi/nodeenv,
pkg:pypi/nvidia-nvjitlink, pkg:pypi/orjson, pkg:pypi/protobuf, pkg:pypi/pyasn1,
pkg:pypi/numpy, pkg:pypi/nvidia-nvjitlink, pkg:pypi/orjson, pkg:pypi/protobuf, pkg:pypi/pyasn1,
pkg:pypi/pygments, pkg:pypi/regex, pkg:pypi/torch, pkg:pypi/tqdm,
pkg:pypi/udtools, pkg:pypi/wrapt
comment-summary-in-pr: on-failure
Expand Down Expand Up @@ -208,6 +208,54 @@ jobs:
pip install --require-hashes -r ${{ github.workspace }}/.github/pipelines/requirements-build.txt
python -m build --wheel

test-analyzer-python-315:
name: Test base Analyzer (Python 3.15)
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
defaults:
run:
working-directory: presidio-analyzer
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Python 3.15
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.15'

- name: Install locked base dependencies
run: |
python -m pip install uv==0.11.6
uv sync --locked --group dev --python 3.15

- name: Download spaCy models
run: |
for model in en_core_web_lg en_core_web_sm; do
uv run --no-sync python -m spacy download "$model"
done

- name: Run focused Analyzer tests
run: |
uv run --no-sync pytest -q \
tests/test_spacy_nlp_engine.py \
tests/test_analyzer_engine.py \
tests/test_spacy_recognizer.py

- name: Build and verify wheel
run: |
python -m pip install --require-hashes -r ../.github/pipelines/requirements-build.txt
python -m build --wheel
wheel_env="$RUNNER_TEMP/analyzer-wheel"
python -m venv "$wheel_env"
"$wheel_env/bin/python" -m pip install --only-binary=:all: dist/*.whl
"$wheel_env/bin/python" -m pip check
"$wheel_env/bin/python" -I -c 'from presidio_analyzer import AnalyzerEngine'

build-platform-images:
name: Build ${{ matrix.image }} (${{ matrix.platform }}${{ matrix.variant && format(', {0}', matrix.variant) }})
runs-on: ${{ matrix.runner }}
Expand Down
1 change: 1 addition & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Presidio is supported for the following python versions:
* 3.12
* 3.13
* 3.14
* 3.15 (base `presidio-analyzer` with spaCy)

### PII anonymization on text

Expand Down
9 changes: 6 additions & 3 deletions presidio-analyzer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
]
keywords = ["presidio_analyzer"]
urls = {Homepage = "https://github.com/data-privacy-stack/presidio"}
readme = "README.md"
include = ["conf/*",]

requires-python = ">=3.11,<3.15"
requires-python = ">=3.11,<3.16"
dependencies = [
"spacy (>=3.4.4,!=3.7.0,<4.0.0); python_version < '3.14'",
"spacy (>=3.4.4,!=3.7.0,!=3.8.14,<4.0.0); python_version >= '3.14'",
"spacy (>=3.4.4,!=3.7.0,!=3.8.14,<4.0.0); python_version == '3.14'",
"spacy (>=3.8.17,<4.0.0); python_version >= '3.15'",
# preshed 3.0.14 breaks spaCy model loading (OverflowError in Tokenizer._flush_specials,
# explosion/spaCy#14058). It was yanked and fixed in 3.0.15, so exclude only that release.
"preshed (!=3.0.14)",
"numpy (>=1.19.0,<2.5.0)",
"numpy (>=1.19.0,<2.5.0); python_version < '3.15'",
"numpy (>=2.5.2,<3.0.0); python_version >= '3.15'",
"click (>=8.1.0,<9.0.0)",
"regex (>=2023.0.0)",
"tldextract (>=5.3.1,<6.0.0)",
Expand Down
Loading
Loading