Skip to content

Commit

Permalink
update requirements (#1175)
Browse files Browse the repository at this point in the history
* update requirements
* remove duplicate requirements
  • Loading branch information
petrjasek authored Feb 15, 2018
1 parent efaebcc commit f910043
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 29 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ before_install:
- sudo apt-get install -t stable elasticsearch

install:
- pip install .
- pip install -r dev-requirements.txt

before_script: >
Expand Down
2 changes: 2 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ sphinx-autobuild
sphinxcontrib-plantuml
docutils==0.12
requests-mock
responses
-e .
16 changes: 1 addition & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
flake8
flake8-docstrings
nose
pep8
pyflakes
pydocstyle
httmock
wooper
sphinx
sphinx-autobuild
sphinxcontrib-plantuml
docutils==0.12
requests-mock
responses
-e .
-r dev-requirements.txt
24 changes: 12 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@
LONG_DESCRIPTION = "Superdesk Server Core"

install_requires = [
'eve>=0.6,<=0.7.2',
'eve>=0.6,<=0.7.8',
'eve-elastic==2.3',
'flask>=0.10.1,<=0.12',
'flask>=0.10.1,<=0.12.2',
'flask-oauthlib>=0.9.3,<0.10',
'flask-mail>=0.9,<0.10',
'flask-script>=2.0.5,<3.0',
'pillow>=3.0,<=4.0',
'arrow>=0.4,<=0.10',
'pillow>=3.0,<=5.0',
'arrow>=0.4,<=0.13',
'asyncio>=3.4,<3.5',
'bcrypt>=3.1.1,<3.2',
'blinker>=1.3,<1.5',
'celery[redis]>=4.0.2,<4.1',
'celery[redis]>=4.0.2,<4.2',
'feedparser>=5.2,<5.3',
'hachoir3>=3.0a1,<=3.0a2',
'HermesCache>=0.6.0,<0.7.0',
'HermesCache>=0.6.0,<0.8.0',
'python-magic>=0.4,<0.5',
'ldap3>=2.2.4,<2.2.5',
'pytz>=2015.4',
'tzlocal>=1.2.2,<1.4',
'raven[flask]>=5.10,<6.0',
'requests>=2.7.0,<=2.13',
'tzlocal>=1.2.2,<2.0',
'raven[flask]>=5.10,<7.0',
'requests>=2.7.0,<3.0',
'httmock>=1.2.3,<1.3',
'boto3>=1.1.4,<1.5',
'websockets>=3.0,<3.3',
'boto3>=1.1.4,<1.6',
'websockets>=3.0,<4.1',
'mongolock>=1.3.4,<1.4',
'PyYAML>=3.11,<3.13',
'lxml>=3.8,<3.9',
'lxml>=3.8,<4.2',
'draftjs_exporter[lxml]>=1.1.0,<2.0',
'python-twitter==3.3',
]
Expand Down
9 changes: 8 additions & 1 deletion superdesk/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,22 @@ def local_to_utc_hour(hour):
#: celery broker
BROKER_URL = env('CELERY_BROKER_URL', REDIS_URL)
CELERY_BROKER_URL = BROKER_URL

#: celery task config
CELERY_TASK_ALWAYS_EAGER = (env('CELERY_ALWAYS_EAGER', False) == 'True')
CELERY_TASK_SERIALIZER = 'json'
CELERY_TASK_IGNORE_RESULT = True
CELERY_TASK_PROTOCOL = 1
CELERY_TASK_IGNORE_RESULT = True
CELERY_TASK_SEND_EVENTS = False

#: celery worker config
CELERY_WORKER_DISABLE_RATE_LIMITS = True
CELERY_WORKER_TASK_SOFT_TIME_LIMIT = 300
CELERY_WORKER_LOG_FORMAT = '%(message)s level=%(levelname)s process=%(processName)s'
CELERY_WORKER_TASK_LOG_FORMAT = ' '.join([CELERY_WORKER_LOG_FORMAT, 'task=%(task_name)s task_id=%(task_id)s'])
CELERY_WORKER_CONCURRENCY = env('CELERY_WORKER_CONCURRENCY') or None

#: celery routing config
CELERY_TASK_DEFAULT_QUEUE = celery_queue('default')
CELERY_TASK_DEFAULT_EXCHANGE = celery_queue('default')
CELERY_TASK_DEFAULT_ROUTING_KEY = 'default'
Expand Down Expand Up @@ -251,6 +257,7 @@ def local_to_utc_hour(hour):
}
}

#: celery beat config
CELERY_BEAT_SCHEDULE_FILENAME = env('CELERYBEAT_SCHEDULE_FILENAME', './celerybeatschedule.db')
CELERY_BEAT_SCHEDULE = {
'ingest:update': {
Expand Down
8 changes: 8 additions & 0 deletions superdesk/factory/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@


class SuperdeskEve(eve.Eve):

def __getattr__(self, name):
"""Workaround for https://github.com/pyeve/eve/issues/1087"""
if name in {"im_self", "im_func"}:
raise AttributeError("type object '%s' has no attribute '%s'" %
(self.__class__.__name__, name))
return super(SuperdeskEve, self).__getattr__(name)

def init_indexes(self):
for resource, resource_config in self.config['DOMAIN'].items():
mongo_indexes = resource_config.get('mongo_indexes__init')
Expand Down

0 comments on commit f910043

Please sign in to comment.