Merging upstream version 4.66.5.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
fb1c463200
commit
5a813448c6
8 changed files with 20 additions and 11 deletions
|
@ -39,7 +39,7 @@ repos:
|
||||||
- pytest-timeout
|
- pytest-timeout
|
||||||
- pytest-asyncio
|
- pytest-asyncio
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 7.0.0
|
rev: 7.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
args: [-j8]
|
args: [-j8]
|
||||||
|
|
|
@ -99,7 +99,7 @@ Note: to install all versions of the Python interpreter that are specified
|
||||||
in [tox.ini](https://github.com/tqdm/tqdm/blob/master/tox.ini),
|
in [tox.ini](https://github.com/tqdm/tqdm/blob/master/tox.ini),
|
||||||
you can use `MiniConda` to install a minimal setup. You must also ensure
|
you can use `MiniConda` to install a minimal setup. You must also ensure
|
||||||
that each distribution has an alias to call the Python interpreter
|
that each distribution has an alias to call the Python interpreter
|
||||||
(e.g. `python311` for Python 3.11's interpreter).
|
(e.g. `python312` for Python 3.12's interpreter).
|
||||||
|
|
||||||
### Alternative unit tests with pytest
|
### Alternative unit tests with pytest
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ dependencies:
|
||||||
- build # `python -m build`
|
- build # `python -m build`
|
||||||
# `cd docs && pymake`
|
# `cd docs && pymake`
|
||||||
- mkdocs-material
|
- mkdocs-material
|
||||||
- pydoc-markdown
|
|
||||||
- pygments
|
- pygments
|
||||||
- pymdown-extensions
|
- pymdown-extensions
|
||||||
- pip:
|
- pip:
|
||||||
- py-make >=0.1.0 # `make/pymake`
|
- py-make >=0.1.0 # `make/pymake`
|
||||||
- mkdocs-minify-plugin # `cd docs && pymake`
|
- mkdocs-minify-plugin # `cd docs && pymake`
|
||||||
- git+https://github.com/tqdm/jsmin@python3-only#egg=jsmin # `cd docs && pymake`
|
- git+https://github.com/tqdm/jsmin@fix-pip#egg=jsmin # `cd docs && pymake`
|
||||||
|
- pydoc-markdown >=4.6 # `cd docs && pymake`
|
||||||
|
|
|
@ -58,6 +58,7 @@ classifiers = [
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
"Programming Language :: Python :: 3 :: Only",
|
"Programming Language :: Python :: 3 :: Only",
|
||||||
"Programming Language :: Python :: Implementation",
|
"Programming Language :: Python :: Implementation",
|
||||||
"Programming Language :: Python :: Implementation :: IronPython",
|
"Programming Language :: Python :: Implementation :: IronPython",
|
||||||
|
|
|
@ -48,10 +48,14 @@ async def test_generators(capsys):
|
||||||
_, err = capsys.readouterr()
|
_, err = capsys.readouterr()
|
||||||
assert '9it' in err
|
assert '9it' in err
|
||||||
|
|
||||||
with tqdm(acount(), desc="async_counter") as pbar:
|
acounter = acount()
|
||||||
|
try:
|
||||||
|
with tqdm(acounter, desc="async_counter") as pbar:
|
||||||
async for i in pbar:
|
async for i in pbar:
|
||||||
if i >= 8:
|
if i >= 8:
|
||||||
break
|
break
|
||||||
|
finally:
|
||||||
|
await acounter.aclose()
|
||||||
_, err = capsys.readouterr()
|
_, err = capsys.readouterr()
|
||||||
assert '9it' in err
|
assert '9it' in err
|
||||||
|
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -4,7 +4,7 @@
|
||||||
# and then run "tox" from this directory.
|
# and then run "tox" from this directory.
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
envlist=py{37,38,39,310,311,py3}{,-tf}{,-keras}, perf, check
|
envlist=py{37,38,39,310,311,312,py3}{,-tf}{,-keras}, perf, check
|
||||||
isolated_build=True
|
isolated_build=True
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
|
@ -14,6 +14,7 @@ python=
|
||||||
3.9: py39
|
3.9: py39
|
||||||
3.10: py310
|
3.10: py310
|
||||||
3.11: py311
|
3.11: py311
|
||||||
|
3.12: py312
|
||||||
pypy-3.7: pypy3
|
pypy-3.7: pypy3
|
||||||
[gh-actions:env]
|
[gh-actions:env]
|
||||||
PLATFORM=
|
PLATFORM=
|
||||||
|
|
|
@ -5,6 +5,7 @@ import logging
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from ast import literal_eval as numeric
|
from ast import literal_eval as numeric
|
||||||
|
from textwrap import indent
|
||||||
|
|
||||||
from .std import TqdmKeyError, TqdmTypeError, tqdm
|
from .std import TqdmKeyError, TqdmTypeError, tqdm
|
||||||
from .version import __version__
|
from .version import __version__
|
||||||
|
@ -177,7 +178,9 @@ def main(fp=sys.stderr, argv=None):
|
||||||
logging.basicConfig(level=getattr(logging, logLevel),
|
logging.basicConfig(level=getattr(logging, logLevel),
|
||||||
format="%(levelname)s:%(module)s:%(lineno)d:%(message)s")
|
format="%(levelname)s:%(module)s:%(lineno)d:%(message)s")
|
||||||
|
|
||||||
d = tqdm.__doc__ + CLI_EXTRA_DOC
|
# py<3.13 doesn't dedent docstrings
|
||||||
|
d = (tqdm.__doc__ if sys.version_info < (3, 13)
|
||||||
|
else indent(tqdm.__doc__, " ")) + CLI_EXTRA_DOC
|
||||||
|
|
||||||
opt_types = dict(RE_OPTS.findall(d))
|
opt_types = dict(RE_OPTS.findall(d))
|
||||||
# opt_types['delim'] = 'chr'
|
# opt_types['delim'] = 'chr'
|
||||||
|
|
|
@ -14,7 +14,7 @@ from weakref import proxy
|
||||||
_range, _unich, _unicode, _basestring = range, chr, str, str
|
_range, _unich, _unicode, _basestring = range, chr, str, str
|
||||||
CUR_OS = sys.platform
|
CUR_OS = sys.platform
|
||||||
IS_WIN = any(CUR_OS.startswith(i) for i in ['win32', 'cygwin'])
|
IS_WIN = any(CUR_OS.startswith(i) for i in ['win32', 'cygwin'])
|
||||||
IS_NIX = any(CUR_OS.startswith(i) for i in ['aix', 'linux', 'darwin'])
|
IS_NIX = any(CUR_OS.startswith(i) for i in ['aix', 'linux', 'darwin', 'freebsd'])
|
||||||
RE_ANSI = re.compile(r"\x1b\[[;\d]*[A-Za-z]")
|
RE_ANSI = re.compile(r"\x1b\[[;\d]*[A-Za-z]")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue