dev-python/progressbar: Remove redundant versions

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2020-03-28 13:35:12 +01:00
parent d5505e79f7
commit 58108eabd3
3 changed files with 0 additions and 116 deletions

View File

@@ -1,2 +1 @@
DIST progressbar-2.3.tar.gz 9420 BLAKE2B 025f2d42fb0ef11a2e4b974ba6a8cd44c48a7f828ec40a08347492d393acac46fa9c29962d39fe296af655e94ab2075885c73ed6953e2d739aeb6f5f0c0aa13f SHA512 06fdc8b6664642bd864be8023355316fba23bcc4deb0c5877c5dfa91da5d233301a8f39342f133cbb63f37a20de7b8b24910ac8073127fcbdf43b5200d60ed5f
DIST progressbar-2.5.tar.gz 10046 BLAKE2B fdbef570f48a0c61659bf02b3cc4e0f64d9e4e2edda970edb79fd4aac5fe2cc1bd0a7421458100cab7cbfd3d9d8cf905774113e336ff2d687d5e06b04a4e113a SHA512 86a56a573b903b947baac98b26f88e40072603007fdf5cda3e4a7e797fe4c4c42fd1a4b1ddb1c9ca9a062659d3647c428e33949e2df9e20b0f56a9a4099de51b

View File

@@ -1,94 +0,0 @@
# HG changeset patch
# User Nilton Volpato <nilton@google.com>
# Date 1348267873 10800
# Fri Sep 21 19:51:13 2012 -0300
# Node ID 3c94a3a1ebe1325c7c605cc8f11126dcc632b04d
# Parent 83ece680e4fe06aa704de4c3a967355db21046d4
Remove format as a slot attribute, as that is not compatible with python 3.3
diff --git a/progressbar/widgets.py b/progressbar/widgets.py
--- a/progressbar/widgets.py
+++ b/progressbar/widgets.py
@@ -81,11 +81,11 @@
class Timer(Widget):
"""Widget which displays the elapsed seconds."""
- __slots__ = ('format',)
+ __slots__ = ('format_string',)
TIME_SENSITIVE = True
def __init__(self, format='Elapsed Time: %s'):
- self.format = format
+ self.format_string = format
@staticmethod
def format_time(seconds):
@@ -97,7 +97,7 @@
def update(self, pbar):
"""Updates the widget to show the elapsed time."""
- return self.format % self.format_time(pbar.seconds_elapsed)
+ return self.format_string % self.format_time(pbar.seconds_elapsed)
class ETA(Timer):
@@ -121,9 +121,9 @@
class FileTransferSpeed(Widget):
"""Widget for showing the transfer speed (useful for file transfers)."""
- format = '%6.2f %s%s/s'
- prefixes = ' kMGTPEZY'
- __slots__ = ('unit', 'format')
+ FORMAT = '%6.2f %s%s/s'
+ PREFIXES = ' kMGTPEZY'
+ __slots__ = ('unit',)
def __init__(self, unit='B'):
self.unit = unit
@@ -138,7 +138,7 @@
power = int(math.log(speed, 1000))
scaled = speed / 1000.**power
- return self.format % (scaled, self.prefixes[power], self.unit)
+ return self.FORMAT % (scaled, self.PREFIXES[power], self.unit)
class AnimatedMarker(Widget):
@@ -168,13 +168,13 @@
class Counter(Widget):
"""Displays the current count."""
- __slots__ = ('format',)
+ __slots__ = ('format_string',)
def __init__(self, format='%d'):
- self.format = format
+ self.format_string = format
def update(self, pbar):
- return self.format % pbar.currval
+ return self.format_string % pbar.currval
class Percentage(Widget):
@@ -197,9 +197,9 @@
'value': ('currval', None)
}
- __slots__ = ('format',)
+ __slots__ = ('format_string',)
def __init__(self, format):
- self.format = format
+ self.format_string = format
def update(self, pbar):
context = {}
@@ -213,7 +213,7 @@
context[name] = transform(value)
except: pass
- return self.format % context
+ return self.format_string % context
class SimpleProgress(Widget):

View File

@@ -1,21 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python3_6 pypy3)
inherit distutils-r1
DESCRIPTION="Text progressbar library for python"
HOMEPAGE="https://pypi.org/project/progressbar/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="|| ( LGPL-2.1 BSD )"
SLOT="0"
KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""
PATCHES=( "${FILESDIR}/progressbar-2.3-python3.3.patch" )