[issue10015] Creating a multiprocess.pool.ThreadPool from a child thread blows up.

2011-10-26 Thread Alister Cordiner

Alister Cordiner  added the comment:

I think that workaround should be:

if not hasattr(threading.current_thread(), "_children"):
threading.current_thread()._children = weakref.WeakKeyDictionary()

--
nosy: +acordiner

___
Python tracker 

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



[issue13268] assert statement violates the documentation

2011-10-26 Thread Ezio Melotti

Changes by Ezio Melotti :


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

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Ezio Melotti

Ezio Melotti  added the comment:

I think Éric is referring to the foo(bar, *, baz=None) syntax.  In 2.7 you can 
drop the '*' and still leave only the keyword arguments that you think are more 
useful.
I also see that you converted a few examples to use shell=True, but afaiu that 
should be avoided (even if the input is trusted, it can be a bad example and 
lead to escaping issues).
For the 'exit 1' example you could add a note saying that the example is run 
with shell=True because 'exit' requires a shell, or just keep the more verbose 
Python version.
My concern is that many people just go trough the examples and copy/paste what 
they see without reading the text around unless it's necessary to make the 
command work, so, if many examples use shell=True, they might end up picking 
one of those.

--

___
Python tracker 

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



[issue13271] When -h is used with argparse, default values that fail should not matter

2011-10-26 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +bethard, eric.smith

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

I added a cp65001 codec to Python 3.3: see issue #13216.

--

___
Python tracker 

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



[issue7441] Py3.1: Fatal Python Error: Py_Initialize...unknown encoding: chcp 65001.

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

I added a cp65001 codec to Python 3.3: see issue #13216. So Python will not 
"crash" anymore if the console code page is set to cp65001.

--
nosy: +haypo

___
Python tracker 

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



[issue10920] cp65001, PowerShell, Python crash.

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

I added a cp65001 codec to Python 3.3: see issue #13216. So Python will not 
"crash" anymore if the console code page is set to cp65001.

--

___
Python tracker 

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



[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

I added a cp65001 codec to Python 3.3: see issue #13216.

--

___
Python tracker 

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



[issue6058] Add cp65001 to encodings/aliases.py

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

I added a cp65001 codec to Python 3.3: see issue #13216.

--

___
Python tracker 

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



[issue13216] Add cp65001 codec

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

Lib/encodings/cp65001.py uses a little trick to mark the codec as specific to 
Windows:
-
if not hasattr(codecs, 'code_page_encode'):
raise LookupError("cp65001 encoding is only available on Windows")
-

--

___
Python tracker 

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



[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

Oops, I specified the wrong issue number in my changeset 2cad20e2e588, it's the 
issue #13216.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue13216] Add cp65001 codec

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

New changeset 2cad20e2e588 by Victor Stinner in branch 'default':
Close #13247: Add cp65001 codec, the Windows UTF-8 (CP_UTF8)
http://hg.python.org/cpython/rev/2cad20e2e588

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue13216] Add cp65001 codec

2011-10-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0eac706d82d1 by Victor Stinner in branch 'default':
Fix the issue number of my cp65001 commit: 13247 => issue #13216
http://hg.python.org/cpython/rev/0eac706d82d1

--
nosy: +python-dev

___
Python tracker 

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



[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2cad20e2e588 by Victor Stinner in branch 'default':
Close #13247: Add cp65001 codec, the Windows UTF-8 (CP_UTF8)
http://hg.python.org/cpython/rev/2cad20e2e588

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

___
Python tracker 

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



[issue6397] Implementing Solaris "/dev/poll" in the "select" module

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

Changes by Jesús Cea Avión :


--
title: Implementing Solaris "poll" in the "select" module -> Implementing 
Solaris "/dev/poll" in the "select" module

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Jesús Cea Avión  added the comment:

Documentation added. That solves 2 and 5.

I still have to solve 6.

--

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Added file: http://bugs.python.org/file23532/0b701eb5e9e3.diff

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Removed file: http://bugs.python.org/file23531/6becc4e3eece.diff

___
Python tracker 

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



[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

Python 2 uses byte strings. If characters are not encodable to the ANSI code 
page, Windows replaces them by question marks. See the issue #13247 for another 
example (in Python 3 when using explicitly the bytes API). To be able to 
support characters not encodable to the ANSI code page, you have to use Unicode 
*everywhere*.

Because Python 2 doesn't have access to the Unicode environment and uses bytes 
in most cases, I don't think that we can fix this issue in Python 2.

I close this issue because it would require too much work to fix this issue in 
Python 2, whereas it already works in Python 3.  Move to Python 3 is the best 
solution of this issue.

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

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Added file: http://bugs.python.org/file23531/6becc4e3eece.diff

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Removed file: http://bugs.python.org/file23526/0ee4386d8f51.diff

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Jesús Cea Avión  added the comment:

Solved points 1, 3 and 4.

2 will be solved with the documentation.

5 and 6 still pending.

--

___
Python tracker 

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



[issue13271] When -h is used with argparse, default values that fail should not matter

2011-10-26 Thread Joshua Chia

New submission from Joshua Chia :

What steps will reproduce the problem?
1. Make a script containing this code:

 parser = argparse.ArgumentParser()
 parser.add_argument('-i', '--input-base-directory',
 type=argparse.FileType('r'),
 default='/home')
 parser.parse_args()

2. Run the script with '-h'.
3. See it complain that '/home' is a directory

Detailed explanation:
With '-h', we just need to print the help message. We shouldn't fail on a 
default value that's wrong or else the help message will not get printed and 
the user will have no idea what the problem is. This is a valid use case as I 
want to provide a default location, but I can't guarantee that the location 
works on the user's machine. I end up doing my own checking.

--
components: Library (Lib)
messages: 146458
nosy: Joshua.Chia
priority: normal
severity: normal
status: open
title: When -h is used with argparse, default values that fail should not matter
type: feature request
versions: Python 2.7

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Jesús Cea Avión  added the comment:

I have decided to segregate "select.devpoll" to a separate object, like 
"select.epoll".

--

___
Python tracker 

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



[issue13193] test_packaging and test_distutils failures

2011-10-26 Thread Westley Martínez

Westley Martínez  added the comment:

http://www.archlinux.org/download/

It's a minimalist distribution but if you read through the install guide or 
beginner's guide you'll be fine.

--

___
Python tracker 

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



[issue13270] all classes are new style

2011-10-26 Thread Florent Xicluna

New submission from Florent Xicluna :

these last references to old/new classes should be dropped.
See patch.

--
assignee: docs@python
components: Documentation
files: all_classes_belong_to_new_style.diff
keywords: patch
messages: 146455
nosy: docs@python, flox
priority: normal
severity: normal
stage: patch review
status: open
title: all classes are new style
type: behavior
versions: Python 3.2, Python 3.3
Added file: 
http://bugs.python.org/file23530/all_classes_belong_to_new_style.diff

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Nick Coghlan

Nick Coghlan  added the comment:

That's deliberate, as I'm only showing a selected subset of the full
signature at that point and using the subprocess API's with positional
arguments would lead to almost incomprehensible code. I'm not in any great
hurry to forward port though, so I'm happy to wait until you get a chance to
review the changes.

--

___
Python tracker 

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



[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-10-26 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

added some tests (not sure if in appropriate place).

--
Added file: http://bugs.python.org/file23529/issue_8036_1.patch

___
Python tracker 

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



[issue5661] asyncore should catch EPIPE while sending() and receiving()

2011-10-26 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

> I am not marking 'test needed' since the problem is 'hardly reproducible'.

The attached script named 'asyncore_epipe.py' may be used to reproduce
systematically the EPIPE error on linux with Python 3.2:

* the Reader closes the socket after receiving the first data
* the Writer gets an exception when attempting to write the next
  message on the closed socket

When you run 'python asyncore_epipe.py' or 'python asyncore_epipe.py
1025' you get an EPIPE error (1025 is the size of exchanged messages,
so the last Writer message has been fully read by the Reader before
closing).

When you run 'python asyncore_epipe.py 128' you get an ECONNRESET (the
Reader reads only 128 bytes before closing the socket)

Note that ECONNRESET has been removed in this script, from the
frozenset of handled errors, to make this last point visible.

So it seems that, on linux, when writing to a closed socket, you get
an ECONNRESET when there is still data in the socket, and an EPIPE
otherwise. In the first case the tcp connection ends with a single
RESET, and in the second case it ends with the sequence FIN-ACK-RESET.

--
nosy: +xdegaye
Added file: http://bugs.python.org/file23528/asyncore_epipe.py

___
Python tracker 

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



[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Yuval, you are assuming that *no one* who uses the os byte APIs on Windows is 
either checking for '?' in returned paths or catching later exceptions. With 
Google code search, I did find one instance where someone tests paths for '?' 
after encoding with the file system encoding. It was not an instance of os.xxx 
output, but it is the same idea.

In any case,
1. Our experience is that any change will affect someone. I was the victim of a 
'harmless' micro change introduced in 3.1.2 (an intentional violation of the 
bugfix-only rule in bugfix releases -- and the last that I know of ;-).
2. The change will introduce an incompatibility between 3.2- and 3.3+.

The justification that mitigates the above is that there is little reason to 
request os bytes returns. By the same reasoning, the change is hardly worth 
bothering with as there should be little to no benefit in real code. So I am 
+-0 on the change.

--

___
Python tracker 

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



[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-26 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Unicode environment vars work properly in Python 3.x on Windows, too, because 
the convertenviron() function in posixmodule.c uses extern _wenviron 
PyUnicode_FromWideChar() in Python 3.x. In Python 2.7, convertenviron() uses 
extern environ and PyString_FromString*().

--
nosy: +santa4nt

___
Python tracker 

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



[issue10860] Handle empty port after port delimiter in httplib

2011-10-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset e0499b2b28aa by Petri Lehtinen in branch '2.7':
Issue #10860: Skip the new test if HTTPS is not available
http://hg.python.org/cpython/rev/e0499b2b28aa

New changeset a3939c2f6727 by Petri Lehtinen in branch '3.2':
Issue #10860: Skip the new test if HTTPS is not available
http://hg.python.org/cpython/rev/a3939c2f6727

New changeset 2dd106799aa9 by Petri Lehtinen in branch 'default':
Issue #10860: Skip the new test if HTTPS is not available
http://hg.python.org/cpython/rev/2dd106799aa9

--

___
Python tracker 

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



[issue13265] IDLE crashes when printing some unprintable characters.

2011-10-26 Thread Ned Deily

Ned Deily  added the comment:

With a current 3.3 build (i.e. "wide" build) on OS X, I can reproduce this. It 
causes an exception on the execution of that command in the IDLE shell but it 
doesn't crash IDLE.  Not surprisingly, it doesn't seem to be reproducible with 
3.2 "narrow" builds.

--
nosy: +ned.deily
type: crash -> 
versions: +Python 3.3

___
Python tracker 

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



[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-26 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

It seems this cannot be achieved the same way in 2.7 as the traceback is not 
directly associated with the exception. However, if we're currently in an 
exception handler and sys.exc_info() corresponds to the exception passed to 
generator.throw(), we could use the current traceback. Would this approach be 
too complicated and not worth it?

--

___
Python tracker 

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



[issue4945] json checks True/False by identity, not boolean value

2011-10-26 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
versions: +Python 3.3 -Python 2.6, Python 3.1

___
Python tracker 

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



[issue13268] assert statement violates the documentation

2011-10-26 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
components: +Interpreter Core
nosy: +petri.lehtinen
versions:  -Python 2.6

___
Python tracker 

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



[issue13236] unittest needs more flush calls

2011-10-26 Thread Peter Eisentraut

Peter Eisentraut  added the comment:

Attached is a test file.  The key here is that I'm running the unittest suite 
inside of a long-running server process, so there is no predictable point of 
exit and cleanup.  Therefore, the steps I show at the end of the file should be 
run in an interactive interpreter.  Here is what I see:

>>> import unittest 
>>> 
>>> import testcase 
>>> 
>>> unittest.main(module=testcase)
.F.
==
FAIL: test_three (testcase.test)
--
Traceback (most recent call last):
  File "testcase.py", line 35, in test_three
self.fail("intentional failure")
AssertionError: intentional failure

--
Ran 3 tests in 0.002s

FAILED (failures=1)

That's good.

But:

>>> import unittest 
>>> 
>>> import testcase 
>>> 
>>> unittest.main(module=testcase, testRunner=testcase.FunnyTestRunner, 
>>> exit=False) 
.
F
.


You see, the test report at the end is missing.

I'm happy to consider other ways of addressing this, if anyone has an idea.

--
Added file: http://bugs.python.org/file23527/testcase.py

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


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

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Jesús Cea Avión  added the comment:

First version of the patch. Review 0ee4386d8f51.diff 
http://bugs.python.org/file23526/0ee4386d8f51.diff

Details:

1. Current code aliases "devpoll" in platforms with "/dev/poll" (Solaris and 
derivatives). Considering all the other points, I think that providing a 
separate "select.devpoll" object would be a better idea. Opinions?.

2. I am not providing the exception contract documented in "select.poll". For 
instance, "poll.unregister" of a "fd" not previously registered doesn't raise 
an exception. Idem "poll.modify", etc. I could do it, but is pointless extra 
code.

3. I have added a boolean "select.isdevpoll" to indicate if "selec.poll" uses 
"poll()" or "/dev/poll". Ugly.

4. I release the GIL when waiting for the fds, but not when 
registering/unregistering fds, etc. I guess that the syscall would be very 
fast, but I haven't actually measure it.

5. The internal REMOVE is because if you "register" several times the same fd, 
the events are ORed. To avoid that I do an internal REMOVE first. I should scan 
the pollfds internally and update the events inplace. Or provide a separate 
"devpoll" and document this fact...

6. If the number of active fds is bigger that SIZE_DEVPOLL, only SIZE_DEVPOLL 
fds are returned. If you "poll" several times, you get the SAME fds, if they 
are still active. So, others active fds can suffer of starvation. Solutions: 
selftunning (if the module provide 20 slots and the OS provide 20 active fds, 
call again with 40 free slots, etc) or provide a separate "devpoll" and 
document this fact, posibly providing a "maxsize" parameter. "select.epoll" 
uses FD_SETSIZE, directly.

With this, I am starting to think that providing a separate "select.devpoll" is 
actually a better idea.

Opinions?.

--

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Added file: http://bugs.python.org/file23526/0ee4386d8f51.diff

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Removed file: http://bugs.python.org/file23525/6ea157b9d110.diff

___
Python tracker 

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



[issue4945] json checks True/False by identity, not boolean value

2011-10-26 Thread Amirouche Boubekki

Changes by Amirouche Boubekki :


--
nosy: +abki

___
Python tracker 

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



[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2011-10-26 Thread Daniel Urban

Changes by Daniel Urban :


--
nosy: +durban

___
Python tracker 

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



[issue12657] Cannot override JSON encoding of basic type subclasses

2011-10-26 Thread Amirouche Boubekki

Changes by Amirouche Boubekki :


--
nosy: +abki

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Added file: http://bugs.python.org/file23525/6ea157b9d110.diff

___
Python tracker 

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-10-26 Thread Ned Deily

Ned Deily  added the comment:

Haypo, the OP has a workaround. IMO, we should not be making any 
recommendations about which Apple compiler to use on OS X 10.7 until we have 
completed test cycles of each.  There are too many variables at the moment.  I 
am doing that and should have results in a few days.

--

___
Python tracker 

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



[issue13193] test_packaging and test_distutils failures

2011-10-26 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

I've been able to consistently reproduce the test_resources failure on Ubuntu 
11.10 64-bit, FWIW.

--

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Éric Araujo

Éric Araujo  added the comment:

I want to review the doc, but lack time right now.  For example, one function 
signature in your patch uses keyword-only arguments but 2.7 doesn’t support 
them.

--

___
Python tracker 

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



[issue13193] test_packaging and test_distutils failures

2011-10-26 Thread Éric Araujo

Éric Araujo  added the comment:

anikom15, can you give me a URI to download the OS you used?  I don’t know when 
I’ll be able to download Windows, but surely a linux-using OS will take less 
space and time to download and install in a VM.

--

___
Python tracker 

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



[issue13268] assert statement violates the documentation

2011-10-26 Thread Alexander Myodov

Changes by Alexander Myodov :


--
title: assert -> assert statement violates the documentation

___
Python tracker 

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



[issue1011113] Make “install” find the build_base directory

2011-10-26 Thread Éric Araujo

Éric Araujo  added the comment:

Actually I think this bug can be fixed in distutils.

--
components: +Distutils
keywords: +easy
resolution: remind -> 
stage:  -> needs patch
type: feature request -> behavior
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue13269] Document that "Remote hg repo" accepts remote branches

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

Changes by Jesús Cea Avión :


--
Removed message: http://bugs.python.org/msg146438

___
Python tracker 

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



[issue13269] Document that "Remote hg repo" accepts remote branches

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

Jesús Cea Avión  added the comment:

Eric, the original text says:

"""
The Create Patch button will then compute a diff for the head revision of the 
**remote** branch, and attach the diff to the issue.
"""

:-)

--

___
Python tracker 

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



[issue13269] Document that "Remote hg repo" accepts remote branches

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

Jesús Cea Avión  added the comment:

Eric, the original text says:

"""
The Create Patch button will then compute a diff for the head revision of the 
remote branch, and attach the diff to the issue.
^^
"""

:-)

--

___
Python tracker 

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



[issue13269] Document that "Remote hg repo" accepts remote branches

2011-10-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7fbd2fe8c13c by Jesus Cea in branch 'default':
Close #13269: Document that "Remote hg repo" accepts remote branches
http://hg.python.org/devguide/rev/7fbd2fe8c13c

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

___
Python tracker 

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



[issue13269] Document that "Remote hg repo" accepts remote branches

2011-10-26 Thread Éric Araujo

Éric Araujo  added the comment:

> I take care of this.
Okay, as long as you don’t use Git terminology like “remote” :)

--
components: +Devguide -Distutils

___
Python tracker 

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



[issue13269] Document that "Remote hg repo" accepts remote branches

2011-10-26 Thread Ezio Melotti

Changes by Ezio Melotti :


--
components: +Distutils
nosy: +eric.araujo, ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue13269] Document that "Remote hg repo" accepts remote branches

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

New submission from Jesús Cea Avión :

"Remote hg repo" accepts remote branches, but the devguide says that the patch 
must be in "default" branch.

Update the docs.

I take care of this.

--
assignee: jcea
keywords: easy
messages: 146435
nosy: jcea
priority: normal
severity: normal
status: open
title: Document that "Remote hg repo" accepts remote branches

___
Python tracker 

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



[issue13268] assert

2011-10-26 Thread Alexander Myodov

New submission from Alexander Myodov :

The extended version of assert statement has a strange violation of documented 
behaviour.

According to the 
http://docs.python.org/reference/simple_stmts.html#the-assert-statement, 
"assert expression1, expression2" should be equivalent to "if __debug__: if not 
expression1: raise AssertionError(expression2)". Nevertheless, it is not so for 
the following scenario:

class A(object):
def __str__(self):
return "str"
def __unicode__(self):
return "unicode"
def __repr__(self):
return "repr"

expression1 = False
expression2 = (A(),)

That is, when expression2 is a single-item tuple, assert statement prints the 
str-evaluation of the item itself, rather than of the tuple.

This occurs in 2.x branch only, seems fixed in 3.x, and it would be great to 
have it backported for consistency.

--
messages: 146434
nosy: amyodov
priority: normal
severity: normal
status: open
title: assert
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


Removed file: http://bugs.python.org/file23524/d014fd90a487.diff

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


--
keywords: +patch
Added file: http://bugs.python.org/file23524/d014fd90a487.diff

___
Python tracker 

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



[issue6397] Implementing Solaris "poll" in the "select" module

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

Changes by Jesús Cea Avión :


--
hgrepos: +86

___
Python tracker 

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



[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2011-10-26 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

I asked for more information about llvm-gcc on IRC (#llvm). Extracts:

 - "llvm-gcc is not maintained." ("Clang and DragonEgg are.) "Apple is the 
maintainer of Apple's version of llvm-gcc and clang."
 - "Apple ships a [llvm-gcc] branch at a random point in svn + some bug fixes, 
not a proper release."
 - "llvm-gcc is Apple's GCC (which was never sync'd with mainline past 4.2.1 
because the FSF changed the license) with LLVM on the back end."
 - llvm-gcc-4.5 in Ubuntu 10.10 is not llvm-gcc, it's dragonegg, a new project

If I understood correctly, llvm-gcc is only the default C compiler of Xcode 
4.1. I don't think that you should workaround llvm-gcc bugs. If you are using 
Xcode 4.1, you can compile Python with clang. clang is a different C compiler 
and it doesn't have the bug.

--
title: llvm-gcc-4.2 miscompiles Python (XCode 4.1+ on Mac OS 10.7) -> 
llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 5dfe6d7f7c61 by Nick Coghlan in branch '2.7':
Issue #13237: fix typo
http://hg.python.org/cpython/rev/5dfe6d7f7c61

--

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Nick Coghlan

Nick Coghlan  added the comment:

Absent any further feedback, I think I'm done with the changes to the 2.7 
subprocess docs. I'll let them sit for a few days, then do the forward port to 
3.2 and default.

There are a couple of additional changes I'll add to the 3.x versions:
- mention redirecting to DEVNULL as a way of suppressing output when using 
call() and check_call()
- mention the UTF-8 assumption involved in using the universal newlines mode 
for pipes in 3.x (i.e. the stuff I mistakenly checked in to 2.7 and then 
reverted)

--

___
Python tracker 

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1+ on Mac OS 10.7)

2011-10-26 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Assertion failed in _PyUnicode_CheckConsistency during build of default 
branch on Mac OS X -> llvm-gcc-4.2 miscompiles Python (XCode 4.1+ on Mac OS 
10.7)

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f445c125aca3 by Nick Coghlan in branch '2.7':
Issue #13237: remove some details that only apply to the 3.x version of this 
module and cross reference the relocated warning about the dangers of invoking 
the shell with untrusted input
http://hg.python.org/cpython/rev/f445c125aca3

--

___
Python tracker 

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



[issue13237] subprocess docs should emphasise convenience functions

2011-10-26 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0b4df6701c4d by Nick Coghlan in branch '2.7':
Issue #13237: further updates to subprocess documentation
http://hg.python.org/cpython/rev/0b4df6701c4d

--

___
Python tracker 

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



[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-26 Thread STINNER Victor

STINNER Victor  added the comment:

> Yuval Greenfield  added the comment:
> Another option btw is to use utf-16

UTF-8, UTF-16 or any encoding different than the ANSI code page are not an 
option. The Windows bytes API expect filenames encoded to the ANSI code page. 
os.listdir() would raise an error (unknown directory) or return an empty list 
instead of the content of the directory.

--

___
Python tracker 

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



[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-26 Thread Yuval Greenfield

Yuval Greenfield  added the comment:

It won't break existing code. Ignoring this problem here only moves the 
exception to whenever the data returned is first used.

Any code this fix "breaks" is already broken.

--

___
Python tracker 

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



[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-10-26 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I scanned through the libs for Python 2.7, 3.2, and 3.3 and there is no 
construction of HTTPError that does not pass a string for msg. I believe it 
would be reasonable to alias reason to msg. I'll put together the changesets.

--

___
Python tracker 

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



[issue13267] Add an option to disable importing orphaned bytecode files

2011-10-26 Thread Nick Coghlan

Nick Coghlan  added the comment:

This feature is unnecessary now that PEP 3147 has been adopted. The way it 
works in 3.2+ is that orphaned bytecode files inside __pycache__ are always 
ignored, while bytecode files that live directly in the source directories are 
always imported.

This handles both use cases nicely:
- the implicitly created cache files are ignored if their source file has been 
deleted
- bytecode only distribution is still supported by explicitly installing 
bytecode files instead of source files

--
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-26 Thread Atsuo Ishimoto

Atsuo Ishimoto  added the comment:

On Wed, Oct 26, 2011 at 3:36 PM, Yuval Greenfield
 wrote:

> If the current situation isn't fixed though - you just can't use the 
> resulting path for almost anything. Do you have a use case Ishimoto?

I don't have use case. But does raising UnicodeEncodeError fix
problems?  It could break existing code, but I don't see much
difference over WindowsError caused by the broken file names.

> The fact is you shouldn't be doing os.path.abspath(b'.') in windows to begin 
> with.

Agreed. So I think adding Windows specific check to Byte API does not
improve situation, but increase complexity of std lib.

--

___
Python tracker 

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



[issue13267] Add an option to disable importing orphaned bytecode files

2011-10-26 Thread Petri Lehtinen

New submission from Petri Lehtinen :

This has been discussed in python-ideas approx. two years ago:

http://mail.python.org/pipermail/python-ideas/2009-December/006635.html

It seems to me that having an opt-in command-line option, environment variable 
and sys variable to disable loading orphaned bytecode files upon import had 
most use cases and gained most support.

--
components: Interpreter Core
messages: 146423
nosy: brett.cannon, ncoghlan, petri.lehtinen, pitrou
priority: normal
severity: normal
status: open
title: Add an option to disable importing orphaned bytecode files
type: feature request
versions: Python 3.3

___
Python tracker 

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



[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-26 Thread Yuval Greenfield

Yuval Greenfield  added the comment:

Another option btw is to use utf-16, which will work but it's a bit ugly as 
well:

>>> os.listdir(os.path.abspath(u'.').encode('utf-16'))
[]
>>> os.path.abspath(u'.')
u'C:\\Users\\alon\\Desktop\\\u05e9\u05dc\u05d5\u05dd'
>>> os.path.abspath(u'.').encode('utf-16')
'\xff\xfeC\x00:\x00\\\x00U\x00s\x00e\x00r\x00s\x00\\\x00a\x00l\x00o\x00n\x00\\\x
00D\x00e\x00s\x00k\x00t\x00o\x00p\x00\\\x00\xe9\x05\xdc\x05\xd5\x05\xdd\x05'
>>> os.listdir(os.path.abspath(u'.').encode('utf-16'))
[]

Tested on python 2.7, but you know what I mean.

--

___
Python tracker 

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