[issue10560] Fixes for Windows sources

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

Is this issue still valid?

--
nosy: +brian.curtin, ezio.melotti
status: open -> pending

___
Python tracker 

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



[issue6359] pyexpat.c calls trace function incorrectly for exceptions

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

The relevant changesets are 1c26eb768293 and e43126c470a7. See also #534864.

--
nosy: +Jeremy.Hylton, fdrake

___
Python tracker 

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



[issue10213] tests shouldn't fail with unset timezone

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

I tried to reproduce the issue and copied /usr/share/zoneinfo/Factory to 
/etc/localtime as suggested in msg119762.
Only 2.7 and 3.2 are affected:
>>> import time
>>> time.strftime('%Z', time.gmtime(time.time()))
'Local time zone must be set--see zic manual page'

On 3.3+ this return 'GMT':
>>> import time
>>> time.strftime('%Z', time.gmtime(time.time()))
'GMT'

The error comes from the libc strftime:

$ cat tz.c 
#include 
#include 

int main() {
int buflen;
char outbuf[256];
struct tm *buf;
time_t curtime;

time(&curtime);
buf = localtime(&curtime);
buflen = strftime(outbuf, 256, "%Z", buf);
printf("outbuf: %s\nbuflen: %d\n", outbuf, buflen);
return 0;
}
$ gcc -Wall -Wextra -O -ansi -pedantic tz.c -o tz
$ ./tz 
outbuf: Local time zone must be set--see zic manual page
buflen: 48

There are different possible solutions:
  1) we close the issue as out of date, since it's fixed in 3.3+;
  2) we fix the test on 2.7/3.2 by checking for the error message and raising a 
SkipTest;
  3) we fix the code on 2.7/3.2 by backporting the 3.3 implementation that 
returns 'GMT';
  4) we fix the code on 2.7/3.2 by checking for the error message and raising 
an exception;

--
components: +Extension Modules
nosy: +ezio.melotti
stage:  -> needs patch
versions:  -Python 3.1
Added file: http://bugs.python.org/file29168/tz.c

___
Python tracker 

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



[issue17263] crash when tp_dealloc allows other threads

2013-02-22 Thread Albert Zeyer

Albert Zeyer added the comment:

The backtrace:

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fff8a54e386 __semwait_signal + 10
1   libsystem_c.dylib   0x7fff85e30800 nanosleep + 163
2   libsystem_c.dylib   0x7fff85e30717 usleep + 54
3   testcrash_python_threadlocal.so 0x0001002ddd40 test_dealloc + 48
4   python.exe  0x0001000400a9 dict_dealloc + 153 
(dictobject.c:1010)
5   python.exe  0x0001000432d3 PyDict_DelItem + 259 
(dictobject.c:855)
6   python.exe  0x0001000d7f27 
_localdummy_destroyed + 71 (threadmodule.c:585)
7   python.exe  0x00016c61 PyObject_Call + 97 
(abstract.c:2529)
8   python.exe  0x00016e42 
PyObject_CallFunctionObjArgs + 370 (abstract.c:2761)
9   python.exe  0x00010006b2e6 
PyObject_ClearWeakRefs + 534 (weakrefobject.c:892)
10  python.exe  0x0001000d746b localdummy_dealloc + 
27 (threadmodule.c:231)
11  python.exe  0x0001000400a9 dict_dealloc + 153 
(dictobject.c:1010)
12  python.exe  0x0001000c003b PyThreadState_Clear 
+ 139 (pystate.c:240)
13  python.exe  0x0001000c02c8 
PyInterpreterState_Clear + 56 (pystate.c:104)
14  python.exe  0x0001000c1c68 Py_Finalize + 344 
(pythonrun.c:504)
15  python.exe  0x0001000d5891 Py_Main + 3041 
(main.c:665)
16  python.exe  0x00010a74 start + 52

Thread 1:
0   libsystem_kernel.dylib  0x7fff8a54e386 __semwait_signal + 10
1   libsystem_c.dylib   0x7fff85e30800 nanosleep + 163
2   libsystem_c.dylib   0x7fff85e30717 usleep + 54
3   testcrash_python_threadlocal.so 0x0001002ddd40 test_dealloc + 48
4   python.exe  0x0001000400a9 dict_dealloc + 153 
(dictobject.c:1010)
5   python.exe  0x0001000432d3 PyDict_DelItem + 259 
(dictobject.c:855)
6   python.exe  0x0001000d7f27 
_localdummy_destroyed + 71 (threadmodule.c:585)
7   python.exe  0x00016c61 PyObject_Call + 97 
(abstract.c:2529)
8   python.exe  0x00016e42 
PyObject_CallFunctionObjArgs + 370 (abstract.c:2761)
9   python.exe  0x00010006b2e6 
PyObject_ClearWeakRefs + 534 (weakrefobject.c:892)
10  python.exe  0x0001000d746b localdummy_dealloc + 
27 (threadmodule.c:231)
11  python.exe  0x0001000400a9 dict_dealloc + 153 
(dictobject.c:1010)
12  python.exe  0x0001000c003b PyThreadState_Clear 
+ 139 (pystate.c:240)
13  python.exe  0x0001000d7ec4 t_bootstrap + 372 
(threadmodule.c:643)
14  libsystem_c.dylib   0x7fff85da6742 _pthread_start + 327
15  libsystem_c.dylib   0x7fff85d93181 thread_start + 13

Thread 2:
0   libsystem_kernel.dylib  0x7fff8a54e322 __select + 10
1   time.so 0x0001002fb01b time_sleep + 139 
(timemodule.c:948)
2   python.exe  0x00010009fcfb PyEval_EvalFrameEx + 
18011 (ceval.c:4021)
3   python.exe  0x0001000a30f3 fast_function + 179 
(ceval.c:4107)
4   python.exe  0x00010009fdad PyEval_EvalFrameEx + 
18189 (ceval.c:4042)
5   python.exe  0x0001000a2fb7 PyEval_EvalCodeEx + 
2103 (ceval.c:3253)
6   python.exe  0x00010002f8cb function_call + 347 
(funcobject.c:526)
7   python.exe  0x00016c61 PyObject_Call + 97 
(abstract.c:2529)
8   python.exe  0x0001000a066a PyEval_EvalFrameEx + 
20426 (ceval.c:4334)
9   python.exe  0x0001000a30f3 fast_function + 179 
(ceval.c:4107)
10  python.exe  0x00010009fdad PyEval_EvalFrameEx + 
18189 (ceval.c:4042)
11  python.exe  0x0001000a30f3 fast_function + 179 
(ceval.c:4107)
12  python.exe  0x00010009fdad PyEval_EvalFrameEx + 
18189 (ceval.c:4042)
13  python.exe  0x0001000a2fb7 PyEval_EvalCodeEx + 
2103 (ceval.c:3253)
14  python.exe  0x00010002f8cb function_call + 347 
(funcobject.c:526)
15  python.exe  0x00016c61 PyObject_Call + 97 
(abstract.c:2529)
16  python.exe  0x000100018b07 instancemethod_call 
+ 439 (classobject.c:2603)
17  python.exe  0x00016c61 PyObject_Call + 97 
(abstract.c:2529)
18  python.exe

[issue17263] crash when tp_dealloc allows other threads

2013-02-22 Thread Albert Zeyer

Albert Zeyer added the comment:

The latest 2.7 hg still crashes.

--

___
Python tracker 

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



[issue5033] setup.py crashes if sqlite version contains 'beta'

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
stage:  -> needs patch
versions: +Python 3.3, Python 3.4 -Python 3.1

___
Python tracker 

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



[issue3232] Wrong str->bytes conversion in Lib/encodings/idna.py

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


--
type: behavior -> enhancement
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue12749] lib re cannot match non-BMP ranges (all versions, all builds)

2013-02-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 489cfa062442 by Ezio Melotti in branch '3.3':
#12749: add a test for non-BMP ranges in character classes.
http://hg.python.org/cpython/rev/489cfa062442

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

--
nosy: +python-dev

___
Python tracker 

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



[issue12749] lib re cannot match non-BMP ranges (all versions, all builds)

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

I tried bigrange.py on 3.3/3.4 and I got:
match 1 passed
match 2 passed
match 3 passed

PEP 393 probably fixed this issue.
I don't think it's worth attempting to backport this on 2.7/3.2, so I'm closing 
this issue.

--
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue5979] strptime() gives inconsistent exceptions

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


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



[issue1615] descriptor protocol bug

2013-02-22 Thread Eric Snow

Eric Snow added the comment:

The whole AttributeError gaining an attribute seems impractical, but the second 
approach still seems reasonable to me.  I've attached a rough patch to 
demonstrate.  If that looks okay, I can flesh it out.

--
keywords: +patch
Added file: http://bugs.python.org/file29167/getattr-descriptors.diff

___
Python tracker 

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



[issue17217] Fix test discovery for test_format.py on Windows

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17217] Fix test discovery for test_format.py on Windows

2013-02-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 831be7dc260a by Ezio Melotti in branch '3.2':
#17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only.
http://hg.python.org/cpython/rev/831be7dc260a

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

New changeset 562ba95dd4c9 by Ezio Melotti in branch 'default':
#17217: merge with 3.3.
http://hg.python.org/cpython/rev/562ba95dd4c9

--
nosy: +python-dev

___
Python tracker 

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



[issue17249] reap threads in test_capi

2013-02-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 041d0f68c67d by Ezio Melotti in branch '2.7':
#17249: check for the availability of the thread module.
http://hg.python.org/cpython/rev/041d0f68c67d

New changeset 01fdf24c9d75 by Ezio Melotti in branch '3.2':
#17249: check for the availability of the thread module.
http://hg.python.org/cpython/rev/01fdf24c9d75

New changeset eb9edac39751 by Ezio Melotti in branch '3.3':
#17249: null merge.
http://hg.python.org/cpython/rev/eb9edac39751

New changeset cb46ccdc226a by Ezio Melotti in branch 'default':
#17249: null merge.
http://hg.python.org/cpython/rev/cb46ccdc226a

--

___
Python tracker 

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



[issue17249] reap threads in test_capi

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the reviews!

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



[issue17249] reap threads in test_capi

2013-02-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6ca87fbea39 by Ezio Melotti in branch '2.7':
#17249: convert a test in test_capi to use unittest and reap threads.
http://hg.python.org/cpython/rev/c6ca87fbea39

New changeset 329732a1572f by Ezio Melotti in branch '3.2':
#17249: convert a test in test_capi to use unittest and reap threads.
http://hg.python.org/cpython/rev/329732a1572f

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

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

--
nosy: +python-dev

___
Python tracker 

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



[issue16123] IDLE - deprecate running without a subprocess

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Roger has submitted patches for some of the items on your list (off topic for 
this issue), especially crashes and stalls. Some still need review and commits. 
Mac tends to be the most difficult platform to get tests on.

While these would be better discussed on other issues or on idle-sig (mirrored 
on gmane), I will briefly comment on a few.

Cntl-A selects the entire window on Windows, while Home sends the cursor to the 
beginning of the line. On the current command line, it first goes after the 
prompt, and alternates before and after with repetition. This is kbk's design. 
On old command lines, it only goes before, and that is a bug to be fixed. I 
think there is an issue, but cannot find it.

I have never seen unprovoked pasting, nor an unexpected startup delay when 
running from the editor.

I cannot find 'setCanCycle' in 2.7 or 3.3 Lib/idlelib/*.py and 'deprecated' 
only appears once, in a comment. I expanded the 'setCanCycle' to the entire 
cpython repository and still did not find it, so that is a complete mystery.

--

___
Python tracker 

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



[issue16123] IDLE - deprecate running without a subprocess

2013-02-22 Thread Ramchandra Apte

Ramchandra Apte added the comment:

On 22 February 2013 22:56, Raymond Hettinger  wrote:

>
> Raymond Hettinger added the comment:
>
> The issue is usually with firewalls, security software, socket issues,
> etc.  While the root problem lies outside IDLE, often the simplest way to
> get someone up and running is to use the -n option.
>
> This is one of many annoyances that arise when teaching students Python
> using IDLE:
> * Preferences window crashing
> * Default font-size on a retina mac is tiny
> * Inability to shutoff the prominent warning messages
> * Control-A goes to the beginning of the line, past the >>> prompt.
> * On Windows, IDLE sometimes has a two second delay before it runs scripts
> * Students find that IDLE mysteriously pastes a clipboard into the
> interactive prompt unintentionally
> * It is a common complaint that IDLE hangs
> * Getting the correct Tcl/Tk setup on Macs is problematic.
> * Starting IDLE from the command line emits messages about "setCanCycle is
> deprecated"
>
> --
>
> ___
> Python tracker 
> 
> ___
>

Not experienced any of the problems on Linux.

--

___
Python tracker 

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



[issue17277] incorrect line numbers in backtrace after removing a trace function

2013-02-22 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Xavier, could you possibly provide a patch and a test?

--
nosy: +jcea

___
Python tracker 

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

Shouldn't this still work on 3.3/3.4?

In Modules/arraymodule.c:1562, in the array_tounicode function, there is:

return PyUnicode_FromUnicode((Py_UNICODE *) self->ob_item, Py_SIZE(self));

I think this should be updated to work with the PEP 393 implementation, rather 
than raising an error.

--
versions:  -Python 2.7, Python 3.2

___
Python tracker 

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



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2013-02-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue15438] document that math.pow is inappropriate for integers

2013-02-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad0712f4b3e0 by Ezio Melotti in branch '2.7':
#15438: add a note to math.pow() that suggests using **/pow() for integers.  
Patch by Mark Dickinson.
http://hg.python.org/cpython/rev/ad0712f4b3e0

New changeset 7d95a0aa6b5a by Ezio Melotti in branch '3.2':
#15438: add a note to math.pow() that suggests using **/pow() for integers.  
Patch by Mark Dickinson.
http://hg.python.org/cpython/rev/7d95a0aa6b5a

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

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

--
nosy: +python-dev

___
Python tracker 

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



[issue15438] document that math.pow is inappropriate for integers

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


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

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Arun, can you suggest a sentence to add and where to add it?

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python

___
Python tracker 

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



[issue17259] Document round half to even rule for floats

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

When I wrote my previous message, I was reading the link above and did not 
notice that it want to the old 2.7 docs. The 3.x entry is fine.

Perhaps 6.1.3.1. Format Specification Mini-Language could end with
  Rounding of floats is the same as for round().
under the box, with 'round()' linked to its entry.

>From what you said, % does half to even on my system only because that is what 
>MC VC10 does. 4.7.2. printf-style String Formatting could add "Rounding is 
>system dependent" as note 6 (currently missing!).

I removed 2.7 because is seems like a mess and mostly does not use the new 
rule. But from what you say, only round() itself is different. 
'Half-away-from-0' could be added, with a note about changing in py 3.
The note for .format would have to give the rule rather than refer to round(). 
Did I get it all right?

--

___
Python tracker 

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



[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16041] poplib: unlimited readline() from connection

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16042] smtplib: unlimited readline() from connection

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16039] imaplib: unlimited readline() from connection

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16040] nntplib: unlimited readline() from connection

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16038] ftplib: unlimited readline() from connection

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue17239] XML vulnerabilities in Python

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16037] httplib: header parsing is not delimited

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16043] xmlrpc: gzip_decode has unlimited read()

2013-02-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue17254] add thai encoding aliases to encodings.aliases

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


--
components: +Unicode
nosy: +ezio.melotti
stage:  -> needs patch
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



[issue17272] request.full_url: unexpected results on assignment

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17246] cgitb fails when frame arguments are deleted (due to inspect bug I think)

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

The bug seems to be in inspect indeed:

import inspect
def fun(x):
del x
return inspect.currentframe()

inspect.formatargvalues(*inspect.getargvalues(fun(10)))

Attached a proof-of-concept patch that replaces the missing value with 
.  If the approach is ok, the same fix might have to be applied to 
other functions and/or other types of arguments.

--
keywords: +patch
nosy: +ezio.melotti
stage:  -> patch review
type:  -> behavior
Added file: http://bugs.python.org/file29166/issue17246.diff

___
Python tracker 

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



