[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-07-16 Thread Tomas Hoger

Tomas Hoger  added the comment:

This is not really the same thing as issue 946373.  That one seems to be
about adding script's directory as the first thing in sys.path. 
Comments there seem to mix both interactive ('' in sys.path) and
non-interactive (os.path.dirname(os.path.abspath(sys.argv[0])) in
sys.path) python uses, while CVE-2008-5983 is only about '' in sys.path,
mostly related to embedded use, rather than for python interpreter itself.

--

___
Python tracker 

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



[issue5910] kqueue for more than one event is broken.

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

Patch looks good, committed with test in r74020.

--
assignee: christian.heimes -> georg.brandl
nosy: +georg.brandl
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



[issue6490] os.popen documentation in 2.6 is probably wrong

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

Actually popen() isn't documented anymore in the 3.1 docs.  However, I
don't know about the "real" deprecation status.  Benjamin?

--
assignee: georg.brandl -> benjamin.peterson
nosy: +benjamin.peterson

___
Python tracker 

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



[issue6486] Library doc introduction strangely points to "Built-in Objects" as a starting point

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

I moved the link target to the "built-in functions" section in r74021. 
For the other issue, I wanted to restructure the builtins docs anyway
for a long time, this will be part of it.

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



[issue3341] "Suggest a change" link

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

Since this will be handled by Sphinx, it is not an issue for this tracker.

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

___
Python tracker 

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



[issue6487] Some index entries appear in black

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

I'm not sure which items you refer to.  The only unlinked items I see
are some with subterms, where the parent term has no index entry.

--
resolution:  -> works for me
status: open -> pending

___
Python tracker 

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



[issue6481] PATCH: typo in subprocess documentation

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r74022.

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



[issue6412] Titlecase as defined in Unicode Case Mappings not followed

2009-07-16 Thread Christoph Burgmer

Christoph Burgmer  added the comment:

Casing algorithms should follow Section 3.13 "Default Case Algorithms"
in the standard itself, not UTR#21.

See
http://www.unicode.org/Public/5.2.0/ucd/DerivedCoreProperties-5.2.0d11.
Unicode 5.2. A nice mail on the Unicode mail list has a bit explanation
to that: http://www.unicode.org/mail-arch/unicode-ml/y2009-

--

___
Python tracker 

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



[issue6495] particular variable's name case exception attributeError

2009-07-16 Thread tq0fqeu

New submission from tq0fqeu :

To create a instance of Class Person
[code]
rosss = Person('ross')
rosss.sayHi()
rosss.howMany()
[/code]
It's OK

But
[code]
ross = Person('ross')
ross.sayHi()
ross.howMany()
[/code]
It has exception, get that:
Exception AttributeError: "'NoneType' object has no attribute
'population'" in > ignored

python 2.6.2 + gcc 4.3.3 + kernel 2.6.28-13-generic

--
files: objvar.py
messages: 90564
nosy: tq0fqeu
severity: normal
status: open
title: particular variable's name case exception attributeError
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file14505/objvar.py

___
Python tracker 

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



[issue6495] particular variable's name case exception attributeError

2009-07-16 Thread R. David Murray

R. David Murray  added the comment:

You examples both work for me.  Please go to python-list or python-tutor
for help debugging your code.  In particular you need to learn more
about __del__ and why you probably don't want to be using it.

rdmur...@maestro:~/python/trunk>./python  
Python 2.7a0 (trunk:74008, Jul 14 2009, 20:56:15) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from objvar import Person
>>> rosss = Person('ross')
(Initializing ross)
>>> rosss.sayHi()
Hi, my name is ross.
>>> rosss.howMany()
I am the only person here.
>>> ross = Person('ross')
(Initializing ross)
>>> ross.sayHi()
Hi, my name is ross.
>>> ross.howMany()
We have 2 persons here.

--
components: +Interpreter Core
nosy: +r.david.murray
priority:  -> low
resolution:  -> works for me
stage:  -> committed/rejected
status: open -> closed
type: compile error -> behavior

___
Python tracker 

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



[issue6495] particular variable's name case exception attributeError

2009-07-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

This has to do with the order that things are deleted/cleaned-up on 
interpreter shutdown.  In the reported case, it just happens that the 
'Person' entry in the globals() dict is deleted *before* __del__ is called 
on the last Person instance, causing problems for the lookup of 'Person' 
that's involved in the line 'Person.population -= 1'.

I wonder whether the output from these 'ignored' exceptions on interpreter 
shutdown could be suppressed entirely, at least for non-debug builds?

--
nosy: +marketdickinson

___
Python tracker 

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



[issue6495] particular variable's name case exception attributeError

2009-07-16 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Well, "Errors should never pass silently."
In this case, it is possible to replace "Person.population" by
"self.__class__.population".

This said, it could be interesting to cleanup modules in a more
predictive way, for example in the reverse order of their import order.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6444] multiline exception logging via syslog handler

2009-07-16 Thread R. David Murray

R. David Murray  added the comment:

I can confirm the issue with syslog-ng, and also that it works fine with
FreeBSD's syslogd.

That said, in the googling I did I ran across code from another project
that splits log lines at newlines and also if the logged line is too
long...apparently some implementations of syslog don't handle long lines
well.

--
nosy: +r.david.murray
priority:  -> normal

___
Python tracker 

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



[issue6490] os.popen documentation in 2.6 is probably wrong

2009-07-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I have no idea either. It seems os.popen is now a hacked up to use
subprocess, so it seems intentional to keep it. Guido, you made this
change; is os.peopen supposed to be gone in 3.x?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue6493] Can not set value for structure members larger than 32 bits

2009-07-16 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

What's your platform? I could reproduce this on windows. And I found 
attached patch can workaround this.

--
keywords: +patch
nosy: +ocean-city
Added file: http://bugs.python.org/file14506/ctypes_workaround.patch

___
Python tracker 

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



[issue6433] multiprocessing: pool.map hangs on empty list

2009-07-16 Thread Jesse Noller

Jesse Noller  added the comment:

committed r74023 on trunk

--

___
Python tracker 

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



[issue6433] multiprocessing: pool.map hangs on empty list

2009-07-16 Thread Jesse Noller

Changes by Jesse Noller :


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



[issue6493] Can not set value for structure members larger than 32 bits

2009-07-16 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


Added file: http://bugs.python.org/file14507/ctypes_workaround_2.patch

___
Python tracker 

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



[issue6490] os.popen documentation in 2.6 is probably wrong

2009-07-16 Thread Guido van Rossum

Guido van Rossum  added the comment:

I am guessing the reason to keep os.popen() (albeit now reimplemented 
using subprocess) is that it is a convenient wrapper for a common use case 
and also familiar.  I see no problem with this.  (Indeed the big problem 
was with the proliferation of popenN with confusing signatures.)  So I 
guess it ought to be documented and removed from the list of deprecations 
in 2.6.

--

___
Python tracker 

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



[issue6490] os.popen documentation in 2.6 is probably wrong

2009-07-16 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

By the way, shouldn't the various posix.spawnv* functions be officiall
deprecated as well?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2009-07-16 Thread Jim Garrison

Jim Garrison  added the comment:

To clarify:

... it should never alter the content of (i.e. insert whitespace into)
existing text elements that contain non-whitespace characters.

--

___
Python tracker 

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



[issue1327594] Static Windows Build fails to locate existing installation

2009-07-16 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Do we want to support this? What is the use of a static build?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6431] Fraction fails equality test with a user-defined type

2009-07-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks again, casevh!  The patch looks good.  I've added to it a bit,
though---see issue6431.patch.  In detail:

- don't use subtraction with unknown types for <, <=, >, >=;  this is
  dangerous, since the unknown type may well do a lossy conversion, and
  comparisons should really be exact where possible;  as with __eq__,
  it seems better to return NotImplemented and give the other type a
  chance.

- handle infs and nans correctly in comparisons with floats

- a few more tests.

casevh, please could you have a look at the attached patch and let me
know whether it still works with your gmpy port?

Jeffrey, any comments on these changes?

--
stage: test needed -> patch review
Added file: http://bugs.python.org/file14508/issue6431.patch

___
Python tracker 

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



[issue1327594] Static Windows Build fails to locate existing installation

2009-07-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I think it would be nice to support it, atleast in the C files (not
necessarily, but possibly, in the project files as well).

The point of a static Python library is that you can embed it into an
application without requiring an additional DLL. That also allows you to
leave out modules that you don't need at link time. Combine this with
freeze, and you can embed an application without any additional files to
be shipped. Without embedding, but with freeze, you get true standalone
binaries (as opposed to py2exe-fake-I-silently-extract-at-run-time
standalone binaries)

--

___
Python tracker 

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



[issue6482] PATCH: tiny simplification for subprocess

2009-07-16 Thread Georg Brandl

New submission from Georg Brandl :

Thanks, committed in r74028.

--
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue6473] hmac sha384/sha512 fails test vectors

2009-07-16 Thread Hagen Fürstenau

Hagen Fürstenau  added the comment:

Seems like this has already been fixed as issue 1385.

--
nosy: +hagen

___
Python tracker 

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



[issue6487] Some index entries appear in black

2009-07-16 Thread Mitchell Model

Mitchell Model  added the comment:

doh. sorry. I was in a reading mode, not a "using" mode, and wasn't
thinking of the entries as links, though of course I use them that way
all the time. The pages just seemed oddly sprinkled with black items.
All I said is that I couldn't find any pattern -- doesn't mean there
isn't an obvious one! Close it and forget I said anything about it

--
status: pending -> open

___
Python tracker 

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



[issue1524938] PEP MemoryError with a lot of available memory gc not called

2009-07-16 Thread Mark Matusevich

Mark Matusevich  added the comment:

It looks like the severity of this problem is underestimated here.

A programmer working with a significant amount of data (e.g SciPy user)
and uses OOP will face this problem. Most OOP designs result in
existence of some loops (e.g. two way connections). Some object in those
loops will include huge amount of data which were allocated by a single
operation if the program deals with some kind of algorithms (signal
processing, image processing or even 3D games).

I apologize that my example is artificial. I had a real-life program of
8000 lines which was going into swap for no apparent reason and then
crashing. But instead of posting those 8000 lines, I posted a simple
example illustrating the problem.

--

___
Python tracker 

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



[issue6431] Fraction fails equality test with a user-defined type

2009-07-16 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

The fallback behavior in Fraction was meant to demonstrate the suggested 
fallback behavior for user-defined types. In particular, the idea was 
that all Reals would (by default) be comparable to each other, even if 
they didn't know about each other. Unfortunately, the comparison protocol 
provides no way to know if a particular call is the first call or the 
fallback, so __eq__(Fraction, b) has to return the same thing as 
__eq__(b, Fraction). If b doesn't know about Fraction, and Fraction wants 
to make a best attempt at comparing to it, then __eq__(Fraction, b) can't 
return NotImplemented.

--

___
Python tracker 

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



[issue6482] PATCH: tiny simplification for subprocess

2009-07-16 Thread David Goodger

David Goodger  added the comment:

r74028 changes the logic of the code.  The "finally" clause always
executes, regardless of whether or not an exception was raised.  The
previous behavior only executed when there was an exception.

I don't know if the previous logic was correct, or the new logic, but
they are *not* the same.

--
nosy: +goodger

___
Python tracker 

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



[issue6482] PATCH: tiny simplification for subprocess

2009-07-16 Thread David Goodger

David Goodger  added the comment:

To clarify my last message: the log message for r74028 ('simplify
"except: raise" to "finally:"') implies a nonexistent equivalence.

So was the log message in error, or the change itself?

--

___
Python tracker 

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



[issue6496] 2to3 generates "from urllib.parse import pathname2url"

2009-07-16 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

Both pathname2url and url2pathname are in the urllib.request module, 
but 2to3 thinks they are in urllib.parse module.

sridh...@double:~/tmp/eric1$ cat foo.py 
from urllib import pathname2url, url2pathname

sridh...@double:~/tmp/eric1$ /opt/ActivePython-3.1/bin/2to3 foo.py 
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
--- foo.py (original)
+++ foo.py (refactored)
@@ -1,2 +1,2 @@
-from urllib import pathname2url, url2pathname
+from urllib.parse import pathname2url, url2pathname
 
RefactoringTool: Files that need to be modified:
RefactoringTool: foo.py
sridh...@double:~/tmp/eric1$

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 90585
nosy: srid
severity: normal
status: open
title: 2to3 generates "from urllib.parse import pathname2url"
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue6497] Support for digital Cinema/film DPX and Kodak Cineon image file formats in imghdr module

2009-07-16 Thread Walter Arrighetti

New submission from Walter Arrighetti :

In the Digital Intermediate (DI) post-production world, as well as in
digital cinema/film technologies, video frames -especially those coming
from a film scanner- are stored in sequences of image files, whose two
primary formats are the Digital Picture Exchange (DPX,
http://en.wikipedia.org/wiki/DPX) and the Kodak Cineon
(http://en.wikipedia.org/wiki/Cineon).
This proposal of lines addiction only to imghdr module allows to
properly test DPX and Cineon files for validity, with imghdr.what()
returning either 'dpx' or 'cin' strings if either is found.

--
components: Library (Lib)
files: imghdr_dpx_cineon_support.py
messages: 90587
nosy: waltermb
severity: normal
status: open
title: Support for digital Cinema/film DPX and Kodak Cineon image file formats 
in imghdr module
type: behavior
versions: Python 2.7, Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14510/imghdr_dpx_cineon_support.py

___
Python tracker 

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



[issue6496] 2to3 generates "from urllib.parse import pathname2url"

2009-07-16 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Attaching fix. Might have to merge to 2.6/2.7

--
keywords: +patch
Added file: http://bugs.python.org/file14511/fix6496.patch

___
Python tracker 

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



[issue6490] os.popen documentation in 2.6 is probably wrong

2009-07-16 Thread krawyoti

krawyoti  added the comment:

Georg, please note that os.popen *is* documented in 3.1. See attached
screen shot.

--
Added file: http://bugs.python.org/file14509/docs.png

___
Python tracker 

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



[issue6490] os.popen documentation in 2.6 is probably wrong

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

That is not really a documentation for the function, but a pointer to a
section in which there is no documentation for popen.

--

___
Python tracker 

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



[issue6482] PATCH: tiny simplification for subprocess

2009-07-16 Thread Georg Brandl

Georg Brandl  added the comment:

Very true. Since there was no indication that the previous version was
faulty, reverted in r74029.

--

___
Python tracker 

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



[issue6487] Some index entries appear in black

2009-07-16 Thread Georg Brandl

Changes by Georg Brandl :


--
status: open -> closed

___
Python tracker 

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



[issue6431] Fraction fails equality test with a user-defined type

2009-07-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

[Jeffrey]
> In particular, the idea was that all Reals would (by default) be
> comparable to each other, even if they didn't know about each other.

Understood, but I don't think this is an attainable goal.  I don't see 
any reasonable way to make it happen without doing significant guessing, 
or expanding the numbers ABC in some way.

At the moment, __eq__(a, b) falls back to 'float(a) == b' when b is not 
a float or an instance of Rational.  This seems problematic to me for a 
couple of reasons:

1. The conversion to float loses information.  As a result, we lose (a) 
transitivity of equality, (b) well-behaved hashing (x == y no longer 
implies hash(x) == hash(y)), and (c) consistency between == and the 
other comparison operators.

2. This fallback shuts out the other class even in cases where the other 
class *does* know how to handle the comparison.  So there's no way for 
another class to 'play nice' with the Fraction type and implement exact 
comparisons even if it wants to.

Here's an example of 1, on Python 2.6.  (bigfloat is a home-built 
wrapper for the MPFR library.)

newton:~ dickinsm$ python2.6
Python 2.6.2 (r262:71600, Jun 17 2009, 09:08:27) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from bigfloat import BigFloat
>>> from fractions import Fraction
>>> x = Fraction(2**60-1)
>>> y = Fraction(2**60+1)
>>> z = BigFloat(2**60)
>>> x == z
True
>>> y == z
True
>>> x == y
False
>>> hash(x) == hash(z)
False

I just don't see any reasonable way to make comparisons 'automatically' 
work:  one of the classes has to know how to handle both types, or else 
there's just going to be a lot of guesswork involved.  So it seems 
better to simply return NotImplemented in these cases.

--

___
Python tracker 

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



[issue6473] hmac sha384/sha512 fails test vectors

2009-07-16 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Indeed, the provided test file passes on all python versions I have.
Iain, does this script fail on some version?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6431] Fraction fails equality test with a user-defined type

2009-07-16 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

If you think it's better, I'm happy to make the other tradeoff.

--

___
Python tracker 

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



[issue2622] Import errors in email.message.py

2009-07-16 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

applied with r37952 (trunk), r37953 (2.6) and r37978 (py3k, docstrings 
only). Thanks for the patch!

--
resolution: accepted -> 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



[issue6431] Fraction fails equality test with a user-defined type

2009-07-16 Thread Case Van Horsen

Case Van Horsen  added the comment:

On Thu, Jul 16, 2009 at 11:34 AM, Mark Dickinson wrote:
>
> Mark Dickinson  added the comment:
>
> Thanks again, casevh!  The patch looks good.  I've added to it a bit,
> though---see issue6431.patch.  In detail:
>
> - don't use subtraction with unknown types for <, <=, >, >=;  this is
>  dangerous, since the unknown type may well do a lossy conversion, and
>  comparisons should really be exact where possible;  as with __eq__,
>  it seems better to return NotImplemented and give the other type a
>  chance.
>
> - handle infs and nans correctly in comparisons with floats
>
> - a few more tests.
>
> casevh, please could you have a look at the attached patch and let me
> know whether it still works with your gmpy port?

I've tested gmpy with attached patch and all tests pass successfully.
Thanks!

>
> Jeffrey, any comments on these changes?
>
> --
> stage: test needed -> patch review
> Added file: http://bugs.python.org/file14508/issue6431.patch
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue6498] Py_Main() does not return on SystemExit

2009-07-16 Thread Rogi

New submission from Rogi :

>From teh docs:

http://docs.python.org/c-api/veryhigh.html

int Py_Main(int argc, char **argv)¶

The main program for the standard interpreter. This is made
available for programs which embed Python. The argc and argv parameters
should be prepared exactly as those which are passed to a C program’s
main() function. It is important to note that the argument list may be
modified (but the contents of the strings pointed to by the argument
list are not). The return value will be the integer passed to the
sys.exit() function, 1 if the interpreter exits due to an exception, or
2 if the parameter list does not represent a valid Python command line.

Note that if an otherwise unhandled SystemError is raised, this
function will not return 1, but exit the process, as long as
Py_InspectFlag is not set.

Py_Main() still does not return on SystemExit.

--
assignee: georg.brandl
components: Documentation
messages: 90596
nosy: Rogi, georg.brandl
severity: normal
status: open
title: Py_Main() does not return on SystemExit
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



[issue6026] test_(zipfile|zipimport|gzip|distutils|multiprocessing|xmlrpc|docxmlrpc) fail if zlib is not available

2009-07-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

Now (Python2.7a0 trunk:74029) there are 3 more tests that fail because
zlib is not available: test_multiprocessing, test_xmlrpc and test_docxmlrpc.

--
title: test_(zipfile|zipimport|gzip|distutils) fail if zlib is not available -> 
test_(zipfile|zipimport|gzip|distutils|multiprocessing|xmlrpc|docxmlrpc) fail 
if zlib is not available

___
Python tracker 

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



[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-16 Thread R. David Murray

R. David Murray  added the comment:

Note that this bug is also of concern to Ubuntu.  See for example
https://bugs.launchpad.net/python/+bug/94130.

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



[issue6499] Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer when zlib is not available

2009-07-16 Thread Ezio Melotti

New submission from Ezio Melotti :

I'm working on #6026 and I noticed that the patch for #6267 introduced
an "import gzip" in Lib/xmlrpclib.py in r73638.
gzip tries to import zlib, and if it's not available the import fails.
This led to 3 new tests failures in the trunk: test_xmlrpc,
test_docxmlrpc and test_multiprocessing.
This also mean that the modules xmlrpclib, DocXMLRPCServer and
SimpleXMLRPCServer (and possibly others) cannot be imported anymore if
zlib is not available (they used to work on 2.6).

xmlrpclib should check if the "import gzip" fails and disable the new
gzip-related features (raising an error only when someone tries to use
them).

I don't know if this check can be moved directly on gzip but it seems
unlikely.

--
assignee: krisvale
messages: 90599
nosy: ezio.melotti, krisvale
priority: normal
severity: normal
stage: needs patch
status: open
title: Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer when zlib 
is not available
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue6267] Cumulative patcc:h to http and xmlrpc

2009-07-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer cannot be imported
after r73638 if zlib is missing, see #6499.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue6498] Py_Main() does not return on SystemExit

2009-07-16 Thread Raphaela

Raphaela  added the comment:

I'm having the same problem. The source of the problem seem to be in
PyRun_InteractiveOneFlags(). It prints and clears the last error.

--
nosy: +Rakeka

___
Python tracker 

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



[issue6026] test_(zipfile|zipimport|gzip|distutils|multiprocessing|xmlrpc|docxmlrpc) fail if zlib is not available

2009-07-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

The 3 new failures (test_multiprocessing, test_xmplrpc and
test_docxmlrpc) were introduced in r73638 and I opened a new issue about
that (#6499). I'll wait to see if and how they should be fixed (and
possibly open a new issue for them).

The attached patch fixes test_zipfile, test_zipimport, test_gzip and
test_distutils.

I used two techniques to fix these files:
1) checking if zlib was available with
   try:
   import zlib
   except ImportError:
   zlib = None
   and then using @skipUnless(zlib, "requires zlib")
   to skip individual tests/classes
2) using zlib = test_support.import_module('zlib') when
   zlib (or other modules like gzip) was necessary for
   all the tests

The patch includes the following fixes:

In test_zipfile there were 5 tests that were failing. Several other
tests work without zlib too. Fixed adding 3 @skipUnless(zlib, "requires
zlib") to two methods and to the TestsWithMultipleOpens class.

In test_zipimport there are 3 test classes. The 3rd class tests various
errors that are raised when, for example, the file doesn't exists. This
class works without zlib too, but since it's pointless to run it if the
other two don't work I decided to skip everything. Fixed adding zlib =
test_support.import_module('zlib').

In test_gzip all the files require gzip to work, and gzip requires zlib.
Fixed adding gzip = test_support.import_module('gzip').

In test_distutils there are several files affected:
test_sdist: fixed with 4 @skipUnless(zlib, "requires zlib")
test_bdist_dumb: fixed with a @skipUnless(zlib, "requires zlib")
test_archive_util: fixed with 3 @skipUnless(zlib, "requires zlib")

If the patch is good I'll commit it.

--
dependencies: +Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer 
when zlib is not available
keywords: +needs review, patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file14512/issue6026.diff

___
Python tracker 

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



[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-16 Thread Senthil

Senthil  added the comment:

This is actually fixed in Py2.7 and I am trying to get it Py3.2 before
marking this as fixed.

Based on the comments, should this be backported to Py2.6?

--

___
Python tracker 

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



[issue6415] warnings.warn segfaults on bad formatted string

2009-07-16 Thread Brett Cannon

Changes by Brett Cannon :


--
components: +Interpreter Core
priority:  -> release blocker
stage:  -> patch review

___
Python tracker 

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



[issue6449] Improve/update python.org/dev/

2009-07-16 Thread Brett Cannon

Brett Cannon  added the comment:

OK, fixed in r12412 for pydotorg sans the IRC stuff (don't feel 
comfortable pointing people that way when IRC is not under our control). 
Thanks for the fixes, Ezio.

--

___
Python tracker 

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



[issue6449] Improve/update python.org/dev/

2009-07-16 Thread Brett Cannon

Changes by Brett Cannon :


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



[issue6415] warnings.warn segfaults on bad formatted string

2009-07-16 Thread Brett Cannon

Brett Cannon  added the comment:

Here is a patch for test_warning to test for the failure. Hirokazu, since 
you found the fix, do you want to do the commit, or do you want me to 
handle it since this will need to be applied to all active branches?

--
assignee: brett.cannon -> ocean-city
stage: patch review -> commit review
Added file: http://bugs.python.org/file14513/test_warnings.diff

___
Python tracker 

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