Skip to content

Tox error due to slimit test #765

@Pyvonix

Description

@Pyvonix

While running tests on v2.0.8, some errors happen only for slimit tests.

tox error:

  ERROR: test_slimit (tests.tests.test_compressor.CompressorImplementationTest)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/runner/work/django-pipeline/django-pipeline/tests/tests/test_compressor.py", line 230, in test_slimit
      self._test_compressor('pipeline.compressors.slimit.SlimItCompressor',
    File "/home/runner/work/django-pipeline/django-pipeline/tests/tests/test_compressor.py", line 215, in _test_compressor
      result = self.compressor.compress_js(
    File "/home/runner/work/django-pipeline/django-pipeline/pipeline/compressors/__init__.py", line 66, in compress_js
      js = getattr(compressor(verbose=self.verbose), 'compress_js')(js)
    File "/home/runner/work/django-pipeline/django-pipeline/pipeline/compressors/slimit.py", line 10, in compress_js
      from slimit import minify
    File "/home/runner/work/django-pipeline/django-pipeline/.tox/py39-dj31/lib/python3.9/site-packages/slimit/__init__.py", line 27, in <module>
      from minifier import minify
  ModuleNotFoundError: No module named 'minifier'
  
  ----------------------------------------------------------------------

After some investigations, the package slimit have as the last release on Pypi and github the version v0.8.1 on Mar 26, 2013 which is in Python 2 (PR open since Oct 2, 2018 to merge Python 3 in master and create a new release).

Only the branch develop have recent commits and official support of Python 3.

The package available in Pypi, have an __init__.py file that look like:

from minifier import minify

Otherwise the file init.py in the repository is:

from slimit.minifier import minify  # noqa: F401

Solution :

  • Should we ignore error for the test test_slimit?
  • Should we drop the support for this library that doesn't have any release since 2013?
  • Should we manually git pull the repository with the latest commit, build the package and install it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug confirmed or can be reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions