[issue4485] fast swap of "default" Windows python versions

2008-12-02 Thread Glenn Linderman

New submission from Glenn Linderman <[EMAIL PROTECTED]>:

Here's how I set up my computer, for multiple versions.  Now to change
the "default", I just use the assoc command to change the association
for .py to one of the three listed ftypes.  Simple and quick.

c:\>ftype Python25.File
ftype Python25.File
Python25.File="C:\Python25\python.exe" "%1" %*

c:\>ftype Python26.File
ftype Python26.File
Python26.File="C:\Python26\python.exe" "%1" %*

c:\>ftype Python30.File
ftype Python30.File
Python30.File="C:\Python30\python.exe" "%1" %*

c:\>assoc .py
assoc .py
.py=Python25.File


It would be nice if the ftypes were version specific as created by the
installer; IIRC, I created the above three from the ftype Python.File as
I installed each version. 

The Python.File could still be created by default, and could still
reflect the last temporally installed version of Python... but by
documenting the version specific ftypes, the user could still switch
among versions.

I suppose there is a question of if the version should contain two or
three parts, i.e. Python253.File; and if the version should be separated
such as Python2.5.3.File; the above worked for me for the moment, but
some thought might reveal a more useful technique.

It might even be appropriate for a Python version to create 3 ftypes,
such that version N.M.O creates ftypes named PythonN.File,
PythonN.M.File, and PythonN.M.O.File.  All but the most specific one
would be subject to change when additional versions are installed.  If M
or O are zero, they should probably still be specified (as zero) in a
scheme like this, so that there would be a solid way of referring to all
the specific versions.

--
components: Installation
messages: 76731
nosy: v+python
severity: normal
status: open
title: fast swap of "default" Windows python versions
type: feature request
versions: Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan

New submission from Nick Coghlan <[EMAIL PROTECTED]>:

The interactive interpreter doesn't appear to like it if __cause__ and
__context__ are both set on the current exception.

=
>>> try:
...   raise IOError
... except:
...   raise AttributeError from KeyError
...
KeyError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "", line 2, in 
IOError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 4, in 
AttributeError
=

I'm not entirely sure what *should* be displayed here (the code I typed
in is admittedly bizarre), but what is currently being displayed
definitely isn't right.

--
components: Interpreter Core
messages: 76732
nosy: ncoghlan
severity: normal
status: open
title: Exception traceback is incorrect for strange exception handling
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12189/poplib_04_STLS.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12170/poplib.py.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Lorenzo M. Catucci <[EMAIL PROTECTED]> added the comment:

I'm reasonably sure Victor is right about the original socket being
unneeded. How does the series look now?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

This fix was applied in the wrong place.

URI path components, and HTTP URI path components in particular, *can*
be empty.  See RFC 3986.  So the comment in the code that was inserted
with the fix for this bug that says "possibly malformed" is incorrect,
and should instead just refer to section 3.2.2 of RFC 2616.  Also,
because 3.2.2 says "If the abs_path is not present in the URL, it MUST
be given as "/" when used as a Request-URI for a resource (section
5.1.2)", it seems clear that this transformation (add the slash if
there's no path component) should always happen when retrieving URIs,
regardless of where the URI came from -- not only for redirects.

Note that RFC 2616 incorrectly claims to refer to the definition of
abs_path from RFC 2396.  The fact that it's incorrect is made clear in
2616 itself, in section 3.2.3, when it says that abs_path can be empty.
 In any case, RFC 2396 is obsoleted by RFC 3986, which is clear on this
issue, and reflects actual usage of URIs.  URIs like http://python.org
and http://python.org?spam=eggs have been in widespread use for a long
time, and typing the latter URL into firefox (3.0.2) confirms that
what's actually sent is "/?spam", whereas urllib2 still sends "?spam".

No test was added with this fix, which makes it unnecessarily hard to
work out what exactly the fix was supposed to fix.  For the record, this
is the sequence of redirections before the fix was applied (showing base
URI + redirect URI reference --> redirect URI):

'http://www.wikispaces.com' +
'https://session.wikispaces.com/session/auth?authToken=token' -->
'https://session.wikispaces.com/session/auth?authToken=token'
'https://session.wikispaces.com/session/auth?authToken=token' +
'http://www.wikispaces.com?responseToken=token' -->
'http://www.wikispaces.com?responseToken=token'

and after the fix was applied:

'http://www.wikispaces.com' +
'https://session.wikispaces.com/session/auth?authToken=token' -->
'https://session.wikispaces.com/session/auth?authToken=token'
'https://session.wikispaces.com/session/auth?authToken=token' +
'http://www.wikispaces.com/?responseToken=token' -->
'http://www.wikispaces.com/?responseToken=token'
'http://www.wikispaces.com/?responseToken=token' +
'http://www.wikispaces.com/' --> 'http://www.wikispaces.com/'

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread maxua

maxua <[EMAIL PROTECTED]> added the comment:

How about this version?

--
nosy: +maxua
Added file: http://bugs.python.org/file12190/mimetext-unicode.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3819] urllib2 sends Basic auth across redirects

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

I agree this is a bug.

Senthil -- re "1)", the paragraph you refer to (quoted by the OP) is
relevant.  The fact that it doesn't specifically mention redirection is
not relevant.

Re "2)": I don't know how digest auth works, but the paragraph you quote
from appears to be there for explanation rather than for prescribing how
digest auth or HTTP work (i.e. it appears to be "non-normative").  This
bug doesn't say that redirected requests shouldn't contain the
Authorization header.  It says that the Authorization header for an old
request shouldn't be sent with a new request (though it may turn out the
new one is equal to the old one in some cases).

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

It was proposed to rewrite MIMEText in Python 3.1 (and 2.7?) to use 
unicode characters in the internals and reconvert to bytes to send it 
to a socket (or a file).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4487] Add utf8 alias for email charsets

2008-12-02 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2008-12-02 Thread Damjan Georgievski

Damjan Georgievski <[EMAIL PROTECTED]> added the comment:

The patch by maxua works fine with 2.6 too and solves the problem.
I'd suggest it be applied to the 2.6 branch, even if email is rewriten
for 2.7/3.x.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

This is not a doc bug - in actuality, the mp_benchmarks.py example is 
exposing an assertion error in sharedctypes.py.

The doc-related bugs Christian and I spoke about have been fixed, however 
the main issue for this (the assertion error) is still in the code, and I 
haven't had a chance to trace it down and fix it.

--
components: +Extension Modules -Documentation

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1205] urllib fail to read URL contents, urllib2 crash Python

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

This is fixed in trunk r61034 by issue #900744 .  Please use that issue
for any discussion re whether this should be fixed in 2.5.

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Lorenzo M. Catucci <[EMAIL PROTECTED]> added the comment:

Changed CAPA as requested: now there is a proper docstring, and the
useless if ... else ... is gone.

Added file: http://bugs.python.org/file12192/poplib_01_CAPA.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12186/poplib_01_CAPA.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Lorenzo M. Catucci <[EMAIL PROTECTED]> added the comment:

As for the shutdown/close comment, I think there could be cases
where you are going to close but don't want to shutdown: e.g. you might
close a dup-ed socket, but the other owner would want to continue
working with his copy of the socket.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

The current behaviour is the result of how I interpreted the error
reporting specification in PEP 3134. See "Enhanced Reporting" in
http://www.python.org/dev/peps/pep-3134/ . I may have misinterpreted it,
in that both the cause and the context are printed out while the PEP may
be read as suggesting the context must not be printed out when there is
a cause.

In any case, I don't think it is a release blocker. It only regards a
new and advanced feature (explicit exception chaining) and doesn't
disrupt its functioning.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12186/poplib_01_CAPA.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4488] Python Documentation not Newb Friendly

2008-12-02 Thread Martin Meredith

New submission from Martin Meredith <[EMAIL PROTECTED]>:

I'm a new python user (developing in python) and I recently had a
discussion with someone that my main issue with python is finding where
the functions are that I need to use.

An example (probably not the best) - I need to split a filename so that
I can have the extension and the rest of the filename seperate. Fine.. I
google, and I get the following page:-

http://www.python.org/doc/2.5.2/lib/os-path.html

Now, that lists the function splitext - which is what I need - but it's
not clear on the page where that function is located (os.path) 

I think that this should be made clearer somehow - as it seems to me
that you have to go through about 3 pages trying to work out where it is
(or work it out from the URL) - which isn't very intuitive, espescially
for a new user, who doesn't actually know where all the functions exist.

--
assignee: georg.brandl
components: Documentation
messages: 76747
nosy: georg.brandl, mez
severity: normal
status: open
title: Python Documentation not Newb Friendly
type: feature request

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Such a bizarre corner case probably isn't an actual release blocker, but
I'm setting it as such so that Barry can make that call explicitly
before the final 3.0 release.

--
assignee:  -> barry
nosy: +barry
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1537445] urllib2 httplib _read_chunked timeout

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

urlopen() raises URLError, .read() may raise other errors.  I don't
think that's a bug in itself, though no doubt:

 1. The documentation of exceptions raised could and should be improved
 2. The exceptions that can be raised are likely still inconsistent
(though this has improved in Python 2.6, I think)

Recommend closing this bug.

Please open other bugs about the issues above if you have patches.

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4488] Python Documentation not Newb Friendly

2008-12-02 Thread Tim Golden

Tim Golden <[EMAIL PROTECTED]> added the comment:

What would be helpful would be a specific suggestion from the OP (or, better 
still, a doc patch) as to exactly what should change or at least what kind of 
words should go where. As it stands, this report highlights a real but quite 
general issue issue but doesn't take us anywhere towards how we could improve 
things.

--
nosy: +tim.golden

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1123695] attempting to use urllib2 on some URLs fails starting on 2.4

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

Can somebody close this?  It's fixed on trunk in #900744 .

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12187/poplib_02_sock_shutdown.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

"lst[1:] if len(lst)>1 else []" is useless, lst[1:] alone does the 
same :-) So it can be simplify to:
  def _parsecap(line):
 lst = line.split()
 return lst[0], lst[1:]

You might add a real example in the capa() docstring.

About poplib_02_sock_shutdown.diff: I'm not sure that poplib is the 
right place to fix the issue... if there is really an issue. Why not 
calling shutdown directly in socket.close()? :-)

You removed self._sock, nice.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4473] POP3 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12188/poplib_03_SSL_refactor.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4487] Add utf8 alias for email charsets

2008-12-02 Thread maxua

New submission from maxua <[EMAIL PROTECTED]>:

When using MIME email package you can specify "utf8" as the encoding. It
will be accepted but it is not rendered correctly in some MUA. E.g. Mac
OS X Mail.app doesn't display it properly while Google Gmail does.

It is confusing since Python itself happily understands both utf8 and utf-8.

The patch adds "utf8" as an alias to "utf-8" encoding which means user
won't need to think twice.

Test case:
from email.MIMEText import MIMEText

msg = MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430')
msg.set_charset('utf8')
print msg.as_string()

--
components: Library (Lib)
files: charset-utf8-alias.patch
keywords: patch
messages: 76738
nosy: maxua
severity: normal
status: open
title: Add utf8 alias for email charsets
versions: Python 2.5
Added file: http://bugs.python.org/file12191/charset-utf8-alias.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4488] Python Documentation not Newb Friendly

2008-12-02 Thread Martin Meredith

Martin Meredith <[EMAIL PROTECTED]> added the comment:

Well, I can't offer a patch (as I said - I'm a python n00b) - but I can
offer suggestions.

1) show the functions as where they are - for example - splitext would
be shown as os.path.splitext(arguments)

2) header titles for groups within the same module. So splitext, etc
etc, would be under a visible title that says "os.path"

3) alternate documentation links by modules. So the documentation stays
the same, but there is also an alternate set which shows the same
things, but where the "up" button would take me from os.path to os
(showing that that is the module title) rather than the title being 
14.1.6 Miscellaneous System Information 

In fact - 3 exists - sort of, it just seems a little wrong.

Link 1: http://www.python.org/doc/2.5.2/lib/os-path.html
Title: 
14.1.6 Miscellaneous System Information 
How to get there:- Python Library Reference -> Generic Operating System
Services -> os -> Miscellaneous System Information 

Link 2: http://www.python.org/doc/2.5.2/lib/module-os.path.html
Title: 11.1 os.path -- Common pathname manipulations 
How to Get there:- Python Library Reference -> File and Directory Access
->  os.path -- Common pathname manipulations 

Link 2 seems to give the information in a good way - but didn't show on
my "quickly search google" radar. Plus, the way to get there seems
wrong. It should (IMO) be accessible through "Python Library Reference
-> modules -> os -> os.path" or something similar.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4471] IMAP4 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Lorenzo M. Catucci <[EMAIL PROTECTED]> added the comment:

As requested, I've split the patch into three parts: the first one does
just refactor IMAP4_SSL, the second is really a one liner for shutting
down the socket before closing it, and the thirs does introduce the
starttls method in IMAP4.

Added file: http://bugs.python.org/file12193/imaplib_01_SSL_refactor.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2008-12-02 Thread Mart Sõmermaa

New submission from Mart Sõmermaa <[EMAIL PROTECTED]>:

Race condition in the rmtree function in the shutils module allows local
users to delete arbitrary files and directories via a symlink attack.

See also http://bugs.debian.org/286922

Attack:

---

# emulate removing /etc
$ sudo cp -a /etc /root/etc/
$ sudo python2.6
 >>> for i in xrange(0, 5):
...  with open("/root/etc/" + str(i), "w") as f:
... f.write("0")
...
$ ls /root/etc > orig_list.txt

