Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attributes.pm says various things will disappear in 5.28; do it #16213

Closed
p5pRT opened this issue Oct 28, 2017 · 9 comments
Closed

attributes.pm says various things will disappear in 5.28; do it #16213

p5pRT opened this issue Oct 28, 2017 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 28, 2017

Migrated from rt.perl.org#132368 (status was 'resolved')

Searchable as RT132368$

@p5pRT
Copy link
Author

p5pRT commented Oct 28, 2017

From @khwilliamson

Created by @khwilliamson

This is a bug report for perl from khw@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.27.6.

-----------------------------------------------------------------
We need to follow through with our threat to remove certain things in
attributes.pm in 5.28

I think this is a small task, but I don't have the knowledge to do it myself
without figuring it out, so I'm hoping someone else will do it.

Perl Info

Flags:
     category=library
     severity=high
     module=attributes

Site configuration information for perl 5.27.6:

Configured by khw at Sat Oct 28 08:37:24 MDT 2017.

Summary of my perl5 (revision 5 version 27 subversion 6) configuration:
   Commit id: eecd4d1156438b131ac47c72b020788f66b6d178
   Platform:
     osname=linux
     osvers=4.10.0-37-generic
     archname=x86_64-linux-thread-multi-ld
     uname='linux khw 4.10.0-37-generic #41-ubuntu smp fri oct 6 
20:20:37 utc 2017 x86_64 x86_64 x86_64 gnulinux '
     config_args='-des -Uversiononly -Dprefix=/home/khw/blead -Dusedevel 
-A'optimize=-ggdb3' -A'optimize=-O0' -Accflags='-Wno-c++11-compat' 
-Accflags='-DPERL_BOOL_AS_CHAR' -Accflags='-Wno-deprecated' 
-Accflags='-DPERL_EXTERNAL_GLOB' -Dman1dir=none -Dman3dir=none -Dcc=g++ 
-DDEBUGGING -Dusemorebits -Dusecbacktrace -Dusethreads'
     hint=recommended
     useposix=true
     d_sigaction=define
     useithreads=define
     usemultiplicity=define
     use64bitint=define
     use64bitall=define
     uselongdouble=define
     usemymalloc=n
     default_inc_excludes_dot=define
     bincompat5005=undef
   Compiler:
     cc='g++'
     ccflags ='-D_REENTRANT -D_GNU_SOURCE -Wno-c++11-compat 
-DPERL_BOOL_AS_CHAR -Wno-deprecated -DPERL_EXTERNAL_GLOB -fwrapv 
-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong 
-I/usr/local/include -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
     optimize='-O2 -ggdb3 -O0'
     cppflags='-D_REENTRANT -D_GNU_SOURCE -Wno-c++11-compat 
-DPERL_BOOL_AS_CHAR -Wno-deprecated -DPERL_EXTERNAL_GLOB -fwrapv 
-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong 
-I/usr/local/include'
     ccversion=''
     gccversion='6.3.0 20170406'
     gccosandvers=''
     intsize=4
     longsize=8
     ptrsize=8
     doublesize=8
     byteorder=12345678
     doublekind=3
     d_longlong=define
     longlongsize=8
     d_longdbl=define
     longdblsize=16
     longdblkind=3
     ivtype='long'
     ivsize=8
     nvtype='long double'
     nvsize=16
     Off_t='off_t'
     lseeksize=8
     alignbytes=16
     prototype=define
   Linker and Libraries:
     ld='g++'
     ldflags =' -fstack-protector-strong -L/usr/local/lib'
     libpth=/usr/include/c++/6 /usr/include/x86_64-linux-gnu/c++/6 
/usr/include/c++/6/backward /usr/local/lib 
/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed 
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib 
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
     libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
     perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
     libc=libc-2.24.so
     so=so
     useshrplib=false
     libperl=libperl.a
     gnulibc_version='2.24'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs
     dlext=so
     d_dlsymun=undef
     ccdlflags='-Wl,-E'
     cccdlflags='-fPIC'
     lddlflags='-shared -O2 -ggdb3 -O0 -L/usr/local/lib 
-fstack-protector-strong'



@INC for perl 5.27.6:
     /home/khw/perl/blead/lib
     /home/khw/perl/blead/t
     /home/khw/blead/lib/perl5/site_perl/5.27.6/x86_64-linux-thread-multi-ld
     /home/khw/blead/lib/perl5/site_perl/5.27.6
     /home/khw/blead/lib/perl5/5.27.6/x86_64-linux-thread-multi-ld
     /home/khw/blead/lib/perl5/5.27.6
     /home/khw/blead/lib/perl5/site_perl/5.27.5
     /home/khw/blead/lib/perl5/site_perl/5.27.4
     /home/khw/blead/lib/perl5/site_perl/5.27.3
     /home/khw/blead/lib/perl5/site_perl/5.27.2
     /home/khw/blead/lib/perl5/site_perl/5.27.1
     /home/khw/blead/lib/perl5/site_perl/5.27.0
     /home/khw/blead/lib/perl5/site_perl/5.26.0
     /home/khw/blead/lib/perl5/site_perl/5.25.12
     /home/khw/blead/lib/perl5/site_perl/5.25.11
     /home/khw/blead/lib/perl5/site_perl/5.25.10
     /home/khw/blead/lib/perl5/site_perl/5.25.9
     /home/khw/blead/lib/perl5/site_perl/5.25.8
     /home/khw/blead/lib/perl5/site_perl/5.25.7
     /home/khw/blead/lib/perl5/site_perl/5.25.6
     /home/khw/blead/lib/perl5/site_perl/5.25.5
     /home/khw/blead/lib/perl5/site_perl/5.25.4
     /home/khw/blead/lib/perl5/site_perl/5.25.3
     /home/khw/blead/lib/perl5/site_perl/5.25.2
     /home/khw/blead/lib/perl5/site_perl/5.25.1
     /home/khw/blead/lib/perl5/site_perl/5.24.0
     /home/khw/blead/lib/perl5/site_perl/5.23.10
     /home/khw/blead/lib/perl5/site_perl/5.23.9
     /home/khw/blead/lib/perl5/site_perl/5.23.8
     /home/khw/blead/lib/perl5/site_perl/5.23.7
     /home/khw/blead/lib/perl5/site_perl/5.23.6
     /home/khw/blead/lib/perl5/site_perl/5.23.5
     /home/khw/blead/lib/perl5/site_perl/5.23.4
     /home/khw/blead/lib/perl5/site_perl/5.23.3
     /home/khw/blead/lib/perl5/site_perl/5.23.2
     /home/khw/blead/lib/perl5/site_perl/5.23.1
     /home/khw/blead/lib/perl5/site_perl/5.23.0
     /home/khw/blead/lib/perl5/site_perl/5.22.0
     /home/khw/blead/lib/perl5/site_perl/5.21.12
     /home/khw/blead/lib/perl5/site_perl/5.21.11
     /home/khw/blead/lib/perl5/site_perl/5.21.10
     /home/khw/blead/lib/perl5/site_perl/5.21.9
     /home/khw/blead/lib/perl5/site_perl/5.21.8
     /home/khw/blead/lib/perl5/site_perl/5.21.7
     /home/khw/blead/lib/perl5/site_perl/5.21.6
     /home/khw/blead/lib/perl5/site_perl/5.21.5
     /home/khw/blead/lib/perl5/site_perl/5.21.4
     /home/khw/blead/lib/perl5/site_perl/5.21.3
     /home/khw/blead/lib/perl5/site_perl/5.21.2
     /home/khw/blead/lib/perl5/site_perl/5.21.1
     /home/khw/blead/lib/perl5/site_perl/5.20.0
     /home/khw/blead/lib/perl5/site_perl/5.19.12
     /home/khw/blead/lib/perl5/site_perl/5.19.11
     /home/khw/blead/lib/perl5/site_perl/5.19.10
     /home/khw/blead/lib/perl5/site_perl


Environment for perl 5.27.6:
     HOME=/home/khw
     LANG=en_US.UTF-8
     LANGUAGE=en_US
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
 
PATH=/usr/lib/ccache:/home/khw/bin:/home/khw/perl5/perlbrew/bin:/home/khw/print/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/usr/local/games:/home/khw/iands/www:/home/khw/cxoffice/bin
     PERL5OPT=-w
     PERL_BADLANG (unset)
     PERL_DIFF_TOOL=wgdiff
     PERL_POD_PEDANTIC=1
     SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Oct 28, 2017

From @jkeenan

On Sat, 28 Oct 2017 20​:07​:47 GMT, public@​khwilliamson.com wrote​:

This is a bug report for perl from khw@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.27.6.

-----------------------------------------------------------------
We need to follow through with our threat to remove certain things in
attributes.pm in 5.28

I think this is a small task, but I don't have the knowledge to do it
myself
without figuring it out, so I'm hoping someone else will do it.

Is there anything relevant to this task other than the following two items?

From​: ext/attributes/attributes.pm
#####
sub _modify_attrs_and_deprecate {
  my $svtype = shift;
  # Now that we've removed handling of locked from the XS code, we need to
  # remove it here, else it ends up in @​badattrs. (If we do the deprecation in
  # XS, we can't control the warning based on *our* caller's lexical settings,
  # and the warned line is in this package)
  grep {
  $deprecated{$svtype} && /$deprecated{$svtype}/ ? do {
  require warnings;
  warnings​::warnif('deprecated', "Attribute \"$1\" is deprecated, " .
  "and will disappear in Perl 5.28");
  0;
  } : $svtype eq 'CODE' && exists $msg{$_} ? do {
  require warnings;
  warnings​::warnif(
  'misc',
  $msg{$_}
  );
  0;
  } : 1
  } _modify_attrs(@​_);
}
#####

From​: pod/perldeprecation.pod
#####
  Perl 5.28
  Attributes "​:locked" and "​:unique"
  The attributes "​:locked" (on code references) and "​:unique" (on array, hash and scalar references) have had no effect since Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated since.

  In Perl 5.28, these attributes are syntax errors. Since the attributes do not do anything, removing them from your code fixes the syntax error; and removing them will not influence the behaviour of your code.
#####

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 28, 2017

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 29, 2017

From @ilmari

"James E Keenan via RT" <perlbug-followup@​perl.org> writes​:

On Sat, 28 Oct 2017 20​:07​:47 GMT, public@​khwilliamson.com wrote​:

This is a bug report for perl from khw@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.27.6.

-----------------------------------------------------------------
We need to follow through with our threat to remove certain things in
attributes.pm in 5.28

I think this is a small task, but I don't have the knowledge to do it
myself
without figuring it out, so I'm hoping someone else will do it.

This was aldready done in 5.27.1, along with all the other deprecated
features that were due for removal in 5.28. See https://metacpan.org/pod/release/EHERMAN/perl-5.27.1/pod/perldelta.pod#Incompatible-Changes

The attributes changes were commits
01cb645 (locked) and
cfdc35f (unique).

You'll notice that the %deprecated hash in attributes.pm is empty,
because there are no currently-deprecated attributes.

Is there anything relevant to this task other than the following two items?

From​: ext/attributes/attributes.pm
[snip]