[issue17279] Document which named built-in classes can be subclassed

2013-02-22 Thread Daniel Urban

Changes by Daniel Urban :


--
nosy: +daniel.urban

___
Python tracker 

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



[issue17137] Malfunctioning compiled code in Python 3.3 x64

2013-02-22 Thread STINNER Victor

STINNER Victor added the comment:

> Shouldn't this issue be closed now?

Correct, I forgot to close it.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17279] Document which named built-in classes can be subclassed

2013-02-22 Thread Terry J. Reedy

New submission from Terry J. Reedy:

More than once, people have noted on python-list that not all built-in classes 
can be subclassed and that there seems to be no way to find out which, other 
than to try each. (Today, Daniel Urban pointed out the CPython-specific 
'xx.__flags__ & (1 << 10)'.) If the specifics are a Python feature, rather than 
CPython specific, I think they should be given in the doc.

There is a recent issue, which I cannot find, about re-organizing the Library 
built-in functions chapter by groups. If this is done, it would be easy to add, 
in the introduction to built-in classes, a list of which of the named classes 
can or cannot be subclassed (whichever list is shorter) and note that those not 
in builtins cannot be.)

--
assignee: docs@python
components: Documentation
messages: 182703
nosy: docs@python, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Document which named built-in classes can be subclassed
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue17278] SIGSEGV in _heapqmodule.c

2013-02-22 Thread Charles-François Natali

Charles-François Natali added the comment:

The heapq C implementation is apparently not thread-safe: 
PyObject_RichCompareBool() and Py_DECREF() can lead to arbitrary python code 
being called, which can result in a context switch.

--
nosy: +neologix

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-22 Thread Richard Oudkerk

Richard Oudkerk added the comment:

> Richard, are you suggesting that we close this, or do you see an 
> actionable issue? (a plausible patch to the repository?)

I skimmed the documentation and could not see that this restriction has been 
documented.

So I think a documentation patch would be a good idea.

--

___
Python tracker 

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



[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks for the report.  Could you also provide a patch?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17212] os.path.isfile() in Python 3.3 sometimes fails

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> duplicate
status: open -> pending
superseder:  -> Malfunctioning compiled code in Python 3.3 x64

___
Python tracker 

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



[issue17259] Document round half to even rule for floats

2013-02-22 Thread Mark Dickinson

Mark Dickinson added the comment:

Bah.  Ignore me;  I don't know what I'm talking about.  Old-style formatting 
does round-half-to-even, too.

--

___
Python tracker 

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



[issue17278] SIGSEGV in _heapqmodule.c

2013-02-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Extension Modules -Library (Lib)
nosy: +rhettinger, stutzbach

___
Python tracker 

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



[issue17277] incorrect line numbers in backtrace after removing a trace function

2013-02-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +belopolsky

___
Python tracker 

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



[issue17278] SIGSEGV in _heapqmodule.c

2013-02-22 Thread maxxedev

New submission from maxxedev:

I've been getting sporadic SIGSEGV crashes in _heapqmodule.c

I have not be able to reliably reproduce it, but here is a stacktrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2d51d940 (LWP 13976)]
(gdb) where
#0  0x2b617e8a in _siftdown (heap=0xa1f2d8, startpos=0, pos=46)
at [...]/Python-2.7.2/Modules/_heapqmodule.c:67
#1  0x2b617f76 in heappush (self=, args=)
at [...]/Python-2.7.2/Modules/_heapqmodule.c:137
#2  0x0049ba34 in call_function (f=0xa565e0, throwflag=) at Python/ceval.c:4013
#3  PyEval_EvalFrameEx (f=0xa565e0, throwflag=) at 
Python/ceval.c:2666
#4  0x0049ca8d in call_function (f=0xa60f40, throwflag=) at Python/ceval.c:4099
#5  PyEval_EvalFrameEx (f=0xa60f40, throwflag=) at 
Python/ceval.c:2666
#6  0x0049ca8d in call_function (f=0xa5e210, throwflag=) at Python/ceval.c:4099
#7  PyEval_EvalFrameEx (f=0xa5e210, throwflag=) at 
Python/ceval.c:2666
#8  0x0049ca8d in call_function (f=0xa5e020, throwflag=) at Python/ceval.c:4099
#9  PyEval_EvalFrameEx (f=0xa5e020, throwflag=) at 
Python/ceval.c:2666
#10 0x0049ca8d in call_function (f=0xa5de00, throwflag=) at Python/ceval.c:4099
#11 PyEval_EvalFrameEx (f=0xa5de00, throwflag=) at 
Python/ceval.c:2666
#12 0x0049ca8d in call_function (f=0xa5dc30, throwflag=) at Python/ceval.c:4099
#13 PyEval_EvalFrameEx (f=0xa5dc30, throwflag=) at 
Python/ceval.c:2666
#14 0x0049d87b in PyEval_EvalCodeEx (co=0x896530, globals=, locals=,
args=0x99dba8, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, 
closure=0x0) at Python/ceval.c:3253
#15 0x004fbf9f in function_call (func=0x8c30c8, arg=0x99db90, kw=0x0) 
at Objects/funcobject.c:526
#16 0x0041882d in PyObject_Call (func=0x8c30c8, arg=0x99db90, kw=0x0) 
at Objects/abstract.c:2529
#17 0x0041fd3f in instancemethod_call (func=, 
arg=0x99db90, kw=0x0)
at Objects/classobject.c:2578
#18 0x0041882d in PyObject_Call (func=0x2ab7e730, 
arg=0x2aabc050, kw=0x0) at Objects/abstract.c:2529
#19 0x00494a66 in PyEval_CallObjectWithKeywords (func=0x2ab7e730, 
arg=0x2aabc050, kw=0x0)
at Python/ceval.c:3882
#20 0x004d30d2 in t_bootstrap (boot_raw=0x96d320) at 
./Modules/threadmodule.c:614
#21 0x003fa780683d in start_thread () from /lib64/libpthread.so.0
#22 0x003fa6cd503d in clone () from /lib64/libc.so.6

