[issue16862] FAQ has outdated information about Stackless

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

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

___
Python tracker 

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



[issue16862] FAQ has outdated information about Stackless

2013-01-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d2867c430333 by Ezio Melotti in branch '3.2':
#16862: remove outdated statements about Stackless.
http://hg.python.org/cpython/rev/d2867c430333

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

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

New changeset 0f24c65fb7e5 by Ezio Melotti in branch '2.7':
#16862: remove outdated statements about Stackless.
http://hg.python.org/cpython/rev/0f24c65fb7e5

--
nosy: +python-dev

___
Python tracker 

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



[issue16867] setup.py fails if there are no extensions

2013-01-04 Thread Ned Deily

Ned Deily added the comment:

This has already been reported in Issue16537.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Python’s setup.py raises a ValueError when self.extensions is 
empty

___
Python tracker 

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



[issue16869] makesetup should support .S source files

2013-01-04 Thread Benno Leslie

New submission from Benno Leslie:

It is useful to be able to build .S files as built-in modules (in particular if 
you want ctypes as a built-in you need .S files)

The patch enables .S files to be specified in Setup.dist files.

--
components: Build
files: makesetup-asm.diff
keywords: patch
messages: 179111
nosy: bennoleslie
priority: normal
severity: normal
status: open
title: makesetup should support .S source files
versions: Python 3.4
Added file: http://bugs.python.org/file28574/makesetup-asm.diff

___
Python tracker 

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



[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-04 Thread Todd Rovito

Todd Rovito added the comment:

Here is a suggested patch with help from R. David Murray:
"To begin with, please be patient! There are many more people submitting 
patches than there are people capable of reviewing your patch. Getting your 
patch reviewed requires a reviewer to have the spare time and motivation to 
look at your patch (we cannot force anyone to review patches). If your patch 
has not received any notice from reviewers (i.e., no comment made) after a 
substantial amount of time first “ping” the issue on the issue tracker to 
remind the nosy list that the patch needs a review. It is possible that the 
nosy committers have just forgotten about the issue. After the issue has been 
“pinged” and if you don’t get a response after a few days then you may email 
python-...@python.org asking for someone to review your patch."

--
keywords: +patch
Added file: 
http://bugs.python.org/file28573/16868PythonDeveloperGuidePingIssueBeforeEmailingPython-dev.patch

___
Python tracker 

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



[issue16823] Python crashes on running tkinter code with threads

2013-01-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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

___
Python tracker 

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



[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-04 Thread Todd Rovito

Changes by Todd Rovito :


--
components: +Devguide -Documentation
nosy: +ezio.melotti

___
Python tracker 

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



[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-04 Thread Todd Rovito

New submission from Todd Rovito:

The Python Developer Guide in section 3.3 about the life cycle of a 
patch/review process makes no mention that a bug should be "pinged" first 
before posting to the python-...@python.org email list requesting a review.  

For more information see this thread on the Python-Dev email list: 
http://mail.python.org/pipermail/python-dev/2013-January/123453.html

--
assignee: docs@python
components: Documentation
messages: 179109
nosy: Todd.Rovito, docs@python
priority: normal
severity: normal
status: open
title: Python Developer Guide: Include a reminder to "ping" bug report if not 
reviewed in timely manner
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



[issue16863] Python 2 error in Argparse tutorial

2013-01-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A quick patch would be 'This tutorial was written for argparse in Python 3. A 
few details are different in 2.x.' But feel free to do better.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue16862] FAQ has outdated information about Stackless

2013-01-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think answer 2 should just say "An alternative is Stackless Python." and let 
interested people click the link. The entire second sentence should go, and I 
am not sure how much of the rest of the first is still correct, as Stackless 
has changed from when it was written.

--
keywords: +patch
nosy: +terry.reedy
stage:  -> needs patch
versions: +Python 2.7, Python 3.2, 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



[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Daniel Shahaf

Changes by Daniel Shahaf :


Added file: http://bugs.python.org/file28572/inspect-v5.diff

___
Python tracker 

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



[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Daniel Shahaf

Changes by Daniel Shahaf :


Removed file: http://bugs.python.org/file28571/inspect-v4.diff

___
Python tracker 

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



[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Daniel Shahaf

Daniel Shahaf added the comment:

Terry J. Reedy wrote on Sat, Jan 05, 2013 at 01:33:50 +:
> Should a test be added to or changed in test_inspect? Line 163 has
> a test_stack method that calls inspect.stack.

Makes sense; added a test that tests named attribute access.  Thanks for
the pointer.

--
Added file: http://bugs.python.org/file28571/inspect-v4.diff

___
Python tracker 

___diff -r 4b42d7f288c5 Doc/library/inspect.rst
--- a/Doc/library/inspect.rst   Thu Jan 03 09:22:41 2013 +0100
+++ b/Doc/library/inspect.rst   Sat Jan 05 04:06:25 2013 +
@@ -800,11 +800,17 @@ Classes and functions
 The interpreter stack
 -
 
-When the following functions return "frame records," each record is a tuple of
-six items: the frame object, the filename, the line number of the current line,
+When the following functions return "frame records," each record is a
+:term:`named tuple`
+``FrameInfo(frame, filename, lineno, function, code_context, index)``.
+The tuple contains the frame object, the filename, the line number of the
+current line,
 the function name, a list of lines of context from the source code, and the
 index of the current line within that list.
 
+.. versionchanged:: 3.3
+   Return a named tuple instead of a tuple.
+
 .. note::
 
Keeping references to frame objects, as found in the first element of the 
frame
diff -r 4b42d7f288c5 Lib/inspect.py
--- a/Lib/inspect.pyThu Jan 03 09:22:41 2013 +0100
+++ b/Lib/inspect.pySat Jan 05 04:06:25 2013 +
@@ -1139,6 +1139,8 @@ def getlineno(frame):
 # FrameType.f_lineno is now a descriptor that grovels co_lnotab
 return frame.f_lineno
 
+FrameInfo = namedtuple('FrameInfo', ('frame',) + Traceback._fields)
+
 def getouterframes(frame, context=1):
 """Get a list of records for a frame and all higher (calling) frames.
 
@@ -1146,7 +1148,8 @@ def getouterframes(frame, context=1):
 name, a list of lines of context, and index within the context."""
 framelist = []
 while frame:
-framelist.append((frame,) + getframeinfo(frame, context))
+frameinfo = (frame,) + getframeinfo(frame, context)
+framelist.append(FrameInfo(*frameinfo))
 frame = frame.f_back
 return framelist
 
@@ -1157,7 +1160,8 @@ def getinnerframes(tb, context=1):
 name, a list of lines of context, and index within the context."""
 framelist = []
 while tb:
-framelist.append((tb.tb_frame,) + getframeinfo(tb, context))
+frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
+framelist.append(FrameInfo(*frameinfo))
 tb = tb.tb_next
 return framelist
 
diff -r 4b42d7f288c5 Lib/test/test_inspect.py
--- a/Lib/test/test_inspect.py  Thu Jan 03 09:22:41 2013 +0100
+++ b/Lib/test/test_inspect.py  Sat Jan 05 04:06:25 2013 +
@@ -170,6 +170,8 @@ class TestInterpreterStack(IsTestBase):
  (modfile, 43, 'argue', ['spam(a, b, c)\n'], 0))
 self.assertEqual(revise(*mod.st[3][1:]),
  (modfile, 39, 'abuse', ['self.argue(a, b, c)\n'], 0))
+self.assertEqual(mod.st[0].frame, mod.fr)
+self.assertEqual(mod.st[0].lineno, 16)
 
 def test_trace(self):
 self.assertEqual(len(git.tr), 3)
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16855] traceback module leaves off module name in last line of formatted tracebacks

2013-01-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On Win7, 2.7.3 gives me the same output. (Running in IDLE, I don't get the 
'socket.' prefix even on the second traceback.) With 3.3, I get socket.timeout 
both times (console or IDLE). So the problem seems to be 2.x only.

print_exc calls print_exception, which calls print_tb and 
format_exception_only, which is responsible for the last line.

The 2.7 code
if (isinstance(etype, BaseException) or
isinstance(etype, types.InstanceType) or
etype is None or type(etype) is str):
return [_format_final_exc_line(etype, value)]

is simplified in 3.x to
if etype is None:
return [_format_final_exc_line(etype, value)]

After
stype = etype.__name__

3.3 (and 3.x, I presume) adds

smod = etype.__module__
if smod not in ("__main__", "builtins"):
stype = smod + '.' + stype

That is where the 'socket' prefix is added in 3.3, so perhaps that should be 
added to 2.7.

Note: indenting code makes it harder to cut, paste, and run ;-(
Using 'print (x)', which works fine in 2.7, instead of 'print x' would also 
greatly help testing in 3.x, which is needed for any bug report.)

--
nosy: +georg.brandl, terry.reedy

___
Python tracker 

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



[issue16867] setup.py fails if there are no extensions

2013-01-04 Thread Benno Leslie

New submission from Benno Leslie:

When building if there are zero extensions setup.py fails (max of a zero length 
list is undefined.)

Although not a very common case, there are potential speciality cases where 
there will be zero extensions.

--
components: Build
files: zero_length_extensions.diff
keywords: patch
messages: 179104
nosy: bennoleslie
priority: normal
severity: normal
status: open
title: setup.py fails if there are no extensions
versions: Python 3.4
Added file: http://bugs.python.org/file28570/zero_length_extensions.diff

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2013-01-04 Thread Benno Leslie

Changes by Benno Leslie :


--
title: libainstall doesn't create all directories -> libainstall doesn't create 
$(BINDIR) directory

___
Python tracker 

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



[issue16866] libainstall doesn't create all directories

2013-01-04 Thread Benno Leslie

New submission from Benno Leslie:

make libainstall fails when $(BINDIR) does not exist.

--
components: Build
files: ainstall.diff
keywords: patch
messages: 179103
nosy: bennoleslie
priority: normal
severity: normal
status: open
title: libainstall doesn't create all directories
type: compile error
versions: Python 3.4
Added file: http://bugs.python.org/file28569/ainstall.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-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since there is no 'print filename' command on the menu, I am guessing that this 
is about 'File/Print Window' where the window is an edit window for a file with 
spaces in the name. In any case, on Win7 3.3 this worked fine for 'tem with 
space.py' except that .py is left off. However, the latter has nothing to do 
with spaces as 'tem.py' also appears as just 'tem' (centered at top of page). 
Is stripping the extension intended and done by idle or something Windows does?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue16823] Python crashes on running tkinter code with threads

2013-01-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

What you are doing appears to be unsupported (invalid). From
http://www.astro.washington.edu/users/rowen/TkinterSummary.html
"all Tkinter access must be from the main thread (or more precisely,
from the thread that calls the mainloop). Violating this is likely to
cause nasty and mysterious symptoms such as freezes and core dumps."

There have been at multiple posts on python-list and stack overflow from other 
users that have run into this limitation. I cannot find it in our tkinter docs, 
but I think perhaps it should be (even though not-thread-safe is the default 
for any python structure).

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, gpolo, serwy, terry.reedy
resolution:  -> invalid
status: open -> closed
type: crash -> behavior
versions: +Python 3.2, 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



[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Meador Inge

Meador Inge added the comment:

I suppose asserting the type wouldn't hurt, but I don't consider it that 
important:

--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -164,12 +164,16 @@ class TestInterpreterStack(IsTestBase):
 self.assertTrue(len(mod.st) >= 5)
 self.assertEqual(revise(*mod.st[0][1:]),
  (modfile, 16, 'eggs', ['st = inspect.stack()\n'], 0))
+self.assertIsInstance(mod.st[0], inspect.FrameInfo)
 self.assertEqual(revise(*mod.st[1][1:]),
  (modfile, 9, 'spam', ['eggs(b + d, c + f)\n'], 0))
+self.assertIsInstance(mod.st[1], inspect.FrameInfo)
 self.assertEqual(revise(*mod.st[2][1:]),
  (modfile, 43, 'argue', ['spam(a, b, c)\n'], 0))
+self.assertIsInstance(mod.st[2], inspect.FrameInfo)
 self.assertEqual(revise(*mod.st[3][1:]),
  (modfile, 39, 'abuse', ['self.argue(a, b, c)\n'], 0))
+self.assertIsInstance(mod.st[3], inspect.FrameInfo)


TestGetClosureVars builds the named tuples directly and compares them.  For 
example:

expected = inspect.ClosureVars(nonlocal_vars, global_vars,
   builtin_vars, unbound_names)
self.assertEqual(inspect.getclosurevars(f(_arg)), expected)

Doing this for FrameInfo is awkward because we don't have a frame object to 
construct
the named tuple with.

--

___
Python tracker 

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



[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Should a test be added to or changed in test_inspect? Line 163 has a test_stack 
method that calls inspect.stack.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue812369] module shutdown procedure based on GC

2013-01-04 Thread Nick Coghlan

Nick Coghlan added the comment:

In addition to the problem Neil noted with references in extension modules 
keeping module objects themselves alive, Antoine recently noted that the other 
major challenge is the reference cycles between module global dictionaries and 
their contents. As soon as a module global has both a __del__ method and a 
reference back to the module globals, the entire cycle becomes uncollectable. I 
suspect one of the reasons PyPy can cope without the explicit reference 
breaking step is that their GC is better able to cope with __del__ methods than 
ours.

I wonder if a useful interim step might be to make the current explicit 
reference breaking hack a bit smarter by looking at the reference counts. 
(Note: some aspects of this idea could be made simpler if modules supported 
weak references)

1. Call importlib.invalidate_caches()
2. Delete the first module from sys.modules that has a reference count of 
exactly one
3. Repeat 2 until sys.modules is empty or every remaining module has a 
reference count greater than 1 (meaning another module has a reference to it 
one way or another)
4. Pick the module in sys.modules with the lowest number of references to it, 
delete it from sys.modules and delete the reference from the module object to 
its dictionary
5. Repeat 4 until sys.modules is empty

Throughout the process, keep an eye on gc.garbage - if we see a module dict 
show up there, hit it with the "set all globals to None" hammer. (The new 
callback functionality in 3.3 makes that easier - for example, you could put a 
sentinel object in the globals of the module being cleared and watching for a 
dict containing that sentinel object showing up in 'uncollectable' during the 
stop phase)

--

___
Python tracker 

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



[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2013-01-04 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I left comments on Rietveld a few days ago.

--

___
Python tracker 

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



[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2013-01-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

If this is really an 'enhancement', it will only go in 3.4. If it is a 
bug/behavior issue, then it should be marked as such and 2.7,3.2,3.3 selected. 
I have not read the doc and messages well enough to know, so I leave that to 
you and Benjamin.

The patch includes a test. It needs a patch to Misc/ACKS to add Carsten Klein 
between Reid Kleckner and Bastian Kleineidam

--
nosy: +terry.reedy
stage:  -> patch review

___
Python tracker 

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



[issue6715] xz compressor support

2013-01-04 Thread Peter

Peter added the comment:

Apologies again for the noise, but I've just made the first public release of 
the lzma backport at http://pypi.python.org/pypi/backports.lzma/ with the 
repository as mentioned before at https://github.com/peterjc/backports.lzma

I have tested this on Python 2.6, 2.7 and 3.0 through 3.3 under Linux and Mac 
OS. I've not tried building this on Windows yet, but it should be possible and 
I will be reviewing Amaury's notes on this thread.

My thanks to Nadeem and Per for looking over this with helpful feedback, and 
agreeing to the use of the 3-clause BSD license for the backport.

If anyone has any further questions about the backport, please get in touch via 
GitHub or email me.

--

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-04 Thread Benjamin Peterson

Benjamin Peterson added the comment:

It would be good if
a) the patch was against hg default
b) it had tests

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue16143] Building with configure option "--without-doc-strings" crashes first time through PyUnicode_DecodeUTF8Stateful

2013-01-04 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue10156] Initialization of globals in unicodeobject.c

2013-01-04 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue9242] unicodeobject.c: use of uninitialized values

2013-01-04 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue8109] Server-side support for TLS Server Name Indication extension

2013-01-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Updated patch after Daniel's comments.

--
Added file: http://bugs.python.org/file28568/sni2.patch

___
Python tracker 

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



[issue16283] ctypes.util.find_library does not find all DLLs anymore

2013-01-04 Thread vyrus

Changes by vyrus :


--
nosy: +loewis, vyrus

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the review!

--
resolution:  -> fixed
stage: patch review -> 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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fdc894d44d82 by Ezio Melotti in branch '2.7':
#13094: add Programming FAQ entry about the behavior of closures.
http://hg.python.org/cpython/rev/fdc894d44d82

New changeset 02933454b7ce by Ezio Melotti in branch '3.2':
#13094: add Programming FAQ entry about the behavior of closures.
http://hg.python.org/cpython/rev/02933454b7ce

New changeset 827ddaaa45e4 by Ezio Melotti in branch '3.3':
#13094: merge with 3.2.
http://hg.python.org/cpython/rev/827ddaaa45e4

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

--
nosy: +python-dev

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Meador Inge

Meador Inge added the comment:

This case works fine on 64-bit Linux (Ubuntu) and OS X 10.7.5.  I suspect this 
is due to the fact that 64-bit Windows uses the LLP64 data model and we are 
using longs somewhere.  I am investigating further now.

--
stage:  -> needs patch
versions: +Python 3.2, 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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Jeffrey Bush

Jeffrey Bush added the comment:

Okay, so I tested in Linux (CentOS 6.3) which has Python 2.6.6 64-bit. It 
works. So the Windows 2.7.3 64-bit version is bugged. I was able to perform the 
c_char * long(32*1024*1024*1024) [the highest value I tried] and it worked 
fine. The Linux machine I tested this on was limited in RAM so ran into memory 
issues, but I was able to allocate a 2GB buffer with create_string_buffer().

So all in all, it is a bug. Works with Linux Python v2.6.6 64-bit but not 
Windows Python v2.7.3.

The ctypes documentation does not mention an upper limit so I would assume that 
it should be based on the maximum memory allocation of the underlying system 
(e.g. Windows 32-bit can't allocate more than 2GB, but Windows 64-bit should be 
very very large).

--

___
Python tracker 

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



[issue16843] sporadic test_sched failure

2013-01-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+1 for the deterministic version.

--

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

If it works elsewhere and/or it's documented to work, then it might indeed 
considered a bug.  Maybe someone more familiar with ctype can comment.

--

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Jeffrey Bush

Jeffrey Bush added the comment:

I mean using signed integers currently.

--

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Jeffrey Bush

Jeffrey Bush added the comment:

I have no idea where I would start and don't have much time...

I am not so sure it is a new features. It seems that the ctypes system is 
internally using unsigned integers for length but should be using size_t (or at 
least ssize_t). Seems like a bug.

--

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Note that adding support for >2GB arrays is a new feature and therefore can't 
go in 2.7 (but it would be OK for 3.4+).  The error message could be improved 
though.

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

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Would you like to investigate a patch?

--
nosy: +loewis

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-04 Thread Ross Lagerwall

Ross Lagerwall added the comment:

> Ross, the select() result for a large number of ready FDs was
> completely skewed because of a bug spotted by Antoine (complexity
> was much worse than it ought to be).

Ah, that makes a little more sense now.

--

___
Python tracker 

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



[issue14187] add "function annotation" entry to Glossary

2013-01-04 Thread Zachary Ware

Changes by Zachary Ware :


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



[issue16852] Fix test discovery for test_genericpath.py

2013-01-04 Thread Zachary Ware

Zachary Ware added the comment:

My apologies, I seem to have managed to rename the wrong file...

Here's the real v2 as v3, with the TestGenericTest comment pointing to this 
issue instead of 16748.

--
Added file: http://bugs.python.org/file28567/issue16852.v3.diff

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2013-01-04 Thread Jeffrey Bush

New submission from Jeffrey Bush:

The environment is Windows 8 Pro 64-bit running Python 64-bit in the WinPython 
distribution. Python is v2.7.3 built on Apr 10 2012. I first found this with 
create_string_buffer however I found out that it happens with an even simpler 
example.

The following code throws an AttributeException: class must define a _length_ 
attribute, which must be a positive integer.

import ctypes
c_char * int(2*1024*1024*1024) # 2GB, also fails with long() instead of int()

However the following works

import ctypes
c_char * int(2*1024*1024*1024-1) # 1 byte less than 2GB


This is the same with the other c_ types (not limited to size of memory since 
c_int * int(2*1024*1024*1024-1) works and would be nearly 4 times the size of 
the failed c_char one).

--
components: ctypes
messages: 179080
nosy: coderforlife
priority: normal
severity: normal
status: open
title: ctypes arrays >=2GB in length causes exception
type: behavior
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



[issue8109] Server-side support for TLS Server Name Indication extension

2013-01-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file28566/sni.patch

___
Python tracker 

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



[issue8109] Server-side support for TLS Server Name Indication extension

2013-01-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file28565/sni.patch

___
Python tracker 

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



[issue8109] Server-side support for TLS Server Name Indication extension

2013-01-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is an updated patch with cyclic GC support, and other small things.

--
components: +Library (Lib) -Extension Modules
Added file: http://bugs.python.org/file28565/sni.patch

___
Python tracker 

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



[issue16853] add a Selector to the select module

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

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file28556/selector-2.diff

___
Python tracker 

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



[issue16853] add a Selector to the select module

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

Charles-François Natali added the comment:

Ross, the select() result for a large number of ready FDs was completely skewed 
because of a bug spotted by Antoine (complexity was much worse than it ought to 
be).
Here are the results with the fix:
"""
$ ./python ~/selector_bench.py -r 10 -m 1000 -t socket
Trying with 10 ready FDs out of 1000, type socket

0.05156186099338811

0.23772043800272513

0.5181516080047004
$ ./python ~/selector_bench.py -r 100 -m 1000 -t socket
Trying with 100 ready FDs out of 1000, type socket

0.47576940699946135

0.645877062026

0.828609222000523
$ ./python ~/selector_bench.py -r 1000 -m 1000 -t socket
Trying with 1000 ready FDs out of 1000, type socket

4.970445963997918

5.7709292660001665

4.030775418999838
"""

With a large number of FDs, many of which are ready, select can be faster.
Here's the output of "strace -c -e select,poll,epoll_wait":
"""

% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 83.860.000421   0  1024   epoll_wait
 16.140.81   0  1024   poll
  0.000.00   0  1024   select
-- --- --- - - 
100.000.000502  3072   total
"""

The systime is greater in epoll, but the systime is negligible, as show by 
'time':
"""

real0m14.856s
user0m14.289s
sys 0m0.340s
"""

The time is really spent in the interpreter.
I'll dig some more (even though I doubt having 1000/1000 ready FDs is a common 
use case).

Note that it doesn't change anything when a small number of FDs are ready:
"""

$ ./python ~/selector_bench.py -r 10 -m 1000 -t socket
Trying with 10 ready FDs out of 1000, type socket

0.05238822099636309

0.25595822899776977

0.5156362060006359
"""

--
Added file: http://bugs.python.org/file28564/selector-3.diff

___
Python tracker 

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



[issue16835] Update PEP 399 to allow for test discovery

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Done in http://hg.python.org/peps/rev/3740f42d3b94, thanks for the reviews!

--
assignee: eric.araujo -> ezio.melotti
resolution:  -> fixed
stage: commit review -> 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



[issue16835] Update PEP 399 to allow for test discovery

2013-01-04 Thread Brett Cannon

Brett Cannon added the comment:

LGTM as well. Feel free to commit it, Ezio, or assign to me and I will commit 
it later (probably this weekend).

--
assignee:  -> eric.araujo
nosy: +eric.araujo
stage: patch review -> commit review

___
Python tracker 

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



[issue16853] add a Selector to the select module

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

Charles-François Natali added the comment:

Indeed, tornado and pyftpdlib implementations are much more complex,
have somewhat different APIs (i.e. only support FDs), have special
cases for older python versions, lack some newer features (e.g.
context manager).
The current code is much close to Tulip's.

> Exploring this into Tulip would be important IMO, as it would help figuring 
> out whether the API is good enough to support what this component aims to 
> achieve: being a generic poller upon which to build async IO loops.

That's indeed a good idea, there's no need to rush this in.

--

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-04 Thread Ross Lagerwall

Ross Lagerwall added the comment:

Interesting benchmark. There is no gain for epoll with a large number of
ready fds (as expected) but at least it is no worse than poll. Poll offers
a large improvement on select, in this case.

$ ./python selector_bench.py -r 2 -m 1000 -t pipe
Trying with 2 ready FDs out of 1000, type pipe

0.004317363000154728

0.08897221900042496

0.155811747055

$ ./python selector_bench.py -r 100 -m 1000 -t pipe
Trying with 100 ready FDs out of 1000, type pipe

0.1106707402169

0.18777027299984184

0.3015780589866

$ ./python selector_bench.py -r 1000 -m 1000 -t pipe
Trying with 1000 ready FDs out of 1000, type pipe

1.08963231099915

1.69247998987

8.283167362000313

--

___
Python tracker 

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



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-04 Thread Ed Campbell

Changes by Ed Campbell :


--
nosy: +esc24

___
Python tracker 

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



[issue16852] Fix test discovery for test_genericpath.py

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks as v1.

--

___
Python tracker 

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



[issue5066] IDLE documentation for Unix obsolete/incorrect

2013-01-04 Thread Todd Rovito

Todd Rovito added the comment:

Thanks much appreciated!

Sent from my iPhone

On Jan 4, 2013, at 1:07 PM, Zachary Ware  wrote:

> 
> Zachary Ware added the comment:
> 
> Hi Todd, I can't commit, but I have a review in the works for you.
> 
> --
> nosy: +zach.ware
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-04 Thread R. David Murray

R. David Murray added the comment:

Looks good to me.

--

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-04 Thread Guido van Rossum

Guido van Rossum added the comment:

Giampaolo, there are many details in the Tornado and pyftpdlib I/O loops that 
may or may not be intentional.  I wrote the Tulip pollster from scratch but am 
looking to merge in relevant knowledge and features from Tornado, Twisted and 
pyftpdlib.  AFAIK the code here is mostly adapted from Tulip.  Please suggest 
specific features from Tornado or pyftpdlib that are currently missing.  
However I don't think we should just copy over the existing 3rd party code (if 
only because we're trying to write pure Python 3.3 code here, without 
historical baggage).

--

___
Python tracker 

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



[issue4350] Remove dead code from Tkinter.py

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. However I am not sure should this issue be classified as "behavior" or 
"enhancement". Removed code is not usable in Tk versions which supported in 
Python 2.7 and 3.2+ and can be removed safely.

--
nosy: +georg.brandl, serhiy.storchaka
versions: +Python 3.3, 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



[issue6157] Tkinter.Text: changes for bbox, debug, and edit methods.

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
nosy: +serhiy.storchaka
stage: patch review -> commit review
versions: +Python 3.3, 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



[issue16863] Python 2 error in Argparse tutorial

2013-01-04 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
title: Argparse tutorial outdated -> Python 2 error in Argparse tutorial

___
Python tracker 

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



[issue1611154] os.path.exists("file/") failure on Solaris 9

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch need be revised for 3.3+.

--
nosy: +jcea, serhiy.storchaka
versions: +Python 3.3, 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



[issue16853] add a Selector to the select module

2013-01-04 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Is this currently being written from scratch? It shouldn't be IMO.
Instead I recommend using the existent Tornado or pyftpdlib IO loop as an 
example:

https://github.com/facebook/tornado/tree/master/tornado/platform
https://github.com/facebook/tornado/blob/master/tornado/ioloop.py#L544

http://code.google.com/p/pyftpdlib/source/browse/trunk/pyftpdlib/ioloop.py?spec=svn1144&r=1135#266

...and modify the central polling method so that it returns a list of (fd, 
events) instead of calling handler methods.
Everything (except Windows support) is already in place and they have been 
tested extensively.

Exploring this into Tulip would be important IMO, as it would help figuring out 
whether the API is good enough to support what this component aims to achieve: 
being a generic poller upon which to build async IO loops.

--

___
Python tracker 

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



[issue1617161] Instance methods compare equal when their self's are equal

2013-01-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue16799] start using argparse.Namespace in regrtest

2013-01-04 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks.  Andrew, could you also take a quick look at this?

--
title: switch regrtest from getopt options to argparse Namespace -> start using 
argparse.Namespace in regrtest

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Attached a new patch.

--
Added file: http://bugs.python.org/file28563/issue13094-2.diff

___
Python tracker 

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



[issue16835] Update PEP 399 to allow for test discovery

2013-01-04 Thread Zachary Ware

Zachary Ware added the comment:

Looks good to me :)

--

___
Python tracker 

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



[issue16835] Update PEP 399 to allow for test discovery

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Attached a new patch.

--
Added file: http://bugs.python.org/file28562/issue16835-3.diff

___
Python tracker 

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



[issue1694663] Overloading int.__pow__ does not work

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This behavior doesn't reproduced more on 2.7 and 3.2+.

>>> class MyInt(int):
... __pow__ = int.__add__
... 
>>> i = MyInt(42)
>>> i**3
45

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage: patch review -> 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



[issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-01-04 Thread Brett Cannon

Brett Cannon added the comment:

With some tricky use of import_fresh_module() because importlib.__init__ does 
some masking trickery, it should ... I think. =)

--

___
Python tracker 

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



[issue5066] IDLE documentation for Unix obsolete/incorrect

2013-01-04 Thread Zachary Ware

Zachary Ware added the comment:

Hi Todd, I can't commit, but I have a review in the works for you.

--
nosy: +zach.ware

___
Python tracker 

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



[issue8136] urllib.unquote decodes percent-escapes with Latin-1

2013-01-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
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



[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

2013-01-04 Thread R. David Murray

R. David Murray added the comment:

Considering that sqlite's 'replace' is a synonym for 'insert or replace', I 
think the logic error is actually in the detect_statement_type function.  Since 
actions are conditionally taken on the REPLACE statement type in the code, 
including at least one that adjusts the lastrowid, I don't think the fix for 
lastrowid is as simple as just always setting it.  But I'm not that familiar 
with sqlite internals, so perhaps someone with more knowledge will weigh in.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue7378] unexpected truncation of traceback

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

3.1 gets only security fixes. In 2.7 and 3.2+ the bug has already fixed.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage: patch review -> 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



[issue16748] Make CPython test package discoverable

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Feel free to add me to the nosy.

--

___
Python tracker 

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



[issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Is the usual PEP 399 idiom enough, or is something more advanced required?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16836] configure script disables support for IPv6 on a system where IPv6 is disabled

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

Changes by Charles-François Natali :


--
stage: needs patch -> commit review

___
Python tracker 

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



[issue12613] itertools fixer fails

2013-01-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +needs review
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



[issue16860] Use O_CLOEXEC in the tempfile module

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

Charles-François Natali added the comment:

I've committed it only to default, since it's not really a bug, but rather an 
improvement (if we did consider this a "security" bug then it should also be 
backported to 2.7, 3.1, etc).

I'll wait a little before removing O_NOFOLLOW: I'm 99% sure it's useless, but 
just in case someone finds a really subtle reason to keep it...

--

___
Python tracker 

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



[issue16860] Use O_CLOEXEC in the tempfile module

2013-01-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 64883c614c88 by Charles-François Natali in branch 'default':
Issue #16860: In tempfile, use O_CLOEXEC when available to set the
http://hg.python.org/cpython/rev/64883c614c88

--
nosy: +python-dev

___
Python tracker 

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



[issue16863] Argparse tutorial outdated

2013-01-04 Thread Charlie Dimino

Charlie Dimino added the comment:

If it's okay, don't close this just yet. I'm new to this system but I'll submit 
a patch with any fixes to the tutorial I find.

--

___
Python tracker 

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



[issue16861] Portion of code example not highlighted in collections doc

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

The part that is not highlighted is not part of the code, but the output of the 
function.

--
nosy: +ezio.melotti
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue9554] test_argparse.py: use new unittest features

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue16510.

--
nosy: +serhiy.storchaka
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



[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

2013-01-04 Thread Jim Minter

New submission from Jim Minter:

sqlite3 doesn't populate the lastrowid member of the Cursor object when a SQL 
REPLACE statement is executed.

The following snippet doesn't work as I would expect:
cursor = db.execute("REPLACE INTO table(column) VALUES ('datum')")
print cursor.lastrowid  # prints None

The following snippet, with SQL which is in effect identical to SQLite, does 
work as expected:
cursor = db.execute("INSERT OR REPLACE INTO table(column) VALUES ('datum')")
print cursor.lastrowid  # prints some rowid

Looking at Modules/_sqlite/cursor.c, in _pysqlite_query_execute(), the 
following snippet is found:

if (!multiple && statement_type == STATEMENT_INSERT) {
Py_BEGIN_ALLOW_THREADS
lastrowid = sqlite3_last_insert_rowid(self->connection->db);
Py_END_ALLOW_THREADS
self->lastrowid = PyLong_FromLong((long)lastrowid);
} else {
Py_INCREF(Py_None);
self->lastrowid = Py_None;
}

I suggest this should read something like:
if (!multiple && (statement_type == STATEMENT_INSERT || statement_type == 
STATEMENT_REPLACE)) {
instead of:
if (!multiple && statement_type == STATEMENT_INSERT) {

Thanks,

Jim

--
components: Library (Lib)
messages: 179049
nosy: jim_minter
priority: normal
severity: normal
status: open
title: sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE 
statement
type: enhancement
versions: Python 2.7, Python 3.3

___
Python tracker 

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



[issue16863] Argparse tutorial outdated

2013-01-04 Thread Ezio Melotti

Ezio Melotti added the comment:

When I backported the patch I probably didn't want to try all the examples to 
see what the py2 error was.  In addition the py3 error is more clear even if it 
doesn't match what you actually get.
I think this can be closed as won't fix, unless someone wants to propose a 
patch.

--
type:  -> enhancement

___
Python tracker 

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



[issue16862] FAQ has outdated information about Stackless

2013-01-04 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue10557] Malformed error message from float()

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can this issue be closed?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've posted a review on Rietveld. Not sure the notification e-mail was sent 
since I got a weird response from the server.

> should EINTR be handled (i.e. retry, with an updated timeout). I'm tempted to 
> say
> yes, because EINTR is just a pain the user should never be exposed with.

You could add an optional argument to the select() method?

> what should be done with POLLNVAL and POLLERR? Raise an exception (that's 
> what Java 
> does, but since you can get quite quite easily it would be a pain to use), 
> return a 
> generic SELECT_ERR event?

I would say return SELECT_ERR.

> So this can be interesting when a large number of FDs are monitored.

The difference is impressive indeed.

--

___
Python tracker 

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



[issue16863] Argparse tutorial outdated

2013-01-04 Thread R. David Murray

R. David Murray added the comment:

See issue 14034.  Ezio apparently left the error messages unchanged on 
purpose...I'm not sure why.

--
assignee: docs@python -> 
nosy: +ezio.melotti, tshepang

___
Python tracker 

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



[issue16863] Argparse tutorial outdated

2013-01-04 Thread R. David Murray

R. David Murray added the comment:

Actually it looks like it is future-dated.  The documented error message is the 
one you get from 3.3.  I guess someone backported a doc change for a feature 
change.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue16863] Argparse tutorial outdated

2013-01-04 Thread R. David Murray

R. David Murray added the comment:

Ah, the whole tutorial is newish.  So this is a bug just in the 2.7 version of 
the tutorial (it doesn't match the 2.7 code), and yes, there may be other 
issues as well.

--

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-04 Thread Guido van Rossum

Guido van Rossum added the comment:

Would it make sense to explore this in the Tulip project first?  It could be a 
new module, tulip/selector.py.  (Heck, I'll even give you commit privileges in 
Tulip.)

Also, I've heard (but don't know from personal experience) that Jython supports 
select but it takes only lists of socket objects, not file descriptors (which 
don't exist in Java).

Finally, what about Windows?

--

___
Python tracker 

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



[issue16863] Argparse tutorial outdated

2013-01-04 Thread Charlie Dimino

New submission from Charlie Dimino:

http://docs.python.org/2/howto/argparse.html

Error message in the first example is outdated, may indicate further out of 
date information on page.

Example:

The tutorial says:
prog.py: error: the following arguments are required: echo

When the actual error received is:
prog.py: error: too few arguments

--
assignee: docs@python
components: Documentation
messages: 179041
nosy: Charlie.Dimino, docs@python
priority: normal
severity: normal
status: open
title: Argparse tutorial outdated
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



[issue14807] Move tarfile.filemode() into stat module

2013-01-04 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Previous issue should have been fixed by now.
Closing.

--
status: pending -> closed

___
Python tracker 

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



[issue16862] FAQ has outdated information about Stackless

2013-01-04 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Sorry, link here, 
http://docs.python.org/3/faq/design.html#can-t-you-emulate-threads-in-the-interpreter-instead-of-relying-on-an-os-specific-thread-implementation
 .

--

___
Python tracker 

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



[issue16862] FAQ has outdated information about Stackless

2013-01-04 Thread Ramchandra Apte

New submission from Ramchandra Apte:

The FAQ says "It’s [Stackless] still experimental but looks very promising." 
AFAIK, Stackless is mature.

--
assignee: docs@python
components: Documentation
messages: 179038
nosy: docs@python, ramchandra.apte
priority: normal
severity: normal
status: open
title: FAQ has outdated information about Stackless

___
Python tracker 

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



[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2013-01-04 Thread Brian Curtin

Brian Curtin added the comment:

That's true of the default branch due to some changes I recently made in the 
implementation of the functions, but we should probably put tests into 3.2/3.3.

--

___
Python tracker 

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



[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2013-01-04 Thread Ronald Oussoren

Ronald Oussoren added the comment:

There are tests for samefile and sameopenfile in test_genericpath.GenericTest 
which is included by test_ntpath (NtCommonTest subclasses 
test_genericpath.CommonTest which again subclasses GenericTest).

I cannot easily test on Windows (the only windows systems I've easy access to 
are production boxes using py2.7), but if my analysis is correct this issue can 
be closed

--

___
Python tracker 

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



[issue9267] Update pickle opcode documentation in pickletools for 3.x

2013-01-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue16550.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



  1   2   >