[issue9767] Failures in json doc examples

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

FWIW if something is fixed, it should be the json output.  However, I can 
imagine (without looking at the code) that this would mean a lot of special 
casing.

--

___
Python tracker 

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



[issue9775] Multiprocessing, logging and atexit play not well together

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

I'll sort this out with Armin.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue9775] Multiprocessing, logging and atexit play not well together

2010-09-05 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> georg.brandl
priority: normal -> high
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

I don't think this should block 3.2a2.

+1 for supporting LLVM in general.  BTW, why doesn't it build because of 
warnings?

--
nosy: +georg.brandl
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue9779] argparse.ArgumentParser not support unicode in print help

2010-09-05 Thread gkraser

New submission from gkraser :

argparse.ArgumentParser not support unicode in print help.

Example:

# -*- coding: utf-8 -*-
import argparse
import unittest

class Test1(unittest.TestCase):
def test_unicode_desc(self):
h = u'Rus Рус'  # unicode
print h # ok
parser = argparse.ArgumentParser(description=h)
parser.print_help() # error

--
components: Library (Lib)
files: test_ap.py
messages: 115630
nosy: gkraser
priority: normal
severity: normal
status: open
title: argparse.ArgumentParser not support unicode in print help
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file18757/test_ap.py

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ned Deily

Ned Deily  added the comment:

It's not just LLVM.  Building a standard OS X installer on OS X 10.5 or 10.6 
(gcc-4.0, 10.4u SDK, i386/ppc, deployment target=10.3), _ctypes fails:

*** WARNING: renaming "_ctypes" since importing it failed: 
dlopen(build/lib.macosx-10.3-fat-3.2/_ctypes.so, 2): Symbol not found: 
_ffi_closure_alloc

That is definitely a regression.

--
nosy: +ned.deily

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ned Deily

Ned Deily  added the comment:

It's not just LLVM.  Building a standard OS X installer on OS X 10.5 (gcc-4.0, 
10.4u SDK, i386/ppc, deployment target=10.3) or 10.6 (gcc-4.2, 10.6 SDK, 
i386/x86_64, dept target 10.6), _ctypes fails:

*** WARNING: renaming "_ctypes" since importing it failed: 
dlopen(build/lib.macosx-10.3-fat-3.2/_ctypes.so, 2): Symbol not found: 
_ffi_closure_alloc

That is definitely a regression.

--

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ned Deily

Changes by Ned Deily :


--
Removed message: http://bugs.python.org/msg115631

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

OK.  Assigning to Ronald for now; he'll have to deal with it when building the 
binaries anyway.

--
assignee: theller -> ronaldoussoren
nosy: +ronaldoussoren

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

Patch looks like it at least can't make things worse to me.  linker_exe should 
probably also get LDFLAGS (but not LDSHARED).

--
nosy: +georg.brandl

___
Python tracker 

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