$ mkdir /tmp/attack
$ cp -a /root/etc/* /tmp/attack

$ sudo python2.6
 >>> from shutil import rmtree
 >>> rmtree('/tmp/attack')
 >>> # press ctrl-z to suspend execution
^Z
[1]+  Stopped sudo python2.6

$ mv /tmp/attack /tmp/dummy; ln -s /root/etc /tmp/attack
$ fg
sudo python2.6
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python2.6/shutil.py", line 225, in rmtree
onerror(os.rmdir, path, sys.exc_info())
  File "/usr/local/lib/python2.6/shutil.py", line 223, in rmtree
os.rmdir(path)
OSError: [Errno 20] Not a directory: '/tmp/attack'

$ ls /root/etc > new_list.txt
$ diff -q orig_list.txt new_list.txt
Files orig_list.txt and new_list.txt differ

---

If the attack wasn't successful, /root/etc would not be modified and
orig_list.txt and new_list.txt would be identical.

--
components: Library (Lib)
messages: 76753
nosy: mrts
severity: normal
status: open
title: shutil.rmtree is vulnerable to a symlink attack
type: security
versions: Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4471] IMAP4 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12194/imaplib_02_shutdown.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4471] IMAP4 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12195/imaplib_03_starttls.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4471] IMAP4 missing support for starttls

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12169/imaplib.py.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4490] xml/sax/expatreader.py raises AttributeError when run

2008-12-02 Thread Jean-Paul Calderone

New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:

expatreader.py has a __main__ which uses something called
`xml.sax.XMLGenerator´.  However, `xml.sax´ has no such attribute.

--
components: Library (Lib)
messages: 76754
nosy: exarkun
severity: normal
status: open
title: xml/sax/expatreader.py raises AttributeError when run
versions: Python 2.3, Python 2.4, Python 2.5, Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1123695] attempting to use urllib2 on some URLs fails starting on 2.4

2008-12-02 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
resolution:  -> out of date
status: open -> closed
superseder:  -> catch invalid chunk length in httplib read routine

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4491] email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF

2008-12-02 Thread Atsuo Ishimoto

New submission from Atsuo Ishimoto <[EMAIL PROTECTED]>:

email.Header.decode_header() doesn't work if encoded-word was separeted
by CRLF. 

For exmaple, decode_header('=?iso-8859-1?q?hello?=\r\n world.') returns
[('=?iso-8859-1?q?hello?=\r\n world.', None)], not [('hello',
'iso-8859-1'), (' world.', None)].

This bug was caused by rev.54371, bug #1582282. I attached a patch to
fix problem and test-case.

--
components: Library (Lib)
files: email.patch
keywords: patch
messages: 76755
nosy: ishimoto
severity: normal
status: open
title: email.Header.decode_header() doesn't work if encoded-word was separeted 
by CRLF
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file12196/email.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4488] Python Documentation not Newb Friendly

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Did you see that the current (=2.6) documentation has changed a lot?
For example:

http://docs.python.org/library/os.path.html#os.path.splitext

It seems that most of your concerns have been addressed. (also, see the
nice URL)
I suggest that you try it, and address your recommendations from there.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4488] Python Documentation not Newb Friendly

2008-12-02 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Like Amaury said, I think this is fixed.

--
resolution:  -> fixed
status: open -> pending

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2306] Update What's new in 3.0

2008-12-02 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

The "optimizations" section needn't be so pessimistic. I just compiled
the latest py3k and release2.5-maint branches and py3k is 10% slower
(38000 vs. 42000).

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4470] smtplib SMTP_SSL not working.

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12168/smtplib.py.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4470] smtplib SMTP_SSL not working.

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12197/smtplib_01_default_port.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4470] smtplib SMTP_SSL not working.

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12198/smtplib_02_fix_ssl.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4470] smtplib SMTP_SSL not working.

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12199/smtplib_03_use_makefile.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4470] smtplib SMTP_SSL not working.

2008-12-02 Thread Lorenzo M. Catucci

Changes by Lorenzo M. Catucci <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12200/smtplib_04_remove_fakefile.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4470] smtplib SMTP_SSL not working.

2008-12-02 Thread Lorenzo M. Catucci

Lorenzo M. Catucci <[EMAIL PROTECTED]> added the comment:

I've reworked the patch into a series, like haypo requested for
poplib and imaplib.

Added file: http://bugs.python.org/file12201/smtplib_05_shutdown_socket.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-02 Thread Leger

Leger <[EMAIL PROTECTED]> added the comment:

- I modify your dbm2.diff because the module name is "_dbmmodule.c" and
not "dbmmodule.c". 
- Patching success
- new test "configure ... ; make" and make stop with error :
"...
gcc -pthread -shared
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/_ctypes.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/callbacks.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/callproc.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/stgdict.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/cfield.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/malloc_closure.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/libffi/src/prep_cif.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/libffi/src/x86/ffi.o
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_ctypes/libffi/src/x86/sysv.o
-L/usr/local/lib -L. -lpython3.0 -o
build/lib.linux-i686-3.0-pydebug/_ctypes.so

Failed to build these modules:
_dbm  

running build_scripts
creating build/scripts-3.0
copying and adjusting /install/python-3.0rc3.diff/Tools/scripts/pydoc ->
build/scripts-3.0
copying and adjusting /install/python-3.0rc3.diff/Tools/scripts/idle ->
build/scripts-3.0
copying and adjusting /install/python-3.0rc3.diff/Tools/scripts/2to3 ->
build/scripts-3.0
copying and adjusting /install/python-3.0rc3.diff/Lib/smtpd.py ->
build/scripts-3.0
changing mode of build/scripts-3.0/pydoc from 644 to 755
changing mode of build/scripts-3.0/idle from 644 to 755
changing mode of build/scripts-3.0/2to3 from 644 to 755
changing mode of build/scripts-3.0/smtpd.py from 644 to 755
[88798 refs]"

Added file: http://bugs.python.org/file12202/dbm2.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-02 Thread Leger

Leger <[EMAIL PROTECTED]> added the comment:

I retest with light configure modification and dbm2.diff with file name
"_dbmmodule.c" :

"configure --with-pydebug --with-doc-strings --enable-shared
--enable-profiling --enable-ipv6 --with-threads --with-tsc --prefix=/usr
; make"

"...
gcc -pthread -shared
build/temp.linux-i686-3.0-pydebug/install/python-3.0rc3.diff/Modules/_dbmmodule.o
-L/usr/local/lib -L. -lgdbm -lpython3.0 -o
build/lib.linux-i686-3.0-pydebug/_dbm.so
*** WARNING: renaming "_dbm" since importing it failed:
build/lib.linux-i686-3.0-pydebug/_dbm.so: undefined symbol: dbm_firstkey

Failed to build these modules:
_dbm  

running build_scripts
[89618 refs]"

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4347] Circular dependency causes SystemError when adding new syntax

2008-12-02 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

Because of all the patch includes a bunch of junk for generated files
(any chance you can make a diff, Thomas, with only the stuff that really
requires review?), I have not done a real review. But a quick look does
show that the comment added to Grammar needs to be tweaked. Please use
complete sentences, including punctuation (e.g., capitalize words, end
in a period, etc.). Also don't use XXX just to grab attention for
something that is not meant to be removed.

--
nosy: +brett.cannon
stage:  -> patch review

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3001] RLock's are SLOW

2008-12-02 Thread Kevin Watters

Changes by Kevin Watters <[EMAIL PROTECTED]>:


--
nosy: +kevinwatters

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-02 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Leger> - I modify your dbm2.diff because the module name is
Leger>   "_dbmmodule.c" and not "dbmmodule.c".

I think you missed the point of the dbm2.diff file.  It should be applied to
the Python 2.x code, not to Python 3.x.  I don't have access to the
necessary platform to run the test.

To summarize:

* dbm.diff should be applied to the py3k branch (or to the 3.0rc3 release
  code).
* dbm2.diff should be applied to the code on the trunk (or to the 2.6
  release code).

Skip

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4492] httplib code thinks it closes connection, but does not

2008-12-02 Thread John J Lee

New submission from John J Lee <[EMAIL PROTECTED]>:

The fix for #900744 tried to close the connection when a bad chunk
length was received.  The comment inserted with that fix "close the
connection as protocol synchronisation is probably lost" is incorrect:
self.close() in _read_chunked does not close the connection.  You have
to call HTTPConnection.close() to close the connection.

So:

 * The comment is incorrect, and should be removed or fixed.  I guess
the self.close() should stay.

 * It's probably a bug that it doesn't result in the connection being
closed.  I guess a fix for that would be for the HTTPResponse to set
some state on itself that HTTPConnection can query so that
HTTPConnection can close itself the next time somebody tries to do
something with the connection.

--
components: Library (Lib)
messages: 76764
nosy: jjlee
severity: normal
status: open
title: httplib code thinks it closes connection, but does not
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue900744] catch invalid chunk length in httplib read routine

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

The fix for this doesn't actually close the connection as the comment in
the fix claims -- I've raised #4492 to track that.

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-02 Thread Leger

Leger <[EMAIL PROTECTED]> added the comment:

Skip, Sorry for my mistake with dbm2.diff ;)

>From the tar 3.0rc3 I apply the patch (dbm.diff). Configure ... and
make. But the result is always wrong :
"Failed to build these modules:
_dbm"

Best regards, Frederic

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1411097] httplib patch to make _read_chunked() more robust

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

For the record, I think my worry in msg49366 was a non-issue: the only
time .readline() will return "" is when the connection has closed (so I
think the fix that eventually applied is correct).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1772481] urllib2 hangs with some documents.

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

Please close: this is already fixed on trunk and release25-maint
(r60747, issue #1966) (and on release26-maint, which was branched after
the fix).

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-02 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Frederic> From the tar 3.0rc3 I apply the patch (dbm.diff). Configure
Frederic> ... and make. But the result is always wrong :

> "Failed to build these modules:
> _dbm"

Why does it fail?  Is there compile error?  Does linking fail?  I guessed
that the library would still be "gdbm", but I don't really know.  Does your
system maybe install a library file named "libgdbm-ndbm.so" or something
similarly obscure?

I'm happy to try and get this resolved, but not that there is only another
day or two before 3.0final is released.  (This might not make the release
anyway.)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4483] Error to build _dbm module during make

2008-12-02 Thread Leger

Leger <[EMAIL PROTECTED]> added the comment:

- Only the make generate last error sentence.
- Debian/Lenny provide only "libgdbm-dev-1.8.3-3" provide :
[EMAIL PROTECTED]:/install# ll /usr/lib/libgdbm.so*
lrwxrwxrwx 1 root root16 2008-12-01 21:45 /usr/lib/libgdbm.so ->
libgdbm.so.3.0.0
lrwxrwxrwx 1 root root16 2008-03-08 21:38 /usr/lib/libgdbm.so.3 ->
libgdbm.so.3.0.0
-rw-r--r-- 1 root root 19940 2006-04-24 05:25 /usr/lib/libgdbm.so.3.0.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2306] Update What's new in 3.0

2008-12-02 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

Guido, ETA?  I think this will be one of the last things before we can
tag the tree for release.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1772481] urllib2 hangs with some documents.

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Thanks for the review!

--
nosy: +amaury.forgeotdarc
resolution:  -> out of date
status: open -> closed
superseder:  -> infinite loop in httplib

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

Jesse, does this affect Python 3.0?  If not, then I will lower the
priority and release 2.6.1 without it (there's always 2.6.2 :).

If so, then we need to know if 1) it's really a release blocker; 2) what
the ETA on a fix is.  I would like to tag the 3.0 branch today.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

2.6.0 shipped with the assertion error. Unfortunately, I'm tapped out at 
the day job right now, so I won't have a fix prepped and tested in time.

--
priority: release blocker -> deferred blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

This looks like it only affects printing exceptions with implicit
chaining when the exception propagates to the top level.  (Maybe it also
affects the traceback module?)

In that case, I agree with Antoine.  Let's fix it in 3.0.1.

--
priority: release blocker -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

This bug was known before the release -- unfortunately the original
author of the patch didn't fix them in time.  This and some other
unresolved issues listed are listed on #2451.  "Somebody" should raise
bugs about the rest of them too, and fix them.

(Senthil, is that the bug you meant to refer to?  You pasted this bug's
own URL here, presumably you meant to paste the URL for a different bug?)

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2008-12-02 Thread John J Lee

Changes by John J Lee <[EMAIL PROTECTED]>:


--
nosy: +facundobatista

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4493] urllib2 doesn't always supply / where URI path component is empty

2008-12-02 Thread John J Lee

New submission from John J Lee <[EMAIL PROTECTED]>:

As required by RFC 2616 section 3.2.2, for all HTTP requests sent by
urllib2, the path component of the URI should be normalized to "/"
before the Request-URI derived from it gets passed to httplib (or
something functionally equivalent to that).  This was fixed in one case
in #2464, but the fix is in the wrong place, since it's a general
problem not specific to redirects.  See the longer discussion here:

http://bugs.python.org/msg76736

(hmm, let's see if I can just say msg76736 and get a hyperlink)

Example:

import urllib2
urllib2.urlopen("http://python.org?spam";)

Expect: sends "/?spam" in request line.

Got: sends "?spam" in request line.

Probably should be fixed by making Request.get_selector() return the
normalized URI reference (with the slash always present).  When fixing,
remember that the Request-URI of RFC 2616 (returned by .get_selector())
is sometimes a relative reference, and sometimes a URI (in RFC 3986's
terminology).

--
messages: 76777
nosy: jjlee
severity: normal
status: open
title: urllib2 doesn't always supply / where URI path component is empty

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

I've raised #4493 about the issue I raised in my previous comment.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4494] Python 2.6 fails to build with Py_NO_ENABLE_SHARED

2008-12-02 Thread Alexey Borzenkov

New submission from Alexey Borzenkov <[EMAIL PROTECTED]>:

When building python 2.6 with Py_NO_ENABLE_SHARED compilation fails on
PC/getpathp.c, because it uses PyWin_DLLVersionString and
PyWin_DLLhModule unconditionally, which are implemented in PC/dl_nt.c
only when Py_ENABLE_SHARED is defined. The attached patch fixes the
problem by wrapping dependent parts in if #ifdef Py_ENABLE_SHARED/#endif.

--
components: Windows
files: python-2.6-static.patch
keywords: patch
messages: 76778
nosy: snaury
severity: normal
status: open
title: Python 2.6 fails to build with Py_NO_ENABLE_SHARED
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file12203/python-2.6-static.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Note that the display is correct in the case where the chaining is
"right", i.e.:

try:
  raise IOError
except:
  try:
raise KeyError
  except Exception as ex:
raise AttributeError from ex

In that case, IOError is correctly flagged as the original exception,
with a KeyError then occurring during the IOError handling, and the
KeyError then directly causing the AttributeError.

The weird thing I am doing in the example here is to set the __cause__
of the exception I am raising to an exception that was never itself
actually raised (the "from KeyError" bit).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4494] Python 2.6 fails to build with Py_NO_ENABLE_SHARED

2008-12-02 Thread Alexey Borzenkov

Changes by Alexey Borzenkov <[EMAIL PROTECTED]>:


--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4495] Fix signed/unsigned warning

2008-12-02 Thread Raymond Hettinger

New submission from Raymond Hettinger <[EMAIL PROTECTED]>:

C:\py30>svn diff
Index: Python/traceback.c
===
--- Python/traceback.c  (revision 67476)
+++ Python/traceback.c  (working copy)
@@ -171,7 +171,7 @@
if (!PyUnicode_Check(v))
continue;
path = _PyUnicode_AsStringAndSize(v, &len);
-   if (len + 1 + taillen >= (Py_ssize_t)namelen - 1)
+   if (len + 1 + (Py_ssize_t)taillen >= (Py_ssize_t)namelen
- 1)
continue; /* Too long */
strcpy(namebuf, path);
if (strlen(namebuf) != len)

--
assignee: barry
components: Interpreter Core
messages: 76781
nosy: barry, rhettinger
severity: normal
status: open
title: Fix signed/unsigned warning
type: compile error
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4494] Python 2.6 fails to build with Py_NO_ENABLE_SHARED

2008-12-02 Thread Martin v. Löwis

Changes by Martin v. Löwis <[EMAIL PROTECTED]>:


--
assignee:  -> loewis
priority:  -> high

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4495] Fix signed/unsigned warning

2008-12-02 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Fixed r67477.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4496] misleading comment in urllib2

2008-12-02 Thread John J Lee

New submission from John J Lee <[EMAIL PROTECTED]>:

r54137 replaced a comment in urllib2.py with a misleading comment.  The
comment now implies the .insort() in question achieves the goal
specified in the new comment.  That's not true, which was the reason the
original comment was there in the first place.

At least replace the comment with the original comment.  Alternatively,
(correctly) resolve the question in the original comment somehow (for
example by removing the .handlers attribute -- but since .handlers is
misnamed in not having an initial underscore, it may have tempted people
to use it, even though it's undocumented, hence private).

--
messages: 76783
nosy: jjlee
severity: normal
status: open
title: misleading comment in urllib2

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4496] misleading comment in urllib2

2008-12-02 Thread John J Lee

