[issue16814] use --directory option of make in describing how to build the docs

2013-01-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5f24a77e7beb by Chris Jerdonek in branch 'default':
Issue #16814: add "make -C Doc html" short-cut to documentation instructions.
http://hg.python.org/devguide/rev/5f24a77e7beb

--
nosy: +python-dev

___
Python tracker 

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



[issue16814] use --directory option of make in describing how to build the docs

2013-01-11 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I went ahead and committed this if that's okay.  I wasn't sensing any strong 
objection but -0 from some and +1 or +0 from others.  To compensate for the 
extra six words, I went ahead and first made the current language more concise 
here:

http://hg.python.org/devguide/rev/157066a204ab

If anyone feels strongly, I would be happy to revert the change though.

--
resolution:  -> fixed
stage:  -> committed/rejected

___
Python tracker 

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



[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex

2013-01-11 Thread Mark Dickinson

Mark Dickinson added the comment:

> But I'm unsure is this is expected behavior or luck, and on some
> platform this code will not work due to different complex numbers
> internal representation.

What platform?  Isn't the complex number representation standard?  E.g., C99 
6.2.5p13 says: "Each complex type has the same representation and alignment 
requirements as an array type containing exactly two elements of the 
corresponding real type; the first element is equal to the real part, and the 
second element to the imaginary part, of the complex number."

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue16929] poll()/epoll() are not thread-safe

2013-01-11 Thread Charles-François Natali

New submission from Charles-François Natali:

After optimizing epoll() to use a per-instance buffer like poll() does 
(http://bugs.python.org/issue16876), I realized that it wasn't thread-safe, and 
can result in crashes:
"""
 ./python /tmp/test.py
*** glibc detected *** ./python: free(): corrupted unsorted chunks: 
0x01c8e690 ***
=== Backtrace: =
/lib64/libc.so.6[0x3041c75676]
./python[0x4fd9ae]
./python(PyThreadState_DeleteCurrent+0x10c)[0x4fdb91]
./python[0x52a444]
/lib64/libpthread.so.0[0x30428077e1]
/lib64/libc.so.6(clone+0x6d)[0x3041ce153d]
=== Memory map: 
[...]
"""

The problem is that poll (and now epoll) array is stored per-instance, and if 
second call to poll() is made while another thread is currently blocked on 
poll(), the array is reallocated (through PyMem_Resize()) if the buffer size 
has changed (if the number of FDs registered has changed).

"""
static int
update_ufd_array(pollObject *self)
[...]
self->ufd_len = PyDict_Size(self->dict);
PyMem_RESIZE(self->ufds, struct pollfd, self->ufd_len);
[...]
"""

can be called while another thread is blocked there:
"""
/* call poll() */
Py_BEGIN_ALLOW_THREADS
poll_result = poll(self->ufds, self->ufd_len, timeout);
Py_END_ALLOW_THREADS
"""

So when the first call to poll() returns, it can end up in SIGSEGV or heap 
corruption (unless the array was increased an realloc() was able to expand it 
in-place).

Reproducer script attached.

--
components: Extension Modules
files: test.py
messages: 179647
nosy: christian.heimes, neologix
priority: normal
severity: normal
stage: needs patch
status: open
title: poll()/epoll() are not thread-safe
type: crash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28685/test.py

___
Python tracker 

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



[issue16928] spurious Cron Daemon e-mails to d...@dinsdale.python.org

2013-01-11 Thread Georg Brandl

Georg Brandl added the comment:

This is a known issue in older Sphinx versions.  I've updated the version used 
to build the devguide now; this should fix it.

--
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



[issue16928] spurious Cron Daemon e-mails to d...@dinsdale.python.org

2013-01-11 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Great, thank you! :)

--

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-01-11 Thread Chris Jerdonek

New submission from Chris Jerdonek:

In various places, the devguide recommends `hg graft`, but it appears it might 
not be possible to use on some systems or in certain situations.  For example, 
when I tried grafting a trivial change from 2.7 to 3.2 on Mac OS X, I got the 
following fatal error:

$ hg graft 2.7
grafting revision 81391
abort: case-folding collision between Lib/ConfigParser.py and 
Lib/configparser.py

Here is some related information: 
http://mercurial.selenic.com/wiki/FixingCaseCollisions

At the least, we might want to add a note saying that `hg graft` may not work 
on certain systems (and name those systems).

--
components: Devguide
messages: 179650
nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan
priority: normal
severity: normal
status: open
title: mention limitations and/or alternatives to hg graft

___
Python tracker 

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2013-01-11 Thread Ezio Melotti

Ezio Melotti added the comment:

This is what I found out.
I used an easily copy/pastable one-liner that creates 3 variables: e (no 
children), e2 (3 children), e3 (5 children).

Original leaky code (test_xml_etree_c leaked [56, 56] references, sum=112):
>>> from xml.etree import ElementTree as ET; e = ET.Element('foo'); SAMPLE_XML 
>>> = "text>> id='inner'>subtext"; e2 = ET.XML(SAMPLE_XML); 
>>> SAMPLE_XML = "text>> class='b' />>> id='inner'>subtext"; e3 = ET.XML(SAMPLE_XML)
[76773 refs]
>>> ### e has no children and leaks 1 ref:
>>> e.__getstate__()
{'tag': 'foo', 'attrib': {}, 'text': None, 'tail': None, '_children': []}
[76791 refs]
>>> e.__getstate__()
{'tag': 'foo', 'attrib': {}, 'text': None, 'tail': None, '_children': []}
[76792 refs]
>>> e.__getstate__()
{'tag': 'foo', 'attrib': {}, 'text': None, 'tail': None, '_children': []}
[76793 refs]
>>> ### e2 has 3 children and leaks 4 refs:
>>> e2.__getstate__()
{'tag': 'body', 'attrib': {}, 'text': None, 'tail': None, '_children': 
[, , ]}
[76798 refs]
>>> e2.__getstate__()
{'tag': 'body', 'attrib': {}, 'text': None, 'tail': None, '_children': 
[, , ]}
[76802 refs]

The leaked refs seems to be 1 for the children list + 1 for each children.
The diff I pasted in the previous *seems* to fix this (i.e. leaks in 
__gestate__ are gone, tests pass), but I had it crash once (couldn't reproduce 
after that, so it might be unrelated*), and I'm not sure it's correct.

With that patch applied we go down to test_xml_etree_c leaked [6, 6] 
references, sum=12.
The remaining leaks seem to be in __setstate__.
Patched code:
>>> from xml.etree import ElementTree as ET; e = ET.Element('foo'); SAMPLE_XML 
>>> = "text>> id='inner'>subtext"; e2 = ET.XML(SAMPLE_XML); 
>>> SAMPLE_XML = "text>> class='b' />>> id='inner'>subtext"; e3 = ET.XML(SAMPLE_XML)
[76773 refs]
>>> ### no more leaks for getstate:
>>> p = e.__getstate__()
[76787 refs]
>>> p = e.__getstate__()
[76787 refs]
>>> ### also no leaks when there are no child:
>>> e.__setstate__(p)
[76788 refs]
>>> e.__setstate__(p)
[76788 refs]
>>> ### no more leaks for getstate with children:
>>> p2 = e2.__getstate__()
[76807 refs]
>>> p2 = e2.__getstate__()
[76807 refs]
>>> ### one ref leaked for every child in __setstate__:
>>> e2.__setstate__(p2)
[76810 refs]
>>> e2.__setstate__(p2)
[76813 refs]
>>> e2.__setstate__(p2)
[76816 refs]

I'm not working on this anymore now, so someone more familiar with the code can 
take a look, see if my patch is correct, and fix the remaining leaks.

* maybe I'm doing something wrong, but ISTM that ``make -j2`` doesn't always 
work right away, and sometimes I get different results if I do it again without 
touching the code.

--
stage: committed/rejected -> needs patch
status: closed -> open

___
Python tracker 

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



[issue16914] timestamping in smtplib.py to help troubleshoot server timeouts/delays

2013-01-11 Thread gac

gac added the comment:

Patch to add the same functionality to Python 2.7, if anyone's interested in 
that also.

--
versions: +Python 2.7
Added file: http://bugs.python.org/file28686/smtplib.py.27.patch

___
Python tracker 

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



[issue16929] poll()/epoll() are not thread-safe

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For poll() see issue8865.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16929] poll()/epoll() are not thread-safe

2013-01-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +select.poll is not thread safe

___
Python tracker 

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



[issue16930] mention limitations and/or alternatives to hg graft

2013-01-11 Thread Ezio Melotti

Changes by Ezio Melotti :


--
dependencies: +Update cloning guidelines in devguide
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue16931] mention work-around to create diffs in default/non-git mode

2013-01-11 Thread Chris Jerdonek

New submission from Chris Jerdonek:

This issue is to mention in the devguide how to create diffs with the changeset 
number when --git is configured on.  Perhaps this can be done via a FAQ like: 
"How can I get Rietveld to work with a 2.7 patch?"

Background: Currently, the devguide recommends configuring Mercurial to use 
--git when making diffs.  However, this causes the changeset ID to be left off 
of patch files and, for example, prevents Rietveld from working with patches to 
non-default branches.  See also this thread:

http://mail.python.org/pipermail/python-dev/2011-March/108765.html

This issue describes a couple work-arounds:

http://bz.selenic.com/show_bug.cgi?id=3761

--
components: Devguide
messages: 179654
nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan
priority: normal
severity: normal
status: open
title: mention work-around to create diffs in default/non-git mode

___
Python tracker 

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



[issue16929] poll()/epoll() are not thread-safe

2013-01-11 Thread Charles-François Natali

Charles-François Natali added the comment:

OK, I'll close as duplicate.

--
dependencies:  -select.poll is not thread safe
resolution:  -> duplicate
superseder:  -> select.poll is not thread safe

___
Python tracker 

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



[issue8865] select.poll is not thread safe

2013-01-11 Thread Charles-François Natali

Charles-François Natali added the comment:

This patch should be updated to also fix epoll().

Also, is it right to raise an exception in case of concurrent invocation?

Here's a simple script that crashes systematically on my Linux box.

--
nosy: +neologix
Added file: http://bugs.python.org/file28687/test.py

___
Python tracker 

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



[issue16929] poll()/epoll() are not thread-safe

2013-01-11 Thread Charles-François Natali

Changes by Charles-François Natali :


--
status: open -> closed

___
Python tracker 

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



[issue13963] dev guide has no mention of mechanics of patch review

2013-01-11 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I created issue 16931 to document a way to use Rietveld for 2.7 patches, while 
still keeping the Mercurial configuration we advise.

--

___
Python tracker 

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



[issue8865] select.poll is not thread safe

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Also, is it right to raise an exception in case of concurrent invocation?

It is right for poll() because it was not concurrently usable in previous 
versions in any case. For epoll() it is an another issue.

--

___
Python tracker 

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



[issue16921] Docs of subprocess.CREATE_NEW_CONSOLE are wrong

2013-01-11 Thread Tim Golden

Tim Golden added the comment:

This code is no longer present in subprocess.py now that issue14470 has been 
applied.

--
nosy: +brian.curtin, tim.golden
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



[issue11159] Sax parser crashes if given unicode file name

2013-01-11 Thread Sergey Prokhorov

Changes by Sergey Prokhorov :


--
nosy: +Sergey.Prokhorov

___
Python tracker 

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



[issue16921] Docs of subprocess.CREATE_NEW_CONSOLE are wrong

2013-01-11 Thread Tim Golden

Tim Golden added the comment:

Reopening because there is in fact a doc issue reamining.

--
assignee:  -> tim.golden
resolution: out of date -> 
stage: committed/rejected -> 
status: closed -> open

___
Python tracker 

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



[issue16921] Docs of subprocess.CREATE_NEW_CONSOLE are wrong

2013-01-11 Thread Tim Golden

Tim Golden added the comment:

I can't push from work; the (trivial) doc patch is attached. If no-one gets to 
it, I'll push from home this evening.

--
Added file: http://bugs.python.org/file28688/doc.diff

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-11 Thread Chris Jerdonek

Chris Jerdonek added the comment:

As suggested in the previous comment, here is simple code to find candidates 
for test duplication (TestCase subclasses subclassing other TestCase classes):

def find_dupes(mod):
objects = [getattr(mod, name) for name in sorted(dir(mod))]
classes = [obj for obj in objects if isinstance(obj, type) and
   issubclass(obj, unittest.TestCase)]
for c in classes:
for d in classes:
if c is not d and issubclass(d, c):
print("%s: %s < %s" % (mod.__name__, c.__name__, d.__name__))

