[issue3132] implement PEP 3118 struct changes

2011-09-05 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Yes, definitely. I'm going to push a new memoryview implementation
(complete for all 1D/native format cases) in a couple of days.

Once that is done, perhaps we could create a memoryview-struct
branch on top of that.

--
nosy: +skrah

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



[issue11682] PEP 380 reference implementation for 3.3

2011-09-05 Thread Zbyszek Szmek

Zbyszek Szmek zbys...@in.waw.pl added the comment:

I've created some documentation... The patches are the bitbucket repo.

Nothing is added to the tutorial, because I think that this isn't material for 
a newcomer to python. The tutorial doesn't mention generator.throw() and send() 
either, just talks a little about writing simple generator functions.

--
hgrepos: +66
nosy: +zbysz

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



[issue1172711] long long support for array module

2011-09-05 Thread Armin Rigo

Changes by Armin Rigo ar...@users.sourceforge.net:


--
nosy:  -arigo

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



[issue12897] Support for iterators in multiprocessing map

2011-09-05 Thread andrew cooke

New submission from andrew cooke and...@acooke.org:

http://stackoverflow.com/questions/7306522/combining-itertools-and-multiprocessing/7307078
 suggests (and the idea itself seems reasonable) that it would sometimes be 
useful for multiprocessing to operate correctly (ie lazily) with lazy input 
(iterables).  for example, if the input is large, or perhaps generated by some 
other process on demand.

obviously this complicates matters, given the asynchronous nature of a worker 
pool, and would mean re-allocating the results list as required.  but in 
principle i suspect it would be possible and might be a useful extension.

--
components: Library (Lib)
messages: 143511
nosy: acooke
priority: normal
severity: normal
status: open
title: Support for iterators in multiprocessing map
type: feature request
versions: Python 3.4

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



[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 9896fc2a8167 by Ezio Melotti in branch '3.2':
#12888: Fix a bug in HTMLParser.unescape that prevented it to escape more than 
128 entities.  Patch by Peter Otten.
http://hg.python.org/cpython/rev/9896fc2a8167

New changeset 7b6096852665 by Ezio Melotti in branch 'default':
#12888: merge with 3.2.
http://hg.python.org/cpython/rev/7b6096852665

--
nosy: +python-dev

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



[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-05 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Fixed, thanks for the report and the patch!

--
components: +Library (Lib) -None
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed
versions: +Python 3.3

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



[issue12117] Failures with PYTHONDONTWRITEBYTECODE: test_importlib, test_imp, test_distutils, test_packaging, test_runpy, test_import

2011-09-05 Thread Éric Araujo

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

Alright, closing.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue12886] datetime.strptime parses input wrong

2011-09-05 Thread Heiðar Rafn Harðarson

Heiðar Rafn Harðarson heidar.r...@hrolfsskali.net added the comment:

My understanding of the python documentation and the ISO 8601 standard is that 
the digits in a timestamp representing hours, minutes and seconds shall always 
be in pairs of 2 digits (hh, mm, ss), i.e. when a number is less than 10 it 
should be preceded by 0. 
In the example I give, the minute figure is split between minutes and seconds 
by the  python library function which I consider a bug: 
datetime.datetime.strptime('20110817T1234','%Y%m%dT%H%M%S') 
gives
datetime.datetime(2011, 8, 17, 12, 3, 4)

--

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



[issue12659] Add tests for packaging.tests.support

2011-09-05 Thread Éric Araujo

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

Follow the link titled “review” on the right of your patch in the list of files 
above the messages.

--

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



[issue12886] datetime.strptime parses input wrong

2011-09-05 Thread Heiðar Rafn Harðarson

Heiðar Rafn Harðarson heidar.r...@hrolfsskali.net added the comment:

This issue is also discussed here: http://bugs.python.org/issue5979

--

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



[issue10914] Python sub-interpreter test

2011-09-05 Thread Éric Araujo

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

 Except that it didn't work under Windows...
Ah.  If it was an extension module, I’d have a clue (the debug thing), but I 
know nothing about embedding.  An alternative would be to install the file with 
the msi system and use a project file to have it compiled (sounds like much 
hassle).

--

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



[issue10914] Python sub-interpreter test

2011-09-05 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Ah.  If it was an extension module, I’d have a clue (the debug thing),
 but I know nothing about embedding.  An alternative would be to
 install the file with the msi system and use a project file to have it
 compiled (sounds like much hassle).

Agreed, but it's not something that I know how to do :)
(and yet, of course, it would be good to test that embedding works under
Windows too, as well as under Unix installs)

--

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



[issue11957] re.sub confusion between count and flags args

2011-09-05 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

See also #12888 for an error in the stdlib caused by this.

--

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



[issue12841] Incorrect tarfile.py extraction

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 2bc122347351 by Lars Gustäbel in branch '3.2':
Issue #12841: Fix tarfile extraction of non-existent uids/gids.
http://hg.python.org/cpython/rev/2bc122347351

New changeset da59abc0ce3b by Lars Gustäbel in branch 'default':
Merge with 3.2: Issue #12841: Fix tarfile extraction of non-existent uids/gids.
http://hg.python.org/cpython/rev/da59abc0ce3b

New changeset b64ef2951093 by Lars Gustäbel in branch '2.7':
Issue #12841: Fix tarfile extraction of non-existent uids/gids.
http://hg.python.org/cpython/rev/b64ef2951093

--
nosy: +python-dev

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-05 Thread higery

higery shoulderhig...@gmail.com added the comment:

I have run the 'test_install_lib' on cpython3.3(windows version), the
'test_install_error' failed.

The detail is:

*FAIL: test_install_error (__main__.InstallLibTestCase)
--
Traceback (most recent call last):
  File D:\add-develop-command\Lib\distutils\tests\test_install_lib.py,
line 112, in test_install_error
cmd.run()
AssertionError: DistutilsFileError not raised*

The corresponding lines are:
*
with self.assertRaises(DistutilsFileError) as cm:
cmd.run()*

--
Added file: http://bugs.python.org/file23101/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7219
___I have run the #39;test_install_lib#39; on cpython3.3(windows version), the 
#39;test_install_error#39; failed.brbrThe detail is: brbrbFAIL: 
test_install_error 
(__main__.InstallLibTestCase)br--br
Traceback (most recent call last):br  File 
quot;D:\add-develop-command\Lib\distutils\tests\test_install_lib.pyquot;, 
line 112, in test_install_errorbr    cmd.run()brAssertionError: 
DistutilsFileError not raised/bbr
brThe corresponding lines are:brbbrwith 
self.assertRaises(DistutilsFileError) as cm:br        cmd.run()/bbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Also see fdopendir(3) which allows you to pass an open file descriptor to get a 
C dirent struct.

This is implemented in the os module too but instead of returning a struct, it 
returns a list.

--

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



[issue12841] Incorrect tarfile.py extraction

2011-09-05 Thread Lars Gustäbel

Lars Gustäbel l...@gustaebel.de added the comment:

Close as fixed. Thanks all!

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings

New submission from Larry Hastings la...@hastings.org:

With the recent spate of POSIX *at() functions added to os, we now have a bunch 
of places in the API that take directory fds.  But afaict there's no way to get 
a directory fd in Python!  The only calls to opendir() in the tree are 
internal, in os.listdir() and in the import machinery.  (Though in practice 
most people will use AT_FDCWD anyway.)

I propose adding a new function, os.opendir(), the implementation to be much 
the same as (aka a hacked-up copy and paste of) os.unlink() in 
Modules/posixmodule.c.  I'd be happy to contribute the patch.

--
components: Extension Modules
messages: 143522
nosy: larry
priority: normal
severity: normal
status: open
title: add opendir() for POSIX platforms
type: feature request
versions: Python 3.3

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-05 Thread Éric Araujo

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

 I really don't think C error messages are portable, so you shouldn't
 test for them :)

Too bad.  I’ll have to be satisfied with a manual test from Michael then.

--

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

opendir opens a C dirent structure with an underlying file descriptor.

However, to open a directory file descriptor, simple use:
 os.open(/tmp, os.O_RDONLY)

This can then be used as the fd to the functions which require a directory fd 
like os.openat()

Cheers
Ross

--
nosy: +rosslagerwall

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



[issue12899] Change os.utimensat() and os.futimens() to use float for atime mtime

2011-09-05 Thread Larry Hastings

New submission from Larry Hastings la...@hastings.org:

The new functions os.futimens() and os.utimensat() update the timestamps of a 
file with nanosecond precision.  However, both functions take atime and mtime 
as a tuple: (seconds since epoch, nanoseconds).  Contrast this with os.utime(), 
which produces atime and mtime as a floating point number of seconds since 
epoch.

Why the mismatch between the APIs?  It simply forces the user to do the 
conversion themselves.  You can see this in the regression tests for these two 
functions--there's a lot of multiplying by 1e9 going on.

The only justification I can contrive is that the conversion of 
(secs+(1e-9*nsecs)) can be inaccurate; a double would need roughly one more 
byte of mantissa to be able to accurately preserve all possible nanosecond 
values.  But that ship has sailed--os.utime() produces inaccurate results, and 
afaik there's no other way to do it in the Python library.

os.futimens() and os.utimensat() should take atime and mtime in the 
floating-point format as produced by os.utime().

I'm happy to contribute the patch.

--
components: Extension Modules
messages: 143529
nosy: larry
priority: normal
severity: normal
status: open
title: Change os.utimensat() and os.futimens() to use float for atime  mtime
type: behavior
versions: Python 3.3

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



[issue8286] distutils: path '[...]' cannot end with '/' -- need better error message

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 6cd8c1582dff by Éric Araujo in branch '3.2':
Warn instead of crashing because of invalid path in MANIFEST.in (#8286).
http://hg.python.org/cpython/rev/6cd8c1582dff

New changeset b42661daa5cc by Éric Araujo in branch 'default':
Merge fix for #8286 from 3.2
http://hg.python.org/cpython/rev/b42661daa5cc

--
nosy: +python-dev

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



[issue8286] distutils: path '[...]' cannot end with '/' -- need better error message

2011-09-05 Thread Éric Araujo

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

This should now be fixed.

--
resolution:  - fixed
stage: test needed - committed/rejected
status: open - closed

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



[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-05 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

anikom15's first patch seems correct. In the multiprocessing.py, the the arg 
'obj' can be safely replaced with 'item' to be consistent with the docs. As 
this is not a keyword arg, it does not stand any chance of breaking any 
backwards compatibility. It looks me to that when multiprocessing' Queue.put 
was coding the first arg was wrongly mentioned as 'obj' instead of 'item'.

I shall commit the first patch unless someone objects to the above reasoning.

--
assignee: docs@python - orsenthil
nosy: +orsenthil

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



[issue12897] Support for iterators in multiprocessing map

2011-09-05 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Since it's a feature request, I would suggest to look whether it can apply to 
concurrent.futures instead.

--
nosy: +pitrou
versions: +Python 3.3 -Python 3.4

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



[issue12885] distutils.filelist.findall() fails on broken symlink in Py2.x

2011-09-05 Thread Éric Araujo

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

 I've come across it as I'm creating a Debian package of the Python
 package in the same tree

I think a lot of people are doing this.

 The broken symlinks are relative and in debian/tmp, and will point to
 locations provided by other Debian packages once my package is
 installed in the right location.

It’s too bad that filelist goes into the debian subdirectory :(  The 
Ubuntu-originated python-distutils-extra project had a similar problem and they 
switched from FileList.findall to os.walk to avoid it.

What happens if you ignore the debian dir in MANIFEST.in?

--

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



[issue8286] distutils: path '[...]' cannot end with '/' -- need better error message

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 9cdc845d5f2e by Éric Araujo in branch '2.7':
Warn instead of crashing because of invalid path in MANIFEST.in (#8286).
http://hg.python.org/cpython/rev/9cdc845d5f2e

--

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

Well, there's no os.fdopendir(); I think you're referring to fdlistdir(), which 
uses the C function fdopendir() internally.  The DIR structure is not exposed 
to the Python caller at any point.

I did miss the whole opendir-returns-a-DIR-not-a-fd thing, hopefully that's my 
dumb thing of the day.  This suggests opendir() would have to call dirfd() on 
your behalf.

Would it be safe to call close() on the fd returned from dirfd(opendir())?  If 
not, I guess we'd need a special closedir() function, which would use the C 
functions fdopendir() then closedir() internally.

... or we could forget the whole thing, I guess.

--

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, is there any case where fdlistdir() is not sufficient?

--
nosy: +pitrou

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

fdlistdir() is largely irrelevant to the discussion.  I was proposing adding a 
function to open directory fds, because there isn't one; fdlistdir(), like many 
other POSIX functions available in Python, consumes directory fds.

--

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



[issue12900] Use universal newlines mode for setup.cfg

2011-09-05 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

We need tests to make sure that setup.cfg files using CRLF or CR as newline 
character work.  We could require that people use LF in the spec, but I don’t 
think it’s worth it, as it’s simple enough to support all newlines whereas 
Windows users can’t always use LF easily.

For packaging in 3.3, opening the file in text mode gives us universal newlines 
for free, so the code is good but we need tests.  For distutils2 in 2.x, we 
need to pass 'rU' as open flags.

--
assignee: tarek
components: Distutils2
keywords: easy
messages: 143539
nosy: alexis, eric.araujo, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: Use universal newlines mode for setup.cfg
type: behavior
versions: 3rd party, Python 3.3

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



[issue12899] Change os.utimensat() and os.futimens() to use float for atime mtime

2011-09-05 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

See #11457 for a long discussion about the API and whether to use decimal or 
not to get the full precision.

--
nosy: +rosslagerwall

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



[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-05 Thread Éric Araujo

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

I think it’s not an implicit vs. explicit call problem, rather repr vs. str.

IIRC, in 2.x it is allowed that __str__ returns a unicode object, and str will 
convert it to a str.  To do that, it will use the default encoding, which is 
ASCII in 2.5+, so your example cannot work.

Ideas for work-arounds:
- write a displayhook (http://docs.python.org/dev/library/sys#sys.displayhook) 
that converts unicode objects using sys.stout.encoding
- for 2.6+, test if setting PYTHONIOENCODING changes soemthing

--
nosy: +eric.araujo, lemburg
versions:  -Python 2.6

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



[issue7425] Improve the robustness of pydoc -k in the face of broken modules

2011-09-05 Thread Éric Araujo

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

Does this patch solves only pydoc -k, not all “invalid spam module makes pydoc 
crash”?  (I wanted to consolidate the handful of reports we have into one but 
did not get the time.)

--
nosy: +eric.araujo
title: [PATCH] Improve the robustness of pydoc -k in the face of broken 
modules - Improve the robustness of pydoc -k in the face of broken modules

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



[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-05 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

Well, I should take back my previous comment. I realized that the positional 
arg in this case can be called as keyword arg. It would be wrong to change 
multiprocessing.py and it is correct to change the docs.

--

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



[issue11473] upload command no longer accepts repository by section name

2011-09-05 Thread Éric Araujo

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

I started working on a test for this in packaging and it’s worse than I 
expected: it does not support multiple repositories at all.  The config parser 
has bogus tests and the upload command has no test for this.  I will work on 
fixing this in packaging and backport.

--
assignee: tarek - eric.araujo
components: +Distutils2
nosy: +alexis
versions: +3rd party, Python 2.7, Python 3.3

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 I was proposing adding a function to open directory fds, because 
 there isn't one; fdlistdir(), like many other POSIX functions 
 available in Python, consumes directory fds.

I don't think I understand. This already works:

 fd = os.open(Misc, os.O_RDONLY)
 os.fdlistdir(fd)
['python.pc', 'README.coverity', 'ACKS.orig', 'NEWS.orig', 'HISTORY', 
'python.man', 'valgrind-python.supp', 'TextMate', 'python-config.in', 'NEWS', 
'RPM', 'vgrindefs', 'svnmap.txt', 'python-wing4.wpr', 'gdbinit', 'build.sh', 
'README.AIX', 'Vim', 'SpecialBuilds.txt', 'indent.pro', 'python-wing3.wpr', 
'ACKS', 'README', 'README.valgrind', 'Porting', 'python.pc.in']

Is there anything you want to do on a directory fd except listing its 
contents?

--

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

 Is there anything you want to do on a directory fd
 except listing its contents?

In the first message in this bug, I wrote: With the recent spate of POSIX 
*at() functions added to os, we now have a bunch of places in the API that take 
directory fds.  To be specific:  faccessat, fchmodat, fchownat, fstatat, 
futimesat, linkat, mkdirat, mknodat, openat, readlinkat, renameat, symlinkat, 
unlinkat, utimensat, mkfifoat.

At the time I created this ticket I didn't realize you could just call open() 
on a directory.  It seem that works fine and is supported everywhere that these 
*at functions exist, so perhaps it's best if we just close this ticket.

--

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



[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset c6d4d4d64405 by Senthil Kumaran in branch '3.2':
Fix closes Issue11155  - Correct the multiprocessing.Queue.put's arg (replace 
'item' with 'obj') in the docs. Patch by Westley Martínez.
http://hg.python.org/cpython/rev/c6d4d4d64405

New changeset 8f1187288fac by Senthil Kumaran in branch 'default':
merge from 3.2. Fix closes Issue11155  - Correct the 
multiprocessing.Queue.put's arg (replace 'item' with 'obj') in the docs. Patch 
by Westley Martínez.
http://hg.python.org/cpython/rev/8f1187288fac

New changeset d29c9006d770 by Senthil Kumaran in branch '2.7':
merge from 3.2.  Fix closes Issue11155  - Correct the 
multiprocessing.Queue.put's arg (replace 'item' with 'obj') in the docs. Patch 
by Westley Martínez.
http://hg.python.org/cpython/rev/d29c9006d770

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - works for me
status: open - closed

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



[issue5845] rlcompleter should be enabled automatically

2011-09-05 Thread Éric Araujo

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

We can’t just decide to enable completion by checking “'readline' in 
sys.modules” in site, because it always returns False.  site is imported in 
Python/pythonrun.c, and I guess that Modules/main.c is run afterwards.  More 
importantly, I think the import of readline in Modules/main.c is a CPython 
implementation detail, and I’d prefer to have code in site that is directly 
useful for other VMs.  (I’d go as far as proposing to remove the import 
readline from main.c, when my patch makes it obsolete.)

I re-read the docs for sys.argv and the -m switch and decided to translate to C 
checks (“command == NULL  filename == NULL  module == NULL”) to “if not 
sys.argv[0]”.  Unfortunately, sys.argv is not available when site is imported, 
so this is a dead end :(

So, I could try your _setupinteractive module idea, even though I think it’s a 
bit unclean, or drink the cool aid and set up completion in main.c.

--

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



[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 At the time I created this ticket I didn't realize you could
 just call open() on a directory.

Yes, os.open or os.openat.

--
nosy: +haypo

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



[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I think that this issue is a duplicate of #4947 which has been fixed in Python 
2.7.1. Can you retry with Python 2.7.2 (or 2.7.1)?

--
nosy: +haypo

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



[issue12779] Update packaging documentation

2011-09-05 Thread Éric Araujo

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

To make commit review possible, I thought I’d make two patches for this: the 
first would be only markup fixes and minimal updates to match the reality of 
the code (i.e. convert setup.py examples to setup.cfg or pysetup, remove 
obsolete parts, etc.) and a second one with more rephrasing and reorganization 
(i.e. file deletions, moving chunks of docs, etc.).  I’m not finished on the 
first patch and the diff already contains 1026 insertions and 921 deletions.

So, as potential commit reviewers, do you think I should
- 1) go ahead with my initial plan of a huge boring commit and a more 
interesting commit
- 2) just make one commit
- 3) one commit per file (with boring markup changes + non-boring changes)

--
nosy: +ezio.melotti, sandro.tosi

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



[issue12901] Nest class/methods directives in documentation

2011-09-05 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

I picked up a few files in Doc/library and updated their markup to use 
directives nesting.  The attached patch is the result; it’s a lot of changes 
for small benefit.  If we think it’s a good change anyway, I have two questions

- Do you think it would be a good idea to have the -checkins emails ignore 
whitespace changes in some cases?  (I’m thinking a magic string in the commit 
message)

- A number of files have a class directive near the top of the file, in the 
list of all public names, and a later section “XX objects” with the methods and 
attributes.  When this is changed to nested class/methods directives, sometimes 
the first class directive gets a noindex flag, but I think it should jsut be 
removed: the index in the sidebar is enough to let people jump to the doc.  Do 
you agree?

--
assignee: docs@python
components: Documentation
messages: 143552
nosy: benjamin.peterson, docs@python, eric.araujo, georg.brandl
priority: normal
severity: normal
status: open
title: Nest class/methods directives in documentation
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue12901] Nest class/methods directives in documentation

2011-09-05 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
keywords: +patch
Added file: http://bugs.python.org/file23102/doc-nest-methods-3.2.diff

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



[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-05 Thread Tomasz Melcer

Tomasz Melcer li...@o2.pl added the comment:

Debian SID. No, it wasn't.

Python 2.7.2+ (default, Aug 16 2011, 09:23:59) 
[GCC 4.6.1] on linux2
Type help, copyright, credits or license for more information.
 class T(object):
... def __repr__(self): return u'あみご'
... 
 T().__repr__()
u'\u3042\u307f\u3054'
 print T().__repr__()
あみご
 T()
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: 
ordinal not in range(128)
 print T()
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: 
ordinal not in range(128)
 import sys
 sys.stdin.encoding
'UTF-8'
 sys.stdout.encoding
'UTF-8'

--

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



[issue5845] rlcompleter should be enabled automatically

2011-09-05 Thread Cherniavsky Beni

Cherniavsky Beni b...@google.com added the comment:

Easily detecting interactive mode is of general interest for customization.

1. What if C also set sys.flags.interactive in python mode,
   or exposed sys.flags.implicit_interactive (but with better name)?

2. It's more useful to have a hook called when entering interactive mode,
   rather than a flag that's set from the beginning:

   $ python -i -c 'import sys; print sys.flags.interactive'
   1


   For this, importing _setupinteractive is a step forward;
   calling e.g. sys.__interactivehook__ sounds even better.
   (site.py would set it by default to a function that enables
   rlcompleter, user can always override...)

BTW, drawback of doing any such setup in site.py: python -S would 
be unfriendly!

--

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



[issue12899] Change os.utimensat() and os.futimens() to use float for atime mtime

2011-09-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

I'm withdrawing this, as I've found a better way to approach the problem.

--
resolution:  - rejected
status: open - closed

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



[issue12902] help(modules) executes module code

2011-09-05 Thread dronus

New submission from dronus paul.geis...@web.de:

When running help(modules), some code of the modules seems to be run. For 
example, on my Gnome system KWallet  configuration GUI pops up and stalls 
further opereation. I think no one expect help(modules) run abitrary code 
instead of just outputting a list of modules.

--
components: None
messages: 143556
nosy: dronus
priority: normal
severity: normal
status: open
title: help(modules) executes module code
type: behavior
versions: Python 2.7

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



[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset d95c4b030eac by Victor Stinner in branch '2.7':
Issue #12326: Remove plat-linux3 directory
http://hg.python.org/cpython/rev/d95c4b030eac

New changeset cb47cf5138a4 by Victor Stinner in branch '3.2':
Issue #12326: Remove plat-linux3 directory
http://hg.python.org/cpython/rev/cb47cf5138a4

--

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



[issue12903] test_io.test_interrupte[r]d* blocks on OpenBSD

2011-09-05 Thread Remi Pointel

New submission from Remi Pointel pyt...@xiri.fr:

Hi,

these tests block on OpenBSD:

-test_interrupted_write_unbuffered()
-test_interrupted_write_buffered()
-test_interrupted_write_text()
-test_interrupterd_read_retry_buffered()
-test_interrupterd_read_retry_text()
-test_interrupterd_write_retry_buffered()
-test_interrupterd_write_retry_text()

I have a patch which skip these tests, to have a full test_io.py regress tests 
but I think it's not the proper solution.

Thanks for your help,

Remi.

--
files: patch-Lib_test_test_io_py
messages: 143558
nosy: rpointel
priority: normal
severity: normal
status: open
title: test_io.test_interrupte[r]d* blocks on OpenBSD
versions: Python 3.2
Added file: http://bugs.python.org/file23103/patch-Lib_test_test_io_py

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



[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Debian SID. No, it wasn't.

Oh ok, gotcha: repr() always returns a str string. If obj.__repr__() returns a 
Unicode string, the string is encoded to the default encoding. By default, the 
default encoding is ASCII.

$ ./python -S 
Python 2.7.2+ (2.7:85a12278de69, Sep  2 2011, 00:21:57) 
[GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux2
 import sys
 sys.setdefaultencoding('ISO-8859-1')
 class A(object):
...  def __repr__(self): return u'\xe9'
... 
 repr(A())
'\xe9'

Don't do that at home! Change the default encoding is not a good idea.

I don't think that repr(obj) can be changed to return Unicode if 
obj.__repr__() returns Unicode. It is too late to change such thing in Python 
2.

--

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



[issue12353] argparse cannot handle empty arguments

2011-09-05 Thread Torsten Landschoff

Torsten Landschoff t.landsch...@gmx.net added the comment:

ping!?

I think this should be either applied or dropped. It does not make sense to 
have such a simple issue rot in the bug tracker...

--

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



[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 0fe571d43317 by Victor Stinner in branch '2.7':
Update sys.platform doc for #12326.
http://hg.python.org/cpython/rev/0fe571d43317

--

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



[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I removed Lib/plat-linux3 from Python 2.7 and 3.2, and updated doc of Python 
2.7. I close this issue (again).

--
status: open - closed

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



[issue12904] Change os.utime c functions to use nanosecond precision where possible

2011-09-05 Thread Larry Hastings

New submission from Larry Hastings la...@hastings.org:

Since Linux 2.5 stat() has supported reading nanosecond resolution (1b/sec) for 
atime and mtime.  However, the utime() family of functions could only write 
atime and mtime with microsecond resolution (1m/sec) until relatively recently.

On POSIX platforms Python reads atime and mtime at nanosecond resolution but 
only writes them at microsecond resolution.  This impedance mismatch can cause 
undesirable behavior.  Consider the following code:

import os
import shutil
import sys

def mtime(path):
  return os.stat(path).st_mtime

src = sys.argv[0]
dest = src + .new
shutil.copy2(src, dest)
assert mtime(src) == mtime(dest)

When run under Python on any modern Linux system, the assert fails.  (I think 
any Python since 2.5 will do; I tested with 2.7.1 and a fresh 3.3 trunk.)

The accompanying patch modifies Modules/posixmodule.c so all functions that 
write atime and mtime use nanosecond resolution when possible.  With this patch 
applied, all the regression tests pass (except the ones for extension modules I 
didn't compile), and the above code runs to completion.

Happy to hoist the patch up on Rietveld if there's interest.

p.s. I have the commit bit set, so I'd like to be the one to check this in if 
we get that far.

--
assignee: larry
components: Extension Modules
files: larry.utimensat.patch.r1
messages: 143563
nosy: larry
priority: normal
severity: normal
status: open
title: Change os.utime c functions to use nanosecond precision where possible
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file23104/larry.utimensat.patch.r1

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



[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread Remi Pointel

New submission from Remi Pointel pyt...@xiri.fr:

Hi,

I have few problems in test_socket.py.

1) test_sendall_interrupted blocks on OpenBSD, I must Ctrl+c to interrupt the 
test. I added a skip to have full regress tests, but I think it's not the 
proper way.
I have run it into gdb, and ctrl+c it:
test_sendall_interrupted (__main__.GeneralModuleTests) ... [New process 20677]
^C
Program received signal SIGINT, Interrupt.
0x000206d2378a in poll () from /usr/lib/libc.so.60.1
(gdb) bt
#0  0x000206d2378a in poll () from /usr/lib/libc.so.60.1
#1  0x000205f4e4aa in _thread_kern_poll (wait_reqd=Variable wait_reqd is 
not available.
)
at /usr/src/lib/libpthread/uthread/uthread_kern.c:780
#2  0x000205f4f3a8 in _thread_kern_sched (scp=0x0)
at /usr/src/lib/libpthread/uthread/uthread_kern.c:382
#3  0x000205f43ade in sendto (fd=8, msg=0x2047bb040, len=1044480, flags=0, 
to=0x0, to_len=0)
at /usr/src/lib/libpthread/uthread/uthread_sendto.c:63
#4  0x000210a5b243 in sock_sendall (s=0x20115c948, args=0x2011510d0)
at /usr/ports/pobj/Python-3.2.2/Python-3.2.2/Modules/socketmodule.c:2699
#5  0x00468992 in PyEval_EvalFrameEx (f=0x20a281c30, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:3921
#6  0x0046a95c in PyEval_EvalCodeEx (_co=0x20fc581b0, globals=Variable 
globals is not available.
) at Python/ceval.c:3350
#7  0x00466df6 in PyEval_EvalFrameEx (f=0x20a9a3c30, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:4019
#8  0x00468c1a in PyEval_EvalFrameEx (f=0x2033af030, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:4009
#9  0x0046a95c in PyEval_EvalCodeEx (_co=0x2028a9de8, globals=Variable 
globals is not available.
) at Python/ceval.c:3350
#10 0x00466df6 in PyEval_EvalFrameEx (f=0x2052f1430, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:4019
#11 0x0046a95c in PyEval_EvalCodeEx (_co=0x2028a9f58, globals=Variable 
globals is not available.
) at Python/ceval.c:3350
#12 0x00511ce3 in function_call (func=0x2050d5620, arg=0x20115d330, 
kw=0x2052f0030)
at Objects/funcobject.c:629
#13 0x004e4a7f in PyObject_Call (func=0x2050d5620, arg=0x20115d330, 
kw=0x2052f0030)
at Objects/abstract.c:2149
#14 0x0046456d in PyEval_EvalFrameEx (f=0x2052f0e30, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:4236
#15 0x0046a95c in PyEval_EvalCodeEx (_co=0x2028ad268, globals=Variable 
globals is not available.
) at Python/ceval.c:3350
#16 0x00511ce3 in function_call (func=0x2050d5790, arg=0x20115d240, 
kw=0x0)
at Objects/funcobject.c:629
#17 0x004e4a7f in PyObject_Call (func=0x2050d5790, arg=0x20115d240, 
kw=0x0)
at Objects/abstract.c:2149
#18 0x004ff349 in method_call (func=0x2050d5790, arg=0x20115a5a0, 
kw=0x0)
at Objects/classobject.c:319
#19 0x004e4a7f in PyObject_Call (func=0x20115d150, arg=0x20115a5a0, 
kw=0x0)
at Objects/abstract.c:2149
#20 0x0042cb66 in slot_tp_call (self=Variable self is not available.
) at Objects/typeobject.c:5044
#21 0x004e4a7f in PyObject_Call (func=0x20113b680, arg=0x20115a5a0, 
kw=0x0)
at Objects/abstract.c:2149
#22 0x004628fb in PyEval_EvalFrameEx (f=0x2071dc030, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:4141
#23 0x0046a95c in PyEval_EvalCodeEx (_co=0x2086db6b8, globals=Variable 
globals is not available.
) at Python/ceval.c:3350
#24 0x00511ce3 in function_call (func=0x2086de1d0, arg=0x20115d1c8, 
kw=0x2071dd430)
at Objects/funcobject.c:629
#25 0x004e4a7f in PyObject_Call (func=0x2086de1d0, arg=0x20115d1c8, 
kw=0x2071dd430)
at Objects/abstract.c:2149
#26 0x0046456d in PyEval_EvalFrameEx (f=0x2071dde30, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:4236
#27 0x0046a95c in PyEval_EvalCodeEx (_co=0x2086db490, globals=Variable 
globals is not available.
) at Python/ceval.c:3350
#28 0x00511ce3 in function_call (func=0x2086de060, arg=0x20113f420, 
kw=0x0)
at Objects/funcobject.c:629
#29 0x004e4a7f in PyObject_Call (func=0x2086de060, arg=0x20113f420, 
kw=0x0)
at Objects/abstract.c:2149
#30 0x004ff349 in method_call (func=0x2086de060, arg=0x2011411b0, 
kw=0x0)
at Objects/classobject.c:319
#31 0x004e4a7f in PyObject_Call (func=0x20115d0d8, arg=0x2011411b0, 
kw=0x0)
at Objects/abstract.c:2149
#32 0x0042cb66 in slot_tp_call (self=Variable self is not available.
) at Objects/typeobject.c:5044
#33 0x004e4a7f in PyObject_Call (func=0x201138920, arg=0x2011411b0, 
kw=0x0)
at Objects/abstract.c:2149
#34 0x004628fb in PyEval_EvalFrameEx (f=0x2071dc430, throwflag=Variable 
throwflag is not available.
) at Python/ceval.c:4141
#35 0x0046a95c in PyEval_EvalCodeEx (_co=0x2086db6b8, globals=Variable 
globals is not available.
) at Python/ceval.c:3350
#36 

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread Remi Pointel

