[issue10042] total_ordering

2011-04-19 Thread Lennart Regebro

Lennart Regebro  added the comment:

We *do* care about NotImplemented, that's the whole point of this bug report. I 
don't see how this is a problem in the new_total_ordering.py example. Can you 
give an example of when you get a stack overflow?

The examples in new_total_ordering are in themselves badly implemented, as they 
do check of the class with an isinstance, but if it is not the correct 
instance, they will return False or raise a TypeError. That's wrong, they 
should return NotImplemented, to give the other class a chance. But that is not 
a problem for the tests, it's only a problem if you use the tests as examples 
of how to implement a comparable class.

But in no case am I able to get a stack overflow here, which I can with the old 
total_ordering recipe.

--

___
Python tracker 

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



[issue10042] total_ordering

2011-04-19 Thread Lennart Regebro

Lennart Regebro  added the comment:

I'm attaching a file with the example classes returning NotImplemented, and a 
different implementation of a total ordering, as an example of how returning 
NotImplemented by one class will give the chance to the other class. This is 
the ultimate cause of the bug, and new_total_ordering handles it properly.

--
Added file: 
http://bugs.python.org/file21711/new_total_ordering_notimplemented.py

___
Python tracker 

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



[issue10042] total_ordering

2011-04-19 Thread Alexander Boyd

Alexander Boyd  added the comment:

I've attached a file demonstrating the stack overflow. It assumes 
total_ordering has been defined as per new_total_ordering.py.

--
Added file: http://bugs.python.org/file21712/new_total_ordering_overflow.py

___
Python tracker 

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



[issue10042] total_ordering

2011-04-19 Thread Lennart Regebro

Lennart Regebro  added the comment:

Ah! I see how you mean. The problem isn't just if you turn the conversion 
around from self > other to other < self. The problem in fact appears when a 
rich text function uses the <>!= operators on self directly.

I tried a version which uses the __xx__ operators directly and that works for 
the ones that does not use "not". "not NotImplemented" is false, for obvious 
reasons, and that means that with for example "lambda self, other: not 
self.__ge__(other)" will return False, when it should return NotImplemented.

In effect this means that the total ordering recipe only works as long as you 
don't compare two classes that use the total ordering recipe. :-)

I don't think the lambda technique is going to work properly. Of course we can 
say that we should care about NotImplemented, but then first of all this recipe 
needs a big "this is broken, don't use it unless you know what you are doing" 
label, and secondly I don't think it should have been included in the first 
place if we can't make it work properly.

--

___
Python tracker 

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



[issue11872] cPickle gives strange error for large objects.

2011-04-19 Thread MattyG

New submission from MattyG :

from numpy import *
import cPickle

a = zeros((30, 1000)) 
f = open("test.pkl", "w") 
cPickle.dump(a, f)

--
SystemError: Traceback (most recent call last)

/home/kddcup/code/matt/svd-projection/take5/ in ()

SystemError?: error return without exception set

Or using the .dump function:

a.dump("test.pkl")

SystemError? Traceback (most recent call last)

/home/kddcup/code/matt/svd-projection/take5/ in ()

SystemError: NULL result without error in PyObject?_Call

I am not sure if this is a numpy or Pickle/cPickle glitch. In either case, even 
if this is a semi-known behavior, a more instructive error message would 
certainly help. I think the problem only happens for arrays larger than 
2**(32-1) bytes but I would have to experiment more to be sure.

--
components: Extension Modules
messages: 134017
nosy: meawoppl
priority: normal
severity: normal
status: open
title: cPickle gives strange error for large objects.
type: behavior
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



[issue10042] total_ordering

2011-04-19 Thread Alexander Boyd

Alexander Boyd  added the comment:

That's my point. My version, sane_total_ordering.py, fixes this by using 
traditional functions and explicit NotImplemented checks.

--

___
Python tracker 

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



[issue11873] test_regexp() of test_compileall failure on "x86 OpenIndiana 3.x"

2011-04-19 Thread STINNER Victor

New submission from STINNER Victor :

Trace:
--
[ 30/354] test_compileall
test test_compileall failed -- Traceback (most recent call last):
  File 
"/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_compileall.py",
 line 253, in test_regexp
self.assertCompiled(self.initfn)
  File 
"/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_compileall.py",
 line 149, in assertCompiled
self.assertTrue(os.path.exists(imp.cache_from_source(fn)))
AssertionError: False is not true
--
http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/1097/steps/test/logs/stdio

--
components: Tests
messages: 134019
nosy: haypo
priority: normal
severity: normal
status: open
title: test_regexp() of test_compileall failure on "x86 OpenIndiana 3.x"
versions: Python 3.3

___
Python tracker 

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



[issue11872] cPickle gives strange error for large objects.

2011-04-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

See also issue11564 and issue9614.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue11874] argparse assertion failure with brackets in metavars

2011-04-19 Thread Hartmut Niemann

New submission from Hartmut Niemann :

I run this script with option --help
-8<--
import argparse
parser = argparse.ArgumentParser()
parser.add_argument ('--from-itm', 
dest="from_itm",action="store",default=None,help ="Source ITM file", 
metavar="ITMFILENAME")
parser.add_argument 
("--from-fbm-sigtab",dest="from_sigtab",action="store",default=None,help="Source
 signal FB", metavar=" [LIB,]FBNAME")
parser.add_argument ("--c",dest="f",metavar="x]d")
args = parser.parse_args()
-8<
and I get an assertion failure:
-8<
D:\temp>argparsebug.py --help
Traceback (most recent call last):
  File "D:\temp\argparsebug.py", line 6, in 
args = parser.parse_args()
  File "C:\Python27\lib\argparse.py", line 1678, in parse_args
args, argv = self.parse_known_args(args, namespace)
  File "C:\Python27\lib\argparse.py", line 1710, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
  File "C:\Python27\lib\argparse.py", line 1916, in _parse_known_args
start_index = consume_optional(start_index)
  File "C:\Python27\lib\argparse.py", line 1856, in consume_optional
take_action(action, args, option_string)
  File "C:\Python27\lib\argparse.py", line 1784, in take_action
action(self, namespace, argument_values, option_string)
  File "C:\Python27\lib\argparse.py", line 993, in __call__
parser.print_help()
  File "C:\Python27\lib\argparse.py", line 2303, in print_help
self._print_message(self.format_help(), file)
  File "C:\Python27\lib\argparse.py", line 2277, in format_help
return formatter.format_help()
  File "C:\Python27\lib\argparse.py", line 278, in format_help
help = self._root_section.format_help()
  File "C:\Python27\lib\argparse.py", line 208, in format_help
func(*args)
  File "C:\Python27\lib\argparse.py", line 329, in _format_usage
assert ' '.join(opt_parts) == opt_usage
AssertionError
--8<---
It must be the combination of several argument lines because when I 
comment out one of the add_arguments, it works.

Is this a bug or do I do things I shouln't?
If it is not allowed to use [] in metavars (what I wanted was 
metavar='[optional,]mantatory'), I' like to receive a readable error message.

With best regards
Hartmut Niemann

--
components: None
messages: 134021
nosy: htnieman
priority: normal
severity: normal
status: open
title: argparse assertion failure with brackets in metavars
type: behavior
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



[issue10042] total_ordering

2011-04-19 Thread Lennart Regebro

Lennart Regebro  added the comment:

Yeah, I can't say it's pretty though. :) Anyway this is an issue for 3.2 and 
2.7 as well, then, so I add them back.

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



[issue11875] OrderedDict.__reduce__ not threadsafe

2011-04-19 Thread Mario Juric

New submission from Mario Juric :

The implementation of OrderedDict.__reduce__() in Python 2.7.1 is not thread 
safe because of the following four lines:

tmp = self.__map, self.__root
del self.__map, self.__root
inst_dict = vars(self).copy()
self.__map, self.__root = tmp

If one thread is pickling an OrderedDict, while another accesses it, a race 
condition occurs if the accessing thread accesses the dict after self.__map and 
self.__root have been delated, and before they've been set again (above).

This leads to an extremely difficult bug to diagnose when using 
multiprocessing.Queue to exchange OrderedDicts between multiple processes 
(because Queue uses a separate feeder thread to do the pickling).

The fix seems relatively easy -- use:

inst_dict = vars(self).copy()
del inst_dict['_OrderedDict__map'], inst_dict['_OrderedDict__root']

instead of the above four lines.

PS: This issue+fix may also apply to Python 3.x, although I haven't tested it 
there.

--
components: Library (Lib)
messages: 134023
nosy: mjuric
priority: normal
severity: normal
status: open
title: OrderedDict.__reduce__ not threadsafe
type: behavior
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



[issue828450] sdist generates bad MANIFEST on Windows

2011-04-19 Thread higery

Changes by higery :


Removed file: 
http://bugs.python.org/file21697/change_path_separator_in_MANIFEST.patch

___
Python tracker 

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



[issue828450] sdist generates bad MANIFEST on Windows

2011-04-19 Thread higery

Changes by higery :


Added file: 
http://bugs.python.org/file21713/change_path_separator_in_MANIFEST.patch

___
Python tracker 

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



[issue10042] total_ordering

2011-04-19 Thread Alexander Boyd

Alexander Boyd  added the comment:

Ok. Yeah, I won't argue that it's pretty :-)

--

___
Python tracker 

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



[issue11875] OrderedDict.__reduce__ not threadsafe

2011-04-19 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-04-19 Thread Jonas H.

Jonas H.  added the comment:

*push* Any way to get this into the codebase?

--

___
Python tracker 

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



[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-04-19 Thread Tim Golden

Tim Golden  added the comment:

FWIW I agree with MvL: os.stat is one of those awkward customers
left over from the idea that Windows could be posix-compliant,
even though the relevant concepts don't actually map particularly
well. ISTM that anyone seriously wanting to determine whether
something's executable or not on Windows is going to have in
mind the precise semantics of a particular use-case and will
employ whatever API calls meet that need. I genuinely don't
believe there's any mileage in shoehorning more and more
corner-cases into os.stat on Windows.

--
nosy: +tim.golden

___
Python tracker 

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



[issue11875] OrderedDict.__reduce__ not threadsafe

2011-04-19 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

To avoid hardcoding the mangled names:

@@ -155,10 +155,9 @@
 def __reduce__(self):
 'Return state information for pickling'
 items = [[k, self[k]] for k in self]
-tmp = self.__map, self.__root, self.__hardroot
-del self.__map, self.__root, self.__hardroot
 inst_dict = vars(self).copy()
-self.__map, self.__root, self.__hardroot = tmp
+for k in vars(OrderedDict()):
+inst_dict.pop(k, None)
 if inst_dict:
 return (self.__class__, (items,), inst_dict)
 return self.__class__, (items,)

--

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

> “If a signal is delivered to a thread waiting for a condition variable, 
> upon return from the signal handler the thread resumes waiting for the 
> condition
> variable as if it was not interrupted, or it shall return zero due to spurious
> wakeup.”

Confirmed on Linux (kernel 2.6.37, eglibc 2.11.2) using strace:

10:42:59.942455 futex(0x173fabc, 
FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, {1303202584, 942432000}, 
) = ? ERESTART_RESTARTBLOCK (To be restarted)
10:43:00.941777 --- SIGALRM (Alarm clock) @ 0 (0) ---
10:43:00.941848 rt_sigreturn(0x1462eac) = -1 EINTR (Interrupted system call)
10:43:00.941926 futex(0x173fabc, 
FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, {1303202584, 942432000}, 
) = -1 ETIMEDOUT (Connection timed out)
10:43:04.942650 futex(0x173fae8, FUTEX_WAKE_PRIVATE, 1) = 0

pthread_cond_timedwait() is interrupted: the system call returns 
ERESTART_RESTARTBLOCK (To be restarted), and then the system call is restarted.

I think that we should just skip the test if Python uses pthread without 
semaphore and pthread_cond_timedwait() restarts if it is interrupted by a 
signal. Attached C program checks if pthread_cond_timedwait() does restart or 
not. On Linux, it should be compiled using:
gcc -pthread -lrt pthread_cond_timedwait_signal.c -o 
pthread_cond_timedwait_signal

I don't know how to integrate pthread_cond_timedwait_signal.c into 
configure.in. I don't know if any OS does NOT restart pthread_cond_timedwait() 
after an interruption, so it's maybe simpler to always skip 
test_lock_acquire_interruption() and test_rlock_acquire_interruption() of 
test_threadsignals if Python uses pthread without semaphore.

--

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file21714/pthread_cond_timedwait_signal.c

___
Python tracker 

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



[issue11876] SGI Irix threads, SunOS lightweight processes, GNU pth threads, Mach C Threads are now unsupported, and code will be removed in 3.3

2011-04-19 Thread STINNER Victor

New submission from STINNER Victor :

Python/thread.c contains the following messages:

#ifdef SGI_THREADS
#error SGI Irix threads are now unsupported, and code will be removed in 3.3.
#include "thread_sgi.h"
#endif


#ifdef SUN_LWP
#error SunOS lightweight processes are now unsupported, and code will be 
removed in 3.3.
#include "thread_lwp.h"
#endif

#ifdef HAVE_PTH
#error GNU pth threads are now unsupported, and code will be removed in 3.3.
#include "thread_pth.h"
#undef _POSIX_THREADS
#endif

#ifdef C_THREADS
#error Mach C Threads are now unsupported, and code will be removed in 3.3.
#include "thread_cthread.h"
#endif

--
components: Interpreter Core
messages: 134029
nosy: haypo
priority: normal
severity: normal
status: open
title: SGI Irix threads, SunOS lightweight processes, GNU pth threads, Mach C 
Threads are now unsupported, and code will be removed in 3.3
versions: Python 3.3

___
Python tracker 

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



[issue11876] SGI Irix threads, SunOS lightweight processes, GNU pth threads, Mach C Threads are now unsupported, and code will be removed in 3.3

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, the file contains also a reference to a missing file:

#ifdef PLAN9_THREADS
#include "thread_plan9.h"
#endif

But I don't see where PLAN9_THREADS is defined.

--

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

The problem is that I don't know how to check in test_threadsignals which 
thread implementation is used in Python. It would be nice to have some 
functions providing such information in the sys or sysconfig module, maybe 
something like sys.float_info.

For example, sys._thread_info can be a dict like {'name': 'pthread', 
'use_semaphore': True}.

Keys:
 - name: cthread, lwp, nt, os2, pth, pthread, sgi, solaris or wince (sgi, lwp, 
pth, cthread may be removed from Python 3.3: #11876)
 - maxproc: max # of threads that can be started (SGI only)
 - stacksize: default stacksize for a thread (lwp, pthread and os2 only)
 - min_stacksize: minimum stacksize for a thread (pthread, nt and os2 only)
 - max_stacksize: maximum stacksize for a thread (nt and os2 only)

thread_pthread.h contains many #ifdef which may be interesting to have in 
thread_info:
 - if _HAVE_BSDI is defined, don't use pthread_init()
 - if THREAD_STACK_SIZE is defined, set the size of the thread stack
 - if PTHREAD_SYSTEM_SCHED_SUPPORTED is defined: set scope to 
PTHREAD_SCOPE_SYSTEM
 - if (defined(_POSIX_SEMAPHORES) && defined(HAVE_BROKEN_POSIX_SEMAPHORES) && 
defined(HAVE_SEM_TIMEDWAIT)): use semaphore

Well, the most important informations for this issue is the name of the thread 
implementation (pthread) and know if pthread semaphore are used or not.

--

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Took some time, but here is a patch that makes mmap(2) work on
Mac OS X.
This also applies to #11779.

Background:
on OS X, fsync(2) seems to behave as fdatasync(2).
To give people the possibility to do some kind of fync(2)
nonetheless, a new fcntl(2) has been introduced: F_FULLFSYNC.
If you use that, the ,sparse` file is synchronized with physical
backing store immediately and all is fine.
Vampire magic!

--
Added file: http://bugs.python.org/file21715/11277.3.diff

___
Python tracker 

___diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -70,7 +70,7 @@
 with open(support.TESTFN, "wb+") as f:
 f.seek(_4G)
 f.write(b"asdf")
-with open(support.TESTFN, "rb") as f:
+f.flush()
 self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
 
 def tearDown(self):
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -23,6 +23,9 @@
 
 #ifndef MS_WINDOWS
 #define UNIX
+# ifdef __APPLE__
+#  include 
+# endif
 #endif
 
 #ifdef MS_WINDOWS
@@ -1122,6 +1125,10 @@
 "mmap invalid access parameter.");
 }
 
+#ifdef __APPLE__
+if (fd != -1)
+(void)fcntl(fd, F_FULLFSYNC);
+#endif
 #ifdef HAVE_FSTAT
 #  ifdef __VMS
 /* on OpenVMS we must ensure that all bytes are written to the file */
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

@sdaoden: This issue has a lot of patches, can you remove old patches?

--

___
Python tracker 

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



[issue11779] test_mmap timeout (1 hour) on "AMD64 Snow Leopard 3.x" buildbot

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

I think that will also be healed with the patch i've just posted
to #11277.
(However, though i can't ,reproduce`, it seems the
Microkernel/IOKit interaction sometimes has a problem, because
i *really* had messed up sparse files (about 1-2 percent or so)
during the testing phase.)

--

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file20861/doc_lib_mmap.patch

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21671/11277.1.diff

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21675/11277.2.diff

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

(The working patch is http://bugs.python.org/file21715/11277.3.diff.)

--

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21672/11277.mmap.c

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21676/11277.mmap-1.c

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21683/11277.mmap-2.c

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21684/11277.mmap-2.py

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

(Dropped the tests, too.)

--

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

threading_info.patch:
 - Add thread._info() function -> dict with 'name' and 'use_semaphores' 
(pthread only) keys
 - Skip test_lock_acquire_interruption() and test_rlock_acquire_interruption() 
if Python uses pthread without semaphores

thread._info() creates a new dict at each call.

--
Added file: http://bugs.python.org/file21716/threading_info.patch

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

11277.3.diff: this patch looks correct (I'm unable to test it), but can you add 
a sentence in mmap doc to explain that mmap.mmap() does flush the file on Mac 
OS X and VMS?

--

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD) -> 
Crash with mmap and sparse files on Mac OS X

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, fcntl has already a F_FULLFSYNC constant, so we can use like 
fcntl.fcntl(fd, fcntl.F_FULLFSYNC) in Python.

> can you add a sentence in mmap doc to explain that mmap.mmap()
> does flush the file on Mac OS X and VMS?

Hum, it does flush the file on VMS using fsync(), but on Mac OS X, it does just 
set F_FULLFSYNC flag using fcntl. It doesn't call fsync() explicitly. Does 
mmap() "call fsync()" implicitly?

--

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, and can you add a comment explaining why F_FULLFSYNC is needed on Mac OS X 
in your patch? (If I understood correctly, it is needed to avoid crash with 
sparse files).

--

___
Python tracker 

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



[issue11876] SGI Irix threads, SunOS lightweight processes, GNU pth threads, Mach C Threads are now unsupported, and code will be removed in 3.3

2011-04-19 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Updated 11277.4.diff also includes mmap.rst update.
(Maybe os.fsync() and os.sync() should be modified to really do
that fcntl, too?  I'll think i'll open an issue with patch soon.)

--
Added file: http://bugs.python.org/file21717/11277.4.diff

___
Python tracker 

___diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -86,6 +86,10 @@
defaults to 0.  *offset* must be a multiple of the PAGESIZE or
ALLOCATIONGRANULARITY.
 
+   To ensure validity of the created memory mapping the file specified
+   by the descriptor *fileno* is internally automatically synchronized
+   with physical backing store on Mac OS X and OpenVMS.
+
This example shows a simple way of using :class:`mmap`::
 
   import mmap
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -70,7 +70,7 @@
 with open(support.TESTFN, "wb+") as f:
 f.seek(_4G)
 f.write(b"asdf")
-with open(support.TESTFN, "rb") as f:
+f.flush()
 self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
 
 def tearDown(self):
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -23,6 +23,9 @@
 
 #ifndef MS_WINDOWS
 #define UNIX
+# ifdef __APPLE__
+#  include 
+# endif
 #endif
 
 #ifdef MS_WINDOWS
@@ -1122,6 +1125,13 @@
 "mmap invalid access parameter.");
 }
 
+#ifdef __APPLE__
+/* Issue 11277: due to lack of sparse file support on OS X synchronization
+ * with physical backing store is required to ensure validity of the mmap.
+ * Since fsync(2) acts like fdatasync(2) a special fcntl(2) is necessary */
+if (fd != -1)
+(void)fcntl(fd, F_FULLFSYNC);
+#endif
 #ifdef HAVE_FSTAT
 #  ifdef __VMS
 /* on OpenVMS we must ensure that all bytes are written to the file */
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11300] mmap() large file failures on Mac OS X docfix

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Outdated due to found #11277 solution.

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



[issue11877] Mac OS X fsync() should really be fcntl(F_FULLFSYNC)

2011-04-19 Thread Steffen Daode Nurpmeso

New submission from Steffen Daode Nurpmeso :

Issue 11277 revealed that Mac OS X fsync() does not always
and gracefully synchronize file data to physical backing store.
To gain real fsync(2) behaviour fcntl(2) must be called with
the F_FULLFSYNC flag.

--
components: Library (Lib)
files: fsync.diff
keywords: patch
messages: 134043
nosy: sdaoden
priority: normal
severity: normal
status: open
title: Mac OS X fsync() should really be fcntl(F_FULLFSYNC)
versions: Python 3.3
Added file: http://bugs.python.org/file21718/fsync.diff

___
Python tracker 

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



[issue11877] Mac OS X fsync() should really be fcntl(F_FULLFSYNC)

2011-04-19 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Tue, Apr 19, 2011 at 10:34:11AM +, STINNER Victor wrote:
> 11277.3.diff: this patch looks correct

Unbelievable - you really fought yourself through this immense
bunch of code in such a short time!
:)

--
title: Crash with mmap and sparse files on Mac OS X -> 
test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

(My last reply-mail changed the title.  Fixing.)

--
title: test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD) -> 
Crash with mmap and sparse files on Mac OS X

___
Python tracker 

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



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2011-04-19 Thread Ezio Melotti

Ezio Melotti  added the comment:

Attached patch against 3.1 fixes the number of FFFD.
A test for the range in the error message should probably be added.  I haven't 
done any benchmark yet.  There's some code duplication, but I'm not sure it can 
be factored out.

--
versions: +Python 3.3 -Python 2.6
Added file: http://bugs.python.org/file21719/issue8271v6.diff

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

> (My last reply-mail changed the title.  Fixing.)

Yeah, it's a common problem if you use the email interface :-/

--

___
Python tracker 

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



[issue11750] Mutualize win32 functions

2011-04-19 Thread Brian Curtin

Brian Curtin  added the comment:

For the first point, I just put it there since other Windows-only modules 
already exist there. _subprocess did, msvcrt and winreg currently do, and 
there's a few other Windows-only things in there. It's not a big deal, so I can 
move it into Modules if we want -- winreg and msvcrt should probably get moved 
as well (in another issue).

As for the name clash, I could shorten it to _win, but I'd rather not name it 
_win32. Microsoft got away from calling it the "Win32 API" and instead say 
"Windows API" now since it also covers 64-bit. It's just an internal name so I 
won't fight too hard on this.

--

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> threading_info.patch:
>  - Add thread._info() function -> dict with 'name' and
> 'use_semaphores' (pthread only) keys

Most of these names will be removed in 3.3:
http://bugs.python.org/issue11863

--

___
Python tracker 

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



[issue11876] SGI Irix threads, SunOS lightweight processes, GNU pth threads, Mach C Threads are now unsupported, and code will be removed in 3.3

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, this is a duplicate of #11863.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue11863] Enforce PEP 11 - remove support for legacy systems

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Issue #11876 has been marked as a duplicate of this issue.

--
nosy: +haypo

___
Python tracker 

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



[issue1294232] Error in metaclass search order

2011-04-19 Thread Nick Coghlan

Nick Coghlan  added the comment:

Yep, the leading underscore and the fact you added it to a block of code that 
is skipped when Py_LIMITED_API is defined makes it OK to include the prototype 
in object.h.

However, I would suggest _PyType_CalculateMetaclass as the name - 
CalculateWinner is a bit vague without the specific context of calculating the 
metaclass.

On a broader point, I think there is an issue that needs to be brought up on 
python-dev: in light of PEP 3115, "type(name, bases, ns)" is no longer an 
entirely safe way to create dynamic types, as it bypasses __prepare__ methods. 
There should be an official way to access the full class building process, 
including correct invocation of __prepare__ methods (likely by making 
__build_class__ an official part of the language spec rather than a CPython 
implementation detail).

--
assignee: docs@python -> 
nosy: +ncoghlan

___
Python tracker 

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



[issue11867] Make test_mailbox deterministic

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Nice ping pong you play..
I, buildbot get:

Using random seed 2215045
[1/1] test_mailbox
test test_mailbox failed -- multiple errors occurred; run in verbose mode for 
details
test test_mailbox failed -- Traceback (most recent call last):
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1033, in test_lock_conflict
ipc.signal('done')
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1007, in __exit__
self.c_sock.shutdown(socket.SHUT_RDWR)
socket.error: [Errno 57] Socket is not connected

test test_mailbox failed -- Traceback (most recent call last):
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1033, in test_lock_conflict
ipc.signal('done')
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1007, in __exit__
self.c_sock.shutdown(socket.SHUT_RDWR)
socket.error: [Errno 57] Socket is not connected

/Users/steffen/usr/opt/py3k/lib/python3.3/test/regrtest.py:1082: 
ResourceWarning: unclosed 
  gc.collect()
1 test failed:
test_mailbox
Re-running failed tests in verbose mode
Re-running test 'test_mailbox' in verbose mode

...

==
ERROR: test_lock_conflict (test.test_mailbox.TestMbox)
--
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1033, in test_lock_conflict
ipc.signal('done')
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1007, in __exit__
self.c_sock.shutdown(socket.SHUT_RDWR)
socket.error: [Errno 57] Socket is not connected

==
ERROR: test_lock_conflict (test.test_mailbox.TestMMDF)
--
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1033, in test_lock_conflict
ipc.signal('done')
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_mailbox.py", line 
1007, in __exit__
self.c_sock.shutdown(socket.SHUT_RDWR)
socket.error: [Errno 57] Socket is not connected

--
Ran 332 tests in 55.487s

FAILED (errors=2)
test test_mailbox failed -- multiple errors occurred
ok

... repeats yet another two times (very long output though)

--
Ran 332 tests in 151.484s

OK
[118424 refs]

--
nosy: +sdaoden

___
Python tracker 

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



[issue1294232] Error in metaclass search order

2011-04-19 Thread Nick Coghlan

Nick Coghlan  added the comment:

Removed 2.7 from the affected versions - with neither __build_class__ nor 
__prepare__ in 2.x, there's no alternate metaclass calculation to go wrong.

This should definitely be fixed for the final 3.1 release and for 3.2 though. 
An updated patch against current 3.1 would be most convenient (hg should take 
care of the forward porting from that point).

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



[issue1294232] Error in metaclass search order

2011-04-19 Thread Nick Coghlan

Nick Coghlan  added the comment:

Sorry, my last review wasn't right and the patch is incorrect as it stands. 
After digging a little deeper, there is still a case that isn't covered 
correctly in __build_class__.

Specifically, the case where the most derived class has a declared metatype 
that is the *parent* of the metaclass that *should* be used.

This can be seen in type_new, where it does the "if (winner != metatype)" 
check. There is no equivalent check in __build_class__ - instead, the 
explicitly declared metaclass always wins.

What needs to happen is that the call to _PyType_CalculateMetaclass in 
__build_class__ should be moved out so that it is unconditional. The passed in 
metatype will either by the explicitly declared one (if it exists) or else 
PyType_Type. An additional test to pick up this case is also needed.

--

___
Python tracker 

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



[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-19 Thread Prashant Kumar

Changes by Prashant Kumar :


Added file: http://bugs.python.org/file21720/test_command_sdist.diff

___
Python tracker 

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



[issue11867] Make test_mailbox deterministic

2011-04-19 Thread R. David Murray

R. David Murray  added the comment:

Thanks for testing this.  I was afraid something like that would happen, since 
socket implementations are different on different platforms.  I presume you ran 
it on OSX.

Now I have to decide if I want to fix it, or if I should just switch to using 
threads.

--

___
Python tracker 

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



[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-19 Thread Prashant Kumar

Prashant Kumar  added the comment:

If I'm not wrong, the contents in the manifest file should be:
 'data.cfg' (not cfg/data.cgg)
 I've added a patch which fixes the above issue.

--
Added file: http://bugs.python.org/file21721/fix-manifest.diff

___
Python tracker 

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



[issue11863] Enforce PEP 11 - remove support for legacy systems

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Patch removing cpthread, pth, lwp and solaris thread implementations. The patch 
on configure.in, around the following diff, is invalid:

 AC_DEFINE(_REENTRANT)
-AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
-AC_DEFINE(C_THREADS)
-AC_DEFINE(HURD_C_THREADS, 1,
-[Define if you are using Mach cthreads directly under /include])
-LIBS="$LIBS -lthreads"
-THREADOBJ="Python/thread.o"],[
-AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
-AC_DEFINE(C_THREADS)
-AC_DEFINE(MACH_C_THREADS, 1,
-[Define if you are using Mach cthreads under mach /])
-THREADOBJ="Python/thread.o"],[
 # Just looking for pthread_create in libpthread is not enough:
 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
 # So we really have to include pthread.h, and then link.


autoconf will have to be run to update configure.

I am not sure that the patch removes all code related to these threads.

--
keywords: +patch
Added file: http://bugs.python.org/file21722/remove_threads.patch

___
Python tracker 

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



[issue8933] Invalid detection of metadata version

2011-04-19 Thread Filip Gruszczyński

Filip Gruszczyński  added the comment:

Bump! How about commiting this patch, Eric?

--
status: pending -> open

___
Python tracker 

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



[issue11863] Enforce PEP 11 - remove support for legacy systems

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

FYI Hurd only supports cthread, without cthread support, Python will not 
support threads on Hurd anymore.

There are two Hurd issues to move from cthread to pthread
http://savannah.gnu.org/task/?5487 (opened 5 years ago)
http://savannah.gnu.org/task/?7895 (opened 3 years ago)

--

___
Python tracker 

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



[issue11867] Make test_mailbox deterministic

2011-04-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Short glance into it, and after
commenting out 
self.c_sock_close = self.c_sock_shutdown = True
in the parent process it ends up as
(maybe i can spend more time this evening):


15:36 ~/tmp $ python3 -E -Wd -m test -r -w -uall test_mailbox
Using random seed 9754656
[1/1] test_mailbox
/Users/steffen/usr/opt/py3k/lib/python3.3/mailbox.py:723:  ResourceWarning: 
unclosed 
  return self._toc[key]
/Users/steffen/usr/opt/py3k/lib/python3.3/mailbox.py:77: ResourceWarning: 
unclosed 
  return self.get_message(key)
1 test OK.
[118589 refs]

--

___
Python tracker 

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



[issue11837] smtplib._quote_periods triggers spurious type error in re.sub

2011-04-19 Thread Axel Rau

Axel Rau  added the comment:

One more hint: The bug does not happen with plain text mails, but can easily be 
reproduced with MIME attachments.

--

___
Python tracker 

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



[issue11877] Mac OS X fsync() should really be fcntl(F_FULLFSYNC)

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, it remembers a long story around ext3/ext4 and write barrier, with a 
specific problem in Firefox with SQLite.

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/fsync.2.html
" For applications that require tighter guarantees about the integrity of 
their data, Mac OS X provides
 the F_FULLFSYNC fcntl.  The F_FULLFSYNC fcntl asks the drive to flush all 
buffered data to permanent
 storage.  Applications, such as databases, that require a strict ordering 
of writes should use F_FULLF-
 SYNC to ensure that their data is written in the order they expect.  
Please see fcntl(2) for more
 detail."

http://shaver.off.net/diary/2008/05/25/fsyncers-and-curveballs/
"fsync on Mac OS X: Since on Mac OS X the fsync command does not make the 
guarantee that bytes are written, SQLite sends a F_FULLFSYNC request to the 
kernel to ensures that the bytes are actually written through to the drive 
platter."

http://lwn.net/Articles/283161/

http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2008-September/001356.html
"
OTP-7471  On Mac OS X, file:sync/1 now guarantees that all filesystem
  buffers are written to the disk by using the fcntl() with
  F_FULLFSYNC option. Previously, file:sync/1 called fsync(),
  which only guaranteed that the data had been transferred to
  the disk drive. (Thanks to Jan Lehnardt.)"

http://lists.mindrot.org/pipermail/portawiki-discuss/2005-November/02.html

--
nosy: +haypo

___
Python tracker 

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



[issue11878] No SOAP libraries available for Python 3.x

2011-04-19 Thread Michiel Van den Berghe

New submission from Michiel Van den Berghe :

There doesn't seem to exist a SOAP library for Python 3.x. Several different 
third party libraries exist for the 2.x releases, but none of these are being 
ported to 3.x. None of these modules are easily ported using 2to3 due to string 
encoding issues.

Seeing how SOAP is a major webservices technologies, I think Python should get 
its own standard SOAP module to keep up with its "batteries included" principle.

--
components: Library (Lib)
messages: 134064
nosy: Michiel.Van.den.Berghe
priority: normal
severity: normal
status: open
title: No SOAP libraries available for Python 3.x
versions: Python 3.2

___
Python tracker 

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



[issue11878] No SOAP libraries available for Python 3.x

2011-04-19 Thread Brian Curtin

Brian Curtin  added the comment:

This is something that should be handled on the trackers of any of the external 
SOAP libraries. If they are ported to Python 3 and are seen as best in class 
and are willing to move all development into the standard library, then 
inclusion could be considered.

It's unlikely that all of that will come together in time for the 3.3 release, 
as the library needs to be proven in the wild after being ported.

If someone does come up with a popular 3.x SOAP library, an email to python-dev 
or python-ideas would be enough to kick off an inclusion discussion.

--
nosy: +brian.curtin
resolution:  -> rejected
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



[issue8982] argparse docs cross reference Namespace as a class but the Namespace class is not documented

2011-04-19 Thread Éric Araujo

Éric Araujo  added the comment:

Attached patch adds a link target for :class:`Namespace` (already used in the 
docs) and adds a reference to it from for the first mentions of “namespace 
object”.

Use “hg import blah.diff” (after “hg up 3.2”) to get the patch in the repo 
directly (with checkin message and my committer name) or usual patch(1) if you 
want to make amendments.

--
keywords: +patch
Added file: http://bugs.python.org/file21723/fix-argparse-class-directive.diff

___
Python tracker 

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



[issue9896] Introspectable range objects

2011-04-19 Thread Éric Araujo

Éric Araujo  added the comment:

Looks good, apart from the use of assertEquals (deprecated in favor of 
assertEqual).  I’d also remove “merely” from the doc addition.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue11276] 2to3: imports fixer doesn't update references to modules specified without attributes

2011-04-19 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue11863] Enforce PEP 11 - remove support for legacy systems

2011-04-19 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

> Most of these names will be removed in 3.3:
> http://bugs.python.org/issue11863

Yeah, I know. My patch should be updated if #11863 is fixed before this issue.

Updated patch:
 - add 'pthread_version' key to threading._info()
 - test_os uses threading._info() to check if we are using linuxthreads

--
Added file: http://bugs.python.org/file21724/threading_info-2.patch

___
Python tracker 

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



[issue11858] configparser.ExtendedInterpolation and section case

2011-04-19 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
stage:  -> test needed
versions: +Python 3.3

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Example on my Debian Sid:

>>> threading._info()
{'pthread_version': 'NPTL 2.11.2', 'use_semaphores': True, 'name': 'pthread'}

--

___
Python tracker 

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



[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used

2011-04-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Yeah, I know. My patch should be updated if #11863 is fixed before this issue.
> 
> Updated patch:
>  - add 'pthread_version' key to threading._info()
>  - test_os uses threading._info() to check if we are using linuxthreads

The path which sets "pthread_version" should be inside "#ifdef
_POSIX_THREADS".

Also, some comments about the doc:
- you need a "versionadded" tag
- "use_semaphores" should explain that these semaphores are used for
locks; also the alternative is "use mutexes and condition variables",
not "use mutexes"
- you should not document unsupported platform names ("lwp", etc.); they
are already disabled (#error)

--

___
Python tracker 

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



[issue11877] Mac OS X fsync() should really be fcntl(F_FULLFSYNC)

2011-04-19 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Traditionally the functions in os are thin wrappers around OS functions, this 
patch changes that for os.fsync.


Two nits wrt. the patch itself:
1) The behaviour on OSX should be documented in the stdlib reference,
   that currently says that os.fsync will call the C function fsync

2) The comment in the __APPLE__ case can be clearer, and should 
   explain the issue (as short as possible).


I'm -1 on merging this patch though, as the fsync function on OSX behaves just 
like the one on Linux, the fnctl option adds a stronger guarantee in that it 
forces a flush of the buffers on the storage device as well. The manpage for 
fsync on a linux host says:

   In case the hard disk has write cache enabled, the data may not really be on 
permanent storage when fsync/fdatasync return.

Adding the F_FULLSYNC option to os.fsync would be fine though (if it isn't 
already implemented)

The linux

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue11867] Make test_mailbox deterministic

2011-04-19 Thread R. David Murray

R. David Murray  added the comment:

I think the fix is to either put a try/except around the socket shutdown call, 
or to remove it entirely (I think things will still work right on linux without 
it).  If you leave the self.c_sock_close = True in, it should take care of the 
resource warning.

--

___
Python tracker 

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



[issue8933] Invalid detection of metadata version

2011-04-19 Thread Éric Araujo

Éric Araujo  added the comment:

“I’m putting this on standby until distutils2 is fully merged into the standard 
library and we have a clear workflow from packaging to d2 to d1.”

--

___
Python tracker 

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



[issue11879] TarFile.chown: should use TarInfo.uid if user lookup fails

2011-04-19 Thread Michael Gold

New submission from Michael Gold :

In TarFile.chown, if the lookup
  u = pwd.getpwnam(tarinfo.uname)[2]
fails, this line is used:
  u = pwd.getpwuid(tarinfo.uid)[2]

This will fail if the uid isn't in /etc/passwd.  I think "u = tarinfo.uid" 
would make more sense.  This fallback could also be used if the pwd module 
isn't present or tarinfo.uname isn't filled.  Here's a code sample:
u = tarinfo.uid
if tarinfo.uname and pwd:
try: u = pwd.getpwnam(tarinfo.uname)[2]
except KeyError: pass

The same issue applies to group lookup.

--
components: Library (Lib)
messages: 134074
nosy: mgold-qnx
priority: normal
severity: normal
status: open
title: TarFile.chown: should use TarInfo.uid if user lookup fails
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-19 Thread Éric Araujo

Éric Araujo  added the comment:

Can you remove all obsolete repositories and patches from this report and 
upload one complete patch?

--

___
Python tracker 

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



[issue828450] sdist generates bad MANIFEST on Windows

2011-04-19 Thread higery

higery  added the comment:

I'm not sure it is necessary to use TempdirManager here to write tests for 
MANIFEST reading.
The attachment is the test diff file against my last patch with the latest 
version.

Detail:
Step 1: Write sample MANIFEST strings to the MANIFEST file with '/' as 
separator and get the filelist of this file(actually just created from the 
sample strings)
Step 2: Change the os.sep to '\' and then run the sdist command, and a FileList 
will be generated. Bad effect is MANIFEST file will be re-written: 
write_manifest function called(method calling route: 
run->get_file_list->write_manifest). Because the content in MANIFEST has 
already been changed, we can just use the FileList object to get the filelist, 
instead of construct it from reading MANIFEST file again as other tests do.
Step 3: Compare filelist_1 generated in Step1 with filelist_2 in Step2, making 
sure that we have replace '\' with '/' for filelist_2. Yes, we just compare the 
content to make sure that we has done right thing and reading MANIFEST file 
with '/' as separator on the platform which os.sep is '\' is ok.

That's all.

--
Added file: http://bugs.python.org/file21725/test_manifest_reading_sdist.diff

___
Python tracker 

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



[issue11880] add a {dist-info} category to distutils2

2011-04-19 Thread dholth

New submission from dholth :

In distutils2 there is currently no way to add files such as egg_info.txt that 
should be part of the package metadata. A new category named the same as the 
.dist-info directory would be a nice way to do it.

distutils2 should raise an error if any of the reserved files are overwritten 
with this feature or it should just copy these first overwriting with the 
reserved names.

It might be a good idea to disallow subdirectories in dist-info.

--
assignee: tarek
components: Distutils2
messages: 134077
nosy: alexis, dholth, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: add a {dist-info} category to distutils2
type: feature request

___
Python tracker 

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



[issue828450] sdist generates bad MANIFEST on Windows

2011-04-19 Thread Éric Araujo

Éric Araujo  added the comment:

> I'm not sure it is necessary to use TempdirManager here to write tests
> for MANIFEST reading.

Well, the sdist command has to run on some directory where some files exist, 
right?  So it’s better to do it in a temp dir that will automatically get 
cleaned up.

> Bad effect is MANIFEST file will be re-written:

You should read the docs for MANIFEST and sdist: a MANIFEST without the magic 
comment will not get overwritten (unless there’s a bug :)

--

___
Python tracker 

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



[issue11875] OrderedDict.__reduce__ not threadsafe

2011-04-19 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 3150b6939731 by Raymond Hettinger in branch '2.7':
Issue 11875: Keep OrderedDict's __reduce__ from temporarily mutating the object.
http://hg.python.org/cpython/rev/3150b6939731

--
nosy: +python-dev

___
Python tracker 

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



[issue11880] add a {dist-info} category to distutils2

2011-04-19 Thread Éric Araujo

Éric Araujo  added the comment:

This feature is two-fold: add a method to install_distinfo to make it write 
some data in some file; add a new resource category.

--
assignee: tarek -> eric.araujo

___
Python tracker 

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



[issue10596] modulo operator bug

2011-04-19 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Uncle Timmy, was this the right thing to do?

--
assignee: mark.dickinson -> tim_one
nosy: +rhettinger, tim_one

___
Python tracker 

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



[issue8426] multiprocessing.Queue fails to get() very large objects

2011-04-19 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> IMO, it would be nice if I could ask my queue, "Just what is your capacity
(in bytes, not entries) anyways?  I want to know how much I can put in here
without worrying about whether the remote side is dequeueing."  I guess I'd
settle for explicit documentation that the bound exists.

It is documented.
See the comment about the "underlying pipe".

>  But how should I
expect my code to be portable?  Are there platforms which provide less than
64k?  Less than 1k?  Less than 256 bytes?

It depends :-)
If the implementation is using pipes, under Linux before 2.6.9 (I think), a 
pipe was limited by the size of a page, i.e. 4K on x86.
Now, it's 64K.
If it's a Unix socket (via socketpair), the maximum size can be set through 
sysctl, etc.
So you can't basically state a limit, and IMHO, you should't be concerned with 
that if you want your code to be portable.
I find the warning excplicit enough, be that's maybe because I'm familiar with 
this low-level details.

--

___
Python tracker 

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



[issue11849] ElementTree memory leak

2011-04-19 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> BTW, after utilize lxml instead of ElementTree, such phenomenon of increasing 
> memory usage disappeared.

If you looked at the link I posted, you'll see that lxml had some similar 
issues and solved it by calling malloc_trim systematically when freeing memory.
It could also be heap fragmentation, though.

To go further, it'd be nice if you could provide the output of
valgrind --tool=memcheck --leak-check=full 
--suppressions=Misc/valgrind-python.supp python 
after uncommenting relevant lines in Misc/valgrind-python.supp (see 
http://svn.python.org/projects/python/trunk/Misc/README.valgrind ).
It will either confirm a memory leak or malloc issue (I still favour the later).

By the way, does

while True:
XML(gen_xml())

lead to a constant memory usage increase ?

--

___
Python tracker 

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



[issue11877] Mac OS X fsync() should really be fcntl(F_FULLFSYNC)

2011-04-19 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

I know that POSIX makes no guarantee regarding durable writes, but IMHO that's 
definitely wrong, in the sense that when one calls fsync, he expects the data 
to be committed to disk and be durable.
Fixing this deficiency through Python's exposed fsync might thus be a good idea 
(for example, the Window version probably doesn't call fsync, so it's already 
not a direct mapping).

--
nosy: +neologix

___
Python tracker 

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



[issue11875] OrderedDict.__reduce__ not threadsafe

2011-04-19 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 50a89739836f by Raymond Hettinger in branch '3.1':
Issue 11875: Keep OrderedDict's __reduce__ from temporarily mutating the object.
http://hg.python.org/cpython/rev/50a89739836f

New changeset a7ac7a7c8c78 by Raymond Hettinger in branch '3.2':
Issue 11875: Keep OrderedDict's __reduce__ from temporarily mutating the object.
http://hg.python.org/cpython/rev/a7ac7a7c8c78

New changeset 928f17923b0d by Raymond Hettinger in branch 'default':
Issue 11875: Keep OrderedDict's __reduce__ from temporarily mutating the object.
http://hg.python.org/cpython/rev/928f17923b0d

New changeset 937385024601 by Raymond Hettinger in branch '3.2':
Issue 11875: Keep OrderedDict's __reduce__ from temporarily mutating the object.
http://hg.python.org/cpython/rev/937385024601

--

___
Python tracker 

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



[issue11828] startswith and endswith don't accept None as slice index

2011-04-19 Thread Torsten Becker

Torsten Becker  added the comment:

Hi, Jesús, I merged the patch up in the branches 
"startswith-slices-issue11828-3.2" [1] and "startswith-slices-issue11828-3.3" 
[2] in my hg repository.

[1]: https://bitbucket.org/t0rsten/cpython/changeset/49028581e43a
[2]: https://bitbucket.org/t0rsten/cpython/changeset/eafafe258362

--

___
Python tracker 

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



[issue11881] Add list.get

2011-04-19 Thread Filip Gruszczyński

New submission from Filip Gruszczyński :

I have proposed on Core Mentorship list to add get(index, default) method to 
list object. I was suggested to bring it up here and also told, that improving 
operator module could be a better solution. This is why I would like to ask, if 
it makes sense to work on this?

I attach a patch for list objects. I would post a link to Core Mentorship 
thread, but I believe the archive is private.

The original idea came from a question on StackOverflow: 
http://stackoverflow.com/questions/2492087/how-to-get-the-nth-element-of-a-python-list-or-a-default-if-not-available

--
components: Interpreter Core
files: list.get.patch
keywords: patch
messages: 134087
nosy: gruszczy
priority: normal
severity: normal
status: open
title: Add list.get
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file21726/list.get.patch

___
Python tracker 

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



[issue11881] Add list.get

2011-04-19 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Sorry, this has come up before and was rejected.

--
nosy: +rhettinger
resolution:  -> 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



[issue11875] OrderedDict.__reduce__ not threadsafe

2011-04-19 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Mario, I removed the unnecessary mutation, but remember that OrderedDict's are 
not thread-safe in general.  Anything that updates an OrderedDict will 
temporarily leave it in an inconsistent state while the links and mappings are 
being updated.  

That being said, it isn't hard to create a subclass with a lock around each of 
the mutating methods: setitem, delitem, clear, popitem, pop, move_to_end, 
setdefault, init, and update.

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



[issue11881] Add list.get

2011-04-19 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

What did you have in mind for the operator module?

--

___
Python tracker 

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



[issue11882] test_imaplib failed on x86 ubuntu

2011-04-19 Thread Kasun Herath

New submission from Kasun Herath :

test_imaplib failed on x86 ubuntu machine with following error(s)

==
FAIL: test_Internaldate2tuple (test.test_imaplib.TestImaplib)
--
Traceback (most recent call last):
  File "/home/kasun/workplace/cpython/Lib/test/test_imaplib.py", line 31, in 
test_Internaldate2tuple
self.assertEqual(time.mktime(tt), t0)
AssertionError: 946683000.0 != 946684800

--
Ran 2 tests in 0.002s

FAILED (failures=1)
test test_imaplib failed -- Traceback (most recent call last):
  File "/home/kasun/workplace/cpython/Lib/test/test_imaplib.py", line 31, in 
test_Internaldate2tuple
self.assertEqual(time.mktime(tt), t0)
AssertionError: 946683000.0 != 946684800

1 test failed:
test_imaplib

--
components: Tests
messages: 134091
nosy: kasun
priority: normal
severity: normal
status: open
title: test_imaplib failed on x86 ubuntu
versions: Python 3.3

___
Python tracker 

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



[issue11881] Add list.get

2011-04-19 Thread Filip Gruszczyński

Filip Gruszczyński  added the comment:

Nick Coghlan suggested, that operator.getitem could be extended to accept 
default value. How does it sound to you?

--

___
Python tracker 

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



[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-19 Thread Prashant Kumar

Changes by Prashant Kumar :


Removed file: http://bugs.python.org/file21720/test_command_sdist.diff

___
Python tracker 

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



[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-19 Thread Prashant Kumar

Changes by Prashant Kumar :


Removed file: http://bugs.python.org/file21721/fix-manifest.diff

___
Python tracker 

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



  1   2   >