Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Mojolicious for 
openSUSE:Factory checked in at 2022-11-08 10:54:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojolicious.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojolicious"

Tue Nov  8 10:54:43 2022 rev:168 rq:1034335 version:9.28

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes        
2022-09-27 20:14:51.713949329 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Mojolicious.new.1597/perl-Mojolicious.changes  
    2022-11-08 10:54:51.337755842 +0100
@@ -1,0 +2,9 @@
+Sat Oct 15 03:07:52 UTC 2022 - Tina M??ller <timueller+p...@suse.de>
+
+- updated to 9.28
+   see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+  9.28  2022-09-12
+    - Fixed a bug where async/await use could result in unhandled promise 
warnings. (batman)
+
+-------------------------------------------------------------------

Old:
----
  Mojolicious-9.27.tar.gz

New:
----
  Mojolicious-9.28.tar.gz

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

Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.tCAuzO/_old  2022-11-08 10:54:52.109757658 +0100
+++ /var/tmp/diff_new_pack.tCAuzO/_new  2022-11-08 10:54:52.125757695 +0100
@@ -18,7 +18,7 @@
 
 %define cpan_name Mojolicious
 Name:           perl-Mojolicious
-Version:        9.27
+Version:        9.28
 Release:        0
 License:        Artistic-2.0
 Summary:        Real-time web framework

++++++ Mojolicious-9.27.tar.gz -> Mojolicious-9.28.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/Changes new/Mojolicious-9.28/Changes
--- old/Mojolicious-9.27/Changes        2022-09-10 20:26:59.000000000 +0200
+++ new/Mojolicious-9.28/Changes        2022-10-14 20:53:42.000000000 +0200
@@ -1,4 +1,7 @@
 
+9.28  2022-09-12
+  - Fixed a bug where async/await use could result in unhandled promise 
warnings. (batman)
+
 9.27  2022-09-10
   - Added support for static assets.
   - Added support for JSON and plain text exceptions.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/META.json 
new/Mojolicious-9.28/META.json
--- old/Mojolicious-9.27/META.json      2022-09-12 13:08:27.000000000 +0200
+++ new/Mojolicious-9.28/META.json      2022-10-14 20:54:49.000000000 +0200
@@ -64,6 +64,6 @@
          "web" : "https://web.libera.chat/#mojo";
       }
    },
-   "version" : "9.27",
+   "version" : "9.28",
    "x_serialization_backend" : "JSON::PP version 4.07"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/META.yml 
new/Mojolicious-9.28/META.yml
--- old/Mojolicious-9.27/META.yml       2022-09-12 13:08:26.000000000 +0200
+++ new/Mojolicious-9.28/META.yml       2022-10-14 20:54:49.000000000 +0200
@@ -35,5 +35,5 @@
   homepage: https://mojolicious.org
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/mojolicious/mojo.git
-version: '9.27'
+version: '9.28'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/README.md 
new/Mojolicious-9.28/README.md
--- old/Mojolicious-9.27/README.md      2022-06-20 20:24:12.000000000 +0200
+++ new/Mojolicious-9.28/README.md      2022-09-16 01:06:44.000000000 +0200
@@ -37,6 +37,7 @@
     * JSON and HTML/XML parser with CSS selector support.
   * Very clean, portable and object-oriented pure-Perl API with no hidden 
