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

Publish a new release of django_compressor #963

Closed
albertyw opened this issue Dec 1, 2019 · 16 comments
Closed

Publish a new release of django_compressor #963

albertyw opened this issue Dec 1, 2019 · 16 comments
Assignees

Comments

@albertyw
Copy link
Contributor

albertyw commented Dec 1, 2019

With the current latest django-compressor 2.3, I get an import error

File ".../python3.8/site-packages/compressor/templatetags/compress.py", line 3, in <module>
from django.utils import six
ImportError: cannot import name 'six' from 'django.utils' (.../python3.8/site-packages/django/utils/__init__.py)

It looks like that was fixed in dabe46e#diff-ac8de32c7b59ab69b2ac7137529224f0, but there aren't any releases after that commit. With django.utils.six removed in Django 3.0, it looks like django-compressor won't be compatible with Django 3.0 until a new release is cut for django-compressor.

See also #940.

Running some sanity checks on two django apps that I own, I don't see any problems with the current version of django_compressor.

(For anyone else seeing this issue, you can add -e git://github.com/django-compressor/django-compressor.git@a5bfd775450428e1a261b88e1e5424bfb4dde081#egg=django_compressor into your requirements.txt file to install compressor's current master commit from directly from github)

@mitsuhisaT
Copy link

Thank you very very much.

(For anyone else seeing this issue, you can add -e git://github.com/django-compressor/django-compressor.git@a5bfd775450428e1a261b88e1e5424bfb4dde081#egg=django_compressor into your requirements.txt file to install compressor's current master commit from directly from github)

I tried

$ pip install -e git://github.com/django-compressor/django-compressor.git@a5bfd775450428e1a261b88e1e5424bfb4dde081#egg=django_compressor

and good result.

$ ./manage.py test monitor
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
........
...
.
----------------------------------------------------------------------
Ran 10 tests in 5.034s

OK
Destroying test database for alias 'default'...

@diox diox self-assigned this Dec 2, 2019
@diox
Copy link
Member

diox commented Dec 2, 2019

I'll try to find the time to do a release soon. If you want to help, testing of the develop branch in real environments is always appreciated.

@kmichel2
Copy link

kmichel2 commented Dec 3, 2019

I'm running the develop branch (@a5bfd77545) with Django 3.0 in production with the following configuration, no issue :)

COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
COMPRESS_MTIME_DELAY = 0
COMPRESS_CSS_FILTERS = [
    'compressor.filters.css_default.CssAbsoluteFilter',
    'compressor.filters.cssmin.CSSCompressorFilter'
]
COMPRESS_CSS_HASHING_METHOD = None
COMPRESS_JS_FILTERS = [
    'compressor.filters.jsmin.JSMinFilter',
]

This is on heroku with gunicorn as a server, uvicorn as an asgi worker, channels as the router and whitenoise for serving static files.

Running locally (same setup except heroku) with online compression also works fine.

@mitsuhisaT
Copy link

I install next packages via pip.
But failed install django_compressor, because installed six 1.13.0.
Please change install_requires.

    install_requires=[
        .....
        'six == 1.12.0',
    ],
  • Django
  • djangorestframework
  • markdown
  • django-filter
  • drf-yasg
  • django-bootstrap4
  • django_compressor
  • django-libsass

@nijel
Copy link

nijel commented Dec 17, 2019

I've just tested current develop branch of django_compressor with Weblate and all tests pass. Do you have plans for the release?

@albertyw
Copy link
Contributor Author

There is a PR to create a new release in #964 , which is waiting on #967

@cuu508
Copy link
Contributor

cuu508 commented Dec 18, 2019

django-compressor's setup.py has this requirement:

'django-appconf >= 1.0'

django-appconf 1.0.3 works fine. And if I install django-compressor in an empty virtualenv, this is the version that gets installed.

django-appconf 1.0.2 does not work with Django 3: it tries to import django.utils.six. When I upgrade django-compressor, and already have django-appconf==1.0.2 installed, the 1.0.2 satisifies the ">= 1.0" requirement. So in the end I have a broken install.

I think the django-appconf requirement in setup.py should be tightened up.

@albertyw
Copy link
Contributor Author

I created #978 based on the comment above. #964 can be merged after #978

@diox
Copy link
Member

diox commented Dec 30, 2019

https://pypi.org/project/django-compressor/2.4/ has been released. Hopefully it works, and huge thanks for all your efforts, @albertyw !

@diox diox closed this as completed Dec 30, 2019
@sikmir
Copy link

sikmir commented Dec 31, 2019

@diox could you add 2.4 git tag?

@diox
Copy link
Member

diox commented Dec 31, 2019

Done.

@cuu508
Copy link
Contributor

cuu508 commented Jan 2, 2020

Awesome, thanks for making the release!

The new release doesn't show up on https://django-compressor.readthedocs.io yet – would be nice to update it as well.

@diox
Copy link
Member

diox commented Jan 2, 2020

mmm I think it's because I forgot to tag at first, so it hasn't detected 2.4 yet. Not sure what can be done about that - maybe it will fix itself once we commit more stuff.

@karyon
Copy link
Contributor

karyon commented Jan 2, 2020

I rebuilt the stable version in readthedocs, which led to a new 2.4 build, but stable was still at 2.3. that looked a bit like readthedocs/readthedocs.org#3913, and wiping the environment helped, so i think all is well now. thanks for the report @cuu508!

@karyon
Copy link
Contributor

karyon commented Jan 2, 2020

@intgr reported that the latest version was also not rebuilt. i checked and it seems the problem was something else entirely, our repo still had the old github integrations in place, which have been replaced by webhooks a year ago. the latest readthedocs page was indeed not automatically updated since then. i added a webhook, so this should work automatically in the future again. thanks @intgr!

@karyon
Copy link
Contributor

karyon commented Jan 2, 2020

and it does indeed work, i just pushed bfd440f and the docs were rebuilt.

devs-cloud added a commit to devs-cloud/django-healthcheck that referenced this issue Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants