[issue9127] subprocess.Popen.communicate() and SIGCHLD handlers

2011-02-02 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the problem report.  And thanks for noticing the fix.

--
nosy: +ned.deily
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed
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



[issue8914] Run clang's static analyzer

2011-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Nice work. I'm surprised there wasn't more dead code.

--
nosy: +rhettinger

___
Python tracker 

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



[issue9127] subprocess.Popen.communicate() and SIGCHLD handlers

2011-02-02 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

This has been fixed in 2.7 and 3.2 so I think that this issue can be closed.

--
nosy: +rosslagerwall

___
Python tracker 

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



[issue11105] Compiling evil ast crashes interpreter

2011-02-02 Thread Benjamin Peterson

New submission from Benjamin Peterson :

You don't want to know why I was thinking about this...

$ ./python 
Python 3.2rc2+ (py3k:88302, Feb  1 2011, 19:02:10) 
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0)
>>> e.operand = e
>>> compile(ast.Expression(e), "", "eval")
Segmentation fault

--
messages: 127783
nosy: benjamin.peterson
priority: low
severity: normal
status: open
title: Compiling evil ast crashes interpreter
type: crash
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue11071] What's New review comments

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



[issue1602] windows console doesn't print or input Unicode

2011-02-02 Thread David-Sarah Hopwood

David-Sarah Hopwood  added the comment:

Feedback from Julie Solon of Microsoft:

> These console functions share a per-process heap that is 64K. There is some 
> overhead, the heap can get fragmented, and calls from multiple threads all 
> affect how much is available for this buffer. 

> I am working to update the documentation for this function [WriteConsoleW] 
> and other affected functions with information along these lines, and will 
> post it within the next week or two.

I replied thanking her and asking for clarification:

When you say that the heap can get fragmented, is this true only when
there are concurrent calls to the console functions, or can it occur
even with single-threaded use? I'm trying to determine whether acquiring
a process-global lock while calling these functions would be sufficient
to ensure that the available heap space will not be unexpectedly low.
(This assumes that the functions not used outside the lock by other
libraries in the same process.)

ReadConsoleW seems also to be affected, incidentally.

I've asked for clarification about whether acquiring a process-global lock when 
using these functions ...
Julie

--

___
Python tracker 

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



[issue8914] Run clang's static analyzer

2011-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

Here is a patch that covers all of the relevant dead assignments that were 
detected.

--
keywords: +patch
Added file: http://bugs.python.org/file20660/clang_analyzer.diff

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis

Changes by John Dennis :


Added file: http://bugs.python.org/file20659/sdist_new

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis

Changes by John Dennis :


Added file: http://bugs.python.org/file20658/sdist.patch

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis

Changes by John Dennis :


Removed file: http://bugs.python.org/file20656/sdist_new

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis

Changes by John Dennis :


Removed file: http://bugs.python.org/file20655/sdist.patch

___
Python tracker 

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



[issue11090] Doc errors for unittest in Python 3.1

2011-02-02 Thread Éric Araujo

Éric Araujo  added the comment:

Patch to remove the section about command-line usage + other things new in 3.2.

--
keywords: +patch
Added file: http://bugs.python.org/file20657/fix-11090.diff

___
Python tracker 

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



[issue11090] Doc errors for unittest in Python 3.1

2011-02-02 Thread Michael Foord

Michael Foord  added the comment:

This incorrect section on unittest command line features was added by Eric 
according to svn blame.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2011-02-02 Thread Éric Araujo

Éric Araujo  added the comment:

Backported in r88324 and r88328.

--
resolution: accepted -> fixed
stage: patch review -> committed/rejected
status: pending -> closed

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis

Changes by John Dennis :


Added file: http://bugs.python.org/file20656/sdist_new

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis

Changes by John Dennis :


--
keywords: +patch
Added file: http://bugs.python.org/file20655/sdist.patch

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis

New submission from John Dennis :

The behaviour of sdist has changed dramatically in Python 2.7. Some projects 
prefer to maintain their own manifest file instead of utilizing automatic 
manifest generation from a template. The defined behaviour of sdist is to check 
for the presence of both a template and a manifest, if the template is absent 
but a manifest exists sdist is supposed to read the existing manifest, it no 
longer does this. Instead it creates a default file list with the catastrophic 
result of omitting the bulk of a projects files.  

It appears this bug was introduced in r81255 and is discussed in #8688. 
Unfortunately #8688 contained a number of different issues and was closed 
addressing only a subset of the problems. Changeset r83996 was introduced to 
prevent sdist from overwriting a project maintained manifest by testing for a 
comment at the head of the manifest file. It's not clear to me this was 
necessary because the write_manifest() should never have been called if the 
template was absent but a manifest existed.

Even after the application of changeset r83996 one of the fundamental problems 
in #8688 remained, the manifest is not read. The solution is to check for both 
the manifest and template (as was formerly done) and if the template is absent 
but the manifest exists then the manifest should be read.

I have made modifications to get_file_list() to reintroduce the defined 
behaviour. With the introduction of r83996 it is now legal syntax to have 
comments in the manifest however read_manifest() was not enhanced to account 
for the possible presence of comments. I also modified read_manifest() to 
handle comments.

These suggested fixes are attached as a patch against the current 2.7 
maintenance branch. I've also attached a file with the two modified methods 
because sometimes it's difficult to comprehend a patch.

--
assignee: tarek
components: Distutils
messages: 12
nosy: eric.araujo, jdennis, tarek
priority: normal
severity: normal
status: open
title: distutils sdist ignores MANIFEST
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



[issue9592] Limitations in objects returned by multiprocessing Pool

2011-02-02 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
type: crash -> behavior

___
Python tracker 

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



[issue10951] gcc 4.6 warnings

2011-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

Just a comment on those warnings about unused assignments; think about 
commenting them out instead of flat-out deleting them. When I ran clang over 
Python 2.7 I got some blow-back from deleting some assignments as some found 
them to be like documentation. In instances where the assignment helps explain 
what is going on it is best to just comment the code out.

--

___
Python tracker 

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



[issue7111] abort when stderr is closed

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On the second thought, as long as python used fd 2 as the "message stream of 
last resort", we should probably not allow it to run with fd 2 closed. The 
problem is that in this case fd 2 may become associated with a very important 
file contents of which you don't want to see replaced with a python error 
message.

--
title: abort when stderr is moved -> abort when stderr is closed

___
Python tracker 

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



[issue11103] Python 3.2 installer doesn't register file extensions on Windows 7

2011-02-02 Thread Brian Curtin

Brian Curtin  added the comment:

I don't think any changes were made around that feature, and it has always 
worked for the last few installations I've done. Please do follow up with your 
RC2 experience when you have a chance.

--

___
Python tracker 

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



[issue7111] abort when stderr is moved

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> If we want to allow for closed {stdin, stdout, stderr}, I'm not sure
> what the semantics should be. Should sys.std{in, out, err} be None? Or a
> file object which always throws an error?

I would say it should be a *pseudo*-file object which always throws a 
*descriptive* error.  Note that setting sys.stdout to None makes print() do 
nothing rather than report an error:

>>> sys.stdout = None
>>> print('abc')

See also issue6501.

--
nosy: +belopolsky

___
Python tracker 

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



[issue11103] Python 3.2 installer doesn't register file extensions on Windows 7

2011-02-02 Thread Darren

Darren  added the comment:

Perhaps it was just fixed in RC2?  I did my install last week with RC1.  My 
account has admin privileges and UAC is disabled on my machine.  There were no 
errors when I ran the installer.  Tomorrow I will try uninstalling RC1 and 
reinstalling RC2 to see if that makes a difference.

I definitely have no Edit with Idle option when I right click files.

--

___
Python tracker 

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



[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2011-02-02 Thread Sandro Tosi

Sandro Tosi  added the comment:

Jan, are you still interested in this?

--

___
Python tracker 

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



[issue10951] gcc 4.6 warnings

2011-02-02 Thread STINNER Victor

STINNER Victor  added the comment:

gcc 4.6 bug has been fixed (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47271). 
So setup.py can compile extensions using gcc 4.6, and here are new warnings:
---
building dbm using bdb
/home/haypo/prog/GIT/py3k/Modules/_pickle.c: In function 'load':
/home/haypo/prog/GIT/py3k/Modules/_pickle.c:5267:9: warning: case value '0' not 
in enumerated type 'enum opcode' [-Wswitch]
/home/haypo/prog/GIT/py3k/Modules/_csv.c: In function 'parse_grow_buff':
/home/haypo/prog/GIT/py3k/Modules/_csv.c:537:21: warning: operation on 
'self->field' may be undefined [-Wsequence-point]
/home/haypo/prog/GIT/py3k/Modules/_csv.c: In function 'join_check_rec_size':
/home/haypo/prog/GIT/py3k/Modules/_csv.c:1058:23: warning: operation on 
'self->rec' may be undefined [-Wsequence-point]
/home/haypo/prog/GIT/py3k/Modules/_posixsubprocess.c:4:0: warning: 
"_GNU_SOURCE" redefined [enabled by default]
./pyconfig.h:1151:0: note: this is the location of the previous definition
/home/haypo/prog/GIT/py3k/Modules/socketmodule.c: In function 
'socket_gethostbyname_ex':
/home/haypo/prog/GIT/py3k/Modules/socketmodule.c:3318:9: warning: variable 
'result' set but not used [-Wunused-but-set-variable]
/home/haypo/prog/GIT/py3k/Modules/socketmodule.c: In function 
'socket_gethostbyaddr':
/home/haypo/prog/GIT/py3k/Modules/socketmodule.c:3396:9: warning: variable 
'result' set but not used [-Wunused-but-set-variable]
/home/haypo/prog/GIT/py3k/Modules/_sqlite/connection.c: In function 
'_pysqlite_final_callback':
/home/haypo/prog/GIT/py3k/Modules/_sqlite/connection.c:676:15: warning: 
variable 'aggregate_class' set but not used [-Wunused-but-set-variable]
/home/haypo/prog/GIT/py3k/Modules/_sqlite/cursor.c: In function 
'pysqlite_cursor_dealloc':
/home/haypo/prog/GIT/py3k/Modules/_sqlite/cursor.c:129:9: warning: variable 
'rc' set but not used [-Wunused-but-set-variable]
/home/haypo/prog/GIT/py3k/Modules/_sqlite/statement.c: In function 
'pysqlite_statement_dealloc':
/home/haypo/prog/GIT/py3k/Modules/_sqlite/statement.c:372:9: warning: variable 
'rc' set but not used [-Wunused-but-set-variable]
/home/haypo/prog/GIT/py3k/Modules/_tkinter.c: In function 'PythonCmd':
/home/haypo/prog/GIT/py3k/Modules/_tkinter.c:2008:15: warning: variable 'self' 
set but not used [-Wunused-but-set-variable]
/home/haypo/prog/GIT/py3k/Modules/tkappinit.c: In function 'Tcl_AppInit':
/home/haypo/prog/GIT/py3k/Modules/tkappinit.c:29:15: warning: variable 
'main_window' set but not used [-Wunused-but-set-variable]
(...)
/home/haypo/prog/GIT/py3k/Modules/_ctypes/cfield.c: In function 
'PyCField_FromDesc':
/home/haypo/prog/GIT/py3k/Modules/_ctypes/cfield.c:55:29: warning: variable 
'length' set but not used [-Wunused-but-set-variable]
/home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function 
'mmap_resize':
/home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3193:5: 
warning: implicit declaration of function 'mremap' 
[-Wimplicit-function-declaration]
/home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3193:16: 
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
/home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function 
'sys_trim':
/home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3612:62: 
warning: comparison between pointer and integer [enabled by default]
---

--

___
Python tracker 

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



[issue11103] Python 3.2 installer doesn't register file extensions on Windows 7

2011-02-02 Thread Brian Curtin

Brian Curtin  added the comment:

Works for me. Just ran the 3.2 RC2 installer and did the following:

(type is like a Windows equivalent of `cat` on *nix) 

>type test.py
import sys
print(sys.version_info)

>test.py
sys.version_info(major=3, minor=2, micro=0, releaselevel='candidate', serial=2)


Additionally, "Edit with IDLE" shows up when right clicking on the file.

Did you get any errors when running the installer? What permissions does your 
account have?

--
components: +Windows
nosy: +brian.curtin

___
Python tracker 

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



[issue6465] email.feedparser regular expression bug (NLCRE_crack)

2011-02-02 Thread R. David Murray

R. David Murray  added the comment:

Looks good to me.  I've added the #6510 as superseder, though I doubt we'll 
ever make use of that info :)

