Hello community, here is the log from the commit of package python-tqdm for openSUSE:Factory checked in at 2017-10-13 14:18:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tqdm (Old) and /work/SRC/openSUSE:Factory/.python-tqdm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tqdm" Fri Oct 13 14:18:10 2017 rev:4 rq:533326 version:4.19.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tqdm/python-tqdm.changes 2017-10-05 11:58:09.245927435 +0200 +++ /work/SRC/openSUSE:Factory/.python-tqdm.new/python-tqdm.changes 2017-10-13 14:18:11.418681477 +0200 @@ -1,0 +2,27 @@ +Tue Oct 10 01:44:30 UTC 2017 - [email protected] + +- specfile: + * added man page, fixed path for man-page in setup.py + * added fdupes + +- update to version 4.19.2: + * flush() on refresh() (#459 from #317) + * status printer updates (#331) + + use sp() in refresh() + + remove redundant clear():nomove=False + * misc minor documentation updates + * unit tests + +- changes from version 4.19.1: + * rate_(no)inv(_fmt) (#72, b228bc3) + * __repr__() tidy (#389) + * fix write() before initialisation AttributeError: _lock (#457) + * man pages + * documentation updates + +------------------------------------------------------------------- +Fri Oct 6 14:01:07 UTC 2017 - [email protected] + +- Redo description with sensible content. + +------------------------------------------------------------------- Old: ---- tqdm-4.18.0.tar.gz New: ---- tqdm-4.19.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tqdm.spec ++++++ --- /var/tmp/diff_new_pack.qdRKQY/_old 2017-10-13 14:18:12.566631004 +0200 +++ /var/tmp/diff_new_pack.qdRKQY/_new 2017-10-13 14:18:12.570630828 +0200 @@ -20,9 +20,9 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test Name: python-tqdm -Version: 4.18.0 +Version: 4.19.2 Release: 0 -Summary: A Fast, Extensible Progress Meter +Summary: An extensible progress meter License: MPL-2.0 and MIT Group: Development/Languages/Python Url: https://github.com/tqdm/tqdm @@ -30,6 +30,7 @@ BuildRequires: %{python_module devel} BuildRequires: %{python_module rpm-macros} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros # SECTION test requirements %if %{with test} @@ -46,11 +47,15 @@ %python_subpackages %description -Instantly make your loops show a smart progress meter - just wrap any -iterable with "tqdm(iterable)", and you're done! +tqdm lets you output a progress meter from within loops by wrapping +any iterable with "tqdm(iterable)". +tqdm's overhead is one order of magnitude less than python-progressbar +and does not require ncurses. %prep %setup -q -n tqdm-%{version} +# fix installation directory for man pages +sed -i 's#man/man1#share/man/man1#' setup.py %build %python_build @@ -58,9 +63,11 @@ %install %python_install %python_clone -a %{buildroot}%{_bindir}/tqdm +%python_clone -a %{buildroot}%{_mandir}/man1/tqdm.1 +%python_expand %fdupes %{buildroot}%{$python_sitelib} %post -%python_install_alternative tqdm +%{python_install_alternative tqdm tqdm.1} %postun %python_uninstall_alternative tqdm @@ -80,5 +87,6 @@ %endif %{python_sitelib}/* %python_alternative %{_bindir}/tqdm +%python_alternative %{_mandir}/man1/tqdm.1 %changelog ++++++ tqdm-4.18.0.tar.gz -> tqdm-4.19.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/MANIFEST.in new/tqdm-4.19.2/MANIFEST.in --- old/tqdm-4.18.0/MANIFEST.in 2017-09-21 00:07:59.000000000 +0200 +++ new/tqdm-4.19.2/MANIFEST.in 2017-10-09 01:15:48.000000000 +0200 @@ -5,7 +5,6 @@ include logo.png # include images/logo.gif include Makefile -include README.rst include tox.ini # Test suite @@ -13,3 +12,5 @@ # Examples/Documentation recursive-include examples *.py +include README.rst +include tqdm.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/Makefile new/tqdm-4.19.2/Makefile --- old/tqdm-4.18.0/Makefile 2017-09-26 12:49:07.000000000 +0200 +++ new/tqdm-4.19.2/Makefile 2017-10-09 01:17:47.000000000 +0200 @@ -49,7 +49,7 @@ @+make build flake8: - @+flake8 --max-line-length=80 --count --statistics --exit-zero -j 8 --exclude .asv . + @+flake8 --max-line-length=80 --count --statistics --exit-zero -j 8 --exclude .asv,.tox . test: tox --skip-missing-interpreters @@ -87,6 +87,12 @@ asv publish asv preview +tqdm.1: tqdm.1.md + python -m tqdm --help | tail -n+5 | cat "$<" - |\ + sed -r 's/^ (--.*)=<(.*)> : (.*)$$/\n\\\1=*\2*\n: \3./' |\ + sed -r 's/ (-.*, --.*) /\n\1\n: /' |\ + pandoc -o "$@" -s -t man + distclean: @+make coverclean @+make prebuildclean @@ -96,12 +102,12 @@ @+python -c "import shutil; shutil.rmtree('dist', True)" @+python -c "import shutil; shutil.rmtree('tqdm.egg-info', True)" coverclean: - @+python -c "import os; os.remove('.coverage') if os.path.exists('.coverage') else None" + @+python -c "import os, glob; [os.remove(i) for i in glob.glob('.coverage')]" clean: - @+python -c "import os; import glob; [os.remove(i) for i in glob.glob('*.py[co]')]" - @+python -c "import os; import glob; [os.remove(i) for i in glob.glob('tqdm/*.py[co]')]" - @+python -c "import os; import glob; [os.remove(i) for i in glob.glob('tqdm/tests/*.py[co]')]" - @+python -c "import os; import glob; [os.remove(i) for i in glob.glob('tqdm/examples/*.py[co]')]" + @+python -c "import os, glob; [os.remove(i) for i in glob.glob('*.py[co]')]" + @+python -c "import os, glob; [os.remove(i) for i in glob.glob('tqdm/*.py[co]')]" + @+python -c "import os, glob; [os.remove(i) for i in glob.glob('tqdm/tests/*.py[co]')]" + @+python -c "import os, glob; [os.remove(i) for i in glob.glob('tqdm/examples/*.py[co]')]" installdev: python setup.py develop --uninstall diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/PKG-INFO new/tqdm-4.19.2/PKG-INFO --- old/tqdm-4.18.0/PKG-INFO 2017-10-01 00:13:36.000000000 +0200 +++ new/tqdm-4.19.2/PKG-INFO 2017-10-09 01:33:54.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tqdm -Version: 4.18.0 +Version: 4.19.2 Summary: Fast, Extensible Progress Meter Home-page: https://github.com/tqdm/tqdm Author: tqdm developers @@ -333,12 +333,14 @@ (current/instantaneous speed) [default: 0.3]. * bar_format : str, optional Specify a custom bar string formatting. May impact performance. - If unspecified, will use '{l_bar}{bar}{r_bar}', where l_bar is - '{desc}: {percentage:3.0f}%|' and r_bar is - '| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]' - Possible vars: bar, n, n_fmt, total, total_fmt, percentage, - rate, rate_fmt, elapsed, remaining, l_bar, r_bar, desc. - Note that a trailing ": " is automatically stripped after {desc} + [default: '{l_bar}{bar}{r_bar}'], where + l_bar='{desc}: {percentage:3.0f}%|' and + r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' + '{rate_fmt}{postfix}]' + Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, + percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, + rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. + Note that a trailing ": " is automatically removed after {desc} if the latter is empty. * initial : int, optional The initial counter value. Useful when restarting a progress @@ -739,25 +741,25 @@ ``tqdm`` implements a few tricks to to increase efficiency and reduce overhead. - 1. Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long - to wait between each refresh. ``tqdm`` always gets updated in the background, - but it will diplay only every ``mininterval``. - 2. Reduce number of calls to check system clock/time. - 3. ``mininterval`` is more intuitive to configure than ``miniters``. - A clever adjustment system ``dynamic_miniters`` will automatically adjust - ``miniters`` to the amount of iterations that fit into time ``mininterval``. - Essentially, ``tqdm`` will check if it's time to print without actually - checking time. This behavior can be still be bypassed by manually setting - ``miniters``. + - Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long + to wait between each refresh. ``tqdm`` always gets updated in the background, + but it will diplay only every ``mininterval``. + - Reduce number of calls to check system clock/time. + - ``mininterval`` is more intuitive to configure than ``miniters``. + A clever adjustment system ``dynamic_miniters`` will automatically adjust + ``miniters`` to the amount of iterations that fit into time ``mininterval``. + Essentially, ``tqdm`` will check if it's time to print without actually + checking time. This behavior can be still be bypassed by manually setting + ``miniters``. However, consider a case with a combination of fast and slow iterations. After a few fast iterations, ``dynamic_miniters`` will set ``miniters`` to a large number. When interation rate subsequently slows, ``miniters`` will remain large and thus reduce display update frequency. To address this: - 4. ``maxinterval`` defines the maximum time between display refreshes. - A concurrent monitoring thread checks for overdue updates and forces one - where necessary. + - ``maxinterval`` defines the maximum time between display refreshes. + A concurrent monitoring thread checks for overdue updates and forces one + where necessary. The monitoring thread should not have a noticeable overhead, and guarantees updates at least every 10 seconds by default. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/README.rst new/tqdm-4.19.2/README.rst --- old/tqdm-4.18.0/README.rst 2017-10-01 00:13:20.000000000 +0200 +++ new/tqdm-4.19.2/README.rst 2017-10-09 01:17:47.000000000 +0200 @@ -324,12 +324,14 @@ (current/instantaneous speed) [default: 0.3]. * bar_format : str, optional Specify a custom bar string formatting. May impact performance. - If unspecified, will use '{l_bar}{bar}{r_bar}', where l_bar is - '{desc}: {percentage:3.0f}%|' and r_bar is - '| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]' - Possible vars: bar, n, n_fmt, total, total_fmt, percentage, - rate, rate_fmt, elapsed, remaining, l_bar, r_bar, desc. - Note that a trailing ": " is automatically stripped after {desc} + [default: '{l_bar}{bar}{r_bar}'], where + l_bar='{desc}: {percentage:3.0f}%|' and + r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' + '{rate_fmt}{postfix}]' + Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, + percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, + rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. + Note that a trailing ": " is automatically removed after {desc} if the latter is empty. * initial : int, optional The initial counter value. Useful when restarting a progress @@ -730,25 +732,25 @@ ``tqdm`` implements a few tricks to to increase efficiency and reduce overhead. -1. Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long - to wait between each refresh. ``tqdm`` always gets updated in the background, - but it will diplay only every ``mininterval``. -2. Reduce number of calls to check system clock/time. -3. ``mininterval`` is more intuitive to configure than ``miniters``. - A clever adjustment system ``dynamic_miniters`` will automatically adjust - ``miniters`` to the amount of iterations that fit into time ``mininterval``. - Essentially, ``tqdm`` will check if it's time to print without actually - checking time. This behavior can be still be bypassed by manually setting - ``miniters``. +- Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long + to wait between each refresh. ``tqdm`` always gets updated in the background, + but it will diplay only every ``mininterval``. +- Reduce number of calls to check system clock/time. +- ``mininterval`` is more intuitive to configure than ``miniters``. + A clever adjustment system ``dynamic_miniters`` will automatically adjust + ``miniters`` to the amount of iterations that fit into time ``mininterval``. + Essentially, ``tqdm`` will check if it's time to print without actually + checking time. This behavior can be still be bypassed by manually setting + ``miniters``. However, consider a case with a combination of fast and slow iterations. After a few fast iterations, ``dynamic_miniters`` will set ``miniters`` to a large number. When interation rate subsequently slows, ``miniters`` will remain large and thus reduce display update frequency. To address this: -4. ``maxinterval`` defines the maximum time between display refreshes. - A concurrent monitoring thread checks for overdue updates and forces one - where necessary. +- ``maxinterval`` defines the maximum time between display refreshes. + A concurrent monitoring thread checks for overdue updates and forces one + where necessary. The monitoring thread should not have a noticeable overhead, and guarantees updates at least every 10 seconds by default. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/examples/redirect_print.py new/tqdm-4.19.2/examples/redirect_print.py --- old/tqdm-4.18.0/examples/redirect_print.py 2017-09-26 12:49:07.000000000 +0200 +++ new/tqdm-4.19.2/examples/redirect_print.py 2017-10-09 01:17:47.000000000 +0200 @@ -57,8 +57,9 @@ # tqdm needs the original stdout # and dynamic_ncols=True to autodetect console width for i in tqdm(range(3), file=orig_stdout, dynamic_ncols=True): - sleep(.5) + # order of the following two lines should not matter some_fun(i) + sleep(.5) # After the `with`, printing is restored print("Done!") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/setup.py new/tqdm-4.19.2/setup.py --- old/tqdm-4.18.0/setup.py 2017-09-21 00:07:59.000000000 +0200 +++ new/tqdm-4.19.2/setup.py 2017-10-09 01:17:47.000000000 +0200 @@ -175,6 +175,8 @@ platforms=['any'], packages=['tqdm'], entry_points={'console_scripts': ['tqdm=tqdm._main:main'], }, + data_files=[('man/man1', ['tqdm.1'])], + package_data={'': ['CONTRIBUTING.md', 'LICENCE', 'examples/*.py']}, long_description=README_rst, classifiers=[ # Trove classifiers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/tqdm/_tqdm.py new/tqdm-4.19.2/tqdm/_tqdm.py --- old/tqdm-4.18.0/tqdm/_tqdm.py 2017-10-01 00:13:20.000000000 +0200 +++ new/tqdm-4.19.2/tqdm/_tqdm.py 2017-10-09 01:17:47.000000000 +0200 @@ -163,6 +163,7 @@ monitor_interval = 10 # set to 0 to disable the thread monitor = None + _lock = TqdmDefaultWriteLock() @staticmethod def format_sizeof(num, suffix='', divisor=1000): @@ -282,10 +283,10 @@ [default: '{l_bar}{bar}{r_bar}'], where l_bar='{desc}: {percentage:3.0f}%|' and r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' - '{rate_fmt}{postfix}]' + '{rate_fmt}{postfix}]' Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, - percentage, rate, rate_fmt, elapsed, remaining, desc, - postfix. + percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, + rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. Note that a trailing ": " is automatically removed after {desc} if the latter is empty. postfix : str, optional @@ -317,13 +318,15 @@ # (we allow manual override since predicting time is an arcane art) if rate is None and elapsed: rate = n / elapsed - inv_rate = 1 / rate if (rate and (rate < 1)) else None + inv_rate = 1 / rate if rate else None format_sizeof = tqdm.format_sizeof - rate_fmt = ((format_sizeof(inv_rate if inv_rate else rate) - if unit_scale else - '{0:5.2f}'.format(inv_rate if inv_rate else rate)) - if rate else '?') \ - + ('s' if inv_rate else unit) + '/' + (unit if inv_rate else 's') + rate_noinv_fmt = ((format_sizeof(rate) if unit_scale else + '{0:5.2f}'.format(rate)) + if rate else '?') + unit + '/s' + rate_inv_fmt = ((format_sizeof(inv_rate) if unit_scale else + '{0:5.2f}'.format(inv_rate)) + if inv_rate else '?') + 's/' + unit + rate_fmt = rate_inv_fmt if inv_rate and inv_rate > 1 else rate_noinv_fmt if unit_scale: n_fmt = format_sizeof(n, divisor=unit_divisor) @@ -365,13 +368,13 @@ 'total': total, 'total_fmt': total_fmt, 'percentage': percentage, - 'rate': rate if inv_rate is None else inv_rate, - 'rate_noinv': rate, - 'rate_noinv_fmt': ((format_sizeof(rate) - if unit_scale else - '{0:5.2f}'.format(rate)) - if rate else '?') + unit + '/s', + 'rate': inv_rate if inv_rate and inv_rate > 1 + else rate, 'rate_fmt': rate_fmt, + 'rate_noinv': rate, + 'rate_noinv_fmt': rate_noinv_fmt, + 'rate_inv': inv_rate, + 'rate_inv_fmt': rate_inv_fmt, 'elapsed': elapsed_str, 'remaining': remaining_str, 'l_bar': l_bar, @@ -436,9 +439,6 @@ ', ' + postfix if postfix else '') def __new__(cls, *args, **kwargs): - # Create default lock if none set - if "_lock" not in cls.__dict__: - cls.set_lock(TqdmDefaultWriteLock()) # Create a new instance instance = object.__new__(cls) # Add to the list of instances @@ -861,10 +861,7 @@ with self._lock: if self.pos: self.moveto(self.pos) - self.sp(self.format_meter(self.n, total, 0, - (dynamic_ncols(file) if dynamic_ncols else ncols), - self.desc, ascii, unit, unit_scale, None, bar_format, - self.postfix, unit_divisor)) + self.sp(self.__repr__(elapsed=0)) if self.pos: self.moveto(-self.pos) @@ -889,14 +886,14 @@ def __del__(self): self.close() - def __repr__(self): + def __repr__(self, elapsed=None): return self.format_meter( - self.n, self.total, self._time() - self.start_t, - self.dynamic_ncols(self.fp) - if self.dynamic_ncols else self.ncols, self.desc, self.ascii, - self.unit, self.unit_scale, - 1 / self.avg_time if self.avg_time else None, - self.bar_format, self.postfix) + self.n, self.total, + elapsed if elapsed is not None else self._time() - self.start_t, + self.dynamic_ncols(self.fp) if self.dynamic_ncols else self.ncols, + self.desc, self.ascii, self.unit, + self.unit_scale, 1 / self.avg_time if self.avg_time else None, + self.bar_format, self.postfix, self.unit_divisor) def __lt__(self, other): return self.pos < other.pos @@ -931,25 +928,16 @@ for obj in iterable: yield obj else: - ncols = self.ncols mininterval = self.mininterval maxinterval = self.maxinterval miniters = self.miniters dynamic_miniters = self.dynamic_miniters - unit = self.unit - unit_scale = self.unit_scale - unit_divisor = self.unit_divisor - ascii = self.ascii - start_t = self.start_t last_print_t = self.last_print_t last_print_n = self.last_print_n n = self.n - dynamic_ncols = self.dynamic_ncols smoothing = self.smoothing avg_time = self.avg_time - bar_format = self.bar_format _time = self._time - format_meter = self.format_meter try: sp = self.sp @@ -970,7 +958,6 @@ if delta_t >= mininterval: cur_t = _time() delta_it = n - last_print_n - elapsed = cur_t - start_t # optimised if in inner loop # EMA (not just overall average) if smoothing and delta_t and delta_it: avg_time = delta_t / delta_it \ @@ -978,19 +965,12 @@ else smoothing * delta_t / delta_it + \ (1 - smoothing) * avg_time + self.n = n with self._lock: if self.pos: self.moveto(self.pos) - # Print bar update - sp(format_meter( - n, self.total, elapsed, - (dynamic_ncols(self.fp) if dynamic_ncols - else ncols), - self.desc, ascii, unit, unit_scale, - 1 / avg_time if avg_time else None, bar_format, - self.postfix, unit_divisor)) - + sp(self.__repr__()) if self.pos: self.moveto(-self.pos) @@ -1146,14 +1126,9 @@ if self.leave: if self.last_print_n < self.n: - cur_t = self._time() # stats for overall rate (no weighted average) - self.sp(self.format_meter( - self.n, self.total, cur_t - self.start_t, - (self.dynamic_ncols(self.fp) if self.dynamic_ncols - else self.ncols), - self.desc, self.ascii, self.unit, self.unit_scale, None, - self.bar_format, self.postfix, self.unit_divisor)) + self.avg_time = None + self.sp(self.__repr__()) if pos: self.moveto(-pos) else: @@ -1237,7 +1212,7 @@ def moveto(self, n): self.fp.write(_unicode('\n' * n + _term_move_up() * -n)) - def clear(self, nomove=False, nolock=False): + def clear(self, nolock=False): """ Clear current bar display """ @@ -1246,14 +1221,10 @@ if not nolock: self._lock.acquire() - if not nomove: - self.moveto(self.pos) - # clear up the bar (can't rely on sp('')) - self.fp.write('\r') - self.fp.write(' ' * (self.ncols if self.ncols else 10)) + self.moveto(self.pos) + self.sp('') self.fp.write('\r') # place cursor back at the beginning of line - if not nomove: - self.moveto(-self.pos) + self.moveto(-self.pos) if not nolock: self._lock.release() @@ -1267,10 +1238,7 @@ if not nolock: self._lock.acquire() self.moveto(self.pos) - # clear up this line's content (whatever there was) - self.clear(nomove=True, nolock=True) - # Print current/last bar state - self.fp.write(self.__repr__()) + self.sp(self.__repr__()) self.moveto(-self.pos) if not nolock: self._lock.release() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/tqdm/_version.py new/tqdm-4.19.2/tqdm/_version.py --- old/tqdm-4.18.0/tqdm/_version.py 2017-10-01 00:13:20.000000000 +0200 +++ new/tqdm-4.19.2/tqdm/_version.py 2017-10-09 01:18:57.000000000 +0200 @@ -5,7 +5,7 @@ __all__ = ["__version__"] # major, minor, patch, -extra -version_info = 4, 18, 0 +version_info = 4, 19, 2 # Nice string for the version __version__ = '.'.join(map(str, version_info)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/tqdm/tests/tests_tqdm.py new/tqdm-4.19.2/tqdm/tests/tests_tqdm.py --- old/tqdm-4.18.0/tqdm/tests/tests_tqdm.py 2017-10-01 00:13:20.000000000 +0200 +++ new/tqdm-4.19.2/tqdm/tests/tests_tqdm.py 2017-10-09 01:17:47.000000000 +0200 @@ -928,8 +928,8 @@ c2 = progressbar_rate(get_bar(our_file2.getvalue(), 3)) # Check that medium smoothing's rate is between no and max smoothing rates - assert a < c < b - assert a2 < c2 < b2 + assert a <= c <= b + assert a2 <= c2 <= b2 @with_setup(pretest, posttest) @@ -1362,8 +1362,7 @@ assert after_err_res == [u'\rpos0 bar: 0%', u'\rpos0 bar: 10%', u'\r ', - u'\r\r ', - u'\rpos0 bar: 10%'] + u'\r\rpos0 bar: 10%'] assert after_out == s + '\n' # Restore stdout and stderr sys.stderr = stde @@ -1654,3 +1653,11 @@ pass out = our_file.getvalue() assert '900/900' in out + + +@with_setup(pretest, posttest) +def test_threading(): + """Test multiprocess/thread-realted features""" + from multiprocessing import Lock + tqdm.set_lock(Lock()) + # TODO: test interleaved output #445 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/tqdm.1 new/tqdm-4.19.2/tqdm.1 --- old/tqdm-4.18.0/tqdm.1 1970-01-01 01:00:00.000000000 +0100 +++ new/tqdm-4.19.2/tqdm.1 2017-10-09 01:15:48.000000000 +0200 @@ -0,0 +1,222 @@ +.\" Automatically generated by Pandoc 1.19.2.1 +.\" +.TH "TQDM" "1" "2015\-2017" "tqdm User Manuals" "" +.hy +.SH NAME +.PP +tqdm \- fast, extensible progress bar for Python and CLI +.SH SYNOPSIS +.PP +tqdm [\f[I]options\f[]] +.SH DESCRIPTION +.PP +See <https://github.com/tqdm/tqdm>. +Can be used as a pipe: +.IP +.nf +\f[C] +$\ #\ count\ lines\ of\ code +$\ cat\ *.py\ |\ tqdm\ |\ wc\ \-l +327it\ [00:00,\ 981773.38it/s] +327 + +$\ #\ find\ all\ files +$\ find\ .\ \-name\ "*.py"\ |\ tqdm\ |\ wc\ \-l +432it\ [00:00,\ 833842.30it/s] +432 + +#\ ...\ and\ more\ info +$\ find\ .\ \-name\ \[aq]*.py\[aq]\ \-exec\ wc\ \-l\ \\{}\ \\;\ \\ +\ \ |\ tqdm\ \-\-total\ 432\ \-\-unit\ files\ \-\-desc\ counting\ \\ +\ \ |\ awk\ \[aq]{\ sum\ +=\ $1\ };\ END\ {\ print\ sum\ }\[aq] +counting:\ 100%|█████████|\ 432/432\ [00:00<00:00,\ 794361.83files/s] +131998 +\f[] +.fi +.SH OPTIONS +.TP +.B \-h, \-\-help +Print this help and exit +.RS +.RE +.TP +.B \-v, \-\-version +Print version and exit +.RS +.RE +.TP +.B \-\-desc=\f[I]desc\f[] +str, optional. +Prefix for the progressbar. +.RS +.RE +.TP +.B \-\-total=\f[I]total\f[] +int, optional. +The number of expected iterations. +If unspecified, len(iterable) is used if possible. +As a last resort, only basic progress statistics are displayed (no ETA, +no progressbar). +If \f[C]gui\f[] is True and this parameter needs subsequent updating, +specify an initial arbitrary large positive integer, e.g. +int(9e9). +.RS +.RE +.TP +.B \-\-leave=\f[I]leave\f[] +bool, optional. +If [default: True], keeps all traces of the progressbar upon termination +of iteration. +.RS +.RE +.TP +.B \-\-ncols=\f[I]ncols\f[] +int, optional. +The width of the entire output message. +If specified, dynamically resizes the progressbar to stay within this +bound. +If unspecified, attempts to use environment width. +The fallback is a meter width of 10 and no limit for the counter and +statistics. +If 0, will not print any meter (only stats). +.RS +.RE +.TP +.B \-\-mininterval=\f[I]mininterval\f[] +float, optional. +Minimum progress display update interval, in seconds [default: 0.1]. +.RS +.RE +.TP +.B \-\-maxinterval=\f[I]maxinterval\f[] +float, optional. +Maximum progress display update interval, in seconds [default: 10]. +Automatically adjusts \f[C]miniters\f[] to correspond to +\f[C]mininterval\f[] after long display update lag. +Only works if \f[C]dynamic_miniters\f[] or monitor thread is enabled. +.RS +.RE +.TP +.B \-\-miniters=\f[I]miniters\f[] +int, optional. +Minimum progress display update interval, in iterations. +If 0 and \f[C]dynamic_miniters\f[], will automatically adjust to equal +\f[C]mininterval\f[] (more CPU efficient, good for tight loops). +If > 0, will skip display of specified number of iterations. +Tweak this and \f[C]mininterval\f[] to get very efficient loops. +If your progress is erratic with both fast and slow iterations (network, +skipping items, etc) you should set miniters=1. +.RS +.RE +.TP +.B \-\-ascii=\f[I]ascii\f[] +bool, optional. +If unspecified or False, use unicode (smooth blocks) to fill the meter. +The fallback is to use ASCII characters \f[C]1\-9\ #\f[]. +.RS +.RE +.TP +.B \-\-disable=\f[I]disable\f[] +bool, optional. +Whether to disable the entire progressbar wrapper [default: False]. +If set to None, disable on non\-TTY. +.RS +.RE +.TP +.B \-\-unit=\f[I]unit\f[] +str, optional. +String that will be used to define the unit of each iteration [default: +it]. +.RS +.RE +.TP +.B \-\-unit_scale=\f[I]unit_scale\f[] +bool or int or float, optional. +If 1 or True, the number of iterations will be reduced/scaled +automatically and a metric prefix following the International System of +Units standard will be added (kilo, mega, etc.) [default: False]. +If any other non\-zero number, will scale \f[C]total\f[] and \f[C]n\f[]. +.RS +.RE +.TP +.B \-\-dynamic_ncols=\f[I]dynamic_ncols\f[] +bool, optional. +If set, constantly alters \f[C]ncols\f[] to the environment (allowing +for window resizes) [default: False]. +.RS +.RE +.TP +.B \-\-smoothing=\f[I]smoothing\f[] +float, optional. +Exponential moving average smoothing factor for speed estimates (ignored +in GUI mode). +Ranges from 0 (average speed) to 1 (current/instantaneous speed) +[default: 0.3]. +.RS +.RE +.TP +.B \-\-bar_format=\f[I]bar_format\f[] +str, optional. +Specify a custom bar string formatting. +May impact performance. +If unspecified, will use \[aq]{l_bar}{bar}{r_bar}\[aq], where l_bar is +\[aq]{desc}: {percentage:3.0f}%|\[aq] and r_bar is \[aq]| +{n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]\[aq] Possible +vars: bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, +elapsed, remaining, l_bar, r_bar, desc. +Note that a trailing ": " is automatically removed after {desc} if the +latter is empty. +.RS +.RE +.TP +.B \-\-initial=\f[I]initial\f[] +int, optional. +The initial counter value. +Useful when restarting a progress bar [default: 0]. +.RS +.RE +.TP +.B \-\-position=\f[I]position\f[] +int, optional. +Specify the line offset to print this bar (starting from 0) Automatic if +unspecified. +Useful to manage multiple bars at once (eg, from threads). +.RS +.RE +.TP +.B \-\-postfix=\f[I]postfix\f[] +dict, optional. +Specify additional stats to display at the end of the bar. +Note: postfix is a dict ({\[aq]key\[aq]: value} pairs) for this method, +not a string. +.RS +.RE +.TP +.B \-\-unit_divisor=\f[I]unit_divisor\f[] +float, optional. +[default: 1000], ignored unless \f[C]unit_scale\f[] is True. +.RS +.RE +.TP +.B \-\-delim=\f[I]delim\f[] +chr, optional. +Delimiting character [default: \[aq]\[aq]]. +Use \[aq]\[aq] for null. +N.B.: on Windows systems, Python converts \[aq]\[aq] to \[aq]\[aq]. +.RS +.RE +.TP +.B \-\-buf_size=\f[I]buf_size\f[] +int, optional. +String buffer size in bytes [default: 256] used when \f[C]delim\f[] is +specified. +.RS +.RE +.TP +.B \-\-bytes=\f[I]bytes\f[] +bool, optional. +If true, will count bytes and ignore \f[C]delim\f[]. +.RS +.RE +.SH AUTHORS +tqdm developers <https://github.com/tqdm>. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/tqdm.egg-info/PKG-INFO new/tqdm-4.19.2/tqdm.egg-info/PKG-INFO --- old/tqdm-4.18.0/tqdm.egg-info/PKG-INFO 2017-10-01 00:13:36.000000000 +0200 +++ new/tqdm-4.19.2/tqdm.egg-info/PKG-INFO 2017-10-09 01:33:54.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tqdm -Version: 4.18.0 +Version: 4.19.2 Summary: Fast, Extensible Progress Meter Home-page: https://github.com/tqdm/tqdm Author: tqdm developers @@ -333,12 +333,14 @@ (current/instantaneous speed) [default: 0.3]. * bar_format : str, optional Specify a custom bar string formatting. May impact performance. - If unspecified, will use '{l_bar}{bar}{r_bar}', where l_bar is - '{desc}: {percentage:3.0f}%|' and r_bar is - '| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]' - Possible vars: bar, n, n_fmt, total, total_fmt, percentage, - rate, rate_fmt, elapsed, remaining, l_bar, r_bar, desc. - Note that a trailing ": " is automatically stripped after {desc} + [default: '{l_bar}{bar}{r_bar}'], where + l_bar='{desc}: {percentage:3.0f}%|' and + r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' + '{rate_fmt}{postfix}]' + Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, + percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, + rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. + Note that a trailing ": " is automatically removed after {desc} if the latter is empty. * initial : int, optional The initial counter value. Useful when restarting a progress @@ -739,25 +741,25 @@ ``tqdm`` implements a few tricks to to increase efficiency and reduce overhead. - 1. Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long - to wait between each refresh. ``tqdm`` always gets updated in the background, - but it will diplay only every ``mininterval``. - 2. Reduce number of calls to check system clock/time. - 3. ``mininterval`` is more intuitive to configure than ``miniters``. - A clever adjustment system ``dynamic_miniters`` will automatically adjust - ``miniters`` to the amount of iterations that fit into time ``mininterval``. - Essentially, ``tqdm`` will check if it's time to print without actually - checking time. This behavior can be still be bypassed by manually setting - ``miniters``. + - Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long + to wait between each refresh. ``tqdm`` always gets updated in the background, + but it will diplay only every ``mininterval``. + - Reduce number of calls to check system clock/time. + - ``mininterval`` is more intuitive to configure than ``miniters``. + A clever adjustment system ``dynamic_miniters`` will automatically adjust + ``miniters`` to the amount of iterations that fit into time ``mininterval``. + Essentially, ``tqdm`` will check if it's time to print without actually + checking time. This behavior can be still be bypassed by manually setting + ``miniters``. However, consider a case with a combination of fast and slow iterations. After a few fast iterations, ``dynamic_miniters`` will set ``miniters`` to a large number. When interation rate subsequently slows, ``miniters`` will remain large and thus reduce display update frequency. To address this: - 4. ``maxinterval`` defines the maximum time between display refreshes. - A concurrent monitoring thread checks for overdue updates and forces one - where necessary. + - ``maxinterval`` defines the maximum time between display refreshes. + A concurrent monitoring thread checks for overdue updates and forces one + where necessary. The monitoring thread should not have a noticeable overhead, and guarantees updates at least every 10 seconds by default. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tqdm-4.18.0/tqdm.egg-info/SOURCES.txt new/tqdm-4.19.2/tqdm.egg-info/SOURCES.txt --- old/tqdm-4.18.0/tqdm.egg-info/SOURCES.txt 2017-10-01 00:13:36.000000000 +0200 +++ new/tqdm-4.19.2/tqdm.egg-info/SOURCES.txt 2017-10-09 01:33:54.000000000 +0200 @@ -8,6 +8,7 @@ setup.cfg setup.py tox.ini +tqdm.1 examples/7zx.py examples/include_no_requirements.py examples/pandas_progress_apply.py