Changes by John J Lee <[EMAIL PROTECTED]>:


--
components: +Library (Lib)
nosy: +facundobatista
versions: +Python 2.7, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Here is a patch nonetheless. It makes the code match the the documentation:

http://docs.python.org/library/multiprocessing.html#multiprocessing.sharedctypes.Arra
y
"""
- If lock is True (the default) then a new lock object is created to 
synchronize 
access to the value.
- If lock is a Lock or RLock object then that will be used to synchronize 
access to 
the value.
- If lock is False then access to the returned object will not be automatically 
protected by a lock, so it will not necessarily be process-safe.
"""

I changed multiprocessing.sharedctypes.Array and multiprocessing. 
sharedctypes.Array
I had to change some tests: now "lock=None" is an error.
+ some markup fixes in the documentation.

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file12204/mp_array.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

The patch looks fine. However I propose to replace the assert statement
with a proper check that raises a meaningful exception.

if not hasattr(lock, 'acquire'):
raise AttributeError("'%r' has no method 'acquire'" % lock)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4486] Exception traceback is incorrect for strange exception handling

2008-12-02 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Looks to me like the display code is getting confused by the lack of a
non-None __context__ on the KeyError.

Perhaps the "raise ex from cause" syntax should be setting the
__context__ on the "cause" exception if it isn't already set?

Or else we could just special case this kind of weird programmer
behaviour in the display code.
 
===
>>> try:
...   raise IOError
... except Exception as ex:
...   ke = KeyError()
...   ke.__context__ = ex
...   raise AttributeError from ke
...
Traceback (most recent call last):
  File "", line 2, in 
IOError

During handling of the above exception, another exception occurred:

KeyError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "", line 6, in 
AttributeError
===

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3689] listreverseiterator has a decreasing len()

2008-12-02 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Fixed r67478.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

+1 on Amaury's patch, however I wouldn't change the assert right now - 
Christian's suggestion does make sense to change globally post 3.0

Amaury, do you want to submit it?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4497] Compiler warnings in longobject.c

2008-12-02 Thread Raymond Hettinger

New submission from Raymond Hettinger <[EMAIL PROTECTED]>:

longobject.c
..\..\Objects\longobject.c(201) : warning C4244: '=' : conversion from
'long' to 'digit', possible loss of data
..\..\Objects\longobject.c(212) : warning C4244: '=' : conversion from
'long' to 'digit', possible loss of data
..\..\Objects\longobject.c(1063) : warning C4244: 'function' :
conversion from '__int64' to 'int', possible loss of data
..\..\Objects\longobject.c(1106) : warning C4244: 'function' :
conversion from 'unsigned __int64' to 'long', possible loss of data

--
assignee: marketdickinson
components: Interpreter Core
messages: 76789
nosy: marketdickinson, rhettinger
priority: normal
severity: normal
status: open
title: Compiler warnings in longobject.c
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

I don't much like the

lock is True
lock is False

idioms much, but I don' thave a better suggestion, and it would be nice
to fix this for the releases.

--
resolution:  -> accepted

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4498] Compiler warning "signed/unsigned comparion in mmapmodule"

2008-12-02 Thread Raymond Hettinger

New submission from Raymond Hettinger <[EMAIL PROTECTED]>:

mmapmodule.c: lines 247-248

/* silently 'adjust' out-of-range requests */
if (num_bytes > self->size - self->pos) {

--
assignee: nnorwitz
components: Interpreter Core
messages: 76791
nosy: nnorwitz, rhettinger
priority: normal
severity: normal
status: open
title: Compiler warning "signed/unsigned comparion in mmapmodule"
type: compile error
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Indeed, it seems that multiprocessing uses assertions in many places to 
handle errors in user code. This could be changed, but it is another 
task.

I can apply the patch, but what about 2.6? it's an incompatible API 
change, unless we choose to process "lock=None" the same way as 
"lock=False".

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Does the language guarantee that True and False are singletons (to
support the is-test for identity)?  Does this API port to Jython and
IronPython?  Is it a problem that 1 cannot be substituted for True?

--
nosy: +rhettinger

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

The one I know is pypy: bool(x) always return one of the two prebuilt 
singletons 
(doubletons?).

The docs explicitly mention "If lock is True...", "If lock is False...":
http://docs.python.org/library/multiprocessing.html#multiprocessing.sharedctypes.Value

I fear that testing the boolean value of the lock variable may have undesired 
effect; if 
even the main multiprocessing.RLock object has a _is_zero() method (that seems 
to return 
whether the lock is held or not), it is very possible that other 
implementations choose 
__nonzero__ for this.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

I've changed my mind based on the API change.  This should be discussed
on the mailing list and deferred until 2.6.2 at least.

--
resolution: accepted -> 

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4477] Speed up PyEval_EvalFrameEx when tracing is off.

2008-12-02 Thread Raymond Hettinger

Changes by Raymond Hettinger <[EMAIL PROTECTED]>:


--
assignee:  -> rhettinger
versions: +Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

What about this other patch:
- lock=None has the same semantics as before
- lock=True is the same as lock=None (it failed before)
- lock=False return the object without the "synchronized" wrap (it 
failed before)
- no need to change previous tests

Added file: http://bugs.python.org/file12205/mp_array_2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1401] urllib2 302 POST

2008-12-02 Thread John J Lee

John J Lee <[EMAIL PROTECTED]> added the comment:

I think this was actually not a bug, and the fix should not have been
applied.  I guess this comment is just "for the record", as the fix is
probably cruft that can't be removed now, since people will have started
relying on it.

The only way that the Content-Length header could be in req.headers in
the first place is if the user had explicitly requested that it be added
(urllib2 adds that header to .unredirected_hdrs, but not to .headers). 
The user can no doubt provoke all kinds of other errors by adding random
HTTP headers -- what makes this particular one special?  .add_header()
has always been a "you need to know what you're doing, or you'll break
stuff" interface, and it's not really possible to "fix" that (at least
not without changing the meaning of .add_header()).

--
nosy: +jjlee

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2306] Update What's new in 3.0

2008-12-02 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

On Tue, Dec 2, 2008 at 12:07 PM, Barry A. Warsaw <[EMAIL PROTECTED]> wrote:
>
> Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:
>
> Guido, ETA?  I think this will be one of the last things before we can
> tag the tree for release.

Late tonight.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4025] C99 comments in Python 2.6 break build on AIX 6.1

2008-12-02 Thread Andrew Paprocki

Andrew Paprocki <[EMAIL PROTECTED]> added the comment:

summary of compiler errors/warnings i just hit in the same situation
with stock Python-2.6.tgz:

>> c++ style comment used
"Objects/frameobject.c", line 520.9: 1506-046 (S) Syntax error.
"Objects/unicodeobject.c", line 118.1: 1506-046 (S) Syntax error.
"Objects/unicodeobject.c", line 125.1: 1506-046 (S) Syntax error.
"Objects/unicodeobject.c", line 130.1: 1506-046 (S) Syntax error.
"Objects/unicodeobject.c", line 149.1: 1506-046 (S) Syntax error.
"Objects/unicodeobject.c", line 153.1: 1506-046 (S) Syntax error.
& a bunch of other places in unicodeobject.c
"Python/_warnings.c", line 380.19: 1506-046 (S) Syntax error.
"Python/_warnings.c", line 803.5: 1506-046 (S) Syntax error.

>> inline keyword was used
"./Modules/signalmodule.c", line 112.1: 1506-277 (S) Syntax error:
possible missing ';' or ','?

>> other warning
"/tmp/Python-2.6/Modules/_ctypes/_ctypes_test.c", line 373.9: 1506-159
(E) Bit field type specified for M is not valid. Type unsigned assumed.
"/tmp/Python-2.6/Modules/_ctypes/_ctypes_test.c", line 373.9: 1506-159
(E) Bit field type specified for N is not valid. Type unsigned assumed.
"/tmp/Python-2.6/Modules/_ctypes/_ctypes_test.c", line 373.9: 1506-159
(E) Bit field type specified for O is not valid. Type unsigned assumed.
"/tmp/Python-2.6/Modules/_ctypes/_ctypes_test.c", line 373.9: 1506-159
(E) Bit field type specified for P is not valid. Type unsigned assumed.
"/tmp/Python-2.6/Modules/_ctypes/_ctypes_test.c", line 373.9: 1506-159
(E) Bit field type specified for Q is not valid. Type unsigned assumed.
"/tmp/Python-2.6/Modules/_ctypes/_ctypes_test.c", line 373.9: 1506-159
(E) Bit field type specified for R is not valid. Type unsigned assumed.
"/tmp/Python-2.6/Modules/_ctypes/_ctypes_test.c", line 373.9: 1506-159
(E) Bit field type specified for S is not valid. Type unsigned assumed.

--
nosy: +apaprocki

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4499] redefinition of TILDE macro on AIX platform

2008-12-02 Thread Andrew Paprocki

New submission from Andrew Paprocki <[EMAIL PROTECTED]>:

"Include/token.h", line 42.9: 1506-236 (W) Macro name TILDE has been
redefined.
"Include/token.h", line 42.9: 1506-358 (I) "TILDE" is defined on line
250 of /usr/include/sys/ioctl.h.

--
components: None
messages: 76800
nosy: apaprocki
severity: normal
status: open
title: redefinition of TILDE macro on AIX platform
type: compile error
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4496] misleading comment in urllib2

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

(The change was actually r54138)
It seems that this .handlers attribute was used in older versions, 
before r34922, to close the handlers in-order.
IMO it is no more useful, but may be kept for compatibility reasons.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4273] cycle created by profile.run

2008-12-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Where is the problem, if these reference cycles are properly broken by 
the garbage collector *unless* you tell it not to?

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4025] C99 comments in Python 2.6 break build on AIX 6.1

2008-12-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

There are still quite a few C99 comments left in the code, esp. in code
that's meant for MSVC (which works fine with them) and code for the Mac
(which uses gcc and also doesn't have problems with them). Esp. the
ctypes and libffi code is full of them.

FWIW, this one exists in both SVN trunk and the Python 3.0 branch:

./Modules/_ctypes/callproc.c:
-- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //
Default language

Personally, I'd find it a lot better to not use C99 style comments in
code that's not specifically meant for a C++-capable compiler like MSVC.

--
nosy: +lemburg
versions: +Python 3.0, Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4500] Compiler warnings when compiling Python 3.0 with a C89 compiler

2008-12-02 Thread Christian Heimes

New submission from Christian Heimes <[EMAIL PROTECTED]>:

Should / must we do anything about the issue? At least Python builds
with a C89 compiler except of ssl and socket module. Those modules
include non C89 compliant header files from the OS (bluetooth and tpic).

$ LC_ALL="C" CC="gcc -std=c89" make
gcc -std=c89 -pthread -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall
-Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o
Objects/object.o Objects/object.c  
 
Objects/object.c: In function 'internal_print':
   
Objects/object.c:295: warning: ignoring return value of 'fwrite',
declared with attribute warn_unused_result   
Objects/object.c:304: warning: ignoring return value of 'fwrite',
declared with attribute warn_unused_result   
gcc -std=c89 -pthread -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall
-Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o
Python/marshal.o Python/marshal.c  
 
Python/marshal.c: In function 'w_string':  
   
Python/marshal.c:90: warning: ignoring return value of 'fwrite',
declared with attribute warn_unused_result
gcc -std=c89 -pthread -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall
-Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o
Modules/main.o Modules/main.c  
 
Modules/main.c: In function 'usage':   
   
Modules/main.c:134: warning: format not a string literal and no format
arguments   
Modules/main.c:135: warning: format not a string literal and no format
arguments   
Modules/main.c:136: warning: format not a string literal and no format
arguments

--
assignee: barry
components: Interpreter Core
messages: 76804
nosy: barry, christian.heimes
priority: normal
severity: normal
stage: test needed
status: open
title: Compiler warnings when compiling Python 3.0 with a C89 compiler
type: compile error
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4025] C99 comments in Python 2.6 break build on AIX 6.1

2008-12-02 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Barry, the issue in _ctypes/callproc.c could be a problem for us
although Python 2.6 and 3.0 are compiling fine with -std=c89. Should the
comment be fixed before the release?

--
assignee: christian.heimes -> barry
nosy: +barry
resolution: fixed -> 

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4025] C99 comments in Python 2.6 break build on AIX 6.1

2008-12-02 Thread Barry A. Warsaw

Barry A. Warsaw <[EMAIL PROTECTED]> added the comment:

For 2.6.1, yes you can fix the comments if you can do it now :)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4501] asyncore's urgent data management and connection closed events are broken when using poll()

2008-12-02 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' <[EMAIL PROTECTED]>:

I discovered that some pyftpdlib [1] tests fail when using poll()
instead of select().
The problem is in asyncore.readwrite() function which erroneously calls
handle_read_event() in case of a POLLPRI event.

The patches modify readwrite() function so that:

- POLLPRI is now treated as synonym for "there is urgent data to read"
so handle_expt_event() is called.
- POLLHUP, POLLERR and POLLINVAL are now treated as synonyms for "the
connection has been closed" (Twisted behaves exactly the same) so
handle_close() is called.

Both pyftpdlib and asyncore tests passed on Linux Debian Etch and
FreeBSD 7.0-RC1.


[1] http://code.google.com/p/pyftpdlib/

--
components: Library (Lib)
files: asyncore.patch
keywords: patch
messages: 76807
nosy: giampaolo.rodola, josiah.carlson, josiahcarlson
severity: normal
status: open
title: asyncore's urgent data management and connection closed events  are 
broken when using poll()
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12206/asyncore.patch

___
Python tracker <[EMAIL PROTECTED]>

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



  1   2   >