[issue15389] PEP 3121, 384 refactoring applied to curses module

2012-07-19 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Definitely.

--
versions: +Python 3.4 -Python 3.3

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



[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2012-07-19 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


--
versions: +Python 3.4 -Python 3.3

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



[issue15389] PEP 3121, 384 refactoring applied to curses module

2012-07-19 Thread Robin Schreiber

Changes by Robin Schreiber robin.schrei...@me.com:


--
nosy: +loewis

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



[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-19 Thread Christian Heimes

Christian Heimes li...@cheimes.de added the comment:

It looks like Stefan has fixed the issue in Python 3.3 a while ago. tobytes() 
returns the correct values with a fresh build of Python 3.3. 

$ PYTHONPATH=. /home/heimes/dev/python/py3k/python 
smc/freeimage/tests/test_image.py
test_newbuffer (__main__.TestImageNewBuffer) ... 

  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
 80  80  80 112 112 112 160 160 160 192 192 192 240 240 240
  0   0 255   0 255   0 255   0   0   0   0 255   0 255   0
255   0   0   0   0 255   0 255   0 255   0   0   0   0 255
  0 255   0 255   0   0   0   0 255   0 255   0 255   0   0
255 255   0 255   0 255   0 255 255 255 255   0 255   0 255

However it's still broken in 3.2 (also up to date hg pull).

$ PYTHONPATH=. /home/heimes/dev/python/3.2/python 
smc/freeimage/tests/test_image.py
test_newbuffer (__main__.TestImageNewBuffer) ... 

  0   0   0   0   0   0   0   0   0   0   0   0   0   0 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255  80
 80  80 112 112 112 160 160 160 192 192 192 240 240 240   0
  0 255   0 255   0 255   0   0   0   0 255   0 255   0 255
  0   0   0   0 255   0 255   0 255   0   0   0   0 255   0
255   0 255   0   0   0   0 255   0 255   0 255   0   0 255
255   0 255   0 255   0 255 255 255 255   0 255   0 255   0


Stefan, could you please port your fix to Python 3.2 and 3.3? Thanks!

--
versions: +Python 3.2

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread Antti Laine

New submission from Antti Laine antti.a.la...@iki.fi:

raw_decode on json.JSONDecoder does not handle leading whitespace. According to 
RFC 4627, section 2, whitespace can precede an object. With json.loads leading 
whitespace is handled just fine.

d = json.JSONDecoder()
d.raw_decode(' {}')
ValueError: No JSON object could be decoded

Tested with versions 2.6.7, 2.7.3, 3.1.3 and 3.2.3

--
components: Library (Lib)
messages: 165829
nosy: Antti Alien
priority: normal
severity: normal
status: open
title: JSONDecoder.raw_decode breaks on leading whitespace
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread Antti Laine

Antti Laine antti.a.la...@iki.fi added the comment:

My coworker just submitted a pull request for a possible fix to simplejson on 
github.

https://github.com/simplejson/simplejson/pull/38

--

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Please, post a patch for 2.7 and 3.2/3.3, with a test. Seems quite easy.

If you hurry, this could go in 3.3.0.

--
keywords: +easy
nosy: +jcea
stage:  - needs patch

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread Antti Laine

Antti Laine antti.a.la...@iki.fi added the comment:

Suggestion for a patch for 3.3.0. I wasn't quite sure how the testcases were 
supposed to be loaded. Sorry if I made a mess ;)

--
keywords: +patch
Added file: 
http://bugs.python.org/file26434/json-raw-decoder-fix-whitespace.diff

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



[issue15392] Create a unittest framework for IDLE

2012-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

All the tests should run from the standard test runner tool (currently 
regrtest), with the GUI tests guarded by the GUI resource, which is how it 
works for TK.  I always run the test suite with -uall before non-trivial 
commits, so I do in fact run the TK gui tests on a regular basis.  I would do 
the same with idle.  I hope there are at least a few other developers that run 
with -uall on a regular basis :)

Whether or not there is value in a separate runner is a separate question.  If 
there is value in having one to you and the other people working on idle, then 
make one.  But for those of us who touch it only occasionally, the separate 
runner is not likely to get used.  I wasn't even aware there was one for 
tkinter.

There was a push a while back suggesting that best practice would be to have 
all tests be in the 'test' subdirectory.  I moved email/test into 
test/test_email, and I prefer having it there.  On the other hand, Michael 
prefers having unittest/test, and has kept the unittest unit tests there.  So 
that part is up to you, but I encourage you to consider putting them in the 
test subdirectory, and if you want to do that I would help out with moving the 
existing tkinter tests to the 'test' dir.

And yes, either way the tests should test for the presence of idle and skip if 
idle is not available.

--
nosy: +r.david.murray

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Antti, you are changing the signature of decode() and that would be a 
compatibility problem. Can you rewrite the patch to be more compatible?

In your test, please, use a bit more complicated object than {} :-)

--

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

IMO this is not a bug, according to the current documentation it is working as 
designed.  raw_decode says it decodes a string that *starts with* a json 
document.

To my understanding, raw_decode is designed to be used when parsing a stream 
containing more than just one json document, including possibly non-json text, 
in which case it makes sense that the calling application would be responsible 
for (and want to) handle the whitespace around any such document.

I recommend closing this as invalid.  If the consensus is otherwise and a 
change is made, I think it would be an enhancement, not a bug fix.

--
nosy: +r.david.murray

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



[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

2012-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Ah, I see, you are thinking that json document includes the possibility of 
leading whitespace.  That is a reasonable interpretation...just make sure that 
we don't break backward compatibility.

--

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



[issue13907] test_pprint relies on set/dictionary repr() ordering

2012-07-19 Thread Anton Barkovsky

Anton Barkovsky swarmer...@gmail.com added the comment:

This test breaks now even in CPython. Remove it and be done with it?

--
nosy: +anton.barkovsky

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



[issue15394] memory leak in PyModule_Create2

2012-07-19 Thread Julia Lawall

New submission from Julia Lawall julia.law...@lip6.fr:

In objects/moduleobject.c, in the function PyModule_Create2, it appears that m 
should be decrefed on all of the failure paths between its allocation and the 
return from the function.

--
files: moduleobject.patch
keywords: patch
messages: 165838
nosy: jll
priority: normal
severity: normal
status: open
title: memory leak in PyModule_Create2
type: resource usage
versions: Python 3.2
Added file: http://bugs.python.org/file26435/moduleobject.patch

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



[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-19 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

In Python 3.3 memoryobject.c is a complete rewrite. Porting the fix
separately would be quite a bit of work.

PyBuffer_ToContiguous(), which causes the problem in 2.7/3.2 and is
still broken in 3.3, could be fixed by using the recursive copy_buffer() 
function from the new memoryobject.c.


I don't know if I can fix it before the 3.3 release. When are the
next 2.7/3.2 releases?

--

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



[issue15395] memory leaks in selectmodule.c

2012-07-19 Thread Julia Lawall

New submission from Julia Lawall julia.law...@lip6.fr:

In Modules/selectmodule.c, in the function seq2set, fast_seq should be decrefd 
on failure of the initialization of o.  This will make a useless call to DECREF 
on o, but XDECREF is already used, so it is safe in the NULL case.

In the same file, in the function poll_modify, key should be decrefed on all 
execution paths that lead out of the function.

--
files: selectmodule.patch
keywords: patch
messages: 165840
nosy: jll
priority: normal
severity: normal
status: open
title: memory leaks in selectmodule.c
type: resource usage
versions: Python 3.2
Added file: http://bugs.python.org/file26436/selectmodule.patch

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



[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError(Non-UTF-8 code starting with...)

2012-07-19 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Are we going to fix this before 3.3? Any objections to Victor's patch?

--

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



[issue15396] memory leak in tkinter

2012-07-19 Thread Julia Lawall

New submission from Julia Lawall julia.law...@lip6.fr:

In the file Modules/_tkinter.c, in the function PyInit__tkinter, m should be 
decrefed on the PyType_Ready error path.

--
files: tkinter.patch
keywords: patch
messages: 165842
nosy: jll
priority: normal
severity: normal
status: open
title: memory leak in tkinter
type: resource usage
versions: Python 3.2
Added file: http://bugs.python.org/file26437/tkinter.patch

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



[issue15394] memory leak in PyModule_Create2

2012-07-19 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

This looks OK to me (I don't see a way to write a test case to cover the leak). 
 I will commit later today unless I hear some objections.

--
assignee:  - meador.inge
nosy: +meador.inge
stage:  - commit review
versions: +Python 3.3

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



[issue15364] sysconfig confused by relative paths

2012-07-19 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

 I'd make get_config_var('srcdir') to be None for installed systems, 
 because the source tree is not available there.

While playing with a version of the patch which returns None for non-source 
builds, I found that distutils.support._get_xxmodule_path() depends on 
get_config_var('srcdir') always returning a string:

def _get_xxmodule_path():
srcdir = sysconfig.get_config_var('srcdir')
candidates = [
os.path.join(os.path.dirname(__file__), 'xxmodule.c'),
os.path.join(srcdir, 'Modules', 'xxmodule.c'),
os.path.join(srcdir, '..', '..', '..', 'Modules', 'xxmodule.c'),
]
for path in candidates:
if os.path.exists(path):
return path

It is easy enough to modify _get_xxmodule_path() to check for None.  But this 
does suggest that returning None might break some currently working 3rd party 
code.

--

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



[issue15397] Unbinding of methods

2012-07-19 Thread Stefan Mihaila

Changes by Stefan Mihaila mstefa...@gmail.com:


--
nosy: +alexandre.vassalotti, ncoghlan, rhettinger

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



[issue15397] Unbinding of methods

2012-07-19 Thread Stefan Mihaila

New submission from Stefan Mihaila mstefa...@gmail.com:

In order to implement pickling of instance methods, a means of separating
the object and the unbound method is necessary.

This is easily done for Python methods (f.__self__ and f.__func__),
but not all of builtins support __func__. Moreover, there currently
appears to be no good way to distinguish functions from bound methods.

As a first step in solving this issue, I have attached a patch which:
1) adds __func__ for all function types
2) adds a few new definitions in the types module (AllFunctionTypes etc.)
3) adds isanyfunction(), isanyboundfunction(), isanyunboundfunction() in
  inspect (admittedly these are bad names)
4) functools.unbind

In case applying this patch is being considered, serious review is necessary,
as I'm not knowledgeable of cpython internals.

--
components: Library (Lib)
files: func.patch
keywords: patch
messages: 165845
nosy: mstefanro
priority: normal
severity: normal
status: open
title: Unbinding of methods
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file26438/func.patch

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



[issue15397] Unbinding of methods

2012-07-19 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge
stage:  - patch review

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



[issue15397] Unbinding of methods

2012-07-19 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue15397] Unbinding of methods

2012-07-19 Thread Andrew Svetlov

Andrew Svetlov andrew.svet...@gmail.com added the comment:

Can you push patch in form available for review via Rietveld?

--

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



[issue15397] Unbinding of methods

2012-07-19 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +yselivanov

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 9e94eb39aaad by Hynek Schlawack in branch 'default':
#1492704: Make shutil.copyfile() raise a distinct SameFileError
http://hg.python.org/cpython/rev/9e94eb39aaad

--
nosy: +python-dev

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-19 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

As beta2 has been postponed I have already committed it with some slight 
modifications.

Re: deriving from Error: It doesn't make any sense to do so but this way we're 
mostly backward compatible. Changing it to EnvironmentError uncovered the two 
extra changes I added.

That said, thank you for your contribution and please fill out and send in a 
contribution form so you get a neat little star next to your name in the bug 
tracker: http://www.python.org/psf/contrib/

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

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



[issue15038] Optimize python Locks on Windows

2012-07-19 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

I see dead code here:

Py_LOCAL_INLINE(int)
PyCOND_BROADCAST(PyCOND_T *cv)
{
if (cv-waiting  0) {
return ReleaseSemaphore(cv-sem, cv-waiting, NULL) ? 0 : -1;
cv-waiting = 0;
}
return 0;
}

--
nosy: +benjamin.peterson

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Flávio Ribeiro

New submission from Flávio Ribeiro em...@flavioribeiro.com:

Found a intermittent test on UnicodeFileTests.test_rename method.

Python Version: Python 3.3.0b1
Hg commit hash: 3fbfa61634de
MacOS X version 10.6.8 

How can be reproduced:

bumblebee:~/dev/cpython[] $ for i in {1..10}; do ./python.exe  -m test 
test_pep277; done
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File /Users/flavio.barbosa/dev/cpython/Lib/test/test_pep277.py, line 172, 
in test_rename
os.rename(tmp, name)
FileNotFoundError: [Errno 2] No such file or directory: '@test_51143_tmp/8_曨曩曫'

1 test failed:
test_pep277
[103879 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File /Users/flavio.barbosa/dev/cpython/Lib/test/test_pep277.py, line 172, 
in test_rename
os.rename(tmp, name)
FileNotFoundError: [Errno 2] No such file or directory: 
'@test_51145_tmp/3_Grüß-Gott'

1 test failed:
test_pep277
[103879 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File /Users/flavio.barbosa/dev/cpython/Lib/test/test_pep277.py, line 172, 
in test_rename
os.rename(tmp, name)
FileNotFoundError: [Errno 2] No such file or directory: '@test_51147_tmp/6_にぽん'

1 test failed:
test_pep277
[103879 refs]

--
assignee: ronaldoussoren
components: Macintosh
messages: 165849
nosy: flavio.ribeiro, ronaldoussoren
priority: normal
severity: normal
status: open
title: intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X
versions: Python 3.3

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Tatiana Al-Chueyr

Tatiana Al-Chueyr tatiana.alchu...@gmail.com added the comment:

I had the same problem here, after running several times...

 $ for i in {1..10}; do ./python.exe  -m test test_pep277; done
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File /Users/tatiana/code/cpython/Lib/test/test_pep277.py, line 172, in 
test_rename
os.rename(tmp, name)
FileNotFoundError: [Errno 2] No such file or directory: '@test_6002_tmp/2_ascii'

1 test failed:
test_pep277
[1/1] test_pep277
1 test OK.
[1/1] test_pep277
1 test OK.
[1/1] test_pep277
1 test OK.
[1/1] test_pep277
1 test OK.
[1/1] test_pep277
1 test OK.
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File /Users/tatiana/code/cpython/Lib/test/test_pep277.py, line 172, in 
test_rename
os.rename(tmp, name)
FileNotFoundError: [Errno 2] No such file or directory: '@test_6033_tmp/6_にぽん'

1 test failed:
test_pep277
[1/1] test_pep277
1 test OK.
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File /Users/tatiana/code/cpython/Lib/test/test_pep277.py, line 172, in 
test_rename
os.rename(tmp, name)
FileNotFoundError: [Errno 2] No such file or directory: '@test_6041_tmp/8_曨曩曫'

1 test failed:
test_pep277
[1/1] test_pep277
1 test OK.

--
nosy: +tati_alchueyr

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



[issue15399] processName key is un-/mis-documented in 2.6 and up

2012-07-19 Thread Gunnlaugur Thor Briem

New submission from Gunnlaugur Thor Briem gunnlau...@gmail.com:

The ``processName`` format mapping key in logging formats works in versions 
2.6.*, 2.7.* and 3.1.* onwards; in 2.5 and down and in 3.0.1, ``format`` fails 
when this key is present in the format.

But in 2.6.8 docs, this mapping key is not documented:

http://docs.python.org/release/2.6.8/library/logging.html
http://docs.python.org/release/3.0.1/library/logging.html

and in 2.7.3 and 3.1.5 and 3.2.3 docs, it is documented but there is no note 
that it is new in any particular version (unlike ``funcName``, for which there 
is “Changed in version 2.5: funcName was added”):

http://docs.python.org/release/2.7.3/library/logging.html
http://docs.python.org/release/3.1.5/library/logging.html
http://docs.python.org/release/3.2.3/library/logging.html

Consistent with (what I think are the) version note conventions, these seem 
like the actions to take:

- In 2.6 docs, add processName, and insert the note “Changed in version 2.6: 
processName was added”

- In 2.7 docs, insert that same note

- In docs for 3.1 and up, insert the note “Changed in version 3.1: processName 
was added”

--
assignee: docs@python
components: Documentation
messages: 165852
nosy: docs@python, gthb
priority: normal
severity: normal
status: open
title: processName key is un-/mis-documented in 2.6 and up
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue15394] memory leak in PyModule_Create2

2012-07-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 7140d97d36fd by Meador Inge in branch '3.2':
Issue #15394: Fix ref leaks in PyModule_Create.
http://hg.python.org/cpython/rev/7140d97d36fd

New changeset 571777bf5527 by Meador Inge in branch 'default':
Issue #15394: Fix ref leaks in PyModule_Create.
http://hg.python.org/cpython/rev/571777bf5527

--
nosy: +python-dev

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



[issue15394] memory leak in PyModule_Create2

2012-07-19 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

Thanks for the patch Julia!

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

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



[issue15394] memory leak in PyModule_Create2

2012-07-19 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue15397] Unbinding of methods

2012-07-19 Thread Stefan Mihaila

Stefan Mihaila mstefa...@gmail.com added the comment:

Yes, the patch is at http://codereview.appspot.com/6425052/
The code there also contains some tests I've written for functools.unbind.

--
Added file: http://bugs.python.org/file26439/unbind_test.patch

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

By the way, you can use -F to run the test suite until it fails:

  ./python -m test -F test_pep277

--
nosy: +r.david.murray

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-19 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Did you get an exception from the release manager for this new feature?

--
nosy: +georg.brandl

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Tatiana, are you on a Mac as well?

--

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



[issue15396] memory leak in tkinter

2012-07-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset b584c58c2286 by Jesus Cea in branch '3.2':
Closes #15396: memory leak in tkinter
http://hg.python.org/cpython/rev/b584c58c2286

New changeset b2dac78db1c9 by Jesus Cea in branch 'default':
MERGE: Closes #15396: memory leak in tkinter
http://hg.python.org/cpython/rev/b2dac78db1c9

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

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



[issue15396] memory leak in tkinter

2012-07-19 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
status: open - closed
versions: +Python 3.3

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-19 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Oh my understanding was that it was pushed to 3.4 only because of the then 
imminent beta2. Georg, is it okay to keep it?

--

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



[issue15396] memory leak in tkinter

2012-07-19 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


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

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Tatiana Al-Chueyr

Tatiana Al-Chueyr tatiana.alchu...@gmail.com added the comment:

r.david.murray: yes, MacOS X 10.6.8

we managed to reproduce this in other 2 MacBook Pro 8.1.

--

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



[issue15399] processName key is un-/mis-documented in 2.6 and up

2012-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

We only update the docs for the active versions, so only 2.7, 3.2, and default 
(3.3) are going to get updated.

--
nosy: +r.david.murray, vinay.sajip
versions:  -Python 2.6, Python 3.1, Python 3.4

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



[issue15396] memory leak in tkinter

2012-07-19 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Thanks for the patch, Julia, and for submitting the contributor form. I have 
added you too to the Doc/ACKS.txt file.

I wonder how you found this...

--
nosy: +jcea
resolution: fixed - 
stage: committed/rejected - 
status: closed - open

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Hugo Lopes Tavares

Hugo Lopes Tavares hlt...@gmail.com added the comment:

I had no problems after running for a very long time (using -F). I am using Mac 
OSX 10.6.8.

--
nosy: +hltbra

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



[issue15400] int('12345L', 10) raises ValueError

2012-07-19 Thread Michael Smith

New submission from Michael Smith kojirom...@gmail.com:

