1. 25 Mar, 2022 1 commit
  2. 21 Feb, 2022 2 commits
    • Thomas Goirand's avatar
      Now packaging 3.10.1 · f8fab4b5
      Thomas Goirand authored
      f8fab4b5
    • Thomas Goirand's avatar
      Merge tag '3.10.1' into debian/yoga · 9cbd5821
      Thomas Goirand authored
      cliff 3.10.1 release
      
      meta:version: 3.10.1
      meta:diff-start: -
      meta:series: yoga
      meta:release-type: release
      meta:pypi: yes
      meta:first: no
      meta:release:Author: Daniel Bengtsson <dbengt@redhat.com>
      meta:release:Commit: Daniel Bengtsson <dbengt@redhat.com>
      meta:release:Change-Id: I4b884e661ec22523ec78519b85c035563de388df
      meta:release:Code-Review+2: Elod Illes <elod.illes@est.tech>
      meta:release:Workflow+1: Elod Illes <elod.illes@est.tech>
      9cbd5821
  3. 16 Feb, 2022 2 commits
    • Thomas Goirand's avatar
      Now packaging 3.10.0 · 45c400d1
      Thomas Goirand authored
      45c400d1
    • Thomas Goirand's avatar
      Merge tag '3.10.0' into debian/yoga · 4c736170
      Thomas Goirand authored
      cliff 3.10.0 release
      
      meta:version: 3.10.0
      meta:diff-start: -
      meta:series: yoga
      meta:release-type: release
      meta:pypi: yes
      meta:first: yes
      meta:release:Author: Elod Illes <elod.illes@est.tech>
      meta:release:Commit: Elod Illes <elod.illes@est.tech>
      meta:release:Change-Id: Id39f81270d996cbcf0d4a3d37b3042309cd456b9
      meta:release:Code-Review+2: Hervé Beraud <herveberaud.pro@gmail.com>
      meta:release:Code-Review+2: Elod Illes <elod.illes@est.tech>
      meta:release:Workflow+1: Elod Illes <elod.illes@est.tech>
      4c736170
  4. 19 Nov, 2021 1 commit
    • Jiri Podivin's avatar
      Removing modindex link from docs · a04a48f4
      Jiri Podivin authored
      
      
      The global module documentation is no longer being generated
      and the link points to a non-existent document.
      
      The purpose of global module documentation is now fulfilled by
      the automatically generated class, and function level reference
      documents which are linked properly.
      
      As such there is no need to keep the link around, or to
      reestablish module level documentation.
      
      Signed-off-by: default avatarJiri Podivin <jpodivin@redhat.com>
      Change-Id: I05e5144a36f33aa5feb996964d1a098b1716cf6a
      a04a48f4
  5. 29 Sep, 2021 1 commit
  6. 20 Sep, 2021 1 commit
  7. 25 Aug, 2021 3 commits
    • Thomas Goirand's avatar
      a2aa33ff
    • Thomas Goirand's avatar
      New upstream release. · a1155b4e
      Thomas Goirand authored
      a1155b4e
    • Thomas Goirand's avatar
      Merge tag '3.9.0' into debian/xena · 89561b87
      Thomas Goirand authored
      cliff 3.9.0 release
      
      meta:version: 3.9.0
      meta:diff-start: -
      meta:series: xena
      meta:release-type: release
      meta:pypi: yes
      meta:first: no
      meta:release:Author: Hervé Beraud <hberaud@redhat.com>
      meta:release:Commit: Hervé Beraud <hberaud@redhat.com>
      meta:release:Change-Id: I044ea7a8cd9de0e6b467a8c1c751555cb4961569
      meta:release:Code-Review+2: Hervé Beraud <herveberaud.pro@gmail.com>
      meta:release:Workflow+1: Hervé Beraud <herveberaud.pro@gmail.com>
      89561b87
  8. 24 Aug, 2021 2 commits
    • Thomas Goirand's avatar
      Now packaging 3.8.0 · 6103bbcb
      Thomas Goirand authored
      6103bbcb
    • Thomas Goirand's avatar
      Merge tag '3.8.0' into debian/xena · d9100068
      Thomas Goirand authored
      cliff 3.8.0 release
      
      meta:version: 3.8.0
      meta:diff-start: -
      meta:series: xena
      meta:release-type: release
      meta:pypi: yes
      meta:first: yes
      meta:release:Author: Hervé Beraud <hberaud@redhat.com>
      meta:release:Commit: Hervé Beraud <hberaud@redhat.com>
      meta:release:Change-Id: I8d3c3c932dc5c91f5e0476e14030124307991ae2
      meta:release:Code-Review+1: Artem Goncharov <artem.goncharov@gmail.com>
      meta:release:Code-Review+2: Thierry Carrez <thierry@openstack.org>
      meta:release:Code-Review+2: Hervé Beraud <herveberaud.pro@gmail.com>
      meta:release:Workflow+1: Hervé Beraud <herveberaud.pro@gmail.com>
      d9100068
  9. 16 Aug, 2021 1 commit
  10. 06 Aug, 2021 2 commits
  11. 20 Jul, 2021 1 commit
  12. 13 Jul, 2021 2 commits
    • Zane Bitter's avatar
      Automatically page interactive root help output · 4e7c882c
      Zane Bitter authored
      The previous commit already ensures that the interactive help for
      individual commands is sent to a pager. This does the same for the
      'help' command with no arguments.
      
      Change-Id: If5e38421d21e09f88a572dbb508b1997381bdb87
      4e7c882c
    • Zane Bitter's avatar
      Colourise and automatically page help output · 8fa916e9
      Zane Bitter authored
      Using the autopage library we can automatically send the help output to
      a pager (less, by default), git-style. The pager is configured to not
      reset the terminal on exit, avoiding the problem when piping to less
      manually that the help text you want to refer to disappears off the
      screen when you go to use it. The pager is only invoked when the output
      is to the terminal.
      
      Since we invoke the pager, we can ensure that it is correctly set up to
      interpret ANSI escape codes, so it is safe to use colour to make the
      output easier to read. The autopage library provides light styling of
      the default argparse help output, and some additional colour
      highlighting is added here for the command list (which is generated by
      cliff, not using argparse's formatting code).
      
      Change-Id: If9e1aa5166da32c58cc0fa617f4f81eaa9b2c470
      Depends-On: https://review.opendev.org/c/openstack/requirements/+/799343
      8fa916e9
  13. 15 Jun, 2021 1 commit
  14. 07 Jun, 2021 1 commit
    • Zane Bitter's avatar
      Handle SIGPIPE exit gracefully · 392f3b2e
      Zane Bitter authored
      If we are piping output to a command that exits before the entire
      output is written (e.g. "head") then we will receive a BrokenPipeError.
      This is expected and we should react by exiting gracefully, setting an
      appropriate return code (128 + SIGPIPE).
      
      Change-Id: I0d60e44450da1f48dbd8f459549da80fda69aad5
      392f3b2e
  15. 04 Jun, 2021 1 commit
    • matbu's avatar
      Add conflict_handler parameter as attribut in Command class · 452fff3a
      matbu authored
      Adding conflict_handler as attribut in the Command class in order to be
      able to take control of this parameter and change to different behavior
      that argparse is handling: error / resolve / ignore.
      
      Callers will be able to override it and get a proper Parser object.
      
      Change-Id: I327ece99a04bc8b2ebfa554dea643b1f2a456336
      452fff3a
  16. 14 May, 2021 1 commit
  17. 13 May, 2021 2 commits
  18. 20 Apr, 2021 1 commit
  19. 19 Mar, 2021 1 commit
  20. 08 Mar, 2021 3 commits
    • Thomas Goirand's avatar
      Fixed (build-)depends for this release. · bc2f50fd
      Thomas Goirand authored
      bc2f50fd
    • Thomas Goirand's avatar
      Now packaging 3.7.0 · d83e2d41
      Thomas Goirand authored
      d83e2d41
    • Thomas Goirand's avatar
      Merge tag '3.7.0' into debian/wallaby · c8f9fd6a
      Thomas Goirand authored
      cliff 3.7.0 release
      
      meta:version: 3.7.0
      meta:diff-start: -
      meta:series: wallaby
      meta:release-type: release
      meta:pypi: yes
      meta:first: no
      meta:release:Author: Stephen Finucane <sfinucan@redhat.com>
      meta:release:Commit: Stephen Finucane <sfinucan@redhat.com>
      meta:release:Change-Id: I05a1700df84cf70fee868b3e7314940a8d54a1bd
      meta:release:Code-Review+1: Artem Goncharov <artem.goncharov@gmail.com>
      meta:release:Code-Review+1: Daniel Bengtsson <dbengt@redhat.com>
      meta:release:Code-Review+2: Hervé Beraud <hberaud@redhat.com>
      meta:release:Code-Review+2: Thierry Carrez <thierry@openstack.org>
      meta:release:Workflow+1: Thierry Carrez <thierry@openstack.org>
      c8f9fd6a
  21. 11 Feb, 2021 1 commit
  22. 10 Feb, 2021 2 commits
  23. 09 Feb, 2021 2 commits
  24. 29 Jan, 2021 3 commits
    • Stephen Finucane's avatar
      Add '--sort-ascending', '--sort-descending' parameters · 7798cb2e
      Stephen Finucane authored
      
      
      Allow users to reverse sorting direction.
      
      Change-Id: Iecd539139c5a7ce4abaaee2ff5632a2459437d51
      Signed-off-by: default avatarStephen Finucane <sfinucan@redhat.com>
      7798cb2e
    • Stephen Finucane's avatar
      Make 'FormattableColumn' comparable · c1c99104
      Stephen Finucane authored
      
      
      Implement the '__lt__' magic method, thus providing the minimal set of
      rich comparison methods necessary to support sorting. This will allows
      users using these formatters for the more basic types (i.e. not dicts)
      to sort their output using the standard '--sort-column' option.
      
      Change-Id: I08e1f1bc75fa6452f19dfb9d221c1daec194d58d
      Signed-off-by: default avatarStephen Finucane <sfinucan@redhat.com>
      c1c99104
    • Stephen Finucane's avatar
      Handle null values when sorting · 4f45f9a3
      Stephen Finucane authored
      One unfortunate change (or fortunate, depending on how you look at
      types) in Python 3 is the inability to sort iterables of different
      types. For example:
      
        >>> x = ['foo', 'bar', None, 'qux']
        >>> sorted(x)
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        TypeError: '<' not supported between instances of 'NoneType' and 'str'
      
      Fortunately, we can take advantage of the fact that by providing a
      function for the 'key' that returns a tuple, we can sort on multiple
      conditions. In this case, "when the first key returns that two elements
      are equal, the second key is used to compare." [1] We can use this to
      first separate the values by whether they are None or not, punting those
      that are not to the end, before sorting the non-None values normally.
      For example:
      
        >>> x = ['foo', 'bar', None, 'qux']
        >>> sorted(x, key=lambda k: (k is None, k))
        ['bar', 'foo', 'qux', None]
      
      We were already using this feature implicitly through our use of
      'operator.itemgetter(*indexes)', which will return a tuple if there is
      more than one item in 'indexes', and now we simply make that explicit,
      fixing the case where we're attempting to compare a comparable type
      with None. For all other cases, such as comparing a value that isn't
      comparable, we surround things with a try-catch and a debug logging
      statement to allow things to continue.
      
      Note that we could optimize what we're done further by building a key
      value that covers all indexes, rather than using a for loop to do so.
      For example:
      
        >>> x = [('baz', 2), (None, 0), ('bar', 3), ('baz', 4), ('qux', 0)]
        >>> sorted(x, key=lambda k: list(
        ...     itertools.chain((k[i] is None, k[i]) for i in (0, 1)))
        ... )
        [('bar', 3), ('baz', 2), ('baz', 4), ('qux', 0), (None, 0)]
      
      However, this would be harder to grok and would also mean we're unable
      to handle exceptions on a single column where e.g. there are mixed types
      or types that are not comparable while still sorting on the other
      columns. Perhaps this would be desirable for some users, but sorting on
      a best-effort basis does seem wiser and generally more user friendly.
      Anyone that wants to sort on such columns should ensure their types are
      comparable or implement their own sorting implementation.
      
      [1] https://www.kite.com/python/answers/how-to-sort-by-two-keys-in-python
      
      
      
      Change-Id: I4803051a6dd05c143a15923254af97e32cd39693
      Signed-off-by: default avatarStephen Finucane <sfinucan@redhat.com>
      Story: 2008456
      Task: 41466
      4f45f9a3
  25. 28 Jan, 2021 1 commit
  26. 27 Jan, 2021 1 commit