[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread Grygoriy Fuchedzhy

Grygoriy Fuchedzhy  added the comment:

Shouldn't .svgz be also added as 'image/x-svg+xml'?

--

___
Python tracker 

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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

No, the other combined suffixes are not either.

--

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread Stephen J. Turnbull

Stephen J. Turnbull  added the comment:

Re: msg124528

Yes, XEmacs installs a signal handler on what are normally fatal errors.  (I 
don't know about GNU Emacs but they probably do too.)

The handler has two functions: to display a Lisp backtrace and to output a 
message explaining how to report bugs (even including a brief introduction to 
the "bt" command in gdb. ;-)

I personally have never found the Lisp backtrace useful, except that it can be 
used as a bug signature of sorts ("oh, I think I've seen this one before...").  
However, I suspect this is mostly because in Emacs Lisp very often you don't 
have the name of the function in the backtrace, only a compiled code object.  
So in many cases it's almost no help in localizing the fault.  Victor's patch 
does a lot better on this than XEmacs can, I suspect.

The bug reporting message, OTOH, has been useful to us for the reasons people 
give for wanting the handler installed by default.  We get more and better bug 
reports, often including C backtraces, from people who have never participated 
directly in XEmacs development before.  (It also once served the function of 
inhibiting people from sending us core files. Fortunately, I don't think that 
happens much any more. :-)  Occasionally a user will be all proud of themselves 
because "I never used gdb before," so I'm pretty sure that message is effective.

Quite frequently we see the handler itself crash if there was memory 
corruption, but certainly it gives useful output well over half the time.  So I 
want to back up Victor on those aspects.

Finally, although our experience has be very positive, qnote that XEmacs is not 
an embeddable library, nor is there provision in the mainline versions for 
embedding other interpreters in XEmacs.  So we've never had to worry about the 
issues that come with that.

For more technical details, you could ask Ben Wing  who put a 
lot of effort into the signal handling implementation, or Hrvoje Niksic (sorry, 
no address offhand) who posts on python-dev occasionally.  (I don't know if 
Hrvoje ever worked on the signal handlers, and he hasn't worked on XEmacs for 
years, but he was more familiar with internals than me then, and might very 
well still remember more than I ever knew. :-)  I don't think either will 
disagree with my general statements above, though.

--

___
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

2010-12-23 Thread David Leonard

New submission from David Leonard :

Installed http://www.python.org/ftp/python/2.7.1/python-2.7.1.amd64.msi
on Windows 7, x64 into C:\Python27

C:\>\Python27\python.exe
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strftime('%f')

Dialog raises: "Python.exe has stopped working"

--
components: Library (Lib)
messages: 124542
nosy: dleonard0
priority: normal
severity: normal
status: open
title: strftime('%f') segfault
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-12-23 Thread Stefan Krah

Stefan Krah  added the comment:

Before anyone does any further testing:

Tarek, can this go into distutils 2.7/3.2 (after 3.2 has been released)?
Due to the popularity of this issue I think it might be worthwhile to
make an exception and ignore the distutils freeze.

--

___
Python tracker 

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



Re: [issue10296] ctypes catches BreakPoint error on windows 32

2010-12-23 Thread Thomas Heller

ctypes has _always_ catched exceptions raised in function calls.
On Windows ;-).

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread Stefan Krah

Stefan Krah  added the comment:

[Alexander]

if sys.getenv('PYTHONSEGVHANDLER'):
 import segvhandler
 segvhandler.enable()

+1

If this doesn't find support, I'd name sys.setsegfaultenabled()
sys.setsegvhandlerenabled() or sys.enable_segvhandler().

--
nosy: +skrah

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

Note: To avoid the signal-safe requirement, another solution is to use 
sigsetjmp()+siglongjmp().

--

___
Python tracker 

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



[issue10743] 3.2's sysconfig doesn't work with virtualenv

2010-12-23 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I have investigated the problem and it turns out virtualenv patches 
distutils.sysconfig behavior by adding to the sys module a "real_prefix" 
attribute that points to the global Python install and is used instead of 
sys.prefix that points to the virtualenv local install, when some 
distutils.sysconfig APIs are used.

The fix is to change virtualenv so it patches sysconfig the same way it does 
for distutils.sysconfig.

To simulate this patch, just change how _EXEC_PREFIX and _PREFIX are set in 
sysconfig, by setting them to sys.real_prefix instead of 
sys.prefix/sys.exec_prefix when using virtualenv. 

I suggest to Georg that this bug gets resolved to "invalid" and that we move it 
to the virtualenv bitbucket tracker.

--

___
Python tracker 

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



[issue10763] subprocess.communicate() doesn't close pipes on Windows

2010-12-23 Thread STINNER Victor

New submission from STINNER Victor :

If more than one file (stdin, stdout and stderr) are pipes, Popen.communicate() 
uses threads calling _readerthread() on each pipe. But this method doesn't 
close the pipes, whereas all other communicate implementations (select, poll 
and the optimization if there is only one pipe) do close all pipes.

Attached patch fixes this issue.

Thanks Antoine for your nice ResourceWarning patch!

--
components: Library (Lib), Windows
files: subprocess_close_pipes.patch
keywords: patch
messages: 124547
nosy: haypo
priority: normal
severity: normal
status: open
title: subprocess.communicate() doesn't close pipes on Windows
versions: Python 3.2
Added file: http://bugs.python.org/file20146/subprocess_close_pipes.patch

___
Python tracker 

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



[issue10763] subprocess.communicate() doesn't close pipes on Windows

2010-12-23 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +amaury.forgeotdarc, pitrou

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

I tested the patch version 11 on Windows: all tests pass. But #include 
 should be skipped on Windows (Python/fault.c): I will add #ifdef 
MS_WINDOWS.

--

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

> I tested the patch version 11 on Windows: all tests pass.

Oh, and I forgot to say that the Windows fault handler does catch the fault too 
(Windows opens a popup with a question like "Should the error be reported to 
Microsoft?").

--

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

Tested on FreeBSD 8: all tests pass (all of the 4 signals are supported) and 
FreeBSD dumps a core file.

--

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread Stefan Krah

Stefan Krah  added the comment:

STINNER Victor  wrote:
> Note: To avoid the signal-safe requirement, another solution is to use 
> sigsetjmp()+siglongjmp().

FWIW, there is a caveat in the OpenBSD man page concerning the use of
siglongjmp():

http://www.openbsd.org/cgi-bin/man.cgi?query=sigsetjmp&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=htm

"Use of longjmp() or siglongjmp() from inside a signal handler is not as
 easy as it might seem.  Generally speaking, all possible code paths
 between the setjmp() and longjmp() must be signal race safe, as discussed
 in signal(3).  Furthermore, the code paths must not do resource
 management (such as open(2) or close(2)) without blocking the signal in
 question, or resources might be mismanaged.  Obviously this makes
 longjmp() much less useful than previously thought."

--
title: Display Python backtrace on SIGSEGV, SIGFPE and fatal error -> 
Display Python backtrace on SIGSEGV, SIGFPE and fatal error

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

Tested on Ubuntu 10.04: all tests pass and apport intercepts the fault. Apport 
ignores the faults because I am testing a Python executable compiled from SVN 
(py3k). Apport logs (/var/log/apport.log):
---
apport (pid 18148) Thu Dec 23 13:29:25 2010: called for pid 18147, signal 8
apport (pid 18148) Thu Dec 23 13:29:25 2010: executable: 
/home/haypo/prog/SVN/py3k/python (command line "./python -c import\ _testcapi;\ 
_testcapi.sigfpe()")
apport (pid 18148) Thu Dec 23 13:29:25 2010: executable does not belong to a 
package, ignoring
---

--

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-12-23 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

IIUC, the issue is that people installing a 64-bit Python, and VS Express, and 
then wonder why they can't build extension modules. I'm not so sure that there 
is a bug in Python here - this setup is not supported (and that's really 
Microsoft's fault). Now, automatically finding the SDK would be a new feature, 
IMO: if you want to use SDK tools, you are supposed to set DISTUTILS_USE_SDK, 
after opening the respective build environment. IIUC, installing VS express 
would not have been necessary in this setup at all - just install the SDK.

Alternatively, people can install Visual Studio proper, or use a 32-bit Python.

--

___
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

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

Note that this is a regression relative to 2.6, where the same call returns '' 
(which is different from what it returns on linux, where the result would be 
'%f', or OSX, where the result would be 'f').  (Tests done on windows XP using 
pythons installed from the python.org installers.)

My guess is that the difference between python 2.6 and python 2.7+ is issue 
4804.  I'm therefore adding the nosy list from that issue to this one.

For the OP's benefit: my guess is that this is a bug in the Microsoft C 
runtime, but we probably need to provide a workaround for it in Python.

--
nosy: +amaury.forgeotdarc, krisvale, loewis, mhammond, ocean-city, 
r.david.murray
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



[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. &#hearts; )

2010-12-23 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Yes, I too agree that HTMLParser.unescape() should split-out malformed char-ref 
just as other browsers do.

But, as unescape function has undocumented/unexposed for releases, I am not 
sure making it exposed is a good idea. HTMLParser is more for event based 
parsing of tags, and unescape is a just a helper function in that context.

Given that reasoning if you see the malformatted test, you see that event based 
parsing does return the malformatted data properly For e.g -  ("data", 
"&#bad;").

Only calling unescape explicitly does not exhibit this behavior.

Martin: I am not sure if changing something in line 168 would solve the issue. 
In that particular block of code, the else condition is responsible for 
throwing the malformed charref on an event. If would like to elaborate a bit 
more on your suggestion, it would be helpful.

However, I do agree that unescape can be changed as per your patch and I have 
added a simple test to exercise that change. I think, this can go in.

--
assignee:  -> orsenthil
stage: unit test needed -> patch review
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6
Added file: http://bugs.python.org/file20147/Issue10759.diff

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-12-23 Thread Thorsten Behrens

Thorsten Behrens  added the comment:

You are right, this is not a bug in Python. The diff provides a workaround for 
a limitation in VC++ 2008 Express. This diff is a piece of user service.

An equally as workable workaround is for the user to copy VC\bin\vcvars64.bat 
into VC\bin\amd64\vcvarsamd64.bat. Once that is done, distutils works without 
the workaround provided in this diff.

Whether to provide a workaround within Python for an issue in VC++ 2008 Express 
can certainly be debated. I for one suggest to err on the side of being 
friendly, rather than insisting on purity.

Consider that users of Python do include hobbyists and students. For them, VC++ 
Pro may be out of reach. And there are plenty of reasons for building 64-bit 
binaries, among them learning exercises.

--

___
Python tracker 

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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread Éric Araujo

Éric Araujo  added the comment:

I believe the patch should add the used but non-standard image/svg+xml type to 
the common_type dictionary, not invent a new x- type.

--

___
Python tracker 

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



[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

p3k_i9313.diff is just a workaround, not the correct fix. The problem is that 
PyTokenizer_FindEncoding() doesn't get the filename.

I wrote tokenizer_encoding_filename.patch which add 
PyTokenizer_FindEncodingFilename() and patch import.c and traceback.c to pass 
the filename.

Hum, I'm not sure that my patch works if the locale encoding is not UTF-8: 
import.c manipulates path in the filesystem encoding, whereas 
PyTokenizer_FindEncodingFilename() expects UTF-8 filename.

See this patch as a draft, I will try to fix the encoding issue.

--
Added file: http://bugs.python.org/file20148/tokenizer_encoding_filename.patch

___
Python tracker 

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



[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

See also #9738 (Document the encoding of functions bytes arguments of the C 
API) to check which encoding is expected :-p

--

___
Python tracker 

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



[issue10764] sysconfig and alternative implementations

2010-12-23 Thread Michael Foord

New submission from Michael Foord :

sysconfig assumes there will be a makefile if the platform is posix, which 
isn't always true. For example IronPython on Mac OS X with mono.

This leads to a traceback on startup with IronPython 2.7:

$ ipy27
Traceback (most recent call last):
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 548, in 

  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 530, in main
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 264, in 
addusersitepackages
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 239, in 
getusersitepackages
  File "/Second/michael/Downloads/IronPython-2.7/Lib/site.py", line 229, in 
getuserbase
  File "/Second/michael/Downloads/IronPython-2.7/Lib/sysconfig.py", line 518, 
in get_config_var
  File "/Second/michael/Downloads/IronPython-2.7/Lib/sysconfig.py", line 421, 
in get_config_vars
  File "/Second/michael/Downloads/IronPython-2.7/Lib/sysconfig.py", line 275, 
in _init_posix
IOError: invalid Python installation: unable to open /Volumes/Second 
Drive/michael/Downloads/IronPython-2.7/lib/python2.7/config/Makefile (Could not 
find a part of the path "/Volumes/Second 
Drive/michael/Downloads/IronPython-2.7/lib/python2.7/config/Makefile".)IronPython
 2.7 Beta 1 (2.7.0.10) on .NET 4.0.30319.1
Type "help", "copyright", "credits" or "license" for more information.
>>>

--
messages: 124560
nosy: eric.araujo, michael.foord, tarek
priority: normal
severity: normal
status: open
title: sysconfig and alternative implementations
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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

Yes, adding the x- version would probably be pointless as most likely nobody 
uses it.

Has anyone found any definitive info on where exactly in the approval process 
image/svg+xml is?

I think we should probably just go ahead and put it in, but it would be nice to 
link to some mailing list discussion somewhere that indicates that it is 
solidly standards track.

I found a mailing list posting from 2000 about browser support.

I found this: http://www.w3.org/TR/SVG/intro.html from June 2010 saying the 
registration was in progress at the w3c.  How w3c registration relates to IANA 
registration is not entirely clear, but most likely IANA wouldn't register it 
without w3c approving it first.

RFC 3023 mentions it and says it hasn't been approved yet so it shouldn't be 
used.  That was in 2001.

Why the incredibly long delay?

As best as I can guess, the mime-type registration is conditioned on the 
acceptance of the underlying SVG standard it references, and that standard (SVG 
1.1) has not yet been ratified by the W3C, which is, if I'm underanding the 
RFCs correctly, required for IANA approval of the media type request.  SVG 1.1 
has, according to wikipedia, been put out for Last Call.

All of which seems pretty irrelevant to the value and likely stability of the 
image/svg+xml name itself.  Since all the major browsers are supporting it, as 
far as I can tell, I think Python should too.

--

___
Python tracker 

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



[issue10743] 3.2's sysconfig doesn't work with virtualenv

2010-12-23 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Sounds good, but this doesn't belong to the virtualenv bug tracker (virtualenv 
does even support Python 3). Instead, it belongs to the virtualenv5 tracker: 
http://code.google.com/p/virtualenv5/issues/detail?id=6

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-12-23 Thread ipatrol

ipatrol  added the comment:

Purity shmurity. The point of distutils is largely to present a unified and 
simple interface. 'python setup.py install' should be all a user has to do on 
any platform. Unless you can come up with a better idea, MSVC is really the 
only big compiler on Windows.

--
versions: +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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I obviously misunderstood the instruction about 'x-' and will remove that. 
Should I leave the entry where it is or move as Éric suggested?

--
Added file: http://bugs.python.org/file20149/mimetypes.svg2.diff

___
Python tracker 

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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread Éric Araujo

Éric Araujo  added the comment:

I’m not sure; the common_types is actually for invalid but used types, like 
image/jpg (the correct one is image/jpeg and is listed in types_map).  The 
status of IANA registration is unclear (thanks David for looking at that); 
since common tools understand that media type, let’s pretend it’s registered.

--

___
Python tracker 

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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

No, I don't think it qualifies as a common_type.

But since this is technically a feature request we need Georg's approval for 
the commit.

--

___
Python tracker 

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



[issue4496] misleading comment in urllib2

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

It is used in the tests, but I agree that it doesn't appear to be used in the 
code.  I've removed the misleading comment and marked the self.handlers 
attribute as backward-compat-only in r87448, r87449, and r87450.

The sorting is based on a 'handler_order' attribute, by the way, and presumably 
does control the order in which they are applied.

--
nosy: +jhylton, r.david.murray
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



[issue1155362] Bugs in parsedate_tz

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

Committed a slightly different patch in r87451, with tests.  Although I do 
consider this a bug fix, it hasn't apparently caused any problems in real life 
and does represent a slight behavior change, so I'm not backporting it.

--
resolution:  -> fixed
stage: unit test needed -> 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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

Got approval from Georg on IRC, so go ahead and commit it, Terry.  Or assign it 
to me if you'd rather I do it.

--

___
Python tracker 

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



[issue10576] Add a progress callback to gcmodule

2010-12-23 Thread Lukas Lueg

Lukas Lueg  added the comment:

Why not make the start-callback be able to return a boolean value to the 
gcmodule that indicates if garbage collection should take place or not.

For example, any value returned from the callback that evaluates to False (like 
null) will cause the module to evaluate any other callback and possibly collect 
garbage objects. Any value that evaluates to True (like True) returned from any 
callback causes all further callbacks to not be called and garbage collection 
not to take place now.

--
nosy: +ebfe

___
Python tracker 

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



[issue6011] python doesn't build if prefix contains non-ascii characters

2010-12-23 Thread Éric Araujo

Éric Araujo  added the comment:

I can’t reproduce the crash when building in the source dir (and tests pass 
except for ctypes because its configure script refuses my directory path), and 
I can’t build in a subdir*, so this bug looks fixed.

* Error messages:
gcc: Parser/tokenizer_pgen.o: No such file or directory
gcc: Parser/printgrammar.o: No such file or directory
gcc: Parser/pgenmain.o: No such file or directory

--

___
Python tracker 

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



[issue1693546] email.Message set_param rfc2231 encoding incorrect

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

Reading the RFC again, I think you are right.  The quoted vs unquoted sounds 
like it refers to the *n vs the [*n]* forms, and the latter doesn't use quoted 
strings but % encoding.

I'm attaching a patch that adds some tests and fixes this.  It's a visible 
behavior change so it won't be backported.  Clearly mailers accept the quoted 
form, but we prefer to be strictly RFC compliant on output.  The behavior 
change is that whereas previously unquoted values on parse got quotes added on 
serialization, now quoted values on parse will lose their quotes on 
serialization.

--
keywords: +patch
stage: unit test needed -> patch review
versions:  -Python 2.7, Python 3.1
Added file: http://bugs.python.org/file20150/rfc2231_quoting.diff

___
Python tracker 

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



[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

r87460

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue1693546] email.Message set_param rfc2231 encoding incorrect

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

I take it back.  Previously quotes didn't get added if they weren't already 
there.  So my simpleminded fix may not be the best choice.

--

___
Python tracker 

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



[issue10765] Build regression from automation changes on windows

2010-12-23 Thread Martin

New submission from Martin :

The build changes in r87093 broke me, as my py3k branch is under a dir with a 
space in the name, and the OutDir path needs escaping in the makefiles. Various 
extra quoting seems to be sufficient, though inelegant.

--
components: Build, Windows
files: py3k_build.patch
keywords: patch
messages: 124575
nosy: gz, loewis
priority: normal
severity: normal
status: open
title: Build regression from automation changes on windows
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file20151/py3k_build.patch

___
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

2010-12-23 Thread Éric Araujo

Éric Araujo  added the comment:

Updated patch for optparse.  Georg: Is this okay for 3.2?

Based on Steven’s decision for another patch that changed strings, these fixes 
won’t be backported.

--
versions:  -Python 2.7, Python 3.1
Added file: http://bugs.python.org/file20152/fix-optparse-ngettext.diff

___
Python tracker 

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



[issue10765] Build regression from automation changes on windows

2010-12-23 Thread Martin

Martin  added the comment:

Oh, and after building with this, I get:

$ svn st
?   PC/python3dll.obj

So either that wants moving or svn:ignore needs updating.

--

___
Python tracker 

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



[issue10766] optparse uses %s in gettext calls

2010-12-23 Thread Éric Araujo

New submission from Éric Araujo :

When you run xgettext other optparse.py, you get this warning:
“'msgid' format string with unnamed arguments cannot be properly localized: The 
translator cannot reorder the arguments.  Please consider using a format string 
with named arguments, and a mapping instead of a tuple for the arguments.”

Attached patch fixes the incorrect calls (my patch for #4391 already fixes two 
of them).

See similar bug and fix for argparse in #10528.  Georg, please tell if this can 
go into 3.2.

--
assignee: eric.araujo
components: Library (Lib)
files: fix-gettext-positionals.diff
keywords: patch
messages: 124578
nosy: eric.araujo, georg.brandl, gward
priority: normal
severity: normal
stage: commit review
status: open
title: optparse uses %s in gettext calls
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file20153/fix-gettext-positionals.diff

___
Python tracker 

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



[issue10766] optparse uses %s in gettext calls

2010-12-23 Thread Éric Araujo

Changes by Éric Araujo :


--
dependencies: +use proper gettext plurals forms in argparse and optparse

___
Python tracker 

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



[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-12-23 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
status: pending -> closed

___
Python tracker 

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



[issue9063] TZ examples in datetime.rst are incorrect

2010-12-23 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed in r87463 (3.2), r87464 (2.7) and r87465 (3.1).

--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed
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



[issue7198] Extraneous newlines with csv.writer on Windows

2010-12-23 Thread John Machin

John Machin  added the comment:

Please re-open this. The binary/text mode problem still exists with Python 3.X 
on Windows. Quite simply, there is no option available to the caller to open 
the output file in binary mode, because the module is throwing str objects at 
the file. The module's idea of "taking control" in the default case appears to 
be to write \r\n which is then processed by the Windows runtime and becomes 
\r\r\n.

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.
>>> import csv
>>> f = open('terminator31.csv', 'w')
>>> row = ['foo', None, 3.14159]
>>> writer = csv.writer(f)
>>> writer.writerow(row)
14
>>> writer.writerow(row)
14
>>> f.close()
>>> open('terminator31.csv', 'rb').read()
b'foo,,3.14159\r\r\nfoo,,3.14159\r\r\n'
>>>

And it's not just a row terminator problem; newlines embedded in fields are 
likewise expanded to \r\n by the Windows runtime.

--
nosy: +sjmachin
versions: +Python 3.1 -Python 2.6

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-23 Thread Matthew Barnett

Matthew Barnett  added the comment:

issue2636-20101224.zip is a new version of the regex module.

Case-insensitive matching is now faster.

The matching functions and methods now accept a keyword argument to release the 
GIL during matching to enable other Python threads to run concurrently:

matches = regex.findall(pattern, string, concurrent=True)

This should be used only when it's guaranteed that the string won't change 
during matching.

The GIL is always released when working on instances of the builtin (immutable) 
string classes because that's known to be safe.

--
Added file: http://bugs.python.org/file20154/issue2636-20101224.zip

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-23 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I would like to start reviewing this code, but dated zip files on a tracker 
make a very inefficient VC setup.  Would you consider exporting your 
development history to some public VC system?

--
nosy: +belopolsky

___
Python tracker 

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



[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread STINNER Victor

STINNER Victor  added the comment:

Georg rejected this patch in Python 3.2:

"I did say I like the feature, but that was a) before beta 2
was released, now the next release is a release candidate, and b) this
thread showed that it is not at all obvious how the feature should look
like.  The fact that it isn't enabled by default also makes it seem less
attractive to me, but I understand the reasons why it shouldn't be on by
default.  Therefore, I'm not willing to make an exception here."

So I created a third party module on the Python cheese shop:
http://pypi.python.org/pypi/faulthandler/

The module works on Linux, FreeBSD and Windows with Python 2.6 through 3.2.

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2010-12-23 Thread Andy Bailey

Changes by Andy Bailey :


--
nosy: +GooseYArd

___
Python tracker 

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



Re: [issue4496] misleading comment in urllib2

2010-12-23 Thread Senthil Kumaran
On Thu, Dec 23, 2010 at 07:53:01PM +, R. David Murray wrote:

> The sorting is based on a 'handler_order' attribute, by the way, and
> presumably does control the order in which they are applied.

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-23 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs  added the comment:

+1 on VC

--

___
Python tracker 

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



[issue10767] Lib/test/crashers/README is out of date

2010-12-23 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

Among other things, README says:

"""
Each test should have a link to the bug report:

# http://python.org/sf/BUG#

"""

but the only such link is found in crashers/infinite_loop_re.py and points to a 
closed issue 1541697.

It looks like the purpose of Lib/test/crashers has changed from being a 
repository of outstanding bugs to a repository of crashers that are not 
considered to be bugs.

--
assignee: d...@python
components: Documentation, Tests
messages: 124586
nosy: belopolsky, d...@python
priority: normal
severity: normal
status: open
title: Lib/test/crashers/README is out of date

___
Python tracker 

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



[issue10753] request_uri method of wsgiref module does not support RFC1808 params.

2010-12-23 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

On Wed, Dec 22, 2010 at 12:20:24AM +, R. David Murray wrote:
> Presumably all that is needed is to add ';' to 'safe' in the call
> that encodes PATH_INFO?

Well, that is what is required in order for the quote function call to
ignore it, but I am not sure what it the intention passing
/path;params as the PATH_INFO and how it is useful in wsgiref context.

Also there is this note in the PEP 333

Note that such a reconstructed URL may not be precisely the same URI
as requested by the client. Server rewrite rules, for example, may
have modified the client's originally requested URL to place it in a
canonical form.

--

___
Python tracker 

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



[issue3243] Support iterable bodies in httplib

2010-12-23 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

A mistake with Content-Length in the previous commit resolved in revision 87469.

--

___
Python tracker 

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



[issue8548] Building on CygWin 1.7: PATH_MAX redefined

2010-12-23 Thread Scott Rostrup

Scott Rostrup  added the comment:

I just encountered this error in python 3.1.3 on cygwin 1.7.
I used the same fix as jbinder.

Old Modules/main.c (line 13):

  #if defined(MS_WINDOWS) || defined(__CYGWIN__)
  #include 
  #ifdef HAVE_FCNTL_H
  #include 
  #define PATH_MAX MAXPATHLEN
  #endif
  #endif

I guess now cygwin is defining PATH_MAX, one possible fix with ifndef:

  #if defined(MS_WINDOWS) || defined(__CYGWIN__)
  #include 
  #ifdef HAVE_FCNTL_H
  #include 
  #ifndef
  #define PATH_MAX MAXPATHLEN
  #endif
  #endif
  #endif

This compiled and worked for me and it appears jbinder as well.

--
nosy: +Scott.Rostrup
Added file: http://bugs.python.org/file20155/py_cygwin_build-3.1.3

___
Python tracker 

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



[issue10671] urllib2 redirect to another host doesn't work

2010-12-23 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Closing this as Invalid, because in the latest code, if the Host header is not 
explicitly specified by the request, then it is added to unredirected headers 
and if it explicitly specified by the request, then it is taken into account 
when the redirection happens.

Not sure how the bug reporter's case was.

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



Re: [issue9893] Usefulness of the Misc/Vim/ files?

2010-12-23 Thread Senthil Kumaran
On Sun, Dec 12, 2010 at 09:52:27PM +, Brett Cannon wrote:
> At this point I'm willing to either hand maintenance of the files
> over to someone else or to delete the files and shift what we point
> people at.

I think, just pointing to the script at vim.org location is a good
idea. It is maintained and updated by vimmers and we dont have to
bother about it. But a README would be helpful as what scripts we
"recommend", so that it sufficient to meet the style guidelines of
PEP8 and PEP7.
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10753] request_uri method of wsgiref module does not support RFC1808 params.

2010-12-23 Thread R. David Murray

R. David Murray  added the comment:

Well, if the parameters aren't part of the path info, what are they part of?

They are passed as part of path info now, just incorrectly encoded.  I haven't 
found anything so far to make me think they belong anywhere else.

--

___
Python tracker 

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