diff options
author | gregor herrmann <gregoa@debian.org> | 2023-03-30 20:44:58 +0200 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2023-03-30 20:44:58 +0200 |
commit | d5fc9b322337c7c2725b1c7bd45ec032c926a4d7 (patch) | |
tree | 967e6b93698ccfa0b96dd4a99ca02f00eae89a1d | |
parent | 287aec9a2fb178401654a9fda0ac564c07435aa8 (diff) | |
parent | db501eb30989fbd51997f70d0e8ccc8ec26f86ca (diff) |
Update upstream source from tag 'upstream/0.34'
Update to upstream version '0.34'
with Debian dir 84c09218b9071679589fd623825e3b8addf98659
-rw-r--r-- | CONTRIBUTING | 39 | ||||
-rw-r--r-- | Changes | 13 | ||||
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | META.json | 6 | ||||
-rw-r--r-- | META.yml | 4 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | Upper.xs | 10 | ||||
-rw-r--r-- | lib/Scope/Upper.pm | 6 | ||||
-rw-r--r-- | t/05-words.t | 7 | ||||
-rw-r--r-- | t/13-reap-ctl.t | 2 | ||||
-rw-r--r-- | t/23-localize-ctl.t | 2 | ||||
-rw-r--r-- | t/55-yield-target.t | 2 | ||||
-rw-r--r-- | t/64-uplevel-caller.t | 8 | ||||
-rw-r--r-- | t/lib/Scope/Upper/TestGenerator.pm | 2 |
14 files changed, 90 insertions, 18 deletions
diff --git a/CONTRIBUTING b/CONTRIBUTING new file mode 100644 index 0000000..ddc995a --- /dev/null +++ b/CONTRIBUTING @@ -0,0 +1,39 @@ +Contributing guildelines for the Scope-Upper distribution + +Patch submissions guidelines : +- Patches VERY MUCH SHOULD be generated with "git format-patch". + If that's really not possible, make sure your patches apply cleanly in the + distribution directory. +- Single patches MUST be submitted to the bugtracker. + Open a ticket and add your patch as an attachment. +- Series of patches CAN be submitted as a public feature branch. + You can clone the directory wherever you want and point me to your remote + branch as long as I don't need to log in. + +C/XS-related guidelines : +- C code MUST be kept ANSI-compliant. + Older perl versions may have been built with a C compiler that does not + support C99 features (plus they are mostly useless except for restrict). + In particular, this means no C99 comments, no mixed declaration and code, + and no C++ void* casts. +- XS code MUST be buildable with any perl matching the META requirements. + If needed, wrap your code around with the XSH_HAS_PERL(x, y, z) macro. + +Tests-related guidelines : +- Patches MUST be tested before being sent. + Make sure the distribution builds and tests correctly. +- Patches that add version-specific code MUST be tested with at least + one perl release matching each version interval. + That is, if you add new code specific to perl 5.34 and above, then you + have to test it with a pre-5.34 perl (e.g. 5.32) and a post-5.34 perl + (e.g. 5.34). +- C/XS patches MUST be tested with a threaded perl regardless of how much you + dislike perl threads. + Testing with a threaded perl makes sure your code can build in many more + situations. Memory issues are also more easily spotted. +- Bugfixes SHOULD come with a regression test. + Add it to an existing .t file or create your own. + +What you don't need to do : +- DON'T update the Changes file. +- DON'T run author tests. @@ -1,5 +1,18 @@ Revision history for Scope-Upper +0.34 2023-03-26 16:00 UTC + + Add : Contributing guidelines are now listed in the new + CONTRIBUTING file. + + Fix : [RT #146897] Scope::Upper does not know about RCPV + cop_warnings, and does not know that given is deprecated. + "given" related warnings were silenced, and the new RCPV + interface is now used. + Thanks Yves Orton for reporting and contributing a fix. + + Fix : Assertion failures triggering on perl version 5.37.10 and + higher with DEBUGGING enabled. + + Fix : t/64-uplevel-caller.t has been taught about the new call frame + numbering convention. + 0.33 2021-12-20 20:30 UTC + Fix : [RT #114816] resources/remote/url points to web interface META files now follow version 2.0 of the CPAN META spec. @@ -1,3 +1,4 @@ +CONTRIBUTING Changes MANIFEST META.json @@ -4,7 +4,7 @@ "Vincent Pit <vpit@cpan.org>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.66, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -61,6 +61,6 @@ "web" : "http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git" } }, - "version" : "0.33", - "x_serialization_backend" : "JSON::PP version 4.06" + "version" : "0.34", + "x_serialization_backend" : "JSON::PP version 4.16" } @@ -13,7 +13,7 @@ build_requires: configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.62, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.66, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -33,5 +33,5 @@ resources: homepage: http://search.cpan.org/dist/Scope-Upper/ license: http://dev.perl.org/licenses/ repository: http://git.vpit.fr/perl/modules/Scope-Upper.git/ -version: '0.33' +version: '0.34' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' @@ -2,7 +2,7 @@ NAME Scope::Upper - Act on upper scopes. VERSION - Version 0.33 + Version 0.34 SYNOPSIS "reap", "localize", "localize_elem", "localize_delete" and "WORDS" : @@ -824,8 +824,8 @@ ACKNOWLEDGEMENTS COPYRIGHT & LICENSE Copyright - 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2021 Vincent - Pit, all rights reserved. + 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2021,2023 + Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -2034,9 +2034,11 @@ static int su_uplevel_runops_hook_entersub(pTHX) { AvFILLp(av) = fill; } +#if !XSH_HAS_PERL(5, 37, 10) /* should be referenced by PL_curpad[0] and *_ */ assert(SvREFCNT(PL_curpad[0]) > 1); SvREFCNT_dec(PL_curpad[0]); +#endif PL_curpad[0] = (SV *) av; } @@ -3136,7 +3138,9 @@ PPCODE: /* warnings (9) */ { SV *mask = NULL; -#if XSH_HAS_PERL(5, 9, 4) +#if XSH_HAS_PERL(5, 37, 6) + char *old_warnings = cop->cop_warnings; +#elif XSH_HAS_PERL(5, 9, 4) STRLEN *old_warnings = cop->cop_warnings; #else SV *old_warnings = cop->cop_warnings; @@ -3169,7 +3173,9 @@ context_info_warnings_on: if (!mask) mask = su_newmortal_pvn(WARN_ALLstring, WARNsize); } else { -#if XSH_HAS_PERL(5, 9, 4) +#if XSH_HAS_PERL(5, 37, 6) + mask = su_newmortal_pvn((char *) old_warnings, RCPV_LEN(old_warnings)); +#elif XSH_HAS_PERL(5, 9, 4) mask = su_newmortal_pvn((char *) (old_warnings + 1), old_warnings[0]); #else mask = sv_mortalcopy(old_warnings); diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm index d35eefd..49d2aa4 100644 --- a/lib/Scope/Upper.pm +++ b/lib/Scope/Upper.pm @@ -11,13 +11,13 @@ Scope::Upper - Act on upper scopes. =head1 VERSION -Version 0.33 +Version 0.34 =cut our $VERSION; BEGIN { - $VERSION = '0.33'; + $VERSION = '0.34'; } =head1 SYNOPSIS @@ -865,7 +865,7 @@ Thanks to Shawn M. Moore for motivation. =head1 COPYRIGHT & LICENSE -Copyright 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2021 Vincent Pit, all rights reserved. +Copyright 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2021,2023 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/t/05-words.t b/t/05-words.t index 9fe39ff..a5acb6b 100644 --- a/t/05-words.t +++ b/t/05-words.t @@ -339,8 +339,11 @@ $var =~ s{.}{do { my $x; UP }}e; is $var, 1, 'subst : do block preserved' unless $^P; SKIP: { - skip 'Perl 5.10 required to test given/when' => 4 * ($^P ? 4 : 5) + 4 - if "$]" < 5.010; + my $skip_count = 4 * ($^P ? 4 : 5) + 4; + skip 'Perl 5.10 required to test given/when' + => $skip_count if "$]" < 5.010; + skip 'Not testing deprecated given/when on Perl 5.37.10 or later' + => $skip_count if "$]" >= 5.037010; eval <<'TEST_GIVEN'; BEGIN { diff --git a/t/13-reap-ctl.t b/t/13-reap-ctl.t index 085cc05..d7a7f14 100644 --- a/t/13-reap-ctl.t +++ b/t/13-reap-ctl.t @@ -138,6 +138,8 @@ $y = undef; SKIP: { skip 'Perl 5.10 required to test given/when' => 30 if "$]" < 5.010; + skip 'Not testing deprecated given/when on Perl 5.37.10 or later' + => 30 if "$]" >= 5.037010; eval <<' GIVEN_TEST_1'; BEGIN { diff --git a/t/23-localize-ctl.t b/t/23-localize-ctl.t index b72be22..aaefdb6 100644 --- a/t/23-localize-ctl.t +++ b/t/23-localize-ctl.t @@ -191,6 +191,8 @@ $y = undef; SKIP: { skip 'Perl 5.10 required to test given/when' => 30 if "$]" < 5.010; + skip 'Not testing deprecated given/when on Perl 5.37.10 or later' + => 30 if "$]" >= 5.037010; eval <<' GIVEN_TEST_1'; BEGIN { diff --git a/t/55-yield-target.t b/t/55-yield-target.t index ced05c8..682d4cc 100644 --- a/t/55-yield-target.t +++ b/t/55-yield-target.t @@ -81,6 +81,8 @@ SKIP: { SKIP: { skip 'perl 5.10 is required to test interaction with given/when' => 6 if "$]" < 5.010; + skip 'Not testing deprecated given/when on Perl 5.37.10 or later' + => 6 if "$]" >= 5.037010; @res = eval <<'TESTCASE'; BEGIN { diff --git a/t/64-uplevel-caller.t b/t/64-uplevel-caller.t index 50a44d7..575ed3d 100644 --- a/t/64-uplevel-caller.t +++ b/t/64-uplevel-caller.t @@ -12,14 +12,18 @@ sub callstack { my $i = 1; my @stack; while (1) { - my @c = $check_args ? do { package DB; caller($i++) } - : caller($i++); + my @c = $check_args ? do { + my $frame = ("$]" >= 5.037_010) ? ($i + 1) : $i; + package DB; + caller($frame) + } : caller($i); last unless @c; if ($check_args) { my $args = $c[4] ? [ @DB::args ] : undef; push @c, $args; } push @stack, \@c; + ++$i; } return \@stack; } diff --git a/t/lib/Scope/Upper/TestGenerator.pm b/t/lib/Scope/Upper/TestGenerator.pm index b4f6e1b..df175ac 100644 --- a/t/lib/Scope/Upper/TestGenerator.pm +++ b/t/lib/Scope/Upper/TestGenerator.pm @@ -32,7 +32,7 @@ my @blocks = ( [ 'eval q[', '];' ], ); -push @blocks, [ 'given (1) {', '}' ] if "$]" >= 5.010_001; +push @blocks, [ 'given (1) {', '}' ] if "$]" >= 5.010_001 and "$]" < 5.037_010; my %exports = ( verbose_is => \&verbose_is, |