The trailing 'L' in representations of long integers causes the int function to 
raise a ValueError. This is unexpected because it's reasonable to expect that 
`int` should be able to parse a number from any string when that string 
represented as a bare word would be a valid python number. The following all 
raise ValueError:

int(hex(12345L), 16)
int(oct(12345L), 8)

but not

int('12345', 10)
int(hex(12345), 16)
int(oct(12345), 8)
(and not bin() because of http://bugs.python.org/issue3186)

--
components: Interpreter Core
messages: 165862
nosy: Michael.Smith
priority: normal
severity: normal
status: open
title: int('12345L', 10) raises ValueError
type: behavior
versions: Python 2.7

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



[issue15395] memory leaks in selectmodule.c

2012-07-19 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea
versions: +Python 3.3

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



[issue15396] memory leak in tkinter

2012-07-19 Thread Julia Lawall

Julia Lawall julia.law...@lip6.fr added the comment:

On Thu, 19 Jul 2012, Jesús Cea Avión wrote:


 Jesús Cea Avión j...@jcea.es added the comment:

 Thanks for the patch, Julia, and for submitting the contributor form. I have 
 added you too to the Doc/ACKS.txt file.

 I wonder how you found this...

My PhD student Suman Saha has developed a tool that finds faults in error 
handling code by checking whether the error handling code within a 
function is self-consistent.  So if one failure branch frees x, and the 
next one does not, there is a problem, unless x was freed along the way.

A preliminary description of the work is in the following paper:

S. Saha, Julia L. Lawall, G. Muller : “Finding Resource-Release Omission 
Faults in Linux”, 6th Workshop on Programming Languages and Operating 
Systems, Cascais, Portugal (2011)

http://pagesperso-systeme.lip6.fr/Suman.Saha/src/plos11.pdf

That paper just has results for Linux, but we are working on applying it 
to other software, including python.

julia

--

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-19 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Sorry, looks like a feature to me.  Please wait for 3.4 with it.

--

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



[issue15395] memory leaks in selectmodule.c

2012-07-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset bc9b2956bb8b by Jesus Cea in branch '3.2':
Closes #15395: memory leaks in selectmodule.c
http://hg.python.org/cpython/rev/bc9b2956bb8b

New changeset 9985b4651436 by Jesus Cea in branch 'default':
MERGE: Closes #15395: memory leaks in selectmodule.c
http://hg.python.org/cpython/rev/9985b4651436

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

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



[issue13888] test_builtin failure when run after test_tk

2012-07-19 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

This is not a problem on Windows because the failing tests are skipped.

test_input_tty (test.test_builtin.BuiltinTest) ... skipped
'the pty and signal modules must be available'
test_input_tty_non_ascii (test.test_builtin.BuiltinTest) ... skipped 'the pty 
and signal modules must be available'
test_input_tty_non_ascii_unicode_errors (test.test_builtin.BuiltinTest) ... 
skipped
'the pty and signal modules must be available'

--
nosy: +terry.reedy

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



[issue15400] int('12345L', 10) raises ValueError

2012-07-19 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

This problem is real but 2.7 is open only for bugfixes (no enhancements) and 
3.x doesn't generate the l suffix anymore.

I am closing this issue as won't fix. If you think this is a mistake, please 
reopen and argument it.

--
nosy: +jcea
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-19 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Ok sorry, backing out.

--
resolution: fixed - 
stage: committed/rejected - 
status: closed - open
versions: +Python 3.4 -Python 3.3

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 3adb4ee4b794 by Hynek Schlawack in branch 'default':
#1492704: Backout and wait for 3.4
http://hg.python.org/cpython/rev/3adb4ee4b794

--

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



[issue15397] Unbinding of methods

2012-07-19 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +daniel.urban

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



[issue15397] Unbinding of methods

2012-07-19 Thread Andrew Svetlov

Andrew Svetlov andrew.svet...@gmail.com added the comment:

Looks like PyCFunction_NewEx is part of Stable API.
If I'm right you have to make stub for this one as simple trampoline to new 
PyCFunction_NewExEx implementation.

Martin, please confirm.

--
nosy: +loewis

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



[issue15397] Unbinding of methods

2012-07-19 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Andrew is right: PyCFunction_NewEx must stay, and must continue to get the same 
parameters as it currently does. This not only applies to extensions already 
built, but also to extensions that are built against the new header files: they 
still need to run under old Python releases (if they only use the stable ABI).

--

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Flávio Ribeiro

Flávio Ribeiro em...@flavioribeiro.com added the comment:

For doc purposes:

My first shot is that in my machine the os.rename isn't atomic and this could 
be generating an overhead somehow. Looking at the code, I found decisions being 
made on posixmodule.c about what `rename` function should be used:

 #ifdef HAVE_RENAMEAT
 if (dir_fd_specified)
 result = renameat(src_dir_fd, src.narrow, dst_dir_fd, dst.narrow);
 else
 #endif
 result = rename(src.narrow, dst.narrow);
 Py_END_ALLOW_THREADS
 

In my machine the second `rename` is being used.

--

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

I haven't been able to reproduce this failure on either 10.6 or 10.7 with or 
without pydebug and either at 3fbfa61634de or the now slightly more current 
tip.  What filesystem are you running the test under?  What ./configure options 
did you use?  What compiler did you use?  What environment variables are 
defined especially LANG or LC_* ones?

--
assignee: ronaldoussoren - 
nosy: +ned.deily

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

And OS X doesn't support the *at system calls so HAVE_RENAMEAT will always be 
false on OS X.  I don't recall every seeing this test fail before.

--

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



[issue15365] Traceback reporting can fail if IO cannot be imported

2012-07-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 54524897fafc by Kristján Valur Jónsson in branch 'default':
Issue #15365:  Make traceback reporting ignore any errors when printing out
http://hg.python.org/cpython/rev/54524897fafc

--
nosy: +python-dev

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I found this link:

  http://www.weirdnet.nl/apple/rename.html

in issue 8828, which sounds like it is relevant.  (I thought I remembered 
something about rename not being atomic on OS X.)  I didn't read it through, 
but maybe Apple fixed the bug.

--

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Flávio Ribeiro

Flávio Ribeiro em...@flavioribeiro.com added the comment:

Hi Ned,

I've used ./configure --with-pydebug  make -j2

$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.

$ printenv | grep LC_
$ printenv| grep LANG
LANG=en_US.UTF-8

$ mount
/dev/disk0s2 on / (hfs, local, journaled)

--

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



[issue15397] Unbinding of methods

2012-07-19 Thread Stefan Mihaila

Stefan Mihaila mstefa...@gmail.com added the comment:

Doesn't the definition I've added at the end of methodobject.c suffice? 
(http://codereview.appspot.com/6425052/patch/1/10) Or should the macro be 
removed altogether?

--

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-19 Thread Juarez Bochi

Juarez Bochi jbo...@gmail.com added the comment:

I have updated the patches since they were not applying cleanly and included a 
pure Python implementation that was missing.

It has the same issues that were mentioned on msg107402.

Do you have any suggestions? I'm planning to block the formats that are not 
allowed and raise Exceptions like suggested before:

 date.strptime('01', '%M')
...
'%M' is not valid in date format specification.

--
nosy: +Juarez.Bochi
Added file: http://bugs.python.org/file26440/issue1100942_pure.diff

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



[issue15381] Optimize BytesIO to so less reallocations when written, similarly to StringIO

2012-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Here is a preliminary version of the patch.

I don't understand the purpose of your patch. It just replaces a direct 
realloc() call with an indirect one (since _PyBytes_Resize() will call 
realloc() internally).

--

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



[issue15381] Optimize BytesIO to so less reallocations when written, similarly to StringIO

2012-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

  Here is a preliminary version of the patch.
 
 I don't understand the purpose of your patch. It just replaces a
 direct realloc() call with an indirect one (since _PyBytes_Resize()
 will call realloc() internally).

Ok, I understand. You're trying to make the getvalue() call cheaper,
right?

--

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



[issue13592] repr(regex) doesn't include actual regex

2012-07-19 Thread Hugo Lopes Tavares

Hugo Lopes Tavares hlt...@gmail.com added the comment:

Hey, I started the patch under `default` branch, and get the following working:

 import re
 re.compile(foo)
re.compile(foo, re.UNICODE)
 re.compile(foo, re.DOTALL)
re.compile(foo, re.DOTALL|re.UNICODE)
 re.compile(foo, re.DOTALL|re.MULTILINE)
re.compile(foo, re.MULTILINE|re.DOTALL|re.UNICODE)


Do you have any comments on it?

I want to adapt the patch to make it work with python 2.7 too. Do you think is 
it worthful?

The attached patch was done after commit 3fbfa61634de.

--
keywords: +patch
nosy: +hltbra
Added file: http://bugs.python.org/file26441/issue13592_add_repr_to_regex.patch

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Thanks, Flávio.  That configuration looks perfectly normal and what I use so 
that should not be an issue.

Interesting link, David.  I'm not able to reproduce that failure on 10.6.8 
using the procedure in the link but I am running 10.6.8 on a virtual machine so 
that isn't conclusive.  The author says that the problem is fixed in 10.7' so 
it's not surprising that I can't reproduce it on a non-virtual 10.7, either.  I 
guess it would be interesting to know if Flávio or Tatiana can duplicate the 
results of the blog post.  It would also be interesting to know if test_pep277 
also fails in the same environment with Python 3.2.

But, assuming the issue is OS-related, I don't see what we should do about it 
other than possibly adding a comment to the test.  Opinions?

--

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



[issue15010] unittest: _top_level_dir is incorrectly persisted between calls to different load_test methods

2012-07-19 Thread Igor Sobreira

Igor Sobreira i...@igorsobreira.com added the comment:

Hello. I've attached a patch to cleanup self._top_level_dir in the end of 
discover(). Is that the expected behavior or I'm on the wrong track?

--
keywords: +patch
nosy: +igorsobreira
Added file: http://bugs.python.org/file26442/restore_top_level_dir.patch

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



[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2012-07-19 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I think this test disabling and failure issue should get some attention.
Do the failures happen on non-Windows systems too?

With installed 3.3.0b1 on Win7, test___all__, test_tcl, test_tk, 
test_ttk_textonly, and test_ttk_guionly all run if run first (_tk and 
_ttk_guionly with -ugui). All modify os.environ, resulting in
Warning -- os.environ was modified by test_xxx
and all disable at least one of the other tests run afterward. (test___all__ 
disables but is not disabled itself.) In standard alphabetic running order, 
test___all__ 'wins'.

I would like to add test/test_idle, #15392, but I presume it currently would 
also not run after test___all__ or any of the others.

---
I patched my installation, but without the unneeded temporary (saved_values = 
self.saved_values is only an optimization for the repeated access in the loop 
that follows).
sys.modules.clear()
sys.modules.update(self.saved_modules)
del self.saved_modules

With this,
python -m test -ugui test___all__ test_tcl test_tk test_ttk_guionly 
test_ttk_textonly
runs and passes all five tests instead of two (test___all__ and 
test_ttk_textonly).

Unfortunately, it causes new failures running the entire test suite:
test_concurrent_futures (ok before)
test_decimal (ok before)
test_email (numberous failures, just one before)
I stopped at test_faulthandler, there might be more but this was enough to 
reject the patch as is. 

I decided to try the principle of doing the minimum necessary to get the tests 
to pass. I arrived at the following, which lets all five tests run and pass, at 
least when run in the given order. 

try:
del sys.modules['tkinter']
del sys.modules['tkinter._fix']
del sys.modules['tkinter.ttk']
del sys.modules['tkinter.test']
del sys.modules['tkinter.test.support']
del sys.modules['tkinter.test.runtktests']
except KeyError:
pass

The only new failure with python -m test is test_multi-processing, which 
normally does not even give a warning.

[197/368/6] test_multiprocessing
Warning -- multiprocessing.process._dangling was modified by 
test_multiprocessing
test test_multiprocessing failed -- Traceback (most recent call last):
  File C:\Programs\Python33\lib\test\test_multiprocessing.py, line 1909, in 
test_mymanager_context_prestarted
self.assertEqual(manager._process.exitcode, 0)
AssertionError: -15 != 0

This might be an unrelated, intermittant failure.

Since the exception above will trigger for nearly all tests (costly), and since 
the above does not guarantee to delete all tkinter.* modules, and since future 
tkinter tests might expand to test other subpackages and idle tests will import 
other subpackages, I tried this in __exit__.

if 'tkinter' in sys.modules:
sysmod = sys.modules
tknames = set()
for name in sysmod:
if name.startswith('tkinter'):
tknames.add(name)
for name in tknames:
del sysmod[name]

So aside from the initial test, the extra time is only used when needed. All 
five tests run and pass and there are no new failures with python -m test. 
Before:

[368/368/7] test_zlib
316 tests OK.
7 tests failed:
test_asyncore test_datetime test_distutils test_email test_ftplib
test_import test_tcl
2 tests altered the execution environment:
test___all__ test_builtin
43 tests skipped:
test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
test_codecmaps_kr test_codecmaps_tw test_crypt test_curses
test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll test_fcntl
test_fork1 test_gdb test_grp test_ioctl test_kqueue test_largefile
test_nis test_openpty test_ossaudiodev test_pipes test_poll
test_posix test_pty test_pwd test_readline test_resource
test_smtpnet test_socketserver test_syslog test_threadsignals
test_timeout test_tk test_tools test_ttk_guionly test_urllib2net
test_urllibnet test_wait3 test_wait4 test_winsound test_xmlrpc_net
test_zipfile64
5 skips unexpected on win32:
test_gdb test_readline test_tk test_tools test_ttk_guionly

After:
315 tests OK.
6 tests failed:
test_asyncore test_datetime test_distutils test_email test_ftplib
test_import
4 tests altered the execution environment:
test___all__ test_builtin test_tcl test_ttk_textonly
43 tests skipped:
test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
test_codecmaps_kr test_codecmaps_tw test_crypt test_curses
test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll test_fcntl
test_fork1 test_gdb test_grp test_ioctl test_kqueue test_largefile
test_nis test_openpty test_ossaudiodev test_pipes test_poll
test_posix test_pty test_pwd test_readline test_resource
test_smtpnet test_socketserver test_syslog test_threadsignals
test_timeout test_tk test_tools test_ttk_guionly test_urllib2net

[issue15392] Create a unittest framework for IDLE

2012-07-19 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I have not really used unittest, so I only know to blindly copy what has been 
done. Hence I need help to do better.

Do you actually get gui tests for test_tk? When I run test/test_tk from Idle 
editor, and hence as __main__, I only get non-gui tests in spite of enable_gui 
being set True. Or maybe I just did not see them. (This is actually an 
improvement over the normal failure of test_tk on Windows. See #10652)

Is tkinter/test/runtktests properly called a test runner?
test/test_tk uses it to gather the tests to run:
support.run_unittest(
*runtktests.get_tests(text=False, packages=['test_tkinter']))
It is used within the ttk tests also. As I suggested above, I do not really 
know if we really need the equivalent.

I strongly prefer idlelib/test since it will make developing **much** easier 
for me on Windows. Also, it would be part of the optional install of idlelib, 
as tkinter/test is for tkinter.

Adding test/test_idle will not be too much use until issue #10652 is resolved 
so it would actually run with -m test.

--

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



[issue13592] repr(regex) doesn't include actual regex

2012-07-19 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

Python 2.7 is the end of the Python 2 line, and it's closed except for security 
fixes.

--

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



[issue13592] repr(regex) doesn't include actual regex

2012-07-19 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

2.7 is on extended maintenance for normal bugs, but does not get new 
features/enhancements. It is too late for 3.3 also.

--
versions: +Python 3.4 -Python 3.3

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



[issue14596] struct.unpack memory leak

2012-07-19 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

I just read through all this and see three separate points be discussed:

  1. The unbounded caching behavior.
  2. A more compact representation for repeat counts.
  3. Correct __sizeof__ support for struct.

For issue (1) I think this is unfortunate, but I don't think any code changes 
are required because there is already a way to get the cached and uncached 
behavior by using the free function or a Struct object, respectively.  I do 
think adjusting the documentation is appropriate.

As a side note, we do have a private function named 'struct._clearcache' that 
is used by the regression tests.  If others really think the caching is a 
problem we could make that public.

Issues (2) and (3) are hijacking this issue IMO.  However, since they are being 
discussed...  I already implemented something like (2) when reworking the 
struct data structures for PEP 3118 in issue3132.  Hopefully I will get the PEP 
3118 patch pushed through one of these days.

I do think issue (3) should be fixed, but a separate issue should be opened for 
it.  This issue should just address the caching behavior.  Serhiy, if you open 
another issue for the __sizeof__ change, then I promise to review ASAP.

--
stage:  - patch review

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



[issue15401] Typo in inspect.getclosurevars docstring

2012-07-19 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

s/dics/dicts/

http://hg.python.org/cpython/file/default/Lib/inspect.py#l1049

--
assignee: ncoghlan
messages: 165893
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Typo in inspect.getclosurevars docstring

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



[issue15384] pkgutil importlib migration test was failing on Windows buildbots

2012-07-19 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Ah, that makes sense - since the zip file doesn't exist on buildbots, returning 
None is the correct result.

Mystery explained, thanks :)

--
resolution:  - invalid
status: open - closed
title: pkgutil.get_importer() was returning None on Windows buildbots - 
pkgutil importlib migration test was failing on Windows buildbots

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



[issue15386] Still getting two copies of importlib._bootstrap

2012-07-19 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
assignee:  - ncoghlan

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



[issue15386] Still getting two copies of importlib._bootstrap

2012-07-19 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue15400] int('12345L', 10) raises ValueError

2012-07-19 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

It could be argued that this is a bug fix for 2.7.  I find the current behavior 
odd at best since 'int' already accepts 'long' objects, but not the string 
representation of a 'long' object:

 sys.maxint
9223372036854775807
 sys.maxint + 1
9223372036854775808L
 int(sys.maxint)
9223372036854775807
 int(sys.maxint + 1)
9223372036854775808L
 int(9223372036854775807)
9223372036854775807
 int('9223372036854775807')
9223372036854775807
 int(9223372036854775808L)
9223372036854775808L
 int('9223372036854775808L')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: invalid literal for int() with base 10: '9223372036854775808L'
 long('9223372036854775808L')
9223372036854775808L
 int(1)
1
 int('1L')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: invalid literal for int() with base 10: '1L'

Let's discuss this a bit before closing it.  What do others think?

--
nosy: +meador.inge
resolution: wont fix - 
stage: committed/rejected - needs patch
status: closed - open

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



[issue15401] Typo in inspect.getclosurevars docstring

2012-07-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset abc26b51fbfc by Meador Inge in branch 'default':
Issue #15401: Fix typo in inspect.getclosurevars docstring.
http://hg.python.org/cpython/rev/abc26b51fbfc

--
nosy: +python-dev

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



[issue15401] Typo in inspect.getclosurevars docstring

2012-07-19 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

Whoops.  Nick, I missed that this was assigned to you when I committed a fix.  
Sorry about that.

--
nosy: +meador.inge
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - behavior
versions: +Python 3.3

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



[issue15381] Optimize BytesIO to so less reallocations when written, similarly to StringIO

2012-07-19 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue14201] Documented caching for shared library's __getattr__ and __getitem__ is incorrect

2012-07-19 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

The general wording and example look good;  thanks.  I reworded things a 
little.  Updated patch attached.

--
stage: needs patch - commit review
Added file: http://bugs.python.org/file26443/issue14201-v2.patch

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



[issue15401] Typo in inspect.getclosurevars docstring

2012-07-19 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

No worries - I only did that as a reminder to fix it when I got home tonight. 
It's bugs like this where I wish we had the infrastructure for Github-style 
online code editing set up :)

--

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