Hello community, here is the log from the commit of package python-sorl-thumbnail for openSUSE:Factory checked in at 2020-11-24 22:18:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sorl-thumbnail (Old) and /work/SRC/openSUSE:Factory/.python-sorl-thumbnail.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sorl-thumbnail" Tue Nov 24 22:18:31 2020 rev:3 rq:850557 version:12.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sorl-thumbnail/python-sorl-thumbnail.changes 2020-09-03 01:18:42.192570921 +0200 +++ /work/SRC/openSUSE:Factory/.python-sorl-thumbnail.new.5913/python-sorl-thumbnail.changes 2020-11-24 22:18:35.143835075 +0100 @@ -1,0 +2,14 @@ +Tue Nov 24 05:04:22 UTC 2020 - John Vandenberg <jay...@gmail.com> + +- Require Python 3 & Django 2+, fixing builds on Leap 15.x +- Skip flaky test test_no_source_get_image which counts open file + descriptors +- Update to v12.7.0 + * Drop support for Django 1.11 + * Added support for Django 3.1 + * Correction in convert_engine with unknown exif orientation + * Using more resilient _get_exif_orientation logic in convert engine + * Update wand_engine.py for ImageMagick 7 + * Fix cannot write mode RGBA as JPEG when thumbnailing a GIF + +------------------------------------------------------------------- Old: ---- sorl-thumbnail-12.6.3.tar.gz New: ---- sorl-thumbnail-12.7.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sorl-thumbnail.spec ++++++ --- /var/tmp/diff_new_pack.UhMwS2/_old 2020-11-24 22:18:38.091837807 +0100 +++ /var/tmp/diff_new_pack.UhMwS2/_new 2020-11-24 22:18:38.095837811 +0100 @@ -17,15 +17,16 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-sorl-thumbnail -Version: 12.6.3 +Version: 12.7.0 Release: 0 Summary: Thumbnails for Django License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/jazzband/sorl-thumbnail Source: https://files.pythonhosted.org/packages/source/s/sorl-thumbnail/sorl-thumbnail-%{version}.tar.gz -BuildRequires: %{python_module Django} +BuildRequires: %{python_module Django >= 2} BuildRequires: %{python_module boto} BuildRequires: %{python_module dbm} BuildRequires: %{python_module pgmagick} @@ -41,7 +42,7 @@ BuildRequires: python-rpm-macros BuildRequires: redis BuildRequires: vips-tools -Requires: python-Django +Requires: python-Django >= 2 Recommends: ImageMagick Recommends: python-dbm Suggests: GraphicsMagick @@ -78,6 +79,8 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +export LANG=en_US.UTF-8 + PYTHONPATH=. export DJANGO_SETTINGS_MODULE=tests.settings.pil %pytest -k 'not TemplateTestCaseB and not test_image_file_deserialize' @@ -92,7 +95,8 @@ %{_sbindir}/redis-server & export DJANGO_SETTINGS_MODULE=tests.settings.redis -%pytest -k 'not TemplateTestCaseB and not test_image_file_deserialize' +# skipping test_write and test_no_source_get_image skipped as they count open file descriptors and sometimes is off +%pytest -k 'not (TemplateTestCaseB or test_image_file_deserialize or test_no_source_get_image or test_write)' %files %{python_files} %doc AUTHORS CHANGES.rst README.rst ++++++ sorl-thumbnail-12.6.3.tar.gz -> sorl-thumbnail-12.7.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/.editorconfig new/sorl-thumbnail-12.7.0/.editorconfig --- old/sorl-thumbnail-12.6.3/.editorconfig 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/.editorconfig 2020-11-23 16:50:30.000000000 +0100 @@ -20,6 +20,6 @@ [Makefile] indent_style = tab -[.travis.yml] +[*.yml] indent_style = space indent_size = 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/.github/workflows/release.yml new/sorl-thumbnail-12.7.0/.github/workflows/release.yml --- old/sorl-thumbnail-12.6.3/.github/workflows/release.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/.github/workflows/release.yml 2020-11-23 16:50:30.000000000 +0100 @@ -0,0 +1,56 @@ +name: Release + +on: + push: + branches: + - master + release: + types: + - published + +jobs: + build: + if: github.repository == 'jazzband/sorl-thumbnail' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: release-${{ hashFiles('**/setup.py') }} + restore-keys: | + release- + + - name: Install dependencies + run: | + python -m pip install -U pip + python -m pip install -U setuptools twine wheel + + - name: Build package + run: | + python setup.py --version + python setup.py sdist --format=gztar bdist_wheel + twine check dist/* + + - name: Upload packages to Jazzband + if: github.event.action == 'published' + uses: pypa/gh-action-pypi-publish@master + with: + user: jazzband + password: ${{ secrets.JAZZBAND_RELEASE_KEY }} + repository_url: https://jazzband.co/projects/sorl-thumbnail/upload diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/.github/workflows/test.yml new/sorl-thumbnail-12.7.0/.github/workflows/test.yml --- old/sorl-thumbnail-12.6.3/.github/workflows/test.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/.github/workflows/test.yml 2020-11-23 16:50:30.000000000 +0100 @@ -0,0 +1,56 @@ +name: Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8] + target: [pil, imagemagick, graphicsmagick, redis, wand, dbm, qa] + + steps: + - uses: actions/checkout@v2 + + - name: Start Redis + uses: supercharge/redis-github-action@1.1.0 + + - name: Install system dependencies + run: sudo apt-get install libgraphicsmagick1-dev graphicsmagick libjpeg62 zlib1g-dev + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: + test-${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} + restore-keys: | + test-${{ matrix.python-version }}-v1- + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade tox tox-gh-actions + + - name: Tox tests + shell: bash + run: | + tox + env: + TARGET: ${{ matrix.target }} + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + name: Python ${{ matrix.python-version }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/.travis.yml new/sorl-thumbnail-12.7.0/.travis.yml --- old/sorl-thumbnail-12.6.3/.travis.yml 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,70 +0,0 @@ -language: python -dist: xenial -python: - - 3.6 - - 3.7 - - 3.8 -env: - - TOXENV=qa - - - DJANGO=1.11 PACKAGE=pil - - DJANGO=1.11 PACKAGE=imagemagick - - DJANGO=1.11 PACKAGE=graphicsmagick - - DJANGO=1.11 PACKAGE=redis - - DJANGO=1.11 PACKAGE=wand - - DJANGO=1.11 PACKAGE=dbm - - - DJANGO=2.2 PACKAGE=pil - - DJANGO=2.2 PACKAGE=imagemagick - - DJANGO=2.2 PACKAGE=graphicsmagick - - DJANGO=2.2 PACKAGE=redis - - DJANGO=2.2 PACKAGE=wand - - DJANGO=2.2 PACKAGE=dbm - - - DJANGO=3.0 PACKAGE=pil - - DJANGO=3.0 PACKAGE=imagemagick - - DJANGO=3.0 PACKAGE=graphicsmagick - - DJANGO=3.0 PACKAGE=redis - - DJANGO=3.0 PACKAGE=wand - - DJANGO=3.0 PACKAGE=dbm -jobs: - include: - - stage: deploy - env: - python: 3.6 - script: skip - deploy: - provider: pypi - user: jazzband - server: https://jazzband.co/projects/sorl-thumbnail/upload - distributions: sdist bdist_wheel - password: - secure: BZlzJyqEbo1nofxEqeE12EyIcM6ldJL40yDRo62qk1dBirUV+eJQN3kTJtKTqVgTMRalQJKqMZgbhWtvxo2wsuBx+JW3LlfjYuY/fNzj/+5x7Tq/NEy4HyBj4RdWdincmdvQ0n4ixar6cDr79KjHUzC9Db3psbTRE6+Vw0EJTM4= - skip_existing: true - on: - tags: true - repo: jazzband/sorl-thumbnail - python: 3.6 -addons: - apt: - packages: - - libgraphicsmagick1-dev - - graphicsmagick - - libjpeg62 - - zlib1g-dev -cache: - pip: true -after_failure: - - cat /home/travis/.pip/pip.log -after_success: - - codecov -install: - - pip install tox-travis codecov -script: - - env | sort - - tox -services: - - redis-server -notifications: - email: false - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/CHANGES.rst new/sorl-thumbnail-12.7.0/CHANGES.rst --- old/sorl-thumbnail-12.6.3/CHANGES.rst 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/CHANGES.rst 2020-11-23 16:50:30.000000000 +0100 @@ -2,6 +2,16 @@ Changes ======= +12.7.0 +====== +* Drop support for Django 1.11 +* Added support for Django 3.1 +* Moved to GitHub Action for continuous integration. +* Correction in convert_engine with unknown exif orientation +* Using more resilient _get_exif_orientation logic in convert engine +* Update wand_engine.py for ImageMagick 7 +* Fix cannot write mode RGBA as JPEG when thumbnailing a GIF + 12.6.3 ====== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/PKG-INFO new/sorl-thumbnail-12.7.0/PKG-INFO --- old/sorl-thumbnail-12.6.3/PKG-INFO 2020-02-13 14:00:29.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/PKG-INFO 2020-11-23 16:50:40.622443700 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: sorl-thumbnail -Version: 12.6.3 +Version: 12.7.0 Summary: Thumbnails for Django Home-page: https://github.com/jazzband/sorl-thumbnail Author: Mikko Hellsing @@ -8,14 +8,14 @@ Maintainer: Jazzband Maintainer-email: road...@jazzband.co License: BSD -Description: |jazzband-badge| |pypi| |docs| |travis| |codecov| +Description: |jazzband-badge| |pypi| |docs| |gh-actions| |codecov| Thumbnails for Django. Features at a glance ==================== - - Support for Django 1.11, 2.2 and 3.0 following the `Django supported versions policy`_ + - Support for Django 2.2, 3.0 and 3.1 following the `Django supported versions policy`_ - Python 3 support - Storage support - Pluggable Engine support for `Pillow`_, `ImageMagick`_, `PIL`_, `Wand`_, `pgmagick`_, and `vipsthumbnail`_ @@ -171,8 +171,8 @@ So it will avoid to overly query the S3 API. - .. |travis| image:: https://travis-ci.org/jazzband/sorl-thumbnail.svg?branch=master - :target: https://travis-ci.org/jazzband/sorl-thumbnail + .. |gh-actions| image:: https://github.com/jazzband/sorl-thumbnail/workflows/Test/badge.svg + :target: https://github.com/jazzband/sorl-thumbnail/actions .. |docs| image:: https://readthedocs.org/projects/pip/badge/?version=latest :alt: Documentation for latest version :target: http://sorl-thumbnail.rtfd.org/en/latest/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/README.rst new/sorl-thumbnail-12.7.0/README.rst --- old/sorl-thumbnail-12.6.3/README.rst 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/README.rst 2020-11-23 16:50:30.000000000 +0100 @@ -1,11 +1,11 @@ -|jazzband-badge| |pypi| |docs| |travis| |codecov| +|jazzband-badge| |pypi| |docs| |gh-actions| |codecov| Thumbnails for Django. Features at a glance ==================== -- Support for Django 1.11, 2.2 and 3.0 following the `Django supported versions policy`_ +- Support for Django 2.2, 3.0 and 3.1 following the `Django supported versions policy`_ - Python 3 support - Storage support - Pluggable Engine support for `Pillow`_, `ImageMagick`_, `PIL`_, `Wand`_, `pgmagick`_, and `vipsthumbnail`_ @@ -161,8 +161,8 @@ So it will avoid to overly query the S3 API. -.. |travis| image:: https://travis-ci.org/jazzband/sorl-thumbnail.svg?branch=master - :target: https://travis-ci.org/jazzband/sorl-thumbnail +.. |gh-actions| image:: https://github.com/jazzband/sorl-thumbnail/workflows/Test/badge.svg + :target: https://github.com/jazzband/sorl-thumbnail/actions .. |docs| image:: https://readthedocs.org/projects/pip/badge/?version=latest :alt: Documentation for latest version :target: http://sorl-thumbnail.rtfd.org/en/latest/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/codecov.yml new/sorl-thumbnail-12.7.0/codecov.yml --- old/sorl-thumbnail-12.6.3/codecov.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/codecov.yml 2020-11-23 16:50:30.000000000 +0100 @@ -0,0 +1,4 @@ +coverage: + precision: 2 + round: down + range: "60...100" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/docs/contributing.rst new/sorl-thumbnail-12.7.0/docs/contributing.rst --- old/sorl-thumbnail-12.6.3/docs/contributing.rst 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/docs/contributing.rst 2020-11-23 16:50:30.000000000 +0100 @@ -11,7 +11,7 @@ Running testsuit ================ -For occasional developers we recommend using `Travis CI`_ to run testsuit, +For occasional developers we recommend using `GitHub Actions`_ to run testsuite, for those who want to run tests locally, read on. Since sorl-thumbnail supports a variety of image backends, python and @@ -39,7 +39,7 @@ You can get away without using Vagrant if you install all packages locally yourself, however, this is not recommended. -.. _Travis CI: https://travis-ci.org/jazzband/sorl-thumbnail +.. _GitHub Actions: https://github.com/jazzband/sorl-thumbnail/actions .. _Vagrant: http://www.vagrantup.com/ .. _tox: https://testrun.org/tox/latest/ .. _Install Vagrant: http://docs.vagrantup.com/v2/installation/index.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/docs/reference/image.rst new/sorl-thumbnail-12.7.0/docs/reference/image.rst --- old/sorl-thumbnail-12.6.3/docs/reference/image.rst 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/docs/reference/image.rst 2020-11-23 16:50:30.000000000 +0100 @@ -21,7 +21,7 @@ ``name`` -------- -Name of the image as returned from the underlaying storage. +Name of the image as returned from the underlying storage. ``storage`` ----------- @@ -49,7 +49,7 @@ ``url`` ------- -URL of the image url as returned by the underlaying storage. +URL of the image url as returned by the underlying storage. ``src`` ------- @@ -69,7 +69,7 @@ ``exists`` ---------- -Returns whether the file exists as returned by the underlaying storage. +Returns whether the file exists as returned by the underlying storage. ``is_portrait`` --------------- @@ -81,7 +81,7 @@ ``read`` -------- -Reads the file as done from the underlaying storage. +Reads the file as done from the underlying storage. ``write`` --------- @@ -90,7 +90,7 @@ ``delete`` ---------- -Deletes the file from underlaying storage. +Deletes the file from underlying storage. ``serialize`` ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/docs/requirements.rst new/sorl-thumbnail-12.7.0/docs/requirements.rst --- old/sorl-thumbnail-12.6.3/docs/requirements.rst 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/docs/requirements.rst 2020-11-23 16:50:30.000000000 +0100 @@ -4,7 +4,7 @@ Base requirements ================= -- `Python`_ 2.7+ +- `Python`_ 3.6+ - `Django`_ - :ref:`kvstore-requirements` - :ref:`image-library` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/admin/current.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/admin/current.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/admin/current.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/admin/current.py 2020-11-23 16:50:30.000000000 +0100 @@ -22,7 +22,7 @@ template_with_clear = '<label>%(clear_checkbox_label)s: %(clear)s</label>' def render(self, name, value, attrs=None, **kwargs): - output = super(AdminImageWidget, self).render(name, value, attrs, **kwargs) + output = super().render(name, value, attrs, **kwargs) if value and hasattr(value, 'url'): ext = 'JPEG' try: @@ -50,7 +50,7 @@ return mark_safe(output) -class AdminImageMixin(object): +class AdminImageMixin: """ This is a mix-in for InlineModelAdmin subclasses to make ``ImageField`` show nicer form widget @@ -59,5 +59,4 @@ def formfield_for_dbfield(self, db_field, request, **kwargs): if isinstance(db_field, ImageField): return db_field.formfield(widget=AdminImageWidget) - sup = super(AdminImageMixin, self) - return sup.formfield_for_dbfield(db_field, request, **kwargs) + return super().formfield_for_dbfield(db_field, request, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/base.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/base.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/base.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/base.py 2020-11-23 16:50:30.000000000 +0100 @@ -19,7 +19,7 @@ } -class ThumbnailBackend(object): +class ThumbnailBackend: """ The main class for sorl-thumbnail, you can subclass this if you for example want to change the way destination filename is generated. @@ -102,13 +102,13 @@ if settings.THUMBNAIL_FORCE_OVERWRITE or not thumbnail.exists(): try: source_image = default.engine.get_image(source) - except IOError as e: + except Exception as e: logger.exception(e) if settings.THUMBNAIL_DUMMY: return DummyImageFile(geometry_string) else: - # if S3Storage says file doesn't exist remotely, don't try to - # create it and exit early. + # if storage backend says file doesn't exist remotely, + # don't try to create it and exit early. # Will return working empty image type; 404'd image logger.warning( 'Remote file [%s] at [%s] does not exist', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/conf/__init__.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/conf/__init__.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/conf/__init__.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/conf/__init__.py 2020-11-23 16:50:30.000000000 +0100 @@ -1,19 +1,19 @@ from django.conf import settings as user_settings -from django.utils.functional import LazyObject from sorl.thumbnail.conf import defaults -class Settings(object): - pass +class Settings: + """ + Settings proxy that will lookup first in the django settings, and then in the conf + defaults. + """ + def __getattr__(self, name): + if name != name.upper(): + raise AttributeError(name) + try: + return getattr(user_settings, name) + except AttributeError: + return getattr(defaults, name) -class LazySettings(LazyObject): - def _setup(self): - self._wrapped = Settings() - for obj in (defaults, user_settings): - for attr in dir(obj): - if attr == attr.upper(): - setattr(self, attr, getattr(obj, attr)) - - -settings = LazySettings() +settings = Settings() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/conf/defaults.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/conf/defaults.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/conf/defaults.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/conf/defaults.py 2020-11-23 16:50:30.000000000 +0100 @@ -47,7 +47,7 @@ THUMBNAIL_DBM_MODE = 0o644 # Cache timeout for ``cached_db`` store. You should probably keep this at -# maximum or ``0`` if your caching backend can handle that as infinate. +# maximum or ``0`` if your caching backend can handle that as infinite. THUMBNAIL_CACHE_TIMEOUT = 3600 * 24 * 365 * 10 # 10 years # The cache configuration to use for storing thumbnail data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/base.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/base.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/base.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/base.py 2020-11-23 16:50:30.000000000 +0100 @@ -4,7 +4,7 @@ from sorl.thumbnail.parsers import parse_cropbox -class EngineBase(object): +class EngineBase: """ ABC for Thumbnail engines, methods are static """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/convert_engine.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/convert_engine.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/convert_engine.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/convert_engine.py 2020-11-23 16:50:30.000000000 +0100 @@ -110,9 +110,9 @@ p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.wait() result = p.stdout.read().strip() - if result and result != b'unknown': + try: return int(result) - else: + except ValueError: return None def _orientation(self, image): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/pil_engine.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/pil_engine.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/pil_engine.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/pil_engine.py 2020-11-23 16:50:30.000000000 +0100 @@ -140,7 +140,9 @@ # Pillow JPEG doesn't allow RGBA anymore. It was converted to RGB before. if image.mode == 'RGBA' and format != 'JPEG': return image # RGBA is just RGB + Alpha - if image.mode == 'LA' or (image.mode == 'P' and 'transparency' in image.info): + if image.mode == 'LA' or ( + image.mode == 'P' and 'transparency' in image.info and format != 'JPEG' + ): newimage = image.convert('RGBA') transparency = image.info.get('transparency') if transparency is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/wand_engine.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/wand_engine.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/engines/wand_engine.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/engines/wand_engine.py 2020-11-23 16:50:30.000000000 +0100 @@ -3,6 +3,7 @@ ''' from wand.image import Image +from wand.version import MAGICK_VERSION_NUMBER from wand import exceptions from sorl.thumbnail.engines.base import EngineBase @@ -53,12 +54,18 @@ def _colorspace(self, image, colorspace): if colorspace == 'RGB': if image.alpha_channel: - image.type = 'truecolormatte' + if MAGICK_VERSION_NUMBER < 0x700: + image.type = 'truecolormatte' + else: + image.type = 'truecoloralpha' else: image.type = 'truecolor' elif colorspace == 'GRAY': if image.alpha_channel: - image.type = 'grayscalematte' + if MAGICK_VERSION_NUMBER < 0x700: + image.type = 'grayscalematte' + else: + image.type = 'grayscalealpha' else: image.type = 'grayscale' else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/fields.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/fields.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/fields.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/fields.py 2020-11-23 16:50:30.000000000 +0100 @@ -1,7 +1,7 @@ from django.db import models from django.db.models import Q from django import forms -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from sorl.thumbnail import default @@ -31,7 +31,7 @@ def formfield(self, **kwargs): defaults = {'form_class': ImageFormField} defaults.update(kwargs) - return super(ImageField, self).formfield(**defaults) + return super().formfield(**defaults) def save_form_data(self, instance, data): if data is not None: @@ -49,7 +49,7 @@ Checks that the file-upload field data contains a valid image (GIF, JPG, PNG, possibly others -- whatever the engine supports). """ - f = super(ImageFormField, self).to_python(data) + f = super().to_python(data) if f is None: return None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/helpers.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/helpers.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/helpers.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/helpers.py 2020-11-23 16:50:30.000000000 +0100 @@ -18,7 +18,7 @@ def __init__(self, **kwargs): kwargs['sort_keys'] = True - super(SortedJSONEncoder, self).__init__(**kwargs) + super().__init__(**kwargs) def toint(number): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/images.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/images.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/images.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/images.py 2020-11-23 16:50:30.000000000 +0100 @@ -43,7 +43,7 @@ return image_file -class BaseImageFile(object): +class BaseImageFile: size = [] def exists(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/base.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/base.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/base.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/base.py 2020-11-23 16:50:30.000000000 +0100 @@ -17,7 +17,7 @@ return key.split('||')[-1] -class KVStoreBase(object): +class KVStoreBase: def get(self, image_file): """ Gets the ``image_file`` from store. Returns ``None`` if not found. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/cached_db_kvstore.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/cached_db_kvstore.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/cached_db_kvstore.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/cached_db_kvstore.py 2020-11-23 16:50:30.000000000 +0100 @@ -4,13 +4,13 @@ from sorl.thumbnail.models import KVStore as KVStoreModel -class EMPTY_VALUE(object): +class EMPTY_VALUE: pass class KVStore(KVStoreBase): def __init__(self): - super(KVStore, self).__init__() + super().__init__() @property def cache(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/dbm_kvstore.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/dbm_kvstore.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/dbm_kvstore.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/dbm_kvstore.py 2020-11-23 16:50:30.000000000 +0100 @@ -33,7 +33,7 @@ fcntl.lockf(f.fileno(), fcntl.LOCK_UN) -class DBMContext(object): +class DBMContext: """ A context manager to access the key-value store in a concurrent-safe manner. """ @@ -62,7 +62,7 @@ # environments. def __init__(self): - super(KVStore, self).__init__() + super().__init__() self.filename = settings.THUMBNAIL_DBM_FILE self.mode = settings.THUMBNAIL_DBM_MODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/dynamodb_kvstore.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/dynamodb_kvstore.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/dynamodb_kvstore.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/dynamodb_kvstore.py 2020-11-23 16:50:30.000000000 +0100 @@ -6,7 +6,7 @@ class KVStore(KVStoreBase): def __init__(self): - super(KVStore, self).__init__() + super().__init__() region = settings.AWS_REGION_NAME access_key = settings.AWS_ACCESS_KEY_ID secret = settings.AWS_SECRET_ACCESS_KEY diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/redis_kvstore.py new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/redis_kvstore.py --- old/sorl-thumbnail-12.6.3/sorl/thumbnail/kvstores/redis_kvstore.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl/thumbnail/kvstores/redis_kvstore.py 2020-11-23 16:50:30.000000000 +0100 @@ -5,7 +5,7 @@ class KVStore(KVStoreBase): def __init__(self): - super(KVStore, self).__init__() + super().__init__() if hasattr(settings, 'THUMBNAIL_REDIS_URL'): self.connection = redis.from_url(settings.THUMBNAIL_REDIS_URL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl_thumbnail.egg-info/PKG-INFO new/sorl-thumbnail-12.7.0/sorl_thumbnail.egg-info/PKG-INFO --- old/sorl-thumbnail-12.6.3/sorl_thumbnail.egg-info/PKG-INFO 2020-02-13 14:00:28.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl_thumbnail.egg-info/PKG-INFO 2020-11-23 16:50:40.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: sorl-thumbnail -Version: 12.6.3 +Version: 12.7.0 Summary: Thumbnails for Django Home-page: https://github.com/jazzband/sorl-thumbnail Author: Mikko Hellsing @@ -8,14 +8,14 @@ Maintainer: Jazzband Maintainer-email: road...@jazzband.co License: BSD -Description: |jazzband-badge| |pypi| |docs| |travis| |codecov| +Description: |jazzband-badge| |pypi| |docs| |gh-actions| |codecov| Thumbnails for Django. Features at a glance ==================== - - Support for Django 1.11, 2.2 and 3.0 following the `Django supported versions policy`_ + - Support for Django 2.2, 3.0 and 3.1 following the `Django supported versions policy`_ - Python 3 support - Storage support - Pluggable Engine support for `Pillow`_, `ImageMagick`_, `PIL`_, `Wand`_, `pgmagick`_, and `vipsthumbnail`_ @@ -171,8 +171,8 @@ So it will avoid to overly query the S3 API. - .. |travis| image:: https://travis-ci.org/jazzband/sorl-thumbnail.svg?branch=master - :target: https://travis-ci.org/jazzband/sorl-thumbnail + .. |gh-actions| image:: https://github.com/jazzband/sorl-thumbnail/workflows/Test/badge.svg + :target: https://github.com/jazzband/sorl-thumbnail/actions .. |docs| image:: https://readthedocs.org/projects/pip/badge/?version=latest :alt: Documentation for latest version :target: http://sorl-thumbnail.rtfd.org/en/latest/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/sorl_thumbnail.egg-info/SOURCES.txt new/sorl-thumbnail-12.7.0/sorl_thumbnail.egg-info/SOURCES.txt --- old/sorl-thumbnail-12.6.3/sorl_thumbnail.egg-info/SOURCES.txt 2020-02-13 14:00:29.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/sorl_thumbnail.egg-info/SOURCES.txt 2020-11-23 16:50:40.000000000 +0100 @@ -1,6 +1,5 @@ .editorconfig .gitignore -.travis.yml AUTHORS CHANGES.rst CONTRIBUTING.rst @@ -8,10 +7,13 @@ MANIFEST.in README.rst Vagrantfile +codecov.yml setup.cfg setup.py tox.ini vagrant.sh +.github/workflows/release.yml +.github/workflows/test.yml docs/Makefile docs/conf.py docs/contributing.rst @@ -80,6 +82,7 @@ tests/data/6_righttop.jpg tests/data/7_rightbottom.jpg tests/data/8_leftbottom.jpg +tests/data/animation_w_transparency.gif tests/data/aspect_test.jpg tests/data/broken.jpeg tests/data/icc_profile_test.jpg Binary files old/sorl-thumbnail-12.6.3/tests/data/animation_w_transparency.gif and new/sorl-thumbnail-12.7.0/tests/data/animation_w_transparency.gif differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/kvstore.py new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/kvstore.py --- old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/kvstore.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/kvstore.py 2020-11-23 16:50:30.000000000 +0100 @@ -1,7 +1,7 @@ from sorl.thumbnail.kvstores.cached_db_kvstore import KVStore -class KVlogHandler(object): +class KVlogHandler: _log = [] _active = False @@ -22,18 +22,18 @@ kvlog = KVlogHandler() -class TestKvStoreMixin(object): +class TestKvStoreMixin: def get(self, *args, **kwargs): kvlog.log('get') - return super(TestKvStoreMixin, self).get(*args, **kwargs) + return super().get(*args, **kwargs) def set(self, *args, **kwargs): kvlog.log('set') - return super(TestKvStoreMixin, self).set(*args, **kwargs) + return super().set(*args, **kwargs) def delete(self, *args, **kwargs): kvlog.log('delete') - return super(TestKvStoreMixin, self).delete(*args, **kwargs) + return super().delete(*args, **kwargs) class TestKVStore(TestKvStoreMixin, KVStore): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/storage.py new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/storage.py --- old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/storage.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/storage.py 2020-11-23 16:50:30.000000000 +0100 @@ -8,7 +8,7 @@ def __init__(self, *args, **kwargs): self.reset() - super(MockLoggingHandler, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def emit(self, record): self.messages[record.levelname.lower()].append(record.getMessage()) @@ -20,58 +20,58 @@ slog = logging.getLogger('slog') -class TestStorageMixin(object): +class TestStorageMixin: def open(self, name, *args, **kwargs): slog.debug('open: %s' % name) - return super(TestStorageMixin, self).open(name, *args, **kwargs) + return super().open(name, *args, **kwargs) def save(self, name, *args, **kwargs): slog.debug('save: %s' % name) - return super(TestStorageMixin, self).save(name, *args, **kwargs) + return super().save(name, *args, **kwargs) def get_valid_name(self, name, *args, **kwargs): slog.debug('get_valid_name: %s' % name) - return super(TestStorageMixin, self).get_valid_name(name, *args, **kwargs) + return super().get_valid_name(name, *args, **kwargs) def get_available_name(self, name, *args, **kwargs): slog.debug('get_available_name: %s' % name) - return super(TestStorageMixin, self).get_available_name(name, *args, **kwargs) + return super().get_available_name(name, *args, **kwargs) def path(self, name, *args, **kwargs): # slog.debug('path: %s' % name) - return super(TestStorageMixin, self).path(name, *args, **kwargs) + return super().path(name, *args, **kwargs) def delete(self, name, *args, **kwargs): slog.debug('delete: %s' % name) - return super(TestStorageMixin, self).delete(name, *args, **kwargs) + return super().delete(name, *args, **kwargs) def exists(self, name, *args, **kwargs): slog.debug('exists: %s' % name) - return super(TestStorageMixin, self).exists(name, *args, **kwargs) + return super().exists(name, *args, **kwargs) def listdir(self, name, *args, **kwargs): slog.debug('listdir: %s' % name) - return super(TestStorageMixin, self).listdir(name, *args, **kwargs) + return super().listdir(name, *args, **kwargs) def size(self, name, *args, **kwargs): slog.debug('size: %s' % name) - return super(TestStorageMixin, self).size(name, *args, **kwargs) + return super().size(name, *args, **kwargs) def url(self, name, *args, **kwargs): # slog.debug('url: %s' % name) - return super(TestStorageMixin, self).url(name, *args, **kwargs) + return super().url(name, *args, **kwargs) def accessed_time(self, name, *args, **kwargs): slog.debug('accessed_time: %s' % name) - return super(TestStorageMixin, self).accessed_time(name, *args, **kwargs) + return super().accessed_time(name, *args, **kwargs) def created_time(self, name, *args, **kwargs): slog.debug('created_time: %s' % name) - return super(TestStorageMixin, self).created_time(name, *args, **kwargs) + return super().created_time(name, *args, **kwargs) def modified_time(self, name, *args, **kwargs): slog.debug('modified_time: %s' % name) - return super(TestStorageMixin, self).modified_time(name, *args, **kwargs) + return super().modified_time(name, *args, **kwargs) class TestStorage(TestStorageMixin, FileSystemStorage): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/test_alternative_resolutions.py new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/test_alternative_resolutions.py --- old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/test_alternative_resolutions.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/test_alternative_resolutions.py 2020-11-23 16:50:30.000000000 +0100 @@ -18,11 +18,11 @@ def setUp(self): settings.THUMBNAIL_ALTERNATIVE_RESOLUTIONS = [1.5, 2] - super(AlternativeResolutionsTest, self).setUp() + super().setUp() self.maxDiff = None def tearDown(self): - super(AlternativeResolutionsTest, self).tearDown() + super().tearDown() settings.THUMBNAIL_ALTERNATIVE_RESOLUTIONS = [] def test_retina(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/test_engines.py new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/test_engines.py --- old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/test_engines.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/test_engines.py 2020-11-23 16:50:30.000000000 +0100 @@ -183,6 +183,12 @@ img = Image.open(th.storage.path(th.name)) self.assertTrue(self.is_transparent(img)) + def test_transparency_gif_to_jpeg(self): + path = 'data/animation_w_transparency.gif' + th = self.BACKEND.get_thumbnail(path, '11x11', format='JPEG') + img = Image.open(th.storage.path(th.name)) + self.assertFalse(self.is_transparent(img)) + def test_image_file_deserialize(self): im = ImageFile(Item.objects.get(image='500x500.jpg').image) default.kvstore.set(im) @@ -248,7 +254,7 @@ class CropTestCase(BaseTestCase): def setUp(self): - super(CropTestCase, self).setUp() + super().setUp() # portrait name = 'portrait.jpg' @@ -387,7 +393,7 @@ # so we cannot test for pixel color class CropBoxTestCase(BaseTestCase): def setUp(self): - super(CropBoxTestCase, self).setUp() + super().setUp() # portrait name = 'portrait.jpg' @@ -533,7 +539,7 @@ self.BACKEND = get_module_class(settings.THUMBNAIL_BACKEND)() def tearDown(self): - super(DummyTestCase, self).tearDown() + super().tearDown() settings.THUMBNAIL_ALTERNATIVE_RESOLUTIONS = [] def test_dummy_tags(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/test_templatetags.py new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/test_templatetags.py --- old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/test_templatetags.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/test_templatetags.py 2020-11-23 16:50:30.000000000 +0100 @@ -5,12 +5,13 @@ from django.template.loader import render_to_string from django.test import Client, TestCase +from django.test.utils import override_settings import pytest from sorl.thumbnail.conf import settings from sorl.thumbnail.engines.pil_engine import Engine as PILEngine from .models import Item -from .utils import BaseTestCase, override_custom_settings, DATA_DIR +from .utils import BaseTestCase, DATA_DIR pytestmark = pytest.mark.django_db @@ -136,7 +137,7 @@ class TemplateTestCaseClient(TestCase): def test_empty_error(self): - with override_custom_settings(settings, THUMBNAIL_DEBUG=False): + with override_settings(THUMBNAIL_DEBUG=False): from django.core.mail import outbox client = Client() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/utils.py new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/utils.py --- old/sorl-thumbnail-12.6.3/tests/thumbnail_tests/utils.py 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/tests/thumbnail_tests/utils.py 2020-11-23 16:50:30.000000000 +0100 @@ -6,8 +6,6 @@ from subprocess import check_output from PIL import Image, ImageDraw -from django.test.signals import setting_changed -from django.conf import UserSettingsHolder from sorl.thumbnail.conf import settings from sorl.thumbnail.helpers import get_module_class @@ -48,42 +46,7 @@ return nprocs -class override_custom_settings(object): - """ - settings overrider context manager. - https://github.com/django/django/blob/1.6.2/django/test/utils.py#L209-L268 - """ - - def __init__(self, settings_obj, **kwargs): - self.settings = settings_obj - self.options = kwargs - - def __enter__(self): - self.enable() - - def __exit__(self, exc_type, exc_value, traceback): - self.disable() - - def enable(self): - override = UserSettingsHolder(self.settings._wrapped) - for key, new_value in self.options.items(): - setattr(override, key, new_value) - self.wrapped = self.settings._wrapped - self.settings._wrapped = override - for key, new_value in self.options.items(): - setting_changed.send(sender=self.settings._wrapped.__class__, - setting=key, value=new_value, enter=True) - - def disable(self): - self.settings._wrapped = self.wrapped - del self.wrapped - for key in self.options: - new_value = getattr(self.settings, key, None) - setting_changed.send(sender=self.settings._wrapped.__class__, - setting=key, value=new_value, enter=False) - - -class FakeFile(object): +class FakeFile: """ Used to test the _get_format method. """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sorl-thumbnail-12.6.3/tox.ini new/sorl-thumbnail-12.7.0/tox.ini --- old/sorl-thumbnail-12.6.3/tox.ini 2020-02-13 14:00:02.000000000 +0100 +++ new/sorl-thumbnail-12.7.0/tox.ini 2020-11-23 16:50:30.000000000 +0100 @@ -1,27 +1,28 @@ -[travis] +[gh-actions] python = 3.6: py36 3.7: py37 3.8: py38 -[travis:env] +[gh-actions:env] DJANGO = - 1.11: django111 2.2: django22 3.0: django30 -PACKAGE = + 3.1: django31 +TARGET = pil: pil imagemagick: imagemagick graphicsmagick: graphicsmagick redis: redis wand: wand dbm: dbm + qa: qa [tox] skipsdist = True envlist = - qa - py{36,37,38}-django{111,22,30}-{pil,imagemagick,graphicsmagick,redis,dynamodb,wand,pgmagick,dbm,vipsthumbnail} + py{36,37,38}-qa, + py{36,37,38}-django{22,30,31}-{pil,imagemagick,graphicsmagick,redis,dynamodb,wand,pgmagick,dbm,vipsthumbnail} [testenv] deps = @@ -33,9 +34,10 @@ dynamodb: boto pgmagick: pgmagick wand: wand - django111: django>=1.11,<1.12 django22: django>=2.2,<2.3 django30: django>=3.0,<3.1 + django31: django>=3.1,<3.2 + setenv = PYTHONPATH = {toxinidir}:{toxinidir} pil: DJANGO_SETTINGS_MODULE=tests.settings.pil @@ -48,9 +50,9 @@ pgmagick: DJANGO_SETTINGS_MODULE=tests.settings.pgmagick dbm: DJANGO_SETTINGS_MODULE=tests.settings.dbm commands = - pytest -rw --cov-append --cov-config setup.cfg --cov sorl + pytest -rw --cov-append --cov-config setup.cfg --cov sorl --cov-report=xml -[testenv:qa] +[testenv:py{36,37,38}-qa] skip_install = True deps = flake8 _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org