Remove workaround for old django-pyscss

This reverts the change[1] made earlier to workaround the issue caused
by usage of vendored version of six library in the django-pyscss
library.

The django-pyscss library no longer imports the vendored version of
six, since 2.0.3[2].

[1] 39f28ad5ed
[2] 1499332e1d

Change-Id: I22802b75d6a8d8f35930709e89d64dd65982cef0
This commit is contained in:
Takashi Kajinami 2024-01-28 03:07:06 +09:00
parent d42e40ab30
commit bced896d37
5 changed files with 2 additions and 39 deletions

View File

@ -101,7 +101,7 @@ additional-builtins=_
[typecheck]
# List of module names for which member attributes should not be checked
ignored-modules=six.moves,_MovedItems
ignored-modules=
[reports]
# Tells whether to display a full report or only the messages

View File

@ -1,24 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import sys
import django
import six
import six.moves
# Temporary workaround for a situation that django-pyscss depends on
# a vendored version of six, django.utils.six which was dropped in Django 3.0.
# TODO(amotoki): Drop the workaround once django-pyscss supports Django 3.0+.
if django.VERSION[0] >= 3:
sys.modules['django.utils.six'] = six
sys.modules['django.utils.six.moves'] = six.moves

View File

@ -51,7 +51,6 @@ INSTALLED_APPS = (
'django.contrib.humanize',
'django.contrib.auth',
'django.contrib.contenttypes',
'horizon.test.django_pyscss_fix',
'django_pyscss',
'compressor',
'horizon',

View File

@ -12,21 +12,10 @@
import logging
import os
import sys
import django
import six
import six.moves
from django.conf import settings
from scss.grammar.expression import SassExpressionScanner
# Temporary workaround for a situation that django-pyscss depends on
# a vendored version of six, django.utils.six which was dropped in Django 3.0.
# TODO(amotoki): Drop the workaround once django-pyscss supports Django 3.0+.
if django.VERSION[0] >= 3:
sys.modules['django.utils.six'] = six
sys.modules['django.utils.six.moves'] = six.moves
scss_asset_root = os.path.join(settings.STATIC_ROOT, 'scss', 'assets')
LOG = logging.getLogger(__name__)

View File

@ -19,7 +19,7 @@ debtcollector>=1.2.0 # Apache-2.0
Django>=4.2,<4.3 # BSD
django-compressor>=2.4.1 # MIT
django-debreach>=1.4.2 # BSD License (2 clause)
django-pyscss>=2.0.2 # BSD License (2 clause)
django-pyscss>=2.0.3 # BSD License (2 clause)
futurist>=1.2.0 # Apache-2.0
iso8601>=0.1.11 # MIT
keystoneauth1>=4.3.1 # Apache-2.0
@ -43,7 +43,6 @@ python-swiftclient>=3.2.0 # Apache-2.0
pytz>=2013.6 # MIT
PyYAML>=6.0 # MIT
requests>=2.25.1 # Apache-2.0
six>=1.16.0 # MIT
semantic-version>=2.3.1 # BSD
XStatic>=1.0.3 # MIT License
XStatic-Angular>=1.8.2.2 # MIT License