[issue2813] No float formatting in PyString_FromFormat

2010-07-18 Thread Mark Dickinson

Mark Dickinson  added the comment:

Jean may have no interest in moving this forward, but I do.  (Which is why I 
assigned the issue to me.)

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

___
Python tracker 

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



[issue7229] Manual entry for time.daylight can be misleading

2010-07-18 Thread Georg Brandl

Georg Brandl  added the comment:

Please do!

--
assignee: georg.brandl -> belopolsky

___
Python tracker 

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



[issue9282] Bug in --listfuncs option of trace.py

2010-07-18 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Trace.py does not appear to have a test module to add a test case to.
test_trace.py currently tests the line trace facility turned on with 
sys.settrace. I will inquire on pydev about this. "Does trace ..."

--

___
Python tracker 

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



[issue9105] pickle security note should be more prominent

2010-07-18 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

LGTM

Unless someone objects, I will check that the patch generates reasonable HTML 
and apply.

--
assignee: d...@python -> belopolsky
resolution:  -> accepted
stage: needs patch -> commit review

___
Python tracker 

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



[issue9105] pickle security note should be more prominent

2010-07-18 Thread Scott Lawrence

Scott Lawrence  added the comment:

Patch warning in relevant places of pickle's vulnerability to insecure data, 
including the place referenced by issue8855.

--
keywords: +patch
nosy: +bytbox
Added file: http://bugs.python.org/file18057/picklesec.patch

___
Python tracker 

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



[issue9298] binary email attachment issue with base64 encoding

2010-07-18 Thread Vance Unruh

New submission from Vance Unruh :

I'm using Python to email a text version and a PDF version of a report. The 
standard way of doing things does not work with Vista's Mail program, but works 
fine with Mail on OSX. So, I don't know if this is a Python or a Vista Mail 
bug. By standard way, I mean:

# Add the attached PDF:
part = MIMEApplication(pdf,"pdf")
part.add_header('Content-Disposition', 'attachment', filename=pdfFile)
msg.attach(part)


To fix the problem, I changed C:\Python31\Lib\email\encoders.py to use 
encodebytes instead of b64encode in order to get mail on Windows Vista to 
correctly interpret the attachment. This splits the base64 encoding into many 
lines of some fixed lenth.

I can achieve the same thing adding the attachment by hand with the following 
code:

from email.mime.base import MIMEBase
part = MIMEBase("application","pdf")
part.add_header('Content-Transfer-Encoding', 'base64') 
part.set_payload(str(base64.encodebytes(pdf),'ascii'))
msg.attach(part)

Seems like I shouldn't need to know this much.

I'm new to Python and this is the first bug I have submitted, so if you need 
additional information, please let me know.

--
components: Library (Lib)
messages: 110710
nosy: vunruh
priority: normal
severity: normal
status: open
title: binary email attachment issue with base64 encoding
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



[issue7829] dis module documentation gives no indication of the dangers of bytecode inspection

2010-07-18 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
keywords:  -needs review

___
Python tracker 

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



[issue665761] reduce() masks exception

2010-07-18 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
nosy: +belopolsky -Alexander.Belopolsky
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



[issue7229] Manual entry for time.daylight can be misleading

2010-07-18 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Georg,

Do you mind if I take this over?

While I have issues with east/west of UTC terminology, it is the accepted 
terminology throughout the manual and Brian's rewording is an improvement.

--

___
Python tracker 

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



[issue9297] SMTP with Sqlite3 file attached problem

2010-07-18 Thread Murilo da Silva

Changes by Murilo da Silva :


--
title: SMTP cross-domain with Sqlite3 file attached problem -> SMTP with 
Sqlite3 file attached problem

___
Python tracker 

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



[issue1764286] inspect.getsource does not work with decorated functions

2010-07-18 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I did not test the patch, but if it really addresses the issue, I don't see why 
such a simple fix would not be applied.  


Guilherme,

Can you add unit tests? Also, the second chunk in your patch is just a style 
fix which is a distraction for reviewers.

--
assignee:  -> belopolsky
nosy: +belopolsky
stage:  -> unit test needed
type:  -> behavior
versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.0

___
Python tracker 

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



[issue9297] SMTP cross-domain with Sqlite3 file attached problem

2010-07-18 Thread Murilo da Silva

Changes by Murilo da Silva :


--
title: SMTP with Sqlite3 file attachment cross-domain problem -> SMTP 
cross-domain with Sqlite3 file attached problem

___
Python tracker 

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




[issue9297] SMTP with Sqlite3 file attachment cross-domain problem

2010-07-18 Thread Murilo da Silva

Changes by Murilo da Silva :


--
title: SMTP with Sqlite3 file attachment -> SMTP with Sqlite3 file attachment 
cross-domain problem

___
Python tracker 

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



[issue9297] SMTP with Sqlite3 file attachment

2010-07-18 Thread Murilo da Silva

New submission from Murilo da Silva :

I'm sending e-mail using SMTP. This e-mail is sent with an Sqlite3 database 
attached.
When I send the e-mail in the same domain the attachment arrives OK, but if I 
send it to a different domain it comes crashed!!
The file is added with some base64 code...I don't have any ideia why!

The code mail.py:

import smtplib
import os
import mimetypes
import base64

from email import encoders
from email.message import Message
from email.mime.base import MIMEBase
from email.mime.nonmultipart import MIMENonMultipart
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
from email.mime.audio import MIMEAudio
from email.mime.image import MIMEImage
from email.mime.message import MIMEMessage
from email.mime.text import MIMEText

class SendMail:
def __init__(self):
self.body = []
self.attachments = []

def add_body(self, _text, _subtype='plain', _charset='us-ascii'):
part = MIMEText(_text+"\n", _subtype, _charset)
self.body.append(part)

def add_attach(self, _file_path, _subtype='octet-stream', 
_encoder=encoders.encode_base64, **_params):
path = _file_path
ctype, encoding = mimetypes.guess_type(path)
if ctype is None or encoding is not None:
ctype = 'application/octet-stream'
maintype, subtype = ctype.split('/', 1)
if maintype == 'text':
fp = open(path)
part = MIMEText(fp.read(), _subtype=subtype)
fp.close()
elif maintype == 'image':
fp = open(path, 'rb')
part = MIMEImage(fp.read(), _subtype=subtype)
fp.close()
elif maintype == 'audio':
fp = open(path, 'rb')
part = MIMEAudio(fp.read(), _subtype=subtype)
fp.close()
else:
fp = open(path, 'rb')
part = MIMEBase(maintype, subtype)
part.set_payload(fp.read())
fp.close()
# Encode the payload using Base64
encoders.encode_base64(part)
part.set_payload(part.get_payload().decode())

part.add_header('Content-Disposition', 'attachment', filename = 
path.split(os.sep)[-1])
self.attachments.append(part)  

def send_now(self, mail_from, mail_to, subject, multipart_subtype='mixed', 
host=None, port=25, auth=False, user="", passw=""):
msg = MIMEMultipart(multipart_subtype)
msg['Subject'] = subject
msg['From'] = mail_from
if type(mail_to) is list:
msg['To'] = ", ".join(mail_to)
else:
msg['To'] = mail_to

for b in self.body:
msg.attach(b)

for att in self.attachments:
msg.attach(att)

try:
mailserver = smtplib.SMTP(host, port)
#mailserver.set_debuglevel(1)
mailserver.ehlo() 
mailserver.starttls() 
mailserver.ehlo()
if auth:
mailserver.login(user, passw) 

mailserver.sendmail(mail_from, mail_to, msg.as_string())

mailserver.close()

return True
except Exception as e:
print(e)
return False

The database to attach is in the final.

The example:
s = SendMail()
s.add_body("test")
s.add_attach(os.path.abspath("test.db"))
s.send_now("t...@domain1.com", "t...@domain2.com", "test", 
host="smtp.domain1.com", port=25, auth=True, user="user", passw="pass")

--
components: Library (Lib)
files: test.db
messages: 110707
nosy: murilobr
priority: normal
severity: normal
status: open
title: SMTP with Sqlite3 file attachment
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file18056/test.db

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-18 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Mark L,

This could use some shaking.  Please take a look.

--
nosy: +BreamoreBoy, belopolsky

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

> Does the following patch solve your issue?

I tried, but it still crashed. I could reproduce the crash by following
script. It crashed also on Python2.7, but it doesn't crash on Python3.
And when I used io.open() instead of builtin open(), it doesn't crash
even on Python2.x. (Probably because io.open implements buffer protocol
by itself)

//

import threading
import sys

if sys.version_info.major == 3:
xrange = range

def main():
size = 1024 * 1024 # large enough
f = open("__temp__.tmp", "w", size)
for _ in xrange(size):
f.write("c")
t1 = threading.Thread(target=f.close)
t2 = threading.Thread(target=f.close)
t1.start()
t2.start()
t1.join()
t2.join()

if __name__ == '__main__':
main()

//

I lied a bit on msg110655. close(2) is not used, that is actually
fclose(). I didn't notice the variable *close* was declared as
the parameter of fill_file_fields().

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



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

2010-07-18 Thread Vlastimil Brom

Vlastimil Brom  added the comment:

Thanks for the update;
Just a small observation regarding some character ranges and ignorecase, 
probably irrelevant, but a difference to the current re anyway:

>>> zero2z = 
>>> u"0123456789:;<=>?...@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz"

>>> re.findall("(?i)[X-d]", zero2z)
[]

>>> regex.findall("(?i)[X-d]", zero2z)
[u'A', u'B', u'C', u'D', u'X', u'Y', u'Z', u'[', u'\\', u']', u'^', u'_', u'`', 
u'a', u'b', u'c', u'd', u'x', u'y', u'z']
>>>


re.findall("(?i)[B-d]", zero2z)
[u'B', u'C', u'D', u'b', u'c', u'd']

regex.findall("(?i)[B-d]", zero2z)
[u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'H', u'I', u'J', u'K', u'L', u'M', 
u'N', u'O', u'P', u'Q', u'R', u'S', u'T', u'U', u'V', u'W', u'X', u'Y', u'Z', 
u'[', u'\\', u']', u'^', u'_', u'`', u'a', u'b', u'c', u'd', u'e', u'f', u'g', 
u'h', u'i', u'j', u'k', u'l', u'm', u'n', u'o', u'p', u'q', u'r', u's', u't', 
u'u', u'v', u'w', u'x', u'y', u'z']

It seems, that the re module is building the character set using a case 
insensitive "alphabet" in some way.

I guess, the behaviour of re is buggy here, while regex is ok (tested on py 
2.7, Win XPp).

vbr

--

___
Python tracker 

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



[issue1098749] Single-line option to pygettext.py

2010-07-18 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file18055/issue1098749.diff

___
Python tracker 

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



[issue1098749] Single-line option to pygettext.py

2010-07-18 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

A rare example of a 5-year old patch that still applies with only a minor 
tweak.  This is probably a sign that pygettext itself has not been kept up to 
date.   In any case, I am attaching an updated patch which I did not test 
beyond running pygettext.py -h.  There was no response from OP to the patch 
review and from a brief look at the patch, it is not commit ready.

I am adding this as a dependency to meta-issue #7962 so that the fate of this 
patch and pygettext itself can be decided.

--
nosy: +belopolsky
stage:  -> patch review
type:  -> feature request

___
Python tracker 

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-18 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
dependencies: +Single-line option to pygettext.py

___
Python tracker 

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-18 Thread Matt Giuca

Matt Giuca  added the comment:

Thanks for doing that, Senthil.

--

___
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-07-18 Thread Matthew Barnett

Matthew Barnett  added the comment:

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

Just a few more tweaks for speed.

--
Added file: http://bugs.python.org/file18054/issue2636-20100719.zip

___
Python tracker 

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



[issue4111] Add Systemtap/DTrace probes

2010-07-18 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

If any RedHat/Fedora people are tuned in, can you give us an update on 
Systemtap/DTrace support in RedHat/Fedora python?  I understand that one of the 
main problems with bringing this upstream was the lack of uniformity between 
Apple and Sun approaches.  These days Apple and Sun(Oracle) are increasingly 
unfriendly to open source, so with a third solution available from RedHat, the 
choice seems obvious.

--

___
Python tracker 

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



[issue4111] Add Systemtap/DTrace probes

2010-07-18 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

+1!

--

___
Python tracker 

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



[issue4199] add shorthand global and nonlocal statements

2010-07-18 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2010/7/18 Mark Lawrence :
>
> Mark Lawrence  added the comment:
>
> I'm not sure as to the status of this.  Could it go back to (say) 3.3, is it 
> still a candidate for 3.2(.x), or what?

It can't do anything until 3.3.

--

___
Python tracker 

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



[issue4335] inspect.getsourcelines ignores last line in module

2010-07-18 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Martin,

Was there a reason for not accepting this patch for the trunk?

--
assignee:  -> belopolsky
keywords: +easy

___
Python tracker 

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



[issue4335] inspect.getsourcelines ignores last line in module

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Ok so we missed the opportunity to backport this to 2.5.3, could we please get 
it into modern versions of Python, or what?

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue4254] _cursesmodule.c callable update_lines_cols()

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

msg82783 states code portion of patch looks ok, what do we need to take this 
forward?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue4199] add shorthand global and nonlocal statements

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

I'm not sure as to the status of this.  Could it go back to (say) 3.3, is it 
still a candidate for 3.2(.x), or what?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue4111] Add Systemtap/DTrace probes

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Comments suggest this is wanted, can our build experts get this into 3.2?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue4080] pyunit - display time of each test case - patch

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Pawel, could you please provide an update wrt Ezio's comment on msg109448, 
thanks.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2010-07-18 Thread Nick Coghlan

Nick Coghlan  added the comment:

That would be me :)

In line with the 'consenting adults' philosophy and with the current behaviour 
causing real world problems, I'll accept this RFE and check it in soon.

--
assignee:  -> ncoghlan
resolution:  -> accepted

___
Python tracker 

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



[issue4037] doctest.py should include method descriptors when looking inside a class __dict__

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Could someone please respond to Georg's comment msg104300, thanks.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3985] removed string module from distutils [patch]

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Tarek, has this move to distutils2 taken place so we can close this, or do you 
wish to leave this issue open?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3299] Direct calls to PyObject_Del/PyObject_DEL are broken for --with-pydebug

2010-07-18 Thread Nick Coghlan

Nick Coghlan  added the comment:

I believe the two attached patches still need to be checked.

--

___
Python tracker 

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



[issue3873] Unpickling is really slow

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Has this slipped under the radar?  I believe that one way or the other any 
performance issue should be resolved if at all possible.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9110] contextlib.ContextDecorator

2010-07-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
stage: needs patch -> 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



[issue3871] cross and native build of python for mingw32 with distutils

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Could someone with knowledge of the Python build systems please comment on 
this, thanks.

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue3754] cross-compilation support for python build

