Skip to content

Commit 2771103

Browse files
authored
support for Django 3.2; python 3.9 (#105)
1 parent 611e31f commit 2771103

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ python:
44
- 3.6
55
- 3.7
66
- 3.8
7+
- 3.9
78
env:
8-
# - DJANGO="django>=3.1.0,<3.2" # too soon
9+
- DJANGO="django>=3.2.0,<3.3"
10+
- DJANGO="django>=3.1.0,<3.2"
911
- DJANGO="django>=3.0.0,<3.1"
1012
- DJANGO="django>=2.2.0,<3.0"
1113
- DJANGO="django>=2.1.0,<2.2.0"
@@ -21,7 +23,7 @@ install:
2123
- travis_retry pip install -e .
2224
- travis_retry pip install $DJANGO --upgrade
2325
script:
24-
- setup.py test
26+
- python setup.py test
2527
after_script:
2628
# ensure we validate against pep standards
2729
- 'pep8 --exclude=migrations --ignore=E501,E225,W293 stream'

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
if sys.version_info < (3, 0, 0):
1010
django = "django>=1.11.29,<2.0"
1111
else:
12-
django = "django>=2.0,<3.2" # checked https://docs.djangoproject.com/en/dev/releases/3.1/#backwards-incompatible-3-1
12+
django = "django>=2.0,<3.3" # checked https://docs.djangoproject.com/en/dev/releases/3.2/#backwards-incompatible-3-2
1313

1414
requirements = [django, "stream-python>=3.0.1", "pytz"]
1515

1616
extras_require = {
17-
"test": ["httpretty==0.9.5"],
17+
"test": ["httpretty==1.1.1"],
1818
}
1919

2020
setup(

stream_django/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
from stream_django.feed_manager import feed_manager
2-
default_app_config = 'stream_django.apps.StreamDjangoConfig'
1+
import django
2+
from stream_django.feed_manager import feed_manager # noqa
33

4+
major, minor, _ = (int(i) for i in django.__version__.split('.'))
5+
6+
if major < 3 or (major == 3 and minor < 2):
7+
# deprecated as of Django 3.2
8+
default_app_config = 'stream_django.apps.StreamDjangoConfig'

stream_django/tests/test_app/tests/test_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import unittest
66

77

8-
api_url = re.compile(r'(us-east-api.)?stream-io-api.com(/api)?/*.')
8+
api_url = re.compile(r'(us-east-api.)?stream-io-api.com/.*')
99

1010

1111
class ManagerTestCase(unittest.TestCase):

stream_django/tests/test_app/tests/test_model_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from stream_django.feed_manager import feed_manager
88

99

10-
api_url = re.compile(r'(us-east-api.)?stream-io-api.com(/api)?/*.')
10+
api_url = re.compile(r'(us-east-api.)?stream-io-api.com/.*')
1111

1212

1313
class PinTest(TestCase):

0 commit comments

Comments
 (0)