[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-13 Thread Steven Bethard

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



[issue15937] Assertion failure (C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).

2012-09-13 Thread Cioroianu Nicolin

New submission from Cioroianu Nicolin:

Hello,

Running the following script frame:

import re
#import modulefinder

#m=str(raw_input("Get a string:"))
m= "IT_SetBusParameters(param1,param2,param3,param4,param5,param6)"
if m:
cnt=m.count(',')
if cnt:
nr=0
s=re.split(',',m)
for nr in cnt:
print s[i]
i=i+1
#PendingDeprecationWarning
else:
return
print "finished"

I have used PyScripter as running ide.


I received the following failure:
Assertion failure (C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, 
line 1175).

Exception class: EAssertionFailed
Exception message: Assertion failure 
(C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).
Exception address: 00908B3E
--
PyScripter version : 2.5.3.0 x86
Python DLL : python27.dll
Python Engine : peRemote
--
Stack list, generated 13.09.2012 09:45:16
(00507B39){PyScripter.exe} [00908B39] 
cPyRemoteDebugger.TPyRemoteInterpreter.ShutDownServer (Line 1175, 
"cPyRemoteDebugger.pas" + 41) + $1B
(6609){PyScripter.exe} [00407609] System.@Assert + $25
(00507B39){PyScripter.exe} [00908B39] 
cPyRemoteDebugger.TPyRemoteInterpreter.ShutDownServer (Line 1175, 
"cPyRemoteDebugger.pas" + 41) + $1B
(00505F0D){PyScripter.exe} [00906F0D] 
cPyRemoteDebugger.TPyRemoteInterpreter.ReInitialize (Line 831, 
"cPyRemoteDebugger.pas" + 32) + $2
(003A45C5){PyScripter.exe} [007A55C5] cPyBaseDebugger.TPythonControl.PrepareRun 
(Line 871, "cPyBaseDebugger.pas" + 18) + $4
(003A469D){PyScripter.exe} [007A569D] cPyBaseDebugger.TPythonControl.Run (Line 
897, "cPyBaseDebugger.pas" + 5) + $3
(00516455){PyScripter.exe} [00917455] frmPyIDEMain.TPyIDEMainForm.actRunExecute 
(Line 1901, "frmPyIDEMain.pas" + 8) + $A
(0005A8E3){PyScripter.exe} [0045B8E3] System.Classes.TBasicAction.Execute + $F
(000895F5){PyScripter.exe} [0048A5F5] Vcl.ActnList.TContainedAction.Execute + 
$31
(0008A350){PyScripter.exe} [0048B350] Vcl.ActnList.TCustomAction.Execute + $50
(0005A7A7){PyScripter.exe} [0045B7A7] System.Classes.TBasicActionLink.Execute + 
$13
(0020B1C9){PyScripter.exe} [0060C1C9] TB2Item.TTBCustomItem.Click (Line 1474, 
"TB2Item.pas" + 23) + $7
(0022FBA8){PyScripter.exe} [00630BA8] SpTBXItem.TSpTBXCustomItem.Click (Line 
4400, "SpTBXItem.pas" + 2) + $2
(0020B0C2){PyScripter.exe} [0060C0C2] TB2Item.TTBCustomItem.ClickWndProc (Line 
1423, "TB2Item.pas" + 29) + $5
(0005B5D8){PyScripter.exe} [0045C5D8] System.Classes.StdWndProc + $14
(001550C7){PyScripter.exe} [005560C7] Vcl.Forms.TApplication.ProcessMessage + 
$F3
(0015510A){PyScripter.exe} [0055610A] Vcl.Forms.TApplication.HandleMessage + $A
(00155449){PyScripter.exe} [00556449] Vcl.Forms.TApplication.Run + $C9
(00564A59){PyScripter.exe} [00965A59] PyScripter.PyScripter (Line 136, "" + 14) 
+ $2
--
System   : Windows 7 Professional, Version: 6.1, Build: 1DB1, "Service Pack 1"
Processor: Intel,Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2490 MHz MMX 
SSE SSE2 SSE3 SSSE3 SSE41 SSE42 64 bits DEP
Memory: 8142; free 5122
Display  : 1600x900 pixels, 32 bpp
--
List of loaded modules:
[0040] C:\Program Files (x86)\PyScripter\PyScripter.exe
   2.5.3.0 - 2.5.3.0
[05BC] C:\Python27\DLLs\_socket.pyd
<1E1D> (no module version info)
[1000] C:\Python27\DLLs\_ssl.pyd
   (no module version info)
[1D11] C:\Python27\DLLs\select.pyd
   (no module version info)
[1D12] C:\Python27\DLLs\unicodedata.pyd
   (no module version info)
[1E00] C:\Windows\system32\python27.dll
   2.7.150.1013 - 2.7
   Python Core
[1E7A] C:\Windows\system32\pywintypes27.dll
   2.7.217.0 - 2.7.217.0
[1EA1] C:\Python27\lib\site-packages\win32\win32file.pyd
   2.7.217.0 - 2.7.217.0
[1EB9] C:\Python27\lib\site-packages\win32\win32pipe.pyd
   2.7.217.0 - 2.7.217.0
[65DF] C:\Windows\System32\itircl.dll
   6.1.7601.17514 - 6.1.7601.17514 (win7sp1_rtm.101119-1850)
   Microsoft® InfoTech IR Local DLL
[65E2] C:\Windows\system32\hhctrl.ocx
   6.1.7600.16385 - 6.1.7600.16385 (win7_rtm.090713-1255)
   Microsoft® HTML Help Control
[6632] C:\Windows\System32\itss.dll
   6.1.7600.16385 - 6.1.7600.16385 (win7_rtm.090713-1255)
   Microsoft® InfoTech Storage System Library
[6671] 
C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17825_none_72d273598668a06b\gdiplus.dll
   6.1.7601.17825 - 6.1.7601.17825 (win7sp1_gdr.120420-1503)
   Microsoft GDI+
[668E] C:\Windows\system32\NetworkExplorer.dll
   6.1.7601.17514 - 6.1.7600.16385 (win7_rtm.090713-1255)
   Network Explorer
[66C20

[issue15938] expose way to count examples in doctest.DocFileSuite()

2012-09-13 Thread Chris Jerdonek

New submission from Chris Jerdonek:

This issue is to add to the doctest module an easy way to obtain the number of 
doctest examples in a unittest.TestSuite instance returned by a call to the 
doctest.DocFileSuite() function.

The unittest.TestSuite class currently exposes a countTestCases() method that 
gives the number of TestCase instances inside a test suite.

However, this method isn't useful for determining how many doctest examples 
that the TestSuite instance returned by a call to DocFileSuite() contains, nor 
in particular whether the instance contains any actual tests.  Calling 
countTestCases() on the return value returns the number of files that were 
parsed and not the number of doctest examples.

In fact, getting the number of doctest examples contained in such a TestSuite 
is surprisingly obscure and seems to rely on implementation details and 
accessing private attributes.  Here is one way to do it (annotated with 
comments):

paths = ['Doc/howto/ipaddress.rst', 'Doc/howto/unicode.rst']

# The return value of DocFileSuite is a unittest.TestCase instance, and
# each item in the return value is a doctest.DocFileCase instance (which
# in turn is also a doctest.DocTestCase and unittest.TestCase instance).
suite = doctest.DocFileSuite(*paths, module_relative=False)

total = 0
for case in suite:
doc_test = case._dt_test  # a doctest.DocTest instance.
total += len(doc_test.examples)

print("total test cases:  %s" % suite.countTestCases())
print("total examples:   %s" % total)

Ideally, you would just be able to do something like this instead:

suite.countExamples()

Exposing a method like that would probably involve converting DocFileSuite from 
a simple function that returns a unittest.TestSuite into a class that 
subclasses unittest.TestSuite (so that the function becomes a constructor).

--
components: Library (Lib)
messages: 170430
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: expose way to count examples in doctest.DocFileSuite()
type: enhancement
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



[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

Just info:
I still can reproduce that. (It's maybe just something wrong with my setup?)

--
Added file: http://bugs.python.org/file27183/testsResult.txt

___
Python tracker 

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



[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

The actual tip for me is:

ci@random:~/Prog/cpython/benchmarks/py2$ hg tip
changeset:   164:61768f86170c
tag: tip
user:Brett Cannon 
date:Fri Aug 31 18:58:24 2012 -0400
summary: Allow for the specification of a base directory for either 
interpreter

--

___
Python tracker 

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



[issue15937] Assertion failure (C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

That isn't a valid Python program, and you appear to be reporting a bug in a 
third party tool.  You should report your problem to the appropriate community 
for your IDE tool.

--
nosy: +r.david.murray
resolution:  -> invalid
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



[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Brett Cannon

Brett Cannon added the comment:

Can you copy-and-paste the exact commands you are using to build and run the 
benchmarks (along with version info for the interpreter used to do the 
building) as I'm on the same revision and can't reproduce anymore?

$ mkdir benchmarks_py3k
$ cd benchmarks_py3k/
$ $ /usr/bin/python2.6 -V
Python 2.6.5
$ PYTHON=/usr/bin/python2.6 ../benchmarks/make_perf3.sh ../benchmarks
# ... 2to3 output
$ python3 -V
Python 3.2.3
$ python3 perf.py -f -b 2to3 `which python3` `which python3`
Running 2to3...
INFO:root:Running /usr/bin/python3 lib/2to3/2to3 -f all 
lib/2to3/lib2to3/refactor.py
INFO:root:Running `['/usr/bin/python3', 'lib/2to3/2to3', '-f', 'all', 
'lib/2to3/lib2to3/refactor.py']` 1 time
INFO:root:Running /usr/bin/python3 lib/2to3/2to3 -f all 
lib/2to3/lib2to3/refactor.py
INFO:root:Running `['/usr/bin/python3', 'lib/2to3/2to3', '-f', 'all', 
'lib/2to3/lib2to3/refactor.py']` 1 time

Report on Linux importthis.wat.corp.google.com 3.2.5-gg944 #1 SMP Thu Aug 2 
02:35:13 PDT 2012 x86_64 x86_64
Total CPU cores: 12

### 2to3 ###
0.54 -> 0.56: 1.04x slower

--

___
Python tracker 

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



[issue15937] Assertion failure (C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).

2012-09-13 Thread Cioroianu Nicolin

Cioroianu Nicolin added the comment:

Hello David,

I'm beginner with this tool, also a beginner programmer.
I submitted the problem to IDE tool PyScripter.
Just wanted to help Python improvement. I'm looking to improve also my 
experience.
Have a nice day!:)

Regards, 
Nicolin


 From: R. David Murray 
To: nicolincioroi...@yahoo.com 
Sent: Thursday, September 13, 2012 2:28 PM
Subject: [issue15937] Assertion failure 
(C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).

R. David Murray added the comment:

That isn't a valid Python program, and you appear to be reporting a bug in a 
third party tool.  You should report your problem to the appropriate community 
for your IDE tool.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___

--

___
Python tracker 

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



[issue15937] Assertion failure (C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

Thanks for wanting to help.  If the PyScripter folks trace it back to a problem 
with Python, please feel free to reopen this issue.

--

___
Python tracker 

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



[issue15937] Assertion failure (C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).

2012-09-13 Thread Cioroianu Nicolin

Cioroianu Nicolin added the comment:

Hello David,

PyScripter Answer:

Thanks for the bug report. This assertion happens when PyScripter is waiting 
for the remote engine to shut-down for a long time without success.  This might 
mean that either the system is very busy or more likely something is preventing 
the remote engine from shutting down, such as waiting in a blocked state.  What 
you can do in such cases is to use the task manager to kill the engine (appears 
as a process "python.exe") and then reinitialize the remote engine.

Regards 

Kiriakos

PS  Maybe the problem happens with the statement:

m= "IT_SetBusParameters(param1,param2,param3,param4,param5,param6)"  

I think that can't be a problem with the upper line with that assignation.

Regards,

Nicolin


 From: R. David Murray 
To: nicolincioroi...@yahoo.com 
Sent: Thursday, September 13, 2012 2:43 PM
Subject: [issue15937] Assertion failure 
(C:\Delphi\progs32\Python\PythonIDE\cPyRemoteDebugger.pas, line 1175).

R. David Murray added the comment:

Thanks for wanting to help.  If the PyScripter folks trace it back to a problem 
with Python, please feel free to reopen this issue.

--

___
Python tracker 

___

--

___
Python tracker 

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



[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

The box is a debian (wheezy):
ci@random:~/Prog/cpython/benchmarks/py2$ uname -a
Linux random 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux

The source repository dir:
ci@random:~/Prog/cpython/benchmarks/py2$ dir
lib  LICENSE.txt  make_perf3.sh  performance  perf.py  perf.pyc  README.txt  
test_perf.py

Then:

ci@random:~/Prog/cpython/benchmarks/py2$ cd ..
ci@random:~/Prog/cpython/benchmarks$ mkdir benchmarks_py3k
ci@random:~/Prog/cpython/benchmarks$ dir
benchmarks_py3k  py2
ci@random:~/Prog/cpython/benchmarks$ cd benchmarks_py3k/
ci@random:~/Prog/cpython/benchmarks/benchmarks_py3k$
ci@random:~/Prog/cpython/benchmarks/benchmarks_py3k$ /usr/bin/python2.6 -V
Python 2.6.8
ci@random:~/Prog/cpython/benchmarks/benchmarks_py3k$ PYTHON=/usr/bin/python2.6 
../py2/make_perf3.sh ../py2
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
...
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file lib/2to3/example.py ###
RefactoringTool: Line 371: You should use a for loop here
RefactoringTool: Line 372: You should use a for loop here
RefactoringTool: Line 373: You should use a for loop here
RefactoringTool: Line 374: You should use a for loop here
RefactoringTool: Line 375: You should use a for loop here
RefactoringTool: ### In file lib/2to3/example.py ###
RefactoringTool: Line 393: You should use 'hasattr(foo, '__call__')' here.
RefactoringTool: Line 394: You should use 'operator.contains(foo, bar)' here.
RefactoringTool: Skipping implicit fixer: buffer
...
RefactoringTool: lib/mako/test/templates/subdir/foo/modtest.html.py
ci@random:~/Prog/cpython/benchmarks/benchmarks_py3k$ python3 -V
Python 3.2.3
python3 perf.py -f -b 2to3 `which python3` `which python3`
Running 2to3...
INFO:root:Running /usr/bin/python3 lib/2to3/2to3 -f all 
lib/2to3/lib2to3/refactor.py
INFO:root:Running `['/usr/bin/python3', 'lib/2to3/2to3', '-f', 'all', 
'lib/2to3/lib2to3/refactor.py']` 1 time
INFO:root:Running /usr/bin/python3 lib/2to3/2to3 -f all 
lib/2to3/lib2to3/refactor.py
INFO:root:Running `['/usr/bin/python3', 'lib/2to3/2to3', '-f', 'all', 
'lib/2to3/lib2to3/refactor.py']` 1 time

Report on Linux random 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 
Total CPU cores: 4

### 2to3 ###
0.616038 -> 0.624039: 1.01x slower


And further:
ci@random:~/Prog/cpython/benchmarks/benchmarks_py3k$ dir
lib  performance  perf.py
cd lib/2to3
ci@random:~/Prog/cpython/benchmarks/benchmarks_py3k/lib/2to3$ dir
2to3  example.py  HACKING  lib2to3  README  scripts  test.py
ci@random:~/Prog/cpython/benchmarks/benchmarks_py3k/lib/2to3$ python3 test.py 
2> testsResult2.txt

--
Added file: http://bugs.python.org/file27184/testsResult2.txt

___
Python tracker 

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



[issue15939] make *.rst files in Doc/ parseable by doctest

2012-09-13 Thread Chris Jerdonek

New submission from Chris Jerdonek:

Currently, when trying to parse the *.rst files in the Doc/ folder (i.e. not 
actually running them but simply generating unittest.TestCase instances from 
them by passing them to doctest.DocFileSuite()), five files yield errors.

This issue is to make it so that all of the *.rst files in our Doc/ folder are 
at least parseable by doctest without error.

I will submit a patch.

Below are the errors that currently occur:

(1) test fdoc:library/ctypes.rst crashed -- Traceback (most recent call last):
  ...
ValueError: line 55 of the doctest for ctypes.rst has an invalid option: 
'+WINDOWS'

(2) test fdoc:library/doctest.rst crashed -- Traceback (most recent call last):
  ...
ValueError: line 1592 of the docstring for doctest.rst has inconsistent leading 
whitespace: '  """))'

(3) test fdoc:library/multiprocessing.rst crashed -- Traceback (most recent 
call last):
  ...
ValueError: line 1016 of the docstring for multiprocessing.rst lacks blank 
after >>>: '>>'

(4) test fdoc:whatsnew/2.4.rst crashed -- Traceback (most recent call last):
  ...
ValueError: line 1422 of the docstring for 2.4.rst lacks blank after >>>: '   
>>>"""'

(5) test fdoc:whatsnew/2.7.rst crashed -- Traceback (most recent call last):
  ...
ValueError: line 1531 of the docstring for 2.7.rst lacks blank after   .: ' 
 ...'

--
assignee: docs@python
components: Documentation
messages: 170441
nosy: cjerdonek, docs@python
priority: normal
severity: normal
status: open
title: make *.rst files in Doc/ parseable by doctest
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue15938] expose way to count examples in doctest.DocFileSuite()

2012-09-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> # The return value of DocFileSuite is a unittest.TestCase instance, and

s/unittest.TestCase/unittest.TestSuite/ (as elsewhere in the comment)

--

___
Python tracker 

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



[issue15939] make *.rst files in Doc/ parseable by doctest

2012-09-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The attached patch addresses all but Doc/library/ctypes.rst.

See the following python-dev e-mail for a question about how best to handle 
that case:

http://mail.python.org/pipermail/python-dev/2012-September/121721.html

--
keywords: +patch
Added file: http://bugs.python.org/file27185/issue-15935-1.patch

___
Python tracker 

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



[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Brett Cannon

Brett Cannon added the comment:

So the tests failed but the benchmarks finished without issue? I'm not too 
worried about the tests since they are almost all str/bytes interaction issues 
(although I don't get the .decode() failure). If the benchmarks run without 
errors then I'm satisfied, else we figure out what this fails ever or we have a 
already translated copy kept in a lib3 directory to prevent problems.

--

___
Python tracker 

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



[issue15939] make *.rst files in Doc/ parseable by doctest

2012-09-13 Thread Chris Jerdonek

Changes by Chris Jerdonek :


Removed file: http://bugs.python.org/file27185/issue-15935-1.patch

___
Python tracker 

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



[issue15939] make *.rst files in Doc/ parseable by doctest

2012-09-13 Thread Chris Jerdonek

Changes by Chris Jerdonek :


Added file: http://bugs.python.org/file27186/issue-15939-1.patch

___
Python tracker 

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



[issue13990] Benchmarks: 2to3 failures on the py3 side

2012-09-13 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

> So the tests failed but the benchmarks finished without issue?
Yes. But the apparent diff is that I've used 2.6.8

If the benchmarks run without errors then I'm satisfied, else we figure 
out what this fails ever
or we have a already translated copy kept in a lib3 directory to prevent 
problems.

The actual trunk revision for 2to3 from:
https://svn.python.org/projects/sandbox/trunk/2to3/ is
Revision 88981: /sandbox/trunk/2to3

the README.txt says:
2to3: r72994 from http://svn.python.org/projects/sandbox/trunk/2to3

I've just updated to that version but nothing changed: same errors (and 
a new test test_formfeed (lib2to3.tests.test_parser.TestDriver) that was ok)

cheers,
francis

--

___
Python tracker 

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



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b79b4848f44 by Richard Oudkerk in branch 'default':
Issue #15881: Clarify comment in exit function
http://hg.python.org/cpython/rev/2b79b4848f44

--

___
Python tracker 

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



[issue15629] Add to regrtest the ability to run Lib and Doc doctests

2012-09-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Attached is a file of doctest statistics (counts of example failures, 
exceptions, and successes) for almost every file in the Doc directory when 
running the doctests with vanilla doctest.

I did this to get a sense of which files it would be easiest to get into a 
"passing" state, and to see how many files actually have doctest examples.

It was actually non-trivial to get fine-grained test result data like this 
because doctest only exposes the ability to create a unittest.TestCase for each 
file (i.e. an entire file either registers as a success or failure).  >From the 
API, you can't get results down to the level of individual doctest examples.

See also issue 15938 that I recently created which would be a small step in 
this direction (getting a total example count independent of successes and 
failures).

--
Added file: http://bugs.python.org/file27187/doctest-stats-1.txt

___
Python tracker 

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



[issue15940] Time module: effect of locale

2012-09-13 Thread Terry J. Reedy

New submission from Terry J. Reedy:

"Module locale 
Internationalization services. The locale settings can affect the return values 
for some of the functions in the time module."

This is vague and perhaps misleading. The doc also says
"Locale information is not used by asctime()."
"Locale information is not used by ctime()."

Since ctime() = asctime(localtime()), this implies to me that locale is also 
not used by localtime. Otherwise, locale information would indirectly be used 
by ctime. (I did not test this directly because I do not know what a legal 
locale name is on Windows. The doc example 'de_DE' does not work.)

Doc also says
"time.strftime(format[, t]) 
%a Locale’s abbreviated weekday name. 
... 
"

So perhaps the doc should say "The locale setting affects the interpretation of 
many format specifiers in strftime and strptime".

If is does anything else, what?

--
assignee: docs@python
components: Documentation
messages: 170448
nosy: belopolsky, docs@python, haypo, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Time module: effect of locale
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



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

2012-09-13 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Attached an updated version of the second patch. David: Is this what you meant? 
Also, the patch format should now be rietveld compatible :)

--
Added file: 
http://bugs.python.org/file27188/issue15222_v2_0002_insert_blank_after_each_message_in_mbox.patch

___
Python tracker 

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



[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Terry J. Reedy

New submission from Terry J. Reedy:

"time.timezone 
The offset of the local (non-DST) timezone, in seconds west of UTC (negative in 
most of Western Europe, positive in the US, zero in the UK)."

Quite aside from #9305 (UTC is not a place), this does not specify the effect 
of setting this attribute. It does not change the output of localtime, asctime, 
or ctime (on Windows). Does is affect anything else? strftime? If setting it 
has no effect, the doc should say so. (And then perhaps it should be made 
read-only in the future, as setting it expecting an effect would be a bug.)

--
assignee: docs@python
components: Documentation
messages: 170450
nosy: belopolsky, docs@python, haypo, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Time module: effect of time.timezone change
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



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

2012-09-13 Thread Petri Lehtinen

Changes by Petri Lehtinen :


Removed file: 
http://bugs.python.org/file27188/issue15222_v2_0002_insert_blank_after_each_message_in_mbox.patch

___
Python tracker 

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



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

2012-09-13 Thread Petri Lehtinen

Changes by Petri Lehtinen :


Added file: 
http://bugs.python.org/file27189/issue15222_v2_0002_insert_blank_after_each_message_in_mbox.patch

___
Python tracker 

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



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

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

Yes, that looks better.

I haven't worked through the rest of the logic in detail, I'll trust your 
months of cogitation and the tests on that part.

--

___
Python tracker 

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



[issue15940] Time module: effect of locale

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

Since localtime() returns numbers, it is trivially true that localtime is not 
affected by locale.

Your more specific phrasing is correct, I think.

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



[issue9253] argparse: optional subparsers

2012-09-13 Thread Julian Berman

Changes by Julian Berman :


--
nosy: +Julian

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread Garrett Cooper

New submission from Garrett Cooper:

Windows doesn't return sane values for localtime(3) (per POSIX [1]) when
the BIOS is set to the local time (the host is a Win2k8-R2 machine):

$ python -V; python -c 'import time; print time.strftime("%m-%d-%y %H:%M:%S", 
time.localtime())'; date; uname -a
Python 2.6.1
09-13-12 19:56:03
Thu, Sep 13, 2012 11:56:03 AM
CYGWIN_NT-6.1-WOW64 QAQA-ORPTO8B466 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 
Cygwin

This seems to be a conscious design choice on Microsoft's part:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724961%28v=vs.85%29.aspx

I'll try and follow this up with the POSIX folks or maybe Microsoft, but
for the time being this needs to be documentation as an issue with downstream 
consumers (perl 5.8.9 also illustrates this issue).

--
components: Library (Lib)
messages: 170453
nosy: yaneurabeya
priority: normal
severity: normal
status: open
title: Time representation for Windows incorrect when BIOS clock set to 
localtime when calling time.localtime()
type: behavior
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



[issue9253] argparse: optional subparsers

2012-09-13 Thread R. David Murray

Changes by R. David Murray :


--
stage: needs patch -> test needed

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread Garrett Cooper

Garrett Cooper added the comment:

1. http://pubs.opengroup.org/onlinepubs/009695299/functions/localtime.html

--

___
Python tracker 

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



[issue4188] test_threading hang when running as verbose

2012-09-13 Thread Anthony Kong

Changes by Anthony Kong :


--
nosy: +Anthony.Kong

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

It seems to me this is more likely a bug in cygwin and/or the cygwin Python 
port, since I find it hard to believe our windows users would be putting up 
with getting incorrect localtime results.

--
nosy: +belopolsky, r.david.murray, terry.reedy

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

Perhaps that is the problem then: running a non-cygwin python from a cygwin 
environment?  I don't really know, which is why I added Terry to the nosy 
list...he's got more Windows experience, though maybe not cygwin experience.  I 
myself no longer have access to a windows/cygwin box, though I may try setting 
one up again.

--

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread Garrett Cooper

Garrett Cooper added the comment:

Except it wasn't built within the Cygwin environment...

$ python -c 'import sys; print sys.version'
2.6.1 (r261:67515, Dec  5 2008, 13:58:38) [MSC v.1500 32 bit (Intel)]
$ ldd `which python` | grep -i ygwin || echo "not cygwin"
not cygwin

--

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread Garrett Cooper

Garrett Cooper added the comment:

Ok. Turns out I got this backwards. The BIOS clock is set to UTC (which works 
with the CentOS install on the same drive) and Windows assumes the clock is set 
to local time [1]. I'll follow it up with the my $work lab team, but it would 
be nice if this could be tuned properly to report the proper time according to 
Windows (even if the bloody clock/tz was wrong to begin with).

1. https://help.ubuntu.com/community/UbuntuTime

--

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

I'm not sure it can be.  Windows is screwed up in the way it handles time.  
Last I looked they still didn't support having the BIOS clock set to UTC (but 
is has been a while since I looked).

--

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread Garrett Cooper

Garrett Cooper added the comment:

Hahaha... you're right:

$ perl -e 'use POSIX; print strftime("%m-%d-%y %H:%M:%S", localtime)."\n";'; 
date
09-13-12 23:25:49
Thu, Sep 13, 2012  3:25:49 PM
$ python -c 'import time; print time.strftime("%m-%d-%y %H:%M:%S", 
time.localtime())'; date
09-13-12 23:26:25
Thu, Sep 13, 2012  3:26:25 PM
$ python -c 'import time; print time.strftime("%m-%d-%y %H:%M:%S", 
time.localtime())'; env TZ=utc date
09-13-12 23:27:35
Thu, Sep 13, 2012 10:27:35 PM

Now I've just moved the dang clock ahead 8 hours because the timezone is 
screwed up (now python assumes UTC, Cygwin assumes local time, and Windows 
assumes UTC), I guess I'll have to recommend `fixing` our Linux installs to use 
local time (dog gone Windows).

--

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread R. David Murray

R. David Murray added the comment:

OK, I'm going to close this, then.

--
resolution:  -> invalid
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



[issue15437] Merge Doc/ACKS.txt names into Misc/ACKS

2012-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 48185b0f7b8a by Ezio Melotti in branch '3.2':
#15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst 
accordingly.
http://hg.python.org/cpython/rev/48185b0f7b8a

New changeset 2b4a89f82485 by Ezio Melotti in branch 'default':
#15437, #15439: merge with 3.2.
http://hg.python.org/cpython/rev/2b4a89f82485

New changeset 76dd082d332e by Ezio Melotti in branch '2.7':
#15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst 
accordingly.
http://hg.python.org/cpython/rev/76dd082d332e

--
nosy: +python-dev

___
Python tracker 

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



[issue15439] Include Misc/ACKS names into the documentation

2012-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 48185b0f7b8a by Ezio Melotti in branch '3.2':
#15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst 
accordingly.
http://hg.python.org/cpython/rev/48185b0f7b8a

New changeset 2b4a89f82485 by Ezio Melotti in branch 'default':
#15437, #15439: merge with 3.2.
http://hg.python.org/cpython/rev/2b4a89f82485

New changeset 76dd082d332e by Ezio Melotti in branch '2.7':
#15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst 
accordingly.
http://hg.python.org/cpython/rev/76dd082d332e

--
nosy: +python-dev

___
Python tracker 

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



[issue15942] Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime()

2012-09-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For future reference:
2.6 is no longer supported except for security issues
The same will soon (a month?) be true of 3.2.
Win2k is no longer supported in 3.3

--

___
Python tracker 

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



[issue15437] Merge Doc/ACKS.txt names into Misc/ACKS

2012-09-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the script!

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

___
Python tracker 

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



[issue15439] Include Misc/ACKS names into the documentation

2012-09-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: docs@python -> ezio.melotti
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type:  -> enhancement
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue15437] Merge Doc/ACKS.txt names into Misc/ACKS

2012-09-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks for committing, Ezio!

--

___
Python tracker 

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



[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Isn't this a duplicate of issue 8810?

--

___
Python tracker 

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



[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I've read this more carefully and I now understand the issue.  Indeed, setting 
time.timezone or time.altzone has no effect on say time.strftime('%z').  I 
think this should be documented and the doc should refer to time.tzset() for a 
proper way to change these variables.

As for making them read only, I don't think there is a non-hackish way to make 
module globals read-only.

I also believe that rather than improving these variables we should encourage 
people to use datetime module's new timezone features because at almost any 
location on Earth timezone offset is not a constant and varies over time.

--

___
Python tracker 

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



[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#8810 and #9305 seem related, if not dups.

You are right about module vars. They are all instances of one module class 
with one __setattr__.

How about "Setting this attribute has no effect. See time.TZset or even better, 
the datetime module." (I had not noticed .altzone)

--

___
Python tracker 

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



[issue15941] Time module: effect of time.timezone change

2012-09-13 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> Setting this attribute has no effect.

Strictly speaking, setting this attribute has the effect of changing the value 
of this attribute.  I cannot come up with a better wording at this hour, but I 
would say something about it being "informational" only.  We should also 
mention that these attributes are set by time.tzset().

--

___
Python tracker 

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



[issue15831] comma after leading optional argument is after bracket in docs

2012-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b01eb870f84f by Ezio Melotti in branch '3.2':
#15831: document multiple signatures on different lines.  Patch by Chris 
Jerdonek.
http://hg.python.org/cpython/rev/b01eb870f84f

New changeset 0ed61ee823d8 by Ezio Melotti in branch 'default':
#15831: merge with 3.2
http://hg.python.org/cpython/rev/0ed61ee823d8

New changeset 2291aff20a05 by Ezio Melotti in branch '2.7':
#15831: document multiple signatures on different lines.  Patch by Chris 
Jerdonek.
http://hg.python.org/cpython/rev/2291aff20a05

--
nosy: +python-dev

___
Python tracker 

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



[issue15831] comma after leading optional argument is after bracket in docs

2012-09-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python -> ezio.melotti
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