This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Delay fatalization of deprecation of unsafe UTF-8 macros from XS
authorKarl Williamson <khw@cpan.org>
Wed, 9 Jan 2019 04:04:36 +0000 (21:04 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 9 Jan 2019 04:10:45 +0000 (21:10 -0700)
Trying to earlier make this fatal led to some issues in primarily Tk,
which I haven't had a chance to address, and it's getting to late in the
development cycle to do it now.

pod/perldelta.pod
pod/perldeprecation.pod
utf8.c

index 80525a5..dd8d668 100644 (file)
@@ -47,7 +47,12 @@ XXX For a release on a stable branch, this section aspires to be:
 
 =head1 Deprecations
 
 
 =head1 Deprecations
 
-XXX Any deprecated features, syntax, modules etc. should be listed here.
+=head2 In XS code, use of various macros dealing with UTF-8.
+
+This deprecation was scheduled to become fatal in 5.30, but has been
+delayed to 5.32 due to problems that showed up with some CPAN modules.
+For details of what's affected, see L<perldeprecation|
+perldeprecation/In XS code, use of various macros dealing with UTF-8.>
 
 =head2 Module removals
 
 
 =head2 Module removals
 
index f3b5308..5213eca 100644 (file)
@@ -111,6 +111,56 @@ C<{> got a deprecation warning.  Some cases started warning in Perl 5.26,
 and were made fatal in Perl 5.30.  Other cases started in Perl 5.28,
 and will be made fatal in 5.32.
 
 and were made fatal in Perl 5.30.  Other cases started in Perl 5.28,
 and will be made fatal in 5.32.
 
+=head3 In XS code, use of various macros dealing with UTF-8.
+
+These macros will require an extra parameter in Perl 5.32:
+C<isALPHANUMERIC_utf8>,
+C<isASCII_utf8>,
+C<isBLANK_utf8>,
+C<isCNTRL_utf8>,
+C<isDIGIT_utf8>,
+C<isIDFIRST_utf8>,
+C<isPSXSPC_utf8>,
+C<isSPACE_utf8>,
+C<isVERTWS_utf8>,
+C<isWORDCHAR_utf8>,
+C<isXDIGIT_utf8>,
+C<isALPHANUMERIC_LC_utf8>,
+C<isALPHA_LC_utf8>,
+C<isASCII_LC_utf8>,
+C<isBLANK_LC_utf8>,
+C<isCNTRL_LC_utf8>,
+C<isDIGIT_LC_utf8>,
+C<isGRAPH_LC_utf8>,
+C<isIDCONT_LC_utf8>,
+C<isIDFIRST_LC_utf8>,
+C<isLOWER_LC_utf8>,
+C<isPRINT_LC_utf8>,
+C<isPSXSPC_LC_utf8>,
+C<isPUNCT_LC_utf8>,
+C<isSPACE_LC_utf8>,
+C<isUPPER_LC_utf8>,
+C<isWORDCHAR_LC_utf8>,
+C<isXDIGIT_LC_utf8>,
+C<toFOLD_utf8>,
+C<toLOWER_utf8>,
+C<toTITLE_utf8>,
+and
+C<toUPPER_utf8>.
+
+There is now a macro that corresponds to each one of these, simply by
+appending C<_safe> to the name.  It takes the extra parameter.
+For example, C<isDIGIT_utf8_safe> corresponds to C<isDIGIT_utf8>, but
+takes the extra parameter, and its use doesn't generate a deprecation
+warning.  All are documented in L<perlapi/Character case changing> and
+L<perlapi/Character classification>.
+
+You can change to use these versions at any time, or, if you can live
+with the deprecation messages, wait until 5.32 and add the parameter to
+the existing calls, without changing the names.
+
+This change was originally scheduled for 5.30, but was delayed.
+
 =head2 Perl 5.30
 
 =head3 C<< $* >> is no longer supported
 =head2 Perl 5.30
 
 =head3 C<< $* >> is no longer supported
@@ -248,53 +298,6 @@ points|perlunicode/Noncharacter code points>, nor L<code points that are
 above the legal Unicode maximum|perlunicode/Beyond Unicode code
 points>, those can be delimiters.
 
 above the legal Unicode maximum|perlunicode/Beyond Unicode code
 points>, those can be delimiters.
 
-=head3 In XS code, use of various macros dealing with UTF-8.
-
-These macros will require an extra parameter in Perl 5.30:
-C<isALPHANUMERIC_utf8>,
-C<isASCII_utf8>,
-C<isBLANK_utf8>,
-C<isCNTRL_utf8>,
-C<isDIGIT_utf8>,
-C<isIDFIRST_utf8>,
-C<isPSXSPC_utf8>,
-C<isSPACE_utf8>,
-C<isVERTWS_utf8>,
-C<isWORDCHAR_utf8>,
-C<isXDIGIT_utf8>,
-C<isALPHANUMERIC_LC_utf8>,
-C<isALPHA_LC_utf8>,
-C<isASCII_LC_utf8>,
-C<isBLANK_LC_utf8>,
-C<isCNTRL_LC_utf8>,
-C<isDIGIT_LC_utf8>,
-C<isGRAPH_LC_utf8>,
-C<isIDCONT_LC_utf8>,
-C<isIDFIRST_LC_utf8>,
-C<isLOWER_LC_utf8>,
-C<isPRINT_LC_utf8>,
-C<isPSXSPC_LC_utf8>,
-C<isPUNCT_LC_utf8>,
-C<isSPACE_LC_utf8>,
-C<isUPPER_LC_utf8>,
-C<isWORDCHAR_LC_utf8>,
-C<isXDIGIT_LC_utf8>,
-C<toFOLD_utf8>,
-C<toLOWER_utf8>,
-C<toTITLE_utf8>,
-and
-C<toUPPER_utf8>.
-
-There is now a macro that corresponds to each one of these, simply by
-appending C<_safe> to the name.  It takes the extra parameter.
-For example, C<isDIGIT_utf8_safe> corresponds to C<isDIGIT_utf8>, but
-takes the extra parameter, and its use doesn't generate a deprecation
-warning.  All are documented in L<perlapi/Character case changing> and
-L<perlapi/Character classification>.
-
-You can change to use these versions at any time, or, if you can live
-with the deprecation messages, wait until 5.30 and add the parameter to
-the existing calls, without changing the names.
 
 =head2 Perl 5.28
 
 
 =head2 Perl 5.28
 
diff --git a/utf8.c b/utf8.c
index 760fb78..fc4a0c1 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -3184,14 +3184,14 @@ S_warn_on_first_deprecated_use(pTHX_ const char * const name,
 
             if (instr(file, "mathoms.c")) {
                 Perl_warner(aTHX_ WARN_DEPRECATED,
 
             if (instr(file, "mathoms.c")) {
                 Perl_warner(aTHX_ WARN_DEPRECATED,
-                            "In %s, line %d, starting in Perl v5.30, %s()"
+                            "In %s, line %d, starting in Perl v5.32, %s()"
                             " will be removed.  Avoid this message by"
                             " converting to use %s().\n",
                             file, line, name, alternative);
             }
             else {
                 Perl_warner(aTHX_ WARN_DEPRECATED,
                             " will be removed.  Avoid this message by"
                             " converting to use %s().\n",
                             file, line, name, alternative);
             }
             else {
                 Perl_warner(aTHX_ WARN_DEPRECATED,
-                            "In %s, line %d, starting in Perl v5.30, %s() will"
+                            "In %s, line %d, starting in Perl v5.32, %s() will"
                             " require an additional parameter.  Avoid this"
                             " message by converting to use %s().\n",
                             file, line, name, alternative);
                             " require an additional parameter.  Avoid this"
                             " message by converting to use %s().\n",
                             file, line, name, alternative);