Skip to content

Commit e56b9c4

Browse files
committed
v1.0.4
1 parent c4f52a7 commit e56b9c4

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ on: [push]
55
jobs:
66
test:
77
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 5
10+
matrix:
11+
python-version: [3.6, 3.7, 3.8, 3.9]
812
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python 3.9
13+
- name: Checkout 🛎️
14+
uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }} 🔧
1116
uses: actions/setup-python@v2
1217
with:
13-
python-version: 3.9
18+
python-version: ${{ matrix.python-version }}
1419
- name: Pip dependencies cache
1520
# Attempt to restore an existing cache
1621
uses: actions/cache@v2
@@ -27,17 +32,17 @@ jobs:
2732
key: ${{ runner.os }}-virtualenvs-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('dev-requirements.txt') }}
2833
restore-keys: |
2934
${{ runner.os }}-virtualenvs-
30-
- name: Install dependencies
35+
- name: Install dependencies ⚙️
3136
run: |
3237
python -m pip install -U pip poetry
3338
poetry install
3439
source $(poetry env info --path)/bin/activate
3540
pip install -r dev-requirements.txt
36-
- name: Linter
41+
- name: Linter 🔎
3742
run: |
3843
source $(poetry env info --path)/bin/activate
3944
pylint *.py
40-
- name: Tests
45+
- name: Tests
4146
run: |
4247
source $(poetry env info --path)/bin/activate
4348
py.test

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [1.0.4] - 2021-08-18
8+
### Fixed
9+
* `ImportError` with Python 3.6 due to `contextlib.nullcontext` not existing yet
10+
711
## [1.0.3] - 2021-08-18
812
### Changed
913
* several comma-separated values can now be provided as CSS selectors to `Image-preview-thumbnailer`

image_preview_thumbnailer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import logging, os, re, warnings
22
from glob import glob
3-
from contextlib import nullcontext
3+
try:
4+
from contextlib import nullcontext
5+
except ImportError: # => Python 3.6
6+
from contextlib import suppress as nullcontext
47
from tempfile import mkstemp
58

69
from bs4 import BeautifulSoup

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pelican-plugin-image-preview-thumbnailer"
3-
version = "1.0.3"
3+
version = "1.0.4"
44
description = "Pelican plugin that insert thumbnails along image links"
55
authors = ["Lucas Cimon <[email protected]>"]
66
license = "AGPL-3.0"

0 commit comments

Comments
 (0)