--
superseder:  -> email feedparser.py CRLFLF bug: $ vs \Z

___
Python tracker 

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



[issue11103] Python 3.2 installer doesn't register file extensions on Windows 7

2011-02-02 Thread Darren

New submission from Darren :

The python installer should register the proper file type extensions. Files 
with .py extensions should have an "open" action associated with the python 
interpreter and there should also be an "Edit with IDLE" action associated with 
.py files as well.  I was able to configure both of these things manually on 
Windows XP but can not figure out how setup the "Edit with IDLE" action on 
Windows 7.

FWIW: I can run this command from a dos box and get the desired effect.
"C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -n -e "Test.py"
and I expect the command to be registered with the .py file extension would be
"C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -n -e "%1"


pythondb

The installer should just do this so python files have reasonable actions 
associated with them as soon as the install is complete.

--
components: IDLE, Installation
messages: 127767
nosy: darren
priority: normal
severity: normal
status: open
title: Python 3.2 installer doesn't register file extensions on Windows 7
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



[issue11089] ConfigParser 50x slower in 2.7

2011-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixed 3.1 in r88323.

--
assignee: georg.brandl -> rhettinger
resolution:  -> later
versions:  -Python 3.1

___
Python tracker 

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



[issue6465] email.feedparser regular expression bug (NLCRE_crack)

2011-02-02 Thread Sandro Tosi

Sandro Tosi  added the comment:

Lucky as I can be, I have 2.5.5 here and I can confirm that with this version 
the code above fails - so I think this issue can be closed as fixed by 
issue5610 (I hope I correctly set all the fields, if not please let me know :)).

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

___
Python tracker 

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



[issue11089] ConfigParser 50x slower in 2.7

2011-02-02 Thread Georg Brandl

Georg Brandl  added the comment:

3.2.1 should be fine.

--

___
Python tracker 

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



[issue6465] email.feedparser regular expression bug (NLCRE_crack)

2011-02-02 Thread R. David Murray

R. David Murray  added the comment:

My notes say that this bug is "similar to issue 5610", the fix for which made 
it in to 2.6.  I meant to come back and see if that fix fixed this bug, but I 
forgot.  The fix is different, so it is worth verifying that this test case 
fails in 2.5 but works subsequently.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue6501] Fatal error on startup with invalid PYTHONIOENCODING

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

The issue is not Windows specific, so I am changing the title to reflect that.  
 On OSX, for example, I get

$ PYTHONIOENCODING=xyz ./python.exe
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: xyz
Abort trap

I agree that abort() is too drastic for a typo in the environment variable 
setting, but ignoring it silently is not a good option either.  Someone setting 
PYTHONIOENCODING most likely does it for a reason and giving him or her some 
sort of default behavior for mistyped encoding is not helpful.  (Note that this 
is how many C libraries treat TZ environment variable setting and this is often 
very frustrating.)

I think errors in environment variables that can be detected on startup should 
be treated the same way as the command line typos: a descriptive message on C 
stderr and exit(1).

Currently different environment variables are treated differently.  For 
example, mistakes in PYTHONHOME and PYTHONIOENCODING cause fatal error while an 
error in PYTHONSTARTUP is reported but does not terminate python:

$ PYTHONSTARTUP=xyz.py ./python.exe
Python 3.2rc2+ (py3k:88320, Feb  2 2011, 14:07:18) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Could not open PYTHONSTARTUP
IOError: [Errno 2] No such file or directory: 'xyz.py'
>>>

--
nosy: +belopolsky
title: Fatal LookupError: unknown encoding: cp0 on Windows embedded startup. -> 
Fatal error on startup with invalid PYTHONIOENCODING

___
Python tracker 

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



[issue11089] ConfigParser 50x slower in 2.7

2011-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Attaching patch for Python 3.2.

Georg, I was think of waiting for 3.2.1 for this one, but it can go into 3.2.0 
RC2 if you prefer.

--
assignee: rhettinger -> georg.brandl
nosy: +georg.brandl
Added file: http://bugs.python.org/file20654/configparser.patch

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2011-02-02 Thread Sandro Tosi

Changes by Sandro Tosi :


--
keywords:  -patch

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2011-02-02 Thread Sandro Tosi

Changes by Sandro Tosi :


--
nosy: +sandro.tosi

___
Python tracker 

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



[issue11102] configure doesn't find "major()" on HP-UX v11.31

2011-02-02 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

AFAICT, including sys/types.h by default in the test should be fine. It's a 
standard header file (atleast for Posixish systems), so it should always be 
present, and including it shouldn't cause harm even if it's not needed.

--
nosy: +loewis

___
Python tracker 

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



[issue11092] Setup.cfg isn't packaged when running sdist

2011-02-02 Thread Éric Araujo

Éric Araujo  added the comment:

No, because setup.cfg should always be included.  That’s a real bug.  In 
distutils1, test/*.py and README[.txt] were also included; the commit that 
changed that (374f93ab103c) introduced this bug:

-optional = ['test/test*.py', 'setup.cfg']
-for pattern in optional:
-files = filter(os.path.isfile, glob(pattern))
-if files:
-self.filelist.extend(files)

I think setup.cfg should always be included if it exists; I’m not sure about 
setup.py, you may want to ask on the ML.

--
nosy: +gotcha

___
Python tracker 

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



[issue11102] configure doesn't find "major()" on HP-UX v11.31

2011-02-02 Thread Oren Held

Oren Held  added the comment:

Attaching a patch I've made for fixing the problem in HP-UX, simply by 
#including sys/types.h on the configure test..

1. I'm not sure it'll be good for all platforms; maybe we need more 'configure' 
magic here to make it #include  on this configure test only when 
needed (e.g. HP-UX v3).

2. Once 'configure' decides to enable the "os.major" feature, 'make' simply 
compiles it well - I didn't have to fix things in Modules/posixmodule.c 
(apparently sys/types.h is already loaded). I'm not sure it's smart to count on 
it.

--
keywords: +patch
Added file: 
http://bugs.python.org/file20653/python-configure-hpux-major-fix.patch

___
Python tracker 

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



[issue11102] configure doesn't find "major()" on HP-UX v11.31

2011-02-02 Thread Oren Held

New submission from Oren Held :

The effect eventually is that on HP-UX v3 there are no os.major() and 
os.minor() functions.

I tried to dig deeper to find out what's wrong, and it seems that 'configure' 
script fails on 'major' check and thus disables the 'major' feature:

'configure' finds well that /usr/include/sys/sysmacros.h has makedev(), 
major(), minor() definitions (MAJOR_IN_SYSMACROS==1).

The problem is that including sys/sysmacros.h is not enough, it depends (but 
doesn't #include) sys/types.h for the definition of dev_t (needed by makedev() 
macro).


See attached config.log for configure's behavior.

--
components: Build
files: config.log
messages: 127757
nosy: Oren_Held
priority: normal
severity: normal
status: open
title: configure doesn't find "major()" on HP-UX v11.31
versions: Python 2.7
Added file: http://bugs.python.org/file20652/config.log

___
Python tracker 

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



[issue6465] email.feedparser regular expression bug (NLCRE_crack)

2011-02-02 Thread Sandro Tosi

Sandro Tosi  added the comment:

I was looking at this bug and tried to reproduce it, but I can't :( I extracted 
this code:


part1 = 'Content-Type: multipart/related; 
start=; 
boundary=--1JBOHhxKNnWgkmE17ZJ2Cy\r\nContent-Location: 
http://localhost/page1.html\r\nSubject: =?utf-8?Q?test?=\r\nMIME-Version: 
1.0\r\n\r\n1JBOHhxKNnWgkmE17ZJ2Cy\r'
part2 = '\nContent-Disposition: inline; filename=page1.html\r\nContent-Type: 
text/html; charset=UTF-8; name=page1.html\r\nContent-Id: 
\r\nContent-Location: 
http://localhost/page1.html\r\nContent-Transfer-Encoding: 8bit\r\n\r\nhttp://www.w3.org/TR/html4/loose.dtd";>\r\nPage 
1page 
1\r\n1JBOHhxKNnWgkmE17ZJ2Cy--\r\n'
expected = 'http://www.w3.org/TR/html4/loose.dtd";>\r\nPage 
1page 1'
from email.feedparser import FeedParser
feedparser = FeedParser()
feedparser.feed(part1)
feedparser.feed(part2)
m = feedparser.close()
mm = m.get_payload()
mm[0].get_payload() == expected

from the test attached to this bug, and tried on:

* py3k
* release3.1-maint
* release2.7-maint
* debian 2.6.6

(the first 3 recompiled just before the test) and in all of the cases the last 
instruction returns True, so I'm actually quite skeptical this is still a bug, 
or there something I'm missing.

I'm not closing this bug yet, since I'd like to hear first from the people 
involved back then.

--
nosy: +sandro.tosi

___
Python tracker 

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



[issue4391] use proper gettext plurals forms in argparse and optparse

2011-02-02 Thread Éric Araujo

Éric Araujo  added the comment:

Looks like this will have to wait for 3.3, unfortunately.

--
keywords: +needs review
stage:  -> patch review
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue4724] setting f_exc_traceback aborts in debug builds

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Not applicable to 3.x because the frame object does not have f_exc_traceback 
attribute anymore:

>>> import sys;sys._getframe(0).f_exc_traceback = 23
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'frame' object has no attribute 'f_exc_traceback'

The issue is present in 2.7 but appears to be rather benign.   It looks like 
the worst that can happen in non-debug build is a reference leak in 
set_exc_info().

I am not sure if this is worth fixing.  If this was affecting development 
version, I would argue that the simplest fix is to disallow setting 
f_exc_traceback or f_exc_value before f_exc_type is set.  In a bug-fix reliase, 
however this is probably not acceptable.

Given that sys._getframe() screams "beware, expert use only", I am not sure 
anything should be done other than possibly documenting that assigning to 
f_exc_* attributes of a transient frame object is not a good idea.

Note that the following works:

>>> f = sys._getframe(0)
>>> f.f_exc_traceback = 23

If there is a legitimate use for setting f_exc_traceback, the user should know 
to set f.f_exc_type and f.f_exc_value as well.

--
nosy: +belopolsky -BreamoreBoy
versions:  -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



[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2011-02-02 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution: fixed -> 
stage: committed/rejected -> patch review
status: closed -> open
type: crash -> behavior

___
Python tracker 

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



[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread Georg Brandl

Georg Brandl  added the comment:

It is also a question whether to disallow str explicitly, instead of letting it 
go through the Iterable check.

--

___
Python tracker 

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



[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread Georg Brandl

Georg Brandl  added the comment:

That would seem correct to me.

--

___
Python tracker 

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



[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Stefan Behnel

Stefan Behnel  added the comment:

There's a "PyObject_Del(obj)" in all code paths.

--

___
Python tracker 

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



[issue11101] plistlib has no graceful way of handing None values

2011-02-02 Thread Bob Van Zant

New submission from Bob Van Zant :

The Apple plist format does not support None or Null values in its output. A 
Null value in plist is denoted by the absence of the key in the data structure.

The python plist writer generates a TypeError when a None value is encoded. 
This issue is to track dealing with None values.

A suggestion is to have a flag on the various plist write functions and methods 
that will allow ignoring None values.

No changes are required to the plist reader.

--
components: Library (Lib)
files: plistlib.patch
keywords: patch
messages: 127750
nosy: bobveznat
priority: normal
severity: normal
status: open
title: plistlib has no graceful way of handing None values
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file20651/plistlib.patch

___
Python tracker 

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



[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Unexpected exception is not a crash.  Changing the type to "behavior."

--
nosy: +belopolsky
type: crash -> behavior

___
Python tracker 

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



[issue10762] strftime('%f') segfault

2011-02-02 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
components: +Extension Modules, Windows -Library (Lib)

___
Python tracker 

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



[issue2733] mmap resize fails on anonymous memory

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I don't see an actual crash reported.  An unexpected exception is not a crash.  
Changing the type to "behavior".

--
nosy: +belopolsky
type: crash -> behavior

___
Python tracker 

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



[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I ran the list tests in pybench and got this:
> 
> Test   minimum run-timeaverage  run-time
> thisother   diffthisother   diff
> 
> ListSlicing:66ms67ms   -2.2%67ms68ms   -2.7%
>  SmallLists:61ms64ms   -4.5%61ms65ms   -5.6%
> 
> Totals:   127ms   131ms   -3.3%   128ms   133ms   -4.1%
> 
> Repeating this gave me anything between 1.5% and 3.5% in total, with
> >2% for the small lists benchmark (which is the expected best case as
> slicing large lists obviously dominates the slice object creation).
> 
> IMHO, even 2% would be pretty good for such a small change.

Well, 3% on such micro-benchmarks (and, I assume, 0% on the rest) is
generally considered very small.
On the other hand, I agree the patch itself is quite simple.

> by
> 
>  _Py_NewReference((PyObject *)obj);
> 
> in the patch. New patch attached.

Don't you also need a _Py_ForgetReference() at the other end? Or have I
missed it?

--

___
Python tracker 

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



[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Stefan Behnel

Stefan Behnel  added the comment:

> Any benchmark numbers for the slice cache?

I ran the list tests in pybench and got this:

Test   minimum run-timeaverage  run-time
thisother   diffthisother   diff

ListSlicing:66ms67ms   -2.2%67ms68ms   -2.7%
 SmallLists:61ms64ms   -4.5%61ms65ms   -5.6%

Totals:   127ms   131ms   -3.3%   128ms   133ms   -4.1%

Repeating this gave me anything between 1.5% and 3.5% in total, with >2% for 
the small lists benchmark (which is the expected best case as slicing large 
lists obviously dominates the slice object creation).

IMHO, even 2% would be pretty good for such a small change.


> Also, is the call to PyObject_INIT necessary?

In any case, the ref-count needs to be re-initialised to 1. A call to 
_Py_NewReference() would be enough, though, following the example in 
listobject.c. So you can replace

 PyObject_INIT(obj, &PySlice_Type);

by

 _Py_NewReference((PyObject *)obj);

in the patch. New patch attached.

--
Added file: http://bugs.python.org/file20650/slice-object-cache.patch

___
Python tracker 

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



[issue1103350] send/recv SEGMENT_SIZE should be used more in socketmodule

2011-02-02 Thread R. David Murray

Changes by R. David Murray :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue1103350] send/recv SEGMENT_SIZE should be used more in socketmodule

2011-02-02 Thread R. David Murray

R. David Murray  added the comment:

Looks like this was closed due to lack of appropriate people reviewing it, 
rather than because such a review was done.

--
nosy: +brian.curtin, r.david.murray, tim.golden
resolution: out of date -> 
status: closed -> open
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue10979] setUpClass exception causes explosion with "-b"

2011-02-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread William Wu

William Wu  added the comment:

If the POST data should be bytes which I also think reasonable,

should urllib.parse.urlencode return bytes instead of str?

>>> urllib.parse.urlencode({'foo': 'bar'})
'foo=bar'
>>> urllib.parse.urlencode({b'foo': b'bar'})
'foo=bar'

--

___
Python tracker 

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



[issue11100] test_fdopen: close failed in file object destructor

2011-02-02 Thread Erik Krauss

New submission from Erik Krauss :

test_fdopen (in test_os) fails on Solaris 9/sparc with Python 2.7.1.

FAIL: test_fdopen (test.test_os.TestInvalidFD)
--
Traceback (most recent call last):
  File 
"/p01/app/tenv6/mercator/tmp_pythonbuild/Python-2.7.1/Lib/test/test_os.py", 
line 550, in helper
self.check(getattr(os, f))
  File 
"/p01/app/tenv6/mercator/tmp_pythonbuild/Python-2.7.1/Lib/test/test_os.py", 
line 562, in check
% f)
AssertionError:  didn't raise a OSError with a bad 
file descriptor

--
components: Tests
files: test_os_failure.txt
messages: 127743
nosy: ekrauss
priority: normal
severity: normal
status: open
title: test_fdopen: close failed in file object destructor
versions: Python 2.7
Added file: http://bugs.python.org/file20649/test_os_failure.txt

___
Python tracker 

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



[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Wed, Feb 2, 2011 at 11:10 AM, STINNER Victor  wrote:
..
> We can explain in ElementTree documentation how to pass non-ASCII unicode 
> strings: using
> explicit encoding to UTF-8.

ElementTree.fromstring() ultimately calls ElementTree.XMLParser.feed()
which is documented as follows:

"""
feed(data)
Feeds data to the parser. data is encoded data.
"""

Maybe we can simply add "encoded" to the description of
ElementTree.fromstring()  argument as well?

--

___
Python tracker 

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



[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread STINNER Victor

STINNER Victor  added the comment:

> Since 2.x is closed for new features, this has to be rejected.

We can explain in ElementTree documentation how to pass non-ASCII unicode 
strings: using explicit encoding to UTF-8.

--
nosy: +haypo
status: pending -> open

___
Python tracker 

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



[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

This works in 3.x:

Python 3.2rc2+ (py3k:88279:88280, Feb  1 2011, 00:01:52)
..
>>> from xml.etree import ElementTree
>>> ElementTree.fromstring('诗')


In 2.x you need to encode unicode strings before passing them to 
ElementTree.fromstring().  For example:


# encoding: utf-8   

   
from xml.etree import ElementTree
t = ElementTree.fromstring(u'诗'.encode('utf-8'))
print t.text


This is not a bug because fromstring() unlike some other ElementTree methods is 
not documented to support unicode strings. Since 2.x is closed for new 
features, this has to be rejected.

--
assignee:  -> belopolsky
nosy: +belopolsky
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> pending
type: crash -> feature request
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue11098] syntax error at end of line in interactive python -u

2011-02-02 Thread STINNER Victor

STINNER Victor  added the comment:

Since r7409 (14 years ago), Python does set the binary binary mode on stdin and 
stdout (not stderr) if the -u flag is used:

if (unbuffered) {
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
_setmode(fileno(stdin), O_BINARY);
_setmode(fileno(stdout), O_BINARY);
#endif
#ifdef HAVE_SETVBUF
setvbuf(stdin,  (char *)NULL, _IONBF, BUFSIZ);
setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ);
setvbuf(stderr, (char *)NULL, _IONBF, BUFSIZ);
#else /* !HAVE_SETVBUF */
setbuf(stdin,  (char *)NULL);
setbuf(stdout, (char *)NULL);
setbuf(stderr, (char *)NULL);
#endif /* !HAVE_SETVBUF */
}