Remi Pointel pyt...@xiri.fr added the comment:

I add bt output with gdb 7, to have more informations.

--
Added file: http://bugs.python.org/file23105/OpenBSD_test_socket_gdb.log

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



[issue12904] Change os.utime c functions to use nanosecond precision where possible

2011-09-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

A small aside:

An IEEE 754 double is insufficient to store a modern timestamp with nanosecond 
accuracy.  We're currently at just over 1.3 billion seconds since the epoch.  
This eats 28 bits of the mantissa.  (The value is actually 31 bits to the left 
of the decimal point, but you get the leading 1 and the subsequent two 0s for 
free.)  Precisely storing a billion values to the right of the decimal point 
would require another 30 bits.  The mantissa of a double is sadly only 52 bits. 
 So we're shy by 6 bits, give or take.

So this patch doesn't make Python 100% accurate with respect to atime/mtime.  
What it *does* do is makes Python's loss of accuracy consistent.  I claim 
that's a definite improvement.

--

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



[issue9561] distutils: set encoding to utf-8 for input and output files

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset fb4d2e6d393e by Victor Stinner in branch '3.2':
Issue #9561: distutils now reads and writes egg-info files using UTF-8
http://hg.python.org/cpython/rev/fb4d2e6d393e

New changeset 3c080bf75342 by Victor Stinner in branch 'default':
Merge 3.2: Issue #9561: distutils now reads and writes egg-info files using 
UTF-8
http://hg.python.org/cpython/rev/3c080bf75342

--
nosy: +python-dev

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



[issue12904] Change os.utime c functions to use nanosecond precision where possible

2011-09-05 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

It's a duplicate of issue #11457.
(Python =3.3 has os.utimensat() and os.futimens().)

--
nosy: +Arfrever

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



[issue9561] distutils: set encoding to utf-8 for input and output files

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I applied pkginfo_utf8.patch to Python 3.2 and 3.3. Python 2.7 is not affected, 
it does already encode Unicode to UTF-8.

--

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



[issue9561] distutils: set encoding to utf-8 for input and output files

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 56ab3257ca13 by Victor Stinner in branch 'default':
Issue #9561: packaging now writes egg-info files using UTF-8
http://hg.python.org/cpython/rev/56ab3257ca13

--

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



[issue11457] Expose nanosecond precision from system calls

2011-09-05 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy: +skrah

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



[issue12904] Change os.utime c functions to use nanosecond precision where possible

2011-09-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

 It's a duplicate of issue #11457.

No.  #11457 is a how-many-angels-on-the-head-of-a-pin discussion proposing new 
representations of ctime/mtime/atime to preserve nanosecond accuracy.  This 
patch changes the behavior of os.utime, os.futimes, os.lutimes, and 
os.futimesat so they conserve all of the existing representation's accuracy, 
making them consistent with os.stat.

 (Python =3.3 has os.utimensat() and os.futimens().)