--
components: Library (Lib)
messages: 182698
nosy: maxxedev
priority: normal
severity: normal
status: open
title: SIGSEGV in _heapqmodule.c
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Arun, to call this a bug, you need to demonstrate a conflict between behavior 
and doc, and I do not see that you have.

Richard, are you suggesting that we close this, or do you see an actionable 
issue? (a plausible patch to the repository?)

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe the issue of reusing request objects after modification has come up 
before, either on the tracker (but I cannot find an issue) or elsewhere. 
Senthil may remember better and certainly may have an opinion. I agree that 
python-idea would be a better place for other opinions.

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

___
Python tracker 

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



[issue17218] support title and description in argparse add_mutually_exclusive_group

2013-02-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On win7, the original example and '0' version give
[(23, 0, 0, '', ('::1', 0, 0, 0)), (2, 0, 0, '', ('127.0.0.1', 0))]
I think a testcase would be good.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17233] http.client header debug output format

2013-02-22 Thread Kim Gräsman

Kim Gräsman added the comment:

Thanks for your response!

> I agree that send: and reply: should be formatted the same, 
> so the reply: line should include the headers *with* the
> values.

OK, yeah, that would avoid having to specify request/response for headers as 
well, I think.

> The current header line seems to be truncated after Date,
> without even its ':',

It doesn't look like there are any trailing colons on header names. Rather, all 
header names have a "header: " prefix. As you can see, it's pretty hard to 
parse :-)

> and it is definitely missing a newline.

Glad we agree!

> Are you claiming that there are other missing newlines?

It's not visible in the attached log, but if you add print() statements in a 
script using http.client, the output usually ends up at the end of one of 
http.client's log lines. So I think every log output is missing a newline.

> I don't understand the lines with
> send: bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00')

We're sending binary data in our HTTP body, so this is the actual content. For 
some reason, though, the fact that it's binary seems to force it onto its own 
line.

> Patches are good, but you might wait a few days
> for other comments as I am definitely not an http expert.

OK, thanks again!

--

___
Python tracker 

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



[issue17259] Document round half to even rule for floats

2013-02-22 Thread Mark Dickinson

Mark Dickinson added the comment:

Indeed, in Python 3, round and new-style string formatting both do 
round-ties-to-even, by design.  Old-style formatting does whatever the 
underlying OS does, which is typically round-half-away-from-zero.

Python 2 is a bit more of a mess:  in 2.7, new-style formatting does 
round-ties-to-even, round does round-half-away-from-zero, and old-style 
formatting continues to do whatever the OS does, just as in Python 3.  And 2.6 
is different again (and much more system dependent).

Agreed that this could be better documented for 'format'.  The documentation 
for the round function is already explicit on this, at least for Python 3.

--

___
Python tracker 

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



[issue17259] Document round half to even rule for floats

2013-02-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy:  -serhiy.storchaka

___
Python tracker 

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



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Feb 22, 2013, at 06:54 PM, Charles-François Natali wrote:

>Charles-François Natali added the comment:
>
>> Barry advised me to open this issue as it's a functional regression from
>> Python 2.
>
>But it was relying on a private and non documented feature in Python
>2, so it's not really a regression.

I also suggested it would have to be considered a new feature for 3.4.

--

___
Python tracker 

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



[issue17259] Document round half to even rule for floats

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

'%.0f' % 5.5, etc, does the same. I agree that consistent 3.x half to even is 
both correct and and in need of better doc to avoid repeated questions and 
invalid bug reports.

--
nosy: +terry.reedy
title: locale.format() rounding is not reliable for floats -> Document round 
half to even rule for floats
versions:  -Python 2.7

___
Python tracker 

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



[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2013-02-22 Thread Charles-François Natali

Charles-François Natali added the comment:

> Shouldn't you try to make the permission removal atomic?
> Otherwise there's a window of opportunity to exploit the suid bit.

Actually there's already a race even without setuid bit: 
http://bugs.python.org/issue15100

All metadat should be set atomically.

--
nosy: +neologix

___
Python tracker 

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



[issue17233] http.client header debug output format

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The doc is vague on debug output (intentionally so, I suspect).
" Any value greater than 0 will cause all currently defined debug output to be 
printed to stdout."

I agree that send: and reply: should be formatted the same, so the reply: line 
should include the headers *with* the values. The current header line seems to 
be truncated after Date, without even its ':', and it is definitely missing a 
newline. Are you claiming that there are other missing newlines? I don't 
understand the lines with
send: bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00')

Patches are good, but you might wait a few days for other comments as I am 
definitely not an http expert.

--
nosy: +terry.reedy
versions: +Python 3.3, Python 3.4 -Python 3.2

___
Python tracker 

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



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't think you want your test suite to run your atexit handlers at exit, so 
you should probably mock atexit.register instead.

--
nosy: +pitrou

___
Python tracker 

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



[issue17137] Malfunctioning compiled code in Python 3.3 x64

2013-02-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Shouldn't this issue be closed now?

--

___
Python tracker 

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



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Chris Withers

Chris Withers added the comment:

I can think of other use cases. Anyway, I'm just glad your opinion isn't the 
only one there is ;-)

--

___
Python tracker 

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



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Charles-François Natali

Charles-François Natali added the comment:

> Barry advised me to open this issue as it's a functional regression from 
> Python 2.

But it was relying on a private and non documented feature in Python
2, so it's not really a regression.

> My use case is unit testing code that registers atexit handlers and making 
> sure the right handlers are registered with the correct parameters.

IMO, complicating an API for testing purpose is a bad idea.

--

___
Python tracker 

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



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Charles-François Natali

Charles-François Natali added the comment:

Could you please give an example of why this would be a useful addition?
I can see the usage of removing a handler, but the user should know which 
handlers are registered.

--
nosy: +neologix

___
Python tracker 

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



[issue17232] Improve -O docs

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Perhaps '__debug__' need markup, but if so, I don't know how.
And I agree with Antoine.

--

___
Python tracker 

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



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Chris Withers

Chris Withers added the comment:

Barry advised me to open this issue as it's a functional regression from Python 
2.

My use case is unit testing code that registers atexit handlers and making sure 
the right handlers are registered with the correct parameters.

--

___
Python tracker 

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



[issue17232] Improve -O docs

2013-02-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Should probably be "Remove", not "Removes" (we use infinitives to describe the 
actions undertaken by a command / option / method ...).

--
nosy: +pitrou

___
Python tracker 

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



[issue17232] Improve -O docs

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree that we should document exactly what is now. Patch replaces first 
sentence with Nick's. It is against 3.4, but should be identical for all 
versions. Maciej, thanks for reminding us to finally fix this.

--
keywords: +patch
nosy: +terry.reedy
versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29165/issue17232.diff

___
Python tracker 

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



[issue17229] unable to discover preferred HTTPConnection class

2013-02-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +orsenthil
stage:  -> test needed
type:  -> enhancement
versions:  -3rd party, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.5

___
Python tracker 

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



[issue17224] can not open idle in python 2.7.3

2013-02-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +serwy, terry.reedy

___
Python tracker 

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



[issue17214] http.client.HTTPConnection.putrequest encode error

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Please give us
1. the exact Python version used. 3.2.3? or something earlier?
2. A minimal but complete example that we can run. What is 'headers'?
3. The complete traceback, not just the last two entries.
4. The result of running with the newer 3.3.0, if you possibly can. Perhaps the 
problem has already been fixed.

While line numbers have changed, even in 3.2.4 in repository, 3.2-3.4 all have

request = '%s %s %s' % (method, url, self._http_vsn_str)
# Non-ASCII characters should have been eliminated earlier
self._output(request.encode('ascii'))

Since there is nothing earlier in the function that would eliminate non-ascii, 
there must be an assumption about what happens earlier in the call chain. That 
might have already been fixed, which is why we need an example to test.

--
components: +Library (Lib) -Unicode
nosy: +orsenthil, terry.reedy
stage:  -> test needed
type:  -> behavior
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue9584] Allow curly brace expansion

2013-02-22 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



[issue17217] Fix test discovery for test_format.py on Windows

2013-02-22 Thread Zachary Ware

Zachary Ware added the comment:

Your patch is certainly much simpler and more effective than mine; consider 
mine withdrawn.  I didn't take the simple step of figuring out exactly where 
the problem was happening and was just trying to fix the issue without changing 
anything in the actual testsoops :-S

I'll raise other issues about moving replace_stdout and unittest verbosity soon.

--

___
Python tracker 

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



[issue17212] os.path.isfile() in Python 3.3 sometimes fails

2013-02-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#17137 has a patch that will be in 3.3.1, coming soon we hope. If you cannot 
build Python on Windows, please retest with the new release.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2013-02-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
stage:  -> needs patch
versions: +Python 2.7 -Python 3.5

___
Python tracker 

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



[issue16123] IDLE - deprecate running without a subprocess

2013-02-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The issue is usually with firewalls, security software, socket issues, etc.  
While the root problem lies outside IDLE, often the simplest way to get someone 
up and running is to use the -n option.

This is one of many annoyances that arise when teaching students Python using 
IDLE:
* Preferences window crashing
* Default font-size on a retina mac is tiny
* Inability to shutoff the prominent warning messages
* Control-A goes to the beginning of the line, past the >>> prompt.
* On Windows, IDLE sometimes has a two second delay before it runs scripts
* Students find that IDLE mysteriously pastes a clipboard into the interactive 
prompt unintentionally
* It is a common complaint that IDLE hangs
* Getting the correct Tcl/Tk setup on Macs is problematic.
* Starting IDLE from the command line emits messages about "setCanCycle is 
deprecated"

--

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-02-22 Thread Demian Brecht

Demian Brecht added the comment:

Yes, I realized that I had forgotten to add the "do nothing" option after 
posting but figured it was relatively obvious :)

"Python doesn't normally make things read-only just because mutating them does 
nothing useful.  Sometimes we make things read-only when mutating them does 
nasty stuff, but even then sometimes we don't."

I realize that this is a higher level question and outside of the scope of this 
particular issue (and likely belonging more in python-ideas), but doesn't this 
somewhat contradict "There should be one-- and preferably only one --obvious 
way to do it."? I'd assume that this should not only apply to sandboxed object 
implementations, but also at a higher level across /all/ objects. From your 
post, I assume inconsistency between modules, which would imply non-obvious 
ways to "do something" when moving from one module (or object) implementation 
to the next.

