Skip to content

Commit c103f4f

Browse files
committed
Merge branch 'release/3.52.0'
2 parents 3bf2b1b + f060103 commit c103f4f

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ python:
77
- '3.5'
88
- '3.6'
99
- '3.7'
10+
- '3.8'
1011
- pypy
1112
install:
1213
- pip install -U .

progressbar/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
long running operations.
2020
'''.strip().split())
2121
__email__ = 'wolph@wol.ph'
22-
__version__ = '3.51.4'
22+
__version__ = '3.52.0'
2323
__license__ = 'BSD'
2424
__copyright__ = 'Copyright 2015 Rick van Hattem (Wolph)'
2525
__url__ = 'https://github.com/WoLpH/python-progressbar'

progressbar/bar.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def __init__(self, min_value=0, max_value=None, widgets=None,
328328
self.value = initial_value
329329
self._iterable = None
330330
self.custom_len = custom_len
331+
self.initial_start_time = kwargs.get('start_time')
331332
self.init()
332333

333334
# Convert a given timedelta to a floating point number as internal
@@ -758,7 +759,9 @@ def start(self, max_value=None, init=True):
758759
if self.max_value is not base.UnknownLength and self.max_value < 0:
759760
raise ValueError('max_value out of range, got %r' % self.max_value)
760761

761-
self.start_time = self.last_update_time = datetime.now()
762+
now = datetime.now()
763+
self.start_time = self.initial_start_time or now
764+
self.last_update_time = now
762765
self._last_update_timer = timeit.default_timer()
763766
self.update(self.min_value, force=True)
764767

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def run_tests(self):
4343
install_reqs = []
4444
tests_require = [
4545
'flake8>=3.7.7',
46-
'pytest>=4.3.1',
46+
'pytest>=4.6.9',
4747
'pytest-cov>=2.6.1',
4848
'pytest-flakes>=4.0.0',
4949
'pytest-pep8>=1.0.6',

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ commands =
3939
sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html {posargs}
4040

4141
[flake8]
42-
ignore = W391, W504
42+
ignore = W391, W504, E741
4343
exclude =
4444
docs,
4545
progressbar/six.py

0 commit comments

Comments
 (0)