Hello community, here is the log from the commit of package perl-Text-CSV for openSUSE:Factory checked in at 2019-05-17 23:35:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Text-CSV (Old) and /work/SRC/openSUSE:Factory/.perl-Text-CSV.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Text-CSV" Fri May 17 23:35:23 2019 rev:24 rq:702488 version:2.00 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Text-CSV/perl-Text-CSV.changes 2019-01-05 14:41:23.756529255 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Text-CSV.new.5148/perl-Text-CSV.changes 2019-05-17 23:35:24.734164726 +0200 @@ -1,0 +2,11 @@ +Sat May 11 05:33:13 UTC 2019 - Stephan Kulow <[email protected]> + +- updated to 2.00 + see /usr/share/doc/packages/perl-Text-CSV/Changes + + 2.00 2019-05-11 + - Imported tests/fixes from Text::CSV_XS 1.39 + - Fix strict on streaming EOF + - Fixed to update (cached) eol_len correctly + +------------------------------------------------------------------- Old: ---- Text-CSV-1.99.tar.gz New: ---- Text-CSV-2.00.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Text-CSV.spec ++++++ --- /var/tmp/diff_new_pack.PnIHg2/_old 2019-05-17 23:35:25.262164448 +0200 +++ /var/tmp/diff_new_pack.PnIHg2/_new 2019-05-17 23:35:25.262164448 +0200 @@ -17,10 +17,10 @@ Name: perl-Text-CSV -Version: 1.99 +Version: 2.00 Release: 0 %define cpan_name Text-CSV -Summary: Comma-Separated Values Manipulator (Using Xs or Pureperl) +Summary: Comma-separated values manipulator (using XS or PurePerl) License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} ++++++ Text-CSV-1.99.tar.gz -> Text-CSV-2.00.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/Changes new/Text-CSV-2.00/Changes --- old/Text-CSV-1.99/Changes 2019-01-02 12:48:53.000000000 +0100 +++ new/Text-CSV-2.00/Changes 2019-05-11 04:56:19.000000000 +0200 @@ -1,5 +1,10 @@ Revision history for Perl extension Text::CSV. +2.00 2019-05-11 + - Imported tests/fixes from Text::CSV_XS 1.39 + - Fix strict on streaming EOF + - Fixed to update (cached) eol_len correctly + 1.99 2019-01-02 - Fixed a number of tests to skip for older perls diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/META.json new/Text-CSV-2.00/META.json --- old/Text-CSV-1.99/META.json 2019-01-02 12:50:22.000000000 +0100 +++ new/Text-CSV-2.00/META.json 2019-05-11 04:57:56.000000000 +0200 @@ -54,6 +54,6 @@ "url" : "https://github.com/makamaka/Text-CSV" } }, - "version" : "1.99", - "x_serialization_backend" : "JSON::PP version 2.94" + "version" : "2.00", + "x_serialization_backend" : "JSON::PP version 4.00" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/META.yml new/Text-CSV-2.00/META.yml --- old/Text-CSV-1.99/META.yml 2019-01-02 12:50:22.000000000 +0100 +++ new/Text-CSV-2.00/META.yml 2019-05-11 04:57:56.000000000 +0200 @@ -28,5 +28,5 @@ bugtracker: https://github.com/makamaka/Text-CSV/issues/ license: http://dev.perl.org/licenses/ repository: https://github.com/makamaka/Text-CSV -version: '1.99' +version: '2.00' x_serialization_backend: 'CPAN::Meta::YAML version 0.012' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/lib/Text/CSV.pm new/Text-CSV-2.00/lib/Text/CSV.pm --- old/Text-CSV-1.99/lib/Text/CSV.pm 2019-01-02 12:49:00.000000000 +0100 +++ new/Text-CSV-2.00/lib/Text/CSV.pm 2019-05-11 04:56:27.000000000 +0200 @@ -9,7 +9,7 @@ @EXPORT_OK = qw( csv ); BEGIN { - $VERSION = '1.99'; + $VERSION = '2.00'; $DEBUG = 0; } @@ -2673,7 +2673,7 @@ An escape character should escape only characters that need escaping. Allowing the escape for other characters is possible with the attribute -L</allow_loose_escape>. +L</allow_loose_escapes>. =item * 2026 "EIQ - Binary character inside quoted field, binary off" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/lib/Text/CSV_PP.pm new/Text-CSV-2.00/lib/Text/CSV_PP.pm --- old/Text-CSV-1.99/lib/Text/CSV_PP.pm 2019-01-02 12:49:00.000000000 +0100 +++ new/Text-CSV-2.00/lib/Text/CSV_PP.pm 2019-05-11 04:56:27.000000000 +0200 @@ -12,7 +12,7 @@ use vars qw($VERSION @ISA @EXPORT_OK); use Carp; -$VERSION = '1.99'; +$VERSION = '2.00'; @ISA = qw(Exporter); @EXPORT_OK = qw(csv); @@ -1679,7 +1679,7 @@ $ctx->{eolx} = $ctx->{eol_len} ? $ctx->{verbatim} || $ctx->{eol_len} >= 2 ? 1 - : $ctx->{eol} =~ /\A[\015|\012]/ ? 0 : 1 + : $ctx->{eol} =~ /\A[\015\012]/ ? 0 : 1 : 0; if ($ctx->{sep_len} and $ctx->{sep_len} > 1 and _is_valid_utf8($ctx->{sep})) { @@ -1730,7 +1730,10 @@ $cache->{quo_len} = $len == 1 ? 0 : $len; } elsif ($key eq 'eol') { - $cache->{eol} = $value if defined($value); + if (defined($value)) { + $cache->{eol} = $value; + $cache->{eol_len} = length($value); + } $cache->{eol_is_cr} = $value eq "\015" ? 1 : 0; } elsif ($key eq 'undef_str') { @@ -2040,8 +2043,10 @@ if ($ctx->{strict}) { $ctx->{strict_n} ||= $ctx->{fld_idx}; if ($ctx->{strict_n} != $ctx->{fld_idx}) { - $self->__parse_error($ctx, 2014, $ctx->{used}); - return; + unless ($ctx->{useIO} & useIO_EOF) { + $self->__parse_error($ctx, 2014, $ctx->{used}); + } + $result = undef; } } @@ -5403,7 +5408,7 @@ An escape character should escape only characters that need escaping. Allowing the escape for other characters is possible with the attribute -L</allow_loose_escape>. +L</allow_loose_escapes>. =item * 2026 "EIQ - Binary character inside quoted field, binary off" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/t/80_diag.t new/Text-CSV-2.00/t/80_diag.t --- old/Text-CSV-1.99/t/80_diag.t 2019-01-02 12:47:34.000000000 +0100 +++ new/Text-CSV-2.00/t/80_diag.t 2019-05-11 04:51:00.000000000 +0200 @@ -3,7 +3,7 @@ use strict; $^W = 1; - use Test::More tests => 303; + use Test::More tests => 329; #use Test::More "no_plan"; my %err; @@ -21,6 +21,7 @@ close $fh; } +my $tfn = "_80test.csv"; END { -f $tfn and unlink $tfn; } $| = 1; my $csv = Text::CSV->new (); @@ -263,6 +264,63 @@ is ($csv->parse ("3,4,5,6"), 0, "Too many columns"); is (0 + $csv->error_diag, 2014, "Error set correctly"); } +{ my $csv = Text::CSV->new ({ strict => 1 }); + open my $fh, ">", $tfn or die "$tfn: $!\n"; + ok ($csv->say ($fh, [ 1, 2, 3 ]), "Write line 1"); + ok ($csv->say ($fh, [ 1, 2, 3 ]), "Write line 2"); + close $fh; + open $fh, "<", $tfn or die "$tfn: $!\n"; + ok ((my $r = $csv->getline ($fh)), "Get line 1 under strict"); + ok (( $r = $csv->getline ($fh)), "Get line 2 under strict"); + is ($csv->getline ($fh), undef, "EOF under strict"); + is (0 + $csv->error_diag, 2012, "Error is 2012 instead of 2014"); + ok ($csv->eof, "EOF is set"); + close $fh; + } +{ my $csv = Text::CSV->new ({ strict => 1 }); + open my $fh, ">", $tfn or die "$tfn: $!\n"; + ok ($csv->say ($fh, [ 1, 2, 3 ]), "Write line 1"); + ok ($csv->print ($fh, [ 1, 2, 3 ]), "Write line 2 no newline"); + close $fh; + open $fh, "<", $tfn or die "$tfn: $!\n"; + ok ((my $r = $csv->getline ($fh)), "Get line 1 under strict"); + ok (( $r = $csv->getline ($fh)), "Get line 2 under strict no newline"); + is ($csv->getline ($fh), undef, "EOF under strict"); + is (0 + $csv->error_diag, 2012, "Error is 2012 instead of 2014"); + ok ($csv->eof, "EOF is set"); + close $fh; + } +{ my $csv = Text::CSV->new (); + open my $fh, ">", $tfn or die "$tfn: $!\n"; + ok ($csv->say ($fh, [ 1 .. 3 ]), "Write line 1 (headers)"); + ok ($csv->say ($fh, [ 1 .. 4 ]), "Write line 2 (data)"); + close $fh; + my $aoh = Text::CSV::csv (in => $tfn, headers => "auto"); + is_deeply ($aoh, [{ 1 => 1, 2 => 2, 3 => 3 }], "Column dropped"); + my @e; + eval { + local $SIG{__WARN__} = sub { push @e, @_ }; + $aoh = Text::CSV::csv (in => $tfn, headers => "auto", strict => 1); + }; + is_deeply ($aoh, [], "Fail under strict"); + is (scalar @e, 1, "Got error"); + like ($e[0], qr{ 2014 }, "Error 2014"); + + open $fh, ">", $tfn or die "$tfn: $!\n"; + ok ($csv->say ($fh, [ 1 .. 4 ]), "Write line 1 (headers)"); + ok ($csv->say ($fh, [ 1 .. 3 ]), "Write line 2 (data)"); + close $fh; + $aoh = Text::CSV::csv (in => $tfn, headers => "auto"); + is_deeply ($aoh, [{ 1 => 1, 2 => 2, 3 => 3, 4 => undef }], "Column added"); + @e = (); + eval { + local $SIG{__WARN__} = sub { push @e, @_ }; + $aoh = Text::CSV::csv (in => $tfn, headers => "auto", strict => 1); + }; + is_deeply ($aoh, [], "Fail under strict"); + is (scalar @e, 1, "Got error"); + like ($e[0], qr{ 2014 }, "Error 2014"); + } { my $csv = Text::CSV->new; eval { $csv->header (undef, "foo"); }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/t/85_util.t new/Text-CSV-2.00/t/85_util.t --- old/Text-CSV-1.99/t/85_util.t 2019-01-02 12:47:34.000000000 +0100 +++ new/Text-CSV-2.00/t/85_util.t 2019-05-11 04:51:00.000000000 +0200 @@ -22,6 +22,10 @@ $ENV{PERL_TEXT_CSV} = 0; use_ok "Text::CSV", "csv"; + # Encode up to and including 2.01 have an error in a regex: + # False [] range "\s-" in regex; marked by <-- HERE in m/\bkoi8[\s- <-- HERE _]*([ru])$/ + # in Encode::Alias. This however does not influence this test, as then *all* encodings + # are skipped as unsupported require Encode; require "./t/util.pl"; } @@ -251,17 +255,18 @@ qq{1,"1 \x{20ac} each"}, ""; for ( [ "none" => "" ], - [ "utf-8" => "\xef\xbb\xbf" ], + [ "utf-8" => "\xef\xbb\xbf" ], [ "utf-16be" => "\xfe\xff" ], [ "utf-16le" => "\xff\xfe" ], [ "utf-32be" => "\x00\x00\xfe\xff" ], [ "utf-32le" => "\xff\xfe\x00\x00" ], - # Below not (yet) supported by Encode - [ "utf-1" => "\xf7\x64\x4c" ], + # Below 5 not (yet) supported by Encode + [ "utf-1" => "\xf7\x64\x4c" ], [ "utf-ebcdic" => "\xdd\x73\x66\x73" ], - [ "scsu" => "\x0e\xfe\xff" ], - [ "bocu-1" => "\xfb\xee\x28" ], - [ "gb-18030" => "\x84\x31\x95" ], + [ "scsu" => "\x0e\xfe\xff" ], + [ "bocu-1" => "\xfb\xee\x28" ], + [ "gb-18030" => "\x84\x31\x95" ], + # [ "UTF-8" => "\x{feff}" ], ) { my ($enc, $bom) = @$_; @@ -279,7 +284,7 @@ $csv = Text::CSV->new ({ binary => 1, auto_diag => 9 }); SKIP: { - $has_enc or skip "Encoding $enc not supported", $enc =~ /^utf/ ? 10 : 9; + $has_enc or skip "Encoding $enc not supported", $enc =~ m/^utf/ ? 10 : 9; $csv->column_names (undef); open my $fh, "<", $fnm; binmode $fh; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.99/t/90_csv.t new/Text-CSV-2.00/t/90_csv.t --- old/Text-CSV-1.99/t/90_csv.t 2019-01-02 12:47:34.000000000 +0100 +++ new/Text-CSV-2.00/t/90_csv.t 2019-05-11 04:51:00.000000000 +0200 @@ -95,9 +95,15 @@ ok (csv (in => $aoh, out => $tfn, headers => "auto"), "AOH out file"); is_deeply (csv (in => $tfn, headers => "auto"), $aoh, "AOH parse out"); -ok (csv (in => $aoh, out => $tfn, headers => "skip"), "AOH out file no header"); -is_deeply (csv (in => $tfn, headers => [keys %{$aoh->[0]}]), - $aoh, "AOH parse out no header"); +if ($Config{usecperl} && $Config{usecperl} eq "define") { + ok (1, "cperl has a different view on stable sorting of hash keys"); + ok (1, "not doing this (silly) test"); + } +else { + ok (csv (in => $aoh, out => $tfn, headers => "skip"), "AOH out file no header"); + is_deeply (csv (in => $tfn, headers => [keys %{$aoh->[0]}]), + $aoh, "AOH parse out no header"); + } my $idx = 0; sub getrowa { return $aoa->[$idx++]; }
