Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed python 3.8 support (EOL) and added 3.12 #1479

Merged
merged 7 commits into from
Nov 4, 2024
Merged
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
2 changes: 1 addition & 1 deletion .pipelines/templates/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'

- script: |
set -eux # fail on error
Expand Down
20 changes: 10 additions & 10 deletions .pipelines/templates/lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ stages:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
Python312:
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand All @@ -54,14 +54,14 @@ stages:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
Python312:
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand All @@ -76,14 +76,14 @@ stages:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
Python312:
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand All @@ -98,14 +98,14 @@ stages:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
Python312:
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand All @@ -120,14 +120,14 @@ stages:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
Python312:
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/templates/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pool:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
addToPath: true
architecture: 'x64'

Expand Down
1 change: 0 additions & 1 deletion docker-compose-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
presidio-image-redactor:
image: ${REGISTRY_NAME}${IMAGE_PREFIX}presidio-image-redactor${TAG}
Expand Down
1 change: 0 additions & 1 deletion docker-compose-text.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
presidio-anonymizer:
image: ${REGISTRY_NAME}${IMAGE_PREFIX}presidio-anonymizer${TAG}
Expand Down
1 change: 0 additions & 1 deletion docker-compose-transformers.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
presidio-anonymizer:
image: ${REGISTRY_NAME}${IMAGE_PREFIX}presidio-anonymizer${TAG}
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
presidio-anonymizer:
image: ${REGISTRY_NAME}${IMAGE_PREFIX}presidio-anonymizer${TAG}
Expand Down
3 changes: 1 addition & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ Presidio suite using `pip` (as Python packages) or using `Docker` (As containeri

Presidio is supported for the following python versions:

* 3.7
* 3.8
* 3.9
* 3.10
* 3.11
* 3.12

### PII anonymization on text

Expand Down
2 changes: 1 addition & 1 deletion docs/samples/python/streamlit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.10-slim

RUN apt-get update && apt-get install -y \
build-essential \
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/resources/demo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Here are a few examples sentences we currently support:
Hello, my name is David Johnson and I live in Maine.
My credit card number is 4095-2609-9393-4932 and my crypto wallet id is 16Yeky6GMjeNkAiNcBY7ZhrLoMSgg1BoyZ.

On September 18 I visited microsoft.com and sent an email to [email protected], from the IP 192.168.0.1.
On September 18 I visited microsoft.com and sent an email to [email protected], from IP 192.168.0.1.

My passport: 191280342 and my phone number: (212) 555-1234.

Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/resources/demo_anonymized.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Here are a few examples sentences we currently support:
Hello, my name is <PERSON> and I live in <LOCATION>.
My credit card number is <CREDIT_CARD> and my crypto wallet id is <CRYPTO>.

On <DATE_TIME> I visited <URL> and sent an email to <EMAIL_ADDRESS>, from the IP <IP_ADDRESS>.
On <DATE_TIME> I visited <URL> and sent an email to <EMAIL_ADDRESS>, from IP <IP_ADDRESS>.

My passport: <US_PASSPORT> and my phone number: <PHONE_NUMBER>.

Expand Down
2 changes: 1 addition & 1 deletion presidio-analyzer/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM python:3.9-slim
FROM python:3.10-slim

ARG DEV_MODE=dev
ARG POETRY_EXTRAS=""
ARG NLP_CONF_FILE=presidio_analyzer/conf/default.yaml
ARG ANALYZER_CONF_FILE=presidio_analyzer/conf/default_analyzer.yaml
ARG RECOGNIZER_REGISTRY_CONF_FILE=presidio_analyzer/conf/default_recognizers.yaml

ENV DEV_MODE=${DEV_MODE}
ENV PIP_NO_CACHE_DIR=1
ENV ANALYZER_CONF_FILE=${ANALYZER_CONF_FILE}
ENV RECOGNIZER_REGISTRY_CONF_FILE=${RECOGNIZER_REGISTRY_CONF_FILE}
ENV NLP_CONF_FILE=${NLP_CONF_FILE}
ENV POETRY_EXTRAS=${POETRY_EXTRAS}

# Install essential build tools
RUN apt-get update \
&& apt-get install -y build-essential

Expand Down
4 changes: 2 additions & 2 deletions presidio-analyzer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ license = "MIT"
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["presidio_analyzer"]
urls = {Homepage = "https://github.com/Microsoft/presidio"}
readme = "README.md"
include = ["conf/*",]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python = ">=3.9,<4.0"
spacy= ">=3.4.4, <4.0.0"
regex = "*"
tldextract = "*"
Expand Down
4 changes: 2 additions & 2 deletions presidio-anonymizer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ license = "MIT"
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["presidio_anonymizer"]
urls = {Homepage = "https://github.com/Microsoft/presidio"}
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python = ">=3.9,<4.0"
pycryptodome = ">=3.10.1"
azure-core = { version = "*", optional = true }
flask = { version = ">=1.1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion presidio-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CLI tool that analyzes text for PII Entities using Presidio Analyzer.

## Prerequisities

`Python` version: 3.8, 3.9, 3.10
`Python` version: 3.9, 3.10, 3.11

`poetry` tool installed:

Expand Down
4 changes: 2 additions & 2 deletions presidio-cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ license = "MIT"
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["pii", "checker", "presidio_cli"]
urls = {Homepage = "https://github.com/microsoft/presidio"}
readme = "README.md"
include = ["conf/*", ".presidiocli"]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python = ">=3.9,<4.0"
presidio-analyzer = ">= 2.2"
pyyaml = "*"
pathspec = "*"
Expand Down
2 changes: 1 addition & 1 deletion presidio-image-redactor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
FROM python:3.9-slim
FROM python:3.10-slim

ARG NAME
ARG NLP_CONF_FILE
ARG ANALYZER_CONF_FILE
ARG RECOGNIZER_REGISTRY_CONF_FILE
ENV PIP_NO_CACHE_DIR=1

ENV ANALYZER_CONF_FILE=${ANALYZER_CONF_FILE}
ENV RECOGNIZER_REGISTRY_CONF_FILE=${RECOGNIZER_REGISTRY_CONF_FILE}
ENV NLP_CONF_FILE=${NLP_CONF_FILE}

COPY ${ANALYZER_CONF_FILE} /usr/bin/${NAME}/${ANALYZER_CONF_FILE}
COPY ${RECOGNIZER_REGISTRY_CONF_FILE} /usr/bin/${NAME}/${RECOGNIZER_REGISTRY_CONF_FILE}
COPY ${NLP_CONF_FILE} /usr/bin/${NAME}/${NLP_CONF_FILE}

WORKDIR /usr/bin/${NAME}

# Install essential build tools
RUN apt-get update \
&& apt-get install -y build-essential

# install tesseract and other image related dependencies
RUN apt-get update \
&& apt-get install tesseract-ocr -y \
&& rm -rf /var/lib/apt/lists/* \
&& tesseract -v

RUN apt-get update \
&& apt-get install ffmpeg libsm6 libxext6 -y

COPY ./pyproject.toml /usr/bin/${NAME}/
COPY ./README.md /usr/bin/${NAME}/
RUN pip install poetry && poetry install --no-root --only=main -E server

COPY . /usr/bin/${NAME}/
EXPOSE ${PORT}
Expand Down
2 changes: 1 addition & 1 deletion presidio-image-redactor/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile
FROM python:3.9-slim
FROM python:3.10-slim

RUN apt-get update \
&& apt-get install -y build-essential
Expand Down
4 changes: 2 additions & 2 deletions presidio-image-redactor/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ license = "MIT"
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["presidio_image_redactor"]
urls = {Homepage = "https://github.com/Microsoft/presidio"}
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python = ">=3.9,<4.0"
pillow = ">=9.0"
pytesseract = ">=0.3.7,<0.4"
presidio-analyzer = ">=1.9.0"
Expand Down
4 changes: 2 additions & 2 deletions presidio-structured/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ license = "MIT"
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["presidio_structured"]
urls = {Homepage = "https://github.com/microsoft/presidio"}
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python = ">=3.9,<4.0"
presidio-analyzer = ">=2.2"
presidio-anonymizer = ">=2.2"
pandas = ">=1.5.2"
Expand Down
Loading