[issue12412] non defined representation for pwd.struct_passwd

2011-07-13 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Actually, I’ve found that there are some structseq’s repr that get tested in 
the CPython test suite.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12412] non defined representation for pwd.struct_passwd

2011-07-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

pypy did not use a structseq in this case. Fixed in (pypy's repo) dded6e510044

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue12412] non defined representation for pwd.struct_passwd

2011-07-03 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

But pypy passed the attribute access tests in the test suite?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12412] non defined representation for pwd.struct_passwd

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

The docs indeed don’t say more that “Password database entries are reported as 
a tuple-like object, whose attributes correspond to the members of the passwd 
structure”; no mention is made of named tuple or struct sequence.

I think there is no bug for CPython; you may want to suggest friendlier reprs 
for structseqs to PyPy.

--
nosy: +benjamin.peterson, eric.araujo
resolution:  - works for me
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12412] non defined representation for pwd.struct_passwd

2011-06-25 Thread Francisco Garcia

New submission from Francisco Garcia pub...@francisco-garcia.net:

pwd.struct_passwd has different representations in cpython 2.7.2 and pypy 1.5

A unit test from cpython might enforce the same representation across 
interpreters:

 print pwd.getpwuid(os.getuid())

Current cpython output:

pwd.struct_passwd(pw_name='demo_user', pw_passwd='', pw_uid=1001, 
pw_gid=100, pw_gecos='demo_user', pw_dir='/Users/demo_user', 
pw_shell='/bin/bash')

Current pypy output
('demo_user', '', 1001, 100, 'demo_user', '/Users/demo_user', 
'/bin/bash')

--
messages: 139090
nosy: fgarciar
priority: normal
severity: normal
status: open
title: non defined representation for pwd.struct_passwd
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12412] non defined representation for pwd.struct_passwd

2011-06-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Looks like the difference between a regular tuple and a named tuple.  The 
correct test is to access the members using the names, and the test suite 
currently does this.  The repr shouldn't, I think, be required to be identical.

On the other hand, if pypy is implementing named tuples and the repr doesn't 
include the names, perhaps there is a missing test in the tests of named tuples.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com