Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Sereal for openSUSE:Factory 
checked in at 2022-09-27 20:14:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Sereal (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Sereal.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Sereal"

Tue Sep 27 20:14:37 2022 rev:10 rq:1006441 version:5.001

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Sereal/perl-Sereal.changes  2022-08-16 
17:58:06.314927472 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Sereal.new.2275/perl-Sereal.changes        
2022-09-27 20:14:50.953947674 +0200
@@ -1,0 +2,6 @@
+Sun Sep  4 03:11:38 UTC 2022 - Tina M??ller <timueller+p...@suse.de>
+
+- updated to 5.001
+   see /usr/share/doc/packages/perl-Sereal/Changes
+
+-------------------------------------------------------------------

Old:
----
  Sereal-4.025.tar.gz

New:
----
  Sereal-5.001.tar.gz

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

Other differences:
------------------
++++++ perl-Sereal.spec ++++++
--- /var/tmp/diff_new_pack.mlCOEd/_old  2022-09-27 20:14:51.393948632 +0200
+++ /var/tmp/diff_new_pack.mlCOEd/_new  2022-09-27 20:14:51.397948641 +0200
@@ -18,7 +18,7 @@
 
 %define cpan_name Sereal
 Name:           perl-Sereal
-Version:        4.025
+Version:        5.001
 Release:        0
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Binary serialization module for Perl
@@ -28,15 +28,15 @@
 BuildArch:      noarch
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(Sereal::Decoder) >= 4.025
-BuildRequires:  perl(Sereal::Encoder) >= 4.025
+BuildRequires:  perl(Sereal::Decoder) >= 5.001
+BuildRequires:  perl(Sereal::Encoder) >= 5.001
 BuildRequires:  perl(Test::Deep)
 BuildRequires:  perl(Test::Differences)
 BuildRequires:  perl(Test::LongString)
 BuildRequires:  perl(Test::More) >= 0.88
 BuildRequires:  perl(Test::Warn)
-Requires:       perl(Sereal::Decoder) >= 4.025
-Requires:       perl(Sereal::Encoder) >= 4.025
+Requires:       perl(Sereal::Decoder) >= 5.001
+Requires:       perl(Sereal::Encoder) >= 5.001
 %{perl_requires}
 
 %description

++++++ Sereal-4.025.tar.gz -> Sereal-5.001.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/Changes new/Sereal-5.001/Changes
--- old/Sereal-4.025/Changes    2022-07-28 13:57:13.000000000 +0200
+++ new/Sereal-5.001/Changes    2022-09-03 15:37:06.000000000 +0200
@@ -7,12 +7,39 @@
    * https://github.com/Sereal/Sereal/blob/master/Perl/Encoder/Changes
 
 ****************************************************************
-* Warning: For a seamless upgrade, upgrade to version 4        *
-*          of the decoder before upgrading to version 4 of the *
+* Warning: For a seamless upgrade, upgrade to version 5        *
+*          of the decoder before upgrading to version 5 of the *
 *          encoder! This may mean you should NOT install the   *
 *          Sereal package and instead install the Encoder or   *
 *          Decoder independently.                              *
 ****************************************************************
+5.001
+    * First official release of protocol 5. Better support for non
+      standard NV types. Support for the new Perl 5.36 bools.
+      Upgrade *Sereal::Decoder* FIRST.
+
+5.000_002
+    * Prerelease CPAN testing. Build fixes for quadmath and
+      longdouble perls. Certain tests were failing with the old
+      versions which were subtly broken on quadmath or longdouble
+      machines. These tests are now skipped on these builds. You
+      will not be able to fully test this platform until you install
+      the Decoder, and then install the Encoder.
+
+5.000_001
+    * Prerelease CPAN testing for 5.000_000.
+
+5.000_000 Tue Aug 30, 2022
+    * Better handling of floating point values
+    * Support quadmath __float128 values as FLOAT_128.
+    * Better longdouble support.
+    * Add encoder option 'use_standard_double' which avoids
+      use of LONG_DOUBLE and FLOAT_128 and forces doubles
+      to go to the wire as DOUBLE instead. By default we use
+      the native double for back compat.
+
+----
+
 4.025 Thr Jul 28, 2022
     * Release with build fixes for the Decoder under threaded
       perls and MANIFEST update.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/MANIFEST new/Sereal-5.001/MANIFEST
--- old/Sereal-4.025/MANIFEST   2022-07-28 14:06:36.000000000 +0200
+++ new/Sereal-5.001/MANIFEST   2022-09-03 15:42:16.000000000 +0200
@@ -85,6 +85,23 @@
 t/700_roundtrip/v4/zlib_force.t
 t/700_roundtrip/v4/zstd.t
 t/700_roundtrip/v4/zstd_force.t
+t/700_roundtrip/v5/dedudep_strings.t
+t/700_roundtrip/v5/freeze_thaw.t
+t/700_roundtrip/v5/plain.t
+t/700_roundtrip/v5/plain_canon.t
+t/700_roundtrip/v5/readonly.t
+t/700_roundtrip/v5/snappy.t
+t/700_roundtrip/v5/snappy_and_warn_unknown.t
+t/700_roundtrip/v5/snappy_canon.t
+t/700_roundtrip/v5/snappy_incr.t
+t/700_roundtrip/v5/snappy_incr_canon.t
+t/700_roundtrip/v5/sort_keys.t
+t/700_roundtrip/v5/sort_keys_perl.t
+t/700_roundtrip/v5/sort_keys_perl_rev.t
+t/700_roundtrip/v5/zlib.t
+t/700_roundtrip/v5/zlib_force.t
+t/700_roundtrip/v5/zstd.t
+t/700_roundtrip/v5/zstd_force.t
 t/800_threads.t
 t/900_reentrancy.t
 t/900_regr_issue_15.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/META.json new/Sereal-5.001/META.json
--- old/Sereal-4.025/META.json  2022-07-28 14:06:36.000000000 +0200
+++ new/Sereal-5.001/META.json  2022-09-03 15:42:16.000000000 +0200
@@ -32,8 +32,8 @@
       },
       "runtime" : {
          "requires" : {
-            "Sereal::Decoder" : "4.025",
-            "Sereal::Encoder" : "4.025",
+            "Sereal::Decoder" : "5.001",
+            "Sereal::Encoder" : "5.001",
             "perl" : "5.008"
          }
       },
@@ -42,8 +42,8 @@
             "Data::Dumper" : "0",
             "File::Spec" : "0",
             "Scalar::Util" : "0",
-            "Sereal::Decoder" : "4.025",
-            "Sereal::Encoder" : "4.025",
+            "Sereal::Decoder" : "5.001",
+            "Sereal::Encoder" : "5.001",
             "Test::Deep" : "0",
             "Test::Differences" : "0",
             "Test::LongString" : "0",
@@ -62,6 +62,6 @@
          "url" : "git://github.com/Sereal/Sereal.git"
       }
    },
-   "version" : "4.025",
-   "x_serialization_backend" : "JSON::PP version 4.07"
+   "version" : "5.001",
+   "x_serialization_backend" : "JSON::PP version 4.11"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/META.yml new/Sereal-5.001/META.yml
--- old/Sereal-4.025/META.yml   2022-07-28 14:06:36.000000000 +0200
+++ new/Sereal-5.001/META.yml   2022-09-03 15:42:16.000000000 +0200
@@ -7,8 +7,8 @@
   ExtUtils::MakeMaker: '0'
   File::Spec: '0'
   Scalar::Util: '0'
-  Sereal::Decoder: '4.025'
-  Sereal::Encoder: '4.025'
+  Sereal::Decoder: '5.001'
+  Sereal::Encoder: '5.001'
   Test::Deep: '0'
   Test::Differences: '0'
   Test::LongString: '0'
@@ -28,11 +28,11 @@
     - t
     - inc
 requires:
