[issue4096] Lib/lib2to3/*.pickle are shipped / modified in the build

2008-10-10 Thread Matthias Klose

New submission from Matthias Klose <[EMAIL PROTECTED]>:

the files
  Lib/lib2to3/Grammar2.6.0.final.0.pickle
  Lib/lib2to3/PatternGrammar2.6.0.final.0.pickle

are created/modfied during a build/test cycle. Is this expected, should
these be included in the release at all?

--
messages: 74617
nosy: doko
severity: normal
status: open
title: Lib/lib2to3/*.pickle are shipped / modified in the build
type: feature request
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4075] Use WCHAR variant of OutputDebugString

2008-10-10 Thread Ulrich Eckhardt

Ulrich Eckhardt <[EMAIL PROTECTED]> added the comment:

"PythonCE project use xxxA functions for CE .NET 4.20 platform."

Look again. The PythonCE project adds a header and sourcefile
(wince_compatibility.h/c) which adds these functions. In other words, it
doesn't use the xxxA functions of the win32 API (which don't exist under
CE) but its own replacements.

I was thinking of going that way too, but in the end decided against it
unless absolutely necessary. The point is that this approach allowed
minimal changes to the Python code which still had to support the xxxA
variants for win9x. However, since IIRC 2.6 support for win9x has been
dropped, so now it makes much more sense to use the WCHAR APIs which is
what all supported MS Windows versions use internally anyway. This
allows code to work under CE unchanged, avoids unnecessary conversions 
and provides better Unicode support.

BTW: in case somebody actually wants to resurrect the win9x support,
there is a library from Microsoft that provides the xxxW functions for
that platform. Of course that's not a cure but just a band-aid with
reduced functionality, but at least it's possible.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4096] Lib/lib2to3/*.pickle are shipped / modified in the build

2008-10-10 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

They should be present in the installation (and I believe "make install"
will create them).

Whether or not they are included in the source distribution is not
important, IMO. I'm puzzled that they are modifed - this should not
happen, unless something's wrong with the time stamps.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3574] compile() cannot decode Latin-1 source encodings

2008-10-10 Thread STINNER Victor

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

Amaury applied my both patches for issues #2384 and #3975. So all 
tests now pass with python trunk + alt_latin_1.diff.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4089] linking python2.6.dll crash on windows xp

2008-10-10 Thread Manuel

Manuel <[EMAIL PROTECTED]> added the comment:

We have fixed the problem installing this:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en

Anyway, before consider the bug solved, we need to test this solution on
different computers.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4097] Traceback doesn't run back all the way

2008-10-10 Thread STINNER Victor

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

Can you write an example to reproduce your traceback? You don't give 
enough informations to see what is the type of your variable, which 
modules are used, etc.

--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4099] dir on a compiled re does not show pattern as a part of the list

2008-10-10 Thread Bartosz Radaczyński

New submission from Bartosz Radaczyński <[EMAIL PROTECTED]>:

It does not show a few other things that are listed here:
http://www.python.org/doc/2.5.2/lib/re-objects.html

--
components: Regular Expressions
messages: 74632
nosy: bartoszr
severity: normal
status: open
title: dir on a compiled re does not show pattern as a part of the list
type: behavior
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4099] dir on a compiled re does not show pattern as a part of the list

2008-10-10 Thread Amaury Forgeot d'Arc

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

This was corrected on the py3k branch by #3247, r64672.
In this change, each file is independent; some of them could be
backported to the trunk.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4087] Document the effects of NotImplemented on == and !=

2008-10-10 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

2008/10/9 Raymond Hettinger <[EMAIL PROTECTED]>:

> Alternatively, we could decide to allow decimal/float 
> comparisons -- the float can be converted to a decimal
> exactly and compared exactly -- it would be slow but 
> it would work and have precise semantics.

-0

Note that this could lead to surprising behaviours, when doing these
comparations... Decimal("1.1")==1.1 will be true, buy maybe
Decimal("1.235445687")==1.235445687 will not (I didn't try if this
particular comparison will fail, but hope you get the idea).

This is why I suggested the other way... we now allow comparison to
integers, let's allow comparisons when the floats are equal to the
integers, and no more.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-10-10 Thread STINNER Victor

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

About large integers which can not be converted to float (too big!): 
it would be nice if math.log2() and/or math.log10() works which such 
numbers. But it would better if you know if the functions used the FPU 
or not (only integers). Idea:
 - logX(int)->int: don't use FPU
 - logX(float)->float: use FPU
 - logX(int)->float: use FPU

What should be the default type for logX(int)? People expects float 
when using logX().

Note: logX() means math.log(), math.log2() and/or math.log10().

--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4099] dir on a compiled re does not show pattern as a part of the list

2008-10-10 Thread Bartosz Radaczyński

Bartosz Radaczyński <[EMAIL PROTECTED]> added the comment:

Cool.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4089] linking python2.6.dll crash on windows xp

2008-10-10 Thread Manuel

Manuel <[EMAIL PROTECTED]> added the comment:

Yes. This bug can be closed.
The use of python26.dll require last Microsoft Visual C++ 2008
Redistributable Package.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4098] surprised by default list parameter

2008-10-10 Thread Ulrich Eckhardt

Ulrich Eckhardt <[EMAIL PROTECTED]> added the comment:

http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm

The same recently cropped up on the users mailinglist under the topic
"default value in __init__".

--
nosy: +eckhardt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4098] surprised by default list parameter

2008-10-10 Thread Torsten Rottmann

New submission from Torsten Rottmann <[EMAIL PROTECTED]>:

The attached file produced the following result:

__
trott$ python2.5 p6.py
[]
[1234]
__

I expected both times the empty list since the print
statement prints just a defaulted parameter ("e") which
was defaulted to an empty list literal ("[]") and never set
by supplying an actual class parameter.

The object property "entries" appears to be shared by
both instances. Why?

--
components: Build
files: p6.py
messages: 74624
nosy: trott
severity: normal
status: open
title: surprised by default list parameter
type: behavior
versions: Python 2.5, Python 2.5.3, Python 2.6
Added file: http://bugs.python.org/file11761/p6.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4097] Traceback doesn't run back all the way

2008-10-10 Thread pinkisntwell

New submission from pinkisntwell <[EMAIL PROTECTED]>:

I just got an exception and the traceback wouldn't go all the 
way to the statement that threw the exception. I found that out 
by using the debugger.

Contrast the traceback:

http://tinyurl.com/5xglde

with the debugger output (notice the arrow pointing to the last 
statement the traceback showed and how the execution went on 
beyond it):

http://tinyurl.com/3fjgrl

--
components: None
messages: 74621
nosy: pinkisntwell
severity: normal
status: open
title: Traceback doesn't run back all the way
type: behavior
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread roland rehmnert

New submission from roland rehmnert <[EMAIL PROTECTED]>:

xml text fields are not read properly when it is encountered in a
'start' event.

During a 'start'-event elem.text returns None, if the text string cross
a page boundary of the file. (this is platform dependent and a typical
value is 8K (8192 byte)).  



This line cause an error if the page size is 8192.
this is a text where X has position 8192 in the file

In most cases this erroneous behaviour can be avoid when elem.tree
always returns the proper value at the 'end'-event.   


Two files are submitted:
bug.py: An excerpted file that produced an error with the submitted xml
file.

bug.xml: An xml file, a little bit more then 8200 bytes. In can of the
page size is greater than 8K.. file should be enlarged. Important is
however that the text should cross the page boundary. Tags and
attributes and attribute values as well are OK

 
I might have misunderstood the documentation of etree, because there are
situations that I have not tested.
/roland

--
components: Library (Lib)
messages: 74635
nosy: roland
severity: normal
status: open
title: xml.etree.ElementTree does not read xml-text over page bonderies
type: behavior
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread roland rehmnert

Changes by roland rehmnert <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11762/bug.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread roland rehmnert

Changes by roland rehmnert <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11763/bug.xml

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4090] Documenting set comparisons and operations

2008-10-10 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

[Raymond]
> I don't think this is necessary.

I disagree.  I think some sort of warning is necessary;  it doesn't need
to be particularly prominent, but it should be there.

Almost *all* expectations are broken for sets in the absence of
transitivity of equality for the set elements.  Consider the following
(Python 2.6) snippet involving a set s:

>>> s.remove(17)
>>> 17 in s
True

An element is removed from a set s, and yet it's still present after the
removal!  Doesn't this deserve an explanation somewhere?

In case you haven't guessed, here's what s is:

>>> s
set([Fraction(17, 1), Decimal('17')])

Regardless of whether one wants to call this a bug or not, I think it's
sufficiently unintuitive and surprising that it should be documented.

Terry's suggestion and wordings for the reference and library warnings
look good to me.

--
nosy: +marketdickinson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4098] surprised by default list parameter

2008-10-10 Thread Torsten Rottmann

Torsten Rottmann <[EMAIL PROTECTED]> added the comment:

OK. I've read the Python Reference Manual 7.6 "Function Definition".
It "explains" why this happens.

BUT: Why can`t the compiler make a copy of the default object, if
it's mutable (e.g. a list)? This can't be that difficult.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4098] surprised by default list parameter

2008-10-10 Thread Amaury Forgeot d'Arc

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

Yes, the default value expression could be evaluated each time the
function is called without the parameter. But it would be another language.
Default values are computed once, and this is a Python feature.

It can be useful, for example to cache computations, or to achieve
"early binding" in nested functions, as explained in the suggested FAQ.

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4089] linking python2.6.dll crash on windows xp

2008-10-10 Thread Thomas Heller

Changes by Thomas Heller <[EMAIL PROTECTED]>:


--
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4090] Documenting set comparisons and operations

2008-10-10 Thread Raymond Hettinger

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

I'll update the note in the Ref Manual section on comparisons.

The docs on sets, dicts, and other containers need to remain clean.  I
object to littering the docs with these kind of "omg danger" messages. 
For beginners using the docs to learn what a container does, these kind
of notes are hard to understand, raise unnecessary worries about the
robustness of the language, and don't provide actionable information. 
For advanced users like yourselves, it doesn't help either.  All it does
is provide some minimal satisfaction that your favorite annoying oddity
is in the docs.

Also, the set/dict docs are the wrong place to discuss the issue.  They
happen to be the arbitrary tool you chose to demonstrate an issue that
properly relates to comparisons in Python.  Since the very beginning, it
has been possible to create comparisons that violate our mental
invariants for containers.  You can feed a partial or random ordering to
sort.  Mertz has an article on oddities arising from identity versus
equality.  A rich comparison can return a vector but get collapsed into
a boolean by the == operator.  You can get hash functions that don't
correspond to equality, etc.  There are tricks with NaN being identical
to itself but not equal to itself.  If these things get noted at all, it
should be in the docs for numbers and nans or comparisons.  It makes no
sense to try to add a comment to every possible place that has an
equality invariant that can be fooled.  For example, it is not hard to
produce a list example where len(s)==1 and s[0] != x and x in s, just
set x=float('nan') and s=[x].  But, of course, we're not going to
clutter the list docs with this nonsense.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1028088] Cookies without values are silently ignored (by design?)

2008-10-10 Thread John J Lee

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

I was responding to your comment of 2008-10-08 03:08, not to the opening
comment.  I already responded to the opening comment.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1028088] Cookies without values are silently ignored (by design?)

2008-10-10 Thread Andres Riancho

Andres Riancho <[EMAIL PROTECTED]> added the comment:

- Problem: The secure flag of cookies is ignored by the load method.

- Why is it related to this issue? Because the secure flag is a name
without a value:

pie=good; other=thing; secure

- Why is it bad?
Because the RFC says that we should parse it.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4090] Documenting set comparisons and operations

2008-10-10 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

Para 1: Thank you.

Pars 2: I understand and accept your concern.

Para 3. You are right odd comparisons are the root of several problems.
Following you suggestion, let's at least add one blanket,
cover-our-asses warning at the bottom of the comparison section.  Example:

"Warning: if comparisons among container members violate the usual
rules, container operations may give unexpected or anomalous results."

Possibly add "We will not try to document the various possibilities."

I think something at the bottom of lib ref/numbers, possibly pointing to
Nan != Nan (which some users will not know about), would also be a good
idea.



Just to finish Mark's example
>>> s = {fractions.Fraction(17,1), decimal.Decimal(17)}
>>> s-{17}
set()

Subtracting a set with one member removes two members and gives a
different answer than just removing that member.  But this is more an
issue for 4087

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1028088] Cookies without values are silently ignored (by design?)

2008-10-10 Thread John J Lee

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

The Cookie: header does not have a "secure flag" (The Set-Cookie: header
does).

I don't strongly object to the issue identified in the original comment
being fixed.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4087] Document the effects of NotImplemented on == and !=

2008-10-10 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

More sensibility offenders:

>>> s = {fractions.Fraction(17,1), decimal.Decimal(17)}
>>> s-{17}
set()

Removing one thing removes two.

>>> s.remove(17)
>>> 17 in s
True

Removing something leaves it there.

>>> s
{Fraction(17, 1)} # random choice

Removing one thing and subtracting the set with that one thing give
different results.

>>> s = {decimal.Decimal(17), fractions.Fraction(17,1)}
>>> s.remove(17)
>>> s
{Decimal('17')}

The behavior of 'set' s depends on the order items are added.

> Facundo's suggested code:

if isinstance(other, float) and int(other)==other:
other = int(other)

would be more efficient, I assume as

if isinstance(other,float):
ifloat = int(other)
if other == ifloat:
other = ifloat

or if the CAPI has an efficient 'float_isint' function that accesses the
bits of a float, as the C equivalent of 

if isinstance(other, float) and float_isint(other):
other = int(other)

I remember float-Decimal comparison being rejected/deferred in part for
being problematical for fractional values.  That is why I suggested
implementing it, at least for the present, for integral floats (and
Fractions) only, which are relatively easy to detect.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3574] compile() cannot decode Latin-1 source encodings

2008-10-10 Thread Brett Cannon

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

Yep, it passes for me now.

Martin, have any objection to this patch?

--
assignee:  -> loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4101] Missing type in "types" module

2008-10-10 Thread Antoine d'Otreppe

New submission from Antoine d'Otreppe <[EMAIL PROTECTED]>:

Hello

There's a type missing in the standard "types" modules (or I didn't find
it, in what case I apologize for this useless posting)

Consider this code:

---
WrapperDescriptorType = None

class Meta(type):
def __init__(cls, *args, **kwargs):
global WrapperDescriptorType
type.__init__(cls, *args, **kwargs)
WrapperDescriptorType = type(cls.__init__)

class A:
__metaclass__ = Meta
---

I could not find WrapperDescriptorType in types module.

btw, I have to pass this descriptor to another function. But in fact I
don't need the wrapper but the real method. How to get it ?

--
components: Library (Lib)
messages: 74643
nosy: Antoine d'Otreppe
severity: normal
status: open
title: Missing type in "types" module
type: feature request
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4102] sphinx: ansi color even on dumb terminal

2008-10-10 Thread Mikhail Gusarov

New submission from Mikhail Gusarov <[EMAIL PROTECTED]>:

Debian bug #501629 (http://bugs.debian.org/cgi-bin/bugreport.cgi?
bug=501629).

Both sphinx-build and sphinx-quicksetup attempt (and fail) to use ansi
color sequences, even when TERM=dumb (for example, when run from an
emacs shell buffer, or m-x compile.  This produces garbage, like this:

^[[01mSphinx v0.4.2, building linkcheck^[[39;49;00m

While it does look like I can add -N in the generated Makefile, and
thus this is only a wishlist item since I have a workaround - it
really shouldn't generate color unless it has *some* indication that
it might work - even mooching off of $LSCOLORS would be better than
doing it blindly, though it should be enough to look at a TERM or
TERMCAP property - or perhaps indirectly via curses.has_colors() which
does appear to be able to tell "xterm" from "dumb" successfully.

--
messages: 74644
nosy: dottedmag
severity: normal
status: open
title: sphinx: ansi color even on dumb terminal

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

Minimum script to reproduce this issue is "bug.py" I've attached.
And I think this issue can be fixed with
"fix_cross_boundary_on_ElementTree.patch". I'll attach the test case for
this issue as "test.py". (I wanted to intergrate test into
test_xml_etree_c.py, but it uses doctest which I don't know about)

/
// Cause of issue

TreeBuilder#start() and TreeBuilder#end() are handlers driven by
self._parser.feed(data) in iterparse.next(), and iterparse stores
elements returned by these functions.

But element is not initialized at the moment. No one can determine
element.text when start tag is found, and element.tail when end tag is
found vise versa. We can say "the element is initialized" when
encountered next element or TreeBuilder is closed.

So, iterparse's _events queue may contain uninitialized elements, so my
patch waits until the element will be initialized.

--
components: +XML
nosy: +ocean-city
versions: +Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11764/bug.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: 
http://bugs.python.org/file11765/fix_cross_boundary_on_ElementTree.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11766/test.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4103] sphinx: latexwriter uses undefined 'excdescni' environment

2008-10-10 Thread Mikhail Gusarov

New submission from Mikhail Gusarov <[EMAIL PROTECTED]>:

Debian bug#501763
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501763):

when using the autodoc extension similiar to this template:

.. automodule:: mvpa.misc.exceptions
  :members:
  :undoc-members:
  :show-inheritance:
  :noindex:

the generated latex code cannot be compiled, as it uses an undefined
environment.

  ! LaTeX Error: Environment excdescni undefined.

This is supposed to be the corresponding env to 'excdesc' for exception
descriptions that should not end up in the index. It looks like this has
simply been forgotten, as e.g. funcdescni is part of
texinputs/sphinx.sty

Looking at

  http://svn.python.org/projects/doctools/trunk/sphinx/texinputs/
sphinx.sty

I'd say, that the problem is still present in the current SVN trunk.

--
assignee: georg.brandl
components: Documentation
messages: 74646
nosy: dottedmag, georg.brandl
severity: normal
status: open
title: sphinx: latexwriter uses undefined 'excdescni' environment
type: behavior

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4101] Missing type in "types" module

2008-10-10 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

At the moment, we're not adding things to the type module because it may
eventually go away.

Since WrapperDescriptorType implements the descriptor protocol you can
get the __init__ method just by using it.

--
nosy: +benjamin.peterson
resolution:  -> wont fix
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4104] Namespace inconsistency

2008-10-10 Thread Antoine d'Otreppe

New submission from Antoine d'Otreppe <[EMAIL PROTECTED]>:

Hello

See the following code and comments for explanation ;) (Try it with
interactive mode)

---
>>> class A:
... class B:
... pass

>>> A

>>> A.B

>>> B
NameError: B is not defined
---

This seems to be inconsistent, as Python represents A.B as __main__.B,
but B is not accessable from __main__

Maybe this could be better:
---
>>> A.B

  ^
---

--
components: Interpreter Core
messages: 74648
nosy: Antoine d'Otreppe
severity: normal
status: open
title: Namespace inconsistency
type: feature request
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4104] Namespace inconsistency

2008-10-10 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

This is because type_repr looks at the __module__ attribute to determine
the location. Fixing this would probably require adding a
__nestedclass__ attribute. However, nested classes aren't used very
much, so it's not urgent by any means.

--
nosy: +benjamin.peterson
priority:  -> low

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4102] sphinx: ansi color even on dumb terminal

2008-10-10 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4010] configure options don't trickle down to distutils

2008-10-10 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

I don't have rights to derive a new issue.
May be a new new title about distutils and makefile integration is more
appropriate.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4105] Renamed PyGILState_Acquire to PyGILState_Ensure in Docs/c-api/init.rst

2008-10-10 Thread Guilherme Polo

New submission from Guilherme Polo <[EMAIL PROTECTED]>:

I see the comment in Include/pystate.h got fixed, but this other in
Docs/c-api/init.rst didn't

--
files: PyGILState_Acquire=>PyGILState_Ensure.diff
keywords: patch
messages: 74651
nosy: gpolo
severity: normal
status: open
title: Renamed PyGILState_Acquire to PyGILState_Ensure in Docs/c-api/init.rst
versions: Python 2.6, Python 3.0
Added file: 
http://bugs.python.org/file11767/PyGILState_Acquire=>PyGILState_Ensure.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4105] Renamed PyGILState_Acquire to PyGILState_Ensure in Docs/c-api/init.rst

2008-10-10 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Thanks. Fixed in r66874.

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4051] use of TCHAR under win32

2008-10-10 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

For the protocol I attach part for PythonCE-2.5-20061219.patch. Both
patches address UNICODE name clash in Modules/cPickle.c.

For windows programs UNICODE is more commonly used define and may be
python C-code only has to avoid issues like this one.

I couldn't found where python C-code use so called "TCHAR meaning" and
the first sentence from comment in Ulrich patch looks irrelevant to the
issue.

Also Ulrich patch is far from complete "TCHAR" implementation in python.
May be issue title has to be changed to address more precise problem.

Added file: 
http://bugs.python.org/file11768/PythonCE-2.5-20061219-cPickle.c-patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3677] importing from UNC roots doesn't work

2008-10-10 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


--
components: +Windows

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4075] Use WCHAR variant of OutputDebugString

2008-10-10 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

I couldn't find in MSDN flags for Windows CE compilers similar to the
GCC compiler that change representation of strings in C-code. The
Microsoft recommend so called TCHAR technology that depend from UNICODE
define I answer itself.


>From MSDN isn't so clear what is status of CE version 6.0 - R2?. The
documentation of CE 5.0 looks complete, include details for compiler,
migration guide.

About wince_compatibility.h/c - it is just a part of the patch
(PythonCE-2.5-20061219). If we look in the complete patch we see changes
like GetLocaleInfo->GetLocaleInfoA(_localemodule.c) but 
windll.kernel32.GetProcAddress->cdll.coredll.GetProcAddressW
(test_random_things.py). Another change (posixmodule.c)
CRYPTACQUIRECONTEXTA->CRYPTACQUIRECONTEXT.

So we see changes from xxx to xxxA, xxx to xxxW, xxxA to xxx (!).

If this patch required for CE 5.0 ? If not why to change now for may
upcoming 6.0 ?
If the python switch to W functions then the issue will be resolved.
Without general switch to W functions and to wide strings we need to
convert every time from single chat to wide char. Is this acceptable in
general ? (for the particular case yes - the method is called rarely).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems

2008-10-10 Thread A.M. Kuchling

Changes by A.M. Kuchling <[EMAIL PROTECTED]>:


--
assignee:  -> akuchling
nosy: +akuchling

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


Removed file: 
http://bugs.python.org/file11765/fix_cross_boundary_on_ElementTree.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


Added file: 
http://bugs.python.org/file11769/fix_cross_boundary_on_ElementTree_v2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file11766/test.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

2008-10-10 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11770/test_v2.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3799] Byte/string inconsistencies between different dbm modules

2008-10-10 Thread STINNER Victor

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

For information, Python3 trunk fails on:
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_dbm.py", line 157, in test_keys
self.assert_('xxx' not in self.d)
TypeError: gdbm key must be bytes, not str

--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4106] multiprocessing occasionally spits out exception during shutdown

2008-10-10 Thread Skip Montanaro

New submission from Skip Montanaro <[EMAIL PROTECTED]>:

I worked up a simple example of using the external processing module 
(0.52) for a friend at work today.  I noticed some cases where it raised 
exceptions during exit.  Not all the time, but not infrequently either.  
This evening I tweaked it for the 2.6 multiprocessing module's API and 
tried it out.  I ran it in a large loop:

   for i in $(range 500) ; do
   echo '!'$i
   python test_proc.py
   end | egrep '!'

Most of the time all I see are the '!' lines from the echo command.  
Every once in awhile I see a traceback though.  For example:

Exception in thread QueueFeederThread (most likely raised during 
interpreter shutdown):
Traceback (most recent call last):
  File "/Users/skip/local/lib/python2.7/threading.py", line 522, in 
__bootstrap_inner
  File "/Users/skip/local/lib/python2.7/threading.py", line 477, in run
  File "/Users/skip/local/lib/python2.7/multiprocessing/queues.py", line 
233, in _feed
: 'NoneType' object is not callable

This occurred once in approximately 1500 runs of the script (three times 
through the above shell loop).  The script used to trigger this 
exception is attached.

--
components: Library (Lib)
files: test_proc.py
messages: 74656
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: multiprocessing occasionally spits out exception during shutdown
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file11771/test_proc.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4106] multiprocessing occasionally spits out exception during shutdown

2008-10-10 Thread Skip Montanaro

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

Oh, the range command used in the shell for loop is analogous to Python's 
range() builtin function.

___
Python tracker <[EMAIL PROTECTED]>

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