[issue1475] test_popen fails when the directory contains a space

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1475] test_popen fails when the directory contains a space

2007-11-19 Thread Christian Heimes

New submission from Christian Heimes:

Joseph found the bug during his testing of the py3k branch. The problem
is in subprocess.py line 716.

http://pastebin.com/fa947767

--
assignee: astrand
components: Library (Lib), Tests, Windows
keywords: py3k
messages: 57696
nosy: astrand, joearmbruster, tiran
severity: normal
status: open
title: test_popen fails when the directory contains a space
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1474] PCbuild9 patch for trunk

2007-11-19 Thread Christian Heimes

New submission from Christian Heimes:

The patch contains the modifications to PCbuild9, socketmodule and some
structmember.h related files after a svn copy py3k/PCbuild9 trunk/

--
assignee: tiran
components: Windows
files: trunk_pcbuild9.patch
keywords: patch
messages: 57695
nosy: loewis, tiran
priority: normal
severity: normal
status: open
title: PCbuild9 patch for trunk
versions: Python 2.6
Added file: http://bugs.python.org/file8785/trunk_pcbuild9.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: Include/structmember.h
===
--- Include/structmember.h	(revision 59011)
+++ Include/structmember.h	(working copy)
@@ -77,8 +77,8 @@
 #define READONLY	1
 #define RO		READONLY		/* Shorthand */
 #define READ_RESTRICTED	2
-#define WRITE_RESTRICTED 4
-#define RESTRICTED	(READ_RESTRICTED | WRITE_RESTRICTED)
+#define PY_WRITE_RESTRICTED 4
+#define RESTRICTED	(READ_RESTRICTED | PY_WRITE_RESTRICTED)
 
 
 /* Obsolete API, for binary backwards compatibility */
Index: Modules/socketmodule.c
===
--- Modules/socketmodule.c	(revision 59011)
+++ Modules/socketmodule.c	(working copy)
@@ -297,9 +297,11 @@
 #endif
 
 #ifndef HAVE_INET_PTON
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
 int inet_pton(int af, const char *src, void *dst);
 const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
+#endif
 
 #ifdef __APPLE__
 /* On OS X, getaddrinfo returns no error indication of lookup
@@ -5039,6 +5041,7 @@
 
 
 #ifndef HAVE_INET_PTON
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
 
 /* Simplistic emulation code for inet_pton that only works for IPv4 */
 /* These are not exposed because they do not set errno properly */
@@ -5074,3 +5077,4 @@
 }
 
 #endif
+#endif
Index: Objects/funcobject.c
===
--- Objects/funcobject.c	(revision 59011)
+++ Objects/funcobject.c	(working copy)
@@ -163,13 +163,13 @@
 	 RESTRICTED|READONLY},
 {"__closure__",  T_OBJECT,  OFF(func_closure),
 	 RESTRICTED|READONLY},
-{"func_doc",  T_OBJECT, OFF(func_doc), WRITE_RESTRICTED},
-{"__doc__",   T_OBJECT, OFF(func_doc), WRITE_RESTRICTED},
+{"func_doc",  T_OBJECT, OFF(func_doc), PY_WRITE_RESTRICTED},
+{"__doc__",   T_OBJECT, OFF(func_doc), PY_WRITE_RESTRICTED},
 {"func_globals",  T_OBJECT, OFF(func_globals),
 	 RESTRICTED|READONLY},
 {"__globals__",  T_OBJECT,  OFF(func_globals),
 	 RESTRICTED|READONLY},
-{"__module__",T_OBJECT, OFF(func_module), WRITE_RESTRICTED},
+{"__module__",T_OBJECT, OFF(func_module), PY_WRITE_RESTRICTED},
 {NULL}  /* Sentinel */
 };
 
Index: Objects/methodobject.c
===
--- Objects/methodobject.c	(revision 59011)
+++ Objects/methodobject.c	(working copy)
@@ -180,7 +180,7 @@
 #define OFF(x) offsetof(PyCFunctionObject, x)
 
 static PyMemberDef meth_members[] = {
-	{"__module__",T_OBJECT, OFF(m_module), WRITE_RESTRICTED},
+	{"__module__",T_OBJECT, OFF(m_module), PY_WRITE_RESTRICTED},
 	{NULL}
 };
 
Index: PCbuild9/pyproject.vsprops
===
--- PCbuild9/pyproject.vsprops	(revision 59065)
+++ PCbuild9/pyproject.vsprops	(working copy)
@@ -37,7 +37,7 @@
 	/>
 	
 	
 			
 			
 			
 			
-			
-			
 			
@@ -684,15 +680,15 @@
 >
 			
 			
 			
 			
 			
 			
 			
 			
 			
 			
-			
-			
 			
@@ -744,6 +736,10 @@
 >
 			
 			
+			
+			
 			
@@ -760,6 +756,10 @@
 >
 			
 			
+			
+			
 			
@@ -772,6 +772,14 @@
 >
 			
 			
+			
+			
+			
+			
 			
@@ -800,15 +808,15 @@
 >
 			
 			
 			
 			
 			
 			
 			
 			
 			
 			
+			
+			
 			
@@ -1028,14 +1040,10 @@
 >
 			
 			
 			
 			
-			
-			
 			
@@ -1104,6 +1112,10 @@
 >
 			
 			
+			
+			
 			
@@ -1116,10 +1128,6 @@
 >
 			
 			
-			
-			
 			
@@ -1324,10 +1332,6 @@
 >
 			
 			
-			
-			
 			
Index: PCbuild9/pyproject.vsprops
===
--- Python/structmember.c	(revision 59011)
+++ Python/structmember.c	(working copy)
@@ -172,7 +172,7 @@
 		PyErr_SetString(PyExc_TypeError, "readonly attribute");
 		return -1;
 	}
-	if ((l->flags & WRITE_RESTRICTED) && PyEval_GetRestricted()) {
+	if ((l->flags & PY_WRITE_RESTRICTED) && PyEval_GetRestricted()) {
 		PyErr_SetString(PyExc_RuntimeError, "restricted attribute");
 		return -1;
 	}
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1473] Drop _EXPORTS macros in PCbuild9

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

You are right. I've checked the header files of the dependencies or
simply tried what happens when I remove some defines. The only macro
existing macro is BZ2_EXPORT but that's defined unless BZ2_IMPORT is
defined.

What about the remaining defines? I've copied them from the old projects:
_USRDLL - unknown to me
WIN32 - ?, is it even safe to define it for x64?
_WINDOWS - ?
_WIN32 - ?
_CRT_SECURE_NO_DEPRECATE - required to get rid of a bunch of warnings

__
Tracker <[EMAIL PROTECTED]>

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



[issue1473] Drop _EXPORTS macros in PCbuild9

2007-11-19 Thread Martin v. Löwis

New submission from Martin v. Löwis:

I believe it is safe to drop all the _EXPORTS macros (MMAP_EXPORTS,
WINSOUND_EXPORRTS etc) from all projects; atleast I cannot see any
reason for having them. Some are clearly bogus, e.g. unicodedata and
test_capi both define MMAP_EXPORTS, _socket defines WINSOUND_EXPORTS,
and _ssl defines _SOCKET_EXPORTS.

--
assignee: tiran
keywords: py3k
messages: 57693
nosy: loewis, tiran
severity: normal
status: open
title: Drop _EXPORTS macros in PCbuild9
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1472] Small bat files to build docs on Windows

2007-11-19 Thread Martin v. Löwis

Martin v. Löwis added the comment:

See also Tools/buildbot/buildmsi.bat. With cygwin installed, building
the documentation is as simple as

bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\pydoc.hhp

--
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

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



[issue1328] feature request: force BOM option

2007-11-19 Thread James G. sack (jim)

James G. sack (jim) added the comment:

More discussion of utf_8.py decoding behavior (and possible change):

For my needs, I would like the decoding parts of the utf_8 module to treat 
an initial BOM as an optional signature and skip it if there is one (just 
like the utf_8_sig decoder). In fact I have a working patch that replaces 
the utf_8_sig  decode, IncrementalDecoder and StreamReader components by 
direct transplants from utf_8_sig (as recently repaired -- there was a 
SteamReader error).

However the reason for discussion is to ask how it might impact existing 
code.

I can imagine there might be utf_8 client code out there which expects to 
see a leading U+feff as (perhaps) a clue that the output should be returned 
with a BOM-signature (say) to accomodate the guessed input requirements of 
the remote correspondant.

Making my work easier might actually make someone else's work (probably, 
annoyingly) harder. 

So what to do?

I can just live with code like
  if input[0] == u"\ufeff": 
input=input[1:}
spread around, and of course slightly different for incremental and stream 
inputs. 
  
  But I probably wouldn't. I would probably substitute a
  "my_utf_8" encoding for to make my code a little cleaner.

Another thought I had would require "the other guy" to update his code, but 
at least it wouldn't make his work annoyingly difficult like my original 
change might have.

Here's the basic outline:

- Add another decoder function that returns a 3-tuple
  decode3(input, errors='strict') => (data, consumed, had_bom)
where had_bom is true if a leading bom was seen and skipped

- then the usual decode is just something like
  def decode(input, errors='strict'):
return decode3(input, errors)[:2]

- add member variable and accessor to both IncrementalDecoder and 
StreamReader classes something like
  def had_bom(self):
return self.had_bom
and initialize/set the self.had_bom variable as required.

This complicates the interface somewhat and requires some additional 
documantation.

   Tpo document my original simple [-minded] idea required 
   possibly only a few more words in the existing paragraph
   on utf_8_sig, to mention that both mods had the same 
   decoding behavior but different encoding.

I thought of a secondary consideration: If utf_8 and utf_8_sig are "almost 
the same", it's possible that future refactoring might unify them with 
differences contained in behavor-flags (eg, skip_leading_bom). The leading 
bom processing might even be pushed into codecs.utf_8_decode for possible 
minor advantages. 

Is there anybody monitoring this who has an opinion on this? 

..jim

--
versions: +Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1472] Small bat files to build docs on Windows

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
keywords: patch, py3k
nosy: tiran
priority: low
severity: normal
status: open
title: Small bat files to build docs on Windows
type: rfe
versions: Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1470] py3k unit tests are removing %TEMP% dir on Windows

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Thanks, I've changed the code slightly.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1470] py3k unit tests are removing %TEMP% dir on Windows

2007-11-19 Thread Martin v. Löwis

Martin v. Löwis added the comment:

It seems that this patch has broken a lot of buildbots, e.g.

http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/2625/step-test/0

--
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

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



[issue1342] Crash on Windows if Python runs from a directory with umlauts

2007-11-19 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Please don't use the FileSystemEncoding on Windows for sys.path items.
Instead, it should use the wide API to perform all system calls. Py3k
shouldn't ever use the file system encoding for anything on Windows.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-19 Thread Martin v. Löwis

Martin v. Löwis added the comment:

So what's the definition of struct winsize on these systems?

Also, why do you think this is a bug in Python? AFAICT, the specific
ioctl call does not occur in Python, but in your own code.

--
nosy: +loewis
resolution:  -> invalid
status: open -> pending

__
Tracker <[EMAIL PROTECTED]>

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



[issue1468] MSI installer does not include SSL test .pem files

2007-11-19 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Thanks for the patch. It looked good, so I committed it as r59066. Let's
see whether the buildbot picks it up correctly.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1193] os.system() encoding bug on Windows

2007-11-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Note that the final .encode("cp936") is now invalid: os.system accepts
unicode strings, not bytes:

>>> os.system(("echo " + sys.stdin.readline().rstrip("\n")))

Corrected as r59065.

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2007-11-19 Thread Brett Cannon

Changes by Brett Cannon:


--
nosy: +brett.cannon

_
Tracker <[EMAIL PROTECTED]>

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



[issue1465] building python 2.6 with VC Express 2008 Beta2

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Have you studied my patch http://bugs.python.org/issue1455? I didn't
want to parse some files. Instead I used a much simpler approach in my
patch. I'm using the "vcvarsall.bat" to set up an environment and "set"
to read the new environment from stdout. It works like a charm and it
could even support cross compiling.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1470] py3k unit tests are removing %TEMP% dir on Windows

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

My bad, os.removedirs is removing all parent directories until it hits a
non empty dir.

Fixed in r59063 and r59064

--
resolution:  -> fixed
status: open -> closed
versions: +Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1342] Crash on Windows if Python runs from a directory with umlauts

2007-11-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Assign to myself.
Among the things to do, use Py_FileSystemDefaultEncoding (=mbcs on
Windows) to encode sys.path items; likewise in NullImporter_init and
other functions.
So many places to change, we need serious testcases.

--
assignee:  -> amaury.forgeotdarc
nosy: +amaury.forgeotdarc

__
Tracker <[EMAIL PROTECTED]>

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



[issue1067] test_smtplib failures (caused by asyncore)

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Guido, what needs to be done here?

--
nosy: +tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
assignee: nnorwitz -> gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1020] pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue718532] inspect, class instances and __getattr__

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
nosy: +gvanrossum


Tracker <[EMAIL PROTECTED]>


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



[issue1234] semaphore errors on AIX 5.2

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
assignee:  -> gvanrossum
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1470] py3k unit tests are removing %TEMP% dir on Windows

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

I may have nailed down the issue to test_shutil.test_copytree_simple

__
Tracker <[EMAIL PROTECTED]>

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



[issue1374] IDLE - minor FormatParagraph bug fix

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1193] os.system() encoding bug on Windows

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Amaury is planing to remove Win95 code and use the wide api everywhere.
It should fix the bug.

--
assignee:  -> amaury.forgeotdarc
components: +Interpreter Core, Windows -Library (Lib)
nosy: +amaury.forgeotdarc
priority: high -> normal
resolution: accepted -> 

__
Tracker <[EMAIL PROTECTED]>

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



[issue1257] atexit errors should result in nonzero exit code

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

The issue should be addressed in the C code.

--
assignee:  -> gvanrossum
nosy: +gvanrossum, tiran
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
keywords: +py3k
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-19 Thread fbvortex

fbvortex added the comment:

The following C code, when compiled with -lutil runs without reporting
any errors on both the sparc64 and i386 platforms on OpenBSD:

#include 
#include 
#include 
#include 
#include 
 
int main(void)
{
int fd;
struct winsize w;
 
w.ws_row = 25;
w.ws_col = 80;
w.ws_xpixel = w.ws_ypixel = 0;
 
forkpty(&fd, NULL, NULL, NULL);
if (ioctl(fd,TIOCSWINSZ, &w) == -1)
perror("ioctl");
return 0;
}

__
Tracker <[EMAIL PROTECTED]>

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



[issue1438] Calling base class methods is slow due to __instancecheck__ override in abc.py

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

I think the problem should be addressed after alpha 2.

--
keywords: +py3k
nosy: +tiran
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1377] test_import breaks on Linux

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Martin gave some insight into the problem
http://permalink.gmane.org/gmane.comp.python.python-3000.devel/10949

The test isn't going to work on systems that don't support UTF-8.

--
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1452] subprocess's popen.stdout.seek(0) doesn't raise an error

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


--
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1393] function comparing lacks NotImplemented error

2007-11-19 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>

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



[issue1471] ioctl doesn't work properly on 64-bit OpenBSD

2007-11-19 Thread fbvortex

New submission from fbvortex:

The following lines of code work on Linux platforms (amd64), and 32-bit
OpenBSD (i386), but not on 64-bit OpenBSD platforms (at least not on
amd64 or sparc64):

import fcntl,os,pty,termios,select,sys,struct,pwd,signal,os
pid,fd=pty.fork()
fcntl.ioctl(fd, termios.TIOCSWINSZ, struct.pack("",80,25,0,0))

This gives an "IOError: [Errno 25] Inappropriate ioctl for device"
exception.

The python version in question on OpenBSD is:

Python 2.5.1 (r251:54863, Nov 16 2007, 18:16:44) 
[GCC 3.3.5 (propolice)] on openbsd4

The winsize structure as dumped using sizeof(struct winsize) under
OpenBSD/sparc64 is 8 bytes large, and so is the result from the
struct.pack operation.  Forcing the endianness big or little in the
struct.pack formatting string has no effect on the error.

--
messages: 57673
nosy: fbvortex
severity: normal
status: open
title: ioctl doesn't work properly on 64-bit OpenBSD
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue1470] py3k unit tests are removing %TEMP% dir on Windows

2007-11-19 Thread Christian Heimes

New submission from Christian Heimes:

The unit test suite of py3k is removing the official %TEMP% directory of
Windows. It's not only causing errors in the test suite but also
creating havoc with other apps.

I'm not sure if it is related to my PCbuild9 or some changes to the unit
test suite. Since the update to VS 2008 I can't build the PCbuild any
more due to some .NET problems with Nant.

--
keywords: py3k
messages: 57672
nosy: tiran
priority: urgent
severity: urgent
status: open
title: py3k unit tests are removing %TEMP% dir on Windows
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1465] building python 2.6 with VC Express 2008 Beta2

2007-11-19 Thread zouguangxian

zouguangxian added the comment:

hi tiran, thanks for your suggest. :-) what can i do in the next? it's 
my pleasure to contribute my effort to python. 

It's seems that directory configurations of Visual Studio 2005/Visual C 
Express 2008 are stored in 
C:\Documents and Settings\USERNAME\Local Settings\Application 
Data\Microsoft\VisualStudio\8.0\VCComponents.dat
or
C:\Documents and Settings\USERNAME\Local Settings\Application 
Data\Microsoft\VCExpress\9.0\VCComponents.dat
devenv.exe/VCExpress.exe must be run first, this file will be created 
automatically.


[VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories]
Include Dirs=$(VCInstallDir)include;$(VCInstallDir)
atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir)include
Reference Dirs=$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir)
atlmfc\lib;$(VCInstallDir)lib
Library Dirs=$(VCInstallDir)lib;$(VCInstallDir)
atlmfc\lib;$(VCInstallDir)atlmfc\lib\i386;$(WindowsSdkDir)
\lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib
Source Dirs=$(VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)
atlmfc\src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstallDir)crt\src
Exclude Dirs=$(VCInstallDir)include;$(VCInstallDir)
atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir)
include;$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir)
atlmfc\lib;$(VCInstallDir)lib
Path Dirs=$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7
\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7
\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)
bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(SystemRoot)
\SysWow64;$(FxCopDir);$(PATH)

SCons has done some work on detecting msvc compiler. :-)

msi.py should extract msvcrxx.dll from *Merge Modules* or *redist* 
directory.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1468] MSI installer does not include SSL test .pem files

2007-11-19 Thread Paul Moore

Paul Moore added the comment:

The following looks like it may be OK. I have no way of testing it,
unfortunately, as I don't currently have a working build environment,
and I've no idea how to build the MSI even if I did...

Added file: http://bugs.python.org/file8782/msi.patch

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1468] MSI installer does not include SSL test .pem files

2007-11-19 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Thanks for pointing that out. The MSI build needs to be taught to pick
them up. If I seemingly don't find the time, feel free to contribute a
patch.

--
assignee:  -> loewis
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

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



[issue1469] SSL tests leak memory

2007-11-19 Thread Bill Janssen

New submission from Bill Janssen:

I'm seeing leaks in the test_ssl run, after various socket.py changes. 
I'm looking into it.

--
assignee: janssen
components: Library (Lib)
keywords: py3k
messages: 57667
nosy: janssen
severity: normal
status: open
title: SSL tests leak memory
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1468] MSI installer does not include SSL test .pem files

2007-11-19 Thread Paul Moore

New submission from Paul Moore:

The latest MSI daily snapshot installer for Python 2.6 (19 Nov) does not
include the .pem files for the SSL tests from the Lib\test directory.

--
components: Installation
messages: 57666
nosy: pmoore
severity: normal
status: open
title: MSI installer does not include SSL test .pem files
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1337] Tools/msi/msi.py does not work with PCBuild8

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Just for your information, Kevin:

I've created a PCbuild9 directory for VS 2008 Beta 2 in the py3k branch.
I've also changed msi.py to work with PCbuild and PCbuild9.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1395] py3k: duplicated line endings when using read(1)

2007-11-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Committed the patch in r59060.

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1467] error in TestResult.addError and TestResult.addFailure

2007-11-19 Thread Raghuram Devarakonda

New submission from Raghuram Devarakonda:

The page at
http://docs.python.org/dev/library/unittest.html#module-unittest says:

-
TestResult.addError(test, err)

Called when the test case test raises an unexpected exception err is
a tuple of the form returned by sys.exc_info(): (type, value, traceback).

The default implementation appends (test, err) to the instance's
errors attribute.
--

Starting from 2.2, a formatted traceback is added to the "error"
attribute instead of the actual sys.exc_info(). The same error is
present for addFailure() as well.

--
components: Documentation
messages: 57663
nosy: draghuram
severity: minor
status: open
title: error in TestResult.addError and TestResult.addFailure
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Erik Andersén

Erik Andersén added the comment:

No, I definitely don't want to ignore them, I want them reported in a 
manner that is relevant to them. Just say that the test was not implemented.
No tracebacks for debugging since there is nothing to debug.

In addition to a TestRunner I need a new TestCase and a new TestResult, 
which is what is in the patch,
although I changed the classes rather than inherit from them.

Erik

__
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Sorry Erik, but I don't think you should try to compensate for your
flawed methodology by trying to change the unittest framework. End of
discussion.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1455] VS2008, quick hack for distutils.msvccompiler

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Updated compiler and linker args from the project command lines.

Added file: http://bugs.python.org/file8781/py3k_vs2008_3.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: Lib/distutils/msvccompiler.py
===
--- Lib/distutils/msvccompiler.py	(revision 59043)
+++ Lib/distutils/msvccompiler.py	(working copy)
@@ -1,145 +1,152 @@
-"""distutils.msvccompiler
+"""distutils.msvc9compiler
 
 Contains MSVCCompiler, an implementation of the abstract CCompiler class
-for the Microsoft Visual Studio.
+for the Microsoft Visual Studio 2008.
 """
 
 # Written by Perry Stoll
 # hacked by Robin Becker and Thomas Heller to do a better job of
 #   finding DevStudio (through the registry)
+# ported to VS 2008 by Christian Heimes
 
 __revision__ = "$Id$"
 
-import sys, os
-from distutils.errors import \
- DistutilsExecError, DistutilsPlatformError, \
- CompileError, LibError, LinkError
-from distutils.ccompiler import \
- CCompiler, gen_preprocess_options, gen_lib_options
+import os
+import subprocess
+import sys
+from distutils.errors import (DistutilsExecError, DistutilsPlatformError, 
+CompileError, LibError, LinkError)
+from distutils.ccompiler import (CCompiler, gen_preprocess_options,
+gen_lib_options)
 from distutils import log
 
-_can_read_reg = False
-try:
-import _winreg
+import _winreg
 
-_can_read_reg = True
-hkey_mod = _winreg
+RegOpenKeyEx = _winreg.OpenKeyEx
+RegEnumKey = _winreg.EnumKey
+RegEnumValue = _winreg.EnumValue
+RegError = _winreg.error
 
-RegOpenKeyEx = _winreg.OpenKeyEx
-RegEnumKey = _winreg.EnumKey
-RegEnumValue = _winreg.EnumValue
-RegError = _winreg.error
+HKEYS = (_winreg.HKEY_USERS,
+ _winreg.HKEY_CURRENT_USER,
+ _winreg.HKEY_LOCAL_MACHINE,
+ _winreg.HKEY_CLASSES_ROOT)
 
-except ImportError:
-try:
-import win32api
-import win32con
-_can_read_reg = True
-hkey_mod = win32con
+VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
+WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
+NET_BASE = r"Software\Microsoft\.NETFramework"
+ARCHS = {'DEFAULT' : 'x86',
+'intel' : 'x86', 'x86' : 'x86',
+'amd64' : 'x64', 'x64' : 'x64',
+'itanium' : 'ia64', 'ia64' : 'ia64',
+}
 
-RegOpenKeyEx = win32api.RegOpenKeyEx
-RegEnumKey = win32api.RegEnumKey
-RegEnumValue = win32api.RegEnumValue
-RegError = win32api.error
-except ImportError:
-log.info("Warning: Can't read registry to find the "
- "necessary compiler setting\n"
- "Make sure that Python modules _winreg, "
- "win32api or win32con are installed.")
-pass
+class Reg:
+"""Helper class to read values from the registry
+"""
 
-if _can_read_reg:
-HKEYS = (hkey_mod.HKEY_USERS,
- hkey_mod.HKEY_CURRENT_USER,
- hkey_mod.HKEY_LOCAL_MACHINE,
- hkey_mod.HKEY_CLASSES_ROOT)
-
-def read_keys(base, key):
-"""Return list of registry keys."""
-try:
-handle = RegOpenKeyEx(base, key)
-except RegError:
-return None
-L = []
-i = 0
-while True:
+@classmethod
+def get_value(cls, path, key):
+for base in HKEYS:
+d = cls.read_values(base, path)
+if d and key in d:
+return d[key]
+raise KeyError(key)
+
+@classmethod
+def read_keys(cls, base, key):
+"""Return list of registry keys."""
 try:
-k = RegEnumKey(handle, i)
+handle = RegOpenKeyEx(base, key)
 except RegError:
-break
-L.append(k)
-i += 1
-return L
+return None
+L = []
+i = 0
+while True:
+try:
+k = RegEnumKey(handle, i)
+except RegError:
+break
+L.append(k)
+i += 1
+return L
 
-def read_values(base, key):
-"""Return dict of registry keys and values.
-
-All names are converted to lowercase.
-"""
-try:
-handle = RegOpenKeyEx(base, key)
-except RegError:
-return None
-d = {}
-i = 0
-while True:
+@classmethod
+def read_values(cls, base, key):
+"""Return dict of registry keys and values.
+
+All names are converted to lowercase.
+"""
 try:
-name, value, type = RegEnumValue(handle, i)
+handle = RegOpenKeyEx(base, key)
 except RegError:
-break
-name = name.lower()
-d[convert_mbcs(name)] = convert_mbcs(value)
-i += 1
-return d
+return None
+d = {}
+i = 0
+while True:
+try:
+name, value, type = RegEnumValue(handle, i)
+except

[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

> Possible, but cumbersome. You have to analyze each case and see if it

Have you tried to write a Test Runner that ignores
NotImplementedError? You may have to override TestResult.addError.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Erik Andersén

Erik Andersén added the comment:

Possible, but cumbersome. You have to analyze each case and see if it 
depends on code not written.
When you implement a new piece of code, you have to go through all your 
tests to see if that one should
be included.
Also you don't get any reporting on the coverage of the code.
If you accidentally forget to uncomment a test case, you may never 
realize that you have a bug --
at least not until it happens in real life.

Erik

__
Tracker <[EMAIL PROTECTED]>

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



[issue1705362] cannot change cursor color in IDLE

2007-11-19 Thread Tal Einat

Tal Einat added the comment:

Fixed in patch 1725576.

--
title: cannot change cursor color in IDLE  -> cannot change cursor color in IDLE

_
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Sorry, just comment out those tests until you're ready to write the code.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Erik Andersén

Erik Andersén added the comment:

Raghuram Devarakonda skrev:
> Raghuram Devarakonda added the comment:
>
> I don't think unittest automatically treats all exceptions as failures.
> Failures are those that are explicitly flagged with assert* and fail*
> methods. All other exceptions result in "errors". I think what you are
> asking for is to special case one such error but am not sure if it is
> worth it.
>
> --
> nosy: +draghuram
>
> __
> Tracker <[EMAIL PROTECTED]>
> 
> __
>   

You are right, I used the wrong word.  I mean that NotImplementedError 
should be treated as a special *error*.

If you have ever written the test cases before you write the code, you 
will get a huge amount of uninteresting output from
errors that come from tests to code you havn't written yet. This will 
drown the real errors and failures from the code
you are actually testing and debugging. What I want is to have unittest 
report these differently so that I can see what are the
real bugs the code, not
to spam me with tracebacks I will never look at for test cases that 
refer to not implemented code.

Erik

__
Tracker <[EMAIL PROTECTED]>

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



[issue1462] About this document refers to SourceForge tracker

2007-11-19 Thread Brett Cannon

Brett Cannon added the comment:

Fixed in r59059.

--
nosy: +brett.cannon
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1464] inet_pton redefined while building with windows SDK 6.0

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

I've solved the issue in the py3k differently. I've checked for 
!(defined(_MSC_VER) && _MSC_VER>1499) but your check is better. Thanks!

--
assignee:  -> tiran
keywords: +patch, py3k
nosy: +tiran
priority:  -> normal
resolution:  -> accepted
versions: +Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1465] building python 2.6 with VC Express 2008 Beta2

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

I've removed the ml.exe. Please do NOT upload copyright protected
material here. 

You should really coordinate your effort with us. :) I've already
created a PCbuild9 directory in the py3k source tree. Once it is
finished I'm going to backport it to 2.6. I'll have a look if I can use
some of your ideas.

My PCbuild9 directory builds all of the dependencies except of tcltk
automatically - including separate 64bit builds.

--
assignee:  -> tiran
keywords: +patch
nosy: +tiran
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

I don't think unittest automatically treats all exceptions as failures.
Failures are those that are explicitly flagged with assert* and fail*
methods. All other exceptions result in "errors". I think what you are
asking for is to special case one such error but am not sure if it is
worth it.

--
nosy: +draghuram

__
Tracker <[EMAIL PROTECTED]>

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



[issue1465] building python 2.6 with VC Express 2008 Beta2

2007-11-19 Thread Christian Heimes

Changes by Christian Heimes:


Removed file: http://bugs.python.org/file8779/ml.exe

__
Tracker <[EMAIL PROTECTED]>

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



[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

3.0 fix committed as revision 59058.

--
resolution:  -> accepted
status: open -> closed
versions: +Python 3.0

_
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

No. If you're testing something that's not implemented, it is correct to
see that as a failure. Talk to anyone doing TDD.

--
nosy: +gvanrossum
resolution:  -> wont fix
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1466] Special reporting of NotImplementedError in unittest

2007-11-19 Thread Erik Andersén

New submission from Erik Andersén:

When a unittest test case raises an Exception, that test case is
considered a failure. However, raising NotImplementedError is not a
failure. It is something completely normal during development and 
simply indicates that the functionality has not yet been implemented.
Compare this to a test case that genuinely fails, which means that the
implementation does something different from what is is supposed to do.

I therefore think test cases raising NotImplementedError should not be
treated as failures, but be reported separately as what they are --
parts of the program that have not yet been implemented. Reporting such 
test cases as failures will give a lot of failure warnings that may 
detract attention from those cases that are genuinely errors. Also, 
SimpleTextRunner will report a lot of useless stack traces for these 
cases, thereby makeing it harder to find the stack traces for those
tests that realy failed.

I have made a patch to unittest that reports such cases as "not 
implemented" rather than as failures. This includes changes to the 
documentation and unit test case for unittest and doctest. 
I have included 
"added/changed in version 2.6" remarks in the documentation, so
you have to changed these if the patch gets into some other version.

Patch against 59056 attached

--
components: Library (Lib)
files: unittest.diff
messages: 57648
nosy: erik_andersen
severity: normal
status: open
title: Special reporting of NotImplementedError in unittest
type: rfe
Added file: http://bugs.python.org/file8780/unittest.diff

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Fixed the OSX failure in revision 59055; it was due to /tmp being a
symlink, and fixed by application of realpath().

Keeping this open until the 3.0 version is working.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Oops, those are failures under 3.0, probably due to Crys's merge.  On
Linux, the 2.6 version of the test doesn't fail.  I see 2 failing tests
on OSX with the 2.6 version, which I will look into.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1465] building python 2.6 with VC Express 2008 Beta2

2007-11-19 Thread zouguangxian

zouguangxian added the comment:

patch of tix8.4.2

Added file: http://bugs.python.org/file8778/tix8.4.2.patch

__
Tracker <[EMAIL PROTECTED]>

__Only in tix8.4.2/win/: Release
diff -u Tix8.4.2-src/Tix8.4.2/win/makefile.vc tix8.4.2/win/makefile.vc
--- Tix8.4.2-src/Tix8.4.2/win/makefile.vc   Fri Nov 17 06:33:32 2006
+++ tix8.4.2/win/makefile.vcSun Nov 18 15:45:22 2007
@@ -122,8 +122,8 @@
 link32 = "$(TOOLS32)\bin\link.exe"
 include32  = -I"$(TOOLS32)\include"
 
-RMDIR  = $(TCL_DIR)\win\rmd.bat
-MKDIR  = $(TCL_DIR)\win\mkd.bat
+RMDIR  = $(TK_DIR)\win\rmd.bat
+MKDIR  = $(TK_DIR)\win\mkd.bat
 RM = del
 
 #
@@ -137,7 +137,7 @@
 !ENDIF
 
 # declarations common to all linker options
-lcommon= /NODEFAULTLIB /RELEASE /NOLOGO
+lcommon= /RELEASE /NOLOGO
 
 # declarations for use on Intel i386, i486, and Pentium systems
 !IF "$(MACHINE)" == "IX86"
@@ -222,6 +222,25 @@
 TMPDIR = Debug
 !ENDIF
 
+#--
+# MSVC8 (ships with Visual Studio 2005) generates a manifest
+# file that we should link into the binaries. This is how.
+#--
+
+_VC_MANIFEST_EMBED_EXE=
+_VC_MANIFEST_EMBED_DLL=
+!if ![cl /Zs /Tc NUL 2>&1 | find "Version 12" > NUL]
+VCVER=6
+!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 13" > NUL]
+VCVER=7
+!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 14" > NUL]
+VCVER=8
+_VC_MANIFEST_EMBED_EXE=if exist [EMAIL PROTECTED] mt -nologo -manifest [EMAIL 
PROTECTED] -outputresource:$@;1
+_VC_MANIFEST_EMBED_DLL=if exist [EMAIL PROTECTED] mt -nologo -manifest [EMAIL 
PROTECTED] -outputresource:$@;2
+!else
+VCVER=0
+!endif
+
 #
 # File and dir names for Tcl
 #
@@ -232,6 +251,10 @@
 TCL_TMPDIR = Debug
 !ENDIF
 
+!IF $(VCVER) > 6
+TCL_TMPDIR =$(TCL_TMPDIR)_VC$(VCVER)
+!ENDIF
+
 !IF "$(TCL_PATCH)" == ""
 TCL_DIR= $(SRC_ROOT)\tcl$(TCL_MAJOR).$(TCL_MINOR)
 TK_DIR = $(SRC_ROOT)\tk$(TCL_MAJOR).$(TCL_MINOR)
@@ -258,6 +281,10 @@
 TK_TMPDIR  = Debug
 !ELSE
 TK_TMPDIR  = Release
+!ENDIF
+
+!IF $(VCVER) > 6
+TK_TMPDIR =$(TK_TMPDIR)_VC$(VCVER)
 !ENDIF
 
 !IF "$(TK_PATCH)" == ""
Only in tix8.4.2/win/: python.mak
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1465] building python 2.6 with VC Express 2008 Beta2

2007-11-19 Thread zouguangxian

zouguangxian added the comment:

patch of socketmodule.c.

Added file: http://bugs.python.org/file8777/socketmodule.c.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: Modules/socketmodule.c
===
--- Modules/socketmodule.c  (revision 59052)
+++ Modules/socketmodule.c  (working copy)
@@ -297,9 +297,11 @@
 #endif
 
 #ifndef HAVE_INET_PTON
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
 int inet_pton(int af, const char *src, void *dst);
 const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
+#endif
 
 #ifdef __APPLE__
 /* On OS X, getaddrinfo returns no error indication of lookup
@@ -5039,7 +5041,7 @@
 
 
 #ifndef HAVE_INET_PTON
-
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
 /* Simplistic emulation code for inet_pton that only works for IPv4 */
 /* These are not exposed because they do not set errno properly */
 
@@ -5072,5 +5074,5 @@
/* Should set errno to EAFNOSUPPORT */
return NULL;
 }
-
 #endif
+#endif
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Actually the failures aren't OSX-specific:

==
FAIL: test_directory (__main__.CmdLineTest)
--
Traceback (most recent call last):
  File "Lib/test/test_cmd_line_script.py", line 117, in test_directory
self._check_script(script_dir, script_name, script_dir)
  File "Lib/test/test_cmd_line_script.py", line 96, in _check_script
self.assertEqual(exit_code, 0, data)
AssertionError: /usr/local/google/home/guido/python/py3k/python:
'/tmp/tmpLGqOxc' is a directory, cannot continue


==
FAIL: test_directory_compiled (__main__.CmdLineTest)
--
Traceback (most recent call last):
  File "Lib/test/test_cmd_line_script.py", line 124, in
test_directory_compiled
self._check_script(script_dir, compiled_name, script_dir)
  File "Lib/test/test_cmd_line_script.py", line 96, in _check_script
self.assertEqual(exit_code, 0, data)
AssertionError: /usr/local/google/home/guido/python/py3k/python:
'/tmp/tmprNwPih' is a directory, cannot continue


==
FAIL: test_zipfile (__main__.CmdLineTest)
--
Traceback (most recent call last):
  File "Lib/test/test_cmd_line_script.py", line 130, in test_zipfile
self._check_script(zip_name, None, zip_name)
  File "Lib/test/test_cmd_line_script.py", line 96, in _check_script
self.assertEqual(exit_code, 0, data)
AssertionError:   File "/tmp/tmpInCAJO/test_zip.zip", line 1
PK# statements being executed
  ^
SyntaxError: invalid syntax
[25429 refs]


==
FAIL: test_zipfile_compiled (__main__.CmdLineTest)
--
Traceback (most recent call last):
  File "Lib/test/test_cmd_line_script.py", line 137, in
test_zipfile_compiled
self._check_script(zip_name, None, zip_name)
  File "Lib/test/test_cmd_line_script.py", line 96, in _check_script
self.assertEqual(exit_code, 0, data)
AssertionError:   File "/tmp/tmpqh6g1C/test_zip.zip", line 1
SyntaxError: Non-UTF-8 code starting with '\xc8' in file
/tmp/tmpqh6g1C/test_zip.zip on line 2, but no encoding declared; see
http://python.org/dev/peps/pep-0263/ for details
[25428 refs]

_
Tracker <[EMAIL PROTECTED]>

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



[issue1461] 0**0 should raise an error

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Right.

--
nosy: +gvanrossum
resolution:  -> wont fix
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1464] inet_pton redefined while building with windows SDK 6.0

2007-11-19 Thread zouguangxian

New submission from zouguangxian:

in Microsoft SDKs\Windows\v6.0A\Include\ws2tcpip.h, inet_pton was 
defined when NTDDI_VERSION >= NTDDI_LONGHORN with the following lines:

#if (NTDDI_VERSION >= NTDDI_LONGHORN)
WINSOCK_API_LINKAGE
INT
WSAAPI
inet_pton(
__inINT Family,
__inPCSTR   pszAddrString,
__out_bcount(sizeof(IN6_ADDR))  PVOID   pAddrBuf
);
... ...

so in socketmodule.c, inet_pton should not be defined in such a 
situation.

--
components: Library (Lib)
files: socketmodule.c.patch
messages: 57639
nosy: weck
severity: normal
status: open
title: inet_pton redefined while building with windows SDK 6.0
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file8775/socketmodule.c.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: socketmodule.c
===
--- socketmodule.c  (revision 59052)
+++ socketmodule.c  (working copy)
@@ -297,9 +297,11 @@
 #endif
 
 #ifndef HAVE_INET_PTON
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
 int inet_pton(int af, const char *src, void *dst);
 const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
+#endif
 
 #ifdef __APPLE__
 /* On OS X, getaddrinfo returns no error indication of lookup
@@ -5039,7 +5041,7 @@
 
 
 #ifndef HAVE_INET_PTON
-
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
 /* Simplistic emulation code for inet_pton that only works for IPv4 */
 /* These are not exposed because they do not set errno properly */
 
@@ -5072,5 +5074,5 @@
/* Should set errno to EAFNOSUPPORT */
return NULL;
 }
-
 #endif
+#endif
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1463] Minor error in mimetypes docs

2007-11-19 Thread Facundo Batista

Facundo Batista added the comment:

Fixed in the trunk (rev 59053).

Thank you!

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

I can look into this, as I have OSX on my laptop.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1463] Minor error in mimetypes docs

2007-11-19 Thread Kent Johnson

New submission from Kent Johnson:

In the mimetypes module docs
http://docs.python.org/lib/module-mimetypes.html

the section on add_type() should read "When strict is *true (the
default)* the mapping".

--
components: Documentation
messages: 57636
nosy: kjohnson
severity: minor
status: open
title: Minor error in mimetypes docs

__
Tracker <[EMAIL PROTECTED]>

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



[issue1462] About this document refers to SourceForge tracker

2007-11-19 Thread Kent Johnson

New submission from Kent Johnson:

"About this document" http://docs.python.org/lib/about.html still refers
to "the Python Bug Tracker at SourceForge". The bug tracker link is
incorrect (should be the new tracker) and the SF reference is obsolete.

--
components: Documentation
messages: 57635
nosy: kjohnson
severity: normal
status: open
title: About this document refers to SourceForge tracker

__
Tracker <[EMAIL PROTECTED]>

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



[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-19 Thread Nick Coghlan

Nick Coghlan added the comment:

Reverted status to open until I figure out why the tests are failing on
the Mac OSX buildbot.

--
resolution: accepted -> 
status: closed -> open

_
Tracker <[EMAIL PROTECTED]>

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




[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-19 Thread Walter Dörwald

Walter Dörwald added the comment:

Checked in your change and the test as r59049 (trunk) and r59050 (2.5).
Thanks for the patch.

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1461] 0**0 should raise an error

2007-11-19 Thread Jean-Marc Gillet

Jean-Marc Gillet added the comment:

See http://en.wikipedia.org/wiki/Exponentiation "Zero to the zero
power". There are pros and cons of 0**0==1 so if you mark this one as
"wontfix" I promise not to bother you again :-)

__
Tracker <[EMAIL PROTECTED]>

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



[issue1461] 0**0 should raise an error

2007-11-19 Thread Jean-Marc Gillet

New submission from Jean-Marc Gillet:

The result is actually undefined, as x**0 gives 1 and 0**x gives 0.

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 1**0
1
>>> 0**1
0
>>> 0**0
1

--
components: +Interpreter Core
versions: +Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue1461] 0**0 should raise an error

2007-11-19 Thread Jean-Marc Gillet

Changes by Jean-Marc Gillet:


--
nosy: jmgillet
severity: minor
status: open
title: 0**0 should raise an error
type: behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue1460] codecs utf7 decoding error

2007-11-19 Thread Árni Már Jónsson

Árni Már Jónsson added the comment:

Added a test file.

Added file: http://bugs.python.org/file8774/test

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1460] codecs utf7 decoding error

2007-11-19 Thread Árni Már Jónsson

New submission from Árni Már Jónsson:

There is a utf-7 decoding error when decoding strings which have a shift
sequence at a certain place. To reproduce run the attached program on a
file containing the string:
"0123456789012345678901234567890123456789012345678901234567890123456789X+-".

The shift sequence starts at character 72. The culprit seems to be in
codecs.py: StreamReader.read. The input is split on the 72 character
boundary, and the first decode call raises an exception since the shift
sequence is not terminated. The second one falls back 1 character,
raises no exception, but the previous exception is raised since there is
no newline in the output (?).

The lines I don't understand are, and are the ones raising the exception.

if len(lines)<=1:
  raise

--
files: utf7.py
messages: 57629
nosy: arnimar
severity: normal
status: open
title: codecs utf7 decoding error
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file8773/utf7.py

__
Tracker <[EMAIL PROTECTED]>

__

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