2010-07-18 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue3754] cross-compilation support for python build

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Could someone with knowledge of the Python build systems please comment on 
this, thanks.

--
nosy: +BreamoreBoy

___
Python tracker 

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




[issue3704] cookielib doesn't handle URLs with / in parameters

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Could we please have an update from people who have been involved on this issue 
as to whether it can be taken forward, closed as to no longer relevant, or 
whatever.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3615] Expect methods for testing.

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can't see this going anywhere, might as well close unless someone is really 
interested.

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

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Please refer to msg89022.

--
nosy: +BreamoreBoy, tjreedy
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0

___
Python tracker 

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



[issue3532] bytes.tohex method

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

This should be closed unless someone can provide a good reason for keeping it 
open.

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

___
Python tracker 

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



[issue3488] Provide compress/uncompress functions on the gzip module

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

This appears to have slipped under the radar, msg94432 seems to sum it up.  
Could someone please take this forward.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Is there anyone who can provide this issue with a bit of TLC as it's almost the 
2nd birthday?

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.5, Python 2.6, 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



[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-18 Thread Narnie Harshoe

Narnie Harshoe  added the comment:

I'm sorry, but the last lines in the interpreter reflect my code changes which 
seemed to not be sufficient, but it shows that just for this case at least, it 
corrects it and allows it to be run in /bin/bash shells (much of my shell code 
is bash since I'm linux only and this is usually available and I make use of 
c-like math or incrementors like $(( x++ )) in the shell code (I know, I know, 
I should make my code more portable such that it can run on /bin/sh, but I'm 
lazy).

--

___
Python tracker 

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



[issue3299] Direct calls to PyObject_Del/PyObject_DEL are broken for --with-pydebug

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Loads of comments about backports, can this be closed or are there still any 
outstanding issues?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-18 Thread Narnie Harshoe

Narnie Harshoe  added the comment:

Hello,

I am impressed by the activity here. I am a new programmer and cutting my teeth 
with python. I wish I knew how to do a patch and write unit tests, but I'm just 
not there yet.

I can show a test case in this fashion where it fails.

First I prove that /bin/sh is /bin/sh (er, dash) and /bin/bash is /bin/bash. 
Then it can be seen that when executable is set as /bin/bash and there is a 
shell error, that it returns a shell error from /bin/sh, not from /bin/bash.

I see there are patches here that should fix it, but for those wanting to see 
the buggy code in action, here it is using the fact that echo was mistyped as 
echos to raise a shell error (but shell=True so it doesn't raise an OSError 
exception).
_

in shell terminal:
$ file /bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
$ file /bin/sh
/bin/sh: symbolic link to `dash'
$ file /bin/dash
/bin/dash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

in python interactive interpreter

>>> shell = Popen('echos', shell=True, executable="/bin/bash", stdin=PIPE, 
>>> stderr=PIPE, stdout=PIPE)
>>> shell.communicate()
('', '/bin/sh: echos: command not found\n')
>>> shell = Popen('echos', shell=True, executable="/bin/bash", stdin=PIPE, 
>>> stderr=PIPE, stdout=PIPE)
>>> shell.communicate()
('', '/bin/bash: echos: command not found\n')

Thank you for working on this so quickly. This is truly an amazing community.

--

___
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-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Could someone with knowledge of httplib please move this forward, all the 
comments I see are positive.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4.

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

@Mark Dickinson you've shown some interest, could you run with this?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue2813] No float formatting in PyString_FromFormat

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Closing as Jean has no interest in keeping it open.

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

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Does the following patch solve your issue?


Index: Python/ceval.c
===
--- Python/ceval.c  (révision 82959)
+++ Python/ceval.c  (copie de travail)
@@ -1763,6 +1763,8 @@
If __getattr__ raises an exception, w will
be freed, so we need to prevent that temporarily. */
 Py_XINCREF(w);
+if (PyFile_Check(w))
+PyFile_IncUseCount((PyFileObject *) w);
 if (w != NULL && PyFile_SoftSpace(w, 0))
 err = PyFile_WriteString(" ", w);
 if (err == 0)
@@ -1790,6 +1792,8 @@
 else
 PyFile_SoftSpace(w, 1);
 }
+if (PyFile_Check(w))
+PyFile_DecUseCount((PyFileObject *) w);
 Py_XDECREF(w);
 Py_DECREF(v);
 Py_XDECREF(stream);

--

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Hmm, correct me if following understanding is wrong somewhere...
> 1. File.close() is actually file_close(), and is calling close_the_file().
> 2. Returns immediately because local_fp == f->f_fp is already NULL.
>The return value is None.

I don't understand why you say that. Why is f->f_fp already NULL while
close() still hasn't been called?

By the way, is it 2.6-specific or does it also happen on 2.7?

--

___
Python tracker 

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



[issue4938] Pdb cannot access doctest source in postmortem

2010-07-18 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
stage:  -> needs patch
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



[issue2053] IDLE - standardize dialogs

2010-07-18 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Removed file: 
http://bugs.python.org/file10556/IDLE_standardize_dialogs.080609.patch

___
Python tracker 

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



[issue2053] IDLE - standardize dialogs

2010-07-18 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Removed file: 
http://bugs.python.org/file10140/IDLE_standardize_dialogs.080429.patch

___
Python tracker 

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



[issue5872] New C API for declaring Python types

2010-07-18 Thread Reid Kleckner

Changes by Reid Kleckner :


--
nosy: +rnk
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I forgot to mention that I didn't see any "Error without exception set" by my 
last patch. I agree f->f_fp = NULL; is needed there. ;-)

--

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Hmm, correct me if following understanding is wrong somewhere...
1. File.close() is actually file_close(), and is calling close_the_file().
2. Returns immediately because local_fp == f->f_fp is already NULL.
   The return value is None.
3. sts is non-NULL, so PyMem_Free(f->f_setbuf) happens.
4. There is no system call for FILE object, so thread won't wait for close(2) 
completion.

Maybe can we fix this issue by the patch like this? I moved PyMem_Free
into close_the_file(), and called it only when close operation
succeeded.

Index: Objects/fileobject.c
===
--- Objects/fileobject.c(revision 82910)
+++ Objects/fileobject.c(working copy)
@@ -371,9 +371,14 @@
 Py_END_ALLOW_THREADS
 if (sts == EOF)
 return PyErr_SetFromErrno(PyExc_IOError);
-if (sts != 0)
+if (sts != 0) {
+PyMem_Free(f->f_setbuf);
+f->f_setbuf = NULL;
 return PyInt_FromLong((long)sts);
+}
 }
+PyMem_Free(f->f_setbuf);
+f->f_setbuf = NULL;
 }
 Py_RETURN_NONE;
 }
@@ -567,12 +572,7 @@
 static PyObject *
 file_close(PyFileObject *f)
 {
-PyObject *sts = close_the_file(f);
-if (sts) {
-PyMem_Free(f->f_setbuf);
-f->f_setbuf = NULL;
-}
-return sts;
+return close_the_file(f);
 }

--

___
Python tracker 

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



[issue2813] No float formatting in PyString_FromFormat

2010-07-18 Thread Jean Brouwers

Jean Brouwers  added the comment:

Mark L,

No, I do not intend to take this issue further.  Rather the opposite, it should 
probably be paired down based on the recent comments.  Specifically, use 
PyOS_double_to_string, remove support for long double and perhaps more.

Also, the patches I created are more than 2 years old and will need to be 
updated against the current stringobject.c code.  There are quite a few changes 
in the 2.7 version of that file since early 2.6.

--

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Maybe I am wrong, but when another thread calls File.close(), there is
> no system call on the code path,

There is, and that's precisely what's the various tests test for.
(closing a file from a thread while it's being used from another thread)

--

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Maybe I am wrong, but when another thread calls File.close(), there is no 
system call on the code path, so I think still crash can happen nevertheless 
system call is thread safe.

--

___
Python tracker 

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



[issue1902] Test

2010-07-18 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

And another think: http://www.microsoft.com/VS(1234.foo).aspx

--

___
Python tracker 

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



[issue1902] Test

2010-07-18 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

This is a link: (http://www.python.org)

--
nosy: +loewis

___
Python tracker 

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



[issue6627] threading.local() does not work with C-created threads

2010-07-18 Thread Matt Joiner

Changes by Matt Joiner :


--
nosy: +anacrolix

___
Python tracker 

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



[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-18 Thread Doug Hellmann

Doug Hellmann  added the comment:

Looking into the code, I see in _json.c that a ValueError is raised by 
encoder_listencode_dict() on line 2150, but in the pure-Python implementation 
in json/encoder.py a TypeError is raised by _make_iterencode() on line 376.

--

___
Python tracker 

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



[issue8265] test_float fails on ARM Linux EABI with soft floating point

2010-07-18 Thread Mark Dickinson

Mark Dickinson  added the comment:

Added some test code to the configure script in r82957;  if the corresponding 
configure test fails, this snippet can be used in the gcc bug report.

--

___
Python tracker 

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



[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-18 Thread Doug Hellmann

Doug Hellmann  added the comment:

The attached file json_skipkeys.py illustrates the problem.

--
Added file: http://bugs.python.org/file18053/json_skipkeys.py

___
Python tracker 

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



[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-18 Thread Doug Hellmann

New submission from Doug Hellmann :

Under Python 2.6 the json encoder raised a TypeError when it encountered 
dictionary keys that were not strings.  Under 2.7, that exception has changed 
to a ValueError, but the documentation still says it raises TypeError.  I'm not 
sure which is right, but TypeError seems like the correct exception.

--
components: Library (Lib)
messages: 110660
nosy: doughellmann
priority: normal
severity: normal
status: open
title: json module skipkeys handling changed exception types in 2.7
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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The proposed resolution is wrong. As the comment says, there is a specific 
reason why f->fp is NULLed at this point.

It appears that maybe MSVCRT is not entirely thread-safe with respect to 
buffered file I/O. Perhaps the test can simply be disabled under Windows. Is 
test_close_open_print_buffered the only test that fails?

--
nosy: +pitrou

___
Python tracker 

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



[issue8265] test_float fails on ARM Linux EABI with soft floating point

2010-07-18 Thread Mark Dickinson

Mark Dickinson  added the comment:

The test_float failure is still extant.

Here's the output of gcc -v on this buildbot, for use in any gcc bug report:

Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.4-6' 
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared 
--enable-multiarch --enable-linker-build-id --with-system-zlib 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc 
--disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi 
--host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.4.4 (Debian 4.4.4-6) 

and the relevant compilation line:

gcc -pthread -c  -g -O2 -g -Wall -Wstrict-prototypes  -I. -IInclude -I./Include 
  -DPy_BUILD_CORE -o Objects/floatobject.o Objects/floatobject.c

--

___
Python tracker 

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



[issue2927] expose html.parser.unescape

2010-07-18 Thread Reid Kleckner

Reid Kleckner  added the comment:

It's using the old Python 2 unicode string literal syntax.

It also doesn't keep to 80 cols.

I'd also rather continue using a lazily initialized dict instead of catching a 
KeyError for '.

I also feel that with the changes to Unicode in py3k, the cp1252 stuff won't 
work as desired and should be cut.

===

Is anyone still interested in html.unescape or html.escape anyway?  Every web 
framework seems to have their own support routines already.  Otherwise I'd 
recommend close -> wontfix.

--
nosy: +rnk

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I created a patch to workaround this crash. But I saw another problamatic 
phenomenon "Error without exception set".

I confirmed PyErr_Occurred() returns TRUE when leaving file_close() on error, 
but I gave up.

test_close_open_print_buffered (__main__.FileThreadingTests) ... close failed in
 file object destructor:
IOError: [Errno 0] Error
Exception in thread Thread-1:
Traceback (most recent call last):
  File "e:\python-dev\release26-maint\lib\threading.py", line 532, in __bootstra
p_inner
self.run()
  File "e:\python-dev\release26-maint\lib\threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
  File "test_custom.py", line 94, in worker
f()
  File "test_custom.py", line 88, in 
lambda: self._close_and_reopen_file(),
  File "test_custom.py", line 54, in _close_and_reopen_file
self._close_file()
  File "test_custom.py", line 49, in _close_file
self.f.close()
SystemError: error return without exception set

Qclose failed in file object destructor:

IOError: [Errno 0] Error
Exception in thread Thread-4:
Traceback (most recent call last):
  File "e:\python-dev\release26-maint\lib\threading.py", line 532, in __bootstra
p_inner
self.run()
  File "e:\python-dev\release26-maint\lib\threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
  File "test_custom.py", line 94, in worker
f()
  File "test_custom.py", line 88, in 
lambda: self._close_and_reopen_file(),
  File "test_custom.py", line 54, in _close_and_reopen_file
self._close_file()
  File "test_custom.py", line 49, in _close_file
self.f.close()
SystemError: error return without exception set

4271 88.3166 ok

--
Ran 1 test in 6.579s

OK

--
Added file: 
http://bugs.python.org/file18052/py26_experimental_patch_on_fileobject.patch

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


Removed file: http://bugs.python.org/file18051/py26_debug_threaded_close.patch

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I saw value of local variable *thread* was 5384 and internal buffer's
address was 0x102618c8 (sorry, this is another stacktrace which differs
from previous one)

thread(5384) func(file_close): enter
thread(5384) func(close_the_file): enter
thread(5384) func(close_the_file): file(00A1FB18) address(00B18FD0): 
local_close enter...
thread(5376) func(file_close): enter
thread(5376) func(close_the_file): enter
thread(5376) func(close_the_file): leave
thread(5376) func(file_close): file(00A1FB18) address(00B18FD0): PyMem_Free
thread(5376) func(file_close): leave

Thread 5384 entered close_the_file() and ran local_close() and allowed
another thread to run. Before this, fp->f_fp was set to NULL. Thread 5376
entered close_the_file() and see fp->f_fp is NULL, and returned immediately
and freed fp->f_setbuf. Interesting point is, thread 5384 was still running
close(2), so flush(2) called by this function touched this buffer and crashed.

--
Added file: http://bugs.python.org/file18051/py26_debug_threaded_close.patch

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


--

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I saw value of local variable *thread* was 5384 and internal buffer's address 
was 0x102618c8 (sorry, this is another stacktrace which differs from previous 
one)

thread(5384) func(file_close): enter
thread(5384) func(close_the_file): enter
thread(5384) func(close_the_file): file(00A1FB18) address(00B18FD0): 
local_close enter...
thread(5376) func(file_close): enter
thread(5376) func(close_the_file): enter
thread(5376) func(close_the_file): leave
thread(5376) func(file_close): file(00A1FB18) address(00B18FD0): PyMem_Free
thread(5376) func(file_close): leave

Thread 5384 entered close_the_file() and ran local_close() and allowed another 
thread to run. Before this, fp->f_fp was set to NULL. Thread 5376 entered 
close_the_file() and see fp->f_fp is NULL, and returned immediately and freed 
fp->f_setbuf. Interesting point is, thread 5384 was still running close(2), so 
flush(2) called by this function touched this buffer and crashed.

--
keywords: +patch
Added file: http://bugs.python.org/file18050/py26_debug_threaded_close.patch

___
Python tracker 

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



[issue9294] Dead code in Objects/object.c

2010-07-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
keywords: +easy

___
Python tracker 

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



[issue8844] Condition.wait() doesn't raise KeyboardInterrupt

2010-07-18 Thread Reid Kleckner

Reid Kleckner  added the comment:

Waiting until the portability hacks for gettimeofday make it into core Python.

--
dependencies: +Make gettimeofday available in time module

___
Python tracker 

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



[issue9295] test_close_open_print_buffered(test_file) sometimes crashes

2010-07-18 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto :

I noticed test_close_open_print_buffered(test_file) sometimes crashes on 
release26-maint branch. This is most problamatic part in my python2.6 test 
survey on VC6 + Win2K.

Here is stacktrace.

_write_lk(int 6, const void * 0x00b49240, unsigned int 11) line 155 + 3 bytes
_write(int 6, const void * 0x00b49240, unsigned int 11) line 79 + 17 bytes
_flush(_iobuf * 0x102618e8) line 162 + 23 bytes
_fclose_lk(_iobuf * 0x102618e8) line 130 + 9 bytes
fclose(_iobuf * 0x102618e8) line 67 + 9 bytes
close_the_file(PyFileObject * 0x00a9e6b8) line 370 + 7 bytes
file_close(PyFileObject * 0x00a9e6b8) line 570 + 9 bytes
call_function(_object * * * 0x00fdf350, int 11134648) line 3734 + 204 bytes
PyEval_EvalFrameEx(_frame * 0x00b33d50, int 131) line 2414
(snip)

Python crashes when MSVCRT touches internal buffer of file object via flush() 
in close().

I think this is multi-threading bug related to internal buffer of file object. 
I'll post more.

--
components: Interpreter Core
messages: 110652
nosy: ocean-city
priority: normal
severity: normal
stage: needs patch
status: open
title: test_close_open_print_buffered(test_file) sometimes crashes
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue9294] Dead code in Objects/object.c

2010-07-18 Thread Antoine Pitrou

New submission from Antoine Pitrou :

internal_print() is called from only one place, with the `nesting` argument 
wired to 0, therefore the following chunk of code in internal_print() never 
gets a chance to be executed:

if (nesting > 10) {
PyErr_SetString(PyExc_RuntimeError, "print recursion");
return -1;
}

--
components: Interpreter Core
messages: 110651
nosy: pitrou
priority: low
severity: normal
stage: needs patch
status: open
title: Dead code in Objects/object.c
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



[issue6642] returning after forking a child thread doesn't call Py_Finalize

2010-07-18 Thread Reid Kleckner

Changes by Reid Kleckner :


--
assignee:  -> rnk
dependencies: +Throw away more radioactive locks that could be held across a 
fork in threading.py

___
Python tracker 

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



[issue6643] Throw away more radioactive locks that could be held across a fork in threading.py

2010-07-18 Thread Reid Kleckner

Changes by Reid Kleckner :


--
assignee:  -> rnk
keywords: +needs review -patch

___
Python tracker 

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



[issue9293] Unsupported IO operations should raise UnsupportedOperation

2010-07-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Another kind of unsupported operation is non-absolute seeking on a 
TextIOWrapper:

>>> open("LICENSE").seek(1, 1)
Traceback (most recent call last):
  File "", line 1, in 
IOError: can't do nonzero cur-relative seeks

--

___
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-07-18 Thread ipatrol

ipatrol  added the comment:

HAHA DISREGARD THAT, WRONG DOWNLOAD. However, the C++ compiler `is` now 
installed by default. P.S: that second ValueError?

--

___
Python tracker 

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



[issue9293] Unsupported IO operations should raise UnsupportedOperation

2010-07-18 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Some of them currently raise IOError. Fortunately, UnsupportedOperation 
inherits from IOError, which means compatibility can be preserved.

Contrast:
>>> open("LICENSE").write("bar")
Traceback (most recent call last):
  File "", line 1, in 
IOError: not writable

With:
>>> open("LICENSE", "rb").write(b"")
Traceback (most recent call last):
  File "", line 1, in 
io.UnsupportedOperation: write

Or:
>>> io.StringIO().fileno()
Traceback (most recent call last):
  File "", line 1, in 
io.UnsupportedOperation: fileno

Or, unfortunately:

>>> open("LICENSE", "rb", buffering=0).write(b"")
Traceback (most recent call last):
  File "", line 1, in 
ValueError: File not open for writing

--
components: IO, Library (Lib)
keywords: easy
messages: 110648
nosy: amaury.forgeotdarc, benjamin.peterson, haypo, pitrou
priority: normal
severity: normal
status: open
title: Unsupported IO operations should raise UnsupportedOperation
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



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

2010-07-18 Thread ipatrol

ipatrol  added the comment:

I noticed that the directions from mathworks are no longer correct. The only 
optional feature is a 64 bit SQL server. Yet I still can't get it to work 
correctly. Does MS no longer provide the compiler in their free editions?

--

___
Python tracker 

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



[issue9292] Dead code in Modules/pyexpat.c

2010-07-18 Thread Antoine Pitrou

New submission from Antoine Pitrou :

There's some dead code in xmlparse_ParseFile() in Modules/pyexpat.c: the file 
pointer "fp" is always NULL, and as such the following code can never get 
entered into:

if (fp) {
bytes_read = fread(buf, sizeof(char), BUF_SIZE, fp);
if (bytes_read < 0) {
PyErr_SetFromErrno(PyExc_IOError);
return NULL;
}
}

There might be similar situations in other methods.

--
components: Extension Modules
messages: 110646
nosy: akuchling, christian.heimes, pitrou
priority: low
severity: normal
stage: needs patch
status: open
title: Dead code in Modules/pyexpat.c
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



[issue9110] contextlib.ContextDecorator

2010-07-18 Thread Georg Brandl

Georg Brandl  added the comment:

Applied, with small changes, in r82951.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue9277] test_struct failure on ARM

2010-07-18 Thread Mark Dickinson

Mark Dickinson  added the comment:

Ah yes; I missed that bit of PyInit__struct;  thank you!

Setting to pending; I'll close once the buildbots have reported back (it might 
take some days for the ARM buildbots to catch up).

Many thanks for the diagnosis.

--
status: open -> pending

___
Python tracker 

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



[issue9110] contextlib.ContextDecorator

2010-07-18 Thread Michael Foord

Michael Foord  added the comment:

I've uploaded a new patch with additions to the docs. Let me know if it is ok 
or if you have any suggested amendments.

--
Added file: http://bugs.python.org/file18049/contextlib_docs.patch

___
Python tracker 

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



[issue3119] pickle.py is limited by python's call stack

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Sean has stated that the patch seems fine, what needs to be done to take this 
forward?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9277] test_struct failure on ARM

2010-07-18 Thread Stefan Krah

Stefan Krah  added the comment:

Mark Dickinson  wrote:
> > Somewhere along the way native_table is used instead of lilendian_table,
> > so np_bool is called.
> 
> Hmm.  This doesn't alleviate my confusion. :)

I suppose I sounded a bit like the Oracle of Delphi here. :)

I compiled with OPT="-O0 -g -funsigned-char" and stepped through the code 
(pre-patch).
With '<', np_bool is substituted for bp_bool (apparently in PyInit__struct).

np_bool correctly returns -1, so the problem does not occur.

--

___
Python tracker 

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



[issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Anyone with knowledge of cookies and/or regexes who could review this?  The 
patch isn't that big and includes unit tests.  Note also Trent's offer to check 
it in and patch py3k.

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.6, Python 3.0

___
Python tracker 

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



[issue3068] IDLE - Add an extension configuration dialog

2010-07-18 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy: +tjreedy
versions: +Python 3.2 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue3022] mailbox module, two small fixes

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Anyone interested in taking this forward?

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.6, Python 3.0

___
Python tracker 

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




[issue2931] optparse: various problems with unicode and gettext

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Alexy, there would be a much better chance of getting this accepted if you 
could supply a patch file that also included unit tests.

--
nosy: +BreamoreBoy, aronacher
versions: +Python 3.1, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-07-18 Thread Dmitry Jemerov

New submission from Dmitry Jemerov :

On Windows, mimetypes initialization reads the list of MIME types from the 
Windows registry. It assumes that all characters are Latin-1 encoded, and fails 
when it's not the case, with the following exception:

Traceback (most recent call last):
  File "mttest.py", line 3, in 
mimetypes.init()
  File "c:\Python27\lib\mimetypes.py", line 355, in init
db.read_windows_registry()
  File "c:\Python27\lib\mimetypes.py", line 260, in read_windows_registry
for ctype in enum_types(mimedb):
  File "c:\Python27\lib\mimetypes.py", line 250, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal 
not in range(128)

This can be reproduced, for example, on a Russian Windows XP installation which 
has QuickTime installed (QuickTime creates the non-Latin entries in the 
registry). The following line causes the exception to happen:

import mimetypes; mimetypes.init()

--
components: Library (Lib), Windows
messages: 110637
nosy: Dmitry.Jemerov
priority: normal
severity: normal
status: open
title: mimetypes initialization fails on Windows because of non-Latin 
characters in registry
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



[issue2927] expose html.parser.unescape

2010-07-18 Thread Mark Lawrence

Mark Lawrence  added the comment:

Trying to run the test and I get:-

c:\py3k\Lib>..\PCbuild\python_d.exe test\test_htmlparser.py
  File "test\test_htmlparser.py", line 326
escaped = u"There’s the Côte"
  ^
SyntaxError: invalid syntax

--
nosy: +BreamoreBoy

___
Python tracker 

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



  1   2   >