[issue3909] Building PDF documentation from tex files

2008-10-03 Thread Winfried Plappert

Winfried Plappert <[EMAIL PROTECTED]> added the comment:

Now that the official PDF documentation is released for download on the
website - including TOC and Index for every major document, the question
arises: what is the difference between the 'official' built and my
'private' built since some of my documents still missing the TOC and the
index? Is it the pdflatex version? The underlying OS or modified control
files? 
I have used the official 2.6 tar ball as a base fpr my experiments,
including the released sphinx version etc... Any ideas?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4024] float(0.0) singleton

2008-10-03 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Will it correctly distinguish between +0.0 and -0.0?

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



[issue4025] C99 comments in Python 2.6 break build on AIX 6.1

2008-10-03 Thread David Jones

New submission from David Jones <[EMAIL PROTECTED]>:

Doing a plan "configure" then "make"; the compilation breaks due to // 
style comments in a file called Objects/frameobject.c:

cc_r -qlanglvl=extc89 -c  -DNDEBUG -O  -I. -IInclude -I./Include   -
DPy_BUILD_CORE -o Objects/frameobject.o Objects/frameobject.c
"Objects/frameobject.c", line 520.9: 1506-046 (S) Syntax error.

Full transcript attached.

Furthermore, attempting to select a more permissive (better?) compiler, 
with "CC=c99 ./configure --without-gcc" for example, doesn't work 
because of the bug reported in http://bugs.python.org/issue1633863 (CC 
is ignored).  I will comment separately in that issue.

It is my understanding (per my blog article 
http://drj11.wordpress.com/2008/10/02/python-and-bragging-about-c89/ ) 
that the code is now c89 clean (or at least as clean as «gcc -std=c89 -
Werror» can make it.  That means you should be able to close this bug 
fairly quickly. :)

After I've hacked the configure script the build still fails, but for 
different reasons.  I'll file another bug for that.

--
components: Interpreter Core
files: py26aix61script1
messages: 74229
nosy: drj
severity: normal
status: open
title: C99 comments in Python 2.6 break build on AIX 6.1
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file11687/py26aix61script1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1633863] AIX: configure ignores $CC

2008-10-03 Thread David Jones

David Jones <[EMAIL PROTECTED]> added the comment:

This is still a problem for Python 2.6 on AIX 6.1.

The simplest fix is to change «CC=cc_r» to «CC=${CC:-xlc_r}» but I have no 
idea how to go about changing the configure script.

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



[issue4026] fcntl extension fails to build on AIX 6.1

2008-10-03 Thread David Jones

New submission from David Jones <[EMAIL PROTECTED]>:

After hacking the configure script to work around the issues 
http://bugs.python.org/issue4025 and http://bugs.python.org/issue1633863 
the build still fails:

building 'fcntl' extension
xlc_r -DNDEBUG -O -I. -I/home/u0006584/Python-2.6/./Include -I. -
IInclude -I./Include -I/home/u0006584/Python-2.6/Include -
I/home/u0006584/Python-2.6 -c /home/u0006584/Python-
2.6/Modules/fcntlmodule.c -o build/temp.aix-6.1-
2.6/home/u0006584/Python-2.6/Modules/fcntlmodule.o
./Modules/ld_so_aix xlc_r -bI:Modules/python.exp build/temp.aix-6.1-
2.6/home/u0006584/Python-2.6/Modules/fcntlmodule.o -o build/lib.aix-6.1-
2.6/fcntl.so
ld: 0711-317 ERROR: Undefined symbol: .flock
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.
*** WARNING: renaming "fcntl" since importing it failed:0509-022 
Cannot load module build/lib.aix-6.1-2.6.
0509-026 System error: A file or directory in the path name does 
not exist.
error: No such file or directory
make: 1254-004 The error code from the last command is 1.

(Full transcript attached)

I'm mystified and I can't log in to the AIX box right now.

This does not appear to be the same as http://bugs.python.org/issue1756343 and 
http://bugs.python.org/issue1694442 which both appear to be the same, 
but documenting a differen AIX build problem.

--
files: py26aix61script2
messages: 74231
nosy: drj
severity: normal
status: open
title: fcntl extension fails to build on AIX 6.1
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file11688/py26aix61script2

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4025] C99 comments in Python 2.6 break build on AIX 6.1

2008-10-03 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Christian, I guess it's all fixed now?

--
assignee:  -> christian.heimes
nosy: +christian.heimes, georg.brandl
resolution:  -> fixed
status: open -> pending

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4027] wrong page index number in reference book of python documentation

2008-10-03 Thread Ray Wang

New submission from Ray Wang <[EMAIL PROTECTED]>:

the Glossary's index number is 3, which should be 75,
so people could not navigate "Glossary" by clicking the title showed in
Table of Content, or index link which is beside the content in Evince.

--
assignee: georg.brandl
components: Documentation
files: ref.png
messages: 74233
nosy: georg.brandl, ray
severity: normal
status: open
title: wrong page index number in reference book of python documentation
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file11689/ref.png

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3932] HTMLParser cannot handle '&' and non-ascii characters in attribute names

2008-10-03 Thread yanne

Changes by yanne <[EMAIL PROTECTED]>:


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



[issue3932] HTMLParser cannot handle '&' and non-ascii characters in attribute names

2008-10-03 Thread yanne

yanne <[EMAIL PROTECTED]> added the comment:

It seems that I managed to upload wrong test file the first time.

This attached test should fail, I tested it with Python2.6 final both on
Linux and Windows.

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



[issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd()

2008-10-03 Thread STINNER Victor

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

Le Friday 03 October 2008 04:44:13 Benjamin Peterson, vous avez écrit :
> You're patch looks pretty good. Could you write tests for it, though?

My patch doesn't work, that's why I don't write unit test :-)
 - os.getcwdu() was correctly replaced
 - getcwdu() was also replaced
 - but not "from os import getcwdu"

Since most people use os.getcwdu(), and that 2to3 is unable to make sure that 
getcwdu() comes from os or is an user defined module, I prefer to only keep 
the first fixer (os.getcwdu() => os.getcwd()). The new patch include a test.

(Let's try Roundup by email using an attachment :-))

Added file: http://bugs.python.org/file11691/fix_getcwdu-2.patch

___
Python tracker <[EMAIL PROTECTED]>

___Index: Lib/lib2to3/fixes/fix_getcwdu.py
===
--- Lib/lib2to3/fixes/fix_getcwdu.py(révision 0)
+++ Lib/lib2to3/fixes/fix_getcwdu.py(révision 0)
@@ -0,0 +1,19 @@
+"""
+Fixer that changes os.getcwdu() to os.getcwd().
+"""
+# Author: Victor Stinner
+
+# Local imports
+from .. import fixer_base
+from ..fixer_util import Name
+
+class FixGetcwdu(fixer_base.BaseFix):
+
+PATTERN = """
+  power< 'os' trailer< dot='.' name='getcwdu' > trailer< '(' [any] 
')' > >
+  """
+
+def transform(self, node, results):
+name = results["name"]
+name.replace(Name("getcwd", prefix=name.get_prefix()))
+

Modification de propriétés sur Lib/lib2to3/fixes/fix_getcwdu.py
___
Nom : svn:eol-style
   + native

Index: Lib/lib2to3/tests/test_fixers.py
===
--- Lib/lib2to3/tests/test_fixers.py(révision 66750)
+++ Lib/lib2to3/tests/test_fixers.py(copie de travail)
@@ -3576,7 +3576,20 @@
 a = """class m(a, arg=23, metaclass=Meta): pass"""
 self.check(b, a)
 
+class Test_getcwdu(FixerTestCase):
 
+fixer = 'getcwdu'
+
+def test_import(self):
+b = """import os
+cwd = os.getcwdu()
+print "cwd=%s" % cwd"""
+a = """import os
+cwd = os.getcwd()
+print "cwd=%s" % cwd"""
+self.check(b, a)
+
+
 if __name__ == "__main__":
 import __main__
 support.run_all_tests(__main__)
___
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-03 Thread STINNER Victor

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

Le Friday 03 October 2008 03:45:44 Amaury Forgeot d'Arc, vous avez écrit :
> Here is a patch for Windows: (...)
> test_ntpath also runs functions with bytes.

Which charset is used when you use bytes filename? I read somewhere that it's 
the "current codepage". How can the user get this codepage in Python? I ask 
this to complete my document:
  http://wiki.python.org/moin/Python3UnicodeDecodeError

Don't hesitate to edit directly the document, which may also be moved to 
Python3 Doc/ directory.

You should also support bytearray() in ntpath:
   isinstance(path, (bytes, bytearray))

The unit tests might use pure unicode on Windows and bytes on Linux, 
especially getcwd() vs getcwdb().

I don't have Windows nor Mac to test bytes filenames on these systems.

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

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

> Which charset is used when you use bytes filename?

It's the "ANSI" code page, which is a system-wide admin-modifiable
indirection to some real code page (changing it requires a reboot).
In the API, it's referred to as CP_ACP. It's also related to the
"multi-byte" API, which has caused Mark Hammond to call the codec
invoking it "mbcs" (IOW, "mbcs" is always the codec name for the
file system encoding). The specific code page that CP_ACP denotes
can be found with locale.getpreferredencoding(). Using that codec
name (which might be e.g. "cp1252") is different from using "mbcs",
as that goes through a regular (table-driven) Python codec. In
particular, the Python codec will report errors, whereas the "mbcs"
codec will find replacement characters.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4019] 2.6 (final) uses old icons in Start Menu

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

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

Thanks for pointing that out. I rebuilt the icons file on my build
machine, so future releases should pick up the new icons.

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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread Antoine Pitrou

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

> You should also support bytearray() in ntpath:
>isinstance(path, (bytes, bytearray))

The most generic way of allowing all bytes-alike objects is to write:
path = bytes(path)

It raises a TypeError if `path` can't export a read-only buffer of
contiguous bytes; also, it is a no-op if `path` is already a bytes
object, so very cheap in the common case.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3932] HTMLParser cannot handle '&' and non-ascii characters in attribute names

2008-10-03 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

I've tracked down the cause to the .unescape(...) method in HTMLParser.
The replaceEntities function passed to re.sub() always returns a unicode
character, even when matching string s is a byte string. Changing line
383 to:

  return self.entitydefs[s].encode("utf-8")

makes the test pass. Unfortunately this is obviously not a viable
solution in the general case. The problem is that there is no way to
know what character set to encode in without knowing both the HTTP
headers (which are not available to HTMLParser) and looking at the XML
and HTML headers.

Python 3.0 implicitly rejects non-unicode strings right at the start of
html.parser.HTMLParser.feed(...) by adding '' to the data passed in.

Given Python 3.0's behaviour, the docs should perhaps be updated to say
HTMLParser does not support non-unicode strings? If it should support
byte strings, we'll have to figure out how to handle encoded entity issues.

It's a bit weird that character and entity references outside
tags/attributes result in calls to .entityref(...) and .charref(...)
while those inside get unescape called automatically. Don't really see
what can be done about that though.

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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread STINNER Victor

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

> The most generic way of allowing all bytes-alike objects is to write:
> path = bytes(path)

If you use that, any unicode may fails and the function will always return 
unicode. The goal is to get:
  func(bytes)->bytes
  func(bytearray)->bytes (or maybe bytearray, it doesn't matter)
  func(unicode)->unicode

___
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-03 Thread Antoine Pitrou

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

Le vendredi 03 octobre 2008 à 11:43 +, STINNER Victor a écrit :
> STINNER Victor <[EMAIL PROTECTED]> added the comment:
> 
> > The most generic way of allowing all bytes-alike objects is to write:
> > path = bytes(path)
> 
> If you use that, any unicode may fails and the function will always return 
> unicode. The goal is to get:
>   func(bytes)->bytes
>   func(bytearray)->bytes (or maybe bytearray, it doesn't matter)
>   func(unicode)->unicode

Then make it:

path = path if isinstance(path, str) else bytes(path)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4024] float(0.0) singleton

2008-10-03 Thread lplatypus

lplatypus <[EMAIL PROTECTED]> added the comment:

No it won't distinguish between +0.0 and -0.0 in its present form,
because these two have the same value according to the C equality
operator.  This should be easy to adjust, eg we could exclude -0.0 by
changing the comparison
if (fval == 0.0)
into 
static double positive_zero = 0.0;
...
if (!memcmp(&fval, &positive_zero, sizeof(double)))

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4024] float(0.0) singleton

2008-10-03 Thread STINNER Victor

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

We need maybe more hardcoded floats. I mean a "cache" of current 
float. Example of pseudocode:

def cache_float(value):
   return abs(value) in (0.0, 1.0, 2.0)

def create_float(value):
   try:
  return cache[value]
   except KeyError:
  obj = float(value)
  if cache_value(value):
 cache[value] = obj
  return obj

Since some (most?) programs don't use float, the cache is created on 
demand and not at startup.

Since the goal is speed, only a benchmark can answer to my question 
(is Python faster using such cache) ;-) Instead of cache_float(), an 
RCU cache might me used.

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



[issue4024] float(0.0) singleton

2008-10-03 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Please use copysign(1.0, fval) == 1.0 instead of your memcpy trick. It's
the cannonical way to check for negative zero. copysign() is always
available because we have our own implementation if the platform doesn't
provide one. We might also want to special case 1.0 and -1.0.

I've to check with Guido and Barry if we can get the optimization into
2.6.1 and 3.0.1. It may have to wait until 2.7 and 3.0.

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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread STINNER Victor

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

path=path is useless most of the code (unicode path), this code is 
faster if both cases (bytes or unicode)!
   if not isinstance(path, str):
  path = bytes(path)

* a if b else c: unicode=0.756730079651; bytes=1.93071103096
* if test: path=...: unicode=0.681571006775; bytes=1.88843798637

___
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-03 Thread Ralph Corderoy

Ralph Corderoy <[EMAIL PROTECTED]> added the comment:

The patchcheck target isn't in .PHONY at the end of the file.

___
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-03 Thread JB Robertson

New submission from JB Robertson <[EMAIL PROTECTED]>:

Hello,

there's some issues compiling the multiprocessing module on the SunOS I
have here, where CMSG_LEN, CMSG_ALIGN, CMSG_SPACE and sem_timedwait are
absent.

$ uname -av
SunOS xxx 5.9 Generic_117171-15 sun4u sparc SUNW,Sun-Fire-V440

it looks like simply defining the first three macros like this works:
#ifndef CMSG_SPACE
#   define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct
cmsghdr))+CMSG_ALIGN(len))
#endif

#ifndef CMSG_ALIGN
#   ifdef __sun__
#   define CMSG_ALIGN _CMSG_DATA_ALIGN
#   else
#   define CMSG_ALIGN(len) (((len)+sizeof(long)-1) & ~(sizeof(long)-1))
#   endif
#endif

#ifndef CMSG_LEN
#   define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr))+(len))
#endif

(from http://mailman.videolan.org/pipermail/vlc-devel/2006-May/024400.html )

and setting HAVE_SEM_TIMEDWAIT=0 in setup.py does the trick for the last
one.  Presumably, adding something like 

elif platform.startswith('sunos5'):
macros = dict(
HAVE_SEM_OPEN=1,
HAVE_SEM_TIMEDWAIT=0,
HAVE_FD_TRANSFER=1
)
libraries = ['rt']

in setup.py should work, but I have no other SunOS machines to test this on.

thanks

--
components: Extension Modules
messages: 74248
nosy: jr244
severity: normal
status: open
title: Problem compiling the multiprocessing module on sunos5
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



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

2008-10-03 Thread Steve Lee

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

I spotted the problem on Vista Home Premium SP1 32bit

As John indicates the problem with the 'all users' install is that it
requires elevation to run as admin even if logged in as an
administrator. That is rather non obvious (John suggests running cmd.exe
as administrator which works fine). As most people doing it will be
developers and have own machine it is not a big issue (assuming use
py2exe, eggs etc. is used for end user setup ;-)) Oh I wonder if the
same problem exists there?

I ran into SxS problems on XP when building Python 2.5.? from source for
use in Mozilla XULRunner and needed to use VC8 Express for both (so same
CRT).  I moved on so never fully resolved it apart from dropping copies
of the CRT in various system folders.

___
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-03 Thread Steve Lee

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

The mozilla bug is https://bugzilla.mozilla.org/show_bug.cgi?id=371359
but looking at it now, especially comment 4, it's not much help.

___
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-03 Thread David W. Lambert

New submission from David W. Lambert <[EMAIL PROTECTED]>:

I use IEXPLORE version 6.0.2900.2180.xpsp_sp2_gdr.-70227-2254CO 
without any known customizations and have observed 3 display 
problems.  (And since I guess that the python html libraries generated 
the manuals, could these libraries be improved?)

1) The browser ties underscores together into an underline making them 
hard to count.

2) The horizontal position of the quick links depends on the browser 
window width.  Very narrow and they hide themselves beyond the right 
window edge.  Sufficiently wide and they fit into the left margin 
where they sensibly belong.  At a comfortable reading width they 
overlap the text.  See picture.

3) The "print" function heading displays incorrectly.  Please view the 
attached picture.  Backslashes seem to display correctly elsewhere in 
the various normal texts throughout the documents.  Also the space 
character would be more obvious in a fixed width font.

Thanks,
Dave.

--
assignee: georg.brandl
components: Documentation
files: linksCanOverlapText.bmp
messages: 74251
nosy: LambertDW, georg.brandl
severity: normal
status: open
title: Documentation displays incorrectly in iexplore.
versions: Python 3.0
Added file: http://bugs.python.org/file11692/linksCanOverlapText.bmp

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4030] msi installer does not requires UAC permission on Vista

2008-10-03 Thread Manatsawin Hanmongkolchai

New submission from Manatsawin Hanmongkolchai <[EMAIL PROTECTED]>:

Hello, the Python 2.6 installer on Vista does not requires UAC
permission thus does not work with "install for All user" option.

The installer said: You do not have sufficient privilleges to completes
the installation for all users of the machine. Log on as administrator
and then retry this installation.

--
components: Installation
messages: 74252
nosy: willwill
severity: normal
status: open
title: msi installer does not requires UAC permission on Vista
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



[issue4030] msi installer does not requires UAC permission on Vista

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

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

See the "Vista Note" on

http://www.python.org/download/releases/2.6/

Closing as "won't fix".

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



[issue4022] 2.6 dependent on c:\python26\ on windows

2008-10-03 Thread Koen van de Sande

Koen van de Sande <[EMAIL PROTECTED]> added the comment:

Have you tried restarting your machine after installing the Visual C++ 
runtime from Microsoft? These runtimes will sometimes only finish 
installing after a reboot. Also, putting them in System/System32 is not 
"allowed" by MSVCR90.dll, either it goes into your application folder 
(together with a .manifest file), or into the WinSXS folder.

--
nosy: +koen

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

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

I've committed sys.setfilesystemencoding as r66769.

Declaring it as a documentation issue now. Not sure whether it should
remain a release blocker; IMO, the documentation can still be produced
after the release.

--
assignee: loewis -> georg.brandl
components: +Documentation -Library (Lib)
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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Reducing priority to critical, it's just docs and tweaks from here.

 You should also support bytearray() in ntpath:
>isinstance(path, (bytes, bytearray))

No, you shouldn't.  I changed my mind on this several times and in the
end figured it's good enough to just support bytes and str instances.

Amaury: I've reviewed your patch and ran test_ntpath.py on a Linux box.
 I get this traceback:

==
ERROR: test_relpath (__main__.TestNtpath)
--
Traceback (most recent call last):
  File "Lib/test/test_ntpath.py", line 188, in test_relpath
tester('ntpath.relpath("a")', 'a')
  File "Lib/test/test_ntpath.py", line 22, in tester
gotResult = eval(fn)
  File "", line 1, in 
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
530, in relpath
start_list = abspath(start).split(sep)
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
499, in abspath
path = join(os.getcwd(), path)
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
137, in join
if b[:1] in seps:
TypeError: 'in ' requires string as left operand, not bytes
--

The fix is to change the fallback abspath to this code:

def abspath(path):
"""Return the absolute version of a path."""
if not isabs(path):
if isinstance(path, bytes):
cwd = os.getcwdb()
else:
cwd = os.getcwd()
path = join(cwd, path)
return normpath(path)

Once you fix that please check it in!

--
priority: release blocker -> critical

___
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-03 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Assigning to Amaury for Windows fix first.

--
assignee: georg.brandl -> 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



[issue4031] 08 value popups an stdin error, no date handle allowed

2008-10-03 Thread patricio

New submission from patricio <[EMAIL PROTECTED]>:

a = 08
 print a
 File"",line 1
 a = 08
  <
 syntax error:invalid token

(if I use 07, the 0 is supressed but it compiles & display the 7)

--
messages: 74258
nosy: pgimelli
severity: normal
status: open
title: 08 value popups an stdin error, no date handle allowed
type: compile error
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



[issue4031] 08 value popups an stdin error, no date handle allowed

2008-10-03 Thread Tim Gordon

Tim Gordon <[EMAIL PROTECTED]> added the comment:

By prefixing a number with 0, you're actually using octal rather than 
decimal (i.e., only digits 0 to 7 are valid).  For example, try:

 >>> print 030
24
 >>> print 077
63

patricio wrote:
> New submission from patricio <[EMAIL PROTECTED]>:
>
> a = 08
>  print a
>  File"",line 1
>  a = 08
>   <
>  syntax error:invalid token
>
> (if I use 07, the 0 is supressed but it compiles & display the 7)
>
> --
> messages: 74258
> nosy: pgimelli
> severity: normal
> status: open
> title: 08 value popups an stdin error, no date handle allowed
> type: compile error
> versions: Python 2.5
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
> ___
> New-bugs-announce mailing list
> [EMAIL PROTECTED]
> http://mail.python.org/mailman/listinfo/new-bugs-announce
>
>

--
nosy: +QuantumTim

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4031] 08 value popups an stdin error, no date handle allowed

2008-10-03 Thread Tim Gordon

Tim Gordon <[EMAIL PROTECTED]> added the comment:

Whoops, I thought the tracker automatically removed quoted text! :z

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4024] float(0.0) singleton

2008-10-03 Thread Raymond Hettinger

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

I question whether this should be done at all.  Making the creation of a
float even slightly slower is bad.  This is on the critical path for all
floating point intensive computations.  If someone really cares about
the memory savings, it is not hard take a single in instance of float
and use it everywhere:  ZERO=0.0; arr=[ZERO if x == 0.0 else x for x in
arr].  That technique also works for 1.0 and -1.0 and pi and other
values that may commonly occur in a particular app.  Also, the technique
is portable to implementations other than CPython.  I don't mind this
sort of optimization for immutable containers but feel that floats are
too granular.  Special cases aren't special enough to break the rules. 
If the OP is insistent, then at least this should be discussed with the
numeric community who will have a better insight into whether the
speed/space trade-off makes sense in other applications beyond the OP's
original case.

Tim, any insights?

--
assignee: christian.heimes -> tim_one
nosy: +rhettinger, tim_one

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4031] 08 value popups an stdin error, no date handle allowed

2008-10-03 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[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



[issue2532] file that breaks 2to3 (despite being correct python)

2008-10-03 Thread Collin Winter

Collin Winter <[EMAIL PROTECTED]> added the comment:

Fixed in r66775.

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



[issue3358] 2to3 Iterative Wildcard Matching

2008-10-03 Thread Collin Winter

Collin Winter <[EMAIL PROTECTED]> added the comment:

Applied as r66775. I used the example file from issue2532 as test data.

Thanks for the patch, Nick!

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



[issue3260] fix_imports does not handle intra-package renames

2008-10-03 Thread Collin Winter

Changes by Collin Winter <[EMAIL PROTECTED]>:


--
assignee: collinwinter -> 

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1706863] Failed to build Python 2.5.1 with sqlite3

2008-10-03 Thread Hirokazu Yamamoto

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

I've committed "fix_sqlite3_setup_error.patch" in r66766. I think the
problem disutils cannot recognize .dll.a as library on cygwin is another
issue, so I'll open new tracker item.

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



[issue4032] disutils cannot recognize ".dll.a" as library on cygwin

2008-10-03 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto <[EMAIL PROTECTED]>:

This issue is derived from issue1706863.

--
components: Distutils
messages: 74265
nosy: amaury.forgeotdarc, ghaering, jlt63, ocean-city, rpetrov, tan2, 
vitalyy2000
severity: normal
status: open
title: disutils cannot recognize ".dll.a" as library on cygwin
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4017] IDLE 2.6 broken on OSX (Leopard)

2008-10-03 Thread tommusic

Changes by tommusic <[EMAIL PROTECTED]>:


--
nosy: +tommusic

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

Changes by Brett Cannon <[EMAIL PROTECTED]>:


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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread Amaury Forgeot d'Arc

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

Thanks for testing the non-Windows part of ntpath.
Committed patch in r66777.

Leaving the issue open: macpath.py should certainly be modified.

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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

FWIW, I don't see a need to change macpath.py -- it's only used for
MacOS 9 and the occasional legacy app.  OSX uses posixpath.py.

--
resolution:  -> accepted

___
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-03 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Sorry Amaury, but there's another issue.

test_ntpath now fails when run with -bb:

==
ERROR: test_expandvars (__main__.TestNtpath)
--
Traceback (most recent call last):
  File "Lib/test/test_ntpath.py", line 151, in test_expandvars
tester('ntpath.expandvars("$foo bar")', "bar bar")
  File "Lib/test/test_ntpath.py", line 10, in tester
gotResult = eval(fn)
  File "", line 1, in 
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
344, in expandvars
if c in ('\'', b'\''):   # no expansion within single quotes
BytesWarning: Comparison between bytes and string

==
ERROR: test_normpath (__main__.TestNtpath)
--
Traceback (most recent call last):
  File "Lib/test/test_ntpath.py", line 120, in test_normpath
tester("ntpath.normpath('A//././//.//B')", r'A\B')
  File "Lib/test/test_ntpath.py", line 10, in tester
gotResult = eval(fn)
  File "", line 1, in 
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
465, in normpath
if comps[i] in ('.', '', b'.', b''):
BytesWarning: Comparison between bytes and string

==
ERROR: test_relpath (__main__.TestNtpath)
--
Traceback (most recent call last):
  File "Lib/test/test_ntpath.py", line 188, in test_relpath
tester('ntpath.relpath("a")', 'a')
  File "Lib/test/test_ntpath.py", line 10, in tester
gotResult = eval(fn)
  File "", line 1, in 
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
534, in relpath
start_list = abspath(start).split(sep)
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
504, in abspath
return normpath(path)
  File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line
465, in normpath
if comps[i] in ('.', '', b'.', b''):
BytesWarning: Comparison between bytes and string

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



[issue4000] Additional 2to3 documentation updates

2008-10-03 Thread David W. Lambert

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

http://docs.python.org/dev/3.0/library/reprlib.html

Back ticks didn't become a part of my python repertoire.

I suppose
 
return repr(obj) # is correct replacement for  return `obj`

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3255] [proposal] alternative for re.sub

2008-10-03 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>:


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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread Amaury Forgeot d'Arc

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

Committed r66779: test_ntpath now passes with the -bb option.

It seems that the Windows buildbots do not set -bb.

___
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-03 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Thanks Amaury!

On to Georg for doc tweaks.  Summary:

- all the os.path functions now work on bytes as well, on all platforms
- only on Unix (but not OSX) do we recommend using bytes
- os.getcwdu() no longer exists
- os.getcwdb() returns bytes
- os.listdir() skips undecodable entries (previously it returned a
mixture of str and bytes instances)
- open() accepts bytes as filename

Stuff that didn't change but that you might want to mention:

- all the syscalls in os support bytes args; readlink() and listdir()
return bytes if the arg is bytes
- getcwd() may raise UnicodeDecodeError

Martin already documented sys.setfilesystemencoding().

--
assignee: amaury.forgeotdarc -> 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



[issue3448] Multi-process 2to3

2008-10-03 Thread Benjamin Peterson

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

Because I would like to use lib2to3 without the complexity of multiple
processes. That it is a good performance boost is excellent, but I don't
think it should be a required part of using the library.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3448] Multi-process 2to3

2008-10-03 Thread Antoine Pitrou

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

I think it's reasonable to only enable multiprocessing if the adequate
command-line option has been set. It's how `make` already works (next
time you compile Python, try `make -jN` where N is your number of CPU
cores).

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



[issue4033] python search path - .pth recursion

2008-10-03 Thread jolleyjoe

New submission from jolleyjoe <[EMAIL PROTECTED]>:

I have an a.pth file in dir_a with a line that says:

dir_b

In dir_b, I have a b.pth file that lists some eggs in dir_b:

JCC-1.9-py2.5-linux-i686.egg
lucene-2.3.2-py2.5-linux-i686.egg

>From http://www.python.org/doc/2.5.2/inst/search-path.html:
"Paths can be absolute or relative, in which case they're relative to
the directory containing the .pth file. Any directories added to the
search path will be scanned in turn for .pth files. See site module
documentation for more information."

I assume that .pth files are scanned recursively... is this true?

I found an old ticket here: http://bugs.python.org/issue1431, but it
wasn't clear how it concludes (ie: do .pth files get scanned recursively
for directories to add to the search path or not).

--
assignee: georg.brandl
components: Documentation
messages: 74274
nosy: georg.brandl, jolleyjoe
severity: normal
status: open
title: python search path - .pth recursion
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



[issue3187] os.listdir can return byte strings

2008-10-03 Thread Amaury Forgeot d'Arc

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

I have a patch for macpath.py nonetheless.
Tested on Windows (of course ;-) but all functions are pure text 
manipulation, except realpath(). It was much easier than ntpath.py.

I also added tests for three functions which were not exercised at all.

Added file: http://bugs.python.org/file11693/macpath.patch

___
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-03 Thread Benjamin Peterson

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

Amaury, you're patch looks good.

___
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-03 Thread Amaury Forgeot d'Arc

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

Committed macpath.py in r66781.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2876] Write UserDict fixer for 2to3

2008-10-03 Thread Benjamin Peterson

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

The patch looks very good over all. However, I'm not completely sure
that 2to3 needs to give a warning on UserDict.UserDict instances.
Wouldn't it be better to handle that with a py3k warning in UserDict?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2876] Write UserDict fixer for 2to3

2008-10-03 Thread Benjamin Peterson

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

Also, I believe the variable initializations at the beginning of the
transform method are unneeded.

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

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

@loewis: I guess that your locale is still UTF-8.

On Linux (Ubuntu Gutsy) using "env -i DISPLAY=$DISPLAY HOME=$HOME 
xterm" to get a new empty environment, I get:

$ locale
LANG=
LC_ALL=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
...
$ python3.0
>>> from idlelib.IOBinding import encoding
>>> encoding 
'ansi_x3.4-1968'
>>> import locale
>>> locale.getdefaultlocale()
(None, None)
>>> locale.nl_langinfo(locale.CODESET)
'ANSI_X3.4-1968'

In this environment, IDLE is unable to detect 
idle-3.0rc1-quits-when-run.py encoding.

IDLE uses open(filename, 'r'): it doesn't specify the charset. In this 
case, TextIOWrapper uses locale.getpreferredencoding() as encoding (or 
ASCII on failure).

To sum IDLE: if your locale is UTF-8, you will be able to open an 
UTF-8 file. So for example, if your locale is UTF-8, you won't be able 
to open an ISO-8859-1 file. Let's try iso.py: IDLE displays the 
error "Failed to decode" and quit whereas I specified the encoding :-/

Added file: http://bugs.python.org/file11694/iso.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd()

2008-10-03 Thread Benjamin Peterson

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

Thanks for the patch. Reviewed and applied in r66782.

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



[issue4034] traceback attribute error

2008-10-03 Thread Greg Hazel

New submission from Greg Hazel <[EMAIL PROTECTED]>:

Unrelated to this bug, I would like to have the ability to remove the 
reference to the frame from the traceback object. Specifically so that 
the traceback object could be stored for a while without keeping all 
the locals alive as well.

So, periodically I test to see if python allows that. Python 2.6 gave 
some strange results compared to 2.5.2:

Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... x = dskjfds
... except:
... import sys
... t, v, tb = sys.exc_info()
...
>>> tb

>>> dir(tb)
['tb_frame', 'tb_lasti', 'tb_lineno', 'tb_next']
>>> tb.tb_frame

>>> tb.tb_frame = None
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'traceback' object has only read-only attributes (assign 
to .tb_frame)
>>>


Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... x = lfdskf
... except:
... import sys
... t, v, tb = sys.exc_info()
...
>>> tb

>>> dir(tb)
['tb_frame', 'tb_lasti', 'tb_lineno', 'tb_next']
>>> tb.tb_frame

>>> tb.tb_frame = None
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'traceback' object has no attribute 'tb_frame'
>>>

--
messages: 74282
nosy: ghazel
severity: normal
status: open
title: traceback attribute error
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



[issue4035] Support bytes for os.exec*()

2008-10-03 Thread STINNER Victor

New submission from STINNER Victor <[EMAIL PROTECTED]>:

os.exec*() functions doesn't support bytes if the program name doesn't 
use absolute path. The problem is that PATH is used to complete the 
full path but Python3 disallows bytes+str (which is a good thing!). 
Example:

python -c "import os; os.execvp('pwd', 'pwd')"
Traceback (most recent call last):
  ...
  File "/home/haypo/prog/py3k/Lib/os.py", line 328, in execvp
_execvpe(file, args)
  File "/home/haypo/prog/py3k/Lib/os.py", line 364, in _execvpe
func(fullname, *argrest)
TypeError: execv() arg 2 must be a tuple or list

Attached patch allows bytes in os.exec*(). It converts each directory 
of PATH using sys.getfilesystemencoding().

--
files: os_exec_bytes.patch
keywords: patch, patch
messages: 74283
nosy: haypo
severity: normal
status: open
title: Support bytes for os.exec*()
versions: Python 3.0
Added file: http://bugs.python.org/file11695/os_exec_bytes.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4036] Support bytes for subprocess.Popen()

2008-10-03 Thread STINNER Victor

New submission from STINNER Victor <[EMAIL PROTECTED]>:

subprocess doesn't support bytes for the "args" argument.
 - On Windows, subprocess._execute_child() converts args to a string 
if it was a list
 - On UNIX, subprocess._execute_child() converts args to a list if 
it's a string

If shell=True, _execute_child() adds a prefix to the arguments.

I don't know if subprocess should accept bytes in a command line. 
Attached patch fixes POSIX version of subprocess to support bytes.

See also related issue #4035.

--
files: os_exec_bytes.patch
keywords: patch, patch
messages: 74284
nosy: haypo
severity: normal
status: open
title: Support bytes for subprocess.Popen()
versions: Python 3.0
Added file: http://bugs.python.org/file11696/os_exec_bytes.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4037] doctest.py should include method descriptors when looking inside a class __dict__

2008-10-03 Thread daaku

New submission from daaku <[EMAIL PROTECTED]>:

doctest.py currently does not include doctests from method descriptors 
in a class.

The patch is simple, in the _find function in class DocTestFinder:

Original:
# Recurse to methods, properties, and nested classes.
if ((inspect.isfunction(val) or inspect.isclass(val) or
  isinstance(val, property)) and
  self._from_module(module, val)):

Patched:
# Recurse to methods, properties, and nested classes.
if ((inspect.isfunction(val) or inspect.isclass(val) or
  inspect.ismethoddescriptor(val) or
  isinstance(val, property)) and
  self._from_module(module, val)):

Adding the "inspect.ismethoddescriptor(val) or" line.

--
components: Library (Lib)
messages: 74285
nosy: daaku
severity: normal
status: open
title: doctest.py should include method descriptors when looking inside a class 
__dict__
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



[issue4015] [patch] make installed scripts executable on windows

2008-10-03 Thread Terry J. Reedy

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

As a Windows user, I am not sure I would want this.  A run command
associated with .py makes all .py files executable.  From a command
prompt, which I suspect most Windows users never use, typing 'python' is
not a big deal.  Adding .bat files should at least be optional.

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



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

2008-10-03 Thread STINNER Victor

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

Using py3k trunk + fix_latin.diff:
 - compile(b'# coding: latin-1\nu = "\xC7"\n', '', 'exec') 
doesn't fail
 - test_pep3120.py is ok
 - but execute a ISO-8859-1 script fails: see attached iso.py

Original Python3:
$ python iso.py
'Bonjour ma ch\xe8re amie'

Patched Python3:
$ python iso.py
'Bonjour ma ch\xc3\xa8re amie'

--
nosy: +haypo
Added file: http://bugs.python.org/file11697/iso.py

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

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

See also Lib/test/test_shlex.py: trunk is ok, but with fix_latin.diff 
the test fails.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4001] 2to3 does relative import for modules not in a package.

2008-10-03 Thread Mark Hammond

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

I must be going crazy, but I can't see r66707 in the trunk, the py3k
branch, or anywhere else in the svn tree.  Can you please lend me a
clue-stick?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4001] 2to3 does relative import for modules not in a package.

2008-10-03 Thread Benjamin Peterson

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

On Fri, Oct 3, 2008 at 7:39 PM, Mark Hammond <[EMAIL PROTECTED]> wrote:
>
> Mark Hammond <[EMAIL PROTECTED]> added the comment:
>
> I must be going crazy, but I can't see r66707 in the trunk, the py3k
> branch, or anywhere else in the svn tree.  Can you please lend me a
> clue-stick?

You're not crazy; it's just hidden. :)

It's in the 2to3 main line of development: /sandbox/trunk/2to3

I'll merge into the trunk and py3k soon.

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

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

It looks like the problem of fix_latin.diff is the decoding_state: 
it's set to STATE_NORMAL whereas current behaviour is to stay in state 
STATE_RAW.

I wrote another patch which is a mix of case 1 (utf-8: just set 
tok->encoding) and case 2 (another charset: set tok->enc, 
tok->encoding and tok>decoding_state): a new case 3 which set enc, 
encoding but stay a the state STATE_RAW. I don't understand my patch, 
so review it (twice or more :-D). Using my patch:
 - compile(...) works
 - test_shlex.py works
 - test_pep3120.py
 - iso.py works

Added 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



[issue4038] py3k error in distutils file_copy exception handlers

2008-10-03 Thread Mark Hammond

New submission from Mark Hammond <[EMAIL PROTECTED]>:

All the exception handlers i dustutils.file_utils._copy_file_contents()
are of the form:

|except os.error as e:
|(errno, errstr) = e

This fails to unpack the exception in py3k.  I'm attaching a patch that
uses exception attributes rather than unpacking e.args.  FWIW, one of
these exceptions in particular is likely to get hit on Windows if the
destination file is in use, as Windows can't replace such files.  This
isn't a huge problem in practice as it only hits when an error occurs.

--
components: Distutils
files: file_util_exceptions.patch
keywords: needs review, patch, patch
messages: 74292
nosy: mhammond
priority: normal
severity: normal
status: open
title: py3k error in distutils file_copy exception handlers
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file11699/file_util_exceptions.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4027] wrong page index number in reference book of python documentation

2008-10-03 Thread Terry J. Reedy

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

Which version of the Ref Manual is this supposed to be?
By Evince do you mean the Gnome document viewer?
http://www.gnome.org/projects/evince/
If so, are you trying to view a .pdf downloaded from python.org?
If so, did you try viewing it with acrobat or some other .pdf viewer?
This would indicate whether the fault is with the Evince or Python's
.pdf generation or index support.

The screenshot shows two other major problems with the TOC.
Data model should not be indented; it is not part of lexical analysis.
Three chapters between Data Model and Compound Statements are missing.

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



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

2008-10-03 Thread Brett Cannon

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

But why does iso-8859-1 need to be treated as a special case? UTF-8 is
special because it is the default encoding for source. But iso-8859-1
really shouldn't be special, IMO.

Your patch does exactly what happens lower when set_readline() succeeds.
So I want to know why set_readline() is not returning something for
iso-8859-1 (which your patch seems to be suggesting).

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

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

Sorry, I mis-spoke: your patch, Victor, doesn't change the state to
NORMAL. But my worry still stands; why does iso-8859-1 need to be
special-cased? It suggests to me that some more fundamental needs to be
dealt with instead of just patching around iso-8859-1.

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

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

@brett.cannon: I found it: ast.c used a hack for iso-8859-1! Since 
this hack introduces a bug (your compile(...) example), I prefer to 
remove it to simplify to code. The new patch just removes the hack in 
tokenizer.c and ast.c. It does also document encoding and enc 
attributes of tok_state in tokenizer.h.

Using tokenizer_iso-8859-1-patch2.patch, all tests (test_pep3120.py, 
iso.py, test_shlex.py, etc.) are OK.

Added file: http://bugs.python.org/file11700/tokenizer_iso-8859-1-patch2.patch

___
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-03 Thread Terry J. Reedy

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

3. There is a typo  to fix in the header for print on
http://docs.python.org/library/functions.html
end = 'n' should be end = '\n'

About spaces: both IE7 and FF3 on my machine display the same line with
real commas that appear moved a pixel to the left, instead of the
comma-apostrophes in your picture.

1. Multiple underscores are supposed to form an underline.  This is
standard in any case and completely out of the Python's control.  

2. IE6 is ancient*.  Upgrade or get Firefox 3.  Seriously.
(If you don't like IE7, I sympathize.  It drove me to FF.)
* From what I have read, it is very buggy w/r/t the standards.
IE7 displays the new docs just fine.
The Windows installer includes the docs in Windows Help format and the
Start Menu Pythonx.y directory has an entry for it.  No browser needed.

On both IE7 and FF3, the index bar is rock solid, not shrinking even
with a text width of 1/4 inch.  The only problem is that below about 6
inches, the title above, "Python v3.0c1 documentation » The Python
Standard Library » wraps down into the index area.  This is identical on
both and unavoidable.

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



[issue4029] Documentation displays incorrectly in iexplore.

2008-10-03 Thread David W. Lambert

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

multiple underscores could be replaced by a gif.  latex2html solves a 
bunch of font problems this way.

I tried to dump IE but was warned it would break microsoft office, 
which I need for work.  If you happen to know how to adjust the 
registry so that msoffice works with FF, I'd like to know, but it 
belongs not in the python bugs.

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

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

Thanks for finding that, Victor! I will do a patch review when I have a
chance (it won't be until after the weekend).

--
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-03 Thread STINNER Victor

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

After reading tokenizer.c 1000 times, I finally used grep:

$ grep -l -i 'iso.8859.1' $(find -name "*.c")
./Python/ast.c <~~~ WTF?
./Objects/unicodeobject.c
./Parser/tokenizer.c
./Modules/cjkcodecs/_codecs_iso2022.c
./Modules/expat/xmltok.c

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1040026] os.times() is bogus

2008-10-03 Thread David W. Lambert

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

I don't know what is "HZ", but if it's "hertz" then a division is 
necessary.

 total_clocks
time = -
   clocks_per_second

otherwise there's no hope.

--
nosy: +LambertDW

___
Python tracker <[EMAIL PROTECTED]>

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