[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

Once again, this is not important enough block 3.2a2.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

Deferring for 3.2a2.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

The Unicode import system won't be put in place before 3.2a2, deferring.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

It is however not important enough to block 3.2a2.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Correct. So it either needs to happen before 3.2, or wait until 4.0,

Shouldn't there be a provision for ABI versioning?
Or do you suggest bumping to the next major number (4.0, 5.0...) be done on the 
basis of ABI changes?

--

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Łukasz Langa

Łukasz Langa  added the comment:

This was broken in r83837 with a patch for issue #5504.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Łukasz Langa

Changes by Łukasz Langa :


--
Removed message: http://bugs.python.org/msg115640

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Łukasz Langa

Łukasz Langa  added the comment:

This was broken in r83837 with a patch for issue #5504.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Other patch, fixes all failures.

--
Added file: http://bugs.python.org/file18758/m32-2.patch

___
Python tracker 

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



[issue3978] ZipFileExt.read() can be incredibly slow; patch included

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch has been outdated by other independent performance work on the 
zipfile module. In Python 3.2, the zipfile module is actually slightly faster 
than the "unzip" program:

- first with the supplied "zeroes.zip" file:

$ rm -f zeroes && time -p unzip -e zeroes.zip
Archive:  zeroes.zip
  inflating: zeroes  
real 0.56
user 0.50
sys 0.06

$ time -p ./python -m zipfile -e zeroes.zip .
real 0.45
user 0.34
sys 0.10

- Then with a 100MB random file:

$ rm -f random && time -p unzip -e random.zip
Archive:  random.zip
  inflating: random  
real 0.69
user 0.61
sys 0.07

$ rm -f random && time -p ./python -m zipfile -e random.zip .
real 0.33
user 0.18
sys 0.14

--
resolution:  -> out of date
status: open -> closed
versions: +Python 3.2 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The whole approach doesn't seem to bear much fruit. I tried to apply again 
likely_decref.diff and got a 0% performance change on 3.2 (on a Core i3 
processor).

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



[issue4194] default subprocess.Popen buffer size

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The subprocess doc now has a note about buffering and performance issues, 
closing.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Closing: Neil's algorithm is not different from what is already in 3.2, except 
for the additional type_attrcache_callback() which probably doesn't make a 
difference in normal workloads.

--
resolution: accepted -> out of date
status: open -> closed

___
Python tracker 

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



[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-09-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Fixing the alloc_closure error is easy enough:


Index: ../setup.py
===
--- ../setup.py (revision 84528)
+++ ../setup.py (working copy)
@@ -1653,7 +1653,9 @@
'_ctypes/callbacks.c',
'_ctypes/callproc.c',
'_ctypes/stgdict.c',
-   '_ctypes/cfield.c']
+   '_ctypes/cfield.c',
+   '_ctypes/malloc_closure.c',
+   ]
 depends = ['_ctypes/ctypes.h']
 
 if sys.platform == 'darwin':


That's not enough to make it possible to build ctypes on OSX though, I now get 
the same error for a different symbol:


*** WARNING: renaming "_ctypes" since importing it failed: 
dlopen(build/lib.macosx-10.6-fat-3.2/_ctypes.so, 2): Symbol not found: 
_ffi_prep_closure_loc
  Referenced from: 
/Users/ronald/Projects/python/python-3.x/build/build/lib.macosx-10.6-fat-3.2/_ctypes.so
  Expected in: flat namespace
 in 
/Users/ronald/Projects/python/python-3.x/build/build/lib.macosx-10.6-fat-3.2/_ctypes.so

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-09-05 Thread Łukasz Langa

Łukasz Langa  added the comment:

Please find attached a "fix" for #9662. Some explanation is in order:

- the Windows, Linux and OS X implementations of FFI included in the SVN are 
different in terms of maturity
- Thomas originally when fixing #5504 used a bit of functionality regarding 
closures that wasn't there in the Windows and OS X versions
- he did some dirty hacking on the Windows version to make it work: changed the 
ffi_prep_closure function header to ffi_prep_closure_loc (leaving the old 
implementation) and introduced names for ffi_closure_alloc and ffi_closure_free
- he didn't touch the OS X version so it failed

I did more-less the same thing but in case of OS X we have many 
ffi_prep_closure implementations for different archs so I simply did an #ifdef 
in the place ffi_prep_closure is used.

I think a better solution ultimately would be to update all implementation to 
FFI 3.0.9 and be done with it. Still, the current patch works for me.

--
Added file: http://bugs.python.org/file18759/issue9662.patch

___
Python tracker 

___Index: setup.py
===
--- setup.py(revision 84528)
+++ setup.py(working copy)
@@ -1657,6 +1657,7 @@
 depends = ['_ctypes/ctypes.h']
 
 if sys.platform == 'darwin':
+sources.append('_ctypes/malloc_closure.c')
 sources.append('_ctypes/darwin/dlfcn_simple.c')
 extra_compile_args.append('-DMACOSX')
 include_dirs.append('_ctypes/darwin')