Out of curiosity, I ran a modified form of this against all test modules to 
find which ones fit this pattern and *already* rely on unittest discovery (i.e. 
don't have test_main()).  We might want to adjust these as well.  There were 
four: test_asyncore, test_configparser, test_heapq, test_ipaddress

--

___
Python tracker 

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



[issue15539] Fixing Tools/scripts/pindent.py

2013-01-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f783db4a58ba by Serhiy Storchaka in branch '2.7':
Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py.
http://hg.python.org/cpython/rev/f783db4a58ba

New changeset 9df6b707aef9 by Serhiy Storchaka in branch '3.2':
Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py.
http://hg.python.org/cpython/rev/9df6b707aef9

New changeset 01df1f7841b2 by Serhiy Storchaka in branch '3.3':
Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py.
http://hg.python.org/cpython/rev/01df1f7841b2

New changeset 8452c23139c6 by Serhiy Storchaka in branch 'default':
Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py.
http://hg.python.org/cpython/rev/8452c23139c6

--
nosy: +python-dev

___
Python tracker 

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



[issue15539] Fixing Tools/scripts/pindent.py

2013-01-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.4

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a dirty patch which hacks unittest to search possible test overriding. 
Just apply the patch and run regression tests.

--
Added file: http://bugs.python.org/file28689/checkTestOverriding.diff

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file28690/test_overriding.txt

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-01-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It could be made a bit faster, but it would complicate the code for very little 
benefit.  IMO, this isn't worth it.

--
priority: normal -> low

___
Python tracker 

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



[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2013-01-11 Thread Daniel Shahaf

Daniel Shahaf added the comment:

Ezio Melotti wrote on Fri, Jan 11, 2013 at 08:44:43 +:
> >>> ### one ref leaked for every child in __setstate__:
> >>> e2.__setstate__(p2)
> [76810 refs]
> >>> e2.__setstate__(p2)
> [76813 refs]
> >>> e2.__setstate__(p2)
> [76816 refs]
> 
> I'm not working on this anymore now, so someone more familiar with the
> code can take a look, see if my patch is correct, and fix the
> remaining leaks.
> 

Thank for narrowing it down so much.  Attached patch incorporates your
getstate fix and a fix for setstate.  It passes the -R 3:2 tests.

--
Added file: http://bugs.python.org/file28691/memleak-v1.diff

___
Python tracker 

___diff -r 6eae84170536 Modules/_elementtree.c
--- a/Modules/_elementtree.cFri Jan 11 10:49:43 2013 +0100
+++ b/Modules/_elementtree.cFri Jan 11 10:56:05 2013 +
@@ -859,8 +859,10 @@ element_getstate(ElementObject *self)
  PICKLED_ATTRIB, self->extra->attrib,
  PICKLED_TEXT, self->text,
  PICKLED_TAIL, self->tail);
-if (instancedict)
+if (instancedict) {
+Py_DECREF(children);
 return instancedict;
+}
 else {
 for (i = 0; i < PyList_GET_SIZE(children); i++)
 Py_DECREF(PyList_GET_ITEM(children, i));
@@ -884,25 +886,17 @@ element_setstate_from_attributes(Element
 PyErr_SetString(PyExc_TypeError, "tag may not be NULL");
 return NULL;
 }
-if (!text) {
-Py_INCREF(Py_None);
-text = Py_None;
-}
-if (!tail) {
-Py_INCREF(Py_None);
-tail = Py_None;
-}
 
 Py_CLEAR(self->tag);
 self->tag = tag;
 Py_INCREF(self->tag);
 
 Py_CLEAR(self->text);
-self->text = text;
+self->text = text ? text : Py_None;
 Py_INCREF(self->text);
 
 Py_CLEAR(self->tail);
-self->tail = tail;
+self->tail = tail ? tail : Py_None;
 Py_INCREF(self->tail);
 
 /* Handle ATTRIB and CHILDREN. */

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



[issue16886] Doctests in test_dictcomp depend on dict order

2013-01-11 Thread Ezio Melotti

Ezio Melotti added the comment:

I left a review on Rietveld.
Frank, once the comments have been addressed and the patch approved, do you 
want to commit it on all the 4 branches yourself?
If you prefer I can take care of it.

--
nosy: +ezio.melotti
type:  -> behavior
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue15539] Fixing Tools/scripts/pindent.py

2013-01-11 Thread Ezio Melotti

Ezio Melotti added the comment:

Some buildbots are failing: 
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/341/steps/test/logs/stdio
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1263/steps/test/logs/stdio

--

___
Python tracker 

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



[issue16932] urlparse fails at parsing "www.python.org:80/"

2013-01-11 Thread Sandro Tosi

New submission from Sandro Tosi:

Hello,
as reported at http://mail.python.org/pipermail/docs/2013-January/012375.html 
urlparse fails to parse URLs without a schema and with a url path, as opposed 
to what's documented at 
http://docs.python.org/2/library/urlparse.html?highlight=urlparse#urlparse :

./python -c "from urlparse import urlparse ; print(urlparse('python.org:80/'))"
ParseResult(scheme='python.org', netloc='', path='80/', params='', query='', 
fragment='')

(that is for 2.7, but the same happens on all the 3.x active branches).

i'm attaching a test to expose this failure.

--
components: Library (Lib)
files: urlparse.diff
keywords: patch
messages: 179670
nosy: sandro.tosi
priority: normal
severity: normal
stage: needs patch
status: open
title: urlparse fails at parsing "www.python.org:80/"
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28692/urlparse.diff

___
Python tracker 

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



[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Can you write-up a patch with tests and a doc change?

--
stage:  -> needs patch

___
Python tracker 

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



[issue16932] urlparse fails at parsing "www.python.org:80/"

2013-01-11 Thread Sandro Tosi

Sandro Tosi added the comment:

Adding Senthil as per expert list

--
nosy: +orsenthil

___
Python tracker 

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



[issue16915] mode of socket.makefile is more limited than documentation suggests

2013-01-11 Thread Federico Reghenzani

Federico Reghenzani added the comment:

I think that 't' option can be added to conform with open() built-in function. 
The other options I don't think it's possible to use with sockets.

Adding the 't' doesn't change the makefile() behavior. I added also a 
clarification in documentation.

--
keywords: +patch
nosy: +federico.reghenzani
versions: +Python 3.4 -Python 3.2
Added file: http://bugs.python.org/file28693/t.patch

___
Python tracker 

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



[issue14102] argparse: add ability to create a man page

2013-01-11 Thread Thomas Guettler

Changes by Thomas Guettler :


--
nosy: +guettli

___
Python tracker 

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



[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Vinay Sajip

Changes by Vinay Sajip :


--
hgrepos: +171

___
Python tracker 

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



[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Vinay Sajip

Changes by Vinay Sajip :


--
keywords: +patch
Added file: http://bugs.python.org/file28694/951243de359a.diff

___
Python tracker 

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



[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Vinay Sajip

Vinay Sajip added the comment:

> Can you write-up a patch with tests and a doc change?

Done.

--
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



[issue16917] Misleading missing parenthesis syntax error

2013-01-11 Thread Dražen Lučanin

Dražen Lučanin added the comment:

Yes, I see your point.

Well, for now I am voting for issue1634034 to get some sort of
resolution, as Serhiy mentioned, as it might help this scenario as
well.

Cheers!

On Thu, Jan 10, 2013 at 4:29 PM, Ezio Melotti  wrote:
>
> Ezio Melotti added the comment:
>
>> This would all be a bit simpler if an indent was obligatory after
>> inserting a newline in the middle of a command.
>
> This is not such a bad idea, but it is not backward-compatible and it would 
> be inconsistent with how parentheses works in other situations.
>
> Developers usually learn that they should look back at least till the 
> previous line while investigating syntax errors.  Even in C (and similar 
> languages) it's common that errors reported on one line are caused by e.g. a 
> missing ';' on the previous line.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue15539] Fixing Tools/scripts/pindent.py

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which should fix creating a backup on Windows. Please test it. 
If test_tools passes on Windows then I'll commit the patch, in contrary case 
I'll just skip checking of backup on Windows.

--
stage: committed/rejected -> patch review
status: closed -> open
Added file: http://bugs.python.org/file28695/pindent_backup.patch

___
Python tracker 

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



[issue1634034] Show "expected" token on syntax error

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree, the main problem is in the fact that "expected token" is not always 
singular. And even "most expected token" is a little subjective. The better 
solution will be to expect several possible tokens. This requires some parser 
modification.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue16921] Docs of subprocess.CREATE_NEW_CONSOLE are wrong

2013-01-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1aac333f320a by Tim Golden in branch 'default':
#16921 Since Win9x is no longer supported, CREATE_NEW_CONSOLE is
http://hg.python.org/cpython/rev/1aac333f320a

--
nosy: +python-dev

___
Python tracker 

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



[issue16445] SEGFAULT when deleting Exception.message

2013-01-11 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue16933] argparse: remove magic from examples

2013-01-11 Thread Thomas Guettler

New submission from Thomas Guettler:

The current argparse documentation is not easy to read people new to python.

http://docs.python.org/dev/library/argparse.html#choices

{{{
current: parser.add_argument('foo', choices='abc')
}}}

Please make this more explicit:
{{{
better: parser.add_argument('foo', choices=['one', 'two', 'three'])
}}}

{{{
current: parser.parse_args('c'.split()) # looks like perl to me
}}}

{{{
better: parser.parse_args(['c'])
}}}

Next: Please use a more common type, not "complex" in the choices example. It 
confuses a lot of people.

--
messages: 179679
nosy: guettli
priority: normal
severity: normal
status: open
title: argparse: remove magic from examples

___
Python tracker 

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



[issue16934] qsort doesn't work for double arrays

2013-01-11 Thread Stephane Poirier

New submission from Stephane Poirier:

qsort doesn't sort arrays that are defined with double elements.
You can find attached a script that shows this function working well for int 
(as described in the ctypes documentation). If int array is replaced by double 
array qsort doesn't sort any more.
Even worse, with python 2.6, the difference between a[0] and b[0] may be nan.
The script can be launch by 
python.exe testQSort33.py

--
components: ctypes
files: testQSort33.py
messages: 179680
nosy: stephane.poirier
priority: normal
severity: normal
status: open
title: qsort doesn't work for double arrays
type: behavior
versions: Python 2.6, Python 2.7, Python 3.3
Added file: http://bugs.python.org/file28696/testQSort33.py

___
Python tracker 

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



[issue16934] qsort doesn't work for double arrays

2013-01-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

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



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Brett Cannon

New submission from Brett Cannon:

For test discovery to work where a dependent module is optional, you end up 
needing to do something like what is done in 
http://hg.python.org/cpython/rev/15ddd683c321:

-crypt = support.import_module('crypt')
+def setUpModule():
+# this import will raise unittest.SkipTest if _crypt doesn't exist,
+# so it has to be done in setUpModule for test discovery to work
+global crypt
+crypt = support.import_module('crypt')

That's kind of ugly. It would be better if unittest recognized SkipTest at 
import time during test discovery

--
assignee: michael.foord
components: Library (Lib)
messages: 179681
nosy: brett.cannon, michael.foord
priority: normal
severity: normal
stage: test needed
status: open
title: unittest should understand SkipTest at import time during test discovery
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Michael Foord

Michael Foord added the comment:

Agreed and it should be easy to implement.

--
keywords: +gsoc

___
Python tracker 

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



[issue16934] qsort doesn't work for double arrays

2013-01-11 Thread Mark Dickinson

Mark Dickinson added the comment:

What happens if you replace the line:

CMPFUNC = CFUNCTYPE(c_double, POINTER(c_double), POINTER(c_double))

in your example code with

CMPFUNC = CFUNCTYPE(c_int, POINTER(c_double), POINTER(c_double))

?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue16829] IDLE on POSIX can't print filenames with spaces

2013-01-11 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Going to attach a patch using subprocess in a few minutes...

--

___
Python tracker 

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



[issue16934] qsort doesn't work for double arrays

2013-01-11 Thread Mark Dickinson

Mark Dickinson added the comment:

Closing as invalid:  the issue is not in Python but with the CMPFUNC line.  
Your py_cmp_func should return an integer rather than a float to be compatible 
with libc.qsort.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue8145] Documentation about sqlite3 isolation_level

2013-01-11 Thread R. David Murray

R. David Murray added the comment:

I believe this patch is correct in essence, but I think it would be helpful to 
clarify the explanation of what autocommit mode is.  I'll work on an updated 
patch.

It could also be considered a bug that the standard context manager does not 
support autocommit mode, but I'm going to treat that as a separate bug.  
Perhaps a fix will come out of fixing issue 10740.

--

___
Python tracker 

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



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue16936] Documentation for stat.S_IFMT inconsistent

2013-01-11 Thread Jens Lechtenboerger

New submission from Jens Lechtenboerger:

The documentation for the stat module is inconsistent
(Doc/library/stat.rst, at least for Python 2.7.2 and 3.3.0):
It talks about a function stat.S_IFMT() and a bit mask stat.S_IFMT.
Only the former does exist.

Besides, it states: "For complete details about the stat(), fstat()
and lstat() calls, consult the documentation for your system."
I suggest to add some pointers on what systems one might consult
what documentation: "(e.g., on GNU/Linux invoke 'man 2 stat')"
I don't know about other systems, though.

So, doing "man 2 stat", which refers to the POSIX standard and which
seems to have served as blueprint for stat's interface, I expected
to find the bit mask S_IFMT.
However, that does not exist.  In contrast, in stat.py that bit mask
is hard-coded as 0o17 in the definition of S_IFMT().

