This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=69b98260c76342a72f3c819961a33b9a14e899ab

commit 69b98260c76342a72f3c819961a33b9a14e899ab
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Nov 16 00:37:17 2019 +0100

    Dpkg::Version: Remove deprecation warning from semantic change in bool 
overload
---
 debian/changelog         |  2 ++
 scripts/Dpkg/Version.pm  | 13 ++++++-------
 scripts/t/Dpkg_Version.t |  6 ------
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 93c9c2f08..a87e747ca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -65,6 +65,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
       $diff_ignore_default_regexp.
     - Dpkg::Substvars: Remove obsolete no_warn() method.
     - Dpkg::Index: Change default value for unique_tuple_key to 1.
+    - Dpkg::Version: Remove deprecation warning from semantic change in
+      bool overload.
   * Documentation:
     - man: Fix uncommon wording constructs.
     - man: Use a minus sign for a literal string.
diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm
index 2900e5790..51d46c543 100644
--- a/scripts/Dpkg/Version.pm
+++ b/scripts/Dpkg/Version.pm
@@ -22,7 +22,7 @@ use strict;
 use warnings;
 use warnings::register qw(semantic_change::overload::bool);
 
-our $VERSION = '1.02';
+our $VERSION = '1.03';
 our @EXPORT = qw(
     version_compare
     version_compare_relation
@@ -56,12 +56,7 @@ use overload
     '<=>' => \&_comparison,
     'cmp' => \&_comparison,
     '""'  => sub { return $_[0]->as_string(); },
-    'bool' => sub {
-        warnings::warnif('Dpkg::Version::semantic_change::overload::bool',
-                         'Dpkg::Version bool overload behavior has changed ' .
-                         'back to be an is_valid() alias');
-        return $_[0]->is_valid();
-    },
+    'bool' => sub { return $_[0]->is_valid(); },
     'fallback' => 1;
 
 =encoding utf8
@@ -473,6 +468,10 @@ sub version_check($) {
 
 =head1 CHANGES
 
+=head2 Version 1.03 (dpkg 1.20.0)
+
+Remove deprecation warning from semantic change in 1.02.
+
 =head2 Version 1.02 (dpkg 1.19.1)
 
 Semantic change: bool evaluation semantics restored to their original behavior.
diff --git a/scripts/t/Dpkg_Version.t b/scripts/t/Dpkg_Version.t
index 34ab1772f..69f0fecf0 100644
--- a/scripts/t/Dpkg_Version.t
+++ b/scripts/t/Dpkg_Version.t
@@ -85,12 +85,6 @@ my $truth = {
     },
 };
 
-# XXX: Some of the tests check the bool overload, which currently emits
-# the semantic_change warning. Disable it until we stop emitting the
-# warning in dpkg 1.20.x.
-## no critic (TestingAndDebugging::ProhibitNoWarnings)
-no warnings(qw(Dpkg::Version::semantic_change::overload::bool));
-
 # Handling of empty/invalid versions
 my $empty = Dpkg::Version->new('');
 ok($empty eq '', "Dpkg::Version->new('') eq ''");

-- 
Dpkg.Org's dpkg

Reply via email to