Hello community,

here is the log from the commit of package perl-Future for openSUSE:Factory 
checked in at 2020-01-09 22:52:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Future (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Future.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Future"

Thu Jan  9 22:52:18 2020 rev:11 rq:762182 version:0.43

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Future/perl-Future.changes  2019-11-15 
00:36:33.287705809 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Future.new.6675/perl-Future.changes        
2020-01-09 22:52:57.782780400 +0100
@@ -1,0 +2,10 @@
+Wed Jan  8 03:07:39 UTC 2020 -  <[email protected]>
+
+- updated to 0.43
+   see /usr/share/doc/packages/perl-Future/Changes
+
+  0.43    2020-01-07
+          [CHANGES]
+           * Implement the Future::AsyncAwait::Awaitable API methods directly
+
+-------------------------------------------------------------------

Old:
----
  Future-0.42.tar.gz

New:
----
  Future-0.43.tar.gz

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

Other differences:
------------------
++++++ perl-Future.spec ++++++
--- /var/tmp/diff_new_pack.06NAAW/_old  2020-01-09 22:52:59.118781068 +0100
+++ /var/tmp/diff_new_pack.06NAAW/_new  2020-01-09 22:52:59.134781076 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Future
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Future
-Version:        0.42
+Version:        0.43
 Release:        0
 %define cpan_name Future
 Summary:        Represent an operation awaiting completion

++++++ Future-0.42.tar.gz -> Future-0.43.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/Changes new/Future-0.43/Changes
--- old/Future-0.42/Changes     2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/Changes     2020-01-07 20:05:42.000000000 +0100
@@ -1,5 +1,9 @@
 Revision history for Future
 
+0.43    2020-01-07
+        [CHANGES]
+         * Implement the Future::AsyncAwait::Awaitable API methods directly
+
 0.42    2019-11-12
         [CHANGES]
          * Added Future::Queue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/LICENSE new/Future-0.43/LICENSE
--- old/Future-0.42/LICENSE     2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/LICENSE     2020-01-07 20:05:42.000000000 +0100
@@ -1,4 +1,4 @@
-This software is copyright (c) 2019 by Paul Evans <[email protected]>.
+This software is copyright (c) 2020 by Paul Evans <[email protected]>.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2019 by Paul Evans <[email protected]>.
+This software is Copyright (c) 2020 by Paul Evans <[email protected]>.
 
 This is free software, licensed under:
 
@@ -272,7 +272,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2019 by Paul Evans <[email protected]>.
+This software is Copyright (c) 2020 by Paul Evans <[email protected]>.
 
 This is free software, licensed under:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/MANIFEST new/Future-0.43/MANIFEST
--- old/Future-0.42/MANIFEST    2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/MANIFEST    2020-01-07 20:05:42.000000000 +0100
@@ -41,4 +41,5 @@
 t/41queue.t
 t/50test-future.t
 t/51test-future-deferred.t
+t/52awaitable-future.t
 t/99pod.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/META.json new/Future-0.43/META.json
--- old/Future-0.42/META.json   2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/META.json   2020-01-07 20:05:42.000000000 +0100
@@ -39,31 +39,31 @@
    "provides" : {
       "Future" : {
          "file" : "lib/Future.pm",
-         "version" : "0.42"
+         "version" : "0.43"
       },
       "Future::Exception" : {
          "file" : "lib/Future/Exception.pm",
-         "version" : "0.42"
+         "version" : "0.43"
       },
       "Future::Mutex" : {
          "file" : "lib/Future/Mutex.pm",
-         "version" : "0.42"
+         "version" : "0.43"
       },
       "Future::Queue" : {
          "file" : "lib/Future/Queue.pm",
-         "version" : "0.42"
+         "version" : "0.43"
       },
       "Future::Utils" : {
          "file" : "lib/Future/Utils.pm",
-         "version" : "0.42"
+         "version" : "0.43"
       },
       "Test::Future" : {
          "file" : "lib/Test/Future.pm",
-         "version" : "0.42"
+         "version" : "0.43"
       },
       "Test::Future::Deferred" : {
          "file" : "lib/Test/Future/Deferred.pm",
-         "version" : "0.42"
+         "version" : "0.43"
       }
    },
    "release_status" : "stable",
@@ -73,6 +73,6 @@
       ],
       "x_IRC" : "irc://irc.perl.org/#io-async"
    },
-   "version" : "0.42",
+   "version" : "0.43",
    "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/META.yml new/Future-0.43/META.yml
--- old/Future-0.42/META.yml    2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/META.yml    2020-01-07 20:05:42.000000000 +0100
@@ -19,25 +19,25 @@
 provides:
   Future:
     file: lib/Future.pm
-    version: '0.42'
+    version: '0.43'
   Future::Exception:
     file: lib/Future/Exception.pm
-    version: '0.42'
+    version: '0.43'
   Future::Mutex:
     file: lib/Future/Mutex.pm
-    version: '0.42'
+    version: '0.43'
   Future::Queue:
     file: lib/Future/Queue.pm
-    version: '0.42'
+    version: '0.43'
   Future::Utils:
     file: lib/Future/Utils.pm
-    version: '0.42'
+    version: '0.43'
   Test::Future:
     file: lib/Test/Future.pm
-    version: '0.42'
+    version: '0.43'
   Test::Future::Deferred:
     file: lib/Test/Future/Deferred.pm
-    version: '0.42'
+    version: '0.43'
 requires:
   Carp: '1.25'
   Test::Builder::Module: '0'
@@ -46,5 +46,5 @@
 resources:
   IRC: irc://irc.perl.org/#io-async
   license: http://dev.perl.org/licenses/
-version: '0.42'
+version: '0.43'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/README new/Future-0.43/README
--- old/Future-0.42/README      2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/README      2020-01-07 20:05:42.000000000 +0100
@@ -154,6 +154,14 @@
     its failure is propagated to another Future instance (by a sequencing
     or converging method).
 
+ Future::AsyncAwait::Awaitable ROLE
+
+    Since version 0.43 this module provides the
+    Future::AsyncAwait::Awaitable API. Subclass authors should note that
+    several of the API methods are provided by special optimised internal
+    methods, which may require overriding in your subclass if your
+    internals are different from that of this module.
+
 CONSTRUCTORS
 
  new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/lib/Future/Exception.pm 
new/Future-0.43/lib/Future/Exception.pm
--- old/Future-0.42/lib/Future/Exception.pm     2019-11-12 12:12:30.000000000 
+0100
+++ new/Future-0.43/lib/Future/Exception.pm     2020-01-07 20:05:42.000000000 
+0100
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/lib/Future/Mutex.pm 
new/Future-0.43/lib/Future/Mutex.pm
--- old/Future-0.42/lib/Future/Mutex.pm 2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/lib/Future/Mutex.pm 2020-01-07 20:05:42.000000000 +0100
@@ -9,7 +9,7 @@
 use warnings;
 use 5.010;
 
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 use Future;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/lib/Future/Queue.pm 
new/Future-0.43/lib/Future/Queue.pm
--- old/Future-0.42/lib/Future/Queue.pm 2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/lib/Future/Queue.pm 2020-01-07 20:05:42.000000000 +0100
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/lib/Future/Utils.pm 
new/Future-0.43/lib/Future/Utils.pm
--- old/Future-0.42/lib/Future/Utils.pm 2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/lib/Future/Utils.pm 2020-01-07 20:05:42.000000000 +0100
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 use Exporter 'import';
 # Can't import the one from Exporter as it relies on package inheritance
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/lib/Future.pm 
new/Future-0.43/lib/Future.pm
--- old/Future-0.42/lib/Future.pm       2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/lib/Future.pm       2020-01-07 20:05:42.000000000 +0100
@@ -1,7 +1,7 @@
 #  You may distribute under the terms of either the GNU General Public License
 #  or the Artistic License (the same terms as Perl itself)
 #
-#  (C) Paul Evans, 2011-2018 -- [email protected]
+#  (C) Paul Evans, 2011-2020 -- [email protected]
 
 package Future;
 
@@ -9,7 +9,7 @@
 use warnings;
 no warnings 'recursion'; # Disable the "deep recursion" warning
 
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 use Carp qw(); # don't import croak
 use Scalar::Util qw( weaken blessed reftype );
@@ -180,6 +180,13 @@
 its failure is propagated to another C<Future> instance (by a sequencing or
 converging method).
 
+=head2 Future::AsyncAwait::Awaitable ROLE
+
+Since version 0.43 this module provides the L<Future::AsyncAwait::Awaitable>
+API. Subclass authors should note that several of the API methods are provided
+by special optimised internal methods, which may require overriding in your
+subclass if your internals are different from that of this module.
+
 =cut
 
 =head1 CONSTRUCTORS
@@ -263,6 +270,8 @@
    }, ( ref $proto || $proto );
 }
 
+*AWAIT_CLONE = sub { shift->new };  # We need to respect subclassing
+
 my $GLOBAL_END;
 END { $GLOBAL_END = 1; }
 
@@ -500,6 +509,8 @@
    return $self->{ready};
 }
 
+*AWAIT_IS_READY = \&is_ready;
+
 =head2 is_done
 
    $done = $future->is_done
@@ -546,6 +557,8 @@
    return $self->{cancelled};
 }
 
+*AWAIT_IS_CANCELLED = \&is_cancelled;
+
 =head2 state
 
    $str = $future->state
@@ -609,6 +622,10 @@
    return $self;
 }
 
+# TODO: For efficiency we can implement better versions of these as individual
+#  methods know which case is being invoked
+*AWAIT_NEW_DONE = *AWAIT_DONE = \&done;
+
 =head2 fail
 
    $future->fail( $exception, $category, @details )
@@ -663,6 +680,10 @@
    return $self;
 }
 
+# TODO: For efficiency we can implement better versions of these as individual
+#  methods know which case is being invoked
+*AWAIT_NEW_FAIL = *AWAIT_FAIL = \&fail;
+
 =head2 die
 
    $future->die( $message, $category, @details )
@@ -731,6 +752,18 @@
    return $self;
 }
 
+# An optimised version for Awaitable role
+sub AWAIT_ON_CANCEL
+{
+   my $self = shift;
+   my ( $f2 ) = @_;
+
+   push @{ $self->{on_cancel} }, $f2;
+   push @{ $f2->{revoke_when_ready} }, my $r = [ $self, 
\$self->{on_cancel}[-1] ];
+   weaken( $r->[0] );
+   weaken( $r->[1] );
+}
+
 sub _revoke_on_cancel
 {
    my $self = shift;
@@ -807,6 +840,14 @@
    return $self;
 }
 
+# An optimised version for Awaitable role
+sub AWAIT_ON_READY
+{
+   my $self = shift;
+   my ( $code ) = @_;
+   push @{ $self->{callbacks} }, [ CB_ALWAYS|CB_SELF, $self->wrap_cb( on_ready 
=> $code ) ];
+}
+
 =head2 get
 
    @result = $future->get
@@ -845,6 +886,10 @@
    return @{ $self->{result} };
 }
 
+# TODO: For efficiency we can implement a better version of this because it
+#   is only invoked on ready futures
+*AWAIT_GET = \&get;
+
 =head2 block_until_ready
 
    $f = $f->block_until_ready
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/lib/Test/Future/Deferred.pm 
new/Future-0.43/lib/Test/Future/Deferred.pm
--- old/Future-0.42/lib/Test/Future/Deferred.pm 2019-11-12 12:12:30.000000000 
+0100
+++ new/Future-0.43/lib/Test/Future/Deferred.pm 2020-01-07 20:05:42.000000000 
+0100
@@ -9,7 +9,7 @@
 use warnings;
 use base qw( Future );
 
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/lib/Test/Future.pm 
new/Future-0.43/lib/Test/Future.pm
--- old/Future-0.42/lib/Test/Future.pm  2019-11-12 12:12:30.000000000 +0100
+++ new/Future-0.43/lib/Test/Future.pm  2020-01-07 20:05:42.000000000 +0100
@@ -9,7 +9,7 @@
 use warnings;
 use base qw( Test::Builder::Module );
 
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 our @EXPORT = qw(
    no_pending_futures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Future-0.42/t/52awaitable-future.t 
new/Future-0.43/t/52awaitable-future.t
--- old/Future-0.42/t/52awaitable-future.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/Future-0.43/t/52awaitable-future.t      2020-01-07 20:05:42.000000000 
+0100
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval { require Test::Future::AsyncAwait::Awaitable } or
+   plan skip_all => "No Test::Future::AsyncAwait::Awaitable";
+
+use Future;
+
+Test::Future::AsyncAwait::Awaitable::test_awaitable( "Future",
+   class  => "Future",
+   cancel => sub { shift->cancel },
+);
+
+done_testing;


Reply via email to