This is just the infrastructure for warning about deprecated attributes
(of which there are currently none, but we might as well keep it in case
we choose to deprecate another attribute in future.

From​: pod/perldeprecation.pod
#####
Perl 5.28
Attributes "​:locked" and "​:unique"
The attributes "​:locked" (on code references) and "​:unique" (on array, hash and scalar references) have had no effect since Perl 5.005 and Perl 5.8.8 respectively. Their use has been deprecated since.

In Perl 5\.28\, these attributes are syntax errors\. Since the attributes do not do anything\, removing them from your code fixes the syntax error; and removing them will not influence the behaviour of your code\.

#####

Note the use of present tense for the whole 5.28 section. This was
changed in commit dcc013e, after all
the deprecated features had been removed.

This ticket can be closed.

- ilmar
--
- Twitter seems more influential [than blogs] in the 'gets reported in
  the mainstream press' sense at least. - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
  to a mainstream media article. - Calle Dybedahl

@p5pRT
Copy link
Author

p5pRT commented Oct 29, 2017

@jkeenan - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Oct 29, 2017
@p5pRT
Copy link
Author

p5pRT commented Oct 29, 2017

From @khwilliamson

On 10/29/2017 06​:40 AM, Dagfinn Ilmari Mannsåker via RT wrote​:

Note the use of present tense for the whole 5.28 section. This was
changed in commit dcc013e, after all
the deprecated features had been removed.

Present tense seems to me to be valid only in the 5.27 series, and
arguably in 5.28, though it sounds funny to me for there. Are we going
to remember to switch to past tense in 5.29?

@p5pRT
Copy link
Author

p5pRT commented Oct 29, 2017

From @ilmari

Karl Williamson <public@​khwilliamson.com> writes​:

On 10/29/2017 06​:40 AM, Dagfinn Ilmari Mannsåker via RT wrote​:

Note the use of present tense for the whole 5.28 section. This was
changed in commit dcc013e, after all
the deprecated features had been removed.

Present tense seems to me to be valid only in the 5.27 series, and
arguably in 5.28, though it sounds funny to me for there. Are we going
to remember to switch to past tense in 5.29?

Instead of changing them to past tense, we could change it from "in
5.28" to "as of 5.28" or similar, and we could do that before 5.28 is
out.

- ilmari
--
- Twitter seems more influential [than blogs] in the 'gets reported in
  the mainstream press' sense at least. - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
  to a mainstream media article. - Calle Dybedahl

@p5pRT
Copy link
Author

p5pRT commented Oct 30, 2017

From @khwilliamson

On 10/29/2017 01​:06 PM, Dagfinn Ilmari Mannsåker via RT wrote​:

Karl Williamson <public@​khwilliamson.com> writes​:

On 10/29/2017 06​:40 AM, Dagfinn Ilmari Mannsåker via RT wrote​:

Note the use of present tense for the whole 5.28 section. This was
changed in commit dcc013e, after all
the deprecated features had been removed.

Present tense seems to me to be valid only in the 5.27 series, and
arguably in 5.28, though it sounds funny to me for there. Are we going
to remember to switch to past tense in 5.29?

Instead of changing them to past tense, we could change it from "in
5.28" to "as of 5.28" or similar, and we could do that before 5.28 is
out.

- ilmari

+1

@p5pRT
Copy link
Author

p5pRT commented Oct 30, 2017

From @ilmari

Karl Williamson <public@​khwilliamson.com> writes​:

On 10/29/2017 01​:06 PM, Dagfinn Ilmari Mannsåker via RT wrote​:

Karl Williamson <public@​khwilliamson.com> writes​:

On 10/29/2017 06​:40 AM, Dagfinn Ilmari Mannsåker via RT wrote​:

Note the use of present tense for the whole 5.28 section. This was
changed in commit dcc013e, after all
the deprecated features had been removed.

Present tense seems to me to be valid only in the 5.27 series, and
arguably in 5.28, though it sounds funny to me for there. Are we going
to remember to switch to past tense in 5.29?

Instead of changing them to past tense, we could change it from "in
5.28" to "as of 5.28" or similar, and we could do that before 5.28 is
out.

- ilmari

+1

Done in commit d1f1f35 for present and
present perfect senteces. Simple past sentences have been left as is.

--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant