Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Mojo-Pg for openSUSE:Factory 
checked in at 2021-02-15 23:14:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojo-Pg (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojo-Pg"

Mon Feb 15 23:14:39 2021 rev:27 rq:871185 version:4.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojo-Pg/perl-Mojo-Pg.changes        
2021-01-05 18:13:24.947333368 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new.28504/perl-Mojo-Pg.changes     
2021-02-15 23:16:52.643447523 +0100
@@ -1,0 +2,9 @@
+Sun Feb  7 03:11:34 UTC 2021 - Tina M??ller <timueller+p...@suse.de>
+
+- updated to 4.24
+   see /usr/share/doc/packages/perl-Mojo-Pg/Changes
+
+  4.24  2021-01-27
+    - Fixed Mojolicious 8.72 support.
+
+-------------------------------------------------------------------

Old:
----
  Mojo-Pg-4.23.tar.gz

New:
----
  Mojo-Pg-4.24.tar.gz

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

Other differences:
------------------
++++++ perl-Mojo-Pg.spec ++++++
--- /var/tmp/diff_new_pack.s923A7/_old  2021-02-15 23:16:53.179448323 +0100
+++ /var/tmp/diff_new_pack.s923A7/_new  2021-02-15 23:16:53.179448323 +0100
@@ -18,7 +18,7 @@
 
 %define cpan_name Mojo-Pg
 Name:           perl-Mojo-Pg
-Version:        4.23
+Version:        4.24
 Release:        0
 Summary:        Wrapper around DBD::Pg for using PostgreSql with Mojolicious
 License:        Artistic-2.0

++++++ Mojo-Pg-4.23.tar.gz -> Mojo-Pg-4.24.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/Changes new/Mojo-Pg-4.24/Changes
--- old/Mojo-Pg-4.23/Changes    2020-12-20 15:31:45.000000000 +0100
+++ new/Mojo-Pg-4.24/Changes    2021-01-28 19:07:02.000000000 +0100
@@ -1,4 +1,7 @@
 
+4.24  2021-01-27
+  - Fixed Mojolicious 8.72 support.
+
 4.23  2020-12-20
   - Updated examples to use signatures.
   - Improved Mojo::Pg::PubSub to handle unknown notifications more gracefully.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/META.json new/Mojo-Pg-4.24/META.json
--- old/Mojo-Pg-4.23/META.json  2021-01-04 00:02:54.000000000 +0100
+++ new/Mojo-Pg-4.24/META.json  2021-02-06 17:11:33.000000000 +0100
@@ -56,10 +56,10 @@
          "web" : "https://github.com/mojolicious/mojo-pg";
       },
       "x_IRC" : {
-         "url" : "irc://irc.freenode.net/#mojo",
+         "url" : "irc://chat.freenode.net/#mojo",
          "web" : "https://webchat.freenode.net/#mojo";
       }
    },
-   "version" : "4.23",
-   "x_serialization_backend" : "JSON::PP version 4.05"
+   "version" : "4.24",
+   "x_serialization_backend" : "JSON::PP version 4.06"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/META.yml new/Mojo-Pg-4.24/META.yml
--- old/Mojo-Pg-4.23/META.yml   2021-01-04 00:02:53.000000000 +0100
+++ new/Mojo-Pg-4.24/META.yml   2021-02-06 17:11:32.000000000 +0100
@@ -26,11 +26,11 @@
   perl: '5.016'
 resources:
   IRC:
-    url: irc://irc.freenode.net/#mojo
+    url: irc://chat.freenode.net/#mojo
     web: https://webchat.freenode.net/#mojo
   bugtracker: https://github.com/mojolicious/mojo-pg/issues
   homepage: https://mojolicious.org
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/mojolicious/mojo-pg.git
-version: '4.23'
+version: '4.24'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/Makefile.PL new/Mojo-Pg-4.24/Makefile.PL
--- old/Mojo-Pg-4.23/Makefile.PL        2020-06-03 16:09:03.000000000 +0200
+++ new/Mojo-Pg-4.24/Makefile.PL        2021-01-17 15:58:13.000000000 +0100
@@ -14,9 +14,9 @@
   LICENSE      => 'artistic_2',
   META_MERGE   => {
     dynamic_config => 0,
-    'meta-spec'    => {version => 2},
+    'meta-spec'    => {version   => 2},
     no_index       => {directory => ['examples', 't']},
-    prereqs        => {runtime => {requires => {perl => '5.016'}}},
+    prereqs        => {runtime   => {requires => {perl => '5.016'}}},
     resources      => {
       bugtracker => {web => 'https://github.com/mojolicious/mojo-pg/issues'},
       homepage   => 'https://mojolicious.org',
@@ -26,7 +26,7 @@
         url  => 'https://github.com/mojolicious/mojo-pg.git',
         web  => 'https://github.com/mojolicious/mojo-pg',
       },
-      x_IRC => {url => 'irc://irc.freenode.net/#mojo', web => 
'https://webchat.freenode.net/#mojo'}
+      x_IRC => {url => 'irc://chat.freenode.net/#mojo', web => 
'https://webchat.freenode.net/#mojo'}
     },
   },
   PREREQ_PM => {'DBD::Pg' => 3.007004, Mojolicious => '8.50', 'SQL::Abstract' 
=> '1.86'},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/lib/Mojo/Pg/PubSub.pm 
new/Mojo-Pg-4.24/lib/Mojo/Pg/PubSub.pm
--- old/Mojo-Pg-4.23/lib/Mojo/Pg/PubSub.pm      2020-12-20 15:30:48.000000000 
+0100
+++ new/Mojo-Pg-4.24/lib/Mojo/Pg/PubSub.pm      2021-01-28 19:05:16.000000000 
+0100
@@ -31,7 +31,7 @@
   return $db;
 }
 
-sub DESTROY { Mojo::Util::_global_destruction() or shift->reset }
+sub DESTROY { shift->reset unless ${^GLOBAL_PHASE} eq 'DESTRUCT' }
 
 sub json { ++$_[0]{json}{$_[1]} and return $_[0] }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/lib/Mojo/Pg.pm 
new/Mojo-Pg-4.24/lib/Mojo/Pg.pm
--- old/Mojo-Pg-4.23/lib/Mojo/Pg.pm     2020-12-10 17:59:51.000000000 +0100
+++ new/Mojo-Pg-4.24/lib/Mojo/Pg.pm     2021-01-17 15:58:18.000000000 +0100
@@ -22,7 +22,7 @@
 has [qw(password username)] => '';
 has pubsub                  => sub { Mojo::Pg::PubSub->new(pg => shift) };
 
-our $VERSION = '4.23';
+our $VERSION = '4.24';
 
 sub db { $_[0]->database_class->new(dbh => $_[0]->_prepare, pg => $_[0]) }
 
@@ -528,7 +528,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2014-2020, Sebastian Riedel and others.
+Copyright (C) 2014-2021, Sebastian Riedel and others.
 
 This program is free software, you can redistribute it and/or modify it under 
the terms of the Artistic License version
 2.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/lib/SQL/Abstract/Pg.pm 
new/Mojo-Pg-4.24/lib/SQL/Abstract/Pg.pm
--- old/Mojo-Pg-4.23/lib/SQL/Abstract/Pg.pm     2020-10-24 23:46:50.000000000 
+0200
+++ new/Mojo-Pg-4.24/lib/SQL/Abstract/Pg.pm     2021-01-17 15:58:19.000000000 
+0100
@@ -46,8 +46,8 @@
           push @conflict_bind, @set_bind;
         },
         ARRAYREFREF => sub { ($conflict_sql, @conflict_bind) = @$$conflict },
-        SCALARREF => sub { $conflict_sql = $$conflict },
-        UNDEF     => sub { $conflict_sql = $self->_sqlcase('do nothing') }
+        SCALARREF   => sub { $conflict_sql = $$conflict },
+        UNDEF       => sub { $conflict_sql = $self->_sqlcase('do nothing') }
       }
     );
     $sql .= $self->_sqlcase(' on conflict ') . $conflict_sql;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/t/crud.t new/Mojo-Pg-4.24/t/crud.t
