Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Adding Python 3.5 compatibility. (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
M. Zulqarnain authored Oct 8, 2020
1 parent 73a95ee commit cacb996
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ matrix:
- codecov
- python: 3.5
env: TARGETS="PYTHON_VERSION=py35 test"
allow_failures:
- python: 3.5

install:
- docker exec ecomworker bash -c "
Expand All @@ -42,5 +40,7 @@ deploy:
distributions: sdist bdist_wheel
on:
tags: true
python: 2.7
condition: "$TARGETS = quality"
password:
secure: iYAqXv3vygmnv0ns8jQv0ECclJ1NWj1mjlVYNJsTaEnGmdPifUodr7hTyh/vftYRUtQi1CCWJXF8BEcGuYhahhyWrhkW6R/awArnDooF3gcVzZ9Yn8Zt7zXXRZpgbzXX+1HRUr6WeYoO5S+mXKknORD6bClLYwxKP7sJ1XESmq6Q+WNexb1g3F+AHUXihTJmpGptvZ6rRXIQc+NeozooDKLAgLnyOISGhTyXO3f9DJ8KJmj9QstTDyDutcYsDUN0c6stXk7w0Xr5ErobGXsgUKyadIQ44OgwCsyojh8b454rQOc9C2R1FAaoUAdCsJMJ0ZX1u4d6Tn3/lh2BMWdbLia02mRkW8Y13dg0MvObHOClwG+ElN7/9oW6oK3dHXO1Qstd+z5P/i8rufXlB0fqgmfL5aYz5G2kcUVTg0nyV0Cpn0zelLyCQ2rKpbpMoZJEQGBDBc8MR8uP05pH48TXfqRVOK9x8luKX5PSDXME2u6TLAgBo1Kzcbotlj+YDKtBi6F4Vcl1BsYI4lTM+XelL30xcsmZLi66sxAvpaxAhzpqRrw+4qurUkw9Qd5QDZaP0nwM7V0Cg8MZmRpOSZf4bMB65ba0zmg/DfODoE/e/VXfkonKANbOWFYX5twAX7rsd0Hnyf5YuYF68B3V0OCx/lQCQIwJPRYk3FkPCyMubdM=
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
pip-compile --upgrade -o requirements/optional.txt requirements/optional.in
pip-compile --upgrade -o requirements/production.txt requirements/production.in
# Let tox control the Django version for tests
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
sed '/^[dD]jango==/d;/^edx-rest-api-client==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt

.PHONY: help requirements worker test html_coverage quality validate clean upgrade
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-c constraints.txt

celery
edx-rest-api-client>=1.5.0,<2.0.0
edx-rest-api-client
redis
sailthru-client
six
11 changes: 8 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ certifi==2020.6.20 # via requests
chardet==3.0.4 # via requests
configparser==4.0.2 # via importlib-metadata
contextlib2==0.6.0.post1 # via importlib-metadata, zipp
edx-rest-api-client==1.5.0 # via -c requirements/constraints.txt, -r requirements/base.in
django-waffle==2.0.0 # via edx-django-utils
django==1.11.29 # via -c requirements/constraints.txt, edx-django-utils
edx-django-utils==2.0.4 # via -c requirements/constraints.txt, edx-rest-api-client
edx-rest-api-client==3.0.2 # via -c requirements/constraints.txt, -r requirements/base.in
idna==2.10 # via requests
importlib-metadata==2.0.0 # via kombu
kombu==4.6.11 # via celery
newrelic==4.8.0.110 # via -c requirements/constraints.txt, edx-django-utils
pathlib2==2.3.5 # via importlib-metadata
psutil==1.2.1 # via edx-django-utils
pyjwt==1.7.1 # via edx-rest-api-client
pytz==2020.1 # via celery
pytz==2020.1 # via celery, django
redis==3.5.3 # via -r requirements/base.in
requests==2.24.0 # via sailthru-client, slumber
requests==2.24.0 # via edx-rest-api-client, sailthru-client, slumber
sailthru-client==2.2.3 # via -c requirements/constraints.txt, -r requirements/base.in
scandir==1.10.0 # via pathlib2
simplejson==3.17.2 # via sailthru-client
Expand Down
14 changes: 13 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

# These were previously pinned in ecommerce-worker, and will stay that way
# until we go through the process of relaxing them gradually.

# Already present in Python 3 standard library
futures; python_version == "2.7"

astroid==1.4.9
coverage==4.4.0
ddt==1.0.1
Expand All @@ -28,11 +32,19 @@ sailthru-client==2.2.3
testfixtures==4.13.3
tox==3.15.2
more-itertools==5.0.0
edx-rest-api-client==1.5.0
six==1.15.0
tox==3.15.2

# Pinned to support both py27 and py38
httpretty==0.8.10
tox-battery < 0.6
celery < 5.0

# edx-rest-api-client version 4.0.0 dropped support to python 2.7
edx-rest-api-client<4.0.0

# version 3.0.0 dropped python 2.7 support
edx-django-utils<3.0.0

# edx-utils is bringing latest django=2.2 so adding pin
django<2.0
11 changes: 8 additions & 3 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ certifi==2020.6.20 # via -r requirements/base.txt, requests
chardet==3.0.4 # via -r requirements/base.txt, requests
configparser==4.0.2 # via -r requirements/base.txt, importlib-metadata
contextlib2==0.6.0.post1 # via -r requirements/base.txt, importlib-metadata, zipp
edx-rest-api-client==1.5.0 # via -c requirements/constraints.txt, -r requirements/base.txt
django-waffle==2.0.0 # via -r requirements/base.txt, edx-django-utils
django==1.11.29 # via -c requirements/constraints.txt, -r requirements/base.txt, edx-django-utils
edx-django-utils==2.0.4 # via -c requirements/constraints.txt, -r requirements/base.txt, edx-rest-api-client
edx-rest-api-client==3.0.2 # via -c requirements/constraints.txt, -r requirements/base.txt
idna==2.10 # via -r requirements/base.txt, requests
importlib-metadata==2.0.0 # via -r requirements/base.txt, kombu
kombu==4.6.11 # via -r requirements/base.txt, celery
newrelic==4.8.0.110 # via -c requirements/constraints.txt, -r requirements/base.txt, edx-django-utils
pathlib2==2.3.5 # via -r requirements/base.txt, importlib-metadata
psutil==1.2.1 # via -r requirements/base.txt, edx-django-utils
pyjwt==1.7.1 # via -r requirements/base.txt, edx-rest-api-client
pytz==2020.1 # via -r requirements/base.txt, celery
pytz==2020.1 # via -r requirements/base.txt, celery, django
pyyaml==5.1 # via -c requirements/constraints.txt, -r requirements/production.in
redis==3.5.3 # via -r requirements/base.txt
requests==2.24.0 # via -r requirements/base.txt, sailthru-client, slumber
requests==2.24.0 # via -r requirements/base.txt, edx-rest-api-client, sailthru-client, slumber
sailthru-client==2.2.3 # via -c requirements/constraints.txt, -r requirements/base.txt
scandir==1.10.0 # via -r requirements/base.txt, pathlib2
simplejson==3.17.2 # via -r requirements/base.txt, sailthru-client
Expand Down
11 changes: 7 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ contextlib2==0.6.0.post1 # via -r requirements/base.txt, importlib-metadata, zi
cookies==2.2.1 # via responses
coverage==4.4 # via -c requirements/constraints.txt, -r requirements/test.in, pytest-cov
ddt==1.0.1 # via -c requirements/constraints.txt, -r requirements/test.in
django-waffle==2.0.0 # via -r requirements/base.txt, edx-django-utils
edx-django-utils==2.0.4 # via -c requirements/constraints.txt, -r requirements/base.txt, edx-rest-api-client
edx-lint==0.5.2 # via -c requirements/constraints.txt, -r requirements/test.in
edx-rest-api-client==1.5.0 # via -c requirements/constraints.txt, -r requirements/base.txt
funcsigs==1.0.2 # via mock, pytest
futures==3.3.0 # via isort
futures==3.3.0 ; python_version == "2.7" # via -c requirements/constraints.txt, isort
idna==2.10 # via -r requirements/base.txt, requests
importlib-metadata==2.0.0 # via -r requirements/base.txt, kombu, pluggy, pytest
isort==4.3.21 # via -c requirements/constraints.txt, pylint
Expand All @@ -30,11 +31,13 @@ lazy-object-proxy==1.5.1 # via astroid
mccabe==0.6.1 # via pylint
mock==1.3.0 # via -c requirements/constraints.txt, -r requirements/test.in, responses
more-itertools==5.0.0 # via -c requirements/constraints.txt, pytest
newrelic==4.8.0.110 # via -c requirements/constraints.txt, -r requirements/base.txt, edx-django-utils
packaging==20.4 # via pytest
pathlib2==2.3.5 # via -r requirements/base.txt, importlib-metadata, pytest
pbr==5.5.0 # via mock
pep8==1.7.0 # via -c requirements/constraints.txt, -r requirements/test.in
pluggy==0.13.1 # via pytest
psutil==1.2.1 # via -r requirements/base.txt, edx-django-utils
py==1.9.0 # via pytest
pyjwt==1.7.1 # via -r requirements/base.txt, edx-rest-api-client
pylint-celery==0.3 # via edx-lint
Expand All @@ -44,9 +47,9 @@ pylint==1.6.4 # via -c requirements/constraints.txt, -r requirements
pyparsing==2.4.7 # via packaging
pytest-cov==2.10.0 # via -c requirements/constraints.txt, -r requirements/test.in
pytest==4.6.11 # via -c requirements/constraints.txt, -r requirements/test.in, pytest-cov
pytz==2020.1 # via -r requirements/base.txt, celery
pytz==2020.1 # via -r requirements/base.txt, celery, django
redis==3.5.3 # via -r requirements/base.txt
requests==2.24.0 # via -r requirements/base.txt, responses, sailthru-client, slumber
requests==2.24.0 # via -r requirements/base.txt, edx-rest-api-client, responses, sailthru-client, slumber
responses==0.12.0 # via -r requirements/test.in
sailthru-client==2.2.3 # via -c requirements/constraints.txt, -r requirements/base.txt
scandir==1.10.0 # via -r requirements/base.txt, pathlib2
Expand Down
2 changes: 1 addition & 1 deletion requirements/tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ toml==0.10.1 # via tox
tox-battery==0.5.2 # via -c requirements/constraints.txt, -r requirements/tox.in
tox==3.15.2 # via -c requirements/constraints.txt, -r requirements/tox.in, tox-battery
typing==3.7.4.3 # via importlib-resources
virtualenv==20.0.31 # via tox
virtualenv==20.0.33 # via tox
zipp==1.2.0 # via importlib-metadata, importlib-resources
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def is_requirement(line):

setup(
name='edx-ecommerce-worker',
version='0.8.7',
version='0.8.8',
description='Celery tasks supporting the operations of edX\'s ecommerce service',
long_description=long_description,
classifiers=[
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ setenv =
WORKER_CONFIGURATION_MODULE = ecommerce_worker.configuration.test
deps =
-r{toxinidir}/requirements/test.txt
py27: edx-rest-api-client<4.0.0
py35: edx-rest-api-client==5.2.1
quality: edx-rest-api-client<4.0.0
commands =
pytest ecommerce_worker --cov-branch --cov-report=html:build/coverage/html/html/ \
--cov-report term --cov-report=xml:build/coverage/coverage.xml \
Expand Down

0 comments on commit cacb996

Please sign in to comment.