Skip to content
Snippets Groups Projects
Commit 117a1005 authored by Stephen Finucane's avatar Stephen Finucane
Browse files

requirements: Uncap PrettyTable

PrettyTable was capped at a < 0.8, which meant we were getting the
veritably ancient 0.7.2 release first release in April 2013 (!) [1].
The project is now being maintained as a Jazzband project [2], meaning
we should switch to this new version.

The only significant change required here is that we no longer set the
'min_width' attribute since that actually does something - the wrong
thing - now. We want this attribute to set a lower bound on the wrap
width as opposed to an absolute minimum we can use, which is what
setting the 'min_width' attribute would do.

While we're here, we also remove a now useless bit of Python 2 code and
bump cmd2 to a slightly newer version.

[1] https://pypi.org/project/prettytable/#history
[2] https://github.com/jazzband/prettytable



Change-Id: Iceac729e7a9429e8ab25c60524a48d0aaeebeb37
Signed-off-by: default avatarStephen Finucane <sfinucan@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/requirements/+/774917
parent 421f20c9
No related branches found
No related tags found
No related merge requests found
......@@ -10,12 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Output formatters using prettytable.
"""
"""Output formatters using prettytable."""
import prettytable
import os
import prettytable
from cliff import utils
from . import base
from cliff import columns
......@@ -39,10 +39,6 @@ class TableFormatter(base.ListFormatter, base.SingleFormatter):
str: 'l',
float: 'r',
}
try:
ALIGNMENTS[unicode] = 'l'
except NameError:
pass
def add_argument_group(self, parser):
group = parser.add_argument_group('table formatter')
......@@ -175,9 +171,6 @@ class TableFormatter(base.ListFormatter, base.SingleFormatter):
@staticmethod
def _assign_max_widths(stdout, x, max_width, min_width=0, fit_width=False):
if min_width:
x.min_width = min_width
if max_width > 0:
term_width = max_width
elif not fit_width:
......
......@@ -49,7 +49,7 @@ table
The ``table`` formatter uses PrettyTable_ to produce output formatted
for human consumption.
.. _PrettyTable: http://code.google.com/p/prettytable/
.. _PrettyTable: https://pypi.org/project/prettytable/
::
......
......@@ -34,7 +34,7 @@ table
The ``table`` formatter uses PrettyTable_ to produce output
formatted for human consumption. This is the default formatter.
.. _PrettyTable: http://code.google.com/p/prettytable/
.. _PrettyTable: https://pypi.org/project/prettytable
::
......
......@@ -2,8 +2,8 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
cmd2>=0.8.0,!=0.8.3 # MIT
PrettyTable<0.8,>=0.7.2 # BSD
cmd2>=1.0.0 # MIT
PrettyTable>=0.7.2 # BSD
pyparsing>=2.1.0 # MIT
stevedore>=2.0.1 # Apache-2.0
PyYAML>=3.12 # MIT
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment