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.
Files changed (117) hide show
  1. {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/workflows/stale.yml +2 -2
  2. {progressbar2-4.4.1 → progressbar2-4.4.3}/PKG-INFO +1 -9
  3. {progressbar2-4.4.1 → progressbar2-4.4.3}/README.rst +0 -8
  4. {progressbar2-4.4.1 → progressbar2-4.4.3}/examples.py +1 -1
  5. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/__about__.py +1 -1
  6. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/bar.py +8 -1
  7. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/env.py +2 -2
  8. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/utils.py +1 -1
  9. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/widgets.py +2 -2
  10. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/PKG-INFO +1 -9
  11. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/original_examples.py +1 -1
  12. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_utils.py +2 -0
  13. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_widgets.py +1 -1
  14. {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/FUNDING.yml +0 -0
  15. {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/ci-reporter.yml +0 -0
  16. {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/workflows/codeql.yml +0 -0
  17. {progressbar2-4.4.1 → progressbar2-4.4.3}/.github/workflows/main.yml +0 -0
  18. {progressbar2-4.4.1 → progressbar2-4.4.3}/.gitignore +0 -0
  19. {progressbar2-4.4.1 → progressbar2-4.4.3}/.pre-commit-config.yaml +0 -0
  20. {progressbar2-4.4.1 → progressbar2-4.4.3}/.readthedocs.yaml +0 -0
  21. {progressbar2-4.4.1 → progressbar2-4.4.3}/CHANGES.rst +0 -0
  22. {progressbar2-4.4.1 → progressbar2-4.4.3}/CONTRIBUTING.rst +0 -0
  23. {progressbar2-4.4.1 → progressbar2-4.4.3}/ISSUE_TEMPLATE +0 -0
  24. {progressbar2-4.4.1 → progressbar2-4.4.3}/LICENSE +0 -0
  25. {progressbar2-4.4.1 → progressbar2-4.4.3}/MANIFEST.in +0 -0
  26. {progressbar2-4.4.1 → progressbar2-4.4.3}/Makefile +0 -0
  27. {progressbar2-4.4.1 → progressbar2-4.4.3}/appveyor.yml +0 -0
  28. {progressbar2-4.4.1 → progressbar2-4.4.3}/circle.yml +0 -0
  29. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/.gitignore +0 -0
  30. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/Makefile +0 -0
  31. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/LICENSE +0 -0
  32. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/flask_theme_support.py +0 -0
  33. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/layout.html +0 -0
  34. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/relations.html +0 -0
  35. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/static/flasky.css_t +0 -0
  36. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/static/small_flask.css +0 -0
  37. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/_theme/wolph/theme.conf +0 -0
  38. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/conf.py +0 -0
  39. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/contributing.rst +0 -0
  40. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/examples.rst +0 -0
  41. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/history.rst +0 -0
  42. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/index.rst +0 -0
  43. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/installation.rst +0 -0
  44. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/make.bat +0 -0
  45. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.algorithms.rst +0 -0
  46. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.bar.rst +0 -0
  47. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.base.rst +0 -0
  48. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.env.rst +0 -0
  49. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.multi.rst +0 -0
  50. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.rst +0 -0
  51. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.shortcuts.rst +0 -0
  52. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.base.rst +0 -0
  53. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.colors.rst +0 -0
  54. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.os_specific.rst +0 -0
  55. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.rst +0 -0
  56. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.terminal.stream.rst +0 -0
  57. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.utils.rst +0 -0
  58. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/progressbar.widgets.rst +0 -0
  59. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/requirements.txt +0 -0
  60. {progressbar2-4.4.1 → progressbar2-4.4.3}/docs/usage.rst +0 -0
  61. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/__init__.py +0 -0
  62. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/__main__.py +0 -0
  63. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/algorithms.py +0 -0
  64. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/base.py +0 -0
  65. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/multi.py +0 -0
  66. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/py.typed +0 -0
  67. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/shortcuts.py +0 -0
  68. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/__init__.py +0 -0
  69. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/base.py +0 -0
  70. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/colors.py +0 -0
  71. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/os_specific/__init__.py +0 -0
  72. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/os_specific/posix.py +0 -0
  73. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/os_specific/windows.py +0 -0
  74. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar/terminal/stream.py +0 -0
  75. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/SOURCES.txt +0 -0
  76. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/dependency_links.txt +0 -0
  77. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/entry_points.txt +0 -0
  78. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/requires.txt +0 -0
  79. {progressbar2-4.4.1 → progressbar2-4.4.3}/progressbar2.egg-info/top_level.txt +0 -0
  80. {progressbar2-4.4.1 → progressbar2-4.4.3}/pyproject.toml +0 -0
  81. {progressbar2-4.4.1 → progressbar2-4.4.3}/pytest.ini +0 -0
  82. {progressbar2-4.4.1 → progressbar2-4.4.3}/requirements.txt +0 -0
  83. {progressbar2-4.4.1 → progressbar2-4.4.3}/ruff.toml +0 -0
  84. {progressbar2-4.4.1 → progressbar2-4.4.3}/setup.cfg +0 -0
  85. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/conftest.py +0 -0
  86. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/requirements.txt +0 -0
  87. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_algorithms.py +0 -0
  88. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_backwards_compatibility.py +0 -0
  89. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_color.py +0 -0
  90. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_custom_widgets.py +0 -0
  91. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_data.py +0 -0
  92. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_data_transfer_bar.py +0 -0
  93. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_dill_pickle.py +0 -0
  94. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_empty.py +0 -0
  95. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_end.py +0 -0
  96. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_failure.py +0 -0
  97. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_flush.py +0 -0
  98. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_iterators.py +0 -0
  99. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_job_status.py +0 -0
  100. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_large_values.py +0 -0
  101. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_misc.py +0 -0
  102. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_monitor_progress.py +0 -0
  103. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_multibar.py +0 -0
  104. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_progressbar.py +0 -0
  105. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_progressbar_command.py +0 -0
  106. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_samples.py +0 -0
  107. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_speed.py +0 -0
  108. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_stream.py +0 -0
  109. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_terminal.py +0 -0
  110. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_timed.py +0 -0
  111. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_timer.py +0 -0
  112. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_unicode.py +0 -0
  113. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_unknown_length.py +0 -0
  114. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_windows.py +0 -0
  115. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_with.py +0 -0
  116. {progressbar2-4.4.1 → progressbar2-4.4.3}/tests/test_wrappingio.py +0 -0
  117. {progressbar2-4.4.1 → progressbar2-4.4.3}/tox.ini +0 -0
@@ -11,7 +11,7 @@ jobs:
11
11
  steps:
12
12
  - uses: actions/stale@v8
13
13
  with:
14
- days-before-stale: 30
14
+ days-before-issue-stale: 30
15
15
  exempt-issue-labels: in-progress,help-wanted,pinned,security,enhancement
16
- exempt-all-pr-assignees: true
16
+ exempt-all-assignees: true
17
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: progressbar2
3
- Version: 4.4.1
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
  ******************************************************************************
@@ -20,7 +20,7 @@ def example(fn):
20
20
  @functools.wraps(fn)
21
21
  def wrapped(*args, **kwargs):
22
22
  try:
23
- sys.stdout.write('Running: %s\n' % fn.__name__)
23
+ sys.stdout.write(f'Running: {fn.__name__}\n')
24
24
  fn(*args, **kwargs)
25
25
  sys.stdout.write('\n')
26
26
  except KeyboardInterrupt:
@@ -21,7 +21,7 @@ long running operations.
21
21
  '''.strip().split(),
22
22
  )
23
23
  __email__ = 'wolph@wol.ph'
24
- __version__ = '4.4.1'
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 %r' % self.max_value)
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
- from .terminal import os_specific
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 %r' % value)
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.1
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
  ******************************************************************************
@@ -32,7 +32,7 @@ def example(fn):
32
32
 
33
33
  def wrapped():
34
34
  try:
35
- sys.stdout.write('Running: %s\n' % name)
35
+ sys.stdout.write(f'Running: {name}\n')
36
36
  fn()
37
37
  sys.stdout.write('\n')
38
38
  except KeyboardInterrupt:
@@ -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('%%(%s)r' % mapping)
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