[issue11882] test_imaplib failed on x86 ubuntu

2013-02-23 Thread Ezio Melotti

Ezio Melotti added the comment:

I tried to reproduce the issue and copied 
/usr/share/zoneinfo/posix/Asia/Calcutta to /etc/localtime as suggested in 
msg134382, but test_imaplib passes on 2.7/3.2/3.3/3.4.

I wrote a C program to test the output of mktime:
$ cat mk.c 
#include stdio.h
#include time.h

int main() {
struct tm buf;
char outbuf[80];
time_t tt;
 
buf.tm_year = 2000-1900;
buf.tm_mon = 1;
buf.tm_mday = 1;
buf.tm_hour = 5;
buf.tm_min = 30;
buf.tm_sec = 0;
buf.tm_wday = 5;
buf.tm_yday = 1;
buf.tm_isdst = 0;

tt = mktime(buf);
printf(mktime: %9.1f\n, (double)tt);
strftime(outbuf, 80, %c, buf);
printf(outbuf: %s\n, outbuf);
return 0;
}
$ gcc -Wall -Wextra -O -ansi -pedantic mk.c -o mk
$ ./mk 
mktime: 949363200.0
outbuf: Tue Feb  1 05:30:00 2000


Kasun, can you still reproduce the failure?
If so, could you try the attached C program?

--
nosy: +ezio.melotti
versions: +Python 3.4 -Python 3.1
Added file: http://bugs.python.org/file29169/mk.c

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



[issue12641] Remove -mno-cygwin from distutils

2013-02-23 Thread Dan

Dan added the comment:

Guys, this looks really bad and inconveniences a lot of users. You install the 
latest MinGW and Distutils from their default location, try using them on 
**anything that requires compilation**, and get the cryptic gcc -mno-cygwin 
error (after having to edit the obscure distutils.cfg, of course).

Aren't Python / distutils supposed to be cross-platform? It's already hard 
enough to find distutils / pip setup instructions for Windows, shouldn't they 
at least **work**? After removing -mno-cygwin from cygwincompiler.py, I get 
another obscure -mdll error. This is ridiculous.

If you can't agree on a patch that detects both new and old compilers, can't 
you split cygwincompiler.py into several versions, or somehow provide separate 
mingw32-old and mingw32-new options?

--
nosy: +danmbox

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
___
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-23 Thread Eric V. Smith

Eric V. Smith added the comment:

I've just looked through the code for 2.7. It uses short float repr for both 
%-formatting and for float.__format__. So they both use Gay's code, and both 
should work the same as they do in 3.2+. In all cases, round-half-to-even is 
used.

It's 2.6 that uses the C library to do float formatting (for both %-formatting 
and float.__format__).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17259
___
___
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-23 Thread Dirkjan Ochtman

Dirkjan Ochtman added the comment:

I guess option 3 would be the best (in that people get more usable libraries). 
Option 2 seems okay as well. I don't much like 1 or 4.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10213
___
___
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-23 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 for Remove instead of Removes

For the online docs, :const:`__debug__` should work (resolving to 
http://docs.python.org/3/library/constants.html#__debug__, which is currently 
described using some slightly brain-bending phrasing)

We should also tweak the output of python -h (the help string is in 
./Modules/main.c)

--

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-23 Thread Michele Orrù

Changes by Michele Orrù maker...@gmail.com:


--
nosy: +maker

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17267
___
___
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-23 Thread Charles-François Natali

Charles-François Natali added the comment:

Alright, here's what's going on.
When the main thread exits, it triggers the interpreter shutdown, which clears 
all the tstates in PyInterpreterState_Clear():

void
PyInterpreterState_Clear(PyInterpreterState *interp)
{
PyThreadState *p;
HEAD_LOCK();
for (p = interp-tstate_head; p != NULL; p = p-next)
PyThreadState_Clear(p);


PyThreadState_Clear() clears the TLS dict:

void
PyThreadState_Clear(PyThreadState *tstate)
{
if (Py_VerboseFlag  tstate-frame != NULL)
fprintf(stderr,
  PyThreadState_Clear: warning: thread still has a frame\n);

Py_CLEAR(tstate-frame);

Py_CLEAR(tstate-dict);


This deallocation of the TLS dict But when the TLS object is deallocated, if it 
releases the GIL, this can make other threads runnable, while the interpreter 
is shutting down (and the tstate are in an unusable state), so all  bets are 
off. Note that this can only happen if there are daemon threads, which is the 
case in your testcase.

Basically, the problem is that arbitrary code can be run while the interpreter 
is shutting down because of the TLS deallocation.

I'm not sure about how to handle it, but one possibility to limit such problems 
would be to not deallocate the tstate if a thread is currently still active:


diff --git a/Python/pystate.c b/Python/pystate.c
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -230,9 +230,12 @@
 void
 PyThreadState_Clear(PyThreadState *tstate)
 {
-if (Py_VerboseFlag  tstate-frame != NULL)
-fprintf(stderr,
-  PyThreadState_Clear: warning: thread still has a frame\n);
+if (tstate-frame != NULL) {
+if (Py_VerboseFlag)
+fprintf(stderr,
+PyThreadState_Clear: warning: thread still has a 
frame\n);
+return;
+}
 
 Py_CLEAR(tstate-frame);
 


But this would leak to memory leak in some cases...

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17263
___
___
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-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Albert, this happens because daemon threads continue running during interpreter 
shutdown. I suppose the problem goes away if you make the thread non-daemonic?

This shouldn't be a problem in Python 3 where Python threads cannot switch 
during shutdown.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17263
___
___
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-23 Thread Charles-François Natali

Charles-François Natali added the comment:

 This shouldn't be a problem in Python 3 where Python threads cannot switch
 during shutdown.

What happens if the GIL is relased during shutdown?

Also, I'm a bit worried about this code:

void
PyThreadState_Clear(PyThreadState *tstate)
{
if (Py_VerboseFlag  tstate-frame != NULL)
fprintf(stderr,
  PyThreadState_Clear: warning: thread still has a frame\n);

Py_CLEAR(tstate-frame);

Py_CLEAR(tstate-dict);


The TLS dict is deallocated after having cleared the frame, which
could lead to surprises, no?

--

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



[issue10560] Fixes for Windows sources

2013-02-23 Thread Carlo Bramini

Carlo Bramini added the comment:

I have downloaded the latest sources with HG and, with the only exception of 
the variable cookie now conditionally declared with an #ifdef HAVE_SXS, 
yes, all these fixes are still actual.

--
status: pending - open

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



[issue10886] Unhelpful backtrace for multiprocessing.Queue

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

Charles-François Natali added the comment:

I'm closing, since issue #17025 proposes to do this as part of performance 
optimization.

--
nosy: +neologix
status: open - closed
superseder:  - reduce multiprocessing.Queue contention

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10886
___
___
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-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 What happens if the GIL is relased during shutdown?

In PyEval_RestoreThread(), any thread other than the main thread trying to take 
the GIL will immediately exit:

take_gil(tstate);
if (_Py_Finalizing  tstate != _Py_Finalizing) {
drop_gil(tstate);
PyThread_exit_thread();
assert(0);  /* unreachable */
}

 The TLS dict is deallocated after having cleared the frame, which
 could lead to surprises, no?

I don't know. Can you think of a situation where there is a problem?

--

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



[issue10560] Fixes for Windows sources

2013-02-23 Thread Roumen Petrov

Roumen Petrov added the comment:

yes

--

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



[issue12641] Remove -mno-cygwin from distutils

2013-02-23 Thread Roumen Petrov

Roumen Petrov added the comment:

 Dan added the comment:

 Guys, this looks really bad and inconveniences a lot of users. You install 
 the latest MinGW and Distutils from their default location, try using them on 
 **anything that requires compilation**, and get the cryptic gcc -mno-cygwin 
 error (after having to edit the obscure distutils.cfg, of course).

 Aren't Python / distutils supposed to be cross-platform? It's already hard 
 enough to find distutils / pip setup instructions for Windows, shouldn't they 
 at least **work**? After removing -mno-cygwin from cygwincompiler.py, I get 
 another obscure -mdll error. This is ridiculous.
Yes . This is reason to pack many changes in one archive 
issue12641-modernize_cygwinmingw_compilers.tar.gz 
http://bugs.python.org/file29030/issue12641-modernize_cygwin%26mingw_compilers.tar.gz,
 
i.e. to remove all checks for tools used in previous millеnium.

My oldest compilers are :
a)
i386-mingw32msvc-gcc (GCC) 3.4.5 (mingw special)
Copyright (C) 2004 Free Software Foundation, Inc.
b)
gcc.exe (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.

Check for -m{no-}cygwin flags is optional. I can not found reason this 
patch to be applied, as with implementation of compiler customization 
this is for developer guide.

Roumen

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
___
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-23 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5033
___
___
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-23 Thread Eli Bendersky

Eli Bendersky added the comment:

+1, I've been bothered by this description of optimization for a long time. 

Terry's patch LGTM

--
nosy: +eli.bendersky

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



[issue17280] path.basename and ntpath.basename functions returns an incorrect file name in Windows 7

2013-02-23 Thread Alex

New submission from Alex:

1. I created file (C:\Users\Alkor\Desktop\a3434.raw) on my desktop 
2. Tried to get the file name from the absolute path

Actual result:
C:\Users\Alkorpython
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on 
win32
Type help, copyright, credits or license for more information.
 import os
 print os.path.basename (C:\Users\Alkor\Desktop\a3434.raw)
Desktop3434.raw

The same for ntpath module:
 import ntpath
 print ntpath.basename (C:\Users\Alkor\Desktop\a3434.raw)
Desktop3434.raw

Expected result:
a3434.raw

Environment:
Windows 7 x64 SP1 Ultimate
python 2.7.3150 (64-bit)

--
components: Windows
messages: 182739
nosy: Ternovoy, brian.curtin, loewis, tim.golden
priority: normal
severity: normal
status: open
title: path.basename and ntpath.basename functions returns an incorrect file 
name in Windows 7
type: behavior
versions: Python 2.7

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



[issue17280] path.basename and ntpath.basename functions returns an incorrect file name in Windows 7

2013-02-23 Thread STINNER Victor

STINNER Victor added the comment:

 print os.path.basename (C:\Users\Alkor\Desktop\a3434.raw)

Ah, it's a common trap of the Python syntax (and PHP, and C, and ... 
languages). \ is a special character, you have to escape it: \\.

C:\\Users\\Alkor\\Desktop\\a3434.raw

or simply use the raw string syntax:

rC:\Users\Alkor\Desktop\a3434.raw

--
nosy: +haypo
resolution:  - invalid

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



[issue10560] Fixes for Windows sources

2013-02-23 Thread STINNER Victor

STINNER Victor added the comment:

-HINSTANCE hKernel32 = GetModuleHandleW(Lkernel32.dll);
+HINSTANCE hKernel32 = GetModuleHandle(TEXT(KERNEL32));

I prefer to be explicit and force the usage of the wide character API, 
espacially in Python 3.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10560
___
___
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-23 Thread Maciej Fijalkowski

Maciej Fijalkowski added the comment:

Also IMO -OO should stop talking about optimizations. Maybe Do what -O does 
and discard docstrings?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17232
___
___
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-23 Thread Ramchandra Apte

Ramchandra Apte added the comment:

+1000

--
nosy: +Ramchandra Apte

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2704
___
___
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-23 Thread Mark Dickinson

Mark Dickinson added the comment:

Thanks, Ezio;  I didn't get around to dealing with this as quickly as I meant 
to.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15438
___
___
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-23 Thread Albert Zeyer

Albert Zeyer added the comment:

Note that in my original application where I encountered this (with sqlite), 
the backtrace looks slightly different. It is at shutdown, but not at 
interpreter shutdown - the main thread is still running.

https://github.com/albertz/music-player/issues/23

I was trying to reproduce it in a similar way with this test case but in the 
test case, so far I could only reproduce the crash when it does the interpreter 
shutdown.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17263
___
___
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-23 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The patch (on the default branch) reverts one of the changes made in r72488 to
introduce the new PyFrame_GetLineNumber() function (issue 5954): tb_lineno is
now back again the result of the call to PyCode_Addr2Line() instead of the
call to PyFrame_GetLineNumber().

The other changes made by r72488 in _warnings.c and ceval.c should also
probably be reverted as well.

The patch updates bdb set_continue() for consistency.

The patch adds a test to test_sys_settrace.

--
keywords: +patch
Added file: http://bugs.python.org/file29170/backtrace_lno.patch

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



[issue17281] Broken links at pypi

2013-02-23 Thread Kevin Lyda

New submission from Kevin Lyda:

The pypi entry for distutils2 has a comical set of broken links (docs and 
contributing): https://pypi.python.org/pypi/Distutils2

The following two paragraphs have broken links. Adding a link checker to your 
browser isn't the worst idea.

The Distutils2 codebase is a fork of Distutils. It is not backward compatible 
with Distutils and does not depend on it. It provides more features and 
implements new packaging standards. In Python 3.3, Distutils2 is included in 
the standard library under the module name packaging. Documentation is 
provided at http://docs.python.org/dev/packaging 404 --for ease of maintenance, 
it is not duplicated in this repository. You can use the Packaging 
documentation to use Distutils2; only the package name is different (packaging 
vs. distutils2), all modules, classes and functions have the same name.

If you want to contribute, please have a look at DEVNOTES.txt or 
http://wiki.python.org/Distutils2/Contributing 404 .

--
assignee: eric.araujo
components: Distutils2
messages: 182747
nosy: alexis, eric.araujo, lyda, tarek
priority: normal
severity: normal
status: open
title: Broken links at pypi
type: behavior
versions: 3rd party, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17281
___
___
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-23 Thread Andreas Pelme

Andreas Pelme added the comment:

This bug still exists in 2.7 and 3.4.

If SQLITE_VERSION in sqlite3.h (/usr/include/sqlite3.h on Mac OS) ends with 
beta, such as
 
#define SQLITE_VERSION3.7.12beta

make will fail.

The regex changed suggested above fixes this. The attached patch contains that 
fix and makes the build work.

--
keywords: +patch
nosy: +Andreas.Pelme
Added file: http://bugs.python.org/file29171/issue5033.patch

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



[issue16695] Clarify fnmatch glob docs about the handling of leading .s

2013-02-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

I modified the docstring for the glob and iglob to note that the match does not 
work exactly like fnmatch.

Should this be extended to the documentation too?

--
keywords: +patch
nosy: +nailor
Added file: http://bugs.python.org/file29172/issue16695.patch

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



[issue17280] path.basename and ntpath.basename functions returns an incorrect file name in Windows 7

2013-02-23 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


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

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



[issue900112] cgi.fieldStorage doesn't grok standards env. variables

2013-02-23 Thread Andreas Åkerlund

Andreas Åkerlund added the comment:

Submited a patch against 2.7 that adds all environment variables starting with 
HTTP_, strips of the prefix and converts it to lower case. Also added a small 
test case.

--
keywords: +patch
nosy: +thezulk
Added file: http://bugs.python.org/file29173/issue900112.diff

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



[issue16403] update distutils docs to say that maintainer replaces author

2013-02-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

Added a patch with documentation change

--
keywords: +patch
nosy: +nailor
Added file: http://bugs.python.org/file29174/issue16403.patch

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



[issue15305] Test harness unnecessarily disambiguating twice

2013-02-23 Thread Geoff Wilson

Geoff Wilson added the comment:

Simplify to single build/test directory, and disambiguate by TEMPFN.

Test suite run on Mac OS X (./python.exe -m test -j3) without error. Some files 
created by tests do not use TESTFN, so may have build bots identify issues.

--
keywords: +patch
nosy: +gmwils
Added file: http://bugs.python.org/file29175/Issue15305.diff

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



[issue16695] Clarify fnmatch glob docs about the handling of leading .s

2013-02-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

Added documentation changes to the glob documentation too, not only docstring.

--
Added file: http://bugs.python.org/file29176/issue16695_2.patch

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



[issue16801] Preserve original representation for integers / floats in docstrings

2013-02-23 Thread R. David Murray

R. David Murray added the comment:

Note: Nick Coghlan's idea of having Named Value support in Python just came up 
again on python-dev, and this would be a perfect application for it (pretty 
much exactly Terry's proposal in msg178542).

--

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



[issue17117] Update importlib.util.module_for_loader/set_loader to set when __loader__ = None

2013-02-23 Thread Gökçen Eraslan

Gökçen Eraslan added the comment:

The patch is attached. Is it correct?

--
keywords: +patch
nosy: +Gökçen.Eraslan
Added file: http://bugs.python.org/file29177/python-issue-17117.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17117
___
___
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-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b177aea9ddd by Petri Lehtinen in branch '2.7':
Issue #5033: Fix building of the sqlite3 extension module
http://hg.python.org/cpython/rev/8b177aea9ddd

New changeset 73d5dd480558 by Petri Lehtinen in branch '3.2':
Issue #5033: Fix building of the sqlite3 extension module
http://hg.python.org/cpython/rev/73d5dd480558

New changeset c613eb716c8e by Petri Lehtinen in branch '3.3':
Issue #5033: Fix building of the sqlite3 extension module
http://hg.python.org/cpython/rev/c613eb716c8e

New changeset 19b3aaf79e45 by Petri Lehtinen in branch 'default':
Issue #5033: Fix building of the sqlite3 extension module
http://hg.python.org/cpython/rev/19b3aaf79e45

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5033
___
___
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-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Applied, thanks!

--
nosy: +petri.lehtinen
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue16801] Preserve original representation for integers / floats in docstrings

2013-02-23 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue1375011] Improper handling of duplicate cookies

2013-02-23 Thread Martin Melin

Martin Melin added the comment:

Attached is a patch with Viraj's original fix except using a set instead of a 
dict as suggested by Björn. This patch also includes a test case and a note in 
the docs about this behavior.

Since Cookie has been moved and the code has been cleaned up somewhat between 
2.7 and 3.2 I'm attaching patches for both branches.

Of course, a decision still needs to be made whether or not this should be 
applied; the behavior is more correct now, but I don't know if it is worth 
potentially breaking applications that have come to expect the old behavior. 
There doesn't seem to be a consensus in #1372650 but I thought having a 
complete patch would be a good thing regardless.

--
nosy: +mmelin
Added file: http://bugs.python.org/file29178/issue1375011-2.7.patch

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



[issue1375011] Improper handling of duplicate cookies

2013-02-23 Thread Martin Melin

Martin Melin added the comment:

Just adding the 3.2 patch

--
Added file: http://bugs.python.org/file29179/issue1375011-3.2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1375011
___
___
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-23 Thread Charles-François Natali

Charles-François Natali added the comment:

 Note that in my original application where I encountered this (with sqlite), 
 the backtrace looks slightly different. It is at shutdown, but not at 
 interpreter shutdown - the main thread is still running.

Could you post a traceback of this crash?

--

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



[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-23 Thread Björn Skoglund

Björn Skoglund added the comment:

Hello, first patch, be kind.

I opted for option 2 so there is top keywords filename_ and sort_ filtered out 
before calling func.

The test in test_profile seems to call runctx but runcall and run are never 
tested. Not sure if this is missing or intended.

--
keywords: +patch
nosy: +bjorns
Added file: http://bugs.python.org/file29180/issue17130.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17130
___
___
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-23 Thread Albert Zeyer

Albert Zeyer added the comment:

Here is one. Others are in the issue report on GitHub.

In Thread 5, the PyObject_SetAttr is where some attribute containing a 
threading.local object is set to None. This threading.local object had a 
reference to a sqlite connection object (in some TLS contextes). This should 
also be the actual crashing thread. I use faulthandler which makes it look like 
Thread 0 crashed in the crash reporter.

I had this crash about 5% of the time - but totally unpredictable. But it was 
always happening in exactly that line where the attribute was set to None.


Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fff8a54e0fa __psynch_cvwait + 10
1   libsystem_c.dylib   0x7fff85daaf89 _pthread_cond_wait + 869
2   org.python.python   0x00010006f54e PyThread_acquire_lock + 
96
3   org.python.python   0x00010001d8e3 PyEval_RestoreThread + 61
4   org.python.python   0x000100075bf3 0x19000 + 445427
5   org.python.python   0x000100020041 PyEval_EvalFrameEx + 7548
6   org.python.python   0x00010001e281 PyEval_EvalCodeEx + 1956
7   org.python.python   0x000100024661 0x19000 + 112225
8   org.python.python   0x0001000200d2 PyEval_EvalFrameEx + 7693
9   org.python.python   0x00010001e281 PyEval_EvalCodeEx + 1956
10  org.python.python   0x000100024661 0x19000 + 112225
11  org.python.python   0x0001000200d2 PyEval_EvalFrameEx + 7693
12  org.python.python   0x00010001e281 PyEval_EvalCodeEx + 1956
13  org.python.python   0x00010005df78 0x19000 + 348024
14  org.python.python   0x00010001caba PyObject_Call + 97
15  _objc.so0x000104615898 0x10460 + 88216
16  libffi.dylib0x7fff8236e8a6 ffi_closure_unix64_inner 
+ 508
17  libffi.dylib0x7fff8236df66 ffi_closure_unix64 + 70
18  com.apple.AppKit0x7fff84f63f3f -[NSApplication 
_docController:shouldTerminate:] + 75
19  com.apple.AppKit0x7fff84f63e4e 
__91-[NSDocumentController(NSInternal) 
_closeAllDocumentsWithDelegate:shouldTerminateSelector:]_block_invoke_0 + 159
20  com.apple.AppKit0x7fff84f63cea 
-[NSDocumentController(NSInternal) 
_closeAllDocumentsWithDelegate:shouldTerminateSelector:] + 1557
21  com.apple.AppKit0x7fff84f636ae 
-[NSDocumentController(NSInternal) 
__closeAllDocumentsWithDelegate:shouldTerminateSelector:] + 265
22  com.apple.AppKit0x7fff84f6357f -[NSApplication 
_shouldTerminate] + 772
23  com.apple.AppKit0x7fff84f9134f 
-[NSApplication(NSAppleEventHandling) _handleAEQuit] + 403
24  com.apple.AppKit0x7fff84d40261 
-[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 660
25  com.apple.Foundation0x7fff867e112b -[NSAppleEventManager 
dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 308
26  com.apple.Foundation0x7fff867e0f8d 
_NSAppleEventManagerGenericHandler + 106
27  com.apple.AE0x7fff832eeb48 
aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 307
28  com.apple.AE0x7fff832ee9a9 
dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 37
29  com.apple.AE0x7fff832ee869 aeProcessAppleEvent + 318
30  com.apple.HIToolbox 0x7fff8e19f8e9 AEProcessAppleEvent + 100
31  com.apple.AppKit0x7fff84d3c916 _DPSNextEvent + 1456
32  com.apple.AppKit0x7fff84d3bed2 -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
33  com.apple.AppKit0x7fff84d33283 -[NSApplication run] + 
517
34  libffi.dylib0x7fff8236dde4 ffi_call_unix64 + 76
35  libffi.dylib0x7fff8236e619 ffi_call + 853
36  _objc.so0x00010461a663 PyObjCFFI_Caller + 1980
37  _objc.so0x00010462f43e 0x10460 + 193598
38  org.python.python   0x00010001caba PyObject_Call + 97
39  org.python.python   0x000100020225 PyEval_EvalFrameEx + 8032
40  org.python.python   0x0001000245eb 0x19000 + 112107
41  org.python.python   0x0001000200d2 PyEval_EvalFrameEx + 7693
42  org.python.python   0x00010001e281 PyEval_EvalCodeEx + 1956
43  org.python.python   0x00010001dad7 PyEval_EvalCode + 54
44  org.python.python   0x000100054933 0x19000 + 309555
45  org.python.python   0x0001000549ff PyRun_FileExFlags + 165
46  org.python.python   0x0001000543e9 PyRun_SimpleFileExFlags 
+ 410
47  albertzeyer.MusicPlayer 

[issue8489] Support UTF8SMTP as part of RFC 5336 in smptlib

2013-02-23 Thread Hugo Hallman

Hugo Hallman added the comment:

Can not reproduce the problem in 2.7
Attaching a patch with test cases proving that the problem is solved.
Patch based on current tip 2.7.

--
keywords: +patch
nosy: +hhallman
Added file: http://bugs.python.org/file29181/issue8489.patch

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



[issue7504] Same name cookies

2013-02-23 Thread Martin Melin

Martin Melin added the comment:

FYI, this looks like the same issue as #1375011

--
nosy: +mmelin

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7504
___
___
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-23 Thread Charles-François Natali

Charles-François Natali added the comment:

 Here is one. Others are in the issue report on GitHub.

Yes, I've seen it, but I'd need a backtrace with line numbers (like
the one you posted above).
thread 5 is crashing, but I don't know where.

--

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-23 Thread Devin Cook

Devin Cook added the comment:

Should now be compliant with this part of the spec:

Each header_value must not include any control characters, including carriage 
returns or linefeeds, either embedded or at the end. (These requirements are to 
minimize the complexity of any parsing that must be performed by servers, 
gateways, and intermediate response processors that need to inspect or modify 
response headers.)

--
keywords: +patch
nosy: +devin
Added file: http://bugs.python.org/file29182/header_newlines.patch

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



[issue17176] Document imp.NullImporter is NOT used anymore by import

2013-02-23 Thread Andreas Pelme

Andreas Pelme added the comment:

This seems like an oversight from

http://bugs.python.org/issue15473

The release notes for 3.3 added a note about this:
Because None is now inserted into sys.path_importer_cache, if you are clearing 
out entries in the dictionary of paths that do not have a finder, you will need 
to remove keys paired with values of None and imp.NullImporter to be 
backwards-compatible. This will lead to extra overhead on older versions of 
Python that re-insert None into sys.path_importer_cache where it repesents the 
use of implicit finders, but semantically it should not change anything.

But the relevant docs for NullImporter 
(http://docs.python.org/2/library/imp.html#imp.NullImporter) and 
sys.path_importer_cache 
(http://docs.python.org/2/library/sys.html#sys.path_importer_cache) did not get 
updated.

We have verified that the release notes in 3.4 is correct, and NullImporter is 
never used.

We are however not sure about the correct wording for the documentation fix.

--
nosy: +Andreas.Pelme

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



[issue8890] Use tempfile instead of /tmp in examples

2013-02-23 Thread Geoff Wilson

Geoff Wilson added the comment:

Patch for 2.7, with most references to /tmp removed or replaced.

References remain in Doc/install/index.rst and Doc/library/rexec.rst as they 
seem to make sense in context.

--
nosy: +gmwils
Added file: http://bugs.python.org/file29183/Issue8890.patch

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-02-23 Thread Henrik Heimbuerger

Henrik Heimbuerger added the comment:

Attached patch file for the 2.7 branch. They not only touch find(), but also 
findtext(), which has the mistake in the documentation. Also does some related 
changes in the module's code comments.

--
keywords: +patch
nosy: +hheimbuerger
Added file: http://bugs.python.org/file29184/issue11367_branch27.diff

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-02-23 Thread Henrik Heimbuerger

Henrik Heimbuerger added the comment:

Almost identical patch for 3.2, just differs in line numbers.

--
Added file: http://bugs.python.org/file29185/issue11367_branch32.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11367
___
___
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-23 Thread Albert Zeyer

Albert Zeyer added the comment:

Sadly, that is quite complicated or almost impossible. It needs the MacOSX 
system Python and that one lacks debugging information.

I just tried with the CPython vom hg-2.7. But it seems the official Python 
doesn't have objc bindings (and I also need Cocoa bindings) so I can't easily 
run this right now (and another GUI is not yet implemented).

--

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



[issue8489] Support UTF8SMTP as part of RFC 5336 in smptlib

2013-02-23 Thread R. David Murray

R. David Murray added the comment:

Well, this issue changed into a feature request for UTF8SMTP support, which I 
do intend to implement at some point.  

It does indeed appear like the original problem (not converting unicode strings 
into ASCII) was fixed in 2.7 at some point, though, which is good news, thanks.

--

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



[issue17116] xml.parsers.expat.(errors|model) don't set the __loader__ attribute

2013-02-23 Thread Gökçen Eraslan

Gökçen Eraslan added the comment:

Should this be done in Modules/pyexpat.c file or in Lib/xml/parsers/expat.py? 
If modifying expat.py is sufficient, then attached simple patch does the job. 
By the way I couldn't find the test you are referring to. Is it in 
Lib/test/test_importlib of somewhere else?

--
keywords: +patch
nosy: +gkcn
Added file: http://bugs.python.org/file29186/python-issue-17116.diff

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



[issue13952] mimetypes doesn't recognize .csv

2013-02-23 Thread Geoff Wilson

Geoff Wilson added the comment:

Patch against 2.7 to add csv to the internal list. It is popular enough as a 
format, that it should work even if the system mime files are stale.

--
keywords: +patch
nosy: +gmwils
Added file: http://bugs.python.org/file29187/issue13952.patch

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



[issue15305] Test harness unnecessarily disambiguating twice

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Looks good to me, and all tests also pass on my Ubuntu 12.10.

Chris: Would you be willing to commit this and watch the buildbots do their 
job? Or do the buildbots even use the -j option?

--
nosy: +petri.lehtinen

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



[issue17115] __loader__ = None should be fine

2013-02-23 Thread Gökcen Eraslan

Changes by Gökcen Eraslan gokcen.eras...@gmail.com:


--
nosy: +gkcn

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



[issue17099] Raise ValueError when __loader__ not defined for importlib.find_loader()

2013-02-23 Thread Gökcen Eraslan

Changes by Gökcen Eraslan gokcen.eras...@gmail.com:


--
nosy: +gkcn

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



[issue14720] sqlite3 microseconds

2013-02-23 Thread Lowe Thiderman

Lowe Thiderman added the comment:

 Can convert_timestamp(val) be implemented as 
 datetime.datetime.strptime(val.decode(), '%Y-%m-%d %H:%M:%S.%f')?

No. The microseconds are not always included, as can be seen by the current 
implementation. Nice idea though!

--
nosy: +thiderman

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



[issue14720] sqlite3 microseconds

2013-02-23 Thread Lowe Thiderman

Lowe Thiderman added the comment:

Add patch for 2.7 branch with regression test.

--
keywords: +patch
Added file: http://bugs.python.org/file29188/issue14720.diff

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



[issue11063] uuid.py module import has heavy side effects

2013-02-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

The implementation does not actually end up in infinite loop, just repeating 
the loading of the CDLL is slow.

I added caching to that and fixed the ctypes imports too.

--
nosy: +nailor
Added file: http://bugs.python.org/file29189/issue11063_2.patch

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



[issue8890] Use tempfile instead of /tmp in examples

2013-02-23 Thread Geoff Wilson

Geoff Wilson added the comment:

Attaching patch for 3.2 (Issue8890-3.2.patch)

--
Added file: http://bugs.python.org/file29190/Issue8890-3.2.patch

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



[issue8890] Use tempfile instead of /tmp in examples

2013-02-23 Thread Geoff Wilson

Geoff Wilson added the comment:

Attaching patch for 3.3 that also works for 3.4/default (Issue8890-3.3.patch)

--
Added file: http://bugs.python.org/file29191/Issue8890-3.3.patch

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-23 Thread Devin Cook

Devin Cook added the comment:

backported patch to 2.7

--
Added file: http://bugs.python.org/file29192/header_newlines_2.7.patch

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-23 Thread Devin Cook

Devin Cook added the comment:

backported patch to 2.6

--
Added file: http://bugs.python.org/file29193/header_newlines_2.6.patch

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



[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2013-02-23 Thread Andreas Åkerlund

Andreas Åkerlund added the comment:

This is a patch against 3.2 adding urllib.parse.quote_uri

It splits the URI in 5 parts (protocol, authentication, hostname, port and 
path) then runs urllib.parse.quote on the path and encodes the hostname to 
punycode if it's not in ascii.

It's not perfect, but should be usable in most cases.
I created some test cases aswell.

--
nosy: +thezulk
Added file: http://bugs.python.org/file29194/issue3991.diff

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



[issue15132] Let unittest.TestProgram()'s defaultTest argument be a list

2013-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e2bfe6b227a by Petri Lehtinen in branch 'default':
Issue #15132: Allow a list for the defaultTest argument of unittest.TestProgram
http://hg.python.org/cpython/rev/4e2bfe6b227a

--
nosy: +python-dev

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



[issue15132] Let unittest.TestProgram()'s defaultTest argument be a list

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Applied, thanks!

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

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



[issue14720] sqlite3 microseconds

2013-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6911df35b7b6 by Petri Lehtinen in branch '2.7':
Issue #14720: sqlite3: Convert datetime microseconds correctly
http://hg.python.org/cpython/rev/6911df35b7b6

New changeset 46d5317a51fb by Petri Lehtinen in branch '3.2':
Issue #14720: sqlite3: Convert datetime microseconds correctly
http://hg.python.org/cpython/rev/46d5317a51fb

New changeset 46c96693296f by Petri Lehtinen in branch '3.3':
Issue #14720: sqlite3: Convert datetime microseconds correctly
http://hg.python.org/cpython/rev/46c96693296f

New changeset 6342055ac220 by Petri Lehtinen in branch 'default':
Issue #14720: sqlite3: Convert datetime microseconds correctly
http://hg.python.org/cpython/rev/6342055ac220

--
nosy: +python-dev

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



[issue14720] sqlite3 microseconds

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Applied, thanks!

--
nosy: +petri.lehtinen
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.4

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



[issue12226] use HTTPS by default for uploading packages to pypi

2013-02-23 Thread Devin Cook

Changes by Devin Cook devin.c.c...@gmail.com:


--
nosy: +devin

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



[issue16802] fileno argument to socket.socket() undocumented

2013-02-23 Thread Henrik Heimbuerger

Henrik Heimbuerger added the comment:

Here's a suggestion for a documentation addition. Comments on tone and content 
are welcome, and I'm willing to update it and submit modified patch files.

This adds the following note:
  If a file descriptor *fileno* is specified, the other arguments
  are ignored and and the socket with this file descriptor is returned. 
Unlike
  :meth:`fromfd`, this does not cause a duplication of the file descriptor
  and therefore supports the special case of closing detached socket handles
  on Windows using ``socket.socket(fileno=handle).close()``.

--
keywords: +patch
nosy: +hheimbuerger
Added file: http://bugs.python.org/file29195/issue16802.diff

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



[issue8890] Use tempfile instead of /tmp in examples

2013-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 488957f9b664 by Petri Lehtinen in branch '2.7':
Issue #8890: Stop advertising an insecure use of /tmp in docs
http://hg.python.org/cpython/rev/488957f9b664

New changeset 7556601180c8 by Petri Lehtinen in branch '3.2':
Issue #8890: Stop advertising an insecure use of /tmp in docs
http://hg.python.org/cpython/rev/7556601180c8

New changeset 18e20e146396 by Petri Lehtinen in branch '3.3':
Issue #8890: Stop advertising an insecure use of /tmp in docs
http://hg.python.org/cpython/rev/18e20e146396

New changeset 6b0ca4cb7e4e by Petri Lehtinen in branch 'default':
Issue #8890: Stop advertising an insecure use of /tmp in docs
http://hg.python.org/cpython/rev/6b0ca4cb7e4e

--

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



[issue8890] Use tempfile instead of /tmp in examples

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Applied, thanks!

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

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



[issue15566] tarfile.TarInfo.frombuf documentation is out of date

2013-02-23 Thread Andy Holst

Andy Holst added the comment:

The documentation updated for the tarfile.rst document. The arguments encoding 
and errors are added to tarfile.TarInfo.frombuf method. Patch uploaded.

--
keywords: +patch
nosy: +StealthAsimov
Added file: http://bugs.python.org/file29196/issue15566.patch

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



[issue16709] unittest discover order is filesystem specific - hard to reproduce

2013-02-23 Thread Martin Melin

Martin Melin added the comment:

Not sure if there was anything more to it than this, but please find an attempt 
to add this attached.

--
keywords: +patch
nosy: +mmelin
Added file: http://bugs.python.org/file29197/issue16709.patch

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



[issue16695] Clarify fnmatch glob docs about the handling of leading .s

2013-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b96dcdac419 by Petri Lehtinen in branch '2.7':
Issue #16695: Document how glob handles filenames starting with a dot
http://hg.python.org/cpython/rev/2b96dcdac419

New changeset b4434cbca953 by Petri Lehtinen in branch '3.2':
Issue #16695: Document how glob handles filenames starting with a dot
http://hg.python.org/cpython/rev/b4434cbca953

New changeset 3e8b29512b2e by Petri Lehtinen in branch '3.3':
Issue #16695: Document how glob handles filenames starting with a dot
http://hg.python.org/cpython/rev/3e8b29512b2e

New changeset 3fd9970d9e65 by Petri Lehtinen in branch 'default':
Issue #16695: Document how glob handles filenames starting with a dot
http://hg.python.org/cpython/rev/3fd9970d9e65

--
nosy: +python-dev

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



[issue16695] Clarify fnmatch glob docs about the handling of leading .s

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Applied, thanks!

--
nosy: +petri.lehtinen
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue16709] unittest discover order is filesystem specific - hard to reproduce

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

The patch looks good to me.

--
nosy: +petri.lehtinen
stage: needs patch - patch review

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



[issue16709] unittest discover order is filesystem specific - hard to reproduce

2013-02-23 Thread Michael Foord

Michael Foord added the comment:

As we're specifying this behaviour in the documentation it would be nice to 
test it.

--
stage: patch review - test needed

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



[issue17188] Document 'from None' in raise statement doc.

2013-02-23 Thread Dennis Mårtensson

Dennis Mårtensson added the comment:

We have added the from None to the documentation with a explanation and some 
example code.

--
keywords: +patch
nosy: +m...@dennis.is
Added file: http://bugs.python.org/file29199/patch17188.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17188
___
___
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-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

Added a functionality that raises error_proto('line too long') if we read over 
_MAXLINE characters. Defaults _MAXLINE to 2048. The patch is written on top of 
2.7

--
keywords: +patch
nosy: +nailor
Added file: http://bugs.python.org/file29198/issue16041.patch

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



[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-23 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I already posted a patch in issue 9285.
Maybe we should close this one as a duplicate.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17130
___
___
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-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I have two questions:
- how do you know the crash really happens because of thread 5?
- when the thread.local object is being deleted, has another thread just 
started looking up its attributes?

--

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-23 Thread Joar Wandborg

Joar Wandborg added the comment:

Patch submitted, please review.

--
keywords: +patch
nosy: +joar
Added file: http://bugs.python.org/file29200/issue17267.patch

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



[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-23 Thread Björn Skoglund

Björn Skoglund added the comment:

Look at that. Sorry, totally missed it.

--

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



[issue17093] Make importlib.abc more inheritance-friendly

2013-02-23 Thread Gökcen Eraslan

Changes by Gökcen Eraslan gokcen.eras...@gmail.com:


--
nosy: +gkcn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17093
___
___
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-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

Here's a patch that limits the headers to 100. If more than _MAXHEADERS headers 
are read, this raises exception TooMuchHeaders.

The patch is for 2.7, I'll cook one for 3.2 too.

--
keywords: +patch
nosy: +nailor
Added file: http://bugs.python.org/file29201/issue16037_py27.patch

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



[issue11259] asynchat does not check if terminator is negative integer

2013-02-23 Thread Devin Cook

Devin Cook added the comment:

I agree that this is probably a bug, but can't think of any instances where 
this in itself would cause a security issue. By sending something like a 
negative Content-Length, you do indeed get data returned that doesn't really 
match the data sent on the wire. If you're able to manipulate the 
Content-Length, though, instead of sending a negative value num, you could 
instead send len(data) + num.

Here's a simple example I was able to come up with:

Server reads data and runs echo -n  {data} (or any write the file specified 
in data).
Client is supposed to send Content-Length, then that many bytes, expected to be 
a file that should be written to.
Client instead sends -4\n/etc/passwd.bak.
Server runs echo -n  /etc/passwd.

So that's certainly unexpected bahavior. However, this is a fairly low-level 
module, and doesn't actually do anything with the data it collects. That's left 
to the subclass, and subclasses should be responsible for validating any data 
read off the wire before using it.

Attached is a patch to tip, including a new test case.

--
nosy: +devin
type: security - behavior
Added file: http://bugs.python.org/file29202/asynchat_tip.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11259
___
___
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-23 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

...and here's the patch for 3.2

--
Added file: http://bugs.python.org/file29203/issue16037_py32.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16037
___
___
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-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Another question: are threads being started or stopped while the thread local 
object is being deleted?

--

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Added some comments to Rietveld.

--
nosy: +petri.lehtinen

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



[issue8489] Support UTF8SMTP as part of RFC 5336 in smptlib

2013-02-23 Thread David Lam

David Lam added the comment:

looks like RFC 6531 obsoletes 5336  --   
http://datatracker.ietf.org/doc/rfc6531/

(6531 says its the Proposed Standard, whereas 5336 says its Experimental 
etc etc)

--

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



[issue10572] Move test sub-packages to Lib/test

2013-02-23 Thread Geoff Wilson

Geoff Wilson added the comment:

Patch attached to move sqlite3 tests under Lib/test, and remove 
Lib/test/test_sqlite.py.

Naming of files has been kept the same in the move from Lib/sqlite/test, to 
allow for easier merging of future patches.

--
keywords: +patch
nosy: +gmwils
Added file: http://bugs.python.org/file29204/issue10572-sqlite3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10572
___
___
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-23 Thread Manuel Jacob

Manuel Jacob added the comment:

http://docs.python.org/3/library/array.html states that the 'u' type code is 
deprecated together with the rest of the Py_UNICODE API (which includes 
PyUnicode_FromUnicode), so keeping this using PyUnicode_FromUnicode should be 
fine.

--

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



[issue16403] update distutils docs to say that maintainer replaces author

2013-02-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 14144373fdcd by Petri Lehtinen in branch '2.7':
Issue #16403: Document how distutils uses the maintainer field in PKG-INFO
http://hg.python.org/cpython/rev/14144373fdcd

New changeset b65b6a0ebd44 by Petri Lehtinen in branch '3.2':
Issue #16403: Document how distutils uses the maintainer field in PKG-INFO
http://hg.python.org/cpython/rev/b65b6a0ebd44

New changeset af4c08b10702 by Petri Lehtinen in branch '3.3':
Issue #16403: Document how distutils uses the maintainer field in PKG-INFO
http://hg.python.org/cpython/rev/af4c08b10702

New changeset 9de4602a80b9 by Petri Lehtinen in branch 'default':
Issue #16403: Document how distutils uses the maintainer field in PKG-INFO
http://hg.python.org/cpython/rev/9de4602a80b9

--
nosy: +python-dev

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



[issue16403] update distutils docs to say that maintainer replaces author

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Applied, thanks!

--
nosy: +petri.lehtinen
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue10340] asyncore doesn't properly handle EINVAL on OSX

2013-02-23 Thread Devin Cook

Devin Cook added the comment:

This looks resolved. Can it be closed?

--
nosy: +devin

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-23 Thread Joar Wandborg

Joar Wandborg added the comment:

New patch adressing the review comments.

--
Added file: http://bugs.python.org/file29205/issue17267.patch

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



[issue16801] Preserve original representation for integers / floats in docstrings

2013-02-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Serhiy called subclassing 'particular and cumbersome'.
'Cumbersome' is an opinion. I consider subclassing elegant. The ease of doing 
so and specializing only what one needs to is a major feature of Python. It 
only took me a couple of minutes to whip up solutions for two different cases.

I think 'particular' is wrong. Subclassing is a general solution for a 
particular class of values. As I illustrated, it results in the value getting 
its custom representation *everywhere*. Other solutions seem to give it its 
custom representation only in the particular context of standard signature 
displays, and its 'regular' not-so-good representation when directly accessed. 
To me, that is much worse.

--

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



[issue17188] Document 'from None' in raise statement doc.

2013-02-23 Thread Petri Lehtinen

Petri Lehtinen added the comment:

The patch should add something to the The from clause is used for 
exception... paragraph, to state that None is also allowed.

It also adds things in a confusing order. I think the new example should go 
below other examples, and the changedversion and addedversion directives should 
be the last thing in the section.

--
nosy: +petri.lehtinen
versions:  -Python 3.2

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



  1   2   >