Hello community,
here is the log from the commit of package perl-YAML for openSUSE:Factory checked in at 2016-12-05 16:30:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-YAML (Old)
and /work/SRC/openSUSE:Factory/.perl-YAML.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-YAML"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-YAML/perl-YAML.changes 2016-11-22 18:57:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-YAML.new/perl-YAML.changes 2016-12-05 16:30:43.000000000 +0100
@@ -1,0 +2,11 @@
+Sat Dec 3 07:29:17 UTC 2016 - coolo@suse.com
+
+- updated to 1.20
+ see /usr/share/doc/packages/perl-YAML/Changes
+
+ 1.20 Fri Dec 2 13:20:33 PST 2016
+ - Apply and amend PR/146 (quoted map keys) @preaction++
+ - B::Deparse is loaded at runtime now
+ - New Feature $YAML::Preserve (Apply PR/9 @fmenabe++)
+
+-------------------------------------------------------------------
Old:
----
YAML-1.19.tar.gz
New:
----
YAML-1.20.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-YAML.spec ++++++
--- /var/tmp/diff_new_pack.VA3cXj/_old 2016-12-05 16:30:45.000000000 +0100
+++ /var/tmp/diff_new_pack.VA3cXj/_new 2016-12-05 16:30:45.000000000 +0100
@@ -17,14 +17,14 @@
Name: perl-YAML
-Version: 1.19
+Version: 1.20
Release: 0
%define cpan_name YAML
Summary: YAML Ain't Markup Language™
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/YAML/
-Source0: http://www.cpan.org/authors/id/T/TI/TINITA/%{cpan_name}-%{version}.tar.gz
+Source0: http://www.cpan.org/authors/id/I/IN/INGY/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ YAML-1.19.tar.gz -> YAML-1.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/Changes new/YAML-1.20/Changes
--- old/YAML-1.19/Changes 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/Changes 2016-12-02 22:20:52.000000000 +0100
@@ -1,3 +1,8 @@
+1.20 Fri Dec 2 13:20:33 PST 2016
+ - Apply and amend PR/146 (quoted map keys) @preaction++
+ - B::Deparse is loaded at runtime now
+ - New Feature $YAML::Preserve (Apply PR/9 @fmenabe++)
+
1.19 Fri Nov 18 19:46:44 CET 2016
- Apply PR/164 pod (link to YAML::Shell)
- Apply PR/151 Fix infinite loop for aliases without a name @bubaflub++
@@ -17,7 +22,7 @@
- Fix VERSION issue
1.15 Sat Apr 18 17:03:09 CEST 2015
- - Fix Issue
+ - Fix Issue 149.
- Don't require newlines at end of YAML.
1.14 Sat Jan 17 15:32:18 PST 2015
@@ -82,7 +87,7 @@
- Change Kwim to Swim
0.95 Sat Jun 14 10:32:08 PDT 2014
- - Fix dumping blessed globs.
+ - Fix dumping blessed globs. Issue 26. mcast++
0.94 Sat Jun 14 10:32:08 PDT 2014
- Skip a failing test on 5.8 introduced in 0.93
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/MANIFEST new/YAML-1.20/MANIFEST
--- old/YAML-1.19/MANIFEST 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/MANIFEST 2016-12-02 22:20:52.000000000 +0100
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.008.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.043.
CONTRIBUTING
Changes
LICENSE
@@ -73,6 +73,7 @@
t/long-quoted-value.yaml
t/marshall.t
t/node-info.t
+t/preserve.t
t/pugs-objects.t
t/references.t
t/regexp.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/META.json new/YAML-1.20/META.json
--- old/YAML-1.19/META.json 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/META.json 2016-12-02 22:20:52.000000000 +0100
@@ -1,10 +1,10 @@
{
- "abstract" : "YAML Ain't Markup Language\u2122",
+ "abstract" : "YAML Ain't Markup Language™",
"author" : [
- "Ingy d\u00f6t Net "
+ "Ingy döt Net "
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150001",
+ "generated_by" : "Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005",
"license" : [
"perl_5"
],
@@ -56,7 +56,6 @@
"web" : "https://github.com/ingydotnet/yaml-pm"
}
},
- "version" : "1.19",
- "x_serialization_backend" : "Cpanel::JSON::XS version 3.0115"
+ "version" : "1.20"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/META.yml new/YAML-1.20/META.yml
--- old/YAML-1.19/META.yml 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/META.yml 2016-12-02 22:20:52.000000000 +0100
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150001'
+generated_by: 'Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,5 +26,4 @@
bugtracker: https://github.com/ingydotnet/yaml-pm/issues
homepage: https://github.com/ingydotnet/yaml-pm
repository: https://github.com/ingydotnet/yaml-pm.git
-version: '1.19'
-x_serialization_backend: 'YAML::Tiny version 1.69'
+version: '1.20'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/Makefile.PL new/YAML-1.20/Makefile.PL
--- old/YAML-1.19/Makefile.PL 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/Makefile.PL 2016-12-02 22:20:52.000000000 +0100
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.008.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.043.
use strict;
use warnings;
@@ -21,7 +21,7 @@
"Test::More" => "0.88",
"Test::YAML" => "1.05"
},
- "VERSION" => "1.19",
+ "VERSION" => "1.20",
"test" => {
"TESTS" => "t/*.t"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/README new/YAML-1.20/README
--- old/YAML-1.19/README 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/README 2016-12-02 22:20:52.000000000 +0100
@@ -4,7 +4,7 @@
VERSION
- This document describes YAML version 1.19.
+ This document describes YAML version 1.20.
NOTE
@@ -382,6 +382,13 @@
serialization (as a string) and a format indicator. You pass back the
code reference.
+ Preserve
+
+ When set to true, this option tells the Loader to load hashes into
+ YAML::Node objects. These are tied hashes. This has the effect of
+ remembering the key order, thus it will be preserved when the hash is
+ dumped again. See YAML::Node for more information.
+
UseBlock
YAML.pm uses heuristics to guess which scalar style is best for a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/lib/YAML/Any.pm new/YAML-1.20/lib/YAML/Any.pm
--- old/YAML-1.19/lib/YAML/Any.pm 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/lib/YAML/Any.pm 2016-12-02 22:20:52.000000000 +0100
@@ -1,6 +1,6 @@
use strict; use warnings;
package YAML::Any;
-our $VERSION = '1.19';
+our $VERSION = '1.20';
use Exporter ();
@@ -29,6 +29,7 @@
my @load_options = qw(
UseCode
LoadCode
+ Preserve
);
my @implementations = qw(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/lib/YAML/Dumper.pm new/YAML-1.20/lib/YAML/Dumper.pm
--- old/YAML-1.19/lib/YAML/Dumper.pm 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/lib/YAML/Dumper.pm 2016-12-02 22:20:52.000000000 +0100
@@ -7,6 +7,8 @@
use YAML::Node;
use YAML::Types;
use Scalar::Util qw();
+use B ();
+use Carp ();
# Context constants
use constant KEY => 3;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/lib/YAML/Loader/Base.pm new/YAML-1.20/lib/YAML/Loader/Base.pm
--- old/YAML-1.19/lib/YAML/Loader/Base.pm 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/lib/YAML/Loader/Base.pm 2016-12-02 22:20:52.000000000 +0100
@@ -3,6 +3,7 @@
use YAML::Mo;
has load_code => default => sub {0};
+has preserve => default => sub {0};
has stream => default => sub {''};
has document => default => sub {0};
has line => default => sub {0};
@@ -24,6 +25,7 @@
my $self = shift;
$self->load_code($YAML::LoadCode || $YAML::UseCode)
if defined $YAML::LoadCode or defined $YAML::UseCode;
+ $self->preserve($YAML::Preserve) if defined $YAML::Preserve
}
sub load {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/lib/YAML/Loader.pm new/YAML-1.20/lib/YAML/Loader.pm
--- old/YAML-1.19/lib/YAML/Loader.pm 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/lib/YAML/Loader.pm 2016-12-02 22:20:52.000000000 +0100
@@ -5,6 +5,7 @@
use YAML::Loader::Base;
use YAML::Types;
+use YAML::Node;
# Context constants
use constant LEAF => 1;
@@ -318,7 +319,7 @@
sub _parse_mapping {
my $self = shift;
my ($anchor) = @_;
- my $mapping = {};
+ my $mapping = $self->preserve ? YAML::Node->new({}) : {};
$self->anchor2node->{$anchor} = $mapping;
my $key;
while (not $self->done and $self->indent == $self->offset->[$self->level]) {
@@ -376,7 +377,16 @@
else {
$self->die('YAML_LOAD_ERR_BAD_SEQ_ELEMENT');
}
- if ($self->preface =~ /^(\s*)(\w.*\:(?: |$).*)$/) {
+
+ # Check whether the preface looks like a YAML mapping ("key: value").
+ # This is complicated because it has to account for the possibility
+ # that a key is a quoted string, which itself may contain escaped
+ # quotes.
+ my $preface = $self->preface;
+ if ( $preface =~ /^ (\s*) ( \w .*? \: (?:\ |$).*) $/x or
+ $preface =~ /^ (\s*) ((') (?:''|[^'])*? ' \s* \: (?:\ |$).*) $/x or
+ $preface =~ /^ (\s*) ((") (?:\\\\|[^"])*? " \s* \: (?:\ |$).*) $/x
+ ) {
$self->indent($self->offset->[$self->level] + 2 + length($1));
$self->content($2);
$self->level($self->level + 1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/lib/YAML/Types.pm new/YAML-1.20/lib/YAML/Types.pm
--- old/YAML-1.19/lib/YAML/Types.pm 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/lib/YAML/Types.pm 2016-12-02 22:20:52.000000000 +0100
@@ -137,7 +137,7 @@
}
else {
bless $value, "CODE" if $class;
- eval { use B::Deparse };
+ eval { require B::Deparse };
return if $@;
my $deparse = B::Deparse->new();
eval {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/lib/YAML.pm new/YAML-1.20/lib/YAML.pm
--- old/YAML-1.19/lib/YAML.pm 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/lib/YAML.pm 2016-12-02 22:20:52.000000000 +0100
@@ -1,5 +1,5 @@
package YAML;
-our $VERSION = '1.19';
+our $VERSION = '1.20';
use YAML::Mo;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/lib/YAML.pod new/YAML-1.20/lib/YAML.pod
--- old/YAML-1.19/lib/YAML.pod 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/lib/YAML.pod 2016-12-02 22:20:52.000000000 +0100
@@ -12,7 +12,7 @@
=head1 VERSION
-This document describes L<YAML> version B<1.19>.
+This document describes L<YAML> version B<1.20>.
=head1 NOTE
@@ -393,6 +393,13 @@
own deserializing routine. YAML.pm passes the serialization (as a string) and
a format indicator. You pass back the code reference.
+=item Preserve
+
+When set to true, this option tells the Loader to load hashes into YAML::Node
+objects. These are tied hashes. This has the effect of remembering the key
+order, thus it will be preserved when the hash is dumped again. See
+LYAML::Node for more information.
+
=item UseBlock
YAML.pm uses heuristics to guess which scalar style is best for a given node.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/t/author-pod-syntax.t new/YAML-1.20/t/author-pod-syntax.t
--- old/YAML-1.19/t/author-pod-syntax.t 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/t/author-pod-syntax.t 2016-12-02 22:20:52.000000000 +0100
@@ -2,8 +2,8 @@
BEGIN {
unless ($ENV{AUTHOR_TESTING}) {
- print qq{1..0 # SKIP these tests are for testing by the author\n};
- exit
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for testing by the author');
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/t/bugs-rt.t new/YAML-1.20/t/bugs-rt.t
--- old/YAML-1.19/t/bugs-rt.t 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/t/bugs-rt.t 2016-12-02 22:20:52.000000000 +0100
@@ -1,6 +1,6 @@
use strict;
use lib -e 't' ? 't' : 'test';
-use TestYAML tests => 41;
+use TestYAML tests => 43;
run_yaml_tests;
@@ -62,14 +62,13 @@
=== Ticket #2957 Serializing array-elements with dashes
-+++ skip_this_for_now
+[github #36] The problem is quoted map keys in array elements
+++ perl: [ { "test - " => 23 } ];
+++ yaml
---
- 'test - ': 23
-
=== Ticket #3015 wish: folding length option for YAML
+++ skip_this_for_now
YAML.pm, line 557, currently has a folding value of 50 hard-coded.
@@ -263,7 +262,7 @@
=== Ticket #13510 Another roundtrip fails
-+++ skip_this_for_now
+[github #48] The problem is quoted map keys in array elements
+++ perl
[{'RR1 (Schloflplatz - Wannsee)'=> 1,
'm‰fliges Kopfsteinpflaster (Teilstrecke)' => 1},
@@ -272,7 +271,7 @@
+++ yaml
---
- 'RR1 (Schloflplatz - Wannsee)': 1
- m‰fliges Kopfsteinpflaster (Teilstrecke): 1
+ m‰fliges Kopfsteinpflaster (Teilstrecke): 1
- ~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/t/load-tests.t new/YAML-1.20/t/load-tests.t
--- old/YAML-1.19/t/load-tests.t 2016-11-18 19:46:54.000000000 +0100
+++ new/YAML-1.20/t/load-tests.t 2016-12-02 22:20:52.000000000 +0100
@@ -1,6 +1,6 @@
use strict;
use lib -e 't' ? 't' : 'test';
-use TestYAML tests => 29;
+use TestYAML tests => 30;
run {
my $block = shift;
@@ -403,3 +403,10 @@
- ^foo
+++ perl
['^foo']
+=== Quoted keys
++++ yaml
+- 'test - ': 23
+ 'test '' ': 23
+ "test \\": 23
++++ perl
+[{ 'test - ' => 23, "test ' " => 23, 'test \\' => 23 }]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/YAML-1.19/t/preserve.t new/YAML-1.20/t/preserve.t
--- old/YAML-1.19/t/preserve.t 1970-01-01 01:00:00.000000000 +0100
+++ new/YAML-1.20/t/preserve.t 2016-12-02 22:20:52.000000000 +0100
@@ -0,0 +1,42 @@
+use strict;
+use Test::More tests => 1;
+use YAML;
+
+local $YAML::Preserve = 1;
+
+my $yaml = <<'...';
+---
+z: z
+y: y
+x: x
+w: w
+v: v
+u: u
+t: t
+s: s
+r: r
+q: q
+p: p
+o: o
+n: n
+m: m
+l: l
+k: k
+j: j
+i: i
+h: h
+g: g
+f: f
+e: e
+d: d
+c: c
+b: b
+a: a
+...
+
+my $data = YAML::Load($yaml);
+my $dump = YAML::Dump($data);
+cmp_ok($dump, 'eq', $yaml, "Roundtrip with Preserve option");
+
+done_testing;
+