Index: Modules/_ctypes/libffi_osx/include/ffi.h
===
--- Modules/_ctypes/libffi_osx/include/ffi.h(revision 84528)
+++ Modules/_ctypes/libffi_osx/include/ffi.h(working copy)
@@ -264,6 +264,9 @@
void(*fun)(ffi_cif*,void*,void**,void*),
void*   user_data);
 
+void ffi_closure_free(void *);
+void *ffi_closure_alloc (size_t size, void **code);
+
 typedef struct ffi_raw_closure {
chartramp[FFI_TRAMPOLINE_SIZE];
ffi_cif*cif;
@@ -349,4 +352,4 @@
 }
 #endif
 
-#endif // #ifndef LIBFFI_H
\ No newline at end of file
+#endif // #ifndef LIBFFI_H
Index: Modules/_ctypes/malloc_closure.c
===
--- Modules/_ctypes/malloc_closure.c(revision 84528)
+++ Modules/_ctypes/malloc_closure.c(working copy)
@@ -106,7 +106,6 @@
 return NULL;
 item = free_list;
 free_list = item->next;
-   *codeloc = (void *)item;
+*codeloc = (void *)item;
 return (void *)item;
 }
-
Index: Modules/_ctypes/callbacks.c
===
--- Modules/_ctypes/callbacks.c (revision 84528)
+++ Modules/_ctypes/callbacks.c (working copy)
@@ -416,9 +416,13 @@
  "ffi_prep_cif failed with %d", result);
 goto error;
 }
+#if defined(X86_DARWIN) || defined(POWERPC_DARWIN)
+result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p);
+#else
 result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
  p,
  p->pcl_exec);
+#endif
 if (result != FFI_OK) {
 PyErr_Format(PyExc_RuntimeError,
  "ffi_prep_closure failed with %d", result);
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I'm looking into this issue.

One problem is that the version of libffi used on OSX is no longer in sync with 
the version that is used on other platforms. The version that is used on OSX 
does not have some of the symbols expected by ctypes, such as 
'ffi_prep_closure_loc'.

--

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Łukasz Langa

Łukasz Langa  added the comment:

Ronald, please see #5504.

--

___
Python tracker 

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



[issue1677872] Efficient reverse line iterator

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Suggestions:

- do it on BufferedReader, rather than TextIOWrapper: if you want full-speed 
scanning of log files, you probably want to open them in binary mode

- rather than implementing a full-blown iterator, you can start with simple 
primitives: e.g. a method called readprevline() (or even scan_back() if you 
want to make the stop character(s) configurable)

--

___
Python tracker 

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



[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-09-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Łukasz' patch fixes the issue for me.

As the patch only affects code-paths used on OSX (patches to the libffi version 
for OSX and an #ifdef that makes OSX use ffi_prep_closure instead of 
ffi_prep_closure_loc) I intend to commit the patch later today to be able to 
build a working copy of the OSX installer for the next alpha release.

I'm at best -0 on moving all platforms to libffi 3.0.9. 'libffi_osx' works 
properly on OSX and I have no idea whether all changes in that fork of libffi 
have been merged back into the canonical version.

--

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Thanks! That patch fixes the issue for me and I will commit it later today.

--

___
Python tracker 

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



[issue1677872] Efficient reverse line iterator

2010-09-05 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue5412] extend configparser to support mapping access(__*item__)

2010-09-05 Thread Łukasz Langa

Changes by Łukasz Langa :


Removed file: http://bugs.python.org/file18441/issue5412.diff

___
Python tracker 

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



[issue5412] extend configparser to support mapping access(__*item__)

2010-09-05 Thread Łukasz Langa

Łukasz Langa  added the comment:

Patch updated to avoid fuzzes from other commits.

--
Added file: http://bugs.python.org/file18760/issue5412.diff

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-09-05 Thread Case Van Horsen

Changes by Case Van Horsen :


--
nosy: +casevh

___
Python tracker 

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



[issue9739] Output of help(...) is wider than 80 characters

2010-09-05 Thread Case Van Horsen

Case Van Horsen  added the comment:

I edited the doc string for math.modf since an indent of 8 spaces is used for 
the doc string with help(math). An indent of 4 spaces is used with 
help(math.modf).

I've attached a new patch for just the math module that includes the return 
type as part of signature line, corrects the width issues, and uses a 
consistent format for defining the doc strings.

--
Added file: http://bugs.python.org/file18761/math_docstring.diff

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-09-05 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Am 05.09.2010 13:12, schrieb Antoine Pitrou:
> 
> Antoine Pitrou  added the comment:
> 
>> Correct. So it either needs to happen before 3.2, or wait until 4.0,
> 
> Shouldn't there be a provision for ABI versioning?

There is certainly support for ABI versioning; the ABI version defined
in the PEP is called "python3.dll".

> Or do you suggest bumping to the next major 
> number (4.0, 5.0...) be done on the basis of ABI changes?

No, vice versa. The PEP promises that the ABI won't change until Python
4. For any change that might break the ABI, either a
backwards-compatible solution needs to be found, or the change be
deferred to Python 4.

--
title: Make hash values the same width as   a pointer (or   Py_ssize_t) -> 
Make hash values the same width as   a pointer   (or Py_ssize_t)

___
Python tracker 

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



[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

I would suggest making this change before the ABI freeze starts, then.

--

___
Python tracker 

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



[issue9747] os.getresgid() documentation mentions "user ids", not "group ids"

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r84530.

--
nosy: +georg.brandl
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



[issue9776] Inconsistent spacing in fcntl.fcntl docstring

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, applied in r84531.

--
nosy: +georg.brandl
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



[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-09-05 Thread Alan McIntyre

Alan McIntyre  added the comment:

Thanks for the patch, Craig; I should have some time later today or tomorrow to 
do a review.  Did you have a patch for the test suite(s) as well?  If not, I 
can just make sure your test case is covered in test_zipfile64.

--

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

I agree with Georg: The patch seems not to make things worse, and if it makes 
the tests pass, I think it should be committed. Antoine, you decide if you want 
to commit it now or wait for Tarek’s review.

--

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I agree with Georg: The patch seems not to make things worse, and if
> it makes the tests pass, I think it should be committed. Antoine, you
> decide if you want to commit it now or wait for Tarek’s review.

Well, ideally, someone should have knowledge of what is precisely needed
for these configuration variables. Otherwise the overall robustness of
distutils and friends won't really progress.

--

___
Python tracker 

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



[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

I agree. This expert is not me, and my reply was only pragmatic.

Martin: This is a bug about LDSHARED vs. LDFLAGS vs. PY_LDFLAGS vs. 
CONFIGURE_LDFLAGS. Could you maybe shed some light about the difference between 
these configure variables and review the small patch made by Antoine? Thanks.

--
nosy: +loewis

___
Python tracker 

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



[issue9217] 2to3 crashes with some doctests

2010-09-05 Thread Éric Araujo

Changes by Éric Araujo :


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



[issue9761] stale .pyc files aren't cleaned out

2010-09-05 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file18734/unnamed

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-05 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file18735/unnamed

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

Can you reproduce the bug with a newer Python? 2.6 only gets security fixes 
now, bug fixes go into stable (2.7 and 3.1) and active (3.2) versions.

(Minor remarks: Could you set up your email client not to send HTML email to 
the tracker? It creates unnamed files which are useless and distracting. Also, 
kindly strip email quotes before sending. Top-posting hinders readability. 
Thanks in advance, and thanks for the bug report.)

--
nosy: +eric.araujo

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-05 Thread Éric Araujo

Changes by Éric Araujo :


--
versions:  -Python 2.6

___
Python tracker 

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-09-05 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file18739/unnamed

___
Python tracker 

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

Bug fixes go into 2.7 but not 2.6. See msg115664.

--
nosy: +eric.araujo
versions:  -Python 2.6

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I've committed the patch in #5504 in r84535 (3.2) and that fixes this issue. 

The same problem affects 2.7, I'm currently running the testsuite with the 
backport of this commit.

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
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



[issue8420] Objects/setobject.c contains unsafe code

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

I’m doing the backport, I’ll assign back to Raymond when the patch is ready.

--
assignee: rhettinger -> eric.araujo
nosy: +eric.araujo
versions:  -Python 2.6

___
Python tracker 

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-05 Thread STINNER Victor

STINNER Victor  added the comment:

> Do we really want to support this kind of configuration?

There is also a problem is the directory name is b'py3k\xe9': at startup (utf-8 
encoding), the name is decoded to 'py3k\udce9'. When the locale encoding is set 
to iso-8859-1: the name should be reencoded to 'py3k\xe9' to avoid the 
surrogate character.

--

___
Python tracker 

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



[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses

2010-09-05 Thread David Watson

David Watson  added the comment:

> > baikie: why did the test pass for you?
> 
> The test passes (I assume) if linux-pass-unterminated.diff is applied. The 
> latter patch is only meant to exhibit the issue, though, not to be checked in.

No, I meant for linux-pass-unterminated.diff to be checked in so
that applications could always send datagrams back to the address
they got them from, even when it was 108 bytes long.  As it is
run only on Linux, testMaxPathLen does not leave space for a null
terminator because Linux just ignores it (that is what makes it
possible to bind to a 108-byte address and thus trigger the bug).

--
title: socket: Buffer overrun while reading unterminated AF_UNIX
addresses -> socket: Buffer overrun while reading unterminated AF_UNIX addresses

___
Python tracker 

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



[issue9748] .inputrc magic-space breaks interactive mode

2010-09-05 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

I didn't know what "magic space" is. But a quick google search shows that it is 
specific to Bash.

in http://www.ukuug.org/events/linux2003/papers/bash_tips/#S16
"""
There are other readline-based programs without this feature, so make it only 
apply in Bash:

$if Bash
  Space: magic-space
$endif

For example the MySQL client and the Perl debugger can also use the readline 
library.
"""

Python also uses the readline library; you should add the "$if Bash".

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> pending

___
Python tracker 

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



[issue9756] Crash with custom __getattribute__

2010-09-05 Thread Meador Inge

Meador Inge  added the comment:

> To fix the segfault, I suppose that we use a more strict validation on 
> the input type. Eg. Use PyUnicode_Check() instead of 
> PyObject_IsInstance()?

Where would the more strict validation take place?  This problem is not unique 
to Unicode objects:

motherbrain:py3k minge$ ./python.exe 
Python 3.2a2 (py3k:84541, Sep  5 2010, 15:11:19) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class MyClass(object):
...def __init__(self):
...   self.pwn = None
...def __getattribute__(self, name):
...   return getattr(187, name)
... 
[49633 refs]
>>> instance = MyClass()
[49640 refs]
>>> int.bit_length(instance)
Assertion failed: (PyLong_Check(v)), function long_bit_length, file 
Objects/longobject.c, line 4397.
Abort trap

--
nosy: +meador.inge

___
Python tracker 

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



[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-09-05 Thread Craig de Stigter

Craig de Stigter  added the comment:

Hi, sorry no I haven't had time to add a real test for this

--

___
Python tracker 

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



[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses

2010-09-05 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

baikie, coming back to your original message: what precisely makes you believe 
that sun_path does not need to be null-terminated on Linux?

--

___
Python tracker 

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



[issue4388] test_cmd_line fails on MacOS X

2010-09-05 Thread Skip Montanaro

Skip Montanaro  added the comment:

Any progress on this?  Is the best thing to just set LANG?

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue9748] .inputrc magic-space breaks interactive mode

2010-09-05 Thread stephenk

stephenk  added the comment:

Didn't know about the inputrc conditional; that works.  I verified that 
magic-space (without the conditional) also interferes with mysql, so this seems 
like less of an oversight on the side of python and more of a bash-user-beware 
situation.

Anyway, thanks for the workaround!

--
status: pending -> open

___
Python tracker 

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



[issue6656] locale.format_string fails on escaped percentage

2010-09-05 Thread R. David Murray

R. David Murray  added the comment:

Well, I let this bake so long I missed 2.6, but I've backported the fix to 3.1 
in r84543.

--
status: open -> closed

___
Python tracker 

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



[issue1467619] Header.decode_header eats up spaces

2010-09-05 Thread R. David Murray

Changes by R. David Murray :


--
priority: high -> normal

___
Python tracker 

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



[issue9293] Unsupported IO operations should raise UnsupportedOperation

2010-09-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r84544.

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



[issue9780] fill character cannot be '{'

2010-09-05 Thread Florent Xicluna

New submission from Florent Xicluna :

According to the documentation:
"The fill character can be any character other than ‘}’ (which signifies the 
end of the field)."
http://docs.python.org/dev/library/string.html#format-specification-mini-language


However the format() builtin accepts both '{' and '}' characters:

>>> format(42, '}^6')
'}}42}}'

>>> format(42, '{^6')
'{{42{{'


And the string method rejects both characters.

>>> '{:}^6}'.format(42)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Single '}' encountered in format string

>>> '{:{^6}'.format(42)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: unmatched '{' in format

--
assignee: d...@python
components: Documentation
messages: 115678
nosy: d...@python, flox
priority: normal
severity: normal
stage: needs patch
status: open
title: fill character cannot be '{'
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue9780] fill character cannot be '{'

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

Looks more like a behavior bug than a doc bug to me. Does the doc comply with 
the PEP?

--
nosy: +eric.araujo, eric.smith

___
Python tracker 

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



[issue1343] XMLGenerator: nice elements

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

Patch looks good to me.

--

___
Python tracker 

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



[issue1222585] C++ compilation support for distutils

2010-09-05 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
versions: +Python 2.5, Python 2.6, Python 3.1 -Python 3.3

___
Python tracker 

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



[issue9780] fill character cannot be '{'

2010-09-05 Thread Florent Xicluna

Florent Xicluna  added the comment:

The PEP 3101 does not prohibit any character for the 'fill' argument.

Another example which just works:

>>> '{:{fill}^6}'.format(42, fill='{')
'{{42{{'

>>> '{:{fill}^6}'.format(42, fill='}')
'}}42}}'


I don't care if '{' and '}' are prohibited when using simple formatting syntax. 
 This is not a common use case, and there are workarounds (either using 
format() builtin or the recursive formatting).

A documentation fix could be enough.

--

___
Python tracker 

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



[issue8524] SSL sockets do not retain the parent socket's attributes

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

In case someone lands here from the 3.2 what’s new document: The method has 
been renamed to detach.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue1552880] [Python2] Use utf-8 in the import machinery on Windows to support unicode paths

2010-09-05 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Well, it was, originally, but it met with so little interest that I couldn't be 
bothered to polish it to inclusion standards.  Anyway, there was the 
incompatibility problem of what to do with the __file__ attribute, and the fact 
that the patch was Windows only.

Do we have a place where we can put in working patches for people to use at 
their own risk, without going through all the hoops of a successful python.org 
checkin?

--

___
Python tracker 

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



[issue7418] hashlib : the names of the different hash algorithms

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

Could the module also grow an attribute listing all available algos, or 
non-guaranteed algos? (Please tell me if I should open a new report.)

--
nosy: +eric.araujo

___
Python tracker 

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



[issue9780] fill character cannot be '{'

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for clarifying.

--

___
Python tracker 

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



[issue1552880] [Python2] Use utf-8 in the import machinery on Windows to support unicode paths

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

There is no such place that I know of, sorry.

--
stage:  -> committed/rejected

___
Python tracker 

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



[issue1466065] base64 module ignores non-alphabet characters

2010-09-05 Thread R. David Murray

R. David Murray  added the comment:

Comments on patch:

1) if I'm reading the RFC correctly, to be validating strictly in compliance 
with the RFC \r and \n should also raise an error.  Do you agree?

2) We've pretty much dropped the convention of adding history notes to the file 
itself.

3) The original code documented a TypeError on incorrect padding but in py3k in 
fact raises a binascii.Error, as you noted in the patch.  I wonder if it would 
be better to raise a binascii.Error on invalid data as well, since it isn't, 
strictly speaking, a TypeError.  That would also make it easier to move the 
code into the C module later if that is deemed desirable.

4) The negative in the doc language ("If validate is not set to True...") is 
awkward and confusing.  Better would be "If validate is False (the default)..."

Since the patch does add an API change (AKA a feature) I think this can only go 
into 3.2.

I have some additional concerns when considering this in the context of email6. 
 email6 will have a 'strict' mode where it would be sensible for invalid base64 
to raise an error.  But in non-strict mode, it would be ideal to have a way to 
(a) know if there is invalid input, but still decode it, and (b) decode it even 
if the padding is off after ignoring the invalid data.  I'm not saying that 
this patch should try to address those issues, I just want to put them on 
record in case I want to do something about them later.

--
assignee:  -> r.david.murray
versions:  -Python 2.7, Python 3.1

___
Python tracker 

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



[issue9733] Can't iterate over multiprocessing.managers.DictProxy

2010-09-05 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +asksol

___
Python tracker 

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



[issue7418] hashlib : the names of the different hash algorithms

2010-09-05 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Sounds like a good idea.  frozensets for both.

--

___
Python tracker 

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



[issue7418] hashlib : the names of the different hash algorithms

2010-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the reply. Reopening.

I cannot propose a patch since I don’t know how to introspect OpenSSL (or how 
to write C, for that matter).

--
stage:  -> needs patch
status: closed -> open