I'm definitely interested to hear whether or not others would find this change 
useful as I do. There /should/ be no other changes required for consistency as 
no other attributes of the Request class that don't already implement 
assignment methods (i.e. "data") are affected by side effects within __init__ 
(or anywhere else).

--

___
Python tracker 

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



[issue17249] reap threads in test_capi

2013-02-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This test was introduced in a4154dd5939a.

--
nosy: +mhammond

___
Python tracker 

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



[issue17275] io.BufferedWriter shows wrong type in argument error message

2013-02-22 Thread Manuel Jacob

Manuel Jacob added the comment:

Added a new patch including tests for the C implementations of BufferedWriter 
and BufferedRandom.

--
Added file: http://bugs.python.org/file29164/issue17275_with_test.diff

___
Python tracker 

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



[issue17277] incorrect line numbers in backtrace after removing a trace function

2013-02-22 Thread Xavier de Gaye

Changes by Xavier de Gaye :


Added file: http://bugs.python.org/file29163/generator.py

___
Python tracker 

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



[issue17277] incorrect line numbers in backtrace after removing a trace function

2013-02-22 Thread Xavier de Gaye

New submission from Xavier de Gaye:

It seems that using f_trace in the f_lineno getter PyFrame_GetLineNumber(), as
the condition to decide when tracing is active, is incorrect.
See the following two examples.

In the backtrace printed by tracer.py running with python 3.3,
the last entry should be line 12 instead of line 10:

$ python3 /tmp/tracer.py
Traceback (most recent call last):
  File "/tmp/tracer.py", line 15, in 
foo()
  File "/tmp/tracer.py", line 10, in foo
bar()
ZeroDivisionError: division by zero


This simple case does not occur with pdb, because pdb takes care of deleting
the f_trace attribute of all the frames in the call stack when removing the
trace function (see set_continue() in bdb.py). But this is not good enough when
a generator is involved as can be seen when running generator.py. In the
backtrace the last entry should be line 6 instead of line 8:

$ python3 /tmp/generator.py
> /tmp/generator.py(16)()
-> foo()
(Pdb) step
--Call--
> /tmp/generator.py(10)foo()
-> def foo():
(Pdb) step
> /tmp/generator.py(11)foo()
-> it = gen()
(Pdb) step
> /tmp/generator.py(12)foo()
-> next(it)
(Pdb) step
--Call--
> /tmp/generator.py(3)gen()
-> def gen():
(Pdb) return
--Return--
> /tmp/generator.py(8)gen()->0
-> yield i
(Pdb) step
> /tmp/generator.py(13)foo()
-> next(it)
(Pdb) continue
Traceback (most recent call last):
  File "/tmp/generator.py", line 16, in 
foo()
  File "/tmp/generator.py", line 13, in foo
next(it)
  File "/tmp/generator.py", line 8, in gen
yield i
ZeroDivisionError: division by zero


It seems that it could be possible to fix this issue by replacing the test for
f->f_trace in PyFrame_GetLineNumber, by a test for f->f_tstate->use_tracing,
and updating accordingly the f_lineno and f_trace setters.

--
components: Interpreter Core
files: tracer.py
messages: 182672
nosy: xdegaye
priority: normal
severity: normal
status: open
title: incorrect line numbers in backtrace after removing a trace function
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29162/tracer.py

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-02-22 Thread R. David Murray

R. David Murray added the comment:

One of those other options is: do nothing :)

Python doesn't normally make things read-only just because mutating them does 
nothing useful.  Sometimes we make things read-only when mutating them does 
nasty stuff, but even then sometimes we don't.

So the real question is, do others consider it a sensible and useful API change 
to make setting it do something useful, and how many other changes would be 
required to make the rest of the API consistent with that change?

We may be in python-ideas territory here, I'm not sure.

--

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-02-22 Thread Demian Brecht

Demian Brecht added the comment:

It could entirely be my lack of being Dutch that didn't make this obvious 
without reading the docs ;)

I guess there's one of three ways that this could go:

To help clarify the intention through code, either

a) Change full_url to _full_url, indicating that this should be treated as a 
private member and only expose the url through get_full_url(). This will 
obviously have the negative side effect of breaking backwards compatibility for 
anyone using full_url directly.

b) Keep the property implementation in the patch, but replace the setter with a 
read-only exception.

And the third option is what's in this patch (there are likely other options 
that I'm just not seeing at the moment as well).

Having said all that, if the mutability of full_url is made explicit, then 
safeguards should also be put in place for the rest of the attributes.


I couldn't think of any hard reason as to why the state of a Request instance 
/shouldn't/ be mutable and the user should be required to instantiate a new 
Request in order to use a new URL.

--

___
Python tracker 

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



[issue8800] add threading.RWLock

2013-02-22 Thread Vladimir Rutsky

Changes by Vladimir Rutsky :


--
nosy: +vrutsky

___
Python tracker 

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



[issue17276] HMAC: deprecate default hash

2013-02-22 Thread Christian Heimes

Christian Heimes added the comment:

PS: I don't want to deprecate HMAC-MD5. I just want to deprecate that HMAC 
defaults to HMAC-MD5.

--

___
Python tracker 

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



[issue17276] HMAC: deprecate default hash

2013-02-22 Thread Christian Heimes

Christian Heimes added the comment:

> I don't know how you intend to make `digestmod` mandatory given the current 
> function signature.

That's easy:

if digestmod is None:
raise TypeError("HMAC needs argument 'digestmod'")

--

___
Python tracker 

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



[issue17249] reap threads in test_capi

2013-02-22 Thread R. David Murray

R. David Murray added the comment:

Looks good to to me.

--

___
Python tracker 

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



[issue17276] HMAC: deprecate default hash

2013-02-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't know how you intend to make `digestmod` mandatory given the current 
function signature.

> Applications should slowly migrate away from HMAC-MD5 and use a more
> modern algorithm like HMAC-SHA256.

Applications don't always choose their cipher. MD5 is needed for compatibility 
with existing protocols such as CRAM-MD5.

--
nosy: +pitrou

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-02-22 Thread R. David Murray

R. David Murray added the comment:

Well, full_url was not designed to be assignable, and is documented that way 
(the docs say it is the URL passed to the constructor).  Whether or not it is 
reasonable to make it assignable is an interesting question.

--
nosy: +r.david.murray
type:  -> enhancement

___
Python tracker 

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



[issue17275] io.BufferedWriter shows wrong type in argument error message

2013-02-22 Thread R. David Murray

R. David Murray added the comment:

That would be great.  Use assertRaisesRegex and check that the correct name is 
in the message string.

--
nosy: +pitrou, r.david.murray
stage:  -> patch review

___
Python tracker 

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



[issue16043] xmlrpc: gzip_decode has unlimited read()

2013-02-22 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue17276] HMAC: deprecate default hash

2013-02-22 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

+1.

--
nosy: +jcea

___
Python tracker 

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



[issue17276] HMAC: deprecate default hash

2013-02-22 Thread Christian Heimes

New submission from Christian Heimes:

As of now the hash algorithm for HMAC defaults to MD5. However MD5 is 
considered broken. HMAC-MD5 is still ok but shall not be used in new code. 
Applications should slowly migrate away from HMAC-MD5 and use a more modern 
algorithm like HMAC-SHA256.

Therefore I propose that default digestmod should be deprecated in Python 3.4 
and removed in 3.5. Starting with Python 3.5 developer are forced to choose a 
hash algorithm like SHA256. Our documentation shall suggest it, too.

In addition I would like to enhance the meaning of the `digestmod` argument a 
bit. Right now it either must be a module or a callable. It should also support 
a name, e.g. hmac.new("secret", digestmod="sha256")

--
components: Library (Lib)
messages: 182662
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: HMAC: deprecate default hash
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue17275] io.BufferedWriter shows wrong type in argument error message

2013-02-22 Thread Manuel Jacob

Manuel Jacob added the comment:

The attached patch fixes the issue. Should I write a test?

--
keywords: +patch
Added file: http://bugs.python.org/file29161/issue17275.diff

___
Python tracker 

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



[issue17275] io.BufferedWriter shows wrong type in argument error message

2013-02-22 Thread Manuel Jacob

New submission from Manuel Jacob:

>>> import io
>>> io.BufferedWriter(io.BytesIO(), 1024, 1024, 1024)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: BufferedReader() takes at most 2 arguments (4 given)

It should be "BufferedWriter()" instead of "BufferedReader()".

--
messages: 182660
nosy: mjacob
priority: normal
severity: normal
status: open
title: io.BufferedWriter shows wrong type in argument error message
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-22 Thread Richard Oudkerk

Richard Oudkerk added the comment:

A pool should only be used by the process that created it (unless you use a 
managed pool).

If you are creating long lived processes then you could create a new pool on 
demand.  For example (untested)

pool_pid = (None, None)

def get_pool():
global pool_pid
if os.getpid() != pool_pid[1]:
pool_pid = (Pool(), os.getpid())
return pool_pid[0]

--

___
Python tracker 

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



[issue17274] distutils silently omits relative symlinks

2013-02-22 Thread Florian Berger

New submission from Florian Berger:

This issue is related to #12585, #15205 and #8876.

In `distutils/archive_util.py`, in `make_zipfile()`, the code

for dirpath, dirnames, filenames in os.walk(base_dir):
for name in filenames:
path = os.path.normpath(os.path.join(dirpath, name))
if os.path.isfile(path):
zip.write(path, path)
log.info("adding '%s'" % path)

will silently omit relative symlinks from the archive.

Relative symlinks (`file.dat -> ../../../real_file.dat`) will become invalid 
when copied as-is into the package directory before compressing.
`os.path.isfile(path)` will evaluate to `False` in this case.

That is a critical condition, as the file has explicitly been specified for 
inclusion, but the package author is never warned about the fact, rendering the 
distributed package defunct in worst case.

Actual behaviour: relative symlinks are silently ignored.

Expected behaviour: any file that, for whatever reason, can not be included in 
the distribution archive should be warned about.

As hinted at in #15205, this might be fixed in `distutils2` / `packaging` in 
case it always dereferences and copies files.

This issue could be fixed without breaking behaviour if no Exception is raised, 
but a warning is printed.

With `packaging` available in Python 3.3, this report also serves as 
documentation of the problem for legacy Python programmers searching the web.

Thanks for considering.

--
assignee: eric.araujo
components: Distutils
messages: 182658
nosy: eric.araujo, fberger, tarek
priority: normal
severity: normal
status: open
title: distutils silently omits relative symlinks
versions: Python 2.6, Python 3.1, 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



[issue13262] IDLE opens partially hidden

2013-02-22 Thread Ezio Melotti

Changes by Ezio Melotti :


--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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