As long-term, backwards-incompatible fix, I suggest to export
S_IFMT = 0o17
and to rename the function S_IFMT().  That way, stat would in fact
be aligned with the documentation for my system.

As short-term fix, I suggest to correct stat.rst.

Replace
> Use of the functions above is more portable than use of the first
> set of flags:
>
> stat.S_IFMT
>Bit mask for the file type bit fields.

with
> Use of the functions above may be more portable than use of the
> first set of flags.
>
> Warning: Note that the stat module does not export a bit mask
> S_IFMT. (As stated incorrectly in previous versions of the
> documentation.)

Here, I replaced "is more portable" with "may be more portable" as
the constant 0o17 is hard-coded into S_IFMT() in stat.py.  Maybe
somebody could add a hint in what sense portability is improved?
Alternatively that sentence could be deleted.

A diff for stat.rst (Python 3.3.0) is attached.

--
assignee: docs@python
components: Documentation
files: stat.rst.diff
keywords: patch
messages: 179687
nosy: docs@python, lechten
priority: normal
severity: normal
status: open
title: Documentation for stat.S_IFMT inconsistent
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file28697/stat.rst.diff

___
Python tracker 

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



[issue16829] IDLE on POSIX can't print filenames with spaces

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is not so easy. The problem is that we have to determine the print command 
by configuration line. A user may wish to change these settings, and some users 
already changed them. The patch should not break them. For backward 
compatibility we also have to run a command with a shell, not directly. A 
method of quoting of command arguments varies in the different systems and it 
differs from Python's repr. The new code should work in case if the user has 
not changed the default settings, and in case he changed them (for example when 
he replaced %%s to "%%s"). Definitely, this is not an easy issue.

--
keywords:  -easy

___
Python tracker 

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



[issue1634034] Show "expected" token on syntax error

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Hmm, "expected" attribute is set when there is only one possible expected token 
in PyParser_AddToken(). I don't understand why error messages are so misleading 
for "def f(*23):" (here not only ')', but a name possible).

--

___
Python tracker 

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



[issue16829] IDLE on POSIX can't print filenames with spaces

2013-01-11 Thread Ramchandra Apte

Ramchandra Apte added the comment:

@Serhiy Storchaka
I don't think anybody edits that line anyway.
IMHO, a warning about this change should be enough.

--

___
Python tracker 

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



[issue3170] test_pydoc has no way to regenerate pristine data

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
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



[issue9716] The inittab modules cannot be packages

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
versions: +Python 3.4 -Python 3.1

___
Python tracker 

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



[issue16829] IDLE on POSIX can't print filenames with spaces

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

At least one who want print filenames on non-default printer must edit that 
line. In any case we can't break this in a bugfix release.

--

___
Python tracker 

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



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Zack, can you please resend your agreement by email?

--

___
Python tracker 

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



[issue3583] test_urllibnet.test_bad_address() fails when using OpenDNS

2013-01-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset acce13a6e728 by Brett Cannon in branch 'default':
Issue #3583: mention that testing whether a bad address not triggering
http://hg.python.org/cpython/rev/acce13a6e728

--
nosy: +python-dev

___
Python tracker 

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



[issue3583] test_urllibnet.test_bad_address() fails when using OpenDNS

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
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



[issue12004] PyZipFile.writepy gives internal error on syntax errors

2013-01-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ben, can you please resend your agreement?

--

___
Python tracker 

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



[issue8915] Use locale.nl_langinfo in _strptime

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue2267] datetime.datetime operator methods are not subclass-friendly

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue16814] use --directory option of make in describing how to build the docs

2013-01-11 Thread Éric Araujo

Éric Araujo added the comment:

LGTM.

--

___
Python tracker 

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



[issue16874] setup.py upload option repeated in docs

2013-01-11 Thread Éric Araujo

Éric Araujo added the comment:

Thanks.

--

___
Python tracker 

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



[issue16893] Create IDLE help.txt from Doc/library/idle.rst

2013-01-11 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue13934] sqlite3 test typo

2013-01-11 Thread Éric Araujo

Éric Araujo added the comment:

Thanks for the report and patches!

--
resolution:  -> fixed

___
Python tracker 

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



[issue10895] Private stdlib API: getopt, getpass, glob, gzip, genericpath, gettext

2013-01-11 Thread Brett Cannon

Brett Cannon added the comment:

While I appreciate the effort, SilentGhost, I'm going to make a call and say 
Raymond is right; this isn't worth the code breakage. While all new code should 
make sure to use the underscore prefix, proactively adding it to pre-existing 
code just isn't worth the risk.

--
resolution:  -> wont fix
status: open -> closed
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue10894] Making stdlib APIs private

2013-01-11 Thread Brett Cannon

Brett Cannon added the comment:

So I just closed the dependency on this issue as I figured the potential code 
breakage wasn't worth this (plus the referenced TODO item from the devguide is 
gone and was never turned into a proper task).

Now the question becomes do the guidelines SilentGhost wrote out belong 
somewhere in the docs?

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
stage:  -> needs patch
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Éric Araujo

Éric Araujo added the comment:

FTR there is already an alternative to setupmodule:

try:
import module
except ImportError:
module = None

@unittest.skipUnless(module, 'requires module')
class ModuleTests(unittest.TestCase):
pass


This idiom is more lines than support.import_module, but works for non-stdlib 
tests too, and is useful when you don’t want the whole file to be skipped if 
the module is missing (like in distutils’ test_sdist where zlib can be missing).

--
nosy: +eric.araujo

___
Python tracker 

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



[issue969718] BASECFLAGS are not passed to module build line

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue10541] regrtest.py -T broken

2013-01-11 Thread Brett Cannon

Brett Cannon added the comment:

Alexander's patch LGTM

--
assignee:  -> belopolsky

___
Python tracker 

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



[issue10991] trace fails when test imported a temporary file

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue10708] Misc/porting should be folded into the development FAQ or the devguide

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue16932] urlparse fails at parsing "www.python.org:80/"

2013-01-11 Thread Georg Brandl

Georg Brandl added the comment:

This is not a bug: urlparse is there to parse URLs, and URLs start with an URL 
scheme such as "http:".

There is no way for a generic URL parser to know that "python.org:80/" is 
supposed to be "http://python.org:80/";.

--
nosy: +georg.brandl
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue16933] argparse: remove magic from examples

2013-01-11 Thread Ramchandra Apte

Ramchandra Apte added the comment:

+1

--
nosy: +ramchandra.apte

___
Python tracker 

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



[issue11441] compile() raises SystemError if called from except clause

2013-01-11 Thread Brett Cannon

Brett Cannon added the comment:

This no longer seems to be a problem in Python 3.2, 3.3, or 3.4.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue10401] Globals / builtins cache

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue10399] AST Optimization: inlining of function calls

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue11276] 2to3: imports fixer doesn't update references to modules specified without attributes

2013-01-11 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue16879] distutils.command.config uses fragile constant temporary file name

2013-01-11 Thread Éric Araujo

Éric Araujo added the comment:

Thanks for the report.  Did you find this by looking at the code or while using 
distutils?  In other words, if this is just a theoretical issue / code quality 
problem, it won’t be changed.  (distutils is not improved anymore.)

--
versions: +Python 3.4 -Python 3.1

___
Python tracker 

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



[issue11844] Update json to upstream simplejson latest release

2013-01-11 Thread Brett Cannon

Brett Cannon added the comment:

What is the status of this, Sandro? Are we still out of sync? If so and it's a 
licensing issue I can get legal clarification for whatever we need.

--
status: open -> pending

___
Python tracker 

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



[issue16916] The Extended Iterable Unpacking (PEP-3132) for byte strings doesn't match the specification

2013-01-11 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue16829] IDLE on POSIX can't print filenames with spaces

2013-01-11 Thread Roger Serwy

Roger Serwy added the comment:

@Serhiy

IDLE places its default configuration files within the standard library. Any 
upgrade of Python can modify the contents of the standard library. Even if we 
do *nothing* to change Lib/idlelib/config-main.def, the next upgrade would 
overwrite an end users custom print command anyway.

Now, if the end-user changed ~/.idlerc/config-main.cfg instead to include the 
new "print-command-posix" entry then this patch will not change their custom 
setting.

--

___
Python tracker 

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



[issue16893] Create IDLE help.txt from Doc/library/idle.rst

2013-01-11 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I like the proposition in general, but files should be synchronized first.

--
nosy: +asvetlov

___
Python tracker 

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



[issue16932] urlparse fails at parsing "www.python.org:80/"

2013-01-11 Thread Sandro Tosi

Sandro Tosi added the comment:

The documentation reports this example:

>>> urlparse('www.cwi.nl:80/%7Eguido/Python.html')
ParseResult(scheme='', netloc='', path='www.cwi.nl:80/%7Eguido/Python.html',
   params='', query='', fragment='')

but when executing it returns:

$ ./python -V
Python 2.7.3+
$ ./python -c "from urlparse import urlparse ; print 
urlparse('www.cwi.nl:80/%7Eguido/Python.html')"
ParseResult(scheme='www.cwi.nl', netloc='', path='80/%7Eguido/Python.html', 
params='', query='', fragment='')

which doesn't match.

--

___
Python tracker 

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



[issue16893] Create IDLE help.txt from Doc/library/idle.rst

2013-01-11 Thread Georg Brandl

Georg Brandl added the comment:

Note that Sphinx' "make text" output already should be suitable. We already 
update the pydoc topics with that on every release, so we could just as well do 
the same for the IDLE doc.  No need for another separate script.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue16715] Get rid of IOError. Use OSError instead

2013-01-11 Thread Andrew Svetlov

Andrew Svetlov added the comment:

LoadError was IOError descendant, now OSError is directly specified.
If somebody want to change base class for LoadError he should to update the 
code in several places in http/cookiejar.py.
The docstring for FileCookieJar.revert directly specifies possible exceptions 
btw.

--

___
Python tracker 

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



[issue16932] urlparse fails at parsing "www.python.org:80/"

2013-01-11 Thread Georg Brandl

Georg Brandl added the comment:

Hmm, you're right.  The behavior has been like this at least since Python 2.5:

Python 2.5.4 (r254:67916, Dec 16 2012, 20:33:12) 
[GCC 4.6.3] on linux3
Type "help", "copyright", "credits" or "license" for more information.
>>> from urlparse import urlparse
>>> urlparse('www.cwi.nl:80/%7Eguido/Python.html')
('www.cwi.nl', '', '80/%7Eguido/Python.html', '', '', '')

The docs refer to RFC 1808.  From a quick glance at the BNF in section 2.2, RFC 
1808 allows dots in the scheme, but also allows ":" in the path.  So there 
seems to be a parsing ambiguity, but see section 2.4.2:

   If the parse string contains a colon ":" after the first character
   and before any characters not allowed as part of a scheme name (i.e.,
   any not an alphanumeric, plus "+", period ".", or hyphen "-"), the
of the URL is the substring of characters up to but not
   including the first colon.  These characters and the colon are then
   removed from the parse string before continuing.

That would indicate that the implementation is correct and the documentation 
should be fixed. Senthil?

--
keywords: +buildbot -patch
status: closed -> open

___
Python tracker 

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



[issue16916] The Extended Iterable Unpacking (PEP-3132) for byte strings doesn't match the specification

2013-01-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0077c1d201d by Georg Brandl in branch 'default':
Closes #16916: clarify "slicing equivalent to extended unpacking" example: the 
latter always creates a list.
http://hg.python.org/peps/rev/a0077c1d201d

--
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



[issue16916] The Extended Iterable Unpacking (PEP-3132) for byte strings doesn't match the specification

2013-01-11 Thread Georg Brandl

Georg Brandl added the comment:

Thanks for the report. This statement was actually false for almost all 
sequence types, except for those whose slicing returns a list.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue16924] try: except: ordering error

2013-01-11 Thread Georg Brandl

Georg Brandl added the comment:

If I understand your issue correctly, you are expecting all three exception 
handlers to be called in innermost-to-outermost order. However, exceptions are 
not reraised automatically after "except" blocks; you can insert a bare "raise" 
statement in the handler to get that effect.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue16933] argparse: remove magic from examples

2013-01-11 Thread Chris Jerdonek

Chris Jerdonek added the comment:

+1.  By the way, I included a couple fixes similar to these in a patch posted 
to issue 16878.

--
nosy: +bethard, chris.jerdonek

___
Python tracker 

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



  1   2   >