Skip to content

Commit

Permalink
Merge pull request #53 from ambitioninc/develop
Browse files Browse the repository at this point in the history
3.3.0
  • Loading branch information
somewes authored Jul 11, 2019
2 parents 9aebafc + a8329b5 commit f5f651d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 31 deletions.
19 changes: 8 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
dist: xenial
language: python

sudo: false

python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"

env:
matrix:
- DJANGO=1.11
- DJANGO=2.0
- DJANGO=2.1
- DJANGO=2.2
- DJANGO=master

addons:
postgresql: '9.5'
postgresql: '9.6'

matrix:
exclude:
- { python: "3.7", env: DJANGO=2.0 }

include:
- { python: "3.6", env: TOXENV=flake8 }

exclude:
- { python: "2.7", env: DJANGO=master }
- { python: "2.7", env: DJANGO=2.0 }
- { python: "3.4", env: DJANGO=master }

allow_failures:
- env: DJANGO=master

Expand Down
4 changes: 2 additions & 2 deletions localized_recurrence/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def parse_timedelta_string(string):
datetime.timedelta.__str__ returns a string in the form [D day[s],
][H]H:MM:SS[.UUUUUU], where D is negative for negative t.
"""
days_re = "(?P<days>-?[0-9]*) days?, (?P<hours>[0-9]+):(?P<minutes>[0-9]+):(?P<seconds>[0-9]+\.?[0-9]*)"
no_days_re = "(?P<hours>[0-9]+):(?P<minutes>[0-9]+):(?P<seconds>[0-9]+\.?[0-9]*)"
days_re = r"(?P<days>-?[0-9]*) days?, (?P<hours>[0-9]+):(?P<minutes>[0-9]+):(?P<seconds>[0-9]+\.?[0-9]*)"
no_days_re = r"(?P<hours>[0-9]+):(?P<minutes>[0-9]+):(?P<seconds>[0-9]+\.?[0-9]*)"
match_days = re.match(days_re, string)
match_no_days = re.match(no_days_re, string)
if match_days:
Expand Down
16 changes: 8 additions & 8 deletions localized_recurrence/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ def utc_of_next_schedule(self, current_time):


def _update_schedule(recurrences, time=None):
"""
Update the schedule times for all the provided recurrences.
"""
time = time or datetime.utcnow()
for recurrence in recurrences:
recurrence.next_scheduled = recurrence.utc_of_next_schedule(time)
recurrence.previous_scheduled = time
recurrence.save()
"""
Update the schedule times for all the provided recurrences.
"""
time = time or datetime.utcnow()
for recurrence in recurrences:
recurrence.next_scheduled = recurrence.utc_of_next_schedule(time)
recurrence.previous_scheduled = time
recurrence.save()


def _replace_with_offset(dt, offset, interval):
Expand Down
2 changes: 1 addition & 1 deletion localized_recurrence/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.2.0'
__version__ = '3.3.0'
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,22 @@ def get_version():
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
install_requires=[
'Django>=1.11',
'Django>=2.0',
'ambition-django-timezone-field>=2.0.2',
'fleming>=0.4.6',
'fleming>=0.5.0',
'python-dateutil',
'pytz',
],
Expand Down
13 changes: 8 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
[tox]
envlist =
flake8
py{27,34,35,36}-django111
py{34,35,36}-django20
py{35,36}-djangomaster
py{36}-django20
py{36,37}-django21
py{36,37}-django22
py{36,37}-djangomaster

[testenv]
setenv =
DB = postgres
deps =
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<2.3
djangomaster: https://github.com/django/django/archive/master.tar.gz
-rrequirements/requirements-testing.txt
commands =
Expand All @@ -23,6 +25,7 @@ commands = flake8 localized_recurrence

[travis:env]
DJANGO =
1.11: django111
2.0: django20
2.1: django21
2.2: django22
master: djangomaster

0 comments on commit f5f651d

Please sign in to comment.