___
Python tracker 

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



[issue4769] b64decode should accept strings or bytes

2010-09-05 Thread R. David Murray

R. David Murray  added the comment:

After thinking about it, I'm inclined to reject this and say that quopri should 
be fixed to reject string input to decode.  On python-dev Guido opined that a 
kind of polymorphism in the stdlib was good (bytes in --> bytes out, string in 
--> string out).  string in --> bytes out and bytes in --> string out was 
considered bad, to my understanding (except for unicode encode/decode, of 
course).

As you say, all one has to do is encode the string as ascii to get the bytes to 
pass in.  It is better, I think, to maintain the clear distinction between 
bytes and strings in the programmers mind.  That's what Python3 is all about, 
really.

As for "the whole point of base64 is to safely encode binary data into text 
characters", that is not true.  The point is to encode binary data into a 
subset of *ascii*, which is *not* text, it is bytes.  The fact that this is 
also useful for transferring binary data through unicode is pretty much an 
unintended consequence of the way unicode is designed.

--
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> pending
type: behavior -> feature request

___
Python tracker 

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



[issue9741] msgfmt.py generates invalid mo because msgfmt.make() does not clear dictionary

2010-09-05 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +loewis

___
Python tracker 

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



[issue1552880] [Python2] Use utf-8 in the import machinery on Windows to support unicode paths

2010-09-05 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Having patches in the tracker is fine to me. Even if the patch is closed, it's 
still available.

Of course, there are many ways to publish code on the net: you could post the 
patch to Rietveld, to the Python wiki, or publish an entire clone to bitbucket.

--

___
Python tracker 

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



[issue9780] fill character cannot be '{'

2010-09-05 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed docs in r84553.

(That builtin format() supports this is no surprise, and has no influence on 
the validity in format strings.)

--
nosy: +georg.brandl
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