Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Text-CSV_XS for 
openSUSE:Factory checked in at 2023-03-11 18:23:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Text-CSV_XS (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Text-CSV_XS.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Text-CSV_XS"

Sat Mar 11 18:23:29 2023 rev:49 rq:1070672 version:1.50

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Text-CSV_XS/perl-Text-CSV_XS.changes        
2023-02-01 16:50:32.477545136 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Text-CSV_XS.new.31432/perl-Text-CSV_XS.changes 
    2023-03-11 18:24:22.306984348 +0100
@@ -1,0 +2,10 @@
+Thu Mar  2 03:08:38 UTC 2023 - Tina Müller <timueller+p...@suse.de>
+
+- updated to 1.50
+   see /usr/share/doc/packages/perl-Text-CSV_XS/ChangeLog
+
+  1.50 - 2023-03-01, H.Merijn Brand
+      * Promote sep to sep_set in csv () with auto-headers
+      * Fix bug in set_diag surfaced by PERL_RC_STACK
+
+-------------------------------------------------------------------

Old:
----
  Text-CSV_XS-1.49.tgz

New:
----
  Text-CSV_XS-1.50.tgz

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

Other differences:
------------------
++++++ perl-Text-CSV_XS.spec ++++++
--- /var/tmp/diff_new_pack.ozQwYb/_old  2023-03-11 18:24:22.882987350 +0100
+++ /var/tmp/diff_new_pack.ozQwYb/_new  2023-03-11 18:24:22.886987371 +0100
@@ -18,7 +18,7 @@
 
 %define cpan_name Text-CSV_XS
 Name:           perl-Text-CSV_XS
-Version:        1.49
+Version:        1.50
 Release:        0
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Comma-Separated Values manipulation routines
@@ -40,6 +40,7 @@
 
 %prep
 %autosetup  -n %{cpan_name}-%{version}
+
 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
 # MANUAL BEGIN
 sed -i -e 's,/pro/bin/perl,/usr/bin/perl,' examples/*

++++++ Text-CSV_XS-1.49.tgz -> Text-CSV_XS-1.50.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/CSV_XS.pm 
new/Text-CSV_XS-1.50/CSV_XS.pm
--- old/Text-CSV_XS-1.49/CSV_XS.pm      2023-01-03 13:19:18.000000000 +0100
+++ new/Text-CSV_XS-1.50/CSV_XS.pm      2023-03-01 09:35:05.000000000 +0100
@@ -26,7 +26,7 @@
 use Carp;
 
 use vars qw( $VERSION @ISA @EXPORT_OK %EXPORT_TAGS );
-$VERSION = "1.49";
+$VERSION = "1.50";
 @ISA     = qw( Exporter );
 XSLoader::load ("Text::CSV_XS", $VERSION);
 
@@ -898,10 +898,10 @@
     $self->{'_COLUMN_NAMES'}   = undef if $args{'set_column_names'};
     $self->{'_BOUND_COLUMNS'}  = undef if $args{'set_column_names'};
 
-    if (defined $args{'sep_set'}) {
-       ref $args{'sep_set'} eq "ARRAY" or
+    if (defined   $args{'sep_set'}) {
+       ref       $args{'sep_set'} eq "ARRAY" or
            croak ($self->_SetDiagInfo (1500, "sep_set should be an array 
ref"));
-       @seps =  @{$args{'sep_set'}};
+       @seps = @{$args{'sep_set'}};
        }
 
     $^O eq "MSWin32" and binmode $fh;
@@ -1385,10 +1385,14 @@
     my @row1;
     if (defined $c->{'hd_s'} || defined $c->{'hd_b'} || defined $c->{'hd_m'} 
|| defined $c->{'hd_c'}) {
        my %harg;
-       defined $c->{'hd_s'} and $harg{'sep_set'}            = $c->{'hd_s'};
-       defined $c->{'hd_d'} and $harg{'detect_bom'}         = $c->{'hd_b'};
-       defined $c->{'hd_m'} and $harg{'munge_column_names'} = $hdrs ? "none" : 
$c->{'hd_m'};
-       defined $c->{'hd_c'} and $harg{'set_column_names'}   = $hdrs ? 0      : 
$c->{'hd_c'};
+       !defined $c->{'hd_s'} &&  $c->{'attr'}{'sep_char'} and
+                $c->{'hd_s'} = [ $c->{'attr'}{'sep_char'} ];
+       !defined $c->{'hd_s'} &&  $c->{'attr'}{'sep'} and
+                $c->{'hd_s'} = [ $c->{'attr'}{'sep'} ];
+       defined  $c->{'hd_s'} and $harg{'sep_set'}            = $c->{'hd_s'};
+       defined  $c->{'hd_d'} and $harg{'detect_bom'}         = $c->{'hd_b'};
+       defined  $c->{'hd_m'} and $harg{'munge_column_names'} = $hdrs ? "none" 
: $c->{'hd_m'};
+       defined  $c->{'hd_c'} and $harg{'set_column_names'}   = $hdrs ? 0      
: $c->{'hd_c'};
        @row1 = $csv->header ($fh, \%harg);
        my @hdr = $csv->column_names ();
        @hdr and $hdrs ||= \@hdr;
@@ -3839,7 +3843,9 @@
 If C<sep_set> is set, the method L</header> is invoked on the opened stream
 to detect and set L<C<sep_char>|/sep_char> with the given set.
 
-C<sep_set> can be abbreviated to C<seps>.
+C<sep_set> can be abbreviated to C<seps>. If neither C<sep_set> not C<seps>
+is given, but C<sep> is defined, C<sep_set> defaults to C<[ sep ]>. This is
+only supported for perl version 5.10 and up.
 
 Note that as the  L</header> method is invoked,  its default is to also set
 the headers.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/CSV_XS.xs 
new/Text-CSV_XS-1.50/CSV_XS.xs
--- old/Text-CSV_XS-1.49/CSV_XS.xs      2023-01-03 13:19:07.000000000 +0100
+++ new/Text-CSV_XS-1.50/CSV_XS.xs      2023-03-01 09:17:51.000000000 +0100
@@ -2294,7 +2294,7 @@
        ST (0) = sv_2mortal (SvDiag (xse));
        }
 
-    if (xse && items > 1 && SvPOK (ST (2))) {
+    if (xse && items > 2 && SvPOK (ST (2))) {
        sv_setpvn (ST (0),  SvPVX (ST (2)), SvCUR (ST (2)));
        SvIOK_on  (ST (0));
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/ChangeLog 
new/Text-CSV_XS-1.50/ChangeLog
--- old/Text-CSV_XS-1.49/ChangeLog      2023-01-03 13:19:48.000000000 +0100
+++ new/Text-CSV_XS-1.50/ChangeLog      2023-03-01 09:55:17.000000000 +0100
@@ -1,3 +1,7 @@
+1.50   - 2023-03-01, H.Merijn Brand
+    * Promote sep to sep_set in csv () with auto-headers
+    * Fix bug in set_diag surfaced by PERL_RC_STACK
+
 1.49   - 2023-01-03, H.Merijn Brand
     * csv2xlsx --split=CxP [--split-label=C]
     * Full documentation/manual for csv2xlsx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/META.json 
new/Text-CSV_XS-1.50/META.json
--- old/Text-CSV_XS-1.49/META.json      2023-01-03 14:38:07.000000000 +0100
+++ new/Text-CSV_XS-1.50/META.json      2023-03-01 11:54:04.000000000 +0100
@@ -1,40 +1,21 @@
 {
-   "resources" : {
-      "homepage" : "https://metacpan.org/pod/Text::CSV_XS";,
-      "x_IRC" : "irc://irc.perl.org/#csv",
-      "bugtracker" : {
-         "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-CSV_XS";
-         },
-      "license" : [
-         "http://dev.perl.org/licenses/";
-         ],
-      "repository" : {
-         "web" : "https://github.com/Tux/Text-CSV_XS";,
-         "url" : "https://github.com/Tux/Text-CSV_XS";,
-         "type" : "git"
-         }
-      },
    "meta-spec" : {
       "version" : 2,
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";
       },
-   "abstract" : "Comma-Separated Values manipulation routines",
-   "generated_by" : "Author",
    "author" : [
       "H.Merijn Brand <h.m.br...@xs4all.nl>"
       ],
-   "name" : "Text-CSV_XS",
+   "generated_by" : "Author",
+   "license" : [
+      "perl_5"
+      ],
    "prereqs" : {
       "build" : {
          "requires" : {
             "Config" : "0"
             }
          },
-      "configure" : {
-         "requires" : {
-            "ExtUtils::MakeMaker" : "0"
-            }
-         },
       "test" : {
          "requires" : {
             "Tie::Scalar" : "0",
@@ -42,26 +23,45 @@
             }
          },
       "runtime" : {
-         "requires" : {
-            "perl" : "5.006001",
-            "IO::Handle" : "0",
-            "XSLoader" : "0"
-            },
          "recommends" : {
             "Encode" : "3.19"
+            },
+         "requires" : {
+            "perl" : "5.006001",
+            "XSLoader" : "0",
+            "IO::Handle" : "0"
+            }
+         },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
             }
          }
       },
-   "dynamic_config" : 1,
-   "release_status" : "stable",
-   "license" : [
-      "perl_5"
-      ],
+   "version" : "1.50",
    "provides" : {
       "Text::CSV_XS" : {
-         "version" : "1.49",
-         "file" : "CSV_XS.pm"
+         "file" : "CSV_XS.pm",
+         "version" : "1.50"
+         }
+      },
+   "name" : "Text-CSV_XS",
+   "release_status" : "stable",
+   "resources" : {
+      "license" : [
+         "http://dev.perl.org/licenses/";
+         ],
+      "homepage" : "https://metacpan.org/pod/Text::CSV_XS";,
+      "repository" : {
+         "url" : "https://github.com/Tux/Text-CSV_XS";,
+         "web" : "https://github.com/Tux/Text-CSV_XS";,
+         "type" : "git"
+         },
+      "x_IRC" : "irc://irc.perl.org/#csv",
+      "bugtracker" : {
+         "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-CSV_XS";
          }
       },
-   "version" : "1.49"
+   "dynamic_config" : 1,
+   "abstract" : "Comma-Separated Values manipulation routines"
    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/META.yml 
new/Text-CSV_XS-1.50/META.yml
--- old/Text-CSV_XS-1.49/META.yml       2023-01-03 14:38:07.000000000 +0100
+++ new/Text-CSV_XS-1.50/META.yml       2023-03-01 11:54:04.000000000 +0100
@@ -16,7 +16,7 @@
 provides: 
   Text::CSV_XS: 
     file: CSV_XS.pm
-    version: '1.49'
+    version: '1.50'
 recommends: 
   Encode: '3.19'
 requires: 
@@ -31,4 +31,4 @@
   homepage: https://metacpan.org/pod/Text::CSV_XS
   license: http://dev.perl.org/licenses/
   repository: https://github.com/Tux/Text-CSV_XS
-version: '1.49'
+version: '1.50'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/t/12_acc.t 
new/Text-CSV_XS-1.50/t/12_acc.t
--- old/Text-CSV_XS-1.49/t/12_acc.t     2021-03-22 13:19:50.000000000 +0100
+++ new/Text-CSV_XS-1.50/t/12_acc.t     2023-03-01 09:35:05.000000000 +0100
@@ -189,19 +189,26 @@
     foreach my $quo (undef, "", " ", "\t", "!!!!!!") {
        defined $esc && $esc =~ m/[ \t]/ or 
        defined $quo && $quo =~ m/[ \t]/ or next;
+       my $wc = join " " => map {
+               !defined $_ ? "<undef>" :
+               $_ eq ""    ? "<empty>" :
+               $_ eq " "   ? "<sp>"    :
+               $_ eq "\t"  ? "<tab>"   : $_ }
+           "esc:", $esc, "quo:", $quo;
        eval { $csv = Text::CSV_XS->new ({
            escape           => $esc,
            quote            => $quo,
            allow_whitespace => 1,
            }) };
-       like ((Text::CSV_XS::error_diag)[1], qr{^INI - allow_whitespace}, 
"Wrong combo - error message");
-       is   ((Text::CSV_XS::error_diag)[0], 1002, "Wrong combo - numeric 
error");
+       like ((Text::CSV_XS::error_diag)[1], qr{^INI - allow_whitespace}, 
"Wrong combo - error message: $wc");
+       is   ((Text::CSV_XS::error_diag)[0], 1002, "Wrong combo - numeric 
error: $wc");
        }
     }
 
 # Test 1003 in constructor
 foreach my $x ("\r", "\n", "\r\n", "x\n", "\rx") {
     foreach my $attr (qw( sep_char quote_char escape_char )) {
+       #ok (1, "attr: $attr => ", $x =~ s/\n/\\n/gr =~ s/\r/\\r/gr);
        eval { $csv = Text::CSV_XS->new ({ $attr => $x }) };
        is ((Text::CSV_XS::error_diag)[0], 1003, "eol in $attr");
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/t/90_csv.t 
new/Text-CSV_XS-1.50/t/90_csv.t
--- old/Text-CSV_XS-1.49/t/90_csv.t     2022-05-07 11:01:21.000000000 +0200
+++ new/Text-CSV_XS-1.50/t/90_csv.t     2023-03-01 09:35:05.000000000 +0100
@@ -71,8 +71,9 @@
        is_deeply (\@hdr, [qw( foo bar baz )], "Headers kept for $alias");
        }
     foreach my $alias (qw( internal true yes 1 )) {
+       my $buf = "";
        ok (my $ref = csv (in => $tfn, kh => $alias), "csv (kh => $alias)");
-       ok (csv (in => $ref, out => \my $buf, kh => $alias, quote_space => 0, 
eol => "\n"), "get it back");
+       ok (csv (in => $ref, out => \$buf, kh => $alias, quote_space => 0, eol 
=> "\n"), "get it back");
        is ($buf, $data, "Headers kept for $alias");
        }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text-CSV_XS-1.49/t/91_csv_cb.t 
new/Text-CSV_XS-1.50/t/91_csv_cb.t
--- old/Text-CSV_XS-1.49/t/91_csv_cb.t  2021-02-10 11:31:04.000000000 +0100
+++ new/Text-CSV_XS-1.50/t/91_csv_cb.t  2023-03-01 10:26:55.000000000 +0100
@@ -4,7 +4,7 @@
 use warnings;
 
 #use Test::More "no_plan";
- use Test::More tests => 58;
+ use Test::More tests => 79;
 
 BEGIN {
     use_ok "Text::CSV_XS", ("csv");
@@ -68,18 +68,21 @@
     { foo => 2, bar => "a b", baz => "" },
     ], "AOH with filter on column name");
 
-is_deeply (csv (in => $tfn, headers => "lc"),
-           [ { foo => 1, bar => 2,     baz => 3 },
-             { foo => 2, bar => "a b", baz => "" }],
-           "AOH with lc headers");
-is_deeply (csv (in => $tfn, headers => "uc"),
-           [ { FOO => 1, BAR => 2,     BAZ => 3 },
-             { FOO => 2, BAR => "a b", BAZ => "" }],
-           "AOH with lc headers");
-is_deeply (csv (in => $tfn, headers => sub { lcfirst uc $_[0] }),
-           [ { fOO => 1, bAR => 2,     bAZ => 3 },
-             { fOO => 2, bAR => "a b", bAZ => "" }],
-           "AOH with mangled headers");
+SKIP: {
+    $] < 5.008001 and skip "No HOH/xx support in $]", 3;
+    is_deeply (csv (in => $tfn, headers => "lc"),
+               [ { foo => 1, bar => 2,     baz => 3 },
+                 { foo => 2, bar => "a b", baz => "" }],
+               "AOH with lc headers");
+    is_deeply (csv (in => $tfn, headers => "uc"),
+               [ { FOO => 1, BAR => 2,     BAZ => 3 },
+                 { FOO => 2, BAR => "a b", BAZ => "" }],
+               "AOH with lc headers");
+    is_deeply (csv (in => $tfn, headers => sub { lcfirst uc $_[0] }),
+               [ { fOO => 1, bAR => 2,     bAZ => 3 },
+                 { fOO => 2, bAR => "a b", bAZ => "" }],
+               "AOH with mangled headers");
+    }
 
 SKIP: {
     $] < 5.008001 and skip "No BOM support in $]", 1;
@@ -133,7 +136,9 @@
            });
     }
 # Check content ref in on_in AOH with aliases %_
-{   %_ = ( brt => 42 );
+SKIP: {
+    $] < 5.008001 and skip "No AOH/alias support in $]", 7; # 6 in on_in, 1 
is_deeply
+    %_ = ( brt => 42 );
     my $aoa = csv (
        in          => $tfn,
        headers     => "auto",
@@ -176,7 +181,9 @@
     }
 
 
-{   ok (my $hr = csv (in => $tfn, key => "foo", on_in => sub {
+SKIP: {
+    $] < 5.008001 and skip "Too complicated test for $]", 2;
+    ok (my $hr = csv (in => $tfn, key => "foo", on_in => sub {
                        $_[1]{quz} = "B"; $_{ziq} = 2; }),
        "Get into hashref with key and on_in");
     is_deeply ($hr->{8}, {qw( bar 13 baz 18 foo 8 quz B ziq 2 )},
@@ -198,21 +205,24 @@
 EOD
 close $fh;
 
-is_deeply (csv (in => $tfn, filter => "not_blank"),
-           [[3,3,3],[5,7,9],["",""],["",""],["",""," ",""],
-            ["","",""],["",""," ",""],[8,13,18]],
-           "filter => not_blank");
-is_deeply (csv (in => $tfn, filter => "not_empty"),
-           [[3,3,3],[5,7,9],["",""," ",""],["",""," ",""],[8,13,18]],
-           "filter => not_empty");
-is_deeply (csv (in => $tfn, filter => "filled"),
-           [[3,3,3],[5,7,9],[8,13,18]],
-           "filter => filled");
-
-is_deeply (csv (in => $tfn, filter => sub {
-               grep { defined && m/\S/ } @{$_[1]} }),
-           [[3,3,3],[5,7,9],[8,13,18]],
-           "filter => filled");
+SKIP: {
+    $] < 5.008001 and skip "Too complicated test for $]", 4;
+    is_deeply (csv (in => $tfn, filter => "not_blank"),
+               [[3,3,3],[5,7,9],["",""],["",""],["",""," ",""],
+                ["","",""],["",""," ",""],[8,13,18]],
+               "filter => not_blank");
+    is_deeply (csv (in => $tfn, filter => "not_empty"),
+               [[3,3,3],[5,7,9],["",""," ",""],["",""," ",""],[8,13,18]],
+               "filter => not_empty");
+    is_deeply (csv (in => $tfn, filter => "filled"),
+               [[3,3,3],[5,7,9],[8,13,18]],
+               "filter => filled");
+
+    is_deeply (csv (in => $tfn, filter => sub {
+                   grep { defined && m/\S/ } @{$_[1]} }),
+               [[3,3,3],[5,7,9],[8,13,18]],
+               "filter => filled");
+    }
 
 # Count rows in different ways
 open  $fh, ">", $tfn or die "$tfn: $!";
@@ -240,11 +250,51 @@
     my $aoa = csv (in => $tfn, filter => { 0 => sub { $n++; 0; }});
     is ($n, 4, "Count rows with filter hash");
     }
-{   my $n = 0;
+SKIP: {
+    $] < 5.008001 and skip "Too complicated test for $]", 1;
+    my $n = 0;
     my $aoa = csv (in => $tfn, filter => sub { $n++; 0; });
     is ($n, 4, "Count rows with filter sub");
     }
-{   my $n = 0;
+SKIP: {
+    $] < 5.008001 and skip "Too complicated test for $]", 1;
+    my $n = 0;
     csv (in => $tfn, on_in => sub { $n++; 0; }, out => \"skip");
     is ($n, 4, "Count rows with on_in and skipped out");
     }
+
+# sep_set, seps, sep on problematic header
+foreach my $sep (",", ";", "\t") {
+    my $ph = "Problematic header";
+
+    open  $fh, ">", $tfn or die "$tfn: $!";
+    print $fh qq{foo${sep}"bar: a, b"${sep}"c;d"${sep}"e"\n};
+    print $fh qq{1${sep}2${sep}3${sep}4\n};
+    close $fh;
+
+    my $exp = [{
+       "foo"       => 1,
+       "bar: a, b" => 2,
+       "c;d"       => 3,
+       "e"         => 4,
+       }];
+
+    ok (csv (in => $tfn, allow_loose_quotes => 1), "$ph, AoA");
+
+    if ($] < 5.010000) {
+       ok (1, "Unsupported header feature for $] - sep: $sep") for 1..6;
+       next;
+       }
+
+    my @err;
+    is (eval {
+       local $SIG{__WARN__} = sub { push @err => @_ };
+       csv (in => $tfn, bom => 1);
+       }, undef, "$ph: cannot decide on sep");
+    like ($err[0], qr{ERROR: 1011\b}, "$ph: error 1011");
+
+    is_deeply (csv (in => $tfn, bom => 1, sep_set  => [ $sep ]), $exp, "$ph: 
sep_set");
+    is_deeply (csv (in => $tfn, bom => 1, seps     => [ $sep ]), $exp, "$ph: 
seps");
+    is_deeply (csv (in => $tfn, bom => 1, sep_char =>   $sep  ), $exp, "$ph: 
sep_char");
+    is_deeply (csv (in => $tfn, bom => 1, sep      =>   $sep  ), $exp, "$ph: 
sep");
+    }

Reply via email to