[issue6773] subprocess issue on Win 7 x64

2009-10-07 Thread Ezio Melotti

Ezio Melotti  added the comment:

I cannot reproduce it on Win7 32bit (OS Name: Microsoft Windows 7
Enterprise; OS Version: 6.1.7600 N/A Build 7600) with Python 2.6.3rc1.
Attached there's the file I used (a slightly different version of what
you posted, your version worked too), this is the output I got:

cmd>python issue6773.py
"hello from myProcess"

cmd>

--
nosy: +ezio.melotti
priority:  -> normal
Added file: http://bugs.python.org/file15066/issue6773.py

___
Python tracker 

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



[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki

Shawn Ligocki  added the comment:

Oh, urandom is almost always non-deterministic. It mixes completely
random bits from hardware sources with its pseudo-random number state.
The more random bits it gets from hardware, the less predictable its
output is. However, as long as it's getting any random bits, it's output
is not deterministic (because it's based on some random information).

But perhaps there is better wording that conveys the power of the
urandom source?

--

___
Python tracker 

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



[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Jan Hosang

Jan Hosang  added the comment:

Maybe os.urandom is "more random" than the module random in the sense that 
it is harder to figure out what comes next, but still deterministic. The 
readings from the hardware are random and you usually don't know them, yet 
what comes out of urandom is determined by what urandom reads from the 
hardware and its state. I just want to warn not to drop wrong terms.

--

___
Python tracker 

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



[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki

Shawn Ligocki  added the comment:

Ah, sorry for the misunderstanding. I agree, better not to mislead. 

Perhaps we should side with the urandom documentation and say that it is
a cryptographically secure random number generator with no accessible state?

--

___
Python tracker 

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

(Stefan emailed Mike Cowlishaw about this:  thanks, Stefan!)

Mike's initial response suggests that we *should* be rounding the result
here.  That is, decNumber and decimal.py are both in error, and Stefan's
interpretation is correct.

--
assignee:  -> mark.dickinson
components: +Library (Lib)
priority:  -> high
stage:  -> test needed
type:  -> behavior
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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Attaching additional testcases from Mike Cowlishaw.

--
Added file: http://bugs.python.org/file15067/logb_additional.decTest

___
Python tracker 

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



[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread chuck

chuck  added the comment:

Depends on how verbose we want to be. It should say why one might want to 
use urandom() instead of random (if you decide you are interested you can 
still look up the documentation). I think it would be nice to say why 
random does not use urandom if urandom is better, so you end up with a 
very short pro/con of urandom, which should be appropriate for users who 
are seeking information on getting random numbers.

Unfortunately I don't know enough about random. I guess it's a 
speed/security tradeoff?

--

___
Python tracker 

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



[issue6773] subprocess issue on Win 7 x64

2009-10-07 Thread Piotr Foltyn

Piotr Foltyn  added the comment:

I cannot reproduce it on Windows 7 x64 Ultimate either.
sys.getwindowsversion() -> (6, 1, 7600, 2, '')

Probably this bug was in Win7 RC and not in python. Thanks for your time. 
Closing.

--
status: open -> closed

___
Python tracker 

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



[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-10-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

your patch is no more a diff file (the 'previous' file is empty)

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

You did not attach any patch. But anyway this has already been fixed by
issue1326077.

--
nosy: +amaury.forgeotdarc
resolution:  -> duplicate
status: open -> closed
superseder:  -> traceback.py formats SyntaxError differently

___
Python tracker 

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



[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-07 Thread Eric Smith

Eric Smith  added the comment:

Mark's really the expert here, so I trust his description. Is his
description layman-speak enough for the docs?

--

___
Python tracker 

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



[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-10-07 Thread Kees Bos

Kees Bos  added the comment:

Sorry. Renamed .bak to .orig ...
Here's the patch compiler/transformer.py (against python 2.5)

--
Added file: http://bugs.python.org/file15068/transformer.py.patch

___
Python tracker 

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



[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread Robert Szefler

New submission from Robert Szefler :

Trying to .emit() a Unicode string causes an awkward exception to be thrown:

Traceback (most recent call last):
  File "/usr/lib/python2.5/logging/handlers.py", line 672, in emit
self.socket.sendto(msg, self.address)
TypeError: sendto() takes exactly 3 arguments (2 given)

The issue is fixed simply by adding some sort of encoding coercion
before the sendto, for example:

if type(msg)==unicode: msg=msg.encode('utf-8')

--
components: Library (Lib)
messages: 93694
nosy: rszefler
severity: normal
status: open
title: SysLogHandler can't handle Unicode
type: behavior
versions: Python 2.5

___
Python tracker 

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



[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

That's amusing.  The moment I submitted the comment above I remember
thinking  'Hmm.  I could have explained that better.'

I'll try to come up with a doc patch.

Stealing the issue from Eric.

--
assignee: eric.smith -> mark.dickinson

___
Python tracker 

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



[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread brimac

brimac  added the comment:

Hi Ezio

Many thanks for all your effort with this problem.
Thanks also for the full explanation and link.
I'm not sure what happens now. Will somebody fix it?
I think it's important for Python's image because
it might be the first page a new user tries to print.

brimac

2009/10/6 Ezio Melotti 

>
> Ezio Melotti  added the comment:
>
> To fix this problem is enough to add an !important to the margin: 0;
> rule in the @media print {} at the end of basic.css (line 408).
>
> I'll try to explain why the !important is necessary.
> In default.css @import url("basic.css"); (correctly) appears at the
> beginning, and imports the rules from basic.css, including the @media
> print {}. A few lines later, in default.css, there's the rule
> div.bodywrapper { margin: 0 0 0 230px; }, and with no @media specified
> it defaults on 'all'.
>
> In default.css we then end up with something equivalent to:
>
> /* This is defined in basic.css and imported
>   at the beginning of default.css */
> @media print {
>/* some rules omitted for clarity */
>div.bodywrapper { margin: 0; }
> }
>
> /* This is defined later in default.css */
> @media all { /* This is implicit */
>div.bodywrapper { margin: 0 0 0 230px; }
> }
>
> When the file is printed both the rules are applied, because 'all' also
> includes 'print'.
> Since both the media have the same priority (i.e. the specific @media
> print does NOT have higher priority than the implicit @media all) and
> both the rules have the same priority too, the latter wins.
> The !important is then needed to raise the priority of the first rule.
>
> Note that adding the !important is not a really good solution IMHO: the
> problem could appear again if other rules with the same priority of the
> ones in @media print {} are specified elsewhere.
> A good solution would be to move the print rules after the normal ones,
> so in case the print media is used these rules will have higher priority.
> The @import can only appear at the beginning of a file so the two
> possible solutions are:
>
> 1) put the rules with media all in, for example, all.css and the ones
> with media print in print.css and then, in default.css, write only:
> @import url('all.css');
> @import url('print.css') print;
>
> 2) like 1) but importing the print.css separately using  in the
> html pages:
> 
> 
>
> A third solution might be to specify the media of the normal rules to
> 'screen', but some rules are probably common to both the media.
>
> More information here: http://www.w3.org/TR/CSS2/cascade.html
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file15069/unnamed

___
Python tracker 

___Hi EzioMany thanks for all your effort with this problem.Thanks 
also for the full explanation and link.I'm not sure what happens now. 
Will somebody fix it?I think it's important for Python's image 
because
it might be the first page a new user tries to 
print.brimac2009/10/6 Ezio Melotti 
rep...@bugs.python.org>

Ezio Melotti ezio.melo...@gmail.com> added the 
comment:

To fix this problem is enough to add an !important to the margin: 0;
rule in the @media print {} at the end of basic.css (line 408).

I'll try to explain why the !important is necessary.
In default.css @import url("basic.css"); (correctly) appears at 
the
beginning, and imports the rules from basic.css, including the @media
print {}. A few lines later, in default.css, there's the rule
div.bodywrapper { margin: 0 0 0 230px; }, and with no @media specified
it defaults on 'all'.

In default.css we then end up with something equivalent to:

/* This is defined in basic.css and imported
   at the beginning of default.css */
@media print {
    /* some rules omitted for clarity */
    div.bodywrapper { margin: 0; }
}

/* This is defined later in default.css */
@media all { /* This is implicit */
    div.bodywrapper { margin: 0 0 0 230px; }
}

When the file is printed both the rules are applied, because 'all' 
also
includes 'print'.
Since both the media have the same priority (i.e. the specific @media
print does NOT have higher priority than the implicit @media all) and
both the rules have the same priority too, the latter wins.
The !important is then needed to raise the priority of the first rule.

Note that adding the !important is not a really good solution IMHO: the
problem could appear again if other rules with the same priority of the
ones in @media print {} are specified elsewhere.
A good solution would be to move the print rules after the normal ones,
so in case the print media is used these rules will have higher priority.
The @import can only appear at the beginning of a file so the two
possible soluti

[issue918368] urllib doesn't correct server returned urls

2009-10-07 Thread Adam Nelson

Adam Nelson  added the comment:

I can't think of too many specific scenarios.  It just seems like a non-
trivial behavior change (or rather, it is trivial but with possibly far 
reaching ramifications).

One issue I see is that the ticket morphed from just dealing with space 
characters to many special characters.  quote_plus() probably would have 
handled the space issue cleanly.

The other issue I'm concerned about is that there is no testing of non-
ascii URLs (or at least I don't see any).

Finally, a netloc like 'www.g oogle.com' would be converted invalidly to 
'www.g%20oogle.com' which would then be forwarded to an actual HTTP 
request.

I can't point to anything too specific - more of just a feeling that 
this ticket is already 5 1/2 years old and maybe things should be left 
as-is and enhancement made only to Python 3.x.  Of course, I'm really 
just a new Python convert so I don't have massive experience here by any 
means.

--

___
Python tracker 

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



[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread Ezio Melotti

Ezio Melotti  added the comment:

> I'm not sure what happens now. Will somebody fix it?

Now that the problem and the solution are known, Georg will probably fix
it at some point. The "!important" could be used as a temporary
workaround (e.g. for 2.6.4 and for the online doc), the css can be
reorganized later.

--

___
Python tracker 

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



[issue7029] Improve pybench

2009-10-07 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Ok, thanks for the info.
We are currently using the modified version in house for monitoring our 
builds and that's ok for my purposes.  I have set the -C 0 and --timer 
systimes.processtime as default for us.
I'll close this now and leave you to do the rewrite.

--
resolution:  -> later
status: open -> closed

___
Python tracker 

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



[issue6894] urllib2 doesn't respect "no_proxy" environment (python2.6.2)

2009-10-07 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever, orsenthil

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Koen van de Sande

Koen van de Sande  added the comment:

Thanks Christoph, those are two important fixes to the patch. I'm +1 on 
having this in the next 2.6 maintenance release.

--

___
Python tracker 

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



[issue7075] Bug while put a set on a dict

2009-10-07 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid

___
Python tracker 

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



[issue6894] urllib2 doesn't respect "no_proxy" environment (python2.6.2)

2009-10-07 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil

___
Python tracker 

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



[issue969718] BASECFLAGS are not passed to module build line

2009-10-07 Thread Chris Lambacher

Chris Lambacher  added the comment:

I am running into a problem related to this. I am attempting to cross
compile extensions but Fedora includes -march in the OPT variable. Since
there is no way to exclude the OPT values the build fails.

It seems that forcing OPT to stay the same is a disservice generally
speaking since as Marien said you potentially get extra conflicting
flags (-O seems like a stand-out since that could mess with gdb).

2.6 and 3.1 say:
if 'CFLAGS' in os.environ:
cflags = opt + ' ' + os.environ['CFLAGS']
ldshared = ldshared + ' ' + os.environ['CFLAGS']

There is no ability to override opt. I'd be willing to put together a
patch to allow opt to be overridden by an environment variable if I
could get some support for this from a core maintainer.

I am also open to other suggestions about how to get around this. I
potentially have time to put into fixing this (or the more general cross
compile issue).

--
nosy: +lambacck

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Just a note on the style of the msvc9compiler_stripruntimes_revised.diff
patch:

 * please try to use lines with at most 80 chars only

 * it would be better to use regexps to do the search&replace and
perhaps add wildcards to catch future SP-versions of VC9 as well

Added Distuils as component, since the patch is targeting distutils and
extensions, not the Python build process.

--
components: +Distutils
nosy: +lemburg

___
Python tracker 

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Mike's response makes sense to me.  If the precision is 2, the result
should round to that precision.  The documents showing the theory behind
the decimal spec indicate that in general mathematical operations are
exact, only the results get rounded.   Also IIRC, the use of
InvalidOperation is limited to the mathematical part, not the rounding step.

--
nosy: +rhettinger

___
Python tracker 

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Patch to update to the most recent official set of tests.

With this patch, logb and scaleb fail.

--
keywords: +patch
Added file: http://bugs.python.org/file15070/decimal_testcases.patch

___
Python tracker 

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Patch to fix logb.

--
Added file: http://bugs.python.org/file15071/logb.patch

___
Python tracker 

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

I don't understand the new scaleb testcases (from Mike).  They look like 
this:

precision:   34
maxExponent: 9
minExponent: -9
-- integer overflow in 3.61 or earlier
scbx164 scaleb  1E-9  -12  -> NaN Invalid_operation
-- out of range
scbx165 scaleb  -1E-9  +12  -> NaN Invalid_operation

The specification says that the second operand should be in the range 
+/-2*(Emax+precision) inclusive, which in this case it is.  So clearly 
there are additional situations in which Invalid_operation should be 
signalled.  It's not clear to me what those conditions are.

--

___
Python tracker 

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

The IEEE 754-2008 description of scaleB makes a lot more sense, IMO:
scaleB(x, N) is simply x*10**N (assuming that B=10 and N is integral), 
rounded in the usual way.

The restriction in the specification seems arbitrary and questionable.  
Presumably it's intended to aid implementation in low-level languages.

--

___
Python tracker 

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



[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-07 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Sorry, 2.6.4 will be solely to remove the brown paper bag of 2.6.3 from
our heads.  This can go in 2.6.5 though.

--

___
Python tracker 

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




[issue7078] struct help in the interpreter does not explain about the fmt option

2009-10-07 Thread Senthil Kumaran

New submission from Senthil Kumaran :

>>> help(struct) mentions the functions which use fmt characters.
The builtin help does not mention the fmt characters and their meaning.
One should go online if he has to refer them.

--
keywords: easy
messages: 93709
nosy: orsenthil
priority: low
severity: normal
status: open
title: struct help in the interpreter does not explain about the fmt option
type: behavior
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



[issue7078] struct help in the interpreter does not explain about the fmt option

2009-10-07 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> georg.brandl
components: +Documentation
nosy: +georg.brandl

___
Python tracker 

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



[issue1488934] file.write + closed pipe = no error

2009-10-07 Thread Forest Bond

Changes by Forest Bond :


--
nosy: +forest_atq
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



[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Stefan Krah

Stefan Krah  added the comment:

This whole thing is indeed a matter of taste, so I'd close the bug if no
one else is interested.

--

___
Python tracker 

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



[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I would like to look at this for a bit before it gets closed.

--
assignee: mark.dickinson -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Raymond, can I recommend deprecating and eventually removing three-
argument pow support from Decimal?

--

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Christoph Gohlke

Christoph Gohlke  added the comment:

The attached patch uses a regular expression.

--
Added file: 
http://bugs.python.org/file15072/msvc9compiler_stripruntimes_regexp.diff

___
Python tracker 

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



[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread brimac

brimac  added the comment:

Hi Ezio

Thanks again.

Brimac

2009/10/7 Ezio Melotti 

>
> Ezio Melotti  added the comment:
>
> > I'm not sure what happens now. Will somebody fix it?
>
> Now that the problem and the solution are known, Georg will probably fix
> it at some point. The "!important" could be used as a temporary
> workaround (e.g. for 2.6.4 and for the online doc), the css can be
> reorganized later.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file15073/unnamed

___
Python tracker 

___Hi EzioThanks again.Brimac2009/10/7 Ezio Melotti rep...@bugs.python.org>

Ezio Melotti ezio.melo...@gmail.com> added the 
comment:

> I'm not sure what happens now. Will somebody fix 
it?

Now that the problem and the solution are known, Georg will probably 
fix
it at some point. The "!important" could be used as a temporary
workaround (e.g. for 2.6.4 and for the online doc), the css can be
reorganized later.

--

___
Python tracker rep...@bugs.python.org>
http://bugs.python.org/issue6670>
___

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Applied the fix for logb in r75275 (trunk), r75276 (py3k) and r75277 
(release31-maint).  r75275 still needs to be merged to the release26-maint 
branch once it's unfrozen.

--

___
Python tracker 

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



[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Christoph Gohlke wrote:
> 
> Christoph Gohlke  added the comment:
> 
> The attached patch uses a regular expression.

Much better, thanks.

--
title: Do not embed manifest files in *.pyd when compiling with MSVC -> Do not 
embed manifest files in *.pyd when compiling withMSVC

___
Python tracker 

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



[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Stefan Krah

Stefan Krah  added the comment:

Deprecate on the grounds that it is slow in decimal.py or the
InvalidOperation issue?

I think pure integer arithmetic with the decimal type always requires
attention from the user, since in many functions one has to check for
Rounded/Inexact in order to get meaningful results. Here one has to
check for InvalidOperation, so I don't think it's a big deal. (This is
also the reason that I don't find the inconsistencies that you listed
particularly bothersome.)

If slowness is the reason: If any C module makes it into Python, this
would not be an issue any longer.

--

___
Python tracker 

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



[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Stefan Krah

Stefan Krah  added the comment:

precision:   34
maxExponent: 9
minExponent: -9
-- integer overflow in 3.61 or earlier
scbx164 scaleb  1E-9  -12  -> NaN Invalid_operation
-- out of range
scbx165 scaleb  -1E-9  +12  -> NaN Invalid_operation

I would say that this is implementation specific, as a workaround for
the overflow. This isn't in the spec at the moment.

--

___
Python tracker 

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



[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread thewtex

thewtex  added the comment:

Sorry about the lack of the attached file.  I will try again and include
it inline.  

That other patch does not fix the bug I am seeing, which is experienced
while using traceback.format_exception_only directly.

Thanks.

--- /usr/lib/python2.6/traceback.py 2009-09-23 19:49:17.0 -0500
+++ /home/matt/tmp/traceback.py 2009-09-21 17:09:49.590440613 -0500
@@ -190,11 +190,10 @@
 if badline is not None:
 lines.append('%s\n' % badline.strip())
 if offset is not None:
-caretspace = badline[:offset].lstrip()
+caretspace = badline[:offset-1].lstrip()
 # non-space whitespace (likes tabs) must be kept for
alignment
 caretspace = ((c.isspace() and c or ' ') for c in
caretspace)
-# only three spaces to account for offset1 == pos 0
-lines.append('   %s^\n' % ''.join(caretspace))
+lines.append('%s^\n' % ''.join(caretspace))
 value = msg
 
 lines.append(_format_final_exc_line(stype, value))

--
keywords: +patch
status: closed -> open
Added file: http://bugs.python.org/file15074/traceback.patch

___
Python tracker 

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



[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

I was suggesting that it be deprecated on the grounds that:

(1) It's not part of the Decimal standard.
(2) It's not implemented for Python (binary) floats, so why implement
it for decimal floats?
(3) It's severely use-case challenged.

It's a pure integer-based number-theoretic function that has no place in 
the Decimal module.

--

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2009-10-07 Thread David Bonner

David Bonner  added the comment:

I can remove the boilerplate from the code as long as I add the
following to the submittal:

VMware, Inc. is providing this bz2 module patch to you under the terms
of the Apache License 2.0 with the understanding that you plan to
re-license this under the terms and conditions of the Python License.
This patch is provided as is, with no warranties or support. VMware
disclaims all liability in connection with the use/inability to use this
patch. Any use of the attached is considered acceptance of the above.

--
Added file: http://bugs.python.org/file15075/py3k_bz2.patch

___
Python tracker 

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



[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Stefan Krah

Stefan Krah  added the comment:

(1) is clearly true. I wonder about (2) and (3):

The decimal data type is specified to be usable for integer arithmetic.
With a high precision (and traps for Rounded/Inexact) I think it's
reasonably convenient to use.

--

___
Python tracker 

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



[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Daniel Stutzbach

New submission from Daniel Stutzbach :

I noticed that file_close() calls close_the_file(), then frees the
buffer for the file object.  However, close_the_file() may fail and
return NULL if the file object is currently in use by another thread, in
which case freeing the buffer from underneath the C stdio library may
cause a crash.

Here's the relevant bit of code from fileobject.c:

static PyObject *
file_close(PyFileObject *f)
{
PyObject *sts = close_the_file(f);
PyMem_Free(f->f_setbuf);
f->f_setbuf = NULL;
return sts;
}

I think the two middle lines of the function should be wrapped in an "if
(sts)" block.

Attached is a short program that causes python to crash on two of my
systems (Windows XP running Python 2.6.3 and Debian running Python 2.5)
and a patch with my proposed fix.

I think Python 3 is immune because the I/O code has been completely
rewritten.  I have not checked the Python 3 code to see if there are any
analogous problems in the new code, however.

--
components: IO, Interpreter Core
files: fileobject.diff
keywords: patch
messages: 93723
nosy: stutzbach
severity: normal
status: open
title: file_close() ignores return value of close_the_file
type: crash
versions: Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15076/fileobject.diff

___
Python tracker 

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



[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


Added file: http://bugs.python.org/file15077/crash.py

___
Python tracker 

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



[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread Vinay Sajip

Vinay Sajip  added the comment:

To do this in a non-arbitrary way, it would make sense for the
SysLogHandler (and perhaps the other socket-based handlers, too) to grow
an optional encoding argument to their constructors, to be used to
encode when converting from unicode to str (str -> bytes for Py3K).

How does that sound?

--

___
Python tracker 

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



[issue3563] fix_idioms.py generates bad code

2009-10-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thanks very much for the patch; Committed in r75278.

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



[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki

Shawn Ligocki  added the comment:

A major pro for pseudo-random number generators is that they are
deterministic, that is, you can save a load the state, start from the
same seed and reproduce results, etc. At least in science (and probably
other areas) this reproducibility can be vital in a random class.

It really depends on your application though. In my use, I was
originally using normal random to produce seeds for another programs
random number generator. This ended up producing many identical results
and thus not producing an appropriate random sampling. Rather than
trying to figure out a proper way to do this with a PRNG I decided to
just use a completely random source, urandom was close enough for my needs.

I believe that is its strongest value, not having the strange artifacts
that PRNGs have. But I'm not completely sure how true that claim is :)

--

___
Python tracker 

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



[issue7071] distutils and IronPython compatibility

2009-10-07 Thread Michael Foord

Michael Foord  added the comment:

So there are two issues here - the terrible error message when an
install fails with an access denied error and the fact that distutils
attempts to compile bytecode under IronPython.

--

___
Python tracker 

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



[issue7080] locale.strxfrm raises MemoryError

2009-10-07 Thread egreen

New submission from egreen :

The strxfrm function in the locale module can potentially raise a
MemoryError.

The failing malloc is in Modules/_localemodule.c, line 291.

This is because the variable n0 of type Py_ssize_t is passed to
PyArg_ParseTuple, which expects an int when PY_SSIZE_T_CLEAN is not defined.

Patch attached, which also fixes an unrelated memory leak.

--
components: Library (Lib)
files: strxfrm_MemoryError.patch
keywords: patch
messages: 93728
nosy: egreen, loewis
severity: normal
status: open
title: locale.strxfrm raises MemoryError
type: crash
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15078/strxfrm_MemoryError.patch

___
Python tracker 

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



[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

OK, but your patch certainly interferes with issue1326077.
If format_exception_only changes, print_exception will display things 
differently.  And the precise output is now part of the test suite (in 
test_traceback.py)

--
resolution: duplicate -> 

___
Python tracker 

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



[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread R. David Murray

R. David Murray  added the comment:

Committed to trunk in r75255, py3k in r75279, and 3.1 in r75280. 
Leaving open until 2.6 is unfrozen and I can commit it there as well.

--
assignee:  -> r.david.murray
resolution:  -> accepted
stage: patch review -> committed/rejected

___
Python tracker 

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



[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread R. David Murray

Changes by R. David Murray :


Removed file: http://bugs.python.org/file15044/regrtest_guards.patch

___
Python tracker 

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



[issue5915] PEP 383 implementation

2009-10-07 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

It would be useful to have the surrogateescape error handler backported
to 2.7 to make it easier to start handling the kind of data it is needed
for.

--
nosy: +exarkun

___
Python tracker 

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



[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread Ezio Melotti

Ezio Melotti  added the comment:

The cwd should also be checked/restored to avoid problems like #7066.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue7071] distutils and IronPython compatibility

2009-10-07 Thread Dino Viehland

Changes by Dino Viehland :


--
nosy: +DinoV

___
Python tracker 

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



[issue7078] struct help in the interpreter does not explain about the fmt option

2009-10-07 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

The module docstring (for _struct) already existed, but was not exposed 
as struct.__doc__
This patch fixes the problem; also, there was a missing format 
character ("?")

--
keywords: +patch
nosy: +gagenellina
Added file: http://bugs.python.org/file15079/struct.diff

___
Python tracker 

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



[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
resolution:  -> duplicate

___
Python tracker 

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