How is that relevant?

I mean, sure, I leveraged some of the work from that support in my patch--it's 
heavily reliant on the preprocessor macros HAVE_UTIMENSAT and HAVE_FUTIMENS now 
generated by configure.  (Thanks, Ross!)  But the presence of those functions 
does not mitigate the loss of accuracy inside os.utime c.

--

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



[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +haypo, neologix

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



[issue12903] test_io.test_interrupte[r]d* blocks on OpenBSD

2011-09-05 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
components: +Tests
nosy: +haypo, neologix, pitrou
stage:  - patch review
type:  - behavior
versions: +Python 2.7, Python 3.3

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



[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I hope that this issue is not related to threads+signals. We got many 
threads+signals issues on FreeBSD 6.

--

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



[issue11457] Expose nanosecond precision from system calls

2011-09-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

This is probably a terrible idea, but: what about using a subclass of float 
that internally preserves the original sec / usec values?  Call it a 
utime_float for now.  os.stat would produce them, and os.utime would look for 
them--and if it found one it'd pull out the precise numbers.

Type promotion as a result of binary operators:
  utime_float OP int   = utime_float
  utime_float OP float = degrades to float

I suspect code rarely does math on atime/utime/ctime and then writes out the 
result.  Most of the time they simply propogate the utime values around, 
comparing them to each other, or setting them unchanged.

For those rare occasions when someone wants to change the fractional part of a 
utime_float, we could provide a function utime_fractional(int) - utime_float.

Advantages:
 * Nobody has to change any Python code.  In almost all circumstances they
   get complete accuracy for free.

Disadvantages:
 * Complicated.
 * Is a yucky hack.
 * Is a terrible idea.  (Now I'm sure of it!)

--
nosy: +larry

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



[issue12567] curses implementation of Unicode is wrong in Python 3

2011-09-05 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset b1e03d10391e by Victor Stinner in branch 'default':
Issue #12567: Add curses.unget_wch() function
http://hg.python.org/cpython/rev/b1e03d10391e

--

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



[issue12567] curses implementation of Unicode is wrong in Python 3

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I'm not sure that it is correct to call nl_langinfo(CODESET) to get the locale 
encoding. The LC_CTYPE locale should maybe be set temporary to the current 
locale (), as does locale.getpreferredencoding(). Or maybe better, 
locale.getpreferredencoding() should be called.

--

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



[issue12567] curses implementation of Unicode is wrong in Python 3

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 The LC_CTYPE locale should maybe be set temporary to
 the current locale (), as does locale.getpreferredencoding().

See also issue #6203.

--

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



[issue12903] test_io.test_interrupte[r]d* blocks on OpenBSD

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

It looks similar to issue #12905: yet another threads+signals issue?

--

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



[issue12905] multiple errors in test_socket on OpenBSD

2011-09-05 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Issue #12903 is similar to this one.

--

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



[issue12906] Slight error in logging module's yaml config

2011-09-05 Thread Derrick Petzold

New submission from Derrick Petzold dpetz...@gmail.com:

Hello,

format: format=%(asctime)s - %(name)s - %(levelname)s - %(message)s

Should be:
 
format: %(asctime)s - %(name)s - %(levelname)s - %(message)s

Regards,

btw I have to say the logging module is just excellent. What a truly great 
work. ty.

--
assignee: docs@python
components: Documentation
messages: 143579
nosy: Derrick.Petzold, docs@python
priority: normal
severity: normal
status: open
title: Slight error in logging module's yaml config
versions: Python 2.7

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



[issue12906] Slight error in logging module's yaml config

2011-09-05 Thread Derrick Petzold

Derrick Petzold dpetz...@gmail.com added the comment:

Oh crap that doesn't work either.

yaml.scanner.ScannerError: while scanning for the next token
found character '%' that cannot start any token
  in /var/sites/magnum/magnum/logging.yaml, line 4, column 13

Should be 

format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'

Regards,

--

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



[issue12850] [PATCH] stm.atomic

2011-09-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue12907] Update test coverage devguide page

2011-09-05 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
dependencies: +coverage of Python regrtest cannot see initial import of libs

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



[issue12907] Update test coverage devguide page

2011-09-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

The devguide needs to be updated with new coverage.py instructions. It seems 
that the script in issue11561 has been integrated into coverage.py's own repo, 
which means we now have a way to get much more complete coverage of the stdlib. 
But it also means that users need to build the tracer extension in coverage.py. 
That might require a little extra hand-holding as compiling from a checkout can 
mean needing to unset CPPFLAGS in order to not pick up the system Python's 
header files.

--
assignee: brett.cannon
components: Devguide
keywords: easy
messages: 143581
nosy: brett.cannon
priority: high
severity: normal
stage: needs patch
status: open
title: Update test coverage devguide page
versions: Python 3.3

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



[issue11561] coverage of Python regrtest cannot see initial import of libs

2011-09-05 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Brandon, can I go ahead and close this and consider the script you and Ned have 
in the coverage.py repo to be the canonical script to use?

--
status: open - pending

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



[issue12908] Update dev-in-a-box for new coverage steps

2011-09-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

Once the devguide has been updated, dev-in-a-box needs to be tweaked to follow 
the new instructions on how to generate a coverage report.

--
assignee: brett.cannon
components: None
messages: 143583
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Update dev-in-a-box for new coverage steps
versions: 3rd party

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



[issue12908] Update dev-in-a-box for new coverage steps

2011-09-05 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
dependencies: +Update test coverage devguide page

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



[issue11561] coverage of Python regrtest cannot see initial import of libs

2011-09-05 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Do we really want to enshrine shadowing the encodings module as the one true 
way to do this kind of thing?

Although I guess defining a way to do it properly would be a fairly major 
undertaking, so perhaps blessing the encodings hack is the practical way 
forward...

If we do that, I'd like to see a devguide patch that better explains how to 
generate your own coverage data for the stdlib with coverage.py, the encodings 
hack and the standard library coverage option.

--
status: pending - open

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



[issue1616] compiler warnings

2011-09-05 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

I see this in quite a few of the buildbots:

(python 3.2)
./Modules/_io/iobase.c:707: warning: initialization from incompatible pointer 
type

Seems to affect all current versions: 2.7, 3.2 and 3.x

--
nosy: +jcea
versions: +Python 3.3

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