#2655 readFullInheritance stops/jumps deprecation
Merged 3 years ago by tkopecek. Opened 3 years ago by tkopecek.
tkopecek/koji issue2606  into  master

file modified
+3 -1
@@ -22,7 +22,7 @@ 

  from six.moves import filter, map, range, zip

  

  import koji

- from koji.util import base64encode, md5_constructor, to_list

+ from koji.util import base64encode, md5_constructor, to_list, deprecated

  from koji_cli.lib import (

      TimeOption,

      _,
@@ -4127,6 +4127,7 @@ 

          opts['event'] = event['id']

  

      if options.jump:

+         deprecated("--jump option is deprecated and will be removed in 1.26")

          match = re.match(r'^(.*)/(.*)$', options.jump)

          if match:

              tag1 = session.getTagID(match.group(1))
@@ -4138,6 +4139,7 @@ 

              opts['jumps'][str(tag1)] = tag2

  

      if options.stop:

+         deprecated("--stop option is deprecated and will be removed in 1.26")

          tag1 = session.getTagID(options.stop)

          if not tag1:

              parser.error(_("Unknown tag: %s" % options.stop))

file modified
+8 -2
@@ -771,10 +771,16 @@ 

  

  def readFullInheritance(tag_id, event=None, reverse=False, stops=None, jumps=None):

      """Returns a list representing the full, ordered inheritance from tag"""

-     if stops is None:

+     if not stops:

          stops = {}

-     if jumps is None:

+     else:

+         logger.warning(

+             "readFullInheritance stops option is deprecated and will be removed in 1.26")

+     if not jumps:

          jumps = {}

+     else:

+         logger.warning(

+             "readFullInheritance jumps option is deprecated and will be removed in 1.26")

      order = []

      readFullInheritanceRecurse(tag_id, event, order, stops, {}, {}, 0, None, False, [], reverse,

                                 jumps)

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

3 years ago

rebased onto 938f0939cb2e314ae83a18a8f980f70b5b29aa8d

3 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

3 years ago

Metadata Update from @jcupova:
- Pull-request untagged with: testing-done

3 years ago

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

3 years ago

This seems to include an unrelated change in the commit

-    parser.add_option("--write", action="store_true",
-                      help=_("Also write the signed copies"))
+    parser.add_option("--write", action="store_true", help=SUPPRESS_HELP)

rebased onto cb3153ca1effb1a1ef052143760f1ddc3cac088a

3 years ago

rebased onto 5d8ea42

3 years ago

I've removed using util.deprecated in hub as it is misbehaving in multi-threading env. Also changed a bit a logic for displaying the message (due to empty dicts passed from getBuildInheritance.

Metadata Update from @jcupova:
- Pull-request tagged with: testing-ready

3 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

3 years ago

Commit 4e85f0f fixes this pull-request

Pull-Request has been merged by tkopecek

3 years ago