[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-15 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 Together with -R, it can help chase those memory leaks which aren't 
 reference leaks (see c6dafa2e2594).

Valgrind does a much better job at this: it will also show you where the leaked 
blocks were allocated.
OTOH, Valgrind is Linux-only and slow, but since I haven't used the '-R' option 
much, I don't know how usable this will be in practice (detecting memory leaks 
is one thing, identifying them is even better :-).

--
nosy: +neologix

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



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2011-11-15 Thread xhantu

xhantu pwo...@rz-online.de added the comment:

Confirmed for Python 2.7.1 on Ubuntu.

Problematic are the __reduce__ methods of 
multiprocessing.process.AuthenticationString and 
multiprocessing.managers.BaseProxy. Pickling of an authkey in BaseProxy is only 
done and allowed when Popen.thread_is_spawning() is True. The comments state 
this is done because of security reasons.

If you pass proxies with multiprocessing after process initialization then no 
authkey is available after unpickle, a random authkey will be used with results 
in an digest error. Because of this fallback in case no authkey is available, 
using None as authkey didn't work in my case.

This bug looks like a design flaw of multiprocessing. If security was really a 
concern, encryption should be used along with authentication for communication. 
And passing None as authkey should disable authentication as stated in the 
documentation and should not use a random authkey.

Disabling the Popen.thread_is_spawning() checks allows passing of proxies. I 
have done this during runtime by replacing the __reduce__ methods of the 
affected classes to avoid patching the installed python.

--
nosy: +xhantu

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



[issue7503] multiprocessing AuthenticationError digest sent was rejected when pickling proxy

2011-11-15 Thread xhantu

xhantu pwo...@rz-online.de added the comment:

forgot to set version in classification

--
versions: +Python 2.7

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-15 Thread R. David Murray

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

Yeah, I just haven't found time to do the revert yet (my first naive attempt 
using hg commands failed and I haven't found time to figure it out or do the 
reverse-patch method).

--

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
assignee:  - ezio.melotti
nosy: +benjamin.peterson, georg.brandl
priority: normal - release blocker

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



[issue13398] _cursesmodule does not build, doesn't find Python.h on Solaris

2011-11-15 Thread Maciej Bliziński

Maciej Bliziński maciej.blizin...@gmail.com added the comment:

I haven't tried building with GCC, Python has always been built with Sun Studio 
at OpenCSW.  I've got very similar build files for Python 2.6, 2.7, 3.0, and 
3.1 -- none of them have this problem, so this is a regression in 3.2.

What diff would you like to see? The problem manifests itself with pristine 
Python sources, no patches are needed to reproduce it.

When the modules are built, how normally get the -I flags are set so that the 
modules can find the Python.h file?

--

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



[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-15 Thread Nick Coghlan

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

This will likely be a decent you have a problem indicator, but you may still 
need tools like Valgrind to actually track down the *cause* of that problem.

--

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-15 Thread Peter Funk

Changes by Peter Funk p...@users.sourceforge.net:


--
nosy: +pefu

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-15 Thread Ezio Melotti

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

Here is a new patch based on Dan's last patch.
Correct me if I'm wrong, but it seems to me that it's not possible for a node 
to have only text-nodes as children and yet have more than one child; i.e. you 
can't have two or more adjacent text nodes, because they would be considered as 
a single text node.  I therefore changed the check with all() to check if 
there's only a child and if it's a text node.
I also added a test that checks where the \n and \t are added, because testing 
only that the DOM is preserved is not enough.

--
stage: test needed - commit review
Added file: http://bugs.python.org/file23692/issue4147.diff

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



[issue13407] tarfile.getmembers misses members again

2011-11-15 Thread sengels

New submission from sengels ps...@gmx.de:

This bug seems to be related to http://bugs.python.org/issue13158

When I try to run the following code:

import tarfile

tf = tarfile.open(kdelibs-4.7.3.tar.bz2, r)
print(len(tf.getnames()))

against this tarball: 
http://www.winkde.org/pub/kde/ports/win32/repository/other/kdelibs-4.7.3.tar.bz2
 it will output 150 members. This is not enough and other tools like 7zip or 
bsdtar report a lot more (should be around 9237).

--
messages: 147663
nosy: sengels
priority: normal
severity: normal
status: open
title: tarfile.getmembers misses members again
versions: Python 2.7, Python 3.2

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



[issue13407] tarfile.getnames misses members again

2011-11-15 Thread sengels

Changes by sengels ps...@gmx.de:


--
title: tarfile.getmembers misses members again - tarfile.getnames misses 
members again

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



[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-15 Thread sbt

sbt shibt...@gmail.com added the comment:

Here is an updated patch which uses the real errno.

It also gets rid of the restore_pos argument of 
_bufferedwriter_flush_unlocked() which is always set to false -- 
I guess buffered_flush_and_rewind_unlocked() is used instead.

--
Added file: http://bugs.python.org/file23693/write_blockingioerror.patch

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



[issue13408] Rename packaging.resources back to datafiles

2011-11-15 Thread Éric Araujo

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

The code dealing with the new resources subsystem used to be called datafiles 
(module distutils2.datafiles, file dist-info/DATAFILES, etc.).  I believe it is 
a better name and we should use it again:

- it would make clear that it’s an evolution of distutils’ data_files
- it would make clear that it’s related to install_data and data_files

“resources” is overly vague and ambiguous.  It can refer to natural resources, 
computer resources, links to more information, etc.  “data files” is less vague 
and less abstract: it refers to files that are not modules, scripts or C files.

--
assignee: tarek
components: Distutils2
messages: 147665
nosy: alexis, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Rename packaging.resources back to datafiles
versions: 3rd party, Python 3.3

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



[issue6501] Fatal error on startup with invalid PYTHONIOENCODING

2011-11-15 Thread Éric Araujo

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

 Currently different environment variables are treated differently.  For 
 example,
 mistakes in PYTHONHOME and PYTHONIOENCODING cause fatal error while an error 
 in
 PYTHONSTARTUP is reported but does not terminate python:

If PYTHONSTARTUP is the only envvar with non-fatal errors, I think it’s okay.  
PYTHONHOME contains vital information, PYTHONIOENCODING is set by the 
programmer/admin and their code probably depends on it, but PYTHONSTARTUP is 
just niceties for the interactive interpreter, so non-vital IMO.

--
nosy: +eric.araujo
versions: +Python 2.7, Python 3.3 -Python 3.1

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



[issue13386] Document documentation conventions for optional args

2011-11-15 Thread Baptiste Carvello

Baptiste Carvello de...@baptiste-carvello.net added the comment:

Le 14/11/2011 20:51, Eric Snow a écrit :
 
 So would it be worth the effort to identify each such place in the 
 built-ins/stdlib and eventually change them all?  I've seen support for doing 
 so in other tracker issues and think it's a good idea personally.
 

I ran a few grep searches from the root of a recent hg tip:

1) grep -n -r --include=*.py --include=*.c --exclude=topics.py -E
'.+\(.*\[[[:space:]]*,.*\].*\)' .

This looks for variants of function(args [, opt]). There were 231
hits, I caught no false positives.

2) grep -n -r --include=*.py --include=*.c --exclude=topics.py -E
'.+\(.*\[.*,[[:space:]]*\].*\)' .

As this pattern is valid Python syntax, I got mostly false positives,
but also a few interesting cases such as range([start,] stop[, step])
or islice(seq, [start,] stop [, step])

I'm afraid those last examples cannot be described with valid Python syntax.

--

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



[issue13405] Add DTrace probes

2011-11-15 Thread lasizoillo

Changes by lasizoillo lasizoi...@gmail.com:


--
nosy: +lasizoillo

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



[issue13386] Document documentation conventions for optional args

2011-11-15 Thread Éric Araujo

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

 C functions that have optional arguments but don't accept keyword arguments 
 are a bit unusual,
 and IIUC in most of the cases that's an implementation detail that could be 
 removed.
 So would it be worth the effort to identify each such place in the 
 built-ins/stdlib and
 eventually change them all?  I've seen support for doing so in other tracker 
 issues and think
 it's a good idea personally.
Me too.  (Can you give the #ids of these other issues?)

 Probably, if this will bring some added value in addition to being easier to 
 document.
I think we should fix C functions to accept kwargs for the sake of Python 
programmers, not merely to ease documentation (that would just be a nice 
side-effect :)


 a few interesting cases such as range([start,] stop[, step])or islice(seq, 
 [start,] stop [, step])
 I'm afraid those last examples cannot be described with valid Python syntax.
Sphinx lets us give multiple signatures.  I’ve just checked that this markup is 
valid and does not create duplicate index entries

  .. function:: range(stop)
range(start, stop)
range(start, stop, step)

:)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13386
___
___
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-11-15 Thread Roundup Robot

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

New changeset 659bf2a679d2 by Éric Araujo in branch 'default':
Add tests for tests.support (#12659), thanks to Francisco Martín Brugué
http://hg.python.org/distutils2/rev/659bf2a679d2

--

___
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



[issue13386] Document documentation conventions for optional args

2011-11-15 Thread Ezio Melotti

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

 Me too.  (Can you give the #ids of these other issues?)

See for example #13012.

 I think we should fix C functions to accept kwargs for the sake of 
 Python programmers, not merely to ease documentation (that would just 
 be a nice side-effect :)

And also for compatibility for other implementations like PyPy.  I'm still not 
sure that is a good idea to do a mass conversion of all the functions though.

 Sphinx lets us give multiple signatures.  I’ve just checked that this 
 markup is valid and does not create duplicate index entries

This is something I was considering, but I'm afraid it might get too verbose 
(and introduce yet another convention).  Sometimes this feature is also 
(mis?)used to group similar functions.

--

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



[issue13386] Document documentation conventions for optional args

2011-11-15 Thread Éric Araujo

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

 I think we should fix C functions to accept kwargs for the sake of Python 
 programmers
 And also for compatibility for other implementations like PyPy.
Good point.

 I'm still not sure that is a good idea to do a mass conversion of all the 
 functions though.
If there were only a handful of them it may be okay, but otherwise one issue 
per class or module sounds good.

 Sphinx lets us give multiple signatures
 This is something I was considering, but I'm afraid it might get too verbose
I find my example for range much more readable that the current markup with 
brackets.

 (and introduce yet another convention).
I can live with this special case for the two or three functions that need it.  
It becomes moot if range gets fixed to support kwargs :)

 Sometimes this feature is also (mis?)used to group similar functions.
IIUC it *is* the intended use case for the syntax, not a misuse: You tell 
Sphinx that you want link targets for these functions to end up here, and then 
you write doc.  See for example the os docs: this syntax allows for nice 
grouping.

--

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



[issue12344] Add **kwargs to reinitialize_command

2011-11-15 Thread Éric Araujo

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

I’ve noticed that setuptools’ Command class also allows keyword arguments in 
its constructor.  I’m not sure if it would be useful, but I’ve not looked in 
depth at the packaging codebase to see if there is code that could use that.

--

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



[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-15 Thread Antoine Pitrou

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

 Valgrind does a much better job at this: it will also show you where
 the leaked blocks were allocated.
 OTOH, Valgrind is Linux-only and slow, but since I haven't used the
 '-R' option much, I don't know how usable this will be in practice
 (detecting memory leaks is one thing, identifying them is even
 better :-).

Yes, Valgrind is much more exhaustive and precise, but you have to build
Python --with-valgrind, to find the correct options to pass to Valgrind,
and also to parse the output. For example, OpenSSL seems to cause lots
of errors such as:

==20599== Conditional jump or move depends on uninitialised value(s)
==20599==at 0xA2BB0B3: BN_div (in /usr/lib64/libcrypto.so.1.0.0)
==20599==by 0xA2C125E: BN_nnmod (in /usr/lib64/libcrypto.so.1.0.0)
==20599==by 0xA2C15CD: BN_mod_mul (in /usr/lib64/libcrypto.so.1.0.0)
==20599==by 0xA2C37F0: BN_BLINDING_convert_ex
(in /usr/lib64/libcrypto.so.1.0.0)
==20599==by 0xA2E15D6: ??? (in /usr/lib64/libcrypto.so.1.0.0)
==20599==by 0x9FE6363: ssl3_get_client_key_exchange
(in /usr/lib64/libssl.so.1.0.0)
==20599==by 0x9FE83A7: ssl3_accept (in /usr/lib64/libssl.so.1.0.0)
==20599==by 0xF804190: PySSL_SSLdo_handshake (_ssl.c:390)
==20599==by 0x47C0E9: PyEval_EvalFrameEx (ceval.c:3985)
==20599==by 0x47CAC3: PyEval_EvalCodeEx (ceval.c:3376)
==20599==by 0x47B3F1: PyEval_EvalFrameEx (ceval.c:4099)
==20599==by 0x47C1DB: PyEval_EvalFrameEx (ceval.c:4089)

Right now this patch will allow to enrich the daily refleak runs (those
that send an e-mail to python-checkins). If someone finds a way to
sanitize Valgrind output, a daily Valgrind run would be cool as well.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13390
___
___
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-11-15 Thread Éric Araujo

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

 I've added runTest to Tester
It turns out this was the only change needed.  Tarek’s repo on bitbucket is not 
up-to-date, I should have given you the hg.python.org link.  (You can edit 
.hg/hgrc in your repo and run “hg pull -u” to get missing changesets.)

When you add more tests in packaging’s test_support, please add the runTest 
method too, so that both versions are synchronized.  Thanks!

--

___
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



[issue13407] tarfile.getnames misses members again

2011-11-15 Thread Lars Gustäbel

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

Some testing reveals that the bz2 module  3.3 cannot fully decompress the file 
in question. Only the first 900k are decompressed. Thus, this issue is not 
related to issue13158 or the tarfile module.

--
nosy: +lars.gustaebel

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



[issue13407] tarfile.getnames misses members again

2011-11-15 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Isn't this a duplicate of issue #1625?

--
nosy: +neologix

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2011-11-15 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue13398] _cursesmodule does not build, doesn't find Python.h on Solaris

2011-11-15 Thread Jesús Cea Avión

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

Can you add the missing library path in CFLAGS and LDFLAGS environment 
variables?.

Something like: (from a fresh source code)

./configure OPTIONS CFLAGS=-Ipath LDFLAGS=-Ipath

If that works, we can explore why the path is not detected automatically.

Do your path contains any unusual character, like spaces?

Tell me the exact configure line you are using.

Have you tried to build python 3.3? (unreleased yet, current development 
version)

The include directorios is defined in Makefile, variable PY_CPPFLAGS. In my 
system, that is -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS. 
What is the value in your system? (after the configure step).

--

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



[issue13398] _cursesmodule does not build, doesn't find Python.h on Solaris

2011-11-15 Thread Jesús Cea Avión

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

BTW, is only curses building failing?. Is the rest of the code built 
correctly?. That would be a good hint.

--

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



[issue13398] _cursesmodule does not build, doesn't find Python.h on Solaris

2011-11-15 Thread Éric Araujo

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

This module also fails to build on my Debian.  I had the libcursesw headers 
installed and one day it was not enough; installing libcurses headers fixes it. 
 I don’t know if it’s the same problem or something related to Debian multiarch.

--
nosy: +eric.araujo

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



[issue13391] string.strip Does Not Remove Zero-Width-Space (ZWSP)

2011-11-15 Thread Dave Mankoff

Dave Mankoff man...@gmail.com added the comment:

Use regular expressions for more advanced stripping than what the .strip 
method provides.

So I guess this brings me back to my original issue. I'm not looking for 
particularly advanced stripping. I just want to remove all whitespace and other 
non-printing characters. I personally can never think of a time when I wouldn't 
want this (especially with isspace). Maybe in some applications, the control 
characters are useful and shouldn't be stripped, but I would argue that _that_ 
is the more advanced use case for most people.

Thus strip and isspace are now unusable methods in Python for common use cases. 
This seems unfortunate.

I can understand the claims of feature creep. I even understand that having 
isspace compare itself against non-whitespace characters may seem 
counter-intuitive on its face. But certainly there must be a satisfactory 
remedy here.

--

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



[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-11-15 Thread Roundup Robot

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

New changeset c10946a17420 by Éric Araujo in branch 'default':
Clean up byte-compilation code in packaging (#11254 followup).
http://hg.python.org/cpython/rev/c10946a17420

--

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



[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-15 Thread Antoine Pitrou

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

Thanks again. Just a nit: the tests should be in MiscIOTest, since they don't 
directly instantiate the individual classes. Also, perhaps it would be nice to 
check that the exception's errno attribute is EAGAIN.

--
stage: needs patch - patch review

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



[issue1481032] patch smtplib:when SMTPDataError, rset crashes with sslerror

2011-11-15 Thread kxroberto

kxroberto kxrobe...@users.sourceforge.net added the comment:

ping!
perhaps I forgot to write that I uploaded the cleaned patch also on 2010-08-23. 
I really think this simple patch is necessary. Just seen the same problem again 
- as I forgot the patch in one of my recent Python update installations.

When SMTPDataError, SMTPRecipientsRefused, SMTPSenderRefused should be raised, 
very likely a subsequent error (like closed connection etc.) overlappes the 
original Exception during self.rset(), and one will not be able to locate the 
problem on user level in eons ..

This patch is still in my vital-patches collection which I have to apply after 
every Python update since years.

--

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



[issue13391] string.strip Does Not Remove Zero-Width-Space (ZWSP)

2011-11-15 Thread Ezio Melotti

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

 So I guess this brings me back to my original issue. I'm not looking 
 for particularly advanced stripping. I just want to remove all 
 whitespace and other non-printing characters.

.strip only strips whitespace.  Stripping non-printing characters and 
additional 'whitespace' is something that is too specific for a builtin method, 
especially because people might disagree on the characters that are considered 
whitespace and non-printing.

 Thus strip and isspace are now unusable methods in Python for common
 use cases. This seems unfortunate.

I believe they work fine for the common case -- in fact these methods have been 
around for years and no one complained.
Also Unicode has a number of more or less space-like characters that are not 
whitespace and whitespace chars that don't look like whitespace.
If one needs to strip a different set of (whitespace) chars, it's always 
possible to pass it to .strip or to define a new function like
def mystrip(s):
return s.strip().strip(u'\u200B\ufeff')

--

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2011-11-15 Thread Dan Kenigsberg

Dan Kenigsberg dan...@redhat.com added the comment:

Technically, adjacent Text nodes are not illegal, but preserving this oddity in 
pretty-print is impossible. It is perfectly fine to pretty-print only the 
simple case of len()==1.

--

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



[issue13238] Add shell command helpers to subprocess module

2011-11-15 Thread Éric Araujo

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


Added file: http://bugs.python.org/file23694/b267e72c8c10.diff

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



[issue13238] Add shell command helpers to subprocess module

2011-11-15 Thread Éric Araujo

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

def __init__(self, command, *, **callkwds):
Is the '*' marker needed?

self.callkwds = callkwds
These aren’t used in the module-level functions.  What is the use case?

If you forgive me for the nitpick, the docstrings have too much indenting.

 a *.py value interpolated with {!u} should indeed pick up all of those 
 files,
 since the wildcard will be passed unmodified to the underlying shell
Great.

(This patch will also serve as a nice example of creating a string formatter.  
I’ve seen the PyCon video about them, but I thought I was missing a piece since 
I didn’t see how you hook the format function to your custom formatter; it 
looks like the answer is that you don’t.)

--

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



[issue10772] Several actions for argparse arguments missing from docs

2011-11-15 Thread ipatrol

ipatrol ipatrol6...@yahoo.com added the comment:

The patch has been submitted, now we just need to apply it and update the 
online docs accordingly.

--
status: open - pending
versions: +Python 3.4

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



[issue10772] Several actions for argparse arguments missing from docs

2011-11-15 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
status: pending - open
versions:  -Python 3.4

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



[issue10772] Several actions for argparse arguments missing from docs

2011-11-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage: needs patch - patch review

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



[issue10772] Several actions for argparse arguments missing from docs

2011-11-15 Thread Éric Araujo

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

Ezio made further comments, follow the “review” link.

--

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



[issue2775] Implement PEP 3108

2011-11-15 Thread Brett Cannon

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

Answers to Eric's questions: yes and yes, but I probably won't bother until I 
do a final update to the PEP.

--

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



[issue13392] Writing a pyc file is not atomic under Windows

2011-11-15 Thread Brett Cannon

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

I say go with the deletion for importlib. If the failure is a sign of success, 
then just go with it and not worry about the failure. __pycache__ guarantees 
that we are not losing out by clobbering some other Python version's pyc file.

--

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



[issue11805] package_data only allows one glob per-package

2011-11-15 Thread Éric Araujo

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

 Looking at sysconfig.cfg makes it all pretty clear, though it was hard to 
 find this
 information a while ago.
Yeah, you had to be here when the resources code was committed, or to stumble 
on it while reading the source code.  It’s one of the big things I will 
document as part of #12779.

 So what exactly is the verdict then?  Keep package_data for now, but 
 encourage resources,
 and dump data_files all together?  Or...?
The reverse: resources are the new way of installing data_files.  package_data 
is obsoleted by that system and removed.

 But as far as I can see, there's no way in packaging to describe a module 
 that works like sysconfig
 itself! (A module with a resource which is expected to live alongside the .py 
 file).
For bootstrapping reasons, sysconfig.cfg needs to be the one exception to the 
rule.  (Yes, I think about moving distutils.cfg and wininst-*.exe files 
according to sysconfig —and pydoc data and venv shell scripts!  I will make 
sure we reach agreement on python-dev first, of course :)

The point is that it is not possible to have a data file living alongside the 
py file.  It is by design.  The new system caters to downstream packagers while 
trying not to be bothersome to Python authors.  Why do you care where your data 
file is installed, as long as your code can get it?

There is one argument against this system: It means that your code has a 
runtime dependency on a function provided by the packaging tool.  This is one 
of my griefs against setuptools.  The difference here is that the dist-info dir 
is an accepted PEP and packaging is in the stdlib, and that the dependency is 
minimal (it does not make you learn a parallel import system for example).  
However, one drawback is that we expect and support a transition period where 
people have parallel setup.cfg and setup.py (with the setup.py possibly taking 
its info from setup.cfg), so adding support for d2 will not only require adding 
a setup.cfg and modularizing complex setup.py into hooks: it will require code 
editions to have code branches for database.get_file and __file__ + open.  That 
won’t look good.

 Installing the cfg file to {purelib} would work in practice, but if the 
 distribution containing
 sysconfig was later changed to include a C extension, then the code would get 
 silently switched to
 install into platlib, and the .cfg file would no longer be alongside the .py 
 file.
 
 (This is only actually the case when purebase and base differ - which never 
 happens on Windows, and
 I don't really understand when it would happen on Unix. So I can't really say 
 how likely and/or
 important this possibility is. But it's certainly there.)
There is a distinction between prefix and exec-prefix.  I think it may come 
from a time where you’d have one tree served for many machines by an NFS server 
and architecture-specific trees on a local filesystem.

 [...]
 OK, having said all that, I do think that saying package_data was wrong, 
 let’s move away from that
 is a bit user-unfriendly. Whether it causes issues for OS distributors, or is 
 wrong as a matter of
 principle, people do use it, a lot.
Because they had no alternative: you couldn’t predict where data_files would 
end up, so package_data + __file__ was the universal kludge.

 It's the basis of the whole egg concept (a package and its data as a single 
 self-contained object)
distutils2 does not support the egg concept.  In a post-PEP 376 world, an 
installed distribution can be one or more modules with a dist-info directory, 
one or more packages with a dist-info directory, etc.

 If you don't support it, I predict that people are simply going to invent 
 more and more elaborate
 hacks to emulate it.
Interesting.  I have to go now, but be sure I’ll think over this, bring it up 
on pydev and make sure the situation is acceptable before Py 3.3b1 / d2 1.0b1.

--
assignee: tarek - eric.araujo
keywords: +easy
stage:  - needs patch

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



[issue1486713] HTMLParser : A auto-tolerant parsing mode

2011-11-15 Thread kxroberto

kxroberto kxrobe...@users.sourceforge.net added the comment:

I looked at the new patch http://hg.python.org/lookup/r86952 for Py3 (regarding 
the extended tolerance and local backporting to Python2.7):

What I miss are the calls of a kind of self.warning(msg,i,k) function in 
non-strict/tolerant mode (where self.error is called in strict mode). Such 
function could be empty or could be a silent simple counter (like in the old 
patch) - and could be easily sub-classed for advanced use.
I often want at least the possibilty of a HTML error log - so the HTML author 
(sometimes its me myself) can be noticed to get it more strict on the long run 
;-) ...

--

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



[issue13392] Writing a pyc file is not atomic under Windows

2011-11-15 Thread Roundup Robot

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

New changeset b75b41237380 by Antoine Pitrou in branch 'default':
Issue #13392: Writing a pyc file should now be atomic under Windows as well.
http://hg.python.org/cpython/rev/b75b41237380

--

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



[issue13392] Writing a pyc file is not atomic under Windows

2011-11-15 Thread Antoine Pitrou

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

Ok, done. Let's see if that fixes the sporadic failures on the buildbots.

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

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



[issue13380] ctypes: add an internal function for reseting the ctypes caches

2011-11-15 Thread Antoine Pitrou

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

The patch looks good to me.

--

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



[issue13409] Invalid expression error if a regex ends with a backslash

2011-11-15 Thread Michał Leśniewski

New submission from Michał Leśniewski mlesn...@gmail.com:

If a regular expression ends with a backslash, an exception is raised. Of 
course, the backslash has to be escaped. The simplest example, that causes the 
error is a regular expression, that should match only a single backslash:

import re
r = re.compile(\\)

--
components: Regular Expressions
messages: 147696
nosy: ezio.melotti, mlesniew
priority: normal
severity: normal
status: open
title: Invalid expression error if a regex ends with a backslash
type: behavior
versions: Python 2.7

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



[issue13409] Invalid expression error if a regex ends with a backslash

2011-11-15 Thread Ezio Melotti

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

You either have to double escape it (once for python and then for the regex 
engine) or use raw strings:
 re.match(, '\\').group()
'\\'
 re.match(r\\, '\\').group()
'\\'

--
assignee:  - ezio.melotti
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue1486713] HTMLParser : A auto-tolerant parsing mode

2011-11-15 Thread Ezio Melotti

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

The HTMLParser is not suitable for validation, even the strict mode allows some 
non valid markup (and it might be removed soon).
Also I don't think it's easy to call a self.warnings() without trying the 
strict mode first.  The tolerant parsing just allow more things, without making 
any distinction between valid and not.

--
nosy: +ezio.melotti

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



[issue11805] package_data only allows one glob per-package

2011-11-15 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

One important point - in the new world where data files living
alongside code is unsupported, the bdist_msi and bdist_wininst
installers need to be updated to install data files as needed. This
may work already (I'll do some tests to see how well when I get back
to my PC with dev builds on it) but right now bdist_wininst for
example does not support the full generality of the resource mechanism
(and it's not clear to me how it can be made to...) so there will be
restrictions on what can be allowed until the wininst format is
updated.

For installs from source, the suggested new world is fine. But
without a binary install process that's as flexible as a source
install, the current alongside the code approach has the benefit of
working well with the existing installer technology.

--

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



[issue4442] document immutable type subclassing via __new__

2011-11-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - needs patch
versions: +Python 3.2, Python 3.3 -Python 3.1

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



[issue11990] redirected output - stdout writes newline as \n in windows

2011-11-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +haypo

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



[issue964437] idle help is modal

2011-11-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +terry.reedy
stage:  - patch review
versions: +Python 3.3 -Python 3.2

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



[issue13392] Writing a pyc file is not atomic under Windows

2011-11-15 Thread Roundup Robot

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

New changeset 12940d9f8031 by Antoine Pitrou in branch 'default':
Fix regression under Windows following b75b41237380 (from issue #13392)
http://hg.python.org/cpython/rev/12940d9f8031

--

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



[issue13297] xmlrpc.client could accept bytes for input and output

2011-11-15 Thread Roundup Robot

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

New changeset 0175883d9513 by Florent Xicluna in branch 'default':
Closes #13297: use bytes type to send and receive binary data through XMLRPC.
http://hg.python.org/cpython/rev/0175883d9513

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

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



[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2011-11-15 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
nosy: +brian.curtin

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



[issue11261] urlopen breaks when data parameter is used.

2011-11-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - needs patch

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



[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2011-11-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
versions: +Python 3.3 -Python 3.1

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



[issue2979] use_builtin_types in xmlrpc.server

2011-11-15 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

Patch updated with documentation.

--
nosy: +eric.araujo
stage: patch review - commit review
Added file: http://bugs.python.org/file23695/issue2979_xmlrpc_server_v2.diff

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



[issue13215] multiprocessing Manager.connect() aggressively retries refused connections

2011-11-15 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Here's a patch removing the automatic retry on ECONNREFUSED: I tested it on 
Linux and other Unices, and it seems to work just fine without this hammering.
Note that there's a similar mechanism for Windows (ERROR_PIPE_BUSY), but it 
seems to be necessary there (test_multiprocessing blows up without this). Note 
that I'd rather only apply this to default (not 2.7 and 3.2), since this is 
more of a behavior change than a bug fix.

--
keywords: +needs review, patch
stage:  - patch review
versions: +Python 3.3 -Python 2.7, Python 3.2

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



[issue13386] Document documentation conventions for optional args

2011-11-15 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

 Me too.  (Can you give the #ids of these other issues?)

#13012 is the one that I was thinking of (msg144328 specifically).  However, 
I'm sure there was one more recently (which I can't find now).

--

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



[issue13386] Document documentation conventions for optional args

2011-11-15 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

@msg147671

+1

--

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



[issue13405] Add DTrace probes

2011-11-15 Thread Jesús Cea Avión

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


Added file: http://bugs.python.org/file23696/9fcca74ff413.diff

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



[issue13405] Add DTrace probes

2011-11-15 Thread Jesús Cea Avión

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

New changeset, with testsuite added.

Compile the code adding --with-dtrace to your configure command. After 
compiling, test the code with


LD_LIBRARY_PATH=current_path
export LD_LIBRARY_PATH

./python Lib/test/regrtest.py -v test_dtrace.py



It is currently working in Solaris 10, both in 32 and 64 bits.

If you are inside a Solaris/OpenIndiana Zone, the zone *MUST* have dtrace 
usermode permissions. If not, you can not use dtrace inside the zone and, then, 
the test will fail.

--

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



[issue13405] Add DTrace probes

2011-11-15 Thread Antoine Pitrou

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

 LD_LIBRARY_PATH=current_path
 export LD_LIBRARY_PATH

Why do you need LD_LIBRARY_PATH?

 If you are inside a Solaris/OpenIndiana Zone, the zone *MUST* have
 dtrace usermode permissions. If not, you can not use dtrace inside the
 zone and, then, the test will fail.

If there aren't enough permissions, the tests should be skipped rather
than fail.

--

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



[issue13238] Add shell command helpers to subprocess module

2011-11-15 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I like Nick's original idea for a handful of convenience functions but want to 
caution against adding a bunch of tools that start guessing at what you want.  
Adding automatic wildcard expansion, shell quoting/splitting and whatnot can 
make the module more arcane and harder to learn and remember.  

Please adopt a conservation approach adding the minimal set that has been shown 
to be necessary.  We can take these tools away if they turn out to have been a 
bad idea.  It is much easier to add cruft than to take it away.   In the 
itertools module, a number of tools started their life as just a recipe in the 
docs and only became builtin after having proved their worth and having proved 
their API.

--
nosy: +rhettinger

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



[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Roundup Robot

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

New changeset d42811b93357 by Victor Stinner in branch 'default':
Issue #13374: The Windows bytes API has been deprecated in the os module. Use
http://hg.python.org/cpython/rev/d42811b93357

--

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



[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

IIUC, it means that the library/application should not use the bytes API if it 
intends to be supported on major platforms.

--
nosy: +flox

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



[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Jayanth Raman

New submission from Jayanth Raman raman.jaya...@gmail.com:

With file xx.py:

class Foo(object):
def __init__(self, x):
self.x = x
def __long__(self):
return long(self.x)
def __float__(self):
return float(self.x)
y = Foo(22)
print '%d' % y
print '%d' % y


Interactive mode:

$ python -V
Python 2.6.7
$ python -i xx.py
22
22

TypeError: int() argument must be a string or a number, not 'Foo'
 '%d' % y
'22'
 '%d' % y
TypeError: int() argument must be a string or a number, not 'Foo'
 '%d' % y
'22'
 '%d' % y
TypeError: int() argument must be a string or a number, not 'Foo'

It alternates between printing '22' and print a TypeError message.  Expected it 
to be consistent.

Also, the first carraige-return (with no input) results in an error message.  
Did not expect an error message.  In fact, typing pretty much anything (e.g. an 
undefined variable or raise(Exception())) results in the same error message.

On Mac OS X Darwin Kernel Version 10.8.0
Python 2.6.7 (r267:88850, Jul  6 2011, 13:57:37) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Thanks.

--
assignee: ronaldoussoren
components: Macintosh
messages: 147711
nosy: jayanth, ronaldoussoren
priority: normal
severity: normal
status: open
title: String formatting bug in interactive mode
type: behavior
versions: Python 2.6

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



[issue13391] string.strip Does Not Remove Zero-Width-Space (ZWSP)

2011-11-15 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Thus strip and isspace are now unusable methods in Python for common use 
 cases.

Please recognize that you haven't demonstrated this at all. U+200B is
*not* a character that is common, not even remotely. It's a rare,
infrequent, unused character. In addition, in the common use case
of string.strip (i.e. get rid of leading an trailing white space for
rendering purposes), keeping it causes no harm since it's zero-width.

If you disagree with the resolution of this issue, you will have to
write a PEP.

--

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



[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 IIUC, it means that the library/application should not use the bytes API if 
 it intends to be supported on major platforms.

I think you misunderstand; it does not literally mean that. Instead, it
means that the library/application either must not use the bytes API at
all, or else make use of it conditional on non-Windows systems (i.e.
special-case Windows).

--

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



[issue13248] deprecated in 3.2, should be removed in 3.3

2011-11-15 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


--
nosy: +eric.smith

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



[issue13411] Hashable memoryviews

2011-11-15 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This patch allows hashing of memoryviews, as discussed on python-dev.

--
components: Interpreter Core
files: memhash.patch
keywords: patch
messages: 147714
nosy: ncoghlan, pitrou, skrah
priority: normal
severity: normal
stage: patch review
status: open
title: Hashable memoryviews
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file23697/memhash.patch

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



[issue13411] Hashable memoryviews

2011-11-15 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Antoine Pitrou

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


--
nosy: +brian.curtin, tim.golden

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Alex Regueiro

New submission from Alex Regueiro alex...@gmail.com:

Python 2.7 has no knowledge of directory symlinks on Windows 7. Listing a 
directory symlink does not work, nor does accessing a file within one. This is 
quite a notable missing feature on Windows 7, where symlinks are becoming 
increasingly prevalent.

--
components: IO
messages: 147715
nosy: alexreg
priority: normal
severity: normal
status: open
title: No knowledge of symlinks on Windows
versions: Python 2.7

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


--
nosy: +eric.smith, jason.coombs

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



[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith

Eric V. Smith e...@trueblade.com added the comment:

I think this must be a change between 2.5 and 2.6.

In 2.5.1 non-debug (Linux) I consistently see:
 print '%d' % y
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: int argument required

In 2.6.5 (Windows via activestate) I see the alternating errors reported here.

In 2.7.2+ debug (Linux) I consistently see:
 print '%d' % y
22
XXX undetected error
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: int() argument must be a string or a number, not 'Foo'
[38749 refs]

Note the XXX undetected error.

In 2.7.2+ non-debug (Linux), I get the alternating errors reported here.

I don't think anything will be done about the problem in 2.6. For 2.7, the XXX 
undetected error should be investigated, and will likely point to the problem.

--
assignee: ronaldoussoren - 
components: +Interpreter Core -Macintosh
versions: +Python 2.7

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



[issue11836] multiprocessing.queues.SimpleQueue is undocumented

2011-11-15 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Then it appears to me that Sandro's patch is good and can be committed.

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
components: +Windows
type:  - behavior

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



[issue13388] document hg commit hooks in the devguide

2011-11-15 Thread Roundup Robot

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

New changeset 21758f27f98f by Eli Bendersky in branch 'default':
document existing hooks for commit messages mentioning issues. Closes issue 
13388
http://hg.python.org/devguide/rev/21758f27f98f

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

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



[issue13388] document hg commit hooks in the devguide

2011-11-15 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Committed, with the fix suggested by Éric

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

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



[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox, mark.dickinson
stage:  - needs patch

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



[issue11836] multiprocessing.queues.SimpleQueue is undocumented

2011-11-15 Thread Antoine Pitrou

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

 Then it appears to me that Sandro's patch is good and can be committed.

The doc patch is good. However, if you start exposing SimpleQueue at the
top package level, you have to do it in 3.3 only (since that's a new
API), and also mention it somehow in the doc.

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

Python 2.7 is not aware of symlinks and treats them like their targets, so it 
should be able to list a symlink directory or access a file within one. For 
example:

PS C:\Users\jaraco cmd /c dir
 Volume in drive C is system
 Volume Serial Number is 2455-92A0

 Directory of C:\Users\jaraco

11-Nov-2011  06:50DIR  .
11-Nov-2011  06:50DIR  ..
..
11-Aug-2011  10:11SYMLINKD bin [Dropbox\bin\x64]
10-Aug-2011  21:00SYMLINKD bin-x86 [Dropbox\bin\x86]
..
  11 File(s)  6,632 bytes
  27 Dir(s)  301,972,422,656 bytes free
PS C:\Users\jaraco python
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on 
win32
Type help, copyright, credits or license for more information.
 import os
 os.listdir('bin')
['curl.exe', 'devcon.exe', 'HotSwap!.EXE', 'Notepad2.exe', 'utorrent.exe', 
'vncviewer.exe']
 with open('bin/curl.exe', 'rb') as f:
...   f.read()[:10]
...
'MZ\x90\x00\x03\x00\x00\x00\x04\x00'
 ^Z

Because Python 2.7 is feature-frozen, symlink support will not be available in 
Python before 3.2.

If you are experiencing errors, please reopen this ticket and describe what you 
are doing, what you expect, and what you get instead.

--
resolution:  - wont fix
status: open - closed

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



[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

With Darwin 10.8.0 x86_64, I confirm the behavior described in first message.


$ python2.7 -V
Python 2.7.2
$ python2.7 -i xx.py
22
22
 
TypeError: int() argument must be a string or a number, not 'Foo'
 '%d' % y
'22'
 '%d' % y
TypeError: int() argument must be a string or a number, not 'Foo'
 '%d' % y
'22'
 '%d' % y
TypeError: int() argument must be a string or a number, not 'Foo'


--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Brian Curtin

Brian Curtin br...@python.org added the comment:

I think we could still make os.listdir work properly. I'll look into a patch 
for this.

One problem here is the testability, since we'd need to rely on the mklink 
CLI app to create the symlinks, which requires that the calling application 
(python.exe) has elevated privileges. It wont be exercised by any of the 
buildbots.

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Alex Regueiro

Alex Regueiro alex...@gmail.com added the comment:

What are you running? This is not what I get on Win7 x64, and I have had 
several other users in ##python on FreeNode confirm this inability. As far as 
Python is concerned, these dir sym links do not even exist.

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

I should mention that there is third-party symlink support in jaraco.windows 
(http://pypi.python.org/pypi/jaraco.windows). Just easy_install it, and then 
use jaraco.windows.filesystem.symlink.

If there are features you need for symlink support in jaraco.windows, request 
them via https://bitbucket.org/jaraco/jaraco.windows and they should be 
implemented quickly.

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Alex Regueiro

Alex Regueiro alex...@gmail.com added the comment:

Thanks Bryan, that would be great.

The elevated privs problem could potentially be avoided by creating symlinks 
using the Win32 API directly. As long as the appropiate group policy is set, 
one does not require admin privs to create symlinks. Perhaps symlink 
creation/deletion on Windows could even be integrated into the Python class 
library?

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

Brian, I'm still not sure I see the problem with os.listdir. It includes 
symlinks when listing a dir and traverses them naturally when referencing them 
as part of a path to listdir. Under what conditions does it fail?

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Alex Regueiro

Alex Regueiro alex...@gmail.com added the comment:

Well, at the very least it's a system-dependent issue, since I've tried out 
listdir and also file access on my system and some other Windows users'.

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

Some variables could be a missing privilege or role, or perhaps a UAC 
restriction. What error do you get when you attempt to invoke os.listdir on a 
symlink directory?

--

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



[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Alex Regueiro

Alex Regueiro alex...@gmail.com added the comment:

No error whatsoever. Python just thinks it doesn't exist unfortunately. Same 
report from other users...

--

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



[issue12988] IDLE on Win7 crashes when saving to Documents Library

2011-11-15 Thread Roger Serwy

Changes by Roger Serwy roger.se...@gmail.com:


--
nosy: +serwy

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



[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-15 Thread Roundup Robot

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

New changeset afc716e463a1 by Victor Stinner in branch 'default':
Issue #13374: Skip deprecation tests for os.symlink() on Windows XP
http://hg.python.org/cpython/rev/afc716e463a1

--

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



[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Amaury Forgeot d'Arc

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

A debug build displays XXX undetected error.  An error condition was not 
correctly cleared, see attached patch.

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file23698/issue13410.patch

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



  1   2   >