progressbar2 4.4.1__tar.gz → 4.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/workflows/stale.yml +2 -2
- {progressbar2-4.4.1 → progressbar2-4.4.3}/PKG-INFO +1 -9
- {progressbar2-4.4.1 → progressbar2-4.4.3}/README.rst +0 -8
- {progressbar2-4.4.1 → progressbar2-4.4.3}/examples.py +1 -1
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/__about__.py +1 -1
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/bar.py +8 -1
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/env.py +2 -2
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/utils.py +1 -1
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/widgets.py +2 -2
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/PKG-INFO +1 -9
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/original_examples.py +1 -1
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_utils.py +2 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_widgets.py +1 -1
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/FUNDING.yml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/ci-reporter.yml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/workflows/codeql.yml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/workflows/main.yml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.gitignore +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.pre-commit-config.yaml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/.readthedocs.yaml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/CHANGES.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/CONTRIBUTING.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/ISSUE_TEMPLATE +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/LICENSE +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/MANIFEST.in +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/Makefile +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/appveyor.yml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/circle.yml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/.gitignore +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/Makefile +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/LICENSE +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/flask_theme_support.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/layout.html +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/relations.html +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/static/flasky.css_t +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/static/small_flask.css +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/theme.conf +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/conf.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/contributing.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/examples.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/history.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/index.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/installation.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/make.bat +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.algorithms.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.bar.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.base.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.env.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.multi.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.shortcuts.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.base.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.colors.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.os_specific.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.stream.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.utils.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.widgets.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/requirements.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/usage.rst +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/__init__.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/__main__.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/algorithms.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/base.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/multi.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/py.typed +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/shortcuts.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/__init__.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/base.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/colors.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/os_specific/__init__.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/os_specific/posix.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/os_specific/windows.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/stream.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/SOURCES.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/dependency_links.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/entry_points.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/requires.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/top_level.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/pyproject.toml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/pytest.ini +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/requirements.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/ruff.toml +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/setup.cfg +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/conftest.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/requirements.txt +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_algorithms.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_backwards_compatibility.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_color.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_custom_widgets.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_data.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_data_transfer_bar.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_dill_pickle.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_empty.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_end.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_failure.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_flush.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_iterators.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_job_status.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_large_values.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_misc.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_monitor_progress.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_multibar.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_progressbar.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_progressbar_command.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_samples.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_speed.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_stream.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_terminal.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_timed.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_timer.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_unicode.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_unknown_length.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_windows.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_with.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_wrappingio.py +0 -0
- {progressbar2-4.4.1 → progressbar2-4.4.3}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: progressbar2
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.3
|
|
4
4
|
Summary: A Python Progressbar library to provide visual (yet text based) progress to long running operations.
|
|
5
5
|
Author-email: "Rick van Hattem (Wolph)" <wolph@wol.ph>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -153,14 +153,6 @@ of widgets:
|
|
|
153
153
|
The progressbar module is very easy to use, yet very powerful. It will also
|
|
154
154
|
automatically enable features like auto-resizing when the system supports it.
|
|
155
155
|
|
|
156
|
-
******************************************************************************
|
|
157
|
-
Security contact information
|
|
158
|
-
******************************************************************************
|
|
159
|
-
|
|
160
|
-
To report a security vulnerability, please use the
|
|
161
|
-
`Tidelift security contact <https://tidelift.com/security>`_.
|
|
162
|
-
Tidelift will coordinate the fix and disclosure.
|
|
163
|
-
|
|
164
156
|
******************************************************************************
|
|
165
157
|
Known issues
|
|
166
158
|
******************************************************************************
|
|
@@ -71,14 +71,6 @@ of widgets:
|
|
|
71
71
|
The progressbar module is very easy to use, yet very powerful. It will also
|
|
72
72
|
automatically enable features like auto-resizing when the system supports it.
|
|
73
73
|
|
|
74
|
-
******************************************************************************
|
|
75
|
-
Security contact information
|
|
76
|
-
******************************************************************************
|
|
77
|
-
|
|
78
|
-
To report a security vulnerability, please use the
|
|
79
|
-
`Tidelift security contact <https://tidelift.com/security>`_.
|
|
80
|
-
Tidelift will coordinate the fix and disclosure.
|
|
81
|
-
|
|
82
74
|
******************************************************************************
|
|
83
75
|
Known issues
|
|
84
76
|
******************************************************************************
|
|
@@ -21,7 +21,7 @@ long running operations.
|
|
|
21
21
|
'''.strip().split(),
|
|
22
22
|
)
|
|
23
23
|
__email__ = 'wolph@wol.ph'
|
|
24
|
-
__version__ = '4.4.
|
|
24
|
+
__version__ = '4.4.3'
|
|
25
25
|
__license__ = 'BSD'
|
|
26
26
|
__copyright__ = 'Copyright 2015 Rick van Hattem (Wolph)'
|
|
27
27
|
__url__ = 'https://github.com/WoLpH/python-progressbar'
|
|
@@ -25,6 +25,7 @@ from . import (
|
|
|
25
25
|
widgets,
|
|
26
26
|
widgets as widgets_module, # Avoid name collision
|
|
27
27
|
)
|
|
28
|
+
from .terminal import os_specific
|
|
28
29
|
|
|
29
30
|
logger = logging.getLogger(__name__)
|
|
30
31
|
|
|
@@ -294,6 +295,10 @@ class DefaultFdMixin(ProgressBarMixinBase):
|
|
|
294
295
|
def print(self, *args: types.Any, **kwargs: types.Any) -> None:
|
|
295
296
|
print(*args, file=self.fd, **kwargs)
|
|
296
297
|
|
|
298
|
+
def start(self, **kwargs):
|
|
299
|
+
os_specific.set_console_mode()
|
|
300
|
+
super().start()
|
|
301
|
+
|
|
297
302
|
def update(self, *args: types.Any, **kwargs: types.Any) -> None:
|
|
298
303
|
ProgressBarMixinBase.update(self, *args, **kwargs)
|
|
299
304
|
|
|
@@ -313,6 +318,8 @@ class DefaultFdMixin(ProgressBarMixinBase):
|
|
|
313
318
|
*args: types.Any,
|
|
314
319
|
**kwargs: types.Any,
|
|
315
320
|
) -> None: # pragma: no cover
|
|
321
|
+
os_specific.reset_console_mode()
|
|
322
|
+
|
|
316
323
|
if self._finished:
|
|
317
324
|
return
|
|
318
325
|
|
|
@@ -1030,7 +1037,7 @@ class ProgressBar(
|
|
|
1030
1037
|
and self.max_value is not None
|
|
1031
1038
|
and self.max_value < 0 # type: ignore
|
|
1032
1039
|
):
|
|
1033
|
-
raise ValueError('max_value out of range, got
|
|
1040
|
+
raise ValueError(f'max_value out of range, got {self.max_value!r}')
|
|
1034
1041
|
|
|
1035
1042
|
def _calculate_poll_interval(self) -> None:
|
|
1036
1043
|
self.num_intervals = max(100, self.term_width)
|
|
@@ -162,9 +162,9 @@ def is_terminal(fd: base.IO, is_terminal: bool | None = None) -> bool | None:
|
|
|
162
162
|
|
|
163
163
|
# Enable Windows full color mode if possible
|
|
164
164
|
if os.name == 'nt':
|
|
165
|
-
|
|
165
|
+
pass
|
|
166
166
|
|
|
167
|
-
os_specific.set_console_mode()
|
|
167
|
+
# os_specific.set_console_mode()
|
|
168
168
|
|
|
169
169
|
JUPYTER = bool(
|
|
170
170
|
os.environ.get('JUPYTER_COLUMNS')
|
|
@@ -97,7 +97,7 @@ def no_color(value: StringT) -> StringT:
|
|
|
97
97
|
elif isinstance(value, str):
|
|
98
98
|
return re.sub('\x1b\\[.*?[@-~]', '', value) # type: ignore
|
|
99
99
|
else:
|
|
100
|
-
raise TypeError('`value` must be a string or bytes, got
|
|
100
|
+
raise TypeError(f'`value` must be a string or bytes, got {value!r}')
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
def len_color(value: types.StringTypes) -> int:
|
|
@@ -547,7 +547,7 @@ class ETA(Timer):
|
|
|
547
547
|
|
|
548
548
|
data['eta'] = None
|
|
549
549
|
if data['eta_seconds']:
|
|
550
|
-
with contextlib.suppress(ValueError, OverflowError):
|
|
550
|
+
with contextlib.suppress(ValueError, OverflowError, OSError):
|
|
551
551
|
data['eta'] = utils.format_time(data['eta_seconds'])
|
|
552
552
|
|
|
553
553
|
if data['value'] == progress.min_value:
|
|
@@ -560,7 +560,7 @@ class ETA(Timer):
|
|
|
560
560
|
fmt = self.format_NA
|
|
561
561
|
else:
|
|
562
562
|
fmt = self.format_zero
|
|
563
|
-
|
|
563
|
+
:
|
|
564
564
|
return Timer.__call__(self, progress, data, format=fmt)
|
|
565
565
|
|
|
566
566
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: progressbar2
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.3
|
|
4
4
|
Summary: A Python Progressbar library to provide visual (yet text based) progress to long running operations.
|
|
5
5
|
Author-email: "Rick van Hattem (Wolph)" <wolph@wol.ph>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -153,14 +153,6 @@ of widgets:
|
|
|
153
153
|
The progressbar module is very easy to use, yet very powerful. It will also
|
|
154
154
|
automatically enable features like auto-resizing when the system supports it.
|
|
155
155
|
|
|
156
|
-
******************************************************************************
|
|
157
|
-
Security contact information
|
|
158
|
-
******************************************************************************
|
|
159
|
-
|
|
160
|
-
To report a security vulnerability, please use the
|
|
161
|
-
`Tidelift security contact <https://tidelift.com/security>`_.
|
|
162
|
-
Tidelift will coordinate the fix and disclosure.
|
|
163
|
-
|
|
164
156
|
******************************************************************************
|
|
165
157
|
Known issues
|
|
166
158
|
******************************************************************************
|
|
@@ -15,11 +15,13 @@ import pytest
|
|
|
15
15
|
('t', True),
|
|
16
16
|
('yes', True),
|
|
17
17
|
('true', True),
|
|
18
|
+
('True', True),
|
|
18
19
|
('0', False),
|
|
19
20
|
('n', False),
|
|
20
21
|
('f', False),
|
|
21
22
|
('no', False),
|
|
22
23
|
('false', False),
|
|
24
|
+
('False', False),
|
|
23
25
|
],
|
|
24
26
|
)
|
|
25
27
|
def test_env_flag(value, expected, monkeypatch):
|
|
@@ -58,7 +58,7 @@ def test_widgets_large_values(max_value):
|
|
|
58
58
|
|
|
59
59
|
def test_format_widget():
|
|
60
60
|
widgets = [
|
|
61
|
-
progressbar.FormatLabel('
|
|
61
|
+
progressbar.FormatLabel(f'%({mapping})r')
|
|
62
62
|
for mapping in progressbar.FormatLabel.mapping
|
|
63
63
|
]
|
|
64
64
|
p = progressbar.ProgressBar(widgets=widgets)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|