[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-10-26 Thread Charles-François Natali

Charles-François Natali added the comment:

 No automated testing included because I'm not entirely sure how to replicate 
 this without eating up a ton of ram or doing something naughty with ulimit.

Simply use RLIMIT_NPROC, from a subprocess:

$ cat /tmp/test.py
import subprocess

ps = [ ]

for i in range(1024):
p = subprocess.Popen(['sleep', '10'])
ps.append(p)
$ python /tmp/test.py
Traceback (most recent call last):
  File /tmp/test.py, line 7, in ?
p = subprocess.Popen(['sleep', '10'])
  File /usr/lib64/python2.4/subprocess.py, line 550, in __init__
errread, errwrite)
  File /usr/lib64/python2.4/subprocess.py, line 919, in _execute_child
self.pid = os.fork()
OSError: [Errno 11] Resource temporarily unavailable
$ ulimit -u 1024


Not POSIX, but supported by Linux and BSD, which should be enough.

The problem with monkey-ptching is that you don't test the real
codepath, and it may break in a future version (especially since here
it would be using a preivate API).

--

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



[issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor

2012-10-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Here's a patch for 3.4. __qualname__ ought to have been implemented this way in 
the first place. I'll have to think about what can be done about 3.3. Maybe 
just the same fix without the removal of PyHeapType.ht_qualname. We can hope no 
one has written extensions relying on its value actually being correct.

--
keywords: +patch
nosy: +benjamin.peterson
Added file: http://bugs.python.org/file27721/qualname-in-dict.patch

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



[issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor

2012-10-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm not sure why this would be the correct way to do it. First you are removing 
the unicode check, which looks wrong to me. Second, if ht_name works, perhaps 
ht_qualname can be made to work as well?

--

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



[issue16285] Update urllib to RFC 3986

2012-10-26 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2012-10-26 Thread STINNER Victor

STINNER Victor added the comment:

  sys.getfilesystemencoding()
 'mbcs'
  import locale
  locale.getpreferredencoding()
 'cp932'
 

 'cp932' is the same as 'mbcs' in the Japanese environment.

And what is the value.of locale.getpreferredencoding(False)?

--

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



[issue16309] PYTHONPATH= different from no PYTHONPATH at all

2012-10-26 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-10-26 Thread Charles-François Natali

Charles-François Natali added the comment:

Also, I didn't check, but if the problems also occurs on execve()
failure, then it's much simpler: simply call Popen() with an
invalid/nonexisting executable.

--

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



[issue15494] Move test/support.py into a test.support subpackage

2012-10-26 Thread Nick Coghlan

Nick Coghlan added the comment:

This whole refactoring project grew out of the fact that Chris and I were 
looking for somewhere to put common helpers for package testing. Specfically, I 
wrote a heap of helpers for test_runpy that I wanted to use for the new pkgutil 
tests.

The short term hack (because 3.3 was imminent) is that a couple of the pkgutil 
tests are *in* test_runpy, not because they belong there, but so they can use 
those helper utilities. We knew when we did it that wasn't a viable long term 
solution, but we didn't have a good place to put the helpers so test_pkgutil 
could get at them - they're packaging specific, so junking up test.support with 
them would be bad, and we knew from experience that a separate helper module 
(like script_helper) sucked for discoverability.

So, the idea of making test.support a subpackage was born. The current contents 
of support.py go into the new __init__.py, script_helper moves there to make it 
more discoverable, and the utilities for packaging tests can move out of 
test_runpy and into test.support.pkg_helper. Both script_helper and pkg_helper 
can also be easily covered in the docs under the existing test.support caveat.

We didn't start down this road on a whim - we did it because we ran up hard 
against a clear and obvious problem in the structure of the test suite's 
support modules.

--

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



[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2012-10-26 Thread Masami HIRATA

Masami HIRATA added the comment:

 And what is the value.of locale.getpreferredencoding(False)?

 import locale
 locale.getpreferredencoding(False)
'cp932'


--

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




[issue15498] Eliminate the use of deprecated OS X APIs in getpath.c

2012-10-26 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Apple seems to have switched to using dlopen in their version of getpath.c (see 
http://www.opensource.apple.com/source/python/python-60.3/2.7/fix/getpath.c.ed,
 this is the version in OSX 10.8.2)

This causes a problem for some people, as noticed on the pythonmac mailing 
list. This is something we should test before applying my patch to avoid 
regressions.

Message-Id: 508951d3.7080...@llnl.gov says:

I am trying to work with Apple Mountain Lion's install of Python 2.7. I
have a language interoperability tool, Babel
http://www.llnl.gov/CASC/components/, that used embedded Python when
other languages are calling Python (c.g., C++ calling Python). My
fundamental problem is that sys.path is not being initialized the same
when I dlopen(libpython2.7.dylib) and initialize Python compared with
how the sys.path is set when the Python executable is called directly.
This causes Python to fail to load the numpy module used by Babel.

bash-3.2$ /usr/bin/python2.7 -c import sys; print sys.path; import
numpy  /tmp/out1
bash-3.2$ /usr/bin/python -c import sys; print sys.path; import numpy
/tmp/out2
bash-3.2$ cat /tmp/out1
['',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
'/Library/Python/2.7/site-packages']
bash-3.2$ diff /tmp/out1 /tmp/out2
bash-3.2$ ls -al /usr/bin/python2.7
lrwxr-xr-x  1 root  wheel  75 Aug 23 11:10 /usr/bin/python2.7 -
../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7

Presumably, this C program that uses dlopen(), Py_Initialize, and
Py_SimpleString should have exactly the same output.

/** foo.c */
#includedlfcn.h
#includestdio.h

int
main(int argc, char **argv)
{
 // void *lptr =
dlopen(/System/Library/Frameworks/Python.framework/Python, RTLD_NOW |
RTLD_GLOBAL);
 void *lptr =
dlopen(/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib,
RTLD_NOW | RTLD_GLOBAL);
 if (lptr) {
   void (*pyinit)(void) = dlsym(lptr, Py_Initialize);
   if (pyinit) {
 int (*runSimple)(const char *);
 (*pyinit)();  /* initialize Python */
 runSimple = dlsym(lptr, PyRun_SimpleString);
 if (runSimple) {
   (*runSimple)(import sys ; print sys.path; import numpy);
 }
   }
   else {
 fprintf(stderr, Unable to locate Py_Initialize: %s\n, dlerror());
   }
 }
 else {
   fprintf(stderr, Error loading Python shared library: %s\n,
dlerror());
 }
}

bash-3.2$ gcc foo.c ; ./a.out
['/usr/lib/python27.zip', '/usr/lib/python2.7',
'/usr/lib/python2.7/plat-darwin', '/usr/lib/python2.7/plat-mac',
'/usr/lib/python2.7/plat-mac/lib-scriptpackages',
'/usr/Extras/lib/python', '/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload']
Traceback (most recent call last):
 File string, line 1, inmodule
ImportError: No module named numpy

However as you see, it has a completely different sys.path. I can't seem
to find a way to get it to initialize Python with the same sys.path. It
seems like the libpython2.7.dylib is broken. I am at a loss on how to
fix this or even who to ask for help.

--

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



[issue16313] Support xz compression in shutil module

2012-10-26 Thread Hynek Schlawack

Hynek Schlawack added the comment:

Isn’t this a dupe of #5411?

--

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



[issue16313] Support xz compression in shutil module

2012-10-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, this is actually a dupe of #5411? Thanks.

--
resolution:  - duplicate
stage: patch review - committed/rejected
status: open - closed
superseder:  - Add xz support to shutil

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



[issue9856] Change object.__format__(s) where s is non-empty to a TypeError

2012-10-26 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy:  -berker.peksag

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



[issue5411] Add xz support to shutil

2012-10-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have not seen this issue and was created a new issue16313 with almost same 
patch as Eric's one (only I have changed the documentation too). Here's the 
patch. I wonder that it was not committed yet to 3.3. I think it would be 
better first to add xz support and the code cleanup to do then (if it takes so 
much time).

--
nosy: +serhiy.storchaka
versions: +Python 3.4 -Python 3.3
Added file: http://bugs.python.org/file27722/shutil-lzma.patch

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



[issue5411] Add xz support to shutil

2012-10-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: needs patch - patch review

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



[issue11468] Improve unittest basic example in the doc

2012-10-26 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy:  -berker.peksag

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



[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-10-26 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

The problem with using RLIMIT is that the testsuite could be executing several 
tests in parallel using independent threads, for instance. You don't want to 
influence unrelated tests.

Overiding private methods is ugly, but if the code evolves the test would 
break, and the programmer just have to update it. I think that sometimes we 
have to be practical. There are plenty of examples of this in the testsuite, 
using implementation details, etc.

--

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



[issue5411] Add xz support to shutil

2012-10-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file27722/shutil-lzma.patch

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



[issue5411] Add xz support to shutil

2012-10-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, I see the '.bz2' bug. Patch updated.

--
Added file: http://bugs.python.org/file27723/shutil-lzma_2.patch

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



[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Hynek Schlawack

Hynek Schlawack added the comment:

Thanks for taking the time! I remember my frustrations when trying to grok how 
the mp test suite works. :)

A small nit-pick first: you have a lot of extra white space in your patches. 
Just run 'make patchcheck' first, that should warn you about that.

Not sure, but the tests look rather complex to me. I’d humbly propose the the 
simplified test attached, which also ensures that error_callback get only 
called on errors and callback on success.

Opinions?

--
Added file: http://bugs.python.org/file27724/map-async-fix-with-tests.diff

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



[issue15222] mailbox.mbox writes without empty line after each message

2012-10-26 Thread lilydjwg

lilydjwg added the comment:

My system has updated to Python 3.3.0 and this bugs me again :-(
I don't see the changes in Python 3.3.0. So when will this be merged into 3.3?

--

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



[issue15222] mailbox.mbox writes without empty line after each message

2012-10-26 Thread Petri Lehtinen

Petri Lehtinen added the comment:

The fix was committed when 3.3.0 was in release candidate mode, and wasn't 
considered important enough to be included in 3.3.0 anymore. It will be 
included in 3.3.1, which is to be released next month.

--

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



[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-10-26 Thread Charles-François Natali

Charles-François Natali added the comment:

 The problem with using RLIMIT is that the testsuite could be executing 
 several tests in parallel using independent threads, for instance. You don't 
 want to influence unrelated tests.

That's why I suggested to run it in a subprocess: this is used
frequently, e.g. for signal or deadlock tests.

--

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



[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Janne Karila

Janne Karila added the comment:

Otherwise I agree, but what if one of the callbacks is not called? The test 
case would fail on assertEqual(2, len(call_args)) but you wouldn't know which 
callback is the problem.

--

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



[issue4202] Multiple interpreters and readline module hook functions.

2012-10-26 Thread Winston451

Winston451 added the comment:

I attached a patch that solve the problem

--
keywords: +patch
Added file: http://bugs.python.org/file27725/readline.patch

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



[issue16324] MIMEText __init__ does not support Charset instance

2012-10-26 Thread Claude Paroz

Changes by Claude Paroz cla...@2xlibre.net:


--
keywords: +patch
Added file: http://bugs.python.org/file27726/issue16324-1.diff

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



[issue4202] Multiple interpreters and readline module hook functions.

2012-10-26 Thread Winston451

Changes by Winston451 montag...@laposte.net:


--
type:  - behavior
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5

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



[issue4202] Multiple interpreters and readline module hook functions.

2012-10-26 Thread Winston451

Changes by Winston451 montag...@laposte.net:


Added file: http://bugs.python.org/file27727/readline.patch

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



[issue4202] Multiple interpreters and readline module hook functions.

2012-10-26 Thread Winston451

Changes by Winston451 montag...@laposte.net:


Removed file: http://bugs.python.org/file27725/readline.patch

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



[issue16328] win_add2path.py sets wrong user path

2012-10-26 Thread Emil Styrke

New submission from Emil Styrke:

OS: Windows 7 Ultimate x64
Python version: 2.7.3 x64

win_add2path.py in the scripts directory is supposed to add the Scripts 
directory according to its source.  However, it tries to add 
$PYTHONPATH/Scripts, when in fact the Scripts directory is at 
$PYTHONPATH/Tools/Scripts in 2.7.

However, it seems like e.g. Setuptools still installs itself in 
$PYTHONPATH/Scripts, so maybe the right solution is to add both directories.

Furthermore, the script sets the default user path to %PATH%, which is not 
correct at least on windows 7.  I have to manually delete this part of the user 
path to get the user path merged correctly with the system path in cmd.exe.

--
components: Demos and Tools, Windows
messages: 173840
nosy: Emil.Styrke
priority: normal
severity: normal
status: open
title: win_add2path.py sets wrong user path
type: behavior
versions: Python 2.7

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



[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Hynek Schlawack

Hynek Schlawack added the comment:

True, it makes sense to push this assert to the end.

--

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



[issue4202] Multiple interpreters and readline module hook functions.

2012-10-26 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
versions:  -Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2, Python 
3.3, Python 3.5

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



[issue16328] win_add2path.py sets wrong user path

2012-10-26 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
nosy: +christian.heimes

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



[issue16328] win_add2path.py sets wrong user path

2012-10-26 Thread Tim Golden

Tim Golden added the comment:

[this response appears to have got lost in an email black hole somewhere]

I assume that $PYTHONPATH is actually referring to sys.exec_prefix
(and not the PYTHONPATH env var which has nothing to do with this).

In any case c:\python27\scripts is still the place for scripts. There is
a c:\python27\tools\scripts (which you're welcome to add to your %PATH%
if you find the scripts useful) but that's not the place where
user-installed packages are expected to install their executable helper
scripts.

Without looking closely, I think I agree about default the user path to
%PATH%. I'll add Christian Heimes to this call who, I think, wrote the
original code.

--
nosy: +tim.golden

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



Re: [issue16328] win_add2path.py sets wrong user path

2012-10-26 Thread Tim Golden
I assume that $PYTHONPATH is actually referring to sys.exec_prefix
(and not the PYTHONPATH env var which has nothing to do with this).

In any case c:\python27\scripts is still the place for scripts. There is
a c:\python27\tools\scripts (which you're welcome to add to your %PATH%
if you find the scripts useful) but that's not the place where
user-installed packages are expected to install their executable helper
scripts.

Without looking closely, I think I agree about default the user path to
%PATH%. I'll add Christian Heimes to this call who, I think, wrote the
original code.
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16329] mimetypes does not support webm type

2012-10-26 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

http://www.webmproject.org/docs/container/#naming

--
components: Library (Lib)
files: webm.diff
keywords: patch
messages: 173843
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: mimetypes does not support webm type
versions: Python 3.4
Added file: http://bugs.python.org/file27728/webm.diff

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



[issue16329] mimetypes does not support webm type

2012-10-26 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

(patch in attachment)

--

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



[issue16329] mimetypes does not support webm type

2012-10-26 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

How do we know if the webm file is video+audio or audio only?. Mimetypes are 
different. :-?

--
nosy: +jcea

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



[issue16329] mimetypes does not support webm type

2012-10-26 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I'd say we can't but I suppose the same problem might exist for other mime 
types as well.
Given that we can't inspect file content the only choice we have is either 
decide to not support a certain mime type or assume the most common scenario, 
which in case of webm is video.

--

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



[issue16329] mimetypes does not support webm type

2012-10-26 Thread R. David Murray

R. David Murray added the comment:

I suppose this is a flaw in the mimetype API.  At some point perhaps we should 
fix it, but in the meantimedoes anyone have a pointer to an actual IANA 
submission for this mime type?  I think we can probably no longer wait for 
official IANA approval, but it would be nice to have some sort of documentation 
that a given type is more than just in de-facto existence.

--
nosy: +r.david.murray

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2012-10-26 Thread Daniel Oźminkowski

Daniel Oźminkowski added the comment:

Python 2.7.3
WinXP Professional 2002 + SP3
Visual Studio C++ Express 2008

I bumped into this error trying to install fabric. One of the installation 
steps is compiling pycrypto.
After looking into C:\Program Files\Microsoft Visual Studio 
9.0\VC\bin\vcvars32.bat I saw:
%VS90COMNTOOLS%vsvars32.bat

so I run:
set VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools 
directly before pip install fabric and it compiled successfully. Still need to 
see if it works.

--
nosy: +Daniel.Ozminkowski

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



[issue15494] Move test/support.py into a test.support subpackage

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

So IIUC the package will contain __init__.py (what is now support.py), 
script_helper, and pkg_helper.

One reason why I proposed to merge script_helper with support.py is that 
functions like assert_python*() are used in several modules already, and are 
generic enough to belong in support.py IMHO (that's also why I was looking for 
them there).  I count almost 20 modules that are currently using these 
functions, and there might be more that could benefit from them.

In script_helper I also see two functions that seem to deal with packages: 
make_pkg and make_zip_pkg.  If these get moved to pkg_helper, script_helper 
will be left with just an handful of generic functions.

In addition, if the functions you want to add in pkg_helper are also generic 
enough, it might still be better to put everything in support.py.

To summarize I think that adding a package with 3 modules is still better than 
having modules around in test/, but merging everything in support.py might be 
even better (this depends on the functions that will end up in each module, how 
generic they are, and how the modules are divide).

--

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



[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-10-26 Thread Richard Oudkerk

Richard Oudkerk added the comment:

For updated code see http://hg.python.org/sandbox/sbt#spawn

This uses _posixsubprocess and closefds=True.

--
hgrepos: +157

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



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-10-26 Thread Lucas Maystre

Lucas Maystre added the comment:

Alright, here's a version with more tests (unittest.mock is awesome!). I think 
it tests exactly what it should (and no more), i.e. that the arguments are 
correctly passed to `open`.

--
Added file: http://bugs.python.org/file27729/filetype11175.patch

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



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-10-26 Thread Petri Lehtinen

Petri Lehtinen added the comment:

LGTM. Let's wait for Steven's comments as he's the maintainer of argparse.

--
keywords: +needs review
stage: patch review - commit review

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



[issue16328] win_add2path.py sets wrong user path

2012-10-26 Thread Emil Styrke

Emil Styrke added the comment:

Ok, thanks for clearing that up.  And yes, I meant the pythonpath variable in 
the script, which seems to be derived from sys.executable.

But in that case, it's unfortunate that the c:\python27\scripts dir is not 
created during install.  I did win_add2path right after install, and then it 
didn't add the scripts path because it didn't exist.

--

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



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-10-26 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy:  -berker.peksag

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



[issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor

2012-10-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Was does qualname need to be on the struct?

--

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



[issue16330] Use surrogate-related macros

2012-10-26 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

A set of macros to work with surrogates was introduced in 3.3: 
Py_UNICODE_IS_SURROGATE, Py_UNICODE_IS_HIGH_SURROGATE, 
Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES, 
Py_UNICODE_HIGH_SURROGATE, and Py_UNICODE_LOW_SURROGATE.  Using this macros 
makes a code more readable, protect from errors, and allows use the one most 
effective implementation.  But not all surrogate-related code uses this macros. 
 I suppose this is done inadvertently, somewhere the macro and naked code used 
in neighboring lines.

The proposed patch replaces a naked surrogate code to macros in all places 
except expat (which is a foreign code).

--
components: Interpreter Core, Unicode
files: use_surrogate_macros.patch
keywords: patch
messages: 173855
nosy: ezio.melotti, haypo, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use surrogate-related macros
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27730/use_surrogate_macros.patch

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



[issue16239] PEP8 arithmetic operator examples

2012-10-26 Thread Peter Würtz

Peter Würtz added the comment:

 x * 2 - 1 is less clear than x*2 - 1
 I don't feel this.  Anyone else feel this? 

I strongly feel so. And if you don't take my word for it, just open any math 
book or look at any formula and recognize that it is the general consensus that 
the elements of a product are written close together whereas the spacing 
between two summands is considerably larger. Typically, the dots between 
products are omitted to reduce the spacing even further.

Trying to educate people to do otherwise is just weird, isn't it?

 It seems to me, this is a serious change in the Style Guide.

Actually it isn't. Even the current style guide says that there should be an 
increased amount of spacing around operators of low(est) priority. The serious 
change happened when the old rule always use exactly one space around all 
arithmetic operators fell, which certainly was a good call.

I've seen arguments on mailing lists whether to use x ** 2 + 1 instead of x**2 
+ 1 based on that rule. I hardly doubt that anyone prefers x ** 2 + 1 over x**2 
+ 1, so neither should the style guide.

--

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



[issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor

2012-10-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

s/Was/Why/

--

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



[issue16206] dict() docs should display multiple signatures

2012-10-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 361beec678e1 by Ezio Melotti in branch '2.7':
#16206: Improve examples about dict construction.
http://hg.python.org/cpython/rev/361beec678e1

New changeset eb999002916c by Ezio Melotti in branch '3.2':
#16206: Improve examples about dict construction.
http://hg.python.org/cpython/rev/eb999002916c

New changeset 2c1fff6f8956 by Ezio Melotti in branch '3.3':
#16206: merge with 3.2.
http://hg.python.org/cpython/rev/2c1fff6f8956

New changeset 46ce82b4c1fa by Ezio Melotti in branch 'default':
#16206: merge with 3.3.
http://hg.python.org/cpython/rev/46ce82b4c1fa

--

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



[issue16264] test_logging failure on Windows 7 buildbot

2012-10-26 Thread Vinay Sajip

Vinay Sajip added the comment:

 (note: SocketHandler's implementation looks grotesque. Enough said).

Care to be a little more constructive in your criticism? I'm quite open to 
improving it, if you have any suggestions for doing so. It's a very basic 
exponential back-off approach - the only intent was not to keep trying to 
frequently connect to a server which might be offline or unreachable.

--
nosy: +vinay.sajip

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



[issue16304] re: Match Objects always have a boolean value of True

2012-10-26 Thread Ezio Melotti

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


--
keywords: +easy
nosy: +ezio.melotti
stage:  - needs patch
type:  - enhancement

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



[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-26 Thread Ezio Melotti

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


--
nosy: +ezio.melotti, michael.foord

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



[issue16317] Mention lzma module in tutorial

2012-10-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2fc18ba8ca4a by Ezio Melotti in branch '3.3':
#16317: mention lzma in the tutorial.  Patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/2fc18ba8ca4a

New changeset f2f615b5718a by Ezio Melotti in branch 'default':
#16317: merge with 3.3.
http://hg.python.org/cpython/rev/f2f615b5718a

--
nosy: +python-dev

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



[issue16317] Mention lzma module in tutorial

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +chris.jerdonek
title: It would be nice if documentation pages linked to other versions of the 
same document - documentation pages should link to other versions of the same 
page

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



[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-26 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Can you give an example of what you would like the API to look like (i.e. what 
you would like to be able to type from the command-line if, say, configuring 
logging as in the SO post)?

I'm not sure I understand why a wrapper script isn't a good enough solution, as 
described in the accepted answer on SO.

--
nosy: +chris.jerdonek

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



[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-26 Thread Michael Foord

Michael Foord added the comment:

I would do this with a module level (global) flag as to whether the initial set 
up has been done and a BaseTestCase class that checks this flag and calls a set 
up function if it hasn't been done yet (and then sets the flag).

--

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



[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-26 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
assignee:  - michael.foord

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Yury Selivanov

New submission from Yury Selivanov:

This patch adds a dropdown to python documentation top toolbar:
https://dl.dropbox.com/u/21052/python/p3_doc_dd.png

This patch version is for python 3.3  3.4 docs theme, but I can quickly make 
patches for 3.2-style and below.

JavaScript that monitors dropdown events is smart enough to:

1) Redirect users to the same documentation section, i.e. if the user is on 
'atexit' module doc page for 3.3, and decides to switch to '2.7', he'll see 
'atexit' module doc page for 2.7

2) Before making a redirect, is checks that the doc page exists for the 
selected python version, and if not, then it simply redirects to 
'http://docs.python.org/{version}'

3) Users with JS disabled will see a plain-text current version (no drop down)

--
assignee: docs@python
components: Documentation
files: py3_version_switch.patch
keywords: patch
messages: 173864
nosy: docs@python, georg.brandl, rhettinger, yselivanov
priority: normal
severity: normal
status: open
title: Add a version switcher to python docs site
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27731/py3_version_switch.patch

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
type:  - enhancement

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks for the patch.

What happens if the module doesn't exist in a previous version or if it has a 
different name?

It's probably not necessary to include all those versions.

--
nosy: +ezio.melotti
stage:  - patch review
versions: +Python 2.7 -Python 3.1

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

 What happens if the module doesn't exist in a previous version or if it has a 
 different name?

As I said in the first message:


2) Before making a redirect, is checks that the doc page exists for the 
selected python version, and if not, then it simply redirects to 
'http://docs.python.org/{version}'


That's the most sane method I can imagine.

--

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



[issue9192] Add a a way to determine float format

2012-10-26 Thread Mark Dickinson

Mark Dickinson added the comment:

What use-cases did you have in mind for this?  (I assume that something 
motivated this report.)

It seems to me that there's not actually much to say about the float format:  
the only format that Python realistically supports these days is the IEEE 754 
binary64 format.  (In theory we still support whatever C uses, but in practice 
I suspect that if we were ever to manage to run Python on a machine whose C 
doubles *weren't* in binary64 format, we'd see quite a lot of breakage.)

So the only variation that we'll see is little-endian versus big-endian.  We 
don't even support the ARM OABI mixed-endian format.  Should endianness be 
considered an important part of the format?

--
versions: +Python 3.4 -Python 3.2

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

I left a review on rietveld.

FWIW we discussed this already somewhere, and IIRC the two main issues were:
1) mapping new/renamed/delete files between versions;
2) making this work while building the docs locally;

Redirecting to 'http://docs.python.org/{version}' might be an acceptable 
solution for 1) if we don't want to keep lists of module names.
Regarding 2) it depends on the local directory layout, so it would need to be 
configurable.

These are just further enhancements though, I think it would be good to have 
something similar even if it doesn't cover all the possible cases.

--
nosy: +eric.araujo, r.david.murray

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

See #8040.

--

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

 1) mapping new/renamed/delete files between versions;
I think that this dropdown is mostly like to be used to switch between somewhat 
recent python versions, like '3.2' - '3.3', '2.7' - '3.3', and not between 
'2.4' - '3.4'

And most of the internet links point to plain 'docs.python.org', without 
version at all.

 2) making this work while building the docs locally;
I think we need to make this JS dropdown to be off by default; so local users 
won't notice a thing.

--

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

 I think that this dropdown is mostly like to be used to switch between 
 somewhat recent python versions, like '3.2' - '3.3', '2.7' - '3.3',
 and not between '2.4' - '3.4'

I mostly want to switch between 2.x and 3.x, and several modules got renamed 
between these versions.  There are also new modules on each release (5 new ones 
in 3.3).


 I think we need to make this JS dropdown to be off by default;
 so local users won't notice a thing.

Even better would be to make it work -- while fixing the docs I often have to 
apply a patch on each version and then check that it works.  If that's not 
implemented, disabling it sounds OK.  By now I'm used to just change the URLs 
(I do the same even on docs.python.org), but it would be a nice addition.
These are just further improvements though, they don't necessarily prevent the 
current patch to be accepted.

--

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



[issue14901] Python Windows FAQ is Very Outdated

2012-10-26 Thread Ezio Melotti

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


--
keywords: +easy
versions: +Python 3.4

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



[issue10936] Simple CSS fix for left margin at docs.python.org

2012-10-26 Thread Ezio Melotti

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


--
versions: +Python 3.4 -Python 3.1

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

 I mostly want to switch between 2.x and 3.x, and several modules got renamed 
 between these versions.  There are also new modules on each release (5 new 
 ones in 3.3).

To make that work we'll need to have a modules mapping between 2nd and 3rd 
versions.  It will also make URL parsing/changing logic more complicated and 
error prone...

--

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Éric Araujo

Éric Araujo added the comment:

 If you want to work on this you should also consider that the URLs used on 
 docs.python.org don't necessary
 match the directory structure present when building the doc locally.
I think this is irrelevant; this feature is intended for the web site, not for 
developers building the docs.

--

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



[issue16325] PEP 8 refers to reference to PEP 8

2012-10-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Where there's conflict, Guido's style rules for the purposes of this PEP. I 
think this sentence should go. The only way that I can make sense of it is that 
Guido's and Barry's documents have rules that are not in PEP 8 and that if they 
conflict, Guido's wins. (Sort of incorporation by reference.) But if Guido's 
does not exist, then that also makes sense. In any case, PEP8 should say 
everything we want it to say without reference to other docs.

This PEP may still be incomplete (in fact, it may never be finished
 wink) This should either be deleted or modified. This PEP is subject to 
modification. or This PEP will always be subject to modification. is 
sufficient.

--
nosy: +terry.reedy

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Eric,

I'm not sure what we should do with #8040.  I searched for the existing issue 
before creating a new one, but obviously failed.  Should we just close #8040 
and point it to #16331?

--

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Éric Araujo

Éric Araujo added the comment:

Typically we close the newer issue as duplicate of the existing one, unless the 
new has much more discussion or patches.  I would close this one.

About renamed modules: there’s a mapping in lib2to3 that contains the info.

--

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Eric, Ezio,

This one has a patch attached with a relevant discussion  review, so I'd close 
#8040.

But if you guys decide to close this one and switch to #8040 - i'm fine.

--

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

As I said on #16331, it would be nice to have it, but it shouldn't block a 
patch that works for the website only (having it there is still better than not 
having it at all).
What I meant to say is that taking this into account while writing the code is 
a good idea, and having configurable paths might also turn out to be useful in 
case we change the configuration of docs.python.org.

--

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



[issue6478] time.tzset does not reset _strptime's locale time cache

2012-10-26 Thread Berker Peksag

Berker Peksag added the comment:

Here is the second patch with Alexander Belopolsky's comments addressed.

--
nosy: +berker.peksag
versions: +Python 3.3, Python 3.4 -Python 3.1
Added file: http://bugs.python.org/file27732/issue6478.patch

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



[issue6478] time.tzset does not reset _strptime's locale time cache

2012-10-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

The patch looks good, but I have a few comments on the test:

1. Does it work on Windows?  It seems to rely on Olson's TZ names.
2. Please use @run_with_tz decorator.

--

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



[issue16332] Use new exception handling syntax in Subprocess documentation

2012-10-26 Thread Berker Peksag

New submission from Berker Peksag:

See: 
http://docs.python.org/whatsnew/2.6.html#pep-3110-exception-handling-changes

Patch attached.

--
assignee: docs@python
components: Documentation
files: subprocess-exception-2.7.patch
keywords: patch
messages: 173881
nosy: berker.peksag, docs@python
priority: normal
severity: normal
status: open
title: Use new exception handling syntax in Subprocess documentation
versions: Python 2.7
Added file: http://bugs.python.org/file27733/subprocess-exception-2.7.patch

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



[issue16332] Use new exception handling syntax in Subprocess documentation

2012-10-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a69b4077afb by Ezio Melotti in branch '2.7':
#16332: use except OSError as e in subprocess docs.  Patch by Berker Peksag.
http://hg.python.org/cpython/rev/7a69b4077afb

--
nosy: +python-dev

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



[issue16332] Use new exception handling syntax in Subprocess documentation

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - pending
type:  - enhancement

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I recommend closing this as a duplicate.

--
nosy: +chris.jerdonek

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



[issue16332] Use new exception handling syntax in Subprocess documentation

2012-10-26 Thread Ezio Melotti

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


--
status: pending - closed

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Martin v . Löwis

Martin v. Löwis added the comment:

yselivanov: please resubmit the patch to the original issue.

--
nosy: +loewis
resolution:  - duplicate
status: open - closed

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



[issue16331] Add a version switcher to python docs site

2012-10-26 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
superseder:  - documentation pages should link to other versions of the same 
page

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Martin v . Löwis

Martin v. Löwis added the comment:

[on yselivanov's patch]

I think the menu should drop versions that are not maintained anymore, i.e. 
anything older than 2.5 (including). If that sounds too harsh, a single item 
older could be added that always navigates to the version selection page.

With that, navigating to non-existing pages becomes mostly a non-issue, except 
for the renaming from 2.x to 3.x.

If the list is trimmed in that way, I propose to add the links to the side 
menu, rather than as a separate drop-down menu.

--

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Eric, Ezio,

I'd like to make the version dropdown to be configurable.  The question is--I 
can add an option (set to False by default) to conf.py.  Will you have a way to 
override it on the 'docs.python.org'?

--
nosy: +yselivanov

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



[issue16307] multiprocess.pool.map_async callables not working

2012-10-26 Thread Janne Karila

Janne Karila added the comment:

The length assertion protects the test from breaking with IndexError. How about 
this? Though, it looks like two test cases to me.

+self.pool.map_async(int, ['1'],
+callback=call_args.append,
+error_callback=call_args.append).wait()
+self.assertEqual(1, len(call_args))
+self.assertEqual([1], call_args[0])
+self.pool.map_async(int, ['a'],
+callback=call_args.append,
+error_callback=call_args.append).wait()
+self.assertEqual(2, len(call_args))
+self.assertIsInstance(call_args[1], ValueError)

--

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



[issue16271] weird dual behavior with changing __qualname__; different values observed through attribute and descriptor

2012-10-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Here's the other option.

--
Added file: http://bugs.python.org/file27734/qualname2.patch

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Georg Brandl

Georg Brandl added the comment:

A few comments:

* If the issue with patch is closed as duplicate, the patch should be attached 
to the superseder.

* The patch looks awfully long for such a simple option list. (e.g., 
get_version() is just lambda x: x[:3], no need for a function to do that.)

* Keep in mind that you can't easily support 2.5 and down anyway, since their 
URLs are completely different.  I call YAGNI on including anything older than 
2.6.

* Please make it configurable, as indicated. You can add an option recognized 
by Sphinx in Doc/tools/sphinxext/pyspecific.py, with app.add_config_value.  I 
will then set it properly in the script that rebuilds the docs on 
docs.python.org.

That said, the result looks nice.  If we can work out the specifics, +1 for 
something like it.

--

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



[issue16333] Trailing whitespace in json dump when using indent

2012-10-26 Thread Zach Mathew

New submission from Zach Mathew:

When using the indent option in json.JSONEncoder, extra trailing whitespace 
(preceding the newline) is added to list and dict items.

For example:

 import json
 json.dumps(['foo', 'bar'], indent=1)
'[\n foo, \n bar\n]'

Notice the blank space between foo, and \n

EXPECTED OUTPUT:

'[\n foo,\n bar\n]'

--
components: Library (Lib)
files: fix_json_trailing_space_and_tests.patch
keywords: patch
messages: 173891
nosy: zmathew
priority: normal
severity: normal
status: open
title: Trailing whitespace in json dump when using indent
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5
Added file: 
http://bugs.python.org/file27735/fix_json_trailing_space_and_tests.patch

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



[issue16243] Add example for inspect module doc

2012-10-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9d3b616fc702 by Andrew Svetlov in branch '3.3':
Issue #16243: add example for inspect.formatargspec
http://hg.python.org/cpython/rev/9d3b616fc702

New changeset a0337031a6b7 by Andrew Svetlov in branch 'default':
Merge issue #16243: add example for inspect.formatargspec
http://hg.python.org/cpython/rev/a0337031a6b7

--
nosy: +python-dev

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



[issue16243] Add example for inspect module doc

2012-10-26 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Thanks, Berker.
I feel the patch is good enough to close the issue.
If anybody want to add some value please reopen.

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

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

 If the issue with patch is closed as duplicate, the patch should be attached 
 to the superseder.

Attached now.  Although, please don't use it.  I'll upload an updated version 
soon.

 The patch looks awfully long for such a simple option list. (e.g., 
 get_version() is just lambda x: x[:3], no need for a function to do that.)

Well, I've tried to make it readable.  I can uglify it, but it won't save too 
much.  Right now it's about ~2.5kb.

 Please make it configurable, as indicated. You can add an option recognized 
 by Sphinx in Doc/tools/sphinxext/pyspecific.py, with app.add_config_value.  I 
 will then set it properly in the script that rebuilds the docs on 
 docs.python.org.

Is it OK if I make it configurable via theme config property?
And if not - how to make a config option declared via 'app.add_config_value' 
accessible in templates?

--
keywords: +patch
Added file: http://bugs.python.org/file27736/py3_version_switch.patch

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Attaching a new patch, with all previous issues resolved.

Version dropdown can be enabled by the new 'pydoc_versionswitcher' config 
property (False by default).

Please review and test (I've done lots of testing by injecting the JS on live 
python docs site, but maybe missed something.)

--
Added file: http://bugs.python.org/file27737/py3_version_switch.2.patch

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



[issue9767] Failures in json doc examples

2012-10-26 Thread R. David Murray

R. David Murray added the comment:

See issue 16333 for the bug report against the json trailing whitespace.

--
nosy: +r.david.murray

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



[issue16333] Trailing whitespace in json dump when using indent

2012-10-26 Thread R. David Murray

R. David Murray added the comment:

Thanks for the report and patch.

I think we'll need a fix for the C version, too (unless it doesn't have the 
bug).

--
nosy: +r.david.murray
stage:  - patch review
versions:  -Python 2.6, Python 3.1, Python 3.5

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



  1   2   >