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

Tox error due to slimit test #765

Closed
Pyvonix opened this issue Jan 6, 2022 · 1 comment
Closed

Tox error due to slimit test #765

Pyvonix opened this issue Jan 6, 2022 · 1 comment
Labels
bug Bug confirmed or can be reproduced

Comments

@Pyvonix
Copy link

Pyvonix commented Jan 6, 2022

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.
@Pyvonix Pyvonix added the bug Bug confirmed or can be reproduced label Jan 6, 2022
@cyberdelia
Copy link
Member

We can probably drop it since technically Django don't even support 2.x anymore.

Pyvonix pushed a commit that referenced this issue Jan 10, 2022
Remove slimit official package support due to not maintained package:
no any release since 2013
@Pyvonix Pyvonix closed this as completed Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug confirmed or can be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants