[issue8619] Doc bug for urllib.request._urlopener in Python 3.1+

2010-05-05 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed in r80775 and r80776

--

___
Python tracker 

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



[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> I don't think it's a good idea to display an fatal error at runtime. If 
> nl_langinfo(CODESET) is not available, configure should fail or we should 
> fallback to an hardcoded encoding (ok but which one?).

If nl_langinfo(CODESET) fails, Python should assume the default
locale, which is "C" on POSIX platforms. The "C" locale uses
ASCII as encoding, so Python should use that as well. Note that the
manpage for nl_langinfo() doesn't mention any errors that could
be raised by it:

"""
RETURN VALUE
   If  no  locale  has  been  selected  for  the appropriate category, 
nl_langinfo() returns a
   pointer to the corresponding string in the "C" locale.

   If item is not valid, a pointer to an empty string is returned.

   This pointer may point to static data that may be overwritten on the 
next call to  nl_lang‐
   info() or setlocale(3).
"""

As with all locale APIs, it is not thread-safe, which can become
an issues if Python gets embedded in a multi-threaded application.

There's also another issue: it's possible that nl_langinfo(CODESET)
returns an encoding which is not known to Python.

In such a case, it would be best to issue a warning to the
user and fall back to ASCII as in the "C" locale case.

Terminating Python with a fatal error would provide the worst of
all user experiences. -1 on that.

--
nosy: +lemburg

___
Python tracker 

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> The documentation of os.environb and os.getenvb() in my last patch is very 
> short. I'm not inspired.
> 
> We told me on IRC to not use function annotations because annotation semantic 
> was not decided yet.
> 
> I will try to improve the documentation and remove the annotations in my next 
> patch.

Patch looks good. +1 on adding it.

One nit: I'd rename the keymap function to encodekey.

--

___
Python tracker 

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



[issue8617] Non-existent variables documented

2010-05-05 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

site definitely needs more documentation about the per-user site-packages. 

We need to add a section about that. I am adding Christian to the nosy list, 
since he added those feature. I can work on a section sometimes next week and 
propose a patch here btw.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-05 Thread STINNER Victor

STINNER Victor  added the comment:

> manpage for nl_langinfo() doesn't mention any errors that could
> be raised by it

It's more about get_codeset(). This function can fail for different reasons:

 - nl_langinfo() result is an empty string: "If item is not valid, a pointer to 
an empty string is returned." say the manpage
 - _PyCodec_Lookup() failed: unable to import the encoding codec module, there 
is no such codec, codec machinery is broken, etc.
 - the codec has no "name "attribute
 - strdup() failure (no more memory)

Do you think that you should fallback to ASCII if nl_langinfo() result is an 
empty string, and UTF-8 otherwise? get_codeset() failure is very unlikely, and 
I think that fallback to UTF-8 is just fine. A warning is printed to stderr, 
the user should try to understand why get_codeset() failed.

You can at least reproduce the _PyCodec_Lookup() error with #8611.

My problem is also that the file system encoding is required (encoding != None) 
by os.environ mapping with my os.environb patch. (#8603)

--

___
Python tracker 

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



[issue8603] Create a bytes version of os.environ and getenvb()

2010-05-05 Thread STINNER Victor

STINNER Victor  added the comment:

MaL> Patch looks good. +1 on adding it.

Cool. I didn't understood if MvL is +1, but at least he's not -1 on this, and 
we are at least two at +1 :-)

MaL> One nit: I'd rename the keymap function to encodekey.

Ok, I will also change that in the final patch.

--

___
Python tracker 

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



[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> STINNER Victor  added the comment:
> 
>> manpage for nl_langinfo() doesn't mention any errors that could
>> be raised by it
> 
> It's more about get_codeset(). This function can fail for different reasons:
> 
>  - nl_langinfo() result is an empty string: "If item is not valid, a pointer 
> to an empty string is returned." say the manpage
>  - _PyCodec_Lookup() failed: unable to import the encoding codec module, 
> there is no such codec, codec machinery is broken, etc.
>  - the codec has no "name "attribute
>  - strdup() failure (no more memory)
> 
> Do you think that you should fallback to ASCII if nl_langinfo() result is an 
> empty string, and UTF-8 otherwise? get_codeset() failure is very unlikely, 
> and I think that fallback to UTF-8 is just fine. A warning is printed to 
> stderr, the user should try to understand why get_codeset() failed.

I think that using ASCII is a safer choice in case of errors.
Using UTF-8 may be safe for reading file names, but it's not
safe for creating files or directories.

I also think that an application should be able to update the
file system encoding in such an error case (and only in such a case).
The application may have better knowledge about how it's being
used and can provide correct encoding information by other means.

--

___
Python tracker 

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



[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-05 Thread STINNER Victor

STINNER Victor  added the comment:

> I think that using ASCII is a safer choice in case of errors.

I choosed UTF-8 to keep backward compatibility: 
PyUnicode_DecodeFSDefaultAndSize() uses utf-8 if 
Py_FileSystemDefaultEncoding==NULL. If the OS has no nl_langinfo(CODESET) 
function at all, Python3 uses utf-8.

> Using UTF-8 may be safe for reading file names, but it's not
> safe for creating files or directories.

Well, I don't know. You are maybe right. And which encoding should be used if 
nl_langinfo(CODESET) function is missing: ASCII or UTF-8?

UTF-8 is also an optimist choice: I bet that more and more OS will move to 
UTF-8.

--

___
Python tracker 

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



[issue8313] message in unittest tracebacks

2010-05-05 Thread Michael Foord

Michael Foord  added the comment:

Changing traceback._some_str to return unicode rather than str seems like a bad 
idea.

--

___
Python tracker 

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



[issue8313] message in unittest tracebacks

2010-05-05 Thread Michael Foord

Changes by Michael Foord :


--

___
Python tracker 

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



[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> STINNER Victor  added the comment:
> 
>> I think that using ASCII is a safer choice in case of errors.
> 
> I choosed UTF-8 to keep backward compatibility: 
> PyUnicode_DecodeFSDefaultAndSize() uses utf-8 if 
> Py_FileSystemDefaultEncoding==NULL. If the OS has no nl_langinfo(CODESET) 
> function at all, Python3 uses utf-8.

Ouch, that was a poor choice. In Python we have a tradition to
avoid guessing, if possible. Since we cannot guarantee that the
file system will indeed use UTF-8, it would have been safer to
use ASCII. Not sure why this reasoning wasn't applied for
the file system encoding.

Nothing we can do about now, though.

>> Using UTF-8 may be safe for reading file names, but it's not
>> safe for creating files or directories.
> 
> Well, I don't know. You are maybe right. And which encoding should be used if 
> nl_langinfo(CODESET) function is missing: ASCII or UTF-8?
> 
> UTF-8 is also an optimist choice: I bet that more and more OS will move to 
> UTF-8.

I think we should also add a new environment variable to override
the automatic determination of the file system encoding, much like
what we have for the I/O encoding:

PYTHONFSENCODING: Encoding[:errors] used for file system.

(that would need to go on a new ticket, though)

--

___
Python tracker 

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



[issue8313] message in unittest tracebacks

2010-05-05 Thread Michael Foord

Michael Foord  added the comment:

I would prefer to try str(...) first and only attempt to convert to unicode and 
do the backslash replace if the str(...) call fails.

--

___
Python tracker 

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



[issue8620] wrong truncation of line in Cmd.cmd

2010-05-05 Thread Mattelaer

New submission from Mattelaer :

When using the Cmd module on a file. 
it happens that the last line is truncated from the last caracther.

The problem is simply that it can happen that the last line doesn't finish by 
'\n' charcacter. In consequence the line which is suppose to suppress the '\n' 
suppress another character.

Cheers,

Olivier

--
components: None
messages: 105012
nosy: omatt
priority: normal
severity: normal
status: open
title: wrong truncation of line in Cmd.cmd
type: behavior
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



[issue8621] Mac OS X

2010-05-05 Thread yig

New submission from yig :

Calling uuid.uuid4() while using the multiprocessing module leads to the same 
exact UUIDs being generating in each process.  It is an artifact resulting from 
the built-in uuid_generate_random() of my underlying platform, Mac OS X 10.6.3. 
 A Linux machine I have does not exhibit this problem.  I have tested it with 
both Python 2.5 and 2.6.

--
assignee: ronaldoussoren
components: Macintosh
files: multiprocessing_uuid.py
messages: 105013
nosy: ronaldoussoren, yig
priority: normal
severity: normal
status: open
title: Mac OS X
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file17216/multiprocessing_uuid.py

___
Python tracker 

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



[issue8613] Decimal module flags undetermined when a signal is trapped.

2010-05-05 Thread Stefan Krah

Stefan Krah  added the comment:

I agree that the spec is not unambiguous, but consider the Overflow and
Underflow passages here:

http://speleotrove.com/decimal/daexcep.html

  ==> Overflow

==> In all cases, Inexact and Rounded will also be raised.


"Raise" here of course means raising the flags Inexact and Rounded,
not Python exceptions. So I would think that if the overflow trap
handler is engaged, the flags Inexact and Rounded must be raised (set
to 1) in the context.

--

___
Python tracker 

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



[issue8211] configure: allow user-provided CFLAGS to override AC_PROG_CC defaults

2010-05-05 Thread Mark Dickinson

Mark Dickinson  added the comment:

Since r80665, a

./configure --with-pydebug

seems to give compilation with -O2 (tested on OS X and Linux).  Is this 
intentional?

I'm getting, e.g.,

gcc -c  -g -O2 -g -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   
-DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c

--
nosy: +mark.dickinson
status: closed -> open

___
Python tracker 

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



[issue8619] Doc bug for urllib.request._urlopener in Python 3.1+

2010-05-05 Thread R. David Murray

R. David Murray  added the comment:

Why do we have a public API that begins with an '_'?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue8613] Decimal module flags undetermined when a signal is trapped.

2010-05-05 Thread Mark Dickinson

Mark Dickinson  added the comment:

Yes, that's a good point.  It would be nice for e.g. "Inexact => Rounded" 
invariants to be, well, invariant.

I agree that the cdecimal behaviour is the correct one.  I'm looking for wiggle 
room here because I don't really want to make a set of complicated and possibly 
performance-degrading changes to the decimal module unless it's really 
necessary for correctness.

Having said that, I can see at least one reasonable way of fixing this in the 
decimal module:

(1) Create a "delay_traps" context manager, so that:

with delay_traps():


disables traps for the duration of the with block, keeps track of all flags set 
(disregarding those set before the with block was entered), and then on leaving 
the with block re-raises signals corresponding to the traps set in the original 
context (respecting precedence, of course).

(2) Also create a "_delayed_traps" (names could do with improvement, probably) 
decorator that effectively wraps an entire function in 'with delay_traps()"

(3) Decorate all the primitive decimal operations with this decorator.

Thoughts?

--

___
Python tracker 

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



[issue8621] Mac OS X

2010-05-05 Thread yig

yig  added the comment:

For the record, I filed a bug against the underlying platform.  (I wrote a 
simple program to reproduce this in C and filed a bug report with Apple 
rdar://7944700.  The OpenRadar page for it is here: 
http://openradar.appspot.com/radar?id=334401 )

--

___
Python tracker 

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



[issue8211] configure: allow user-provided CFLAGS to override AC_PROG_CC defaults

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Mark Dickinson wrote:
> 
> Mark Dickinson  added the comment:
> 
> Since r80665, a
> 
> ./configure --with-pydebug
> 
> seems to give compilation with -O2 (tested on OS X and Linux).  Is this 
> intentional?

Yes. I've restored the previous behavior of configure to
have AC_PROG_CC determine CFLAGS defaults.

Please open a new ticket to have --with-pydebug disable use
of any optimization flags. We need to find a different
solution for that. Unconditionally ignoring the AC_PROG_CC
CFLAGS defaults is not solution.

--

___
Python tracker 

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



[issue8211] configure: allow user-provided CFLAGS to override AC_PROG_CC defaults

2010-05-05 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg :


--
status: open -> closed

___
Python tracker 

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



[issue8211] configure: allow user-provided CFLAGS to override AC_PROG_CC defaults

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Marc-Andre Lemburg wrote:
> 
> Marc-Andre Lemburg  added the comment:
> 
> Mark Dickinson wrote:
>>
>> Mark Dickinson  added the comment:
>>
>> Since r80665, a
>>
>> ./configure --with-pydebug
>>
>> seems to give compilation with -O2 (tested on OS X and Linux).  Is this 
>> intentional?
> 
> Yes. I've restored the previous behavior of configure to
> have AC_PROG_CC determine CFLAGS defaults.
> 
> Please open a new ticket to have --with-pydebug disable use
> of any optimization flags. We need to find a different
> solution for that. Unconditionally ignoring the AC_PROG_CC
> CFLAGS defaults is not solution.

Note that using the following line will disable the AC_PROG_CC
defaults:

./configure --with-pydebug CFLAGS=''

This is a new feature that was introduced previously by Victor
and that I corrected in r80665.

--

___
Python tracker 

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



[issue8619] Doc bug for urllib.request._urlopener in Python 3.1+

2010-05-05 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

That is actually a private attribute of urllib (not urllib2) module
present from the very first version. It is intended strictly for
overriding purposes not for anything else. During the merge in py3k,
it has taken its place in urllib.request. I see no harm in it being
there. If it needs to be un-advertised, perhaps we can remove its
reference from the docs.

--

___
Python tracker 

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



[issue8313] message in unittest tracebacks

2010-05-05 Thread STINNER Victor

STINNER Victor  added the comment:

Commited: r80777 (trunk) and r80779 (2.6); blocked: r80778 (py3k).

Open a new issue if you would like to use something better than 
ASCII+backslashreplace in unittest (using runner stream encoding?).

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

___
Python tracker 

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



[issue8211] configure: allow user-provided CFLAGS to override AC_PROG_CC defaults

2010-05-05 Thread Mark Dickinson

Mark Dickinson  added the comment:

> Yes. I've restored the previous behavior of configure to
> have AC_PROG_CC determine CFLAGS defaults.

Just to be clear, the previous behaviour has *not* been restored.  Up until 
r80665, a '--with-pydebug' build did not include optimization.  Since r80665, 
it does.

--

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

As the bug is in the underlying platform the best we can do is to warn about 
this in the documentation, as in the attached patch.


BTW. I've updated the title to be slightly more informative.

--
keywords: +patch
title: Mac OS X -> uuid.uuid4() generates non-unique values on OSX
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5
Added file: http://bugs.python.org/file17217/issue8621-doc.patch

___
Python tracker 

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



[issue8211] configure: allow user-provided CFLAGS to override AC_PROG_CC defaults

2010-05-05 Thread Mark Dickinson

Mark Dickinson  added the comment:

Ah, I understand now: -O2 started appearing in debug builds in r79218, which 
changed the Makefile to respect CFLAGS.  I tested a variety of revision, but 
failed to test revision in between that and Victor's change...

--

___
Python tracker 

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



[issue8211] configure: allow user-provided CFLAGS to override AC_PROG_CC defaults

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Mark Dickinson wrote:
> 
> Mark Dickinson  added the comment:
> 
> Ah, I understand now: -O2 started appearing in debug builds in r79218, which 
> changed the Makefile to respect CFLAGS.  I tested a variety of revision, but 
> failed to test revision in between that and Victor's change...

Right. I was referring to r79391, ie. the state before Victor checked
in his patch.

--

___
Python tracker 

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



[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue1467619] Header.decode_header eats up spaces

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



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

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue1379416] email.Header encode() unicode P2.6

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread yig

yig  added the comment:

Why not default to not use the Python implementation on darwin instead of the 
underlying platform's uuid_generate_random(), until it's proven safe?

--

___
Python tracker 

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



[issue6521] Contradictory documentation for email.mime.text.MIMEText

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue1685453] email package should work better with unicode

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread yig

yig  added the comment:

Ahem.  Why not use the Python implementation on darwin until its 
uuid_generate_random() is deemed to be safe?

--

___
Python tracker 

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



[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue1693546] email.Message set_param rfc2231 encoding incorrect

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
status: pending -> open

___
Python tracker 

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



[issue1459867] Message.as_string should use "mangle_from_=unixfrom"?

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue1349106] email.Generators does not separates headers with "\r\n"

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue3244] multipart/form-data encoding

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> 

___
Python tracker 

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



[issue4766] email documentation needs to be precise about strings/bytes

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue6942] email.generator.Generator memory consumption

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1025395] email.Utils.parseaddr fails to parse valid addresses

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1672568] silent error in email.message.Message.get_payload

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1555842] email package and Unicode strings handling

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue5871] email.header.Header allow to embed raw newlines into a message

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1440472] email.Generator is not idempotent

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue724459] Add documentation about line endings in email messages.

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1078919] Email.Header encodes non-ASCII content incorrectly

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue968430] error flattening complex smime signed message

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1210680] Split email headers near a space

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1243654] Faster output if message already has a boundary

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1243730] Big speedup in email message parsing

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1372770] email.Header should preserve original FWS

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1690608] email.utils.formataddr() should be rfc2047 aware

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1681333] email.header unicode fix

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue504152] rfc822 long header continuation broken

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray

___
Python tracker 

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



[issue5610] email feedparser.py CRLFLF bug: $ vs \Z

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue5612] whitespace folding in the email package could be better ; -)

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1590744] mail message parsing glitch

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1443866] email 3.0+ stops parsing headers prematurely

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1155362] Bugs in parsedate_tz

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1043706] External storage protocol for large email messages

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue975330] Inconsistent newline handling in email module

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue795081] email.Message param parsing problem II

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue4212] email.LazyImporter does not use absolute imports

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1525919] email package quoted printable behaviour changed

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue2658] decode_header() fails on multiline headers

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Because I didn't look closely enough at the source :-(

The attached patch disabled the C implementation on OSX 10.6 or later. I've 
tested that 10.5 is not affected by the issue.

--
Added file: http://bugs.python.org/file17218/issue8621.patch

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread Ronald Oussoren

Changes by Ronald Oussoren :


Removed file: http://bugs.python.org/file17217/issue8621-doc.patch

___
Python tracker 

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



[issue634412] RFC 2112 in email package

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1443875] email/charset.py convert() patch

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> r.david.murray
nosy: +r.david.murray

___
Python tracker 

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



[issue740495] API enhancement: poplib.MailReader()

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: barry -> 

___
Python tracker 

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



[issue7755] copyright clarification for audiotest.au

2010-05-05 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee: loewis -> barry

___
Python tracker 

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



[issue8622] Add PYTHONFSENCODING environment variable

2010-05-05 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg :

As discussed on issue8610, we need a way to override the automatic detection of 
the file system encoding - for much the same reasons we also do for the I/O 
encoding: the detection mechanism isn't fail-safe.

We should add a new environment variable with the same functionality as 
PYTHONIOENCODING:

PYTHONFSENCODING: Encoding[:errors] used for file system.

--
components: Interpreter Core
messages: 105030
nosy: haypo, lemburg
priority: normal
severity: normal
status: open
title: Add PYTHONFSENCODING environment variable
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



[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

I've opened issue8622 for the env. var idea.

--

___
Python tracker 

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



[issue8538] Add ConfigureAction to argparse

2010-05-05 Thread Éric Araujo

Éric Araujo  added the comment:

Are we sure we want three or four ways to spell the same thing? --foo and 
--no-foo seem a useful couple to me, and --with-foo/--without-foo cater to 
different use cases. Perhaps it would be ok to have a SwitchAction (or 
FlagAction) for --thing/--no-hing and one ConfigureAction for the --with[out]-* 
style.

--
nosy: +merwok

___
Python tracker 

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



[issue8623] Aliasing warnings in socketmodule.c

2010-05-05 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This is on py3k, with gcc 4.4.3:

/home/antoine/py3k/__svn__/Modules/socketmodule.c: In function 
'socket_gethostbyaddr':
/home/antoine/py3k/__svn__/Modules/socketmodule.c:3238: warning: dereferencing 
pointer 'sa' does break strict-aliasing rules
/home/antoine/py3k/__svn__/Modules/socketmodule.c:3208: note: initialized from 
here
/home/antoine/py3k/__svn__/Modules/socketmodule.c: In function 
'socket_gethostbyname_ex':
/home/antoine/py3k/__svn__/Modules/socketmodule.c:3183: warning: dereferencing 
pointer 'sa' does break strict-aliasing rules
/home/antoine/py3k/__svn__/Modules/socketmodule.c:3181: note: initialized from 
here

--
components: Extension Modules
messages: 105033
nosy: brett.cannon, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Aliasing warnings in socketmodule.c
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



[issue8624] Aliasing warnings in multiprocessing.c

2010-05-05 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This is on py3k, with gcc 4.4.3:

/home/antoine/py3k/__svn__/Modules/_multiprocessing/multiprocessing.c: In 
function 'multiprocessing_sendfd':
/home/antoine/py3k/__svn__/Modules/_multiprocessing/multiprocessing.c:125: 
warning: dereferencing type-punned pointer will break strict-aliasing rules
/home/antoine/py3k/__svn__/Modules/_multiprocessing/multiprocessing.c: In 
function 'multiprocessing_recvfd':
/home/antoine/py3k/__svn__/Modules/_multiprocessing/multiprocessing.c:168: 
warning: dereferencing type-punned pointer will break strict-aliasing rules

--
assignee: jnoller
components: Extension Modules
messages: 105034
nosy: brett.cannon, jnoller, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Aliasing warnings in multiprocessing.c
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



[issue8625] --with-pydebug builds now include -O2 by default

2010-05-05 Thread Mark Dickinson

New submission from Mark Dickinson :

When doing a debug build of Python with gcc, without any previous setting of 
CFLAGS, the '-O2' flag is now automatically included.

This behaviour started in r79218.

It would be nice to restore the original behaviour, if possible, since the 
optimization causes difficulties when debugging.  One solution would be to add 
'-O0' to OPT for debug builds (on gcc), as in the attached patch.  You then get 
compiler flags including:

"-g -O2 -g -O0"

which is somewhat ugly, but the -O0 overrides the -O2 (I think).  Does this 
seem like a reasonable solution?

--
components: Build
files: no_debug_optimization.patch
keywords: patch
messages: 105035
nosy: haypo, lemburg, mark.dickinson, pitrou
priority: normal
severity: normal
status: open
title: --with-pydebug builds now include -O2 by default
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file17219/no_debug_optimization.patch

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Also added a testcase that should warn if other unix-y platforms start to 
suffer from the same issue.

BTW. issue8621.patch uses a runtime test in the uuid module instead of a 
configure-check because a binary might be created on 10.5 (without the issue) 
and run on 10.6 (with the issue) and that should not result in a broken library.

--
Added file: http://bugs.python.org/file17220/issue8621-test.patch

___
Python tracker 

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



[issue8625] --with-pydebug builds now include -O2 by default

2010-05-05 Thread Mark Dickinson

Mark Dickinson  added the comment:

Just double checked the gcc manual.  From:

http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

"""If you use multiple -O options, with or without level numbers, the last such 
option is the one that is effective."""

--

___
Python tracker 

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



[issue8625] --with-pydebug builds now include -O2 by default

2010-05-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> It would be nice to restore the original behaviour, if possible, since
> the optimization causes difficulties when debugging.  One solution
> would be to add '-O0' to OPT for debug builds (on gcc), as in the
> attached patch.  You then get compiler flags including:
> 
> "-g -O2 -g -O0"
> 
> which is somewhat ugly, but the -O0 overrides the -O2 (I think).  Does
> this seem like a reasonable solution?

Probably good enough.

--

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread yig

yig  added the comment:

Great work!  Very thorough patches.  Strange that it's a regression versus 10.5.

--

___
Python tracker 

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



[issue8626] TypeError: rsplit() takes no keyword arguments

2010-05-05 Thread Dave Abrahams

New submission from Dave Abrahams :

Based on the rsplit documentation, I'd expect

  'foo bar'.rsplit(maxsplit=1)

to work.  This is probably a much bigger problem than just rsplit, i.e. I doubt 
there is a policy about whether documented parameter names need to be usable as 
keywords, and if not, how one finds out which keywords are supported.

--
messages: 105040
nosy: dabrahams
priority: normal
severity: normal
status: open
title: TypeError: rsplit() takes no keyword arguments

___
Python tracker 

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



[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2010-05-05 Thread Mark Dickinson

New submission from Mark Dickinson :

Lines 3884 and 3890 of Objects/typeobject.c (trunk, r80782), which check for a 
subclass overriding __eq__ (or __cmp__) but not __hash__, call PyErr_WarnPy3k 
but don't check the return value.  [This was reported when compiling Python 
with clang.] This can lead to an "XXX undetected error", if the warning 
actually raised an exception:

newton:trunk dickinsm$ ./python.exe -3
Python 2.7b1+ (trunk:80783, May  5 2010, 15:25:42) 
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
[35022 refs]
>>> warnings.filterwarnings("error")
[35046 refs]
>>> class A(object):
... def __eq__(self, other):
... return False
... 
XXX undetected error
Traceback (most recent call last):
  File "", line 1, in 
DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
[35139 refs]

Nick, I think this came from a checkin of yours: r65642, related to issue 2235. 
 Any suggestions about how to fix it?  It's a bit tricky, since the function 
the check occurs in (inherit_slots) has return type 'void'.  Is it okay if I 
change inherit_slots to return an int here?  If so, I'll produce a patch.

Also, can we remove the check related to __hash__ and __cmp__?  With __cmp__ 
gone in 3.1, and 3.0 considered defunct, I don't think it's relevant any more.

--
messages: 105041
nosy: mark.dickinson, ncoghlan
priority: normal
severity: normal
status: open
title: Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-05-05 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I agree with Michael that something should be done.

I propose to add commit os-getgroups-v2.patch, which is the almost same as 
os-getgroups.patch that I posted earlier, but adds a check for large values of 
NGROUPS_MAX (see msg99913 for the rationale)

This ensures that os.getgroups() will return a value that is consistent with 
the id(1) command on OSX and solves the original issue.

Sadly enough this won't fix the other issue that's mentioned in msg99759, 
because that is a platform issue.  In the current release of OSX it is 
impossible to both have os.getgroups that reflects calls to os.setgroups and 
os.getgroups that returns the same information as system tools, and therefore 
it is my opinion that we should keep the current behavior where we're at least 
consistent with system tools.

--

___
Python tracker 

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Ronald Oussoren

Changes by Ronald Oussoren :


Added file: http://bugs.python.org/file17221/os-getgroups-v2.patch

___
Python tracker 

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



[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2010-05-05 Thread Mark Dickinson

Mark Dickinson  added the comment:

Hmm.  Fixing this isn't easy:  a simple 'if (inherit_slots(...) < 0) goto 
error;' produces a huge reference leak in PyType_Ready.

--

___
Python tracker 

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



[issue8572] httplib getheader() throws error instead of default

2010-05-05 Thread Walter Woods

Walter Woods  added the comment:

Sorry I'm just getting back to this . . . Senthil, doesn't list(None) throw an 
exception?  That was the whole problem with list()ing the default argument.

And I don't think the problem should be fixed in 
email.message.Message.get_all() . . . that function works exactly as it says it 
should.  Its behavior is consistent.  This issue should not change that.  And 
even WITH changing that function, the patch would still need to fix 
http.client.HTTPResponse.getheader().  

Just check python 2.6, and it looks like that function works correctly.  If a 
number is passed, it returns a number as the default.  We'd be preserving 
backwards compatibility, not destroying it, by returning the default parameter 
unchanged in 3.X when the specified header does not exist.

I'll try attaching a patch before too long.

--

___
Python tracker 

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



[issue1525919] email package quoted printable behaviour changed

2010-05-05 Thread Thomas Arendsen Hein

Thomas Arendsen Hein  added the comment:

Roger Demetrescu, I filed the issue with "Python 2.4", because the behavior 
changed somewhere between 2.4.2 and 2.4.3

The updated link to the MoinMoin bug entry is:
http://moinmo.in/MoinMoinBugs/ResetPasswordEmailImproperlyEncoded

The workaround I use to be compatible with <= 2.4.2 and >= 2.4.3 is:

msg.set_payload('=')
if msg.as_string().endswith('='):
text = charset.body_encode(text)
msg.set_payload(text)

--

___
Python tracker 

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



[issue8622] Add PYTHONFSENCODING environment variable

2010-05-05 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue8572] httplib getheader() throws error instead of default

2010-05-05 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Walter, just to address one of your point:

+if failobj and not isinstance(failobj, list):
+if isinstance(failobj, str):
+failobj = [failobj]
+else:
+failobj = list(failobj)
 return failobj   

If the failobj is None, list(None) does not occur here and no exception will be 
raised. 

Yes, please attach a patch to this issue as you consider would be appropriate. 
We can see the differences. In py2.6, HTTPResponse.getheader did not invoke 
get_all method at all, it invokes a geheader method which is a simple dict 
lookup with default return.

--
assignee:  -> orsenthil

___
Python tracker 

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



[issue8572] httplib getheader() throws error instead of default

2010-05-05 Thread Walter Woods

Walter Woods  added the comment:

Senthil, you are correct, I gave a bad example.  However, try list()ing an 
integer :)

--

___
Python tracker 

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



[issue8628] Incorrect numbers.Complex.imag documentation

2010-05-05 Thread Daniel Urban

New submission from Daniel Urban :

The current documentation of the imag abstract property of numbers.Complex is 
this:
"Abstract. Retrieves the Real component of this number."
Of course the imag attribute is the imaginary component, not the real.

--
assignee: d...@python
components: Documentation
messages: 105048
nosy: d...@python, durban
priority: normal
severity: normal
status: open
title: Incorrect numbers.Complex.imag documentation
versions: Python 2.6, 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



[issue8625] --with-pydebug builds now include -O2 by default

2010-05-05 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



  1   2   >