If you would like to check that the problem is related to the binary mode, you 
can set the binary mode manually without the -u flag. Add the following code at 
the end of your site.py file:

import msvcrt
msvcrt.setmode (0, os.O_BINARY) # stdin  = 0
msvcrt.setmode (1, os.O_BINARY) # stdout = 1
msvcrt.setmode (2, os.O_BINARY) # stderr = 2


Python 3.2 does always set the binary mode for all files (opened files but also 
stdin, stdout and stderr), which requires a fix in the parser because the 
parser didn't support Windows newlines (\r\n). See issue 10841 and the commit 
r87824 for more information.

--

___
Python tracker 

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



[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2011-02-02 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +jdharper

___
Python tracker 

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



[issue11099] Bytes pickled with 3.1 not unpickled with 2.7 correctly

2011-02-02 Thread R. David Murray

R. David Murray  added the comment:

Duplicate of issue 6784.  (If you disagree explain why here, please.)

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> byte/unicode pickle incompatibilities between python2 and 
python3
type:  -> behavior

___
Python tracker 

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



[issue11098] syntax error at end of line in interactive python -u

2011-02-02 Thread R. David Murray

R. David Murray  added the comment:

This is fixed in py3k rc2, and thus will be fixed in 3.2.  The trick will be 
figuring out which update fixed it, to see if we can backport to 3.1 and 2.7.  
Since issue 10841 touched stdio handling in Windows, I suspect that may be the 
source, so I'm adding Victor and Antoine to nosy since they worked that issue.

On the other hand, given how long this issue has existed without anybody 
running in to it, it may not even be worth backportingwhat's your use case 
for starting the interactive interpreter with -u?

--
nosy: +haypo, pitrou, r.david.murray
type:  -> behavior
versions:  -Python 2.5

___
Python tracker 

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



[issue11099] Bytes pickled with 3.1 not unpickled with 2.7 correctly

2011-02-02 Thread Jeffrey Harper

New submission from Jeffrey Harper :

When a bytes object is pickled with 3.1 and then unpickled with 2.7, the 
results are incorrect.  The example below shows that pickling 
b'abcdefg' in 3.1 and then unpickling in 2.7 produces the string
'[97L, 98L, 99L, 100L, 101L, 102L, 103L]'

The unpickling operation should return 'abcdefg'.

C:\decompyle\jtest>c:\Python31\python
Python 3.1.3 (r313:86834, Nov 27 2010, 18:30:53) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> file = open('test.pkl', 'wb')
>>> import pickle
>>> pickle.dump(b'abcdefg', file, 0)
>>> exit()

C:\decompyle\jtest>c:\python27\python
Python 2.7 Stackless 3.1b3 060516 (release27-maint, Jul 22 2010, 18:58:18) [MSC
v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> file = open('test.pkl', 'rb')
>>> import pickle
>>> pickle.load(file)
'[97L, 98L, 99L, 100L, 101L, 102L, 103L]'
>>>

--
components: Library (Lib), Unicode
messages: 127735
nosy: jdharper
priority: normal
severity: normal
status: open
title: Bytes pickled with 3.1 not unpickled with 2.7 correctly
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



[issue11076] Iterable argparse Namespace

2011-02-02 Thread Virgil Dupras

Virgil Dupras  added the comment:

I went ahead and created a patch (with test and doc) making argparse.Namespace 
iterable.

--
keywords: +patch -easy
Added file: http://bugs.python.org/file20648/issue11076.diff

___
Python tracker 

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



[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Any benchmark numbers for the slice cache?
Also, is the call to PyObject_INIT necessary?

--

___
Python tracker 

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



[issue10271] warnings.showwarning should allow any callable object

2011-02-02 Thread lekma

Changes by lekma :


--
keywords: +patch
Added file: http://bugs.python.org/file20647/Issue10271.diff

___
Python tracker 

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



[issue11098] syntax error at end of line in interactive python -u

2011-02-02 Thread Alexey Luchko

New submission from Alexey Luchko :

Interactive python -u produces syntax error in win2k:
> python -u
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
  File "", line 1
1+1
   ^
SyntaxError: invalid syntax
>>> import sys
  File "", line 1
import sys
  ^
SyntaxError: invalid syntax
>>>

Tried Python 2.5.4, 2.7.1 and 3.1.2 on the same win2k machine.

The problem does not exist under mac os x 10.5 and freebsd 8.1.

--
components: Windows
messages: 127732
nosy: luch
priority: normal
severity: normal
status: open
title: syntax error at end of line in interactive python -u
versions: Python 2.5, 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



[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread STINNER Victor

STINNER Victor  added the comment:

Since r70638, the http client encodes unicode to ISO-8859-1:
<< RFC 2616 says that iso-8859-1 is the default charset for HTTP entity
bodies, but we encoded strings using ascii.  See
http://bugs.python.org/issue5314.  Changed docs and code to use
iso-8859-1. >>

--
nosy: +haypo

___
Python tracker 

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



[issue11094] Runtime error

2011-02-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

For this kind of question you'd better ask on the comp.lang.python newsgroup. 
The bug tracker is not designed to get help.

A remark though: to really debug the RuntimeError a C debugger is needed (and a 
debug build of Python). You'd better try to know why your script consumes more 
and more memory. There are certainly tools for this, and people on the python 
newsgroup will be happy to share them with you.

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

___
Python tracker 

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



[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-02-02 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Reconsidering: it's better to use PyType_IsSubtype, as this matches better the 
fast check.

--
Added file: http://bugs.python.org/file20646/unisub.diff

___
Python tracker 

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



[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-02-02 Thread Martin v . Löwis

Changes by Martin v. Löwis :


Removed file: http://bugs.python.org/file20645/unisub.diff

___
Python tracker 

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



[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-02-02 Thread Martin v . Löwis

Changes by Martin v. Löwis :


Added file: http://bugs.python.org/file20645/unisub.diff

___
Python tracker 

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



[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-02-02 Thread Martin v . Löwis

Changes by Martin v. Löwis :


Removed file: http://bugs.python.org/file20644/unisub.diff

___
Python tracker 

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



[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

The POST data should be bytes. So in the attached test case, instead of

request = urllib.request.Request('http://does.not.matter', 'foo=bar')

it should be:

request = urllib.request.Request('http://does.not.matter', b'foo=bar')

And the Content-Length will be calculated using this logic.

mv = memoryview(data)
Content-length = len(mv) * mv.itemsize

Should we emphasize further that data should be bytes? I think error
message can be improved here.  This issue is not a blocker.

--

___
Python tracker 

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



[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-02-02 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

The fast subtype checks cannot be supported in the limited API, as the layout 
of type objects is intentionally not exposed. It would be possible to expose a 
getter for the type flags; the individual flag values *are* part of the ABI.

I propose the attached patch, which replaces the fast subtype check with a slow 
one in the limited API. The patch would need to be extended to all subtype 
checks.

It's not strictly necessary to include this patch into the 3.2 release; users 
could also explicitly call PyObject_IsSubclass as a work-around. The patch 
could then be added for 3.2.1.

As another work-around, users can also use PyUnicode_CheckExact, which is even 
faster and might be correct in many cases as well.

--
keywords: +patch
Added file: http://bugs.python.org/file20644/unisub.diff

___
Python tracker 

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



[issue11089] ConfigParser 50x slower in 2.7

2011-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixed for 2.7 in r88318.  Will make a similar fix for 3.1.4 and for 3.2.1.

--
assignee: lukasz.langa -> rhettinger
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



[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread Georg Brandl

Georg Brandl  added the comment:

Senthil, could this be a regression of the recent urllib transfer-encoding 
changes?

--
assignee:  -> orsenthil
nosy: +georg.brandl, orsenthil
priority: normal -> deferred blocker

___
Python tracker 

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



[issue11085] expose _abcoll as collections.abc

2011-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> And what about those "collection" ABCs that aren't collections?

 Guido originally thought all these should live together and I don't see 
much of a win in separating them from the other.

--

___
Python tracker 

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



[issue11095] subprocess popen broken for bytes and backslash

2011-02-02 Thread Eric Smith

Eric Smith  added the comment:

1: subprocess.call is documented as taking a string, not bytes. If you think it 
should also take bytes, I suggest opening a separate bug as a feature request.

2: You're running into both Python and the shell escaping. If you have an odd 
number of backslashes, then python is converting '\a' into an ascii BEL 
character:
http://docs.python.org/py3k/reference/lexical_analysis.html#string-literals
For the remaining backslashes, Python is converting every 2 into a single 
backslash when it does its escaping, and the shell is doing the same thing, as 
is echo. That accounts for 8 backslashes becoming a single backslash in the 
output.

--
nosy: +eric.smith
resolution:  -> invalid
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



[issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API

2011-02-02 Thread Georg Brandl

Georg Brandl  added the comment:

Sure, a change to 3.2 is out of the question anyway right now.

--

___
Python tracker 

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



[issue11085] expose _abcoll as collections.abc

2011-02-02 Thread Georg Brandl

Georg Brandl  added the comment:

And what about those "collection" ABCs that aren't collections?  These are at 
least

* Hashable
* Callable
* ByteString
* Iterator

--
nosy: +georg.brandl

___
Python tracker 

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



[issue11097] MSI: Remove win32com dependency from installer generator

2011-02-02 Thread anatoly techtonik

New submission from anatoly techtonik :

The MSI installer is generated using msilib.py from 
http://svn.python.org/projects/python/branches/release27-maint/Tools/msi that 
is dependent from external win32com module. We also have internal 'msilib' 
module that is unused for some reason.

Is it possible to incrementally transition from Tools/msilib.py to builtin 
'msilib'?

See http://codereview.appspot.com/4080047/ for the start of the thread.

--
components: Installation
messages: 127720
nosy: loewis, techtonik
priority: normal
severity: normal
status: open
title: MSI: Remove win32com dependency from installer generator
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue11096] Multiple turtle tracers

2011-02-02 Thread Alex McNerney

Alex McNerney  added the comment:

To be more clear, in the sample code, the drawing animation of the red 
star-spiral is smooth, whereas the drawing animation of the black star-spiral 
is spasmodic.

--

___
Python tracker 

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



[issue11087] Speeding up the interpreter with a few lines of code

2011-02-02 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> pitrou
nosy: +pitrou

___
Python tracker 

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