-  Sereal::Decoder: '4.025'
-  Sereal::Encoder: '4.025'
+  Sereal::Decoder: '5.001'
+  Sereal::Encoder: '5.001'
   perl: '5.008'
 resources:
   bugtracker: https://github.com/Sereal/Sereal/issues
   repository: git://github.com/Sereal/Sereal.git
-version: '4.025'
+version: '5.001'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/Makefile.PL new/Sereal-5.001/Makefile.PL
--- old/Sereal-4.025/Makefile.PL        2022-07-28 13:57:13.000000000 +0200
+++ new/Sereal-5.001/Makefile.PL        2022-09-03 15:37:12.000000000 +0200
@@ -4,7 +4,7 @@
 
 use ExtUtils::MakeMaker;
 use Cwd;
-our $VERSION= '4.025';
+our $VERSION= '5.001';
 
 my $shared_dir= "../shared";
 my $its_our_repo_file= "../this_is_the_Sereal_repo.txt";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/inc/Sereal/BuildTools.pm 
new/Sereal-5.001/inc/Sereal/BuildTools.pm
--- old/Sereal-4.025/inc/Sereal/BuildTools.pm   2022-02-20 05:05:20.000000000 
+0100
+++ new/Sereal-5.001/inc/Sereal/BuildTools.pm   2022-08-30 19:40:40.000000000 
+0200
@@ -145,6 +145,13 @@
             grep { exists $ENV{$_} } ( qw(NOINLINE DEBUG MEMDEBUG NDEBUG), 
@defs ) );
 
     $defines .= " -DNDEBUG" unless $ENV{DEBUG};
+
+    if ($Config{usequadmath}) {
+        $defines .= " -DHAS_QUADMATH";
+    } elsif ($Config{uselongdouble}) {
+        $defines .= " -DHAS_LONGDOUBLE";
+    }
+
     if ( $Config{osname} eq 'hpux' && not $Config{gccversion} ) {
 
         # HP-UX cc does not support inline.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/lib/Sereal.pm 
new/Sereal-5.001/lib/Sereal.pm
--- old/Sereal-4.025/lib/Sereal.pm      2022-07-28 13:57:13.000000000 +0200
+++ new/Sereal-5.001/lib/Sereal.pm      2022-09-03 15:37:12.000000000 +0200
@@ -2,9 +2,9 @@
 use 5.008;
 use strict;
 use warnings;
-our $VERSION= '4.025';
+our $VERSION= '5.001';
 our $XS_VERSION= $VERSION; $VERSION= eval $VERSION;
-use Sereal::Encoder 4.025 qw(
+use Sereal::Encoder 5.001 qw(
     encode_sereal
     sereal_encode_with_object
     SRL_UNCOMPRESSED
@@ -12,7 +12,7 @@
     SRL_ZLIB
     SRL_ZSTD
 );
-use Sereal::Decoder 4.025 qw(
+use Sereal::Decoder 5.001 qw(
     decode_sereal
     looks_like_sereal
     decode_sereal_with_header_data
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/002_have_enc_and_dec.t 
new/Sereal-5.001/t/002_have_enc_and_dec.t
--- old/Sereal-4.025/t/002_have_enc_and_dec.t   2020-02-02 18:25:40.000000000 
+0100
+++ new/Sereal-5.001/t/002_have_enc_and_dec.t   2022-09-02 19:58:47.000000000 
+0200
@@ -10,8 +10,8 @@
         if !-d 't';
 }
 use Sereal::TestSet qw(:all);
-
-if ( have_encoder_and_decoder() ) {
+my $problem= check_for_dependency_issues();
+if ( !$problem or $problem!~/is missing/ ) {
     plan tests => 1;
 }
 else {
@@ -20,5 +20,8 @@
 diag "Testing with both encoder and decoder.";
 diag "Sereal::Decoder v$Sereal::Decoder::VERSION";
 diag "Sereal::Encoder v$Sereal::Encoder::VERSION";
-ok(1);
-
+is($problem,"","There should be no Encoder/Decoder dependency problems.")
+    or diag "If this test fails it means you need to upgrade Sereal::Decoder 
first!\n"
+            . "You are strongly advised to follow this guidance, upgrading the 
Encoder\n"
+            . "before you upgrade the Decoder may lead to serious problems\n\n"
+            . "YOU HAVE BEEN WARNED.\n\n";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/004_testset.t 
new/Sereal-5.001/t/004_testset.t
--- old/Sereal-4.025/t/004_testset.t    2020-02-02 18:25:40.000000000 +0100
+++ new/Sereal-5.001/t/004_testset.t    2022-09-01 13:17:05.000000000 +0200
@@ -17,14 +17,14 @@
 use Test::More;
 
 # needs more tests
-ok( _deep_cmp( ["x"], {} ) );
-ok( _deep_cmp( { "x" => 1 }, { "y" => 1 } ) );
-ok( _deep_cmp( { "x" => 1 }, { "x" => 2 } ) );
-ok( _deep_cmp( { "x" => 1 }, { "x" => 2, "y" => 1 } ) );
-ok( !_deep_cmp( { "x" => 1 }, { "x" => 1 } ) );
-ok( !_deep_cmp( ["x"], ["x"] ) );
-ok( _deep_cmp( ["x"], [ "y", "p" ] ) );
-ok( _deep_cmp( [ "a", "x" ], ["y"] ) );
+ok( _test_deep_cmp( ["x"], {} ) );
+ok( _test_deep_cmp( { "x" => 1 }, { "y" => 1 } ) );
+ok( _test_deep_cmp( { "x" => 1 }, { "x" => 2 } ) );
+ok( _test_deep_cmp( { "x" => 1 }, { "x" => 2, "y" => 1 } ) );
+ok( !_test_deep_cmp( { "x" => 1 }, { "x" => 1 } ) );
+ok( !_test_deep_cmp( ["x"], ["x"] ) );
+ok( _test_deep_cmp( ["x"], [ "y", "p" ] ) );
+ok( _test_deep_cmp( [ "a", "x" ], ["y"] ) );
 ok( _cmp_str( "foo", "bar" ) );
 ok( !_cmp_str( "aaa", "aaa" ) );
 ok( _cmp_str( "aaacowbbb", "aaadogbb" ) );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/005_flags.t 
new/Sereal-5.001/t/005_flags.t
--- old/Sereal-4.025/t/005_flags.t      2020-02-02 18:25:40.000000000 +0100
+++ new/Sereal-5.001/t/005_flags.t      2022-09-01 13:17:05.000000000 +0200
@@ -24,6 +24,7 @@
 
 sub run_tests {
     my ( $extra_name, $opt_hash )= @_;
+    $opt_hash->{protocol_version} = 3;
 
     my $encoder= Sereal::Encoder->new($opt_hash);
     my $decoder= Sereal::Decoder->new($opt_hash);
@@ -86,4 +87,3 @@
         # hobodecode($out);
     }
 }
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/006_sereal_file.t 
new/Sereal-5.001/t/006_sereal_file.t
--- old/Sereal-4.025/t/006_sereal_file.t        2020-02-02 18:25:40.000000000 
+0100
+++ new/Sereal-5.001/t/006_sereal_file.t        2022-08-30 20:51:38.000000000 
+0200
@@ -111,17 +111,17 @@
     my $encoded= encode_sereal( ["foo"] );
     my $decoded= decode_sereal($encoded);
     is( $decoded->[0],               "foo", "encode_sereal/decode_sereal seem 
to work" );
-    is( looks_like_sereal($encoded), 4,     "functional looks_like_sereal() 
works as expected" );
+    is( looks_like_sereal($encoded), 5,     "functional looks_like_sereal() 
works as expected" );
     is(
-        Sereal::Decoder->new()->looks_like_sereal($encoded), 4,
+        Sereal::Decoder->new()->looks_like_sereal($encoded), 5,
         "object method looks_like_sereal() works as expected"
     );
     is(
-        Sereal::Decoder->looks_like_sereal($encoded), 4,
+        Sereal::Decoder->looks_like_sereal($encoded), 5,
         "class method looks_like_sereal() works as expected"
     );
     is(
-        scalar_looks_like_sereal($encoded), 4,
+        scalar_looks_like_sereal($encoded), 5,
         "functional scalar_looks_like_sereal() works as expected"
     );
     my $eval_ok= eval q{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/010_desperate.t 
new/Sereal-5.001/t/010_desperate.t
--- old/Sereal-4.025/t/010_desperate.t  2022-02-18 05:14:23.000000000 +0100
+++ new/Sereal-5.001/t/010_desperate.t  2022-08-30 20:51:38.000000000 +0200
@@ -32,7 +32,7 @@
 
 sub run_tests {
     my ( $extra_name, $opt_hash )= @_;
-    setup_tests(4);
+    setup_tests(5);
     foreach my $bt (@BasicTests) {
         my ( undef, $expect, $name, @alternate )= @$bt;
 
@@ -81,4 +81,3 @@
             };
     }
 }
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/040_special_vars.t 
new/Sereal-5.001/t/040_special_vars.t
--- old/Sereal-4.025/t/040_special_vars.t       2022-02-18 05:14:23.000000000 
+0100
+++ new/Sereal-5.001/t/040_special_vars.t       2022-09-01 13:17:05.000000000 
+0200
@@ -46,6 +46,9 @@
     my ( $name, $var, $todo )= @$_;
     TODO: {
         todo_skip $todo, 1 if $todo;
-        is( desc_special( $dec->decode( $enc->encode($var) ) ), 
desc_special($var), $name );
+        my $want= desc_special($var);
+        is( desc_special( $dec->decode( $enc->encode($var) ) ), $want, $name . 
" ($want)" );
+        #use Devel::Peek;
+        #Dump($dec->decode( $enc->encode($var) ) );
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/dedudep_strings.t 
new/Sereal-5.001/t/700_roundtrip/v5/dedudep_strings.t
--- old/Sereal-4.025/t/700_roundtrip/v5/dedudep_strings.t       1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/dedudep_strings.t       2022-09-01 
14:55:52.000000000 +0200
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'dedupe_strings', { dedupe_strings => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/freeze_thaw.t 
new/Sereal-5.001/t/700_roundtrip/v5/freeze_thaw.t
--- old/Sereal-4.025/t/700_roundtrip/v5/freeze_thaw.t   1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/freeze_thaw.t   2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'freeze-thaw', { freeze_callbacks => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/plain.t 
new/Sereal-5.001/t/700_roundtrip/v5/plain.t
--- old/Sereal-4.025/t/700_roundtrip/v5/plain.t 1970-01-01 01:00:00.000000000 
+0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/plain.t 2020-02-02 18:25:40.000000000 
+0100
@@ -0,0 +1,29 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $version;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests("plain");
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/plain_canon.t 
new/Sereal-5.001/t/700_roundtrip/v5/plain_canon.t
--- old/Sereal-4.025/t/700_roundtrip/v5/plain_canon.t   1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/plain_canon.t   2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,28 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+$ok= 0 if $ok and $Sereal::Encoder::VERSION < 3.001006;
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder (want 3.001006)';
+}
+else {
+    run_roundtrip_tests( "plain_canonical", { canonical => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/readonly.t 
new/Sereal-5.001/t/700_roundtrip/v5/readonly.t
--- old/Sereal-4.025/t/700_roundtrip/v5/readonly.t      1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/readonly.t      2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'readonly', { set_readonly => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/snappy.t 
new/Sereal-5.001/t/700_roundtrip/v5/snappy.t
--- old/Sereal-4.025/t/700_roundtrip/v5/snappy.t        1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/snappy.t        2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'snappy', { snappy => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Sereal-4.025/t/700_roundtrip/v5/snappy_and_warn_unknown.t 
new/Sereal-5.001/t/700_roundtrip/v5/snappy_and_warn_unknown.t
--- old/Sereal-4.025/t/700_roundtrip/v5/snappy_and_warn_unknown.t       
1970-01-01 01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/snappy_and_warn_unknown.t       
2020-02-02 18:25:40.000000000 +0100
@@ -0,0 +1,45 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    my $e= Sereal::Encoder->new();
+    my $d= Sereal::Decoder->new();
+
+    my $out;
+    my $payload= [ 'abcd' x 1024 ];
+    my $ok= eval { $out= $e->encode($payload); 1 };
+    my $err= $@ || 'Zombie error';
+    ok( $ok, "snappy_incr and warn_unknown makes CODE encoding not fail" );
+
+    my $decoded;
+    $ok= eval { $decoded= $d->decode($out); 1 };
+    $err= $@ || 'Zombie error';
+    ok( $ok, "snappy_incr and warn_unknown produced decodable output" )
+        or do {
+        diag($err);
+        hobodecode($out) if $ENV{DEBUG_SEREAL};
+        };
+
+    is_deeply( $decoded, $payload, 'results matches' );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/snappy_canon.t 
new/Sereal-5.001/t/700_roundtrip/v5/snappy_canon.t
--- old/Sereal-4.025/t/700_roundtrip/v5/snappy_canon.t  1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/snappy_canon.t  2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,28 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+$ok= 0 if $ok and $Sereal::Encoder::VERSION < 3.001006;
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder (want 3.001006)';
+}
+else {
+    run_roundtrip_tests( 'snappy_canon', { snappy => 1, canonical => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/snappy_incr.t 
new/Sereal-5.001/t/700_roundtrip/v5/snappy_incr.t
--- old/Sereal-4.025/t/700_roundtrip/v5/snappy_incr.t   1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/snappy_incr.t   2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'snappy_incr', { snappy_incr => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/snappy_incr_canon.t 
new/Sereal-5.001/t/700_roundtrip/v5/snappy_incr_canon.t
--- old/Sereal-4.025/t/700_roundtrip/v5/snappy_incr_canon.t     1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/snappy_incr_canon.t     2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,28 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+$ok= 0 if $ok and $Sereal::Encoder::VERSION < 3.001006;
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder (want 3.001006)';
+}
+else {
+    run_roundtrip_tests( 'snappy_incr_canon', { snappy_incr => 1, canonical => 
1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/sort_keys.t 
new/Sereal-5.001/t/700_roundtrip/v5/sort_keys.t
--- old/Sereal-4.025/t/700_roundtrip/v5/sort_keys.t     1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/sort_keys.t     2022-09-01 
12:10:09.000000000 +0200
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'sort_keys', { sort_keys => 1 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/sort_keys_perl.t 
new/Sereal-5.001/t/700_roundtrip/v5/sort_keys_perl.t
--- old/Sereal-4.025/t/700_roundtrip/v5/sort_keys_perl.t        1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/sort_keys_perl.t        2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'sort_keys', { sort_keys => 2 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/sort_keys_perl_rev.t 
new/Sereal-5.001/t/700_roundtrip/v5/sort_keys_perl_rev.t
--- old/Sereal-4.025/t/700_roundtrip/v5/sort_keys_perl_rev.t    1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/sort_keys_perl_rev.t    2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,27 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests( 'sort_keys', { sort_keys => 3 } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/zlib.t 
new/Sereal-5.001/t/700_roundtrip/v5/zlib.t
--- old/Sereal-4.025/t/700_roundtrip/v5/zlib.t  1970-01-01 01:00:00.000000000 
+0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/zlib.t  2020-02-02 18:25:40.000000000 
+0100
@@ -0,0 +1,31 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests(
+        'zlib',
+        {
+            compress => Sereal::Encoder::SRL_ZLIB(),
+        } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/zlib_force.t 
new/Sereal-5.001/t/700_roundtrip/v5/zlib_force.t
--- old/Sereal-4.025/t/700_roundtrip/v5/zlib_force.t    1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/zlib_force.t    2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,32 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests(
+        'zlib_force',
+        {
+            compress           => Sereal::Encoder::SRL_ZLIB(),
+            compress_threshold => 0,
+        } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/zstd.t 
new/Sereal-5.001/t/700_roundtrip/v5/zstd.t
--- old/Sereal-4.025/t/700_roundtrip/v5/zstd.t  1970-01-01 01:00:00.000000000 
+0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/zstd.t  2020-02-02 18:25:40.000000000 
+0100
@@ -0,0 +1,31 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests(
+        'zstd',
+        {
+            compress => Sereal::Encoder::SRL_ZSTD(),
+        } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/700_roundtrip/v5/zstd_force.t 
new/Sereal-5.001/t/700_roundtrip/v5/zstd_force.t
--- old/Sereal-4.025/t/700_roundtrip/v5/zstd_force.t    1970-01-01 
01:00:00.000000000 +0100
+++ new/Sereal-5.001/t/700_roundtrip/v5/zstd_force.t    2020-02-02 
18:25:40.000000000 +0100
@@ -0,0 +1,32 @@
+#!perl
+use strict;
+use warnings;
+use Data::Dumper;
+use File::Spec;
+
+use lib File::Spec->catdir(qw(t lib));
+
+BEGIN {
+    lib->import('lib')
+        if !-d 't';
+}
+
+use Sereal::TestSet qw(:all);
+use Test::More;
+
+my $ok= have_encoder_and_decoder();
+if ( not $ok ) {
+    plan skip_all => 'Did not find right version of encoder';
+}
+else {
+    run_roundtrip_tests(
+        'zstd_force',
+        {
+            compress           => Sereal::Encoder::SRL_ZSTD(),
+            compress_threshold => 0,
+        } );
+}
+
+pass();
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/800_threads.t 
new/Sereal-5.001/t/800_threads.t
--- old/Sereal-4.025/t/800_threads.t    2022-02-18 05:14:23.000000000 +0100
+++ new/Sereal-5.001/t/800_threads.t    2022-08-30 20:51:38.000000000 +0200
@@ -5,7 +5,7 @@
 
 BEGIN {
     use Config;
-    if ( !$Config{'useithreads'} ) {
+    if ( !$Config{'useithreads'} and !$Config{'usethreads'} ) {
         print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
         exit(0);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sereal-4.025/t/lib/Sereal/TestSet.pm 
new/Sereal-5.001/t/lib/Sereal/TestSet.pm
--- old/Sereal-4.025/t/lib/Sereal/TestSet.pm    2022-02-20 05:05:20.000000000 
+0100
+++ new/Sereal-5.001/t/lib/Sereal/TestSet.pm    2022-09-02 20:39:47.000000000 
+0200
@@ -82,11 +82,13 @@
     integer short_string varint array array_fbit
     hash dump_bless
     have_encoder_and_decoder
+    check_for_dependency_issues
     run_roundtrip_tests
     write_test_files
     $use_objectv
     setup_tests
     _deep_cmp
+    _test_deep_cmp
     _test
     _cmp_str
 );
@@ -672,42 +674,59 @@
 }
 
 sub have_encoder_and_decoder {
+    return !check_for_dependency_issues(@_);
+}
+
+sub check_for_dependency_issues {
     my ($min_v)= @_;
 
     # $Class is the already-loaded class, so the one we're testing
     my @need=
           $Class =~ /Encoder/ ? ("Decoder")
         : $Class =~ /Decoder/ ? ("Encoder")
-        :                       ( "Encoder", "Decoder" );
+        :                       ( "Decoder", "Encoder" );
     my @need_class= ( $Class, map { "Sereal::$_" } @need );
 
     foreach my $class (@need_class) {
         eval "use $class; 1"
             or do {
-            note( "Could not locate $class for testing" . ( $@ ? " (Exception: 
$@)" : "" ) );
-            return ();
+                note( "Could not locate $class for testing" . ( $@ ? " 
(Exception: $@)" : "" ) );
+                return "$Class is missing.";
             };
         my $cmp_v= $class->VERSION;
 
+        if (!defined $min_v and $Class eq $class) {
+            if ($class eq "Sereal::Encoder") {
+                $min_v= $cmp_v;
+            } elsif ($class eq "Sereal::Decoder") {
+                if ($0=~m!/v(\d+)/!) {
+                    $min_v= $1;
+                    if ($Config{usequadmath} || $Config{uselongdouble}) {
+                        $min_v= 5;
+                    }
+                }
+            }
+        }
+
         if ( $min_v and $cmp_v < $min_v ) {
             diag(     "Could not load correct version of $class for testing "
                     . "(got: $cmp_v, needed at least $min_v)" );
-            return;
+            return "$class version $cmp_v too low, need version $min_v";
         }
 
         $cmp_v =~ s/_//;
         $cmp_v= sprintf( "%.2f", int( $cmp_v * 100 ) / 100 );
         my %compat_versions= map { $_ => 1 } $Class->_test_compat();
-        if ( not defined $cmp_v or not exists $compat_versions{$cmp_v} ) {
+        if ( not length($cmp_v) or not exists $compat_versions{$cmp_v} ) {
             diag(     "Could not load correct version of $class for testing "
                     . "(got: $cmp_v, needed any of "
                     . join( ", ", keys %compat_versions )
                     . ")" );
-            return ();
+            return "$class version $cmp_v not compatible, $Class is version 
$min_v"
         }
     }
 
-    return 1;
+    return "";
 }
 
 # max iv/uv logic taken from Storable tests
@@ -1042,13 +1061,11 @@
     }
 
     my $suffix= "_v$proto_version";
+    # older v2.x and v1.0 should ingore this.
+    $opts->{protocol_version}= $proto_version;
     if ( $proto_version == 1 ) {
         $opts->{use_protocol_v1}= 1;
     }
-    else {
-        # v2 ignores this, but will output v2 by default
-        $opts->{protocol_version}= $proto_version;
-    }
     setup_tests($proto_version);
     run_roundtrip_tests_internal( $name . $suffix, $opts );
 }
@@ -1150,6 +1167,11 @@
     return $ret;
 }
 
+our $deep_cmp_name; # set by deep_cmp()
+sub _test_deep_cmp {
+    local $deep_cmp_name= "_test_deep_cmp";
+    return _deep_cmp(@_);
+}
 sub _deep_cmp {
     my ( $x, $y, $seenx, $seeny )= @_;
     $seenx ||= {};
@@ -1205,7 +1227,20 @@
             die "Unknown reftype '", reftype($x) . "'";
         }
     }
-    else {
+    else{
+        if (
+            $deep_cmp_name !~ /v5/ and $deep_cmp_name =~ /float/
+            and $x=~/^-?\d+\.\d+\z/ and $y=~/^-?\d+\.\d+\z/
+        ) {
+            if ($deep_cmp_name=~/(-?\d+\.(\d+))/) {
+                my $maxf= length $1;
+                my $minf= length $2;
+                $_= sprintf "%*.*f", $maxf, $minf, $_
+                    for $x, $y;
+            } else {
+                $_= sprintf "%f", $_ for $x, $y;
+            }
+        }
         $cmp= _cmp_str( $x, $y )
             and return $cmp;
     }
@@ -1214,6 +1249,7 @@
 
 sub deep_cmp {
     my ( $v1, $v2, $name )= @_;
+    local $deep_cmp_name= $name;
     my $diff= _deep_cmp( $v1, $v2 );
     if ($diff) {
         my ( $reason, $diag )= split /\n/, $diff, 2;

Reply via email to