Bump pip from 21.0.1 to 22.0.2, setuptools from 53.0.0 to 60.6.0, wheel from 0.36.2 to 0.37.1 (#4267)

* bump pip from 21.0.1 to 22.0.2, setuptools from 53.0.0 to 60.6.0, wheel from 0.36.2 to 0.37.1
* used maintained django_sendfile2 package instead of django sendfile
* fixed cy tests due django_sendfile used wrong header
main
Andrey Zhavoronkov 4 years ago committed by GitHub
parent 9fc6a1ec8e
commit 2b50abba14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Users don't have access to a task object anymore if they are assigneed only on some jobs of the task (<https://github.com/openvinotoolkit/cvat/pull/3788>)
- Different resources (tasks, projects) are not visible anymore for all CVAT instance users by default (<https://github.com/openvinotoolkit/cvat/pull/3788>)
- Replaced 'django_sendfile' with 'django_sendfile2' (<https://github.com/openvinotoolkit/cvat/pull/4267>)
### Deprecated
- Job field "status" is not used in UI anymore, but it has not been removed from the database yet (<https://github.com/openvinotoolkit/cvat/pull/3788>)

@ -44,7 +44,7 @@ RUN curl -sL https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 --outp
# Install requirements
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
RUN python3 -m pip install --no-cache-dir -U pip==21.0.1 setuptools==53.0.0 wheel==0.36.2
RUN python3 -m pip install --no-cache-dir -U pip==22.0.2 setuptools==60.6.0 wheel==0.37.1
COPY cvat/requirements/ /tmp/requirements/
RUN DATUMARO_HEADLESS=1 python3 -m pip install --no-cache-dir -r /tmp/requirements/${DJANGO_CONFIGURATION}.txt

@ -21,7 +21,7 @@ from rest_framework import serializers, status
from rest_framework.parsers import JSONParser
from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from sendfile import sendfile
from django_sendfile import sendfile
import cvat.apps.dataset_manager as dm
from cvat.apps.engine import models

@ -35,7 +35,7 @@ from rest_framework.permissions import SAFE_METHODS
from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from rest_framework.exceptions import PermissionDenied
from sendfile import sendfile
from django_sendfile import sendfile
import cvat.apps.dataset_manager as dm
import cvat.apps.dataset_manager.views # pylint: disable=unused-import

@ -1,7 +1,7 @@
import os
import glob
from django.conf import settings
from sendfile import sendfile
from django_sendfile import sendfile
def OpenCVLibrary(request):
dirname = os.path.join(settings.STATIC_ROOT, 'opencv', 'js')

@ -18,7 +18,7 @@ requests==2.26.0
rq==1.5.1
rq-scheduler==0.10.0
sqlparse==0.4.2
django-sendfile==0.3.11
django-sendfile2==0.6.1
dj-pagination==2.5.0
python-logstash-async==2.2.0
django-revproxy==0.10.0

@ -106,7 +106,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'django_rq',
'compressor',
'sendfile',
'django_sendfile',
'dj_pagination',
'revproxy',
'rest_framework',
@ -498,3 +498,8 @@ TUS_DEFAULT_CHUNK_SIZE = 104857600 # 100 mb
# More about forwarded headers - https://doc.traefik.io/traefik/getting-started/faq/#what-are-the-forwarded-headers-when-proxying-http-requests
# How django uses X-Forwarded-Proto - https://docs.djangoproject.com/en/2.2/ref/settings/#secure-proxy-ssl-header
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# Django-sendfile requires to set SENDFILE_ROOT
# https://github.com/moggers87/django-sendfile2
SENDFILE_ROOT = BASE_DIR

@ -14,8 +14,8 @@ INSTALLED_APPS += [
ALLOWED_HOSTS.append('testserver')
# Django-sendfile:
# https://github.com/johnsensible/django-sendfile
SENDFILE_BACKEND = 'sendfile.backends.development'
# https://github.com/moggers87/django-sendfile2
SENDFILE_BACKEND = 'django_sendfile.backends.development'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases

@ -16,8 +16,8 @@ for key in RQ_QUEUES:
RQ_QUEUES[key]['HOST'] = os.getenv('CVAT_REDIS_HOST', 'cvat_redis')
# Django-sendfile:
# https://github.com/johnsensible/django-sendfile
SENDFILE_BACKEND = 'sendfile.backends.xsendfile'
# https://github.com/moggers87/django-sendfile2
SENDFILE_BACKEND = 'django_sendfile.backends.xsendfile'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases

@ -152,8 +152,9 @@ Cypress.Commands.add('restoreProject', (archiveWithBackup) => {
Cypress.Commands.add('getDownloadFileName', () => {
cy.intercept('GET', '**=download').as('download');
cy.wait('@download').then((download) => {
const filename = download.response.headers['content-disposition'].split('filename="b\'')[1].split('\'')[0];
return filename;
const filename = download.response.headers['content-disposition'].split(';')[1].split('filename=')[1];
// need to remove quotes
return filename.substring(1, filename.length - 1);
});
});

Loading…
Cancel
Save