magic and no requirements besides Perl 5.26.0
     (versions as old as 5.16.0 can be used too, but may require additional 
CPAN modules to be installed)
+  * Also available for [JavaScript](https://mojojs.org).
   * Fresh code based upon years of experience developing 
[Catalyst](http://catalyst.perl.org), free and open source.
   * Hundreds of 3rd party 
[extensions](https://metacpan.org/requires/distribution/Mojolicious) and high 
quality spin-off
     projects like the [Minion](https://metacpan.org/pod/Minion) job queue.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/lib/Mojo/Message.pm 
new/Mojolicious-9.28/lib/Mojo/Message.pm
--- old/Mojolicious-9.27/lib/Mojo/Message.pm    2022-06-14 13:31:51.000000000 
+0200
+++ new/Mojolicious-9.28/lib/Mojo/Message.pm    2022-10-14 20:52:39.000000000 
+0200
@@ -267,6 +267,7 @@
     my ($filename) = $disposition =~ /[; ]filename="((?:\\"|[^"])*)"/;
     next if $upload && !defined $filename || !$upload && defined $filename;
     my ($name) = $disposition =~ /[; ]name="((?:\\"|[^;"])*)"/;
+    next if !defined $name;
     $part = $part->asset->slurp unless $upload;
 
     if ($charset) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/lib/Mojo/Promise.pm 
new/Mojolicious-9.28/lib/Mojo/Promise.pm
--- old/Mojolicious-9.27/lib/Mojo/Promise.pm    2022-06-14 13:31:51.000000000 
+0200
+++ new/Mojolicious-9.28/lib/Mojo/Promise.pm    2022-10-14 20:52:39.000000000 
+0200
@@ -11,11 +11,9 @@
 has ioloop => sub { Mojo::IOLoop->singleton }, weak => 1;
 
 sub AWAIT_CHAIN_CANCEL { }
-
-sub AWAIT_CLONE { _await('clone', @_) }
-
-sub AWAIT_DONE { shift->resolve(@_) }
-sub AWAIT_FAIL { shift->reject(@_) }
+sub AWAIT_CLONE        { _await('clone', @_) }
+sub AWAIT_DONE         { _settle_await(resolve => @_) }
+sub AWAIT_FAIL         { _settle_await(reject  => @_) }
 
 sub AWAIT_GET {
   my $self    = shift;
@@ -223,7 +221,6 @@
   if ($thenable && $status eq 'resolve') {
     $results[0]->then(sub { $self->resolve(@_); () }, sub { $self->reject(@_); 
() });
   }
-
   elsif (!$self->{results}) {
     @{$self}{qw(results status)} = (\@results, $status);
     $self->_defer;
@@ -232,6 +229,12 @@
   return $self;
 }
 
+sub _settle_await {
+  my ($status, $self) = (shift, shift);
+  @{$self}{qw(results status)} = ([@_], $status) if !$self->{results};
+  $self->_defer;
+}
+
 sub _then_cb {
   my ($new, $cb, $method, @results) = @_;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/lib/Mojolicious.pm 
new/Mojolicious-9.28/lib/Mojolicious.pm
--- old/Mojolicious-9.27/lib/Mojolicious.pm     2022-09-10 20:25:22.000000000 
+0200
+++ new/Mojolicious-9.28/lib/Mojolicious.pm     2022-09-12 13:10:01.000000000 
+0200
@@ -57,7 +57,7 @@
 has validator => sub { Mojolicious::Validator->new };
 
 our $CODENAME = 'Waffle';
-our $VERSION  = '9.27';
+our $VERSION  = '9.28';
 
 sub BUILD_DYNAMIC {
   my ($class, $method, $dyn_methods) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/t/mojo/promise_async_await.t 
new/Mojolicious-9.28/t/mojo/promise_async_await.t
--- old/Mojolicious-9.27/t/mojo/promise_async_await.t   2022-06-14 
13:31:51.000000000 +0200
+++ new/Mojolicious-9.28/t/mojo/promise_async_await.t   2022-10-14 
20:52:39.000000000 +0200
@@ -79,6 +79,10 @@
 
 my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton);
 
+async sub reject_p {
+  await Mojo::Promise->reject('Rejected promise');
+}
+
 async sub test_one {
   await $ua->get_p('/one');
 }
@@ -128,6 +132,18 @@
   $t->get_ok('/four')->status_is(500)->content_like(qr/this went perfectly/);
 };
 
+subtest 'Exception handling without "Unhandled rejected promise" warning' => 
sub {
+  my ($error, @warn);
+  local $SIG{__WARN__} = sub { push @warn, $_[0] };
+  reject_p()->catch(sub { $error = shift })->wait;
+  like $error, qr{^Rejected promise at}, 'right content';
+  is @warn, 0, 'no waring';
+
+  @warn = ();
+  reject_p()->wait;
+  like "@warn", qr{Unhandled rejected promise}, 'unhandled promise';
+};
+
 subtest 'Runaway exception' => sub {
   $t->get_ok('/five')->status_is(500)->content_like(qr/runaway too/);
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-9.27/t/mojo/request.t 
new/Mojolicious-9.28/t/mojo/request.t
--- old/Mojolicious-9.27/t/mojo/request.t       2022-06-14 13:31:51.000000000 
+0200
+++ new/Mojolicious-9.28/t/mojo/request.t       2022-10-14 20:52:39.000000000 
+0200
@@ -1003,6 +1003,35 @@
   is $req->upload('upload')->asset->size, 69, 'right size';
 };
 
+subtest 'Parse HTTP 1.1 multipart request with missing name' => sub {
+  my $req = Mojo::Message::Request->new;
+  is $req->content->progress, 0, 'right progress';
+  $req->parse("GET /foo/bar.html HTTP/1.1\x0d\x0a");
+  is $req->content->progress, 0, 'right progress';
+  $req->parse("Content-Length: 115\x0d\x0a");
+  $req->parse('Content-Type: multipart/form-data; bo');
+  is $req->content->progress, 0, 'right progress';
+  $req->parse("undary=----------0xKhTmLbOuNdArY\x0d\x0a\x0d\x0a");
+  is $req->content->progress, 0, 'right progress';
+  $req->parse("\x0d\x0a------------0xKhTmLbOuNdArY\x0d\x0a");
+  is $req->content->progress, 31, 'right progress';
+  $req->parse("Content-Disposition: form-data\x0d\x0a");
+  $req->parse("\x0d\x0afield with no name\n");
+  $req->parse("\x0d\x0a------------0xKhTmLbOuNdArY--");
+  is $req->content->progress, 115, 'right progress';
+  ok $req->is_finished,           'request is finished';
+  ok $req->content->is_multipart, 'multipart content';
+  is $req->body,    '',              'no content';
+  is $req->method,  'GET',           'right method';
+  is $req->version, '1.1',           'right version';
+  is $req->url,     '/foo/bar.html', 'right URL';
+  is $req->headers->content_type, 'multipart/form-data; 
boundary=----------0xKhTmLbOuNdArY',
+    'right "Content-Type" value';
+  is $req->headers->content_length, 115, 'right "Content-Length" value';
+  is_deeply $req->params->pairs, [], 'no multipart parameter';
+  is $req->content->boundary, '----------0xKhTmLbOuNdArY', 'right boundary';
+};
+
 subtest 'Parse full HTTP 1.1 proxy request with basic authentication' => sub {
   my $req = Mojo::Message::Request->new;
   $req->parse("GET http://127.0.0.1/foo/bar#baz HTTP/1.1\x0d\x0a");

Reply via email to