--- old/Mojo-Pg-4.23/t/crud.t   2020-10-24 23:29:51.000000000 +0200
+++ new/Mojo-Pg-4.24/t/crud.t   2021-01-18 22:02:08.000000000 +0100
@@ -8,6 +8,7 @@
 
 use Mojo::IOLoop;
 use Mojo::Pg;
+use Mojo::Promise;
 
 # Isolate tests
 my $pg = Mojo::Pg->new($ENV{TEST_ONLINE})->search_path(['mojo_crud_test']);
@@ -47,14 +48,29 @@
 
 subtest 'Non-blocking read' => sub {
   my $result;
-  my $delay = Mojo::IOLoop->delay(sub { $result = pop->hashes->to_array });
-  $db->select('crud_test', $delay->begin);
-  $delay->wait;
+  my $promise = Mojo::Promise->new;
+  $db->select(
+    'crud_test',
+    sub {
+      $result = pop->hashes->to_array;
+      $promise->resolve;
+    }
+  );
+  $promise->wait;
   is_deeply $result, [{id => 1, name => 'foo'}, {id => 2, name => 'baz'}], 
'right structure';
-  $result = undef;
-  $delay  = Mojo::IOLoop->delay(sub { $result = pop->hashes->to_array });
-  $db->select('crud_test', undef, undef, {-desc => 'id'}, $delay->begin);
-  $delay->wait;
+
+  $result  = undef;
+  $promise = Mojo::Promise->new;
+  $db->select(
+    'crud_test',
+    undef, undef,
+    {-desc => 'id'},
+    sub {
+      $result = pop->hashes->to_array;
+      $promise->resolve;
+    }
+  );
+  $promise->wait;
   is_deeply $result, [{id => 2, name => 'baz'}, {id => 1, name => 'foo'}], 
'right structure';
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/t/database.t 
new/Mojo-Pg-4.24/t/database.t
--- old/Mojo-Pg-4.23/t/database.t       2020-10-26 13:39:08.000000000 +0100
+++ new/Mojo-Pg-4.24/t/database.t       2021-01-18 23:03:57.000000000 +0100
@@ -9,6 +9,7 @@
 use Mojo::IOLoop;
 use Mojo::JSON qw(true);
 use Mojo::Pg;
+use Mojo::Promise;
 use Scalar::Util qw(refaddr);
 
 my $pg = Mojo::Pg->new($ENV{TEST_ONLINE});
@@ -49,19 +50,14 @@
 
 subtest 'Concurrent non-blocking selects' => sub {
   my ($fail, $result);
-  Mojo::IOLoop->delay(
-    sub {
-      my $delay = shift;
-      $pg->db->query('SELECT 1 AS one' => $delay->begin);
-      $pg->db->query('SELECT 2 AS two' => $delay->begin);
-      $pg->db->query('SELECT 2 AS two' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err_one, $one, $err_two, $two, $err_again, $again) = @_;
-      $fail   = $err_one || $err_two || $err_again;
-      $result = [$one->hashes->first, $two->hashes->first, 
$again->hashes->first];
-    }
-  )->wait;
+  Mojo::Promise->all(
+    $pg->db->query_p('SELECT 1 AS one'),
+    $pg->db->query_p('SELECT 2 AS two'),
+    $pg->db->query_p('SELECT 2 AS two')
+  )->then(sub {
+    my ($one, $two, $three) = @_;
+    $result = [$one->[0]->hashes->first, $two->[0]->hashes->first, 
$three->[0]->hashes->first];
+  })->catch(sub { $fail = shift })->wait;
   ok !$fail, 'no error';
   is_deeply $result, [{one => 1}, {two => 2}, {two => 2}], 'right structure';
 };
@@ -69,29 +65,15 @@
 subtest 'Sequential non-blocking selects' => sub {
   my ($fail, $result);
   my $db = $pg->db;
-  Mojo::IOLoop->delay(
-    sub {
-      my $delay = shift;
-      $db->query('SELECT 1 AS one' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $one) = @_;
-      $fail = $err;
-      push @$result, $one->hashes->first;
-      $db->query('SELECT 1 AS one' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $again) = @_;
-      $fail ||= $err;
-      push @$result, $again->hashes->first;
-      $db->query('SELECT 2 AS two' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $two) = @_;
-      $fail ||= $err;
-      push @$result, $two->hashes->first;
-    }
-  )->wait;
+  $db->query_p('SELECT 1 AS one')->then(sub {
+    push @$result, shift->hashes->first;
+    return $db->query_p('SELECT 1 AS one');
+  })->then(sub {
+    push @$result, shift->hashes->first;
+    return $db->query_p('SELECT 2 AS two');
+  })->then(sub {
+    push @$result, shift->hashes->first;
+  })->catch(sub { $fail = shift })->wait;
   ok !$fail, 'no error';
   is_deeply $result, [{one => 1}, {one => 1}, {two => 2}], 'right structure';
 };
@@ -243,60 +225,57 @@
   ok !$db->is_listening, 'not listening';
   ok $db->listen('dbtest')->is_listening, 'listening';
   my $db2 = $pg->db->listen('dbtest');
-  my @notifications;
-  Mojo::IOLoop->delay(
-    sub {
-      my $delay = shift;
-      $db->once(notification => $delay->begin);
-      $db2->once(notification => $delay->begin);
-      Mojo::IOLoop->next_tick(sub { $db2->notify(dbtest => 'foo') });
-    },
-    sub {
-      my ($delay, $name, $pid, $payload, $name2, $pid2, $payload2) = @_;
-      push @notifications, [$name, $pid, $payload], [$name2, $pid2, $payload2];
-      $db->once(notification => $delay->begin);
-      $db2->unlisten('dbtest');
-      Mojo::IOLoop->next_tick(sub { $pg->db->notify('dbtest') });
-    },
-    sub {
-      my ($delay, $name, $pid, $payload) = @_;
-      push @notifications, [$name, $pid, $payload];
-      $db2->listen('dbtest2')->once(notification => $delay->begin);
-      Mojo::IOLoop->next_tick(sub { $db2->query("NOTIFY dbtest2, 'bar'") });
-    },
-    sub {
-      my ($delay, $name, $pid, $payload) = @_;
-      push @notifications, [$name, $pid, $payload];
-      $db2->once(notification => $delay->begin);
-      my $tx = $db2->begin;
-      Mojo::IOLoop->next_tick(sub {
-        $db2->notify(dbtest2 => 'baz');
-        $tx->commit;
-      });
-    },
-    sub {
-      my ($delay, $name, $pid, $payload) = @_;
-      push @notifications, [$name, $pid, $payload];
-    }
-  )->wait;
+
+  my @result;
+  my $promise = Mojo::Promise->new;
+  $db->once(notification => sub { shift; $promise->resolve(@_) });
+  my $promise2 = Mojo::Promise->new;
+  $db2->once(notification => sub { shift; $promise2->resolve(@_) });
+  Mojo::IOLoop->next_tick(sub { $db2->notify(dbtest => 'foo') });
+  Mojo::Promise->all($promise, $promise2)->then(sub {
+    my ($one, $two) = @_;
+    push @result, $one, $two;
+  })->wait;
+  is $result[0][0], 'dbtest', 'right channel name';
+  ok $result[0][1], 'has process id';
+  is $result[0][2], 'foo',    'right payload';
+  is $result[1][0], 'dbtest', 'right channel name';
+  ok $result[1][1], 'has process id';
+  is $result[1][2], 'foo', 'right payload';
+
+  @result  = ();
+  $promise = Mojo::Promise->new;
+  $db->once(notification => sub { shift; $promise->resolve(@_) });
+  Mojo::IOLoop->next_tick(sub { $pg->db->notify('dbtest') });
+  $promise->then(sub { push @result, [@_] })->wait;
+  is $result[0][0], 'dbtest', 'right channel name';
+  ok $result[0][1], 'has process id';
+  is $result[0][2], '', 'no payload';
+
+  @result  = ();
+  $promise = Mojo::Promise->new;
+  $db2->listen('dbtest2')->once(notification => sub { shift; 
$promise->resolve(@_) });
+  Mojo::IOLoop->next_tick(sub { $db2->query("NOTIFY dbtest2, 'bar'") });
+  $promise->then(sub { push @result, [@_] })->wait;
+  is $result[0][0], 'dbtest2', 'right channel name';
+  ok $result[0][1], 'has process id';
+  is $result[0][2], 'bar', 'no payload';
+
+  @result  = ();
+  $promise = Mojo::Promise->new;
+  $db2->once(notification => sub { shift; $promise->resolve(@_) });
+  my $tx = $db2->begin;
+  Mojo::IOLoop->next_tick(sub {
+    $db2->notify(dbtest2 => 'baz');
+    $tx->commit;
+  });
+  $promise->then(sub { push @result, [@_] })->wait;
+  is $result[0][0], 'dbtest2', 'right channel name';
+  ok $result[0][1], 'has process id';
+  is $result[0][2], 'baz', 'no payload';
+
   ok !$db->unlisten('dbtest')->is_listening, 'not listening';
   ok !$db2->unlisten('*')->is_listening,     'not listening';
-  is $notifications[0][0], 'dbtest', 'right channel name';
-  ok $notifications[0][1], 'has process id';
-  is $notifications[0][2], 'foo',    'right payload';
-  is $notifications[1][0], 'dbtest', 'right channel name';
-  ok $notifications[1][1], 'has process id';
-  is $notifications[1][2], 'foo',    'right payload';
-  is $notifications[2][0], 'dbtest', 'right channel name';
-  ok $notifications[2][1], 'has process id';
-  is $notifications[2][2], '',        'no payload';
-  is $notifications[3][0], 'dbtest2', 'right channel name';
-  ok $notifications[3][1], 'has process id';
-  is $notifications[3][2], 'bar',     'no payload';
-  is $notifications[4][0], 'dbtest2', 'right channel name';
-  ok $notifications[4][1], 'has process id';
-  is $notifications[4][2], 'baz', 'no payload';
-  is $notifications[5], undef, 'no more notifications';
 };
 
 subtest 'Stop listening for all notifications' => sub {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.23/t/results.t new/Mojo-Pg-4.24/t/results.t
--- old/Mojo-Pg-4.23/t/results.t        2020-10-24 23:29:50.000000000 +0200
+++ new/Mojo-Pg-4.24/t/results.t        2021-01-18 22:07:34.000000000 +0100
@@ -8,6 +8,7 @@
 
 use DBD::Pg qw(:pg_types);
 use Mojo::Pg;
+use Mojo::Promise;
 use Mojo::Util qw(encode);
 
 package MojoPgTest::Database;
@@ -93,31 +94,20 @@
 
 subtest 'Non-blocking query where not all results have been fetched' => sub {
   my ($fail, $result);
-  Mojo::IOLoop->delay(
-    sub {
-      my $delay = shift;
-      $db->query('SELECT name FROM results_test' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $results) = @_;
-      $fail = $err;
-      push @$result, $results->array;
-      $results->finish;
-      $db->query('SELECT name FROM results_test' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $results) = @_;
-      $fail ||= $err;
-      push @$result, $results->array_test;
-      $results->finish;
-      $db->query('SELECT name FROM results_test' => $delay->begin);
-    },
-    sub {
-      my ($delay, $err, $results) = @_;
-      $fail ||= $err;
-      push @$result, $results->array;
-    }
-  )->wait;
+  $db->query_p('SELECT name FROM results_test')->then(sub {
+    my $results = shift;
+    push @$result, $results->array;
+    $results->finish;
+    return $db->query_p('SELECT name FROM results_test');
+  })->then(sub {
+    my $results = shift;
+    push @$result, $results->array_test;
+    $results->finish;
+    return $db->query_p('SELECT name FROM results_test');
+  })->then(sub {
+    my $results = shift;
+    push @$result, $results->array;
+  })->catch(sub { $fail = shift })->wait;
   ok !$fail, 'no error';
   is_deeply $result, [['foo'], ['foo'], ['foo']], 'right structure';
 };

Reply via email to