- Update to 4.67.0
* contrib.discord: replace disco-py with requests (#1536) - from version 4.66.6 * cli: zip-safe --manpath, --comppath (#1627) * misc framework updates (#1627) + fix pytest DeprecationWarning + fix snapcraft build + fix nbval DeprecationWarning + update & tidy workflows + bump pre-commit + docs: update URLs - from version 4.66.5 * support ncols auto-detection on FreeBSD (#1602 <- casperdcl/git-fame#98) * fix Python 3.13 CLI (#1594 <- #1585) * fix Python 3.13 tests (#1595 <- python/cpython#117536 (comment)) * misc framework updates (#1602) + add official Python 3.12 support + bump deps (NiklasRosenstein/pydoc-markdown#329, tikitu/jsmin#44) - Drop fix-issues-with-python3.13.patch, merged upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tqdm?expand=0&rev=131
This commit is contained in:
commit
cc4490cc62
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
75
fix-issues-with-python3.13.patch
Normal file
75
fix-issues-with-python3.13.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From eafdd306861f531c443885048f0abdaa6bc45f8e Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||||
|
Date: Thu, 27 Jun 2024 18:30:55 +0200
|
||||||
|
Subject: [PATCH 1/2] cli: Fix docstring processing with Python 3.13+
|
||||||
|
|
||||||
|
Fix docstring processing code to reindent the docstrings if using Python
|
||||||
|
3.13 or newer. Starting with this version, all docstrings are
|
||||||
|
automatically dedented by Python, which causes the regular expression to
|
||||||
|
fail to match.
|
||||||
|
|
||||||
|
Fixes #1585
|
||||||
|
---
|
||||||
|
tqdm/cli.py | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tqdm/cli.py b/tqdm/cli.py
|
||||||
|
index 7284f28d5..1bbce6d1f 100644
|
||||||
|
--- a/tqdm/cli.py
|
||||||
|
+++ b/tqdm/cli.py
|
||||||
|
@@ -4,6 +4,7 @@
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
+import textwrap
|
||||||
|
from ast import literal_eval as numeric
|
||||||
|
|
||||||
|
from .std import TqdmKeyError, TqdmTypeError, tqdm
|
||||||
|
@@ -177,7 +178,11 @@ def main(fp=sys.stderr, argv=None):
|
||||||
|
logging.basicConfig(level=getattr(logging, logLevel),
|
||||||
|
format="%(levelname)s:%(module)s:%(lineno)d:%(message)s")
|
||||||
|
|
||||||
|
- d = tqdm.__doc__ + CLI_EXTRA_DOC
|
||||||
|
+ d = tqdm.__doc__
|
||||||
|
+ if sys.version_info >= (3, 13):
|
||||||
|
+ # Python 3.13+ automatically dedents docstrings
|
||||||
|
+ d = textwrap.indent(d, " ")
|
||||||
|
+ d += CLI_EXTRA_DOC
|
||||||
|
|
||||||
|
opt_types = dict(RE_OPTS.findall(d))
|
||||||
|
# opt_types['delim'] = 'chr'
|
||||||
|
|
||||||
|
From 9e7528350b7733b2fb236ca4d615be60b2a4ac29 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||||
|
Date: Mon, 8 Jul 2024 17:26:13 +0200
|
||||||
|
Subject: [PATCH 2/2] Avoid Python 3.13+ RuntimeWarning: coroutine method
|
||||||
|
'aclose' of 'acount' was never awaited
|
||||||
|
|
||||||
|
See https://github.com/python/cpython/issues/117536#issuecomment-2036883124
|
||||||
|
---
|
||||||
|
tests/tests_asyncio.py | 12 ++++++++----
|
||||||
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/tests_asyncio.py b/tests/tests_asyncio.py
|
||||||
|
index bdef569fa..250e6585d 100644
|
||||||
|
--- a/tests/tests_asyncio.py
|
||||||
|
+++ b/tests/tests_asyncio.py
|
||||||
|
@@ -48,10 +48,14 @@ async def test_generators(capsys):
|
||||||
|
_, err = capsys.readouterr()
|
||||||
|
assert '9it' in err
|
||||||
|
|
||||||
|
- with tqdm(acount(), desc="async_counter") as pbar:
|
||||||
|
- async for i in pbar:
|
||||||
|
- if i >= 8:
|
||||||
|
- break
|
||||||
|
+ acounter = acount()
|
||||||
|
+ try:
|
||||||
|
+ with tqdm(acounter, desc="async_counter") as pbar:
|
||||||
|
+ async for i in pbar:
|
||||||
|
+ if i >= 8:
|
||||||
|
+ break
|
||||||
|
+ finally:
|
||||||
|
+ await acounter.aclose()
|
||||||
|
_, err = capsys.readouterr()
|
||||||
|
assert '9it' in err
|
||||||
|
|
1305
python-tqdm.changes
Normal file
1305
python-tqdm.changes
Normal file
File diff suppressed because it is too large
Load Diff
132
python-tqdm.spec
Normal file
132
python-tqdm.spec
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-tqdm
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define allpython python
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define test 1
|
||||||
|
%define pkg_suffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define pkg_suffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-tqdm%{pkg_suffix}
|
||||||
|
Version: 4.67.0
|
||||||
|
Release: 0
|
||||||
|
Summary: An extensible progress meter
|
||||||
|
License: MIT AND MPL-2.0
|
||||||
|
URL: https://github.com/tqdm/tqdm
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/t/tqdm/tqdm-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module toml}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
Enhances: python-ipython
|
||||||
|
BuildArch: noarch
|
||||||
|
%if %{with test}
|
||||||
|
# SECTION test requirements
|
||||||
|
BuildRequires: %{python_module pytest-asyncio}
|
||||||
|
# Conditional required for SLE-15-SP4+
|
||||||
|
BuildRequires: %{python_module numpy if (python-base without python36-base)}
|
||||||
|
BuildRequires: %{python_module pytest-timeout}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module tqdm = %{version}}
|
||||||
|
%if ! 0%{?_with_ringdisabled}
|
||||||
|
# Conditional required for SLE-15-SP4+
|
||||||
|
BuildRequires: %{python_module pandas if (python-base without python36-base)}
|
||||||
|
%endif
|
||||||
|
# /SECTION
|
||||||
|
%endif
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
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.
|
||||||
|
|
||||||
|
%package -n %{allpython}-tqdm-bash-completion
|
||||||
|
Summary: Bash completion for python-tqdm
|
||||||
|
Requires: bash-completion
|
||||||
|
Supplements: %{python_module tqdm and bash-completion}
|
||||||
|
|
||||||
|
%description -n %{allpython}-tqdm-bash-completion
|
||||||
|
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.
|
||||||
|
|
||||||
|
This package provides the completion file for bash
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n tqdm-%{version}
|
||||||
|
# ignore new asyncio mode warning from pytest-asyncio 0.17
|
||||||
|
sed -i 's/-W=error//' pyproject.toml
|
||||||
|
# remove bash shebang for completion script
|
||||||
|
sed -i '1 s/^#!.*/# bash completion for tqdm -*- shell-script -*-/' tqdm/completion.sh
|
||||||
|
chmod a-x tqdm/completion.sh
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%if !%{with test}
|
||||||
|
%pyproject_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/tqdm
|
||||||
|
install -m 644 -D tqdm/completion.sh %{buildroot}%{_datadir}/bash-completion/completions/tqdm
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
|
%post
|
||||||
|
%python_install_alternative tqdm
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative tqdm
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
|
%check
|
||||||
|
# test_perf: flaky
|
||||||
|
# test_synchronisation: hangs
|
||||||
|
%pytest -k "not (tests_perf or tests_synchronisation)"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
|
%files %{python_files}
|
||||||
|
%doc README.rst logo.png
|
||||||
|
%doc examples/
|
||||||
|
%license LICENCE
|
||||||
|
%{python_sitelib}/tqdm/
|
||||||
|
%{python_sitelib}/tqdm-%{version}.dist-info
|
||||||
|
%python_alternative %{_bindir}/tqdm
|
||||||
|
|
||||||
|
%files -n %{allpython}-tqdm-bash-completion
|
||||||
|
%license LICENCE
|
||||||
|
%{_datadir}/bash-completion/completions/tqdm
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
BIN
tqdm-4.66.4.tar.gz
(Stored with Git LFS)
Normal file
BIN
tqdm-4.66.4.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
tqdm-4.67.0.tar.gz
Normal file
3
tqdm-4.67.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fe5a6f95e6fe0b9755e9469b77b9c3cf850048224ecaa8293d7d2d31f97d869a
|
||||||
|
size 169739
|
Loading…
x
Reference in New Issue
Block a user