From 4b9ce3565fc23c3c2fb0a9d848909bd39c56fa24 Mon Sep 17 00:00:00 2001 From: Charly C Date: Thu, 25 Nov 2021 10:03:31 +0100 Subject: [PATCH 1/3] create a GitHub Action to run the tests --- .github/workflows/main.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b11890d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,37 @@ +name: CI +on: + # Trigger the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + # Allow running this workflow manually from the Actions tab + workflow_dispatch: +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install required system packages + run: sudo apt-get install -y libarchive13 hunspell hunspell-fr libhunspell-dev + - name: Install Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: '3.7' + - name: Cache the .tox directory to speed things up + uses: actions/cache@v2.1.6 + with: + path: .tox + key: test-${{ runner.os }}-${{ hashFiles('requirements*.txt') }} + - name: Install tox + run: pip install tox + - name: Run the tests + run: tox -e py37,py38,py39 From a013f97aa55bbea37155dd94e625097da149aa15 Mon Sep 17 00:00:00 2001 From: Changaco Date: Tue, 23 Nov 2021 11:34:02 +0100 Subject: [PATCH 2/3] drop Travis CI configuration --- .travis.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dda78b5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: python -python: - - 3.6 - - 3.7 - - 3.8 - - 3.9 - -branches: - only: - - master - -addons: - apt: - packages: - - libarchive13 - - hunspell - - hunspell-fr - - libhunspell-dev - -install: - - sqlite3 --version - - pip install tox - -script: tox - -notifications: - email: false - -dist: focal -sudo: false From 362096da9d49f083856331ce37871ad2374a1a9b Mon Sep 17 00:00:00 2001 From: Changaco Date: Thu, 25 Nov 2021 10:11:08 +0100 Subject: [PATCH 3/3] drop support for Python 3.6 --- README.md | 2 +- legi/utils.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 69f988c..900106f 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Une fois ces dépendances système installées, vous pouvez cloner le dépôt et python -m ensurepip pip install -r requirements.txt -legi.py et les modules dont il dépend sont compatibles avec python 3.6, 3.7 et 3.8, +legi.py et les modules dont il dépend sont compatibles avec python 3.7, 3.8 et 3.9, les versions antérieurs de python peuvent générer des erreurs. legi.py peut être utilisé comme dépendance d'un autre projet, il est disponible diff --git a/legi/utils.py b/legi/utils.py index 8f25d89..4c766d9 100644 --- a/legi/utils.py +++ b/legi/utils.py @@ -7,11 +7,6 @@ from unicodedata import combining, decomposition, normalize -if not hasattr(re, 'Match'): - # For Python 3.6 - re.Match = type(re.compile('').match('')) - - IGNORE = object() NIL = object() ROOT = os.path.dirname(__file__) + '/'