[issue18678] Wrong struct members name for spwd module

2014-03-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed with David's latest analysis. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18678 ___

[issue18678] Wrong struct members name for spwd module

2014-03-07 Thread R. David Murray
R. David Murray added the comment: Revisiting this with fresh eyes, I no longer think this was a typo, and I think we shouldn't have changed it and should change it back (but keep the 'p' names as aliases for those who expect the man page names to be valid). My logic is: 'sp_namp' is so named

[issue18678] Wrong struct members name for spwd module

2013-11-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b0ca1a7a3ca by R David Murray in branch 'default': #18678: Correct names of spwd struct members. http://hg.python.org/cpython/rev/1b0ca1a7a3ca -- nosy: +python-dev ___ Python tracker

[issue18678] Wrong struct members name for spwd module

2013-11-03 Thread R. David Murray
R. David Murray added the comment: Thanks, Vajrasky. I elected to apply this only to default, since it hasn't caused any real-world problems. The (small but non-zero) chance of breaking someone's code in the maintenance releases doesn't seem justified by the nature of the fix. --

[issue18678] Wrong struct members name for spwd module

2013-11-03 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18678 ___ ___

[issue18678] Wrong struct members name for spwd module

2013-10-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: I think giving deprecation message when accessing incorrect attribute from spwd struct is not practical. You're right, R. David Murray, as you can see in spwd_struct_members_name_fix_v2.patch. So I make a simpler patch. I just give a deprecation message in the

[issue18678] Wrong struct members name for spwd module

2013-08-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the patch to accommodate R. David Murray's request. Accessing invalid attributes such as sp_nam and sp_pwd from spwd tuple will generate deprecation warning message. Also, I added test function so we can run spwd module directly. This is useful

[issue18678] Wrong struct members name for spwd module

2013-08-07 Thread Vajrasky Kok
New submission from Vajrasky Kok: Both python2 and python3 have this behaviour. import os; os.getuid() 0 'I am root' 'I am root' import spwd spwd.getspnam('bin') spwd.struct_spwd(sp_nam='bin', sp_pwd='*', sp_lstchg=15558, sp_min=0, sp_max=9, sp_warn=7, sp_inact=-1, sp_expire=-1,

[issue18678] Wrong struct members name for spwd module

2013-08-07 Thread R. David Murray
R. David Murray added the comment: Ideally, for backward compatibility reasons we really ought to support access by the old (incorrect) name even in 3.4 (with a deprecation warning, even more ideally). I'm not sure if that's practical? -- nosy: +r.david.murray