[issue8734] msvcrt get_osfhandle crash on bad FD

2010-09-03 Thread Pascal Chambon

Pascal Chambon  added the comment:

I guess it should, shouldn't it ?

--

___
Python tracker 

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



[issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars`

2010-09-03 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr.  added the comment:

The patch has been commited largely as-is (r84486).

I'm not happy with the documentation yet:

- Markup like this:

.. method:: ConfigParser.getint(section, option, raw=False,
[vars, default])

  doesn't sit well with me.  I'm going to dig around current practice
  a bit and discuss with Georg sometime over the next few days, and
  see how best to adjust that.

- Inclusion of references to internal names in the API docs, like this
  in the signatures:

comment_prefixes=_COMPATIBLE

  is just bad form.  Again, we need a better way.  I suspect there is
  little if any considered precedent, so we'll come up with something.

Neither of these are blockers; we can adjust this independently of the
code and doocumentation content.  (It's not part of the feature.)

Leaving this issue open for the completion of these changes.

--
resolution:  -> accepted

___
Python tracker 

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



[issue8597] build out-of-line asm on Windows

2010-09-03 Thread Samuel Neves

Samuel Neves  added the comment:

I was unaware of patch #7456 when this was submitted. As far as I can tell, 
there is no difference and no reason to maintain both.

--
nosy: +sneves

___
Python tracker 

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



[issue9770] curses.isblank function doesn't match ctype.h

2010-09-03 Thread Ned Deily

Changes by Ned Deily :


--
versions: +Python 3.1, Python 3.2

___
Python tracker 

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



[issue9770] curses.isblank function doesn't match ctype.h

2010-09-03 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +akuchling

___
Python tracker 

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



[issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars`

2010-09-03 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr.  added the comment:

Regardless, my concerns about including delimiters and comment_prefixes as 
settings is irrelevant to this issue.  The changes to them probably shouldn't 
have been part of this issue to begin with, but I'll try not to lose sleep over 
it at this point.

--

___
Python tracker 

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



[issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars`

2010-09-03 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr.  added the comment:

My question in IRC wasn't intended to mean "why are we passing settings to the 
constructor" so my much as "why are these configuration settings"; sorry I 
wasn't clear.

Have we encountered actual use cases that are not covered by the existing code? 
 I don't recall ever seeing a request for more flexibility in that regard.

--

___
Python tracker 

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



[issue9768] IDLE / Black frame in active window

2010-09-03 Thread Ned Deily

Ned Deily  added the comment:

I am not sure what problem you are seeing.  How did you install Python 3.1.2?  
Using the python.org 3.1.2 installer for OS X? MacPorts?  From source?  If so, 
which version of Tcl/Tk is IDLE using?  Perhaps you can take a screen shot 
(/Applications/Utilities/Grab.app) and attach it to this issue.

--
nosy: +ned.deily

___
Python tracker 

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



[issue9768] IDLE / Black frame in active window

2010-09-03 Thread Ned Deily

Changes by Ned Deily :


--
Removed message: http://bugs.python.org/msg115516

___
Python tracker 

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



[issue1552880] [Python2] Use utf-8 in the import machinery on Windows to support unicode paths

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, I didn't see that the issue was specific to Python2. I updated the issue's 
title. If I understood correctly, the issue is also specific to Windows.

Do you know if your patch changes the public API? (break the compatibility)

--

FYI about Python3:

> That's an inventive way of breaking the unicode standard :)

It is described in the PEP 383 and it does solve a real and common issue: store 
a filename that cannot be decoded with the filesystem encoding. The operation 
is reversible. In Python 3.2, there are os.fsdecode() and os.fsencode() 
functions. On UNIX/BSD, os.encode(os.fsdecode(x)) is x, if x is a bytes object.

The PEP 383 introduces the surrogateescape error handler which does create 
surrogates on decode, and convert back surrogates to bytes on encode.

> Anyway, why would you worry about that? My patch doesn't use
> "surrogateescape" so there is no problem.

In Python3, filenames are stored as unicode. On UNIX/BSD, if a filename cannot 
be decode, it is encoded with surrogates. To get a full unicode support in 
Python3, you have to support surrogates.

--
title: Unicode Imports -> [Python2] Use utf-8 in the import machinery on 
Windows to support unicode paths

___
Python tracker 

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



[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

I have different questions:
 - Should we trust PyObject_IsInstance() or PyUnicode_Check() (because they 
give different results)?
 - Should PyObject_IsInstance() and PyUnicode_Check() give the same result?
 - Should we fix the segfault?

To fix the segfault, I suppose that we use a more strict validation on the 
input type. Eg. Use PyUnicode_Check() instead of PyObject_IsInstance()?

--

___
Python tracker 

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



[issue3899] test_ssl.py doesn't properly test ssl integration with asyncore

2010-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This has been integrated long ago.

--
nosy: +pitrou
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue4379] Py_SAFE_DOWNCAST in FILE_TIME_to_time_t_nsec failing

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +belopolsky

___
Python tracker 

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



[issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +Extension Modules, Windows -Interpreter Core
nosy: +brian.curtin, tim.golden
stage:  -> patch review
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

PyUnicode_Check(op) checks op->ob_type->tp_flags & Py_TPFLAGS_UNICODE_SUBCLASS.

--

___
Python tracker 

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



[issue7546] msvc9compiler.py: add .asm extension

2010-09-03 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +josip

___
Python tracker 

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



[issue8597] build out-of-line asm on Windows

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

I have a hard time reading old-style diffs, so a unified diff would be a win. 
Alternatively, a Mercurial clone URI would do.

Can someone confirm this is a duplicate of #7546 as hinted by Stefan or explain 
the difference? I’m a bit too sleepy to do that and anyway know nearly nothing 
about assembler.

--
nosy: +josip

___
Python tracker 

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



[issue6394] getppid support in os module on Windows

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +brian.curtin, tim.golden
stage:  -> patch review
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

>> I wouldn’t want to see names of authors/contributors mangled
>> in the source.
> 
> This is a reason to write names in ASCII.

Oh, sorry, by “mangled” I meant “forced into ASCII”. I was not speaking about 
mojibake.

> While Latin-1 is a grey area because most of [its] characters look familiar
> to English-speaking developers,

I don’t think there is an argument for Latin-1. Also, Latin-1 does not have 
characters but bytes, which are displayed as characters by good editors, like 
UTF-8 bytes are. The discussion is about ASCII versus UTF-8 in my opinion, let 
Latin-1 rest in peace.

> I don't think you will easily recognize my name if I write it in Cyrillic
> and even if you do, chances are you would not be able to search for it.

Not so good example, since I’ve seen your name in the thread about Misc/ACKS 
sorting and could recognize it, by I get your idea :)

To search, I would use the “search for word under cursor” functionality.

> On the other hand, everyone who uses e-mail is likely to have a preferred
> ASCII spelling of his/her name.

Well, some languages have rules to handle constrained environments, like German 
who may use oe for ö or Italian E' for È, but for example in French there is no 
such workaround. Leaving accents out of words is a spelling error, nothing more 
or less. When I’m forced to change my name because of broken old tools I really 
feel the programmers behind the tool could do better. (I happen to have an 
ASCII-compatible nickname, which I prefer using to the ASCII-maimed version of 
my name where I can.)

I feel 2010 is very late to accept that we live in a wide world and that people 
should be able to just use their names with computer systems.

By the way, you still haven’t retitled this bug to address my other remark :)

--

___
Python tracker 

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



[issue9632] Remove sys.setfilesystemencoding()

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

> In such environments you cannot expect the user to configure the
> system properly (i.e. set an environment variable).

Why would it be different for embeded python?

> Instead, the application has to provide an educated guess 
> to the Python interpreter in some way, ...

How can the application guess the encoding better than Python? If the user 
doesn't configure correctly its environment, I don't see how the application 
can get the real (correct) environment config?!

If Python is unable to start because of the filesystem encoding, it is a bug 
(see #8611). If Python starts but displays incorrectly filenames, it is the 
user fault: the user have to setup its environment.

--

___
Python tracker 

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



[issue8401] Strange behavior of bytearray slice assignment

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: unit test needed -> patch review
versions:  -Python 2.6

___
Python tracker 

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



[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

Another possibility is to use _Py_char2wchar() + PyUnicode_FromWideChar() / 
_Py_wchar2char() + PyUnicode_AsWideChar() to decode / encode filenames. These 
functions use the locale encoding. This solution was possible in Python 3.1, 
but no more in Python 3.2 because of the PYTHONFSENCODING environment variable.

Even if I don't like my own solution, I don't see better solution.

--

___
Python tracker 

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



[issue8597] build out-of-line asm on Windows

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue8594] Add a "source_address" option to ftplib

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> giampaolo.rodola

___
Python tracker 

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



[issue6916] Remove deprecated items from asynchat

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: josiahcarlson -> giampaolo.rodola
stage:  -> patch review
versions:  -Python 3.0, Python 3.1

___
Python tracker 

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



[issue8734] msvcrt get_osfhandle crash on bad FD

2010-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Should this be checked in?

--
nosy: +pitrou
versions: +Python 3.1, Python 3.2

___
Python tracker 

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



[issue9770] curses.isblank function doesn't match ctype.h

2010-09-03 Thread Kevin Thibedeau

New submission from Kevin Thibedeau :

The isblank() function defined in curses.ascii is incorrect and doesn't match 
the output from C's isblank() from ctype.h

Incorrect definition:
  def isblank(c): return _ctoi(c) in (8,32)

Should be:
  def isblank(c): return _ctoi(c) in (9,32)

This most likely affects all versions of Python, not just 2.7.

--
components: Library (Lib)
messages: 115544
nosy: kevinpt
priority: normal
severity: normal
status: open
title: curses.isblank function doesn't match ctype.h
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue9738] Document the encoding of functions bytes arguments of the C API

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

About PyErr_Format() and PyUnicode_FromFormat*() encoding: it's not exactly 
ISO-8859-1... there is a bug => issue #9769.

--

___
Python tracker 

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



[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-09-03 Thread STINNER Victor

New submission from STINNER Victor :

I'm trying to document the encoding of all bytes argument of the C API: see 
#9738. I tried to understand which encoding is used by PyUnicode_FromFormat*() 
(and PyErr_Format() which calls PyUnicode_FromFormatV()). It looks like 
ISO-8859-1, see unicodeobject.c near line 1106:

for (f = format; *f; f++) {
if (*f == '%') {
...
} else
*s++ = *f; < here
}

... oh wait, it doesn't work for non-ascii text! Test in gdb:

(gdb) print _PyObject_Dump(PyUnicodeUCS2_FromFormat("iso-8859-1:\xd0\xff"))
object  : 'iso-8859-1:\uffd0\u'
type: str
refcount: 1
address : 0x83d5d80

b'\xd0\xff' is decoded '\uffd0\x' :-( It's a bug.

--

PyUnicode_FromFormatV() should raise an error on non-ascii format character, or 
decode it correctly as... ISO-8859-1 or something else. It's difficult to 
support multi byte encodings (like utf-8), ISO-8859-1 is fine. If we choose to 
raise an error, how can the user format a non-ascii string? Using 
its_unicode_format.format(...arguments...) or its_unicode_format % arguments? 
Is it easy to call these methods in C?

--
components: Interpreter Core, Unicode
messages: 115542
nosy: haypo
priority: normal
severity: normal
status: open
title: PyUnicode_FromFormatV() doesn't handle non-ascii text correctly
versions: Python 3.2

___
Python tracker 

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



[issue2122] mmap.flush does not check for errors on windows

2010-09-03 Thread Brian Curtin

Changes by Brian Curtin :


--
assignee:  -> brian.curtin

___
Python tracker 

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



[issue9535] Pending signals are inherited by child processes

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +Interpreter Core -Extension Modules
nosy: +gregory.p.smith
stage:  -> patch review
versions: +Python 3.1, Python 3.2 -Python 2.5, Python 2.6

___
Python tracker 

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



[issue2122] mmap.flush does not check for errors on windows

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +brian.curtin, tim.golden
versions:  -Python 2.6

___
Python tracker 

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



[issue9767] Failures in json doc examples

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Well, anyone who does try that example will see the correct output and not 
notice the trailing whitespace difference. It will only be an issue if and when 
automated doc doctests are run repeatedly. Worry about it then. Thanks for the 
quick response.

--

___
Python tracker 

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



[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-03 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> I wouldn’t want to see names of authors/contributors mangled
> in the source.

This is a reason to write names in ASCII.   While Latin-1 is a grey area 
because most of it's characters look familiar to English-speaking developers, I 
don't think you will easily recognize my name if I write it in Cyrillic and 
even if you do, chances are you would not be able to search for it.  On the 
other hand, everyone who uses e-mail is likely to have a preferred ASCII 
spelling of his/her name.

--

___
Python tracker 

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



[issue9763] Crashes upon run after syntax error encountered in OSX 10.5.8

2010-09-03 Thread Ned Deily

Ned Deily  added the comment:

Following your test case, I am able to produce a deadlocked IDLE when using the 
python.org 3.1.2 OS X installer on 10.5.8 when using just the Apple-supplied Tk 
8.4 framework.  After installing a recent ActiveState Tcl/Tk 8.4 framework (the 
python.org installers are built to dynamically link with either), the hang is 
no longer reproducible.  There doesn't seem to be a problem with either 2.6.6 
or 2.7, with either version of Tcl/Tk, nor is there on 10.6 but the 
Apple-supplied 8.4 there is much newer than that in 10.5. I'm doing some more 
triage work on this issue with 3.1 and 3.2.

In the interim, a workaround may be to install the ActiveState Tcl/Tk 8.4 on 
your systems if that is acceptable.

--
nosy: +ned.deily

___
Python tracker 

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



[issue7723] sqlite only accept buffer() for BLOB objects (input/output)

2010-09-03 Thread Florent Xicluna

Florent Xicluna  added the comment:

I propose to close this, since 2.7 is released and the situation is better in 
Python 3.

--
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

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



[issue8273] move generally useful test.support functions into the unittest package

2010-09-03 Thread Florent Xicluna

Changes by Florent Xicluna :


--
title: move generally useful test_support functions into the unittest package 
-> move generally useful test.support functions into the unittest package

___
Python tracker 

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



[issue8273] move generally useful test_support functions into the unittest package

2010-09-03 Thread Florent Xicluna

Florent Xicluna  added the comment:

Issue #9754 proposes to implement assertWarns / assertWarnsRegexp

--
dependencies: +assertWarns and assertWarnsRegexp

___
Python tracker 

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



[issue8678] crashers in rgbimg

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

I am able to reproduce the crash with z > 4:

# (magic, type (rle, bpp), dim, x, y, z)
open('image', 'wb').write(struct.pack('>hh', 0732, 1, 1, 1, 1, 10))
rgbimg.longimagedata('image')

--

But not the "xsize = ysize = 0x8000" integer overflow. longimagedata() begins 
by checking that xsize * ysize * zsize * sizeof(Py_Int32) doesn't overflow:

tablen = xsize * ysize * zsize * sizeof(Py_Int32);
if (xsize != (((tablen / ysize) / zsize) / sizeof(Py_Int32))) {
PyErr_NoMemory();
goto finally;
}

If xsize * ysize * zsize * sizeof(Py_Int32) doesn't overflow, there is no 
reason that xsize * ysize * sizeof(Py_Int32) does overflow.

--

I am too tired to check the two RLE bugs.

--

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for clearing this misunderstanding of mine.

--

___
Python tracker 

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



[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

I agree about the need to define the encoding for comments. My vote goes to #2, 
since I wouldn’t want to see names of authors/contributors mangled in the 
source. I would reconsider if a specification explicitly forbade that.

I repeat that the title of this bug is misleading: untabify does not fail with 
non-ASCII bytes, it failed because of invalid bytes.

--

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Georg Brandl

Georg Brandl  added the comment:

> 2) works without changing anything, 3) requires using specific directives 
> IIUC.

No.  The doctest extension is what "make doctest" calls.

--

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Georg Brandl

Georg Brandl  added the comment:

>> Generally: +1 on making sure examples in the docs are up to date.  If
>> someone wants to do the tedious work of making sure that a "make
>> doctest" succeeds, I'm all for it, it may involve adding a few (in
>> HTML output invisible) testsetup blocks.
> 
> I'm not sure that's a good idea. It may add a lot of spurious imports
> which only make the examples longer and less readable.

That's why I said to use "testsetup" directives -- they are not visible in the 
HTML/PDF/... output, but used when running the tests.

--

___
Python tracker 

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



[issue9293] Unsupported IO operations should raise UnsupportedOperation

2010-09-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +skrah, stutzbach

___
Python tracker 

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



[issue7862] fileio.c: ValueError vs. IOError with impossible operations

2010-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

See #9293, where there's a patch.

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Unsupported IO operations should raise UnsupportedOperation

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

2) works without changing anything, 3) requires using specific directives IIUC.

--

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Generally: +1 on making sure examples in the docs are up to date.  If
> someone wants to do the tedious work of making sure that a "make
> doctest" succeeds, I'm all for it, it may involve adding a few (in
> HTML output invisible) testsetup blocks.

I'm not sure that's a good idea. It may add a lot of spurious imports
which only make the examples longer and less readable.

--

___
Python tracker 

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



[issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars`

2010-09-03 Thread Georg Brandl

Georg Brandl  added the comment:

I agree with msg115525.

--

___
Python tracker 

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



[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-03 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> If untabify fails because a file has an incorrect encoding, is it really
> a problem in untabify? This is a developer’s tool, so getting a
> traceback here seems okay to me.

I disagree.  I think we should use this opportunity to clarify preferred 
encoding for C language source files in python and make untabify produce 
meaningful diagnostic in case of encoding errors.

As a matter of policy, I see two possibilities:

1. Restrict C sources to 7-bit ASCII.  (A pedantic reading of ANSI C standard 
would probably suggest even more restricted character set, but practically, I 
don't think 7-bit ASCII in C comments is likely to cause problems for any tools.

2. Require UTF-8 encoding for non-ASCII characters.  Given that this is the 
default for python source code, it is likely that tools that are used for 
python development can handle UTF-8.

My vote is for #1.  Display of non-ascii characters is still not universally 
supported and they are likely to be clobbered when diffs are copied in e-mails 
etc.

--

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Georg Brandl

Georg Brandl  added the comment:

Generally: +1 on making sure examples in the docs are up to date.  If someone 
wants to do the tedious work of making sure that a "make doctest" succeeds, I'm 
all for it, it may involve adding a few (in HTML output invisible) testsetup 
blocks.

Eric: I'm not sure what the difference between your methods 2 and 3 is :)

As Terry already mentioned, by far not all example code is covered by that, and 
I don't think there's anything we can do about it.  We can of course try 
converting more doc examples to doctest format, however:

a) for longer examples and especially function/class definitions this really 
hurts readability and usability (think copy/paste)

b) many examples are also not easily runnable (Tk is a good example, many more 
can be found in those for network services)

--

___
Python tracker 

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



[issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars`

2010-09-03 Thread Łukasz Langa

Łukasz Langa  added the comment:

On IRC Fred asked:
> Why are delimiters and comment_prefixes in the constructor signatures?

Like most configurable options, they were added to the initializer one by one 
(after `allow_no_value`). Only later did I notice that actually things like 
optionxform, _boolean_states, etc. are configurable by assignment. So this is a 
design decision whether one way should be preferred over the other. In a way 
that's unfortunate that we now have two obvious ways to do it.

I believe that keyword arguments are far better because they are more 
declarative, e.g.:

parser = SafeConfigParser(delimiters=(':=',),
  comment_prefixes=('//',))

vs.

parser = SafeConfigParser()
parser._delimiters = (':=',)
parser._comment_prefixes = ('//',)

It's the way ORMs and many other frameworks do it and it feels natural.

--

___
Python tracker 

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



[issue9760] Suggestion for improving with documentation

2010-09-03 Thread Georg Brandl

Georg Brandl  added the comment:

Actually, the with_item contains the context expression *and* the optional "as 
target" clause, so they are not equivalent

I committed a clarification in r84482.

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

___
Python tracker 

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



[issue9738] Document the encoding of functions bytes arguments of the C API

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Better specifying requirements is good. A few comments:

-   The second argument is an error message; it is converted to a string object.
+   The second argument is an error message; it is decoded to a string object
+   with ``'utf-8'`` encoding.
 
I would write the change as
+   The second argument is a utf-8 encoded error message; it is decoded to a 
string object. 

I the second part (what the function will do with the arg) really needed? I 
think in the current version, it serves to indirectly specify that the arg in 
not to be a string, but bytes. If the specific encoding required is specified, 
that also says bytes, making 'will be decoded' redundant and irrelevant.
---

+   a Python exception (class, not an instance). *format* should be a string
+   encoded to ISO-8859-1, containing format codes, 

*format* should be ISO-8859-1 encoded bytes containing format codes,

although I am not clear about the implications of that. Are not all format code 
ascii chars?


I do not really like 'encoded to', but 'decoded to' is wrong. 'will be decoded 
from xxx bytes' is better. I think there should be a general discussion 
somewhere about bytes arguments and the terminology that will be used.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue9767] Failures in json doc examples

2010-09-03 Thread Georg Brandl

Georg Brandl  added the comment:

r84481 should fix all except the whitespace one.  I don't think this is worth 
fixing; I will not add a trailing whitespace to the docs, and adding a 
"doctest: NORMALIZE_WHITESPACE" directive does not help readability, especially 
since nobody actually runs these doctest-like examples.

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

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

Note also that some docs (turtle) require running Tcl, which may be unwanted on 
headless machines like buildbots.

--

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

It seems there are three ways of testing the docs:

1) ./python -m doctest Doc/library/json.rst
2) make doctest (a.k.a. sphinx-build -b doctest)
3) http://sphinx.pocoo.org/ext/doctest.html

Manually running 1) or 2) and fixing things seems okay for a first step, and 
when everything is fixed, we could add automation to prevent regressions. Georg 
is in the best place to say how to do it (through a thin test_docs.py 
integration layer between doctest and regrtest, with sphinx.ext.doctest, or by 
editing the test target of the makefile to run make doctest -C Doc).

--
nosy: +eric.araujo

___
Python tracker 

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



[issue9739] Output of help(...) is wider than 80 characters

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Although this is not a problem in IDLE where the window can easily be expanded 
beyond 80 chars, I am in favor of the idea for other uses. The command line 
interpreter on Windows defaults to 80 chars and is not so easy to change, and 
one must be admin to make the change 'permanent' (until the next install 
reverts the change). In particular, the 82 char line for math.trun results in 
'd.' of 'method.' wrapped to a line by itself with no indent. Pretty ugly.

However, I am puzzled why you edited the 74 char line for math.modf, which 
displays as 78 chars with a 4 char indent. This
'''\
Return the fractional and integer parts of x.  Both results carry the 
sign'''
displays fine on one line as is. The tracker, unfortunately, displays
123456789012345678901234567890123456789012345678901234567890123456789012 only 
72 chars.
of x and are floats.

I agree that
trunc(x:Real) -> Integral
is more helpful (and therefore better) than
modf(x)

For something like
-"T.index(value, [start, [stop]]) -> integer -- return first index of value.\n"

I personally think '->' and 'return are redundant, so I would argue that this 
could be shortened to
-"T.index(value, [start, [stop]]) -> integer (first index of value).\n"
instead of by wrapping.

Since I am not yet in a position to apply patches, I am not (yet) in a position 
to tell you whether or how to produce more patches.

--
nosy: +terry.reedy
stage:  -> patch review
versions: +Python 3.2

___
Python tracker 

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



[issue9768] IDLE / Black frame in active window

2010-09-03 Thread Kristoffer F

Kristoffer F  added the comment:

Hi 

I am new to python and have installed python 3.1.2. I have began using 
IDLE and like it very good. 

But when an IDLE window is active. There is a "thick" black frame around 
the white text field. Is this a know issue? And is there some way I can get rid 
of this frame? 

The frame is very distracting when I write. 

Kristoffer

*I forgot to tell that I am using a Mac with Snow Leopard.

--

___
Python tracker 

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



[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

Fixed encoding error in r84472 through r84474.

This bug should be reassessed and retitled. If untabify fails because a file 
has an incorrect encoding, is it really a problem in untabify? This is a 
developer’s tool, so getting a traceback here seems okay to me. Alexander, 
please close if you agree.

--
nosy: +pitrou

___
Python tracker 

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



[issue9768] IDLE / Black frame in active window

2010-09-03 Thread Kristoffer F

New submission from Kristoffer F :

Hi 

I am new to python and have installed python 3.1.2. I have began using 
IDLE and like it very good. 

But when an IDLE window is active. There is a "thick" black frame around 
the white text field. Is this a know issue? And is there some way I can get rid 
of this frame? 

The frame is very distracting when I write. 

Kristoffer

--
components: IDLE
messages: 115516
nosy: kfollesdal
priority: normal
severity: normal
status: open
title: IDLE / Black frame in active window
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

>>> class Spam(object):
... def __getattribute__(self, name):
... if name == '__class__':
... return str
... raise AttributeError
... 
>>> spam = Spam('spam')
>>> isinstance(spam, str)
True

isinstance(spam, str) calls str.__instancecheck__(spam) 
(type___instancecheck__) which checks spam.__class__, and spam.__class__ is str.

--

>>> import re
>>> re.match('spam', spam)
TypeError: expected string or buffer

Here the result is different because _sre.compile(spam) calls getstring() which 
uses PyUnicode_Check(spam) (-> False) and does checks on the buffer API (-> 
False).

--

About str.title(spam): it calls methoddescr_call() which checks the type 
using... PyObject_IsInstance() (and not PyUnicode_Check()).

--

___
Python tracker 

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



[issue8678] crashers in rgbimg

2010-09-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-09-03 Thread Craig de Stigter

Craig de Stigter  added the comment:

Yes, the bug still exists in Python 3.1.2. However, struct.pack() no longer 
silently ignores overflow, so I get this error instead:


>>> z.write('foo.txt')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.1/zipfile.py", line 1095, in write
zinfo.file_size))
struct.error: argument out of range

--

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

As an experiment, I ran doctest on 17.2 json saved as .txt, See #9767
4 failures, 2 obvious doc faults, 2 unclear to me.
Their were 2 similar doc faults in non-interactive code examples, so doctest is 
not enough to catch all bad code.

We clearly need to do this for the entire doc, preferably before 3.2 is 
released. A master issue is the wrong format, at least by itself. What I think 
is needed is a repository doc like Misc/maintainers.rst, call it Misc/doctests 
or Misc/docdoctests. It should have a line for each doc section with current 
status (blank for unchecked, n/a for no interactive example, issue number for 
fixes in progress). A master issue could then be a place where non-committers 
can report changes that committers could apply. What do you others think?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue9767] Failures in json doc examples

2010-09-03 Thread Terry J. Reedy

New submission from Terry J. Reedy :

I ran doctest on LibRef 17.2 json saved as .txt. There are 4 failures: 2 are 
clearly doc issues, the other 2 I do not know. I hope someone reads this who is 
already familiar

DOC PATCHES
dumps(2 + 1j, cls=ComplexEncoder)
should be
json.dumps(2 + 1j, cls=ComplexEncoder)
and
JSONEncoder().encode({"foo": ["bar", "baz"]})
should be
json.JSONEncoder().encode({"foo": ["bar", "baz"]})

Needing similar additions in example code (not caught by doctest) are
   return JSONEncoder.default(self, o)
for chunk in JSONEncoder().iterencode(bigobject):

Those fixes leave 2 failures I an unclear about and hope a json expert will 
comment on.

1.'''
Failed example:
print(json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4))
Expected:
{
"4": 5,
"6": 7
}
Got:
{
"4": 5, 
"6": 7
}
'''
The difference is that json puts a trailing space after '5,'. Should it? or 
should one be added to the doc?

2. '''
Failed example:
list(ComplexEncoder().iterencode(2 + 1j))
Expected:
['[', '2.0', ', ', '1.0', ']']
Got:
['[2.0', ', 1.0', ']']
'''
Without knowing how the default iterencode interacts with the overwridden 
.default() method, I have no idea.

--
assignee: d...@python
components: Documentation, Library (Lib)
messages: 115512
nosy: d...@python, terry.reedy
priority: normal
severity: normal
status: open
title: Failures in json doc examples
type: behavior

___
Python tracker 

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



[issue9766] warnings has "onceregistry" and "once_registry"

2010-09-03 Thread Brett Cannon

Brett Cannon  added the comment:

OK, so I will fix this in 3.2 but not any other versions as someone might be 
foolishly relying on the name. Hopefully I can get to this over the weekend.

--
keywords: +easy
versions:  -Python 2.7, Python 3.1

___
Python tracker 

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



[issue9766] warnings has "onceregistry" and "once_registry"

2010-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> That means the _warnings versions should simply be renamed to
> "_onceregistry" and "_defaultaction" instead of their current names.
> Work for you?

Certainly.

--

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-03 Thread Brett Cannon

Brett Cannon  added the comment:

This could still be an issue with the .pyc files being set with permissions 
that prevent them from being re-generated. Double-check the .pyc files are 
read-write and have the proper owners to allow them to be overwritten.

--

___
Python tracker 

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



[issue9766] warnings has "onceregistry" and "once_registry"

2010-09-03 Thread Brett Cannon

Brett Cannon  added the comment:

"defaultaction" and "default_action" is in the same situation. I think there 
may have been a circular import/ref problem as _warnings pulls from warnings 
the objects to use for the variables in question. Or at least that's what makes 
sense. =)

That means the _warnings versions should simply be renamed to "_onceregistry" 
and "_defaultaction" instead of their current names. Work for you?

--

___
Python tracker 

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



[issue1303434] Please include pdb with windows distribution

2010-09-03 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

Attached is a slightly improved patch.  It cleans up some whitespace issues 
with James's patch and filters out *_d.pdb files if they exist.  I tested it on 
my system and it correctly produces a .zip file containing the .pdb files, next 
to the .msi file

Martin, do you need this patch to have any other functionality in order to make 
the python-*-pdb.zip file available after a release?

--
Added file: http://bugs.python.org/file18741/pdb.patch

___
Python tracker 

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



[issue9730] base64 docs refers to strings instead of bytes

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

PATCH
Specifically, in section 17.6. base64..., near bottom, example should be

>>> import base64
>>> encoded = base64.b64encode(b'data to be encoded') #hang
>>> encoded
b'ZGF0YSB0byBiZSBlbmNvZGVk'
>>> data = base64.b64decode(encoded)
>>> data
b'data to be encoded'

with the first and third 'b' prefixes added.

I confirmed that doctest works with above.

I am a bit puzzled about Sphinx and 3.x comment, as doctest just need a plain 
ascii file and does not care how it was produced. (I used browser Save As text 
file function.) However, moot now.

--
keywords: +patch
nosy: +terry.reedy

___
Python tracker 

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



[issue9766] warnings has "onceregistry" and "once_registry"

2010-09-03 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The warnings module has both "onceregistry" and "once_registry", while 
_warnings only has the latter. There's probably a typo.

--
assignee: brett.cannon
components: Library (Lib)
messages: 115505
nosy: brett.cannon, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: warnings has "onceregistry" and "once_registry"
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue9765] tcl-8 vs tcl8

2010-09-03 Thread Daniel Stutzbach

New submission from Daniel Stutzbach :

Tools/buildbot/external-common.bat creates tcl-8.5.2.1, but Tools/msi/msi.py 
looks for tcl8*.  Consequently, Tools/buildbot/buildmsi.py does not work on a 
fresh machine.

tk has the same problem.

I encountered this on the py3k branch but have not checked other branches.

Attached is a simple patch to Tools/msi/msi.py.

--
components: Build, Windows
files: tcl.patch
keywords: patch
messages: 115504
nosy: loewis, stutzbach
priority: normal
severity: normal
stage: needs patch
status: open
title: tcl-8 vs tcl8
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file18740/tcl.patch

___
Python tracker 

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



[issue9764] Tools/buildbot/external.bat should download and built tix

2010-09-03 Thread Daniel Stutzbach

New submission from Daniel Stutzbach :

external.bat and external-common.bat take care of downloading most external 
packages such as tcl, tk, and openssl.  However, the tix package is missing, 
but needed to build the msi.

--
components: Build, Windows
messages: 115503
nosy: loewis, stutzbach
priority: normal
severity: normal
stage: needs patch
status: open
title: Tools/buildbot/external.bat should download and built tix
type: feature request
versions: Python 3.2

___
Python tracker 

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-09-03 Thread Steve Thompson

Steve Thompson  added the comment:

Any idea if this will be fixed (at all) and/or back ported to 2.6.x or
2.7.x?

On Fri, Sep 3, 2010 at 3:36 PM, Amaury Forgeot d'Arc  wrote:

>
> Amaury Forgeot d'Arc  added the comment:
>
> This is still the case: on Windows, if foo.py is readonly,
>python -c "import foo"
> generates foo.pyc with the readonly attribute.
>
> Tested with 3.1 and current py3k (where the file is named
> __pycache__\foo.cpython-32.pyc)
>
> --
> nosy: +amaury.forgeotdarc
>
> ___
> Python tracker 
> 
> ___
>

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

___
Python tracker 

___Any idea if this will be fixed (at all) and/or back ported to 2.6.x or 
2.7.x?On Fri, Sep 3, 2010 at 3:36 PM, Amaury 
Forgeot d'Arc rep...@bugs.python.org> 
wrote:

Amaury Forgeot d'Arc amaur...@gmail.com> added the 
comment:

This is still the case: on Windows, if foo.py is readonly,
    python -c "import foo"
generates foo.pyc with the readonly attribute.

Tested with 3.1 and current py3k (where the file is named 
__pycache__\foo.cpython-32.pyc)

--
nosy: +amaury.forgeotdarc

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

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This is still the case: on Windows, if foo.py is readonly,
python -c "import foo"
generates foo.pyc with the readonly attribute.

Tested with 3.1 and current py3k (where the file is named 
__pycache__\foo.cpython-32.pyc)

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue8746] *chflags detection broken on FreeBSD 9-CURRENT

2010-09-03 Thread Nick Dowell

Changes by Nick Dowell :


Added file: http://bugs.python.org/file18738/8746-2.6.6.patch

___
Python tracker 

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



[issue8746] *chflags detection broken on FreeBSD 9-CURRENT

2010-09-03 Thread Nick Dowell

Changes by Nick Dowell :


Added file: http://bugs.python.org/file18737/8746-2.7.patch

___
Python tracker 

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



[issue8746] *chflags detection broken on FreeBSD 9-CURRENT

2010-09-03 Thread Nick Dowell

Changes by Nick Dowell :


--
keywords: +patch
Added file: http://bugs.python.org/file18736/8746-3.1.2.patch

___
Python tracker 

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-09-03 Thread Steve Thompson

Steve Thompson  added the comment:

So what's the current status of this on Windows Platforms?

--
nosy: +Steve.Thompson

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-03 Thread Steve Thompson

Steve Thompson  added the comment:

Hmmm... this definitely sounds like the issue for version controlled files,
but does not explain the issue when installing packages from source.

On Sep 3, 2010 3:16 PM, "Amaury Forgeot d'Arc" 
wrote:

Amaury Forgeot d'Arc  added the comment:

Does your version control system let the files read-only by default?
In this case, see issue6074.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

___Hmmm... this definitely sounds like the issue for version controlled files, 
but does not explain the issue when installing packages from source.
On Sep 3, 2010 3:16 PM, "Amaury Forgeot 
d'Arc" rep...@bugs.python.org> 
wrote:
Amaury Forgeot d'Arc amaur...@gmail.com> added the 
comment:

Does your version control system let the files read-only by default?
In this case, see issue6074.

--
nosy: +amaury.forgeotdarc
___Python 
tracker rep...@bugs.python.org>http://bugs.python...

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Does your version control system let the files read-only by default?
In this case, see issue6074.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue9731] Add ABCMeta.has_methods and tests that use it

2010-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

I wanted to propose the name check_methods, but then I thought that some people 
could read too much in that name, for example that arguments and return value 
are checked for correct type and value (see how Web people misunderstand “HTML 
validation”). That said, “check” promises less than “validate”, and ABCs being 
a middle-to-advanced topic, we could trust people using this method to read the 
docstring and not expect too much.

--

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-03 Thread Steve Thompson

Steve Thompson  added the comment:

"Setup.py install". We've also seen this happen when checking our python
files out of our version control system.  Also seen a .pyc get used when the
.py no longer exists, but I could see that being intentional behavior.

On Sep 3, 2010 2:57 PM, "Brett Cannon"  wrote:

Brett Cannon  added the comment:

So are you installing new versions of a package you already have installed
using ``python setup.py install``? Exactly what command are you using to do
the install?

--
nosy: +brett.cannon

___
Python tracker 

___"Setup.py install". We've also seen this happen when checking 
our python files out of our version control system.  Also seen a .pyc get used 
when the .py no longer exists, but I could see that being intentional 
behavior.

On Sep 3, 2010 2:57 PM, "Brett Cannon" 
rep...@bugs.python.org> 
wrote:
Brett Cannon br...@python.org> 
added the comment:

So are you installing new versions of a package you already have installed 
using ``python setup.py install``? Exactly what command are you using to do the 
install?

--
nosy: +brett.cannon
___Python 
tracker rep...@bugs.python.org>http://bugs.python...

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



[issue9762] build failures

2010-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The normal build lines for the crypt and nis modules contain additional library 
linkage ("normal", that is before your commit :-)):

gcc -pthread -shared 
build/temp.linux-x86_64-3.2/home/antoine/py3k/__svn__/Modules/cryptmodule.o 
-L/home/antoine/py3k/__svn__/usr/lib -L/usr/local/lib -lcrypt -o 
build/lib.linux-x86_64-3.2/crypt.so

gcc -pthread -shared 
build/temp.linux-x86_64-3.2/home/antoine/py3k/__svn__/Modules/nismodule.o 
-L/home/antoine/py3k/__svn__/usr/lib -L/usr/local/lib -lnsl -o 
build/lib.linux-x86_64-3.2/nis.so

("-lcrypt" in the former, "-lnsl" in the latter)

--

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-03 Thread Brett Cannon

Brett Cannon  added the comment:

So are you installing new versions of a package you already have installed 
using ``python setup.py install``? Exactly what command are you using to do the 
install?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue9728] Docs point to FAQ Section 3, but FAQs are not numbered

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

As I remember, the FAQ was once that, *the* (giant) FAQ, with numbered 
sections. When broken into pieces, the order may have been re-arranged.

Given that the broken reference is in extending/windows, I would look in both 
the Extending and Windows FAQs. However, I found neither 'PyType_Type' nor 
'PyVarObject_HEAD_INIT' nor 'initialization' in either.

Besides removing the dead reference, you could either look through the revision 
history of the file or ask on pydev if you need the info.

The split-up FAQs first appear in a release doc set in Python 2.6.4, 
documentation released on 25 October 2009. I do not know if the earlier, 
unitary FAQ is in the repository or not.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue9731] Add ABCMeta.has_methods and tests that use it

2010-09-03 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

I agree that my original name proposal is terrible. :-)  method_check and 
verify_full_api both look fine to me.

> If all collection registrations were bundled together in 
> collections.py, I think I would expect the tests to be in 
> test_collections. But I could still be presuaded that the range method
> check should be in test_range where all the individual methods are 
> (should be!) tested.

All of the registrations are bundled together in _abcoll.py, which 
collections.py imports into collections.py's namespace.  (It's in a separate 
file to get around some bootstrapping issues.)

I favor putting them in test_collections to make it slightly easier to check 
for a 1:1 correlation between registrations and tests, but it's not something I 
feel strongly about.

--

___
Python tracker 

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



[issue9759] GzipFile object should raise ValueError on .read() after .close()

2010-09-03 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc :


--
stage:  -> needs patch

___
Python tracker 

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



[issue9763] Crashes upon run after syntax error encountered in OSX 10.5.8

2010-09-03 Thread William Barr

New submission from William Barr :

Steps for reproduction:
1.  Open a new code window
2.  Enter python code which contains a syntax error
3.  F5 and attempt to run the file (This was done without saving first)
4.  Close the syntax error dialog.  
5.  Fix the syntax error and try to F5 again without saving again.  
6.  IDLE will encounter an error and unexpectedly close.  

I'm reporting this after having tested this on 4 different OSX 10.5.8 machines. 
 I'm not sure if other versions of Python are also susceptible to this as well.

--
components: IDLE
messages: 115491
nosy: Webs961
priority: normal
severity: normal
status: open
title: Crashes upon run after syntax error encountered in OSX 10.5.8
type: crash
versions: Python 3.1

___
Python tracker 

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



[issue9293] Unsupported IO operations should raise UnsupportedOperation

2010-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file18733/unsupported.patch

___
Python tracker 

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



[issue9762] build failures

2010-09-03 Thread Antoine Pitrou

New submission from Antoine Pitrou :

After a `make distclean` and a whole recompile I still get these:

building 'crypt' extension
gcc -pthread -fPIC -g -O0 -Wall -Wstrict-prototypes -I. -I./Include 
-I/usr/local/include -IInclude -I/home/antoine/py3k/debug -c 
/home/antoine/py3k/debug/Modules/cryptmodule.c -o 
build/temp.linux-x86_64-3.2-pydebug/home/antoine/py3k/debug/Modules/cryptmodule.o
gcc -pthread -shared 
build/temp.linux-x86_64-3.2-pydebug/home/antoine/py3k/debug/Modules/cryptmodule.o
 -L/usr/local/lib -o build/lib.linux-x86_64-3.2-pydebug/crypt.cpython-32dm.so
*** WARNING: renaming "crypt" since importing it failed: 
build/lib.linux-x86_64-3.2-pydebug/crypt.cpython-32dm.so: undefined symbol: 
crypt

building 'nis' extension
gcc -pthread -fPIC -g -O0 -Wall -Wstrict-prototypes -I. -I./Include 
-I/usr/local/include -IInclude -I/home/antoine/py3k/debug -c 
/home/antoine/py3k/debug/Modules/nismodule.c -o 
build/temp.linux-x86_64-3.2-pydebug/home/antoine/py3k/debug/Modules/nismodule.o
gcc -pthread -shared 
build/temp.linux-x86_64-3.2-pydebug/home/antoine/py3k/debug/Modules/nismodule.o 
-L/usr/local/lib -o build/lib.linux-x86_64-3.2-pydebug/nis.cpython-32dm.so
*** WARNING: renaming "nis" since importing it failed: 
build/lib.linux-x86_64-3.2-pydebug/nis.cpython-32dm.so: undefined symbol: 
yp_get_default_domain

Failed to build these modules:
crypt  nis

--
assignee: barry
components: Build
messages: 115489
nosy: barry, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: build failures
type: compile error
versions: Python 3.2

___
Python tracker 

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



[issue9761] stale .pyc files aren't cleaned out

2010-09-03 Thread Steve Thompson

New submission from Steve Thompson :

I'm running pythong 2.6.1 on Windows XP SP3.

On many occasions I have ran into cases where I've installed a new package via 
the package's setup.py (pylint, logilab-common, etc) and new .pyc files don't 
get generated when I attempt to run the tools/packages.  I'm not sure if this 
should be considered a package issue or an interpreter issue.  I'd like to see 
the interpreter regenerate the .pyc file as expected so my colleagues and I 
don't burn time on "broken" packages we know nothing about only to find out it 
was due to some stale .pyc files.  A quick fix would be to make the packages in 
question clean out their installation directories or regenerate all the pyc 
files manually.

How should this issue be handled?

--
components: Interpreter Core, Windows
messages: 115488
nosy: Steve.Thompson
priority: normal
severity: normal
status: open
title: stale .pyc files aren't cleaned out
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue9731] Add ABCMeta.has_methods and tests that use it

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Good idea!

I see Raymond's point about the name. How about .method_check?
To me Sequence.method_check(range) means "Abstract Seqeunce class, please 
method-check the concrete range class."

If Sequence.register(range) is in the range source file, I would expect to find 
the test of the range class in test_range.

If all collection registrations were bundled together in collections.py, I 
think I would expect the tests to be in test_collections. But I could still be 
presuaded that the range method check should be in test_range where all the 
individual methods are (should be!) tested.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue9717] operator module - "in place" operators documentation

2010-09-03 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: d...@python -> rhettinger

___
Python tracker 

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



[issue9717] operator module - "in place" operators documentation

2010-09-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Consider breaking the operator module documents into sections, grouping all of 
the in-place ops into the last section.  Start that section with a full 
description of how in-place works in python and show some examples of 
successful way to use the in-place operators.

Right now, the docs are somewhat misleading because they imply that the 
i-functions can be used in the same was as their counterparts.

--
nosy: +rhettinger

___
Python tracker 

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



[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor

STINNER Victor  added the comment:

<< I found this crash while playing with proxies (thanks haypo).
http://code.activestate.com/recipes/496741-object-proxying/ >>

My question was: why does isinstance(Proxy('abc'), str) works (give True), 
whereas re.match('abc', Proxy('abc')) fail.

It looks like you gave me the answer ;-)

--

___
Python tracker 

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



[issue9717] operator module - "in place" operators documentation

2010-09-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I agree that the docs for augmented assignments and the corresponding method 
and funciton can and should be improved.

But I do not like this as is. In particular, Python does not have in-place 
operators; it has methods that optionally do an operation in-place if the first 
argument (self) is mutable. I think adding "" is insufficient to avoid the 
confusion of the incorrect term. What I think should be said is that the ixxx 
methods and the corresponding operator.ixxx functions implement the operation 
part of operation-augmented assignments.

For the operator doc, I think we should expand the initial paragraph ("The 
operator module ...") a bit so that less needs to said specifically for the 
ixxx functions.

Also, most of your explanation is really about augmented assignment and the 
.__ixxx__ special methods, not specifically about operator.ixxx functions, and 
might better be added to the subsection 3.3.6. Emulating numeric typesof the 
special methods section (and cross-referenced from the operator doc) or even 
used to improve 6.2.1. Augmented assignment statements, and not buried in the 
operator doc. If people are confused about the .ixxx functions, they are 
probably confused also about a.a. and .__ixxx__ methods.

So I would like to attack the whole problem and expand this issue to "Improve 
operator-augmented assginment docs." and cover all three relevant doc areas, 
starting with
6.2.1. Augmented assignment statements. As already hinted, I would like to 
expand the title to "Operator-augmented assignment statements.".

I would like there to be a prototype example near the top: either "target_arg 
op= arg", with op explained as one of +-*/... or "target_arg += arg" as a 
specific example, or both. Since the target is also an arg reference, it 
obviously must refer to a single existing object. Then discuss the two cases of 
target immutable and mutable, as the current doc and your proposal does.

Otherwise in this section, I am mystified by the reference of "(See section 
Primaries for the syntax definitions for the last three symbols.)". I have also 
forgotten the meaning of "With the exception of assigning to tuples "; i should 
just be stated.

As already stated, I also believe the explanation of .__ixxx__ methods in 
3.3.6. Emulating numeric types could be improved a bit.

--
nosy: +terry.reedy
stage:  -> patch review
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.3

___
Python tracker 

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



[issue8746] *chflags detection broken on FreeBSD 9-CURRENT

2010-09-03 Thread Ned Deily

Ned Deily  added the comment:

Nick, can you provide a unit test and a patch file for the issue against the 
currently maintained versions?  Adding Alexandre to comment on why the 
configure change was made.

--
components: +Build
nosy: +alexandre.vassalotti, ned.deily
stage:  -> unit test needed
versions: +Python 2.7, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue1521950] shlex.split() does not tokenize like the shell

2010-09-03 Thread Dan Christian

Dan Christian  added the comment:

It's been a while since I looked at this.  I'm not really in a
position to contribute code/tests right now; but I can comment.

I don't think POSIX mode existed when I first reported this, but
that's where it makes sense.  I think all POSIX shells (borne, C,
korne), will behave the same way for the issues mentioned.

There are really two cases in one bug.

The first part is that the shell will split tokens at characters that
shlex doesn't.  The handling of &, |, ;, >, and < could be done by
adjusting the definition of shlex.wordchars.  The shell may also
understands things like: &&, ||, |&, and >&.  The exact definition of
these depends on the shell, so maybe it's best to just split them out
as separate tokens and let the user figure out the compound meanings.

The proper handling of quotes/escapes requires some kind of new
interface.  You need to distinguish between tokens that were modified
by the quote/escape rules and those that were not.  One suggestion is
to add a new method as such:

shlex.get_token2()
   Return a tuple of the token and the original text of the token
(including quotes and escapes).  Otherwise, this is the same as
shlex.get_token().

Comparing the two values for equality (or maybe identity) would tell
you if something special was going on.  You can always pass the second
value to a reconstructed command line without losing any of the
original parsing information.

-Dan

On Fri, Sep 3, 2010 at 10:27 AM, Éric Araujo  wrote:
>
> Éric Araujo  added the comment:
>
> Thanks for the report. Would you like to work on a patch, or translate your 
> examples into unit tests?
>
> The docs do not mention “&” at all, and platform discrepancies have to be 
> taken into account too, so I really don’t know if this is a bug fix for the 
> normal mode, the POSIX mode, or a feature request requiring a new argument to 
> the shlex function to preserve compatibility.
>
> --
> nosy: +eric.araujo, eric.smith
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



  1   2   >