[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2008-10-06 Thread Hirokazu Yamamoto

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

Experimental patch was experimental, wcswidth(3) returns 1 for East
Asian Ambiguous character.

debian:~/python-dev/py3k# ./python /mnt/windows/a.py
  File "/mnt/windows/a.py", line 3
"♪xÅx" abc
 ^
should point 'c'. And another one

debian:~/python-dev/py3k# export LANG=C
debian:~/python-dev/py3k# ./python /mnt/windows/a.py
  File "/mnt/windows/a.py", line 3
"\u266ax\u212bx" abc
 ^
SyntaxError: invalid syntax

Please forget my patch. :-(

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4052] Build on 2.6 on AIX 5.3 fails (syntax error / undeclared identifier subtract)

2008-10-06 Thread Gerard

New submission from Gerard <[EMAIL PROTECTED]>:

I'm using an IBM compiler running in AIX 5.3.
Compilation of Python 2.6 fails (see explanation below).
Compilation of Python 2.5.2 is ok.

/home/xyz/python/Python-2.6$ lslpp -L | grep vac
  vac.C 10.1.0.0C FIBM XL C Compiler
  vac.aix53.lib 10.1.0.0C FXL C for AIX
Libraries for AIX
  vac.include   10.1.0.0C FIBM XL C Compiler Include
  vac.lib   10.1.0.0C FXL C for AIX Libraries
  vac.lic   10.1.0.0C FXL C for AIX Licence
Files
  vacpp.cmp.rte 10.1.0.0C FIBM XL C/C++ Compiler
  vacpp.cmp.tools   10.1.0.0C FIBM XL C/C++ Tools
  vacpp.licAgreement10.1.0.0C FIBM XL C++ Electronic
License
  vacpp.memdbg.aix53.rte10.1.0.0C FIBM XL C/C++ User
Heap/Memory
  vacpp.memdbg.rte  10.1.0.0C FIBM XL C/C++ User
Heap and

Configure --prefix  
runs ok.
Then, make fails:

/home/xyz/python/Python-2.6$ make
cc_r -qlanglvl=extc89 -c  -DNDEBUG -O  -I. -IInclude -I./Include
-I/usr/local/include/  -DPy_BUILD_CORE -o Objects/frameobject.o
Objects/frameobject.c
"Objects/frameobject.c", line 520.9: 1506-046 (S) Syntax error.
"Objects/frameobject.c", line 520.12: 1506-045 (S) Undeclared identifier
subtract.
make: The error code from the last command is 1.

--
components: Build
messages: 74365
nosy: gerard
severity: normal
status: open
title: Build on 2.6 on AIX 5.3 fails (syntax error / undeclared identifier 
subtract)
type: compile error
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2574] Add RFC 3768 SSM Multicast support to "socket"

2008-10-06 Thread T.Morin

T.Morin <[EMAIL PROTECTED]> added the comment:

I've applied the patch to the release26-maint branch, and I was able to
properly compile, run and do some basic testing of the result.

Find attached a patch applying cleanly to SVN release26-maint branch.

--
versions: +Python 2.6 -Python 2.5
Added file: 
http://bugs.python.org/file11709/python-release26maint-multicast-ssm.patch

___
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-06 Thread Ulrich Eckhardt

New submission from Ulrich Eckhardt <[EMAIL PROTECTED]>:

In several places, Python is using TCHAR-based win32 APIs which has 
several consequences:
1. The actually used function depends on the _UNICODE macro, while the 
using code often assumes that this macro is not defined. That means 
that not only the code changes when the macro is defined but that it 
simply breaks.
2. Using the ANSI-variants of functions causes overhead when a Unicode 
string has to be transcoded and possibly data loss, because the ANSI 
encoding can't represent the full Unicode range. Note that I'm 
assuming an NT based system (i.e. NT, win2k etc), because the systems 
where the ANSI encoding is native (win9x, ME(?) etc) have been dropped 
from the supported platforms.
3. The main reason for me wanting a build independent of TCHAR is a 
port to MS Windows CE, which doesn't support the ANSI encoding at all. 
This means that a TCHAR-clean build for desktop win32 is a necessary 
part of the port to CE, but even without the port it would be useful 
to skip the conversion overhead and at the same time gain 
functionality. Concerning the CE port, see this thread as a reference:
http://mail.python.org/pipermail/python-dev/2008-September/082529.html

Note: I'm adding this tracker item mainly in order to attach patches 
for review, so they don't get lost like it's possible on the 
mailinglist.

--
components: Windows
messages: 74363
nosy: eckhardt
severity: normal
status: open
title: use of TCHAR under win32
versions: Python 2.7

___
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-06 Thread Ulrich Eckhardt

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

Add a patch that fixes a warning.

--
keywords: +patch
Added file: 
http://bugs.python.org/file11708/Python-unicode-redefine-warning.0.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4053] str.split unintentionally strips char 'I' from the string

2008-10-06 Thread Govind

New submission from Govind <[EMAIL PROTECTED]>:

I tried to process a text file (with UTF-8 encoding) which has 
contents like this:


FILE=India
asbds
FILE=Indonasia
ssgsds
FILE=Africa
DBGDGDFG

When I use the below code:
>>> f = open("e:\\temp\\file.txt", 'r')
>>> lines = f.readlines()
>>> for line in lines:
if line.startswith("FILE="):
print line.strip("FILE=")


I get output as:
ndia

ndonasia

Africa


I is always stripped if it follows the substring that I want to strip 
off.

Am I doing something wrong here or is this a bug in Python?

-Govind

--
components: Library (Lib)
messages: 74367
nosy: Govind
severity: normal
status: open
title: str.split unintentionally strips char 'I' from the string
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



[issue4054] str.split unintentionally strips char 'I' from the string

2008-10-06 Thread Govind

New submission from Govind <[EMAIL PROTECTED]>:

I tried to process a text file (with UTF-8 encoding) which has 
contents like this:


FILE=India
asbds
FILE=Indonasia
ssgsds
FILE=Africa
DBGDGDFG

When I use the below code:
>>> f = open("e:\\temp\\file.txt", 'r')
>>> lines = f.readlines()
>>> for line in lines:
if line.startswith("FILE="):
print line.strip("FILE=")


I get output as:
ndia

ndonasia

Africa


I is always stripped if it follows the substring that I want to strip 
off.

Am I doing something wrong here or is this a bug in Python?

-Govind

--
files: file.txt
messages: 74368
nosy: Govind
severity: normal
status: open
title: str.split unintentionally strips char 'I' from the string
type: behavior
Added file: http://bugs.python.org/file11710/file.txt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4053] str.split unintentionally strips char 'I' from the string

2008-10-06 Thread STINNER Victor

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

Duplicate of issue4054.

--
nosy: +haypo
resolution:  -> duplicate
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



[issue4054] str.split unintentionally strips char 'I' from the string

2008-10-06 Thread STINNER Victor

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

It's not a bug. Please read the documentation of the split() method:
   http://docs.python.org/library/stdtypes.html#str.split

If you want to get the value after "=", use:
   value = line.split("FILE=", 1)[1]
or:
   value = line[len('FILE='):]
or:
   value = line.partition('FILE=')[2]
or:
   etc.

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



[issue4040] ignored exceptions in generators (regression?)

2008-10-06 Thread Antoine Pitrou

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

This is not specific to generators, this is due to the fact that a lot
of recursion checks have been added all over the place. When an internal
function designed to ignore exceptions (for example
PyErr_GivenExceptionMatches()) encounters such a recursion overflow, it
ignores it and prints it out. Such a function designed to ignore
exceptions can perfectly be called after a recursion overflow has
already happened, and that's what you witness here: the first
RuntimeError is raised, and soon enough that exception is given to
PyErr_GivenExceptionMatches() (perhaps because `for` has to detected
StopIteration's) where the recursion count overflows again
(`__subclasscheck__` can incur recursion so there is a recursion guard),
and the subsequent exception is ignored and printed out.

2.5 doesn't have the problem because many recursion checks have been
added between 2.5 and 2.6.

3.0 doesn't have the problem because its recursion checking code tries
to be smart (but it has other problems).

See the message I've sent to python-dev some time ago:
http://mail.python.org/pipermail/python-dev/2008-August/082106.html

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1597850] Cross compiling patches for MINGW

2008-10-06 Thread rwmjones

rwmjones <[EMAIL PROTECTED]> added the comment:

I'm trying to use this patch to cross-compile Python under
Fedora, using the Fedora-MinGW project
(http://fedoraproject.org/wiki/MinGW)

IMHO the documentation is confusing.  It sounds from the
docs like CC_FOR_BUILD should be the native system
compiler -- eg. all the examples show CC_FOR_BUILD=gcc

But I didn't get very far at all doing that.  It seems that
what you mean is CC_FOR_BUILD=i686-pc-mingw32-gcc (ie. the
cross-compiler).

Also the extra patches added by lkcl are necessary to get
posixmodules.c to compile.  I'm trying 2.5.2 at the moment,
and while I haven't succeeded getting it all compiled yet,
it's very definitely necessary to fix posixmodules.c

--
nosy: +rwmjones

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4018] "for me" installer problem on x64 Vista

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

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

Here is a patch that fixes the problem as proposed. An installer built
with that patch is available from

http://www.dcl.hpi.uni-potsdam.de/home/loewis/u/python-3.0.14158.msi

--
keywords: +patch
Added file: http://bugs.python.org/file11711/vista.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1597850] Cross compiling patches for MINGW

2008-10-06 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton <[EMAIL PROTECTED]> added the comment:

ok.

what's not explained, and isn't clear, is exactly whether you're
supposed to - or even _capable_ of - cross-compiling the _entire_
python sourcecode base with mingw32, or whether you're supposed to
get _just_ the python.exe interpreter, and, maybe if you're lucky,
libpython.a (or libpython.dll - whatever).

i got quite a long way, as you can see, in cross-compiling
posixmodule.c _by mistake_ - before realising that the whole
python sourcecode base is completely inadequately set up for
cross-compiling, but is specialised "hard-coded" to compile
python under msvc _only_.

so, when doing the cross-compile, it was actually being detected
as a _unix_ compile, not a _win32_ compile.

#define WIN32 wasn't even being listened to.

the end result was that entire areas of posixmodule.c were
being compiled when they shouldn't have been.

later, i tried to correctly #define WIN32 (or whatever was
required), only to find that the mingw32 libraries don't
support many of the necessary functions.  for example, it's
assumed that crypto libraries exist, and many other things.

all in all, it didn't go too well :)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4028] Problem compiling the multiprocessing module on sunos5

2008-10-06 Thread Jesse Noller

Changes by Jesse Noller <[EMAIL PROTECTED]>:


--
assignee:  -> jnoller
nosy: +jnoller
priority:  -> normal
versions: +Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3876] multiprocessing does not compile on *BSD and potentialy other systems

2008-10-06 Thread Jesse Noller

Changes by Jesse Noller <[EMAIL PROTECTED]>:


--
assignee:  -> jnoller
nosy: +jnoller
priority:  -> normal

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3876] multiprocessing does not compile on systems which do not define sem_timedwait

2008-10-06 Thread Jesse Noller

Changes by Jesse Noller <[EMAIL PROTECTED]>:


--
title: multiprocessing does not compile on *BSD and potentialy other systems -> 
multiprocessing does not compile on systems which do not define sem_timedwait

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1597850] Cross compiling patches for MINGW

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

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

So what's the status of this? Who is still interested in seeing what
patches considered?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3740] PEP 3121 --- module state is not nul-initalized as claimed in the PEP

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

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

Here is a patch that should fix this.

--
keywords: +needs review, patch
priority: critical -> release blocker
Added file: http://bugs.python.org/file11712/init.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4018] "for me" installer problem on x64 Vista

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

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


--
keywords: +needs review
priority: normal -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1597850] Cross compiling patches for MINGW

2008-10-06 Thread rwmjones

rwmjones <[EMAIL PROTECTED]> added the comment:

I'm very slowly working up a patch here (again 2.5.2).

Since I haven't actually got even python.exe compiled
yet I can't promise anything, but you never know ...

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4014] Python-2.6-py2.6.egg-info contains Alpha reference

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

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

Ok, I have now removed the Alpha designation, in r66814, r66815, and r66816.

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



[issue4018] "for me" installer problem on x64 Vista

2008-10-06 Thread Steve Lee

Steve Lee <[EMAIL PROTECTED]> added the comment:

Works for me on Vista, Not tried on XP.

Seems a reasonable temporary compromise though we are now stopping all
possibility of an 'all' install but as noted there is probably little
need for it when application installers are created.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1202] zlib.crc32() and adler32() return value

2008-10-06 Thread Facundo Batista

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

Let me reopen this, I think we have an issue with this fix.

The conclusion of this discussion so far is that in 3.0 the crc32 will
behave like the standard, which is a good thing (tm), but in 2.6 it will
not: it should return a signed integer. I agree with this outcome!

The documentation for 2.6, the commit message for the fix and what it's
said here states that: "2.6 always returns signed, 2**31...2**31-1 come
back as negative integers."

This is *not* actually happening:

>>> s = "*"*10
>>> print zlib.crc32(s)  # 2.6, 32 bits
-872059092
>>> print zlib.crc32(s)  # 2.6, 64 bits
3422908204

The problem in the code is, IMHO, that the "32b rounding" is being
forced by assigning the result to an int (Modules/zlibmodule.c, line
929), but this "rounding" does not actually work for 64b (because the
int has 64 bit, and even as it's signed, the number stays big and positive).

Thank you!

--
nosy: +facundobatista
resolution: fixed -> 
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4055] Documentation on website is missing section numbers

2008-10-06 Thread Ignacio Vazquez-Abrams

New submission from Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>:

The documentation on the website seems to have lost the numbers
identifying the various sections. It was useful to point a user to e.g.
§3.6.2 of the libref in order to guide them to the string interpolation
documentation. This is now no longer possible, and instead the user must
hunt around for the appropriate section. This is a severe usability hit
against the documentation.

--
assignee: georg.brandl
components: Documentation
messages: 74381
nosy: georg.brandl, ivazquez
severity: normal
status: open
title: Documentation on website is missing section numbers
type: performance
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



[issue2960] bsddb/test/test_replication.py bus error, segfault, assertion error, pass

2008-10-06 Thread Jesús Cea Avión

Jesús Cea Avión <[EMAIL PROTECTED]> added the comment:

Greg, is this issue still pending?. Can we close it?.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3439] math.frexp and obtaining the bit size of a large integer

2008-10-06 Thread Terry J. Reedy

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

To add support to the proposal: there is currently yet another thread on
c.l.p on how to calculate numbits efficiently.  The OP needs it for
prototyping cryptographic algorithms and found Python-level code slower
than he wanted.

--
nosy: +tjreedy

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1202] zlib.crc32() and adler32() return value

2008-10-06 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

An int is 32-bits on all popular platforms.  Anyways i'll double check
things.  What platforms did you run your test on?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4056] :Class: causes exception

2008-10-06 Thread Ian Bicking

New submission from Ian Bicking <[EMAIL PROTECTED]>:

I used a reference like :Class:`something` (note the capitalization) and
got this exception:

Traceback (most recent call last):
  File
"/home/ianb/src/env/lib/python2.4/site-packages/sphinx/__init__.py",
line 135, in main
app.builder.build_update()
  File
"/home/ianb/src/env/lib/python2.4/site-packages/sphinx/builder.py", line
201, in build_update
summary='targets for %d source files that are '
  File
"/home/ianb/src/env/lib/python2.4/site-packages/sphinx/builder.py", line
241, in build
self.write(docnames, updated_docnames, method)
  File
"/home/ianb/src/env/lib/python2.4/site-packages/sphinx/builder.py", line
276, in write
doctree = self.env.get_and_resolve_doctree(docname, self)
  File
"/home/ianb/src/env/lib/python2.4/site-packages/sphinx/environment.py",
line 779, in get_and_resolve_doctree
self.resolve_references(doctree, docname, builder)
  File
"/home/ianb/src/env/lib/python2.4/site-packages/sphinx/environment.py",
line 998, in resolve_references
raise RuntimeError('unknown xfileref node encountered: %s' % node)
RuntimeError: unknown xfileref node encountered: deliverance.rules.Drop

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 74385
nosy: georg.brandl, ianb
severity: normal
status: open
title: :Class: causes exception

___
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-06 Thread Martin v. Löwis

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

Please create a separate tracker item per individual change (or per
group by enourmously similar changes). Each change will be reviewed
separately, and will get accepted or rejected separately.

This specific patch (Python-unicode-redefine-warning) is fine, but I'd
rather wait until after the release of Python 3.0, in order to be able
to merge the changes better into the 3k branch.

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



[issue4052] Build on 2.6 on AIX 5.3 fails (syntax error / undeclared identifier subtract)

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

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

This has been fixed in r66739.

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



[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2008-10-06 Thread Miki Tebeka

New submission from Miki Tebeka <[EMAIL PROTECTED]>:

[21:26] pwd-bug $cat m
#!/usr/bin/env python

from subprocess import Popen
Popen(["./t"], cwd="./p")
[21:26] pwd-bug $cat p/t 
#!/usr/bin/env python

from os import environ
print environ["PWD"]
[21:26] pwd-bug $python m 
/Users/mtebeka/playground/pwd-bug

The output should be /Users/mtebeka/playground/pwd-bug/p

--
messages: 74388
nosy: tebeka
severity: normal
status: open
title: Popen(..., cwd=...) does not set PWD environment variable
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



[issue4058] markup in What's New in 2.6

2008-10-06 Thread Robert Lehmann

New submission from Robert Lehmann <[EMAIL PROTECTED]>:

The markup in the Doc/whatsnew/2.6.rst document is somewhat messy in
some places. I fixed indentation (spaces to tabs -- made some things
readable in the docutils output but not in the source), code samples
("->" notation to Python prompt) and some minor things (which are too
small for issues on their own).

--
assignee: georg.brandl
components: Documentation
files: whatsnew.2.6.patch
keywords: patch
messages: 74389
nosy: georg.brandl, lehmannro
severity: normal
status: open
title: markup in What's New in 2.6
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file11713/whatsnew.2.6.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3740] PEP 3121 --- module state is not nul-initalized as claimed in the PEP

2008-10-06 Thread Benjamin Peterson

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

I'm ok with that patch.

--
keywords:  -needs review
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2744] Fix test_cProfile

2008-10-06 Thread Benjamin Peterson

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

Done in r66817.

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



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

2008-10-06 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file11698/tokenizer_iso-8859-1.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4059] sqlite3 docs incomplete

2008-10-06 Thread Robert Lehmann

New submission from Robert Lehmann <[EMAIL PROTECTED]>:

The sqlite3 documentation misses Row and Cursor.description.
Additionally it does not use the best markup in all places (missing
links, basically, and forgotten .. class:: statements).

A patch is attached.

--
assignee: georg.brandl
components: Documentation
files: sqlite3.patch
keywords: patch
messages: 74392
nosy: georg.brandl, lehmannro
severity: normal
status: open
title: sqlite3 docs incomplete
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file11714/sqlite3.patch

___
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-06 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11716/tokenizer_iso-8859-1-patch3.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-10-06 Thread STINNER Victor

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

benjamin was afraid by the comment /* dirty hack */ in my previous 
comment. After reading tokenizer.c again and again, I can say that the 
fix is correct: the file is closed and then re-opened by fp_setreadl() 
(using io.open()), and so the file cursor goes back to the file start.

Added file: http://bugs.python.org/file11717/tokenizer-coding-3.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-06 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file11677/idle_encoding-2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



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

2008-10-06 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file11715/python3_bytes_filename-3.patch

___
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-06 Thread STINNER Victor

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

My patch version 2 included an "unrelated" fix for the issue2384.

Added file: http://bugs.python.org/file11715/python3_bytes_filename-3.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2744] Fix test_cProfile

2008-10-06 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

Have you verified the numbers? They don't look right to me.

The problem is the 2nd argument of cProfile's constructor has a
different semantic meaning than the one for profile.py. For profile.py,
it is used to set the "bias" (I presume it means the overhead) of the
profiler. But for cProfile, it's the unit (in seconds?) of timer used.

Personally, I have no idea which semantic should be preferred. So
perhaps, the best thing to do for now is remove the second argument from
the cls.profilerclass() call in test_profile.ProfileTest:

class ProfileTest:
...
def do_profiling(cls):
...
prof = cls.profilerclass(timer, 0.001)
...

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2744] Fix test_cProfile

2008-10-06 Thread Benjamin Peterson

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

No, I didn't look too hard at it; I just got it scraping along, so I can
forward port a fix for it. I'll reopen this, so you can take more
action, so you wish. :)

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2744] Fix test_cProfile

2008-10-06 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

Unassigning myself as I don't have the time to fix this properly.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2744] Fix test_cProfile

2008-10-06 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:


--
assignee: alexandre.vassalotti -> 

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-10-06 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11718/json_test.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-06 Thread Trent Mick

New submission from Trent Mick <[EMAIL PROTECTED]>:

Revision 63955 removed a block from configure.in (and effectively from
pyconfig.h.in) having to do with endianness that results in an incorrect
setting for "WORDS_BIGENDIAN" in Universal builds on Mac OS X.

The removed part was this:

> AH_VERBATIM([WORDS_BIGENDIAN], 
> [  
>  /* Define to 1 if your processor stores words with the most
significant byte 
> first (like Motorola and SPARC, unlike Intel and VAX). 
>
> The block below does compile-time checking for endianness on
platforms
> that use GCC and therefore allows compiling fat binaries on OSX by
using
> '-arch ppc -arch i386' as the compile flags. The phrasing was
choosen  
> such that the configure-result is used on systems that don't use
GCC. 
>   */   
> #ifdef __BIG_ENDIAN__  
> #define WORDS_BIGENDIAN 1  
> #else  
> #ifndef __LITTLE_ENDIAN__  
> #undef WORDS_BIGENDIAN 
> #endif 
> #endif])

This used to allow "WORDS_BIGENDIAN" to be correct for all parts of a
universal Python build done via `gcc -arch i386 -arch ppc ...`.

This was originally added for issue 1471883 (see msg50040 for a
discussion of this particular bit).


The result of this bug is that Python extensions using either of the
following to get native byte ordering for UTF-16 decoding:

   PyUnicode_DecodeUTF16(..., byteorder=0);
   PyUnicode_DecodeUTF16Stateful(..., byteorder=0, ...);

on Mac OS X/PowerPC with a universal build built on Intel hardware (most
such builds) will get the wrong byte-ordering.


The fix is to restore that section to configure.in and re-run autoconf
and autoheader.


Ronald,

Was there are particular reason that this block was removed from
configure.in (and pyconfig.h.in)?

I'd like to hear comments from either Ronald or Martin, and then I can
commit the fix.

--
components: Unicode
messages: 74398
nosy: loewis, ronaldoussoren, trentm
severity: normal
status: open
title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC
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



[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-06 Thread Trent Mick

Trent Mick <[EMAIL PROTECTED]> added the comment:

This also shows up in the byte ordering that Python uses to encode utf-16:

$ uname -a
Darwin sphinx 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00
PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc

$ python2.6 -c "import codecs; codecs.open('26.txt', 'w',
'utf-16').write('hi')"
$ od -cx 26.txt
000  377 376   h  \0   i  \0
 fffe68006900
006

$ /usr/bin/python -c "import codecs; codecs.open('system.txt', 'w',
'utf-16').write('hi')"
$ od -cx system.txt
000  376 377  \0   h  \0   i
 feff00680069
006


The BOM here ensures, of course, that this is still valid UTF-16
content, but the difference in behaviour here btwn Python versions might
not be intended.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC

2008-10-06 Thread Marc-Andre Lemburg

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

Does this also affect sys.byteorder and the struct module ?

I think those would be more important to get right than the UTF-16
codec, since this only uses the native byte ordering for increased
performance and compatibility with other OS tools. Since UTF-16 is not
wide-spread on Mac OS X, it's not so much an issue... it would be on
Windows.

--
nosy: +lemburg

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1565525] gc allowing tracebacks to eat up memory

2008-10-06 Thread STINNER Victor

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

Similar issue: issue4034 proposes to be able to set tb.tb_frame=None. 
It's easy to implement this, I can write a patch for this.

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



=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Marc-Andre Lemburg

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

BTW: Does this simplified approach really work for Python on Mac OS X:

On 2008-10-07 00:27, Trent Mick wrote:
>> The block below does compile-time checking for endianness on
> platforms  
>> that use GCC and therefore allows compiling fat binaries on OSX by
> using  
>> '-arch ppc -arch i386' as the compile flags. The phrasing was
> choosen
>> such that the configure-result is used on systems that don't use
> GCC.   

For most other tools that require configure tests regarding endianness
on Mac OS X, the process of building a universal binary goes something
like this:

http://developer.apple.com/opensource/buildingopensourceuniversal.html

ie. you run the whole process twice and then combine the results using
lipo.

--
title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS 
X/PowerPC -> PyUnicode_DecodeUTF16(...,  byteorder=0) gets it wrong on Mac OS 
X/PowerPC

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3758] "make check" suggest a testing target under GNU coding standards

2008-10-06 Thread Brett Cannon

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

2.7 through r66819, 2.6 through r66820, and 3.0 through r66821.

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



=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Trent Mick

Trent Mick <[EMAIL PROTECTED]> added the comment:

> Does this also affect sys.byteorder and the struct module ?

Doesn't seem to affect sys.byteorder:

$ /usr/bin/python -c "import sys; print sys.byteorder"
big
$ python2.6 -c "import sys; print sys.byteorder"
big


> I think those would be more important to get right than the UTF-16
> codec, since this only uses the native byte ordering for increased
> performance and compatibility with other OS tools. Since UTF-16 is not
> wide-spread on Mac OS X, it's not so much an issue...

It is an issue for Python extensions that use that API. For example, it
is the cause of recent Komodo builds not starting Mac OS X/PowerPC
(http://bugs.activestate.com/show_bug.cgi?id=79366) because the PyXPCOM
extension and embedded Python 2.6 build was getting UTF-16 data mixed up
when talking with Mozilla APIs.

 it would be on
> Windows.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4034] traceback attribute error

2008-10-06 Thread STINNER Victor

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

Instead of converting tb_frame attribute to read only, I prefer to 
allow the user to clear the traceback to free some memory bytes. So I 
wrote a different patch.

marge$ ./python
Python 2.7a0 (trunk:66786M, Oct  7 2008, 00:48:32)
>>> try:
...  a
... except:
...  import sys
...  t, v, tb = sys.exc_info()
...
>>> tb

>>> tb.tb_frame

>>> tb.tb_frame=42
>>> tb.tb_frame
42
>>> tb.tb_frame=None
>>>

--
nosy: +haypo
Added file: http://bugs.python.org/file11719/traceback_tb_frame_setter.patch

___
Python tracker <[EMAIL PROTECTED]>

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



=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Trent Mick

Trent Mick <[EMAIL PROTECTED]> added the comment:

> BTW: Does this simplified approach really work for Python on Mac OS X

It works for Python 2.5:

http://svn.python.org/view/*checkout*/python/branches/release25-maint/configure.in?rev=66299

search for "BIGENDIAN".

___
Python tracker <[EMAIL PROTECTED]>

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



=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Trent Mick

Changes by Trent Mick <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file11720/issue4060_macosx_endian.patch

___
Python tracker <[EMAIL PROTECTED]>

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



=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., _=09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Marc-Andre Lemburg

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

On 2008-10-07 00:52, Trent Mick wrote:
> Trent Mick <[EMAIL PROTECTED]> added the comment:
> 
>> BTW: Does this simplified approach really work for Python on Mac OS X
> 
> It works for Python 2.5:
> 
> http://svn.python.org/view/*checkout*/python/branches/release25-maint/configure.in?rev=66299
> 
> search for "BIGENDIAN".

Thanks... didn't see that the settings enables a compile-time check.

--
title: PyUnicode_DecodeUTF16(...,   byteorder=0) gets it wrong on Mac OS 
X/PowerPC -> PyUnicode_DecodeUTF16(...,byteorder=0) gets it wrong on Mac OS 
X/PowerPC

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4061] summing two numbers-strange answer

2008-10-06 Thread Mehmet Yozcu

New submission from Mehmet Yozcu <[EMAIL PROTECTED]>:

I don't know what's wrong but when I write on the IDLE 
2.3+6.3
it gives an answer like 8.596 or similar
when I write on the IDLE
print 2.3+6.3
the answer is 8.6 as I expected
I tried these two commands on the DrPython IDE;the result was the same.

Below, I copy-past everything on the consol screen with detail of my
system configuration. And I ask if someone can help me with this?
Thank you in advance.


[EMAIL PROTECTED]:~$ python
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 2.3+6.3
8.5996
>>> print 2.3+6.3
8.6
>>>

--
messages: 74408
nosy: mhmtyozcu001
severity: normal
status: open
title: summing two numbers-strange answer

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-10-06 Thread STINNER Victor

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

Would it possible to close this issue since os.listdir() is fixed and 
many other related functions (posix, posixpath, ntpath, macpath, etc.) 
are also fixed? I propose to open new issues for new bugs since this 
issue becomes a little big long :)

Eg. see new issues #4035 and #4036!

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4061] summing two numbers-strange answer

2008-10-06 Thread Benjamin Peterson

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

This is a result of poor floating-point precision:

>>> 2.3
2.2998
>>> 6.3
6.2998

See http://docs.python.org/tutorial/floatingpoint.html for more information.

--
nosy: +benjamin.peterson
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



[issue4061] summing two numbers-strange answer

2008-10-06 Thread STINNER Victor

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

Use Decimal to get an exact result:
>>> from decimal import Decimal
>>> print Decimal('2.3') + Decimal('6.3')
8.6

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



[issue3187] os.listdir can return byte strings

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

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

> Would it possible to close this issue since os.listdir() is fixed and 
> many other related functions (posix, posixpath, ntpath, macpath, etc.) 
> are also fixed?

IIUC, these fixes are still not complete: they lack documentation
changes. Of course, it would have been better if the original patches
already contained the necessary documentation and test suite changes.
See msg74271 for what Guido considers the lacking documentation;
you may find that other aspects also need documentation.

As for test cases: it seems that those got waived, in the hurry.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4062] Reference to non-existent __version__ in ast module

2008-10-06 Thread Orestis Markou

New submission from Orestis Markou <[EMAIL PROTECTED]>:

The docs for the ast module refer to a __version__ number, that should track 
the 
Subversion id. 

However, this doesn't exist:

>>>import ast
>>>ast.__version__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute '__version__'

Looking at ast.py, nothing of that sort is there in the first place.

--
assignee: georg.brandl
components: Documentation
messages: 74413
nosy: georg.brandl, orestis
severity: normal
status: open
title: Reference to non-existent __version__ in ast module
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



[issue3187] os.listdir can return byte strings

2008-10-06 Thread STINNER Victor

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

Le Tuesday 07 October 2008 01:13:22 Martin v. Löwis, vous avez écrit :
> IIUC, these fixes are still not complete: they lack documentation
> changes. (...) Of course, it would have been better if the original patches 
> already contained the necessary documentation and test suite changes.

Most (or all) patches include new tests about bytes. Here is a patch for 
os.rst documentation about listdir(), getcwdb() and readlink().

> See msg74271 for what Guido considers the lacking documentation;
> you may find that other aspects also need documentation.

I wrote a long document about bytes for filenames but not only. I'm still 
waiting for some contributors or reviewers:
http://wiki.python.org/moin/Python3UnicodeDecodeError

> As for test cases: it seems that those got waived, in the hurry.

Can you be more precise? Which tests have to be improved/rewritten?

Added file: http://bugs.python.org/file11721/library_os_doc.patch

___
Python tracker <[EMAIL PROTECTED]>

___Index: Doc/library/os.rst
===
--- Doc/library/os.rst  (révision 66821)
+++ Doc/library/os.rst  (copie de travail)
@@ -693,13 +693,13 @@
 
 .. function:: getcwd()
 
-   Return a bytestring representing the current working directory.
+   Return a string representing the current working directory.
Availability: Unix, Windows.
 
 
-.. function:: getcwdu()
+.. function:: getcwdb()
 
-   Return a string representing the current working directory.
+   Return a bytestring  representing the current working directory.
Availability: Unix, Windows.
 
 
@@ -801,8 +801,10 @@
``'..'`` even if they are present in the directory. Availability:
Unix, Windows.
 
-   On Windows NT/2k/XP and Unix, if *path* is a Unicode object, the result 
will be
-   a list of Unicode objects.
+   If *path* is a Unicode object, the result will be a list of Unicode objects.
+   If a filename can not be decoded to unicode, it is skipped. If *path* is a
+   bytes string, the result will be list of bytes objects included files
+   skipped by the unicode version.
 
 
 .. function:: lstat(path)
@@ -916,7 +918,9 @@
be converted to an absolute pathname using 
``os.path.join(os.path.dirname(path),
result)``.
 
-   If the *path* is a Unicode object, the result will also be a Unicode object.
+   If the *path* is an Unicode object, the result will also be a Unicode object
+   and may raise an UnicodeDecodeError. If the *path* is a bytes object, the
+   result will be a bytes object.
 
Availability: Unix.
 
___
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-06 Thread Brett Cannon

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

So I tried the patch (I attached my version with different comments in
the header file and removed some redundant change in whitespacing), and
test_sys consistently fails for me:

 test_current_frames (__main__.SysModuleTest)
 AssertionError: '' != 'g456()'

And this is after a ``make distclean`` and a new compile. This failure
doesn't occur on a clean checkout made after a 'distclean'.

--
assignee: brett.cannon -> 

___
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-06 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11722/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



[issue4061] summing two numbers-strange answer

2008-10-06 Thread Mehmet Yozcu

Mehmet Yozcu <[EMAIL PROTECTED]> added the comment:

Dear Victor Stinner;
Thank you very much for your answer. That was very helpful
Best Wishes

2008/10/7 STINNER Victor <[EMAIL PROTECTED]>:
>
> STINNER Victor <[EMAIL PROTECTED]> added the comment:
>
> Use Decimal to get an exact result:
 from decimal import Decimal
 print Decimal('2.3') + Decimal('6.3')
> 8.6
>
> --
> nosy: +haypo
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4061] summing two numbers-strange answer

2008-10-06 Thread Mehmet Yozcu

Mehmet Yozcu <[EMAIL PROTECTED]> added the comment:

Dear Benjamin Peterson;
Thank you very much for your answer. That was very helpful
Best Wishes

2008/10/7 Benjamin Peterson <[EMAIL PROTECTED]>:
>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> This is a result of poor floating-point precision:
>
 2.3
> 2.2998
 6.3
> 6.2998
>
> See http://docs.python.org/tutorial/floatingpoint.html for more information.
>
> --
> nosy: +benjamin.peterson
> resolution:  -> invalid
> status: open -> closed
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4061] summing two numbers-strange answer

2008-10-06 Thread Raymond Hettinger

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

FWIW, what you're seeing is related to "representation error" not "poor
precision".  The numbers 2.3, 6.3, and 8.6 cannot be exactly represented
in binary floating point.  When you think about it, this is no more
surprising than knowing the fractions 1/3 and 2/3 cannot be exactly
represented in either decimal or binary floating point.

--
nosy: +rhettinger

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4061] summing two numbers-strange answer

2008-10-06 Thread Benjamin Peterson

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

On Mon, Oct 6, 2008 at 8:54 PM, Raymond Hettinger
<[EMAIL PROTECTED]> wrote:
>
> Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
>
> FWIW, what you're seeing is related to "representation error" not "poor
> precision".  The numbers 2.3, 6.3, and 8.6 cannot be exactly represented
> in binary floating point.  When you think about it, this is no more
> surprising than knowing the fractions 1/3 and 2/3 cannot be exactly
> represented in either decimal or binary floating point.

Please excuse my poor terminology!

___
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-06 Thread Skip Montanaro

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

I checked in r66823 to add the -R flag extraction like Brett's -L
extraction.  I'll leave the issue open while folks discuss Roumen's
proposal.  I have no particular desire to delve deeper into 
distutils.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3895] _lsprof issue

2008-10-06 Thread Benjamin Peterson

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

Forward ported in r66827.

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



[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-10-06 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

The patch looks good to me. 

You may want to fix the refleak in the PyList_Append() calls (I counted
4) too:

if (PyList_Append(chunks, chunk)) {
goto bail;
}

should be:

if (PyList_Append(chunks, chunk)) {
Py_DECREF(chunk);
goto bail;
}

Also, line 384 and 548:

Py_DECREF(chunks);
chunks = NULL;

should changed to

Py_CLEAR(chunks);

--
nosy: +alexandre.vassalotti

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4029] Documentation displays incorrectly in iexplore.

2008-10-06 Thread David W. Lambert

David W. Lambert <[EMAIL PROTECTED]> added the comment:

I installed google chrome.  The manual display is absolutely beautiful.

Thanks for your good work!

Proofreader Dave.

___
Python tracker <[EMAIL PROTECTED]>

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



=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., _=09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

2008-10-06 Thread Ronald Oussoren

Ronald Oussoren <[EMAIL PROTECTED]> added the comment:

The issue was introduced while moving universal-binary specific trickery 
from pyconfig.h.in to a separate header file. Obviously I must have been 
drunk at the time, because I didn't move the WORDS_BIGENDIAN bits 
correctly.

The attached patch in "pymacconfig.h.patch" adds detection of 
WORDS_BIGENDIAN to pymacconfig.h, the header where the other pyconfig.h 
overrides for universal builds are as well.

Background: this work was done while adding support for 4-way universal 
builds, that is x86, x86_64, ppc and ppc64. This required many more 
updates to pyconfig.h, most of which couldn't be done in a clean 
platform-independent way. That's why I (tried to) move the setting of 
pyconfig.h values that are affected by the current architecture to 
Include/pymacconfig.h.

NOTE: I haven't tested my patch yet, I'll do a full test round later 
today.

Added file: http://bugs.python.org/file11723/pymacconfig.h.patch

___
Python tracker <[EMAIL PROTECTED]>

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