[issue18439] Patchcheck for ACKS, NEWS does not work on Windows.

2013-07-13 Thread Terry J. Reedy

New submission from Terry J. Reedy:

My current list of changed_files() (command from the code)
% hg status --added --modified --no-status
Lib\idlelib\RstripExtension.py
Misc\ACKS
Misc\NEWS
Lib\idlelib\idle_test\mock_idle.py
Lib\idlelib\idle_test\test_rstrip.py

but
F:\Python\dev\py33pcbuild\python_d tools/scripts/patchcheck.py
...
Misc/ACKS updated ... NO
Misc/NEWS updated ... NO

The problem is that 'Misc/ACKs' is not in the list, even though 'Misc\ACKS' is 
;-(.

One possible fix is to conditionally change '\' to '/' in the file list, or 
maybe just in special_files, as that seems to be the only category affected.

Another is to change line 156 (3.3) from
special_files = {'Misc/ACKS', 'Misc/NEWS'}  set(file_paths)
to
special_files = {'Misc/ACKS', 'Misc/NEWS', 'Misc\ACKS', Misc\NEWS'}  
set(file_paths).

A third is to check for both versions in credit_given() (125) and 
reported_news() (131).

I don't know if there is an issue with Macs or not.

--
components: Demos and Tools, Windows
messages: 193001
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Patchcheck for ACKS, NEWS does not work on Windows.
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Trying it out, I rediscovered that patchcheck has a Windows bug. This time I 
reported it ;-) #18439.

--

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec71fcdcfeac by Terry Jan Reedy in branch '2.7':
Issue #18279: Add tests for idlelib/RstripExtension.py. Original patch by
http://hg.python.org/cpython/rev/ec71fcdcfeac

New changeset 22ce68d98345 by Terry Jan Reedy in branch '3.3':
Issue #18279: Add tests for idlelib/RstripExtension.py. Original patch by
http://hg.python.org/cpython/rev/22ce68d98345

--
nosy: +python-dev

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I had to remove the dependency to close this, since the test_text issue #18365 
was reopened.

--
stage: patch review - committed/rejected
status: open - closed

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A simple change to RstripExtension.py fixed the marking of unchanged files as 
changed. I also removed a useless extra iteration. Having a test makes it 
possible to do things like this without breaking what already worked.

--
dependencies:  -Idle: mock Text class and test thereof
resolution:  - fixed

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



[issue18365] Idle: mock Text class and test thereof

2013-07-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bc3a34e47923 by Terry Jan Reedy in branch '3.3':
Issue #18365: convert buildbot errors to skips.
http://hg.python.org/cpython/rev/bc3a34e47923

New changeset ba4c826848d5 by Terry Jan Reedy in branch '2.7':
Issue #18365: convert buildbot errors to skips.
http://hg.python.org/cpython/rev/ba4c826848d5

--

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



[issue18365] Idle: mock Text class and test thereof

2013-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Looking through the 11 stable 3.x buildbots (1 still running), I see 3 outcomes.
1. Windows: test seemed to run, test_idle listed in 'altered environment'.
2. Some *nix: test gave no error, test_idle lit in 'tests skipped'. I presume 
this means that at least one thing was skipped, not the entire idle suite.
3. Other *nix: no test failed, but the one test case setup gave the tclerror. 
This also includes the 'murray' machine. Yours, David?

_tkinter.create just calls Tkapp_New with the same args and the message comes 
from tcl/tk. I do not know if 'display name' is the same as the 'screenName' 
parameter or not. The doc string just says Return a new Toplevel widget on 
screen SCREENNAME. Is this something to do with X11? If so, why isn't $DISPLAY 
set? Passing screenName='fake' has no effect on my Win7 machine.

I think the following patch should quiet things for now, even if not the best 
patch.

--

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



[issue12916] Add inspect.splitdoc

2013-07-13 Thread Berker Peksag

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


--
nosy: +berker.peksag
stage:  - needs patch
versions: +Python 3.4 -Python 3.3

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



[issue4534] problem with str.join - should work with list input, error says requires 'str' object

2013-07-13 Thread arsalan

arsalan added the comment:

it is really a good help

--
nosy: +bkyasi

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



[issue18352] collections.Counter with added attributes are not deepcopied properly.

2013-07-13 Thread Olivier Gagnon

Olivier Gagnon added the comment:

Yes I do have code that break because of this behaviour. I'm doing evolutionary 
algorithm using a framework called DEAP. This framework creates a type called 
individual at the runtime by subclassing a container and adding it a fitness 
attribute. Those individual are copied as not to modify every indivual when we 
work on a single one. AFAIK the only container that can't be used right now is 
the counter because the fitness is not copied. I'm sure I can come up with a 
hack to have this behaviour, but it does clash with other standard container 
type and there is no mention anywhere that the Counter should be different than 
every other container type in the python standard library.

--

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



[issue18365] Idle: mock Text class and test thereof

2013-07-13 Thread R. David Murray

R. David Murray added the comment:

Yeah, DISPLAY is how unix finds the X11 display.  I don't remember how the 
tkguionly tests deal with that being missing, but since the tests are run 
headless there is indeed no DISPLAY for the tests to talk to.

--

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



[issue18365] Idle: mock Text class and test thereof

2013-07-13 Thread R. David Murray

R. David Murray added the comment:

Looks like ttk_guionly gets skipped on my buildbot because of the following 
code at the top of test_ttk_guionly:

   try:
  ttk.Button()
   except TclError as msg:
  # assuming ttk is not available
  raise unittest.SkipTest(ttk not available: %s % msg)

So your skip fix may actually be the best solution.

--

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



[issue18439] Patchcheck for ACKS, NEWS does not work on Windows.

2013-07-13 Thread R. David Murray

R. David Murray added the comment:

Using os.path.join to create the filenames should also work, I would think.

--
nosy: +r.david.murray

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



[issue18440] hash() and __hash__() do not document their size constraints

2013-07-13 Thread Barry A. Warsaw

New submission from Barry A. Warsaw:

If you have a custom object that implements __hash__() and it returns a value 
wider than Py_ssize_t, built-in hash() on the object will truncate information. 
 This is because hash() takes the value returned by obj.__hash__() and coerces 
it through PyLong_FromSsize_t().  This can cause object hashes to have 
different values on 64bit and 32bit machines, e.g. on 64bit Linux where 
Py_ssize_t is 8 bytes wide vs. 32bit Linux where it is 4 bytes wide.

This may be perfectly reasonable from an implementation point of (ref: 
issue9778) but it is surprising since it is not documented.

This size constraint on object hashes should be documented.

from ctypes import *

class Foo:
def __hash__(self):
return 0x1332a60

print(hash(Foo()), sizeof(c_ssize_t))

---64bit Ubuntu 13.10---
$ python3.3 hashex.py
86459409655398400 8

---32bit Ubuntu 13.10---
$ python3 hashex.py
40260800 4

--
assignee: docs@python
components: Documentation
messages: 193014
nosy: barry, docs@python
priority: normal
severity: normal
status: open
title: hash() and __hash__() do not document their size constraints
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

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



[issue18441] Idle: Make test.support.requires('gui') skip when it should.

2013-07-13 Thread Terry J. Reedy

New submission from Terry J. Reedy:

This is a continuation of #18365, where it was discovered after the first set 
of pushes that
test.support.requires('gui')
is currently insufficient (on non-Windows systems) for skipping gui tests on 
buildbots when they should be skipped, because the attempt to create a Tk root 
widget will raise TclError when there is no display available.

This bug appears to arise from the confluence of two bugs:

1. It appears that on some buildbots, support.use_resources contains 'gui' when 
it should not. The could be either from -ugui or -uall without  '.-gui' or ???.

2. test.support.requires starts with
 if resource == 'gui' and not _is_gui_available():
On windows, _is_gui_available() uses ctypes to determine that there really is a 
graphics screen (or something like that). On other systems, it just returns 
True, even when it should return False.

The problem was fixed for #18365 by wrapping the tkinter.Tk call with 
try:...except: TclErrror: raise SkipTest. Rather than put something like that 
workaround in every idle_test/test_xxx file, I would like to do the test once 
in test/test_idle and if it does not work, remove 'gui' from use_resources so 
requires('gui') will work properly. See patch.

test/test_ttkguionly does not use requires() (and therefore does not do the 
special Windows check). It first tries to import _tkinter, as does test_idle. 
It then calls tkinter.test.support.check_tk_availability. That either does a 
'darwin'-ctypes check similar to the one for Windows in _is_gui_available or it 
tries to create a tk widget and looks for a TclError. test_ttkguionly then 
repeats the widget creation test.

This checking is ok for one file, but not for gui tests sprinkled throughout 
idle's test_xxx files. Perhaps requires('gui') not being dependable is why 
there is a separate test_ttkguionly file *and* a custom discovery function, 
tkinter.test.runtests.get_tests, to get only gui tests.

test/test_tk does the same except that is does not repeat the widget creation 
test. Both add 'gui' to use_resources when the file is run as main, though in a 
more convoluted manner than in test_idle. I am sure that removing 'gui' in 
test_idle cannot hurt since test_tk/ttk_gui-only skip anyway on a similar 
TclError. There is no test_turtle.py.

The check should really be done in regrtest, but I am not familiar with its 
code or the policy on patching it. Then tkinter tests could also dispense with 
their extra checks and more easily be converted to use unittest discovery. But 
that is not my concern here.

--
assignee: terry.reedy
files: delete_gui.diff
keywords: patch
messages: 193015
nosy: r.david.murray, terry.reedy
priority: high
severity: normal
stage: commit review
status: open
title: Idle: Make test.support.requires('gui') skip when it should.
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30909/delete_gui.diff

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



[issue18365] Idle: mock Text class and test thereof

2013-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The change worked, so this issue can be closed. I opened a new issue, #18441, 
for dealing with the problem in test_idle by moving the TclError check there, 
so it does not arise in other idle_test/test_*.py files.

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

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



[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread paul j3

Changes by paul j3 ajipa...@gmail.com:


--
nosy: +paul.j3

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



[issue18441] Idle: Make test.support.requires('gui') skip when it should.

2013-07-13 Thread Ned Deily

Ned Deily added the comment:

See Issue8716 for the history of check_tk_availability().  At the time, the Tk 
tests were the only ones trying to create real Tk objects (and thus causing 
crashes on some buildbot configurations).  With the addition of IDLE tests that 
call Tk, it probably makes sense to refactor check_tk_availability() into the 
common test test_support/support helper module so it can be used globally.

--
nosy: +ned.deily

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



[issue18442] Typo in developers.rst line 27

2013-07-13 Thread Févry Thibault

New submission from Févry Thibault:

'prush' - 'push'

--
components: Devguide
messages: 193018
nosy: ezio.melotti, iwontbecreative
priority: normal
severity: normal
status: open
title: Typo in developers.rst line 27

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



[issue18442] Typo in developers.rst line 27

2013-07-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 291c17c3d83f by Ned Deily in branch 'default':
Closes Issue #18442: fix typo (noticed by Févry Thibault).
http://hg.python.org/devguide/rev/291c17c3d83f

--
nosy: +python-dev

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



[issue18442] Typo in developers.rst line 27

2013-07-13 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue9893] Removing the Misc/Vim/ files

2013-07-13 Thread Févry Thibault

Févry Thibault added the comment:

The files weres indeed removed but Misc/Readme was not updated accordingly. The 
last line needs to be removed.

--
nosy: +iwontbecreative

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



[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Attached the unit test.

Here is the simpler script to product the bug:


import argparse
parser = argparse.ArgumentParser(prog='PROG')
parser.add_argument ('--a', metavar='a'*76)
parser.add_argument ('--b', metavar=[innerpart]outerpart)
parser.add_argument ('c', metavar='c'*76)
parser.add_argument ('d', metavar=[innerpart2]outerpart2)
args = parser.parse_args()


python thefile.py --help

--
nosy: +vajrasky
Added file: 
http://bugs.python.org/file30910/unit_test_for_inner_bracket_metavar.txt

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



[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Sorry, got typo in last unit test.

--
Added file: 
http://bugs.python.org/file30911/unit_test_for_inner_bracket_metavar.txt

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



[issue11874] argparse assertion failure with brackets in metavars

2013-07-13 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


Removed file: 
http://bugs.python.org/file30910/unit_test_for_inner_bracket_metavar.txt

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



[issue17721] Help button on preference window doesn't work

2013-07-13 Thread Todd Rovito

Todd Rovito added the comment:

This patch LGTM as well.  I think it should be committed ASAP because the 
button clearly doesn't work as it is programmed now.

--

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



[issue18443] Misc/Readme still documents TextMate

2013-07-13 Thread Févry Thibault

New submission from Févry Thibault:

changeset:   80448:901002834a68
user:Brett Cannon br...@python.org
date:Thu Nov 15 16:12:19 2012 -0500
summary: Remove the TextMate bundle.

- Misc/Readme has not been updated accordingly. The line documenting TextMate 
should be removed.

(Likewise, since it's the same kind of topic, I would like to bring attention 
to http://bugs.python.org/issue9893#msg193020 )

[Sorry, I did not know which component was appropriate to report against]

--
messages: 193024
nosy: iwontbecreative
priority: normal
severity: normal
status: open
title: Misc/Readme still documents TextMate

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



[issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive.

2013-07-13 Thread Todd Rovito

New submission from Todd Rovito:

covers point 1.1) Pressing the Home key moves the cursor before the  
prompt, which then makes the keyboard unresponsive.

This issues was fixed on Windows XP and Linux here 
http://bugs.python.org/issue3851


On Mac OS X the home key is control-A or function left arrow both have the 
same effect of moving the cursor left of prompt, which them makes the keyboard 
unresponsive.  I tested this with Python 3.4 and Python 2.7 on Mac OS X 10.8.4.

--
components: IDLE
messages: 193025
nosy: Todd.Rovito, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the 
prompt, which then makes the keyboard unresponsive.
versions: Python 2.7, Python 3.4

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



[issue13504] Meta-issue for Invent with Python IDLE feedback

2013-07-13 Thread Todd Rovito

Todd Rovito added the comment:

1.1) Pressing the Home key moves the cursor before the  prompt, which then 
makes the keyboard unresponsive. 

This issue is still broken on Mac OS X.

http://bugs.python.org/issue18444

--

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



[issue18432] sched modules queue property should return a list, not an iterator

2013-07-13 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue18432] sched modules queue property should return a list, not an iterator

2013-07-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 359002d4370d by Raymond Hettinger in branch '3.3':
Issue #18432:  Fix unintended API change in the sched module
http://hg.python.org/cpython/rev/359002d4370d

--
nosy: +python-dev

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