Hello community,

here is the log from the commit of package perl-Redis for openSUSE:Factory 
checked in at 2016-09-05 21:21:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Redis (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Redis.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Redis"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Redis/perl-Redis.changes    2016-02-17 
12:20:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Redis.new/perl-Redis.changes       
2016-09-05 21:22:42.000000000 +0200
@@ -1,0 +2,20 @@
+Wed Aug 24 05:58:31 UTC 2016 - [email protected]
+
+- updated to 1.991
+   see /usr/share/doc/packages/perl-Redis/Changes
+
+  1.991     2016-08-23 16:04:29CEST+0200 Europe/Paris
+    * release as a normal release after successful testing of the dev releases
+  
+  1.990_02  2016-08-06 20:30:30CEST+0200 Europe/Paris
+     * move reconnection test in reconnect test file to avoid test issues
+       (skip_all but still run some tests)
+  
+  1.990_01  2016-08-05 17:17:28CEST+0200 Europe/Paris
+     * fix issue #122: don't attempt to close an already closed or undefined 
socket
+     * fix issue #120 and #111: don't depend on locales for matching error 
messages
+     * fix issue #118: spelling mistake
+     * fix issue #116: forbid continuing using socket after a read timeout
+     * fix issue #115: Unexpected error condition 54/freebsd
+
+-------------------------------------------------------------------

Old:
----
  Redis-1.982.tar.gz

New:
----
  Redis-1.991.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Redis.spec ++++++
--- /var/tmp/diff_new_pack.xOVC07/_old  2016-09-05 21:22:46.000000000 +0200
+++ /var/tmp/diff_new_pack.xOVC07/_new  2016-09-05 21:22:46.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Redis
-Version:        1.982
+Version:        1.991
 Release:        0
 %define cpan_name Redis
 Summary:        Perl binding for Redis database

++++++ Redis-1.982.tar.gz -> Redis-1.991.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/Build.PL new/Redis-1.991/Build.PL
--- old/Redis-1.982/Build.PL    2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/Build.PL    2016-08-23 16:04:36.000000000 +0200
@@ -1,3 +1,3 @@
-use 5.008;
+use 5.006;
 use Module::Build::Tiny 0.039;
 Build_PL();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/Changes new/Redis-1.991/Changes
--- old/Redis-1.982/Changes     2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/Changes     2016-08-23 16:04:36.000000000 +0200
@@ -1,5 +1,19 @@
 Revision history for Redis
 
+1.991     2016-08-23 16:04:29CEST+0200 Europe/Paris
+  * release as a normal release after successful testing of the dev releases
+
+1.990_02  2016-08-06 20:30:30CEST+0200 Europe/Paris
+   * move reconnection test in reconnect test file to avoid test issues
+     (skip_all but still run some tests)
+
+1.990_01  2016-08-05 17:17:28CEST+0200 Europe/Paris
+   * fix issue #122: don't attempt to close an already closed or undefined 
socket
+   * fix issue #120 and #111: don't depend on locales for matching error 
messages
+   * fix issue #118: spelling mistake
+   * fix issue #116: forbid continuing using socket after a read timeout
+   * fix issue #115: Unexpected error condition 54/freebsd
+
 1.982     2016-02-11 09:02:40CET+0100 Europe/Paris
    * fix issue #117: fix backward compatibility with 5.8
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/META.json new/Redis-1.991/META.json
--- old/Redis-1.982/META.json   2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/META.json   2016-08-23 16:04:36.000000000 +0200
@@ -32,7 +32,7 @@
          "requires" : {
             "IO::Socket::Timeout" : "0.29",
             "Try::Tiny" : "0",
-            "perl" : "5.008"
+            "perl" : "5.006"
          }
       },
       "test" : {
@@ -65,6 +65,6 @@
          "web" : "https://github.com/PerlRedis/perl-redis";
       }
    },
-   "version" : "1.982"
+   "version" : "1.991"
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/META.yml new/Redis-1.991/META.yml
--- old/Redis-1.982/META.yml    2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/META.yml    2016-08-23 16:04:36.000000000 +0200
@@ -30,9 +30,9 @@
 requires:
   IO::Socket::Timeout: 0.29
   Try::Tiny: 0
-  perl: 5.008
+  perl: 5.006
 resources:
   bugtracker: https://github.com/PerlRedis/perl-redis/issues
   homepage: https://github.com/PerlRedis/perl-redis
   repository: https://github.com/PerlRedis/perl-redis.git
-version: 1.982
+version: 1.991
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/Makefile.PL new/Redis-1.991/Makefile.PL
--- old/Redis-1.982/Makefile.PL 2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/Makefile.PL 2016-08-23 16:04:36.000000000 +0200
@@ -68,7 +68,7 @@
 }
 }
 
-use 5.008;
+use 5.006;
 use ExtUtils::MakeMaker 6.63_03;
 
 my %WriteMakefileArgs = (
@@ -84,7 +84,7 @@
   "DISTNAME" => "Redis",
   "EXE_FILES" => [],
   "LICENSE" => "artistic_2",
-  "MIN_PERL_VERSION" => "5.008",
+  "MIN_PERL_VERSION" => "5.006",
   "NAME" => "Redis",
   "PREREQ_PM" => {
     "IO::Socket::Timeout" => "0.29",
@@ -105,7 +105,7 @@
     "Test::SharedFork" => 0,
     "Test::TCP" => "1.19"
   },
-  "VERSION" => "1.982",
+  "VERSION" => "1.991",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/README new/Redis-1.991/README
--- old/Redis-1.982/README      2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/README      2016-08-23 16:04:36.000000000 +0200
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Redis,
-version 1.982:
+version 1.991:
 
   Perl binding for Redis database
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/dist.ini new/Redis-1.991/dist.ini
--- old/Redis-1.982/dist.ini    2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/dist.ini    2016-08-23 16:04:36.000000000 +0200
@@ -6,9 +6,10 @@
 copyright_year   = 2015
 
 ; -- version from git
-; version = 1.974
-[Git::NextVersion]     
-first_version = 1.962
+version = 1.991
+
+; [Git::NextVersion]   
+; first_version = 1.962
 
 [MetaJSON]
 [MetaResources]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/lib/Redis/Hash.pm 
new/Redis-1.991/lib/Redis/Hash.pm
--- old/Redis-1.982/lib/Redis/Hash.pm   2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/lib/Redis/Hash.pm   2016-08-23 16:04:36.000000000 +0200
@@ -8,7 +8,7 @@
 #   The Artistic License 2.0 (GPL Compatible)
 #
 package Redis::Hash;
-$Redis::Hash::VERSION = '1.982';
+$Redis::Hash::VERSION = '1.991';
 # ABSTRACT: tie Perl hashes to Redis hashes
 # VERSION
 # AUTHORITY
@@ -86,7 +86,7 @@
 
 =head1 VERSION
 
-version 1.982
+version 1.991
 
 =head1 DESCRIPTION
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/lib/Redis/List.pm 
new/Redis-1.991/lib/Redis/List.pm
--- old/Redis-1.982/lib/Redis/List.pm   2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/lib/Redis/List.pm   2016-08-23 16:04:36.000000000 +0200
@@ -8,7 +8,7 @@
 #   The Artistic License 2.0 (GPL Compatible)
 #
 package Redis::List;
-$Redis::List::VERSION = '1.982';
+$Redis::List::VERSION = '1.991';
 # ABSTRACT: tie Perl arrays to Redis lists
 # VERSION
 # AUTHORITY
@@ -106,7 +106,7 @@
 
 =head1 VERSION
 
-version 1.982
+version 1.991
 
 =head1 SYNOPSYS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/lib/Redis/Sentinel.pm 
new/Redis-1.991/lib/Redis/Sentinel.pm
--- old/Redis-1.982/lib/Redis/Sentinel.pm       2016-02-11 09:02:45.000000000 
+0100
+++ new/Redis-1.991/lib/Redis/Sentinel.pm       2016-08-23 16:04:36.000000000 
+0200
@@ -8,7 +8,7 @@
 #   The Artistic License 2.0 (GPL Compatible)
 #
 package Redis::Sentinel;
-$Redis::Sentinel::VERSION = '1.982';
+$Redis::Sentinel::VERSION = '1.991';
 # ABSTRACT: Redis Sentinel interface
 
 use warnings;
@@ -54,7 +54,7 @@
 
 =head1 VERSION
 
-version 1.982
+version 1.991
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/lib/Redis.pm new/Redis-1.991/lib/Redis.pm
--- old/Redis-1.982/lib/Redis.pm        2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/lib/Redis.pm        2016-08-23 16:04:36.000000000 +0200
@@ -8,7 +8,7 @@
 #   The Artistic License 2.0 (GPL Compatible)
 #
 package Redis;
-$Redis::VERSION = '1.982';
+$Redis::VERSION = '1.991';
 # ABSTRACT: Perl binding for Redis database
 # VERSION
 # AUTHORITY
@@ -34,6 +34,7 @@
 use constant EWOULDBLOCK => eval {Errno::EWOULDBLOCK} || -1E9;
 use constant EAGAIN      => eval {Errno::EAGAIN} || -1E9;
 use constant EINTR       => eval {Errno::EINTR} || -1E9;
+use constant ECONNRESET  => eval {Errno::ECONNRESET} || -1E9;
 use constant BUFSIZE     => 4096;
 
 sub _maybe_enable_timeouts {
@@ -329,7 +330,7 @@
     $self->__send_command('QUIT');
   };
 
-  $self->__close_sock() if $self->{sock};
+  $self->__close_sock();
 
   return 1;
 }
@@ -620,8 +621,9 @@
   if (exists $self->{password}) {
     try { $self->auth($self->{password}) }
     catch {
+      my $error = $_;
       $self->{reconnect} = 0;
-      croak("Redis server refused password");
+      croak('Redis server authentication error: ' . $error);
     };
   }
 
@@ -635,6 +637,7 @@
   $self->{__buf} = '';
   delete $self->{__inside_watch};
   delete $self->{__inside_transaction};
+  defined $self->{sock} or return 1;
   return close(delete $self->{sock});
 }
 
@@ -777,8 +780,12 @@
   my $sock = $self->{sock};
 
   my $data = $self->__read_line_raw;
-  croak("Error while reading from Redis server: $!")
-    unless defined $data;
+  if (! defined $data) {
+      # In case the caller catches the exception and wants to persist on using
+      # the redis connection, let's forbid that.
+      $self->__close_sock();
+      croak("Error while reading from Redis server: $!")
+  }
 
   chomp $data;
   warn "[RECV RAW] '$data'" if $self->{debug};
@@ -868,6 +875,9 @@
       ## Keep going if nothing there, but socket is alive
       return 0 if $err and ($err == EWOULDBLOCK or $err == EAGAIN);
 
+      ## on freebsd, if we got ECONNRESET, it's a timeout from the other side
+      return 0 if ($err && $err == ECONNRESET && $^O eq 'freebsd');
+
       ## result is undef but err is 0? should never happen
       return if $err == 0;
 
@@ -905,7 +915,7 @@
 
 =head1 VERSION
 
-version 1.982
+version 1.991
 
 =head1 SYNOPSIS
 
@@ -933,7 +943,7 @@
     ## Die if you can't after that
     my $redis = Redis->new(reconnect => 60, every => 1_000_000);
 
-    ## Try each 100ms upto 2 seconds (every is in microseconds)
+    ## Try each 100ms up to 2 seconds (every is in microseconds)
     my $redis = Redis->new(reconnect => 2, every => 100_000);
 
     ## Enable connection timeout (in seconds)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/t/07-reconnect.t 
new/Redis-1.991/t/07-reconnect.t
--- old/Redis-1.982/t/07-reconnect.t    2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/t/07-reconnect.t    2016-08-23 16:04:36.000000000 +0200
@@ -183,6 +183,22 @@
   ok($r->set('reconnect' => 1), 'setting second key should not fail');
 };
 
+my ($c2, $srv2) = redis();
+END { $c2->() if $c2 }
+
+subtest 'Reconnection by read timeout discards pending commands' => sub {
+  ok(my $r = Redis->new(server => $srv2, read_timeout => 1, reconnect => 1), 
'connected to our test redis-server');
+
+  ok($r->set(foo => 'bar'), 'set foo bar');
+
+  eval { $r->debug(sleep => 4) };
+  ok $@, 'sleep command is timeout';
+
+  diag 'waiting for sleep command';
+  sleep 4;
+  is($r->get('foo'), 'bar', 'the value of key foo is bar');
+};
+
 done_testing();
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Redis-1.982/t/11-timeout.t 
new/Redis-1.991/t/11-timeout.t
--- old/Redis-1.982/t/11-timeout.t      2016-02-11 09:02:45.000000000 +0100
+++ new/Redis-1.991/t/11-timeout.t      2016-08-23 16:04:36.000000000 +0200
@@ -15,6 +15,7 @@
 use Test::Fatal;
 use Redis;
 use lib 't/tlib';
+use Test::SpawnRedisServer;
 use Test::SpawnRedisTimeoutServer;
 use Errno qw(ETIMEDOUT EWOULDBLOCK);
 use POSIX qw(strerror);
@@ -27,18 +28,16 @@
     my $redis = Redis->new(server => '127.0.0.1:' . $server->port, 
read_timeout => 1);
     ok($redis);
     my $res = $redis->get('foo');;
-    is $res, 42;
+    is $res, 42, "the code didn't died, as expected";
 };
 
 subtest "server doesn't replies quickly enough" => sub {
     my $server = Test::SpawnRedisTimeoutServer::create_server_with_timeout(10);
     my $redis = Redis->new(server => '127.0.0.1:' . $server->port, 
read_timeout => 1);
     ok($redis);
-    my $msg1 = "Error while reading from Redis server: " . strerror(ETIMEDOUT);
-    my $msg2 = "Error while reading from Redis server: " . 
strerror(EWOULDBLOCK);
     like(
          exception { $redis->get('foo'); },
-         qr/$msg1|$msg2/,
+         qr/Error while reading from Redis server:/,
          "the code died as expected",
         );
 };


Reply via email to