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

2007-11-20 Thread Nicholas Marriott

Nicholas Marriott added the comment:

I can also reproduce this on OpenBSD/amd64 and was one of the people who
discussed it with the submitter before he created this report.

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

The definition of struct winsize on both 32-bit and 64-bit OpenBSD
platforms is:

struct winsize {
unsigned short  ws_row; /* rows, in characters */
unsigned short  ws_col; /* columns, in characters */
unsigned short  ws_xpixel;  /* horizontal size, pixels */
unsigned short  ws_ypixel;  /* vertical size, pixels */
};

We have verified that (sizeof (struct winsize)) is 8 on all three
platforms (32-bit i386, and 64-bit amd64 and sparc64).

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

This Python code fails:

fcntl.ioctl(fd, termios.TIOCSWINSZ, struct.pack("",80,25,0,0))

(Error: IOError: [Errno 25] Inappropriate ioctl for device) This code
also fails with the same error message (I would expect EINVAL instead):

fcntl.ioctl(0, termios.TIOCSWINSZ, "")

Corresponding test C code to call the ioctl (as listed in a previous
message) works without problems on all three platforms. I don't know how
Python fcntl.ioctl works and perhaps the problem is not Python, but I am
having to try fairly hard to think what else could be involved.

The constant appears to be the correct ioctl number. (Python code:

python2.5 -c 'import termios; print "%d" % (termios.TIOCSWINSZ)'

matches C code:

#include 
int main(void) { printf("%ld\n", TIOCSWINSZ); }

on all three platforms.)

I am told it works on Linux. However, Linux declares ioctl as:

int ioctl(int d, int request, ...); 

So 'request' is 32-bits, but on OpenBSD ioctl is declared as:

int ioctl(int d, unsigned long request, ...);

So on amd64 and sparc64, 'request' is 64-bits. Could this be a factor?

-- Nicholas.

--
nosy: +nicm

__
Tracker <[EMAIL PROTECTED]>

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



[issue1400] Py3k's print() flushing problem

2007-11-20 Thread Christian Heimes

Changes by Christian Heimes:


--
assignee:  -> gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1320] PCBuild8 Solution Support Changes

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

I've fixed most of the problems in the last couple of days. On my box VS
2005 builds the ssl, tkinter and msi modules. However the future lies in
PCbuild9 and VS 2008.

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



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

2007-11-20 Thread Nicholas Marriott

Nicholas Marriott added the comment:

Okay, looks like my guess was correct. The diff at the end of this mail 
makes it work on OpenBSD/amd64 and it continues to work on i386, but it 
will probably break Linux (due to the problem it was working around 
mentioned in the comment at the beginning). I don't know enough about 
the Python build system to suggest a correct fix. (SUSv3 seems to 
suggest ioctl's request should be int, so perhaps OpenBSD is ultimately 
at fault.)

fcntl_ioctl in fcntlmodule.c seems to have some other potential 
problems on 64-bit archs too, as it seems to coerce the ioctl argument 
(potentially a pointer) into an int.

-- Nicholas.

--- fcntlmodule.c.orig  Tue Nov 20 09:39:12 2007
+++ fcntlmodule.c   Tue Nov 20 09:59:50 2007
@@ -101,7 +101,7 @@
   the signed int 'code' variable, because Python turns 
0x800
   into a large positive number (PyLong, or PyInt on 64-bit
   platforms,) whereas C expects it to be a negative int */
-   int code;
+   unsigned long code;
int arg;
int ret;
char *str;
@@ -109,7 +109,7 @@
int mutate_arg = 1;
char buf[IOCTL_BUFSZ+1];  /* argument plus NUL byte */
 
-   if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
+   if (PyArg_ParseTuple(args, "O&Lw#|i:ioctl",
  conv_descriptor, &fd, &code, 
 &str, &len, &mutate_arg)) {
char *arg;
@@ -160,7 +160,7 @@
}
 
PyErr_Clear();
-   if (PyArg_ParseTuple(args, "O&Is#:ioctl",
+   if (PyArg_ParseTuple(args, "O&Ls#:ioctl",
  conv_descriptor, &fd, &code, &str, &len)) 
{
if (len > IOCTL_BUFSZ) {
PyErr_SetString(PyExc_ValueError,
@@ -182,7 +182,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
-"O&I|i;ioctl requires a file or file descriptor,"
+"O&L|i;ioctl requires a file or file descriptor,"
 " an integer and optionally an integer or buffer argument",
  conv_descriptor, &fd, &code, &arg)) {
  return NULL;

__
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-20 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Agreed. I will try to stay with PyObjects* until really needed by a system call.

__
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-20 Thread Joseph Armbruster

Joseph Armbruster added the comment:

I believe the issue lies with the cmd command line parameters and
insufficient quoting:

Currently, if this string is passed into CreateProcess as args, the call
will fail:

C:\WINDOWS\System32\cmd.exe /c "C:\Documents and
Settings\joe\Desktop\Development\Python3k\dev\pcbuild9\python.exe" -c
"import sys
; print(sys.argv)" foo bar

For sanity, when I try to execute this from a command prompt manually, I
noticed this behavior:

C:\Documents and Settings\joe>C:\WINDOWS\System32\cmd.exe /c
"C:\Documents and Settings\joe\Desktop\Development\Python3k\dev\pcbui
ld9\python.exe" -c "import sys; print(sys.argv)" foo bar
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.

I read through cmd.exe and it is has this note:

"""
If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:

1.  If all of the following conditions are met, then quote characters
on the command line are preserved:

- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
  where special is one of: &<>()@^|
- there are one or more whitespace characters between the
  the two quote characters
- the string between the two quote characters is the name
  of an executable file.

2.  Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.
"""

I believe args falls under section 2.

--
nosy: +JosephArmbruster

__
Tracker <[EMAIL PROTECTED]>

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



[issue1436] logging.config.fileConfig, NameError: name 'RotatingFileHandler' is not defined

2007-11-20 Thread sebastian

sebastian added the comment:

thank you very much...

but: [...] the class and arguments are evaluated using the
logging package's namespace. [...]

does this mean, it is not possible to use user-defined handlers,
naturally residing outside python's class library (and logging package),
when applying fileConfig()?

__
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-20 Thread zouguangxian

zouguangxian added the comment:

Why don't use "Visual Studio 200x Command Prompt" to get a shell window 
with correct environment settings? 

In this way msvccompiler.py can get LIB, INCLUDE, LIBPATH, PATH with 
os.environ.get.

--
nosy: +weck

__
Tracker <[EMAIL PROTECTED]>

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



[issue1476] missing debug configuration for make_versioninfo.vcproj

2007-11-20 Thread Joseph Armbruster

New submission from Joseph Armbruster:

Revision: 59073

make_versioninfo.vcproj is missing the debug configuration.  As a
result, if you try to build python in debug, you will receive an error
during compile in python_nt.rc, due to this block:

#define MS_WINDOWS
#include "modsupport.h"
#include "patchlevel.h"
#ifdef _DEBUG
#   include "pythonnt_rc_d.h"
#else
#   include "pythonnt_rc.h"
#endif

This is because the file pythonnt_rc_d.h is never created.  The attached
patch should resolve this.

--
components: Windows
files: pythonnt.patch
messages: 57704
nosy: JosephArmbruster
severity: normal
status: open
title: missing debug configuration for make_versioninfo.vcproj
type: compile error
versions: Python 3.0
Added file: http://bugs.python.org/file8786/pythonnt.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: PCbuild9/make_versioninfo.vcproj
===
--- PCbuild9/make_versioninfo.vcproj	(revision 59073)
+++ PCbuild9/make_versioninfo.vcproj	(working copy)
@@ -1,7 +1,7 @@
 
 
 		
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
 	
 	
 	
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1476] missing debug configuration for make_versioninfo.vcproj

2007-11-20 Thread Joseph Armbruster

Changes by Joseph Armbruster:


--
nosy: +tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue1462525] URI parsing library

2007-11-20 Thread vincent kraeutler

vincent kraeutler added the comment:

Quite like urlparse, uriparse does not fail on input which does not
represent valid URI's. At least not early or reliably enough.
Specifically, I noticed that urisplit does not fail on input strings
with a missing scheme, such as "foo.com/bar". 

I see no (straightforward) solution to this problem, short of using a
proper parser library such as Haskell's Parsec (I unfortunately know of
no Python equivalent), but I thought I might want to report this issue
nevertheless. 

The following might work as a quick-fix: Replace
regex.match(foo,bar).groups()

with something like:

mm = re.match(regex, uri)
sp = mm.span()
if (-1 in sp) or (sp[1] - sp[0] != len(uri)):
raise ValueError, "uri regex did not match complete input"

p = mm.groups()

--
nosy: +vincentk

_
Tracker <[EMAIL PROTECTED]>

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



[issue1436] logging.config.fileConfig, NameError: name 'RotatingFileHandler' is not defined

2007-11-20 Thread Vinay Sajip

Vinay Sajip added the comment:

No, it doesn't. See this post:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/21be57fae7e9381a

__
Tracker <[EMAIL PROTECTED]>

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



[issue1476] missing debug configuration for make_versioninfo.vcproj

2007-11-20 Thread Joseph Armbruster

Joseph Armbruster added the comment:

Whoops, looks like I missed the solution, which is also needed for the
patch.  Here's the correct version.  Do the following to test:

- Load up the PCBuild9 solution
- set python as the "Start Up" project,
- select Debug configuration
- press ctrl-shift-b
- press F5
.. it should run in debug

- select Release configuration
- press ctrl-shift-b
- press F5
.. it should run in release

Added file: http://bugs.python.org/file8787/pythonnt.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: PCbuild9/make_versioninfo.vcproj
===
--- PCbuild9/make_versioninfo.vcproj	(revision 59073)
+++ PCbuild9/make_versioninfo.vcproj	(working copy)
@@ -1,7 +1,7 @@
 
 
 		
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
 	
 	
 	
Index: PCbuild9/pcbuild.sln
===
--- PCbuild9/pcbuild.sln	(revision 59073)
+++ PCbuild9/pcbuild.sln	(working copy)
@@ -118,8 +118,8 @@
 		Release|x64 = Release|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Release|Win32
-		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Release|Win32
+		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32
 		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Release|Win32
 		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32
 		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32
___
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-20 Thread Martin v. Löwis

Martin v. Löwis added the comment:

See the MSDN for details. IIUC:
- _WIN32 is defined by the compiler, always, unless the platform is
WIN16 (which is no longer supported). It is even defined on Win64 (where
the compiler also defines _WIN64). So there should be no need to defined
it explicitly.
- WIN32 is checked-for in WinSock2.h. I couldn't figure out when
precisely it is supposed to be defined.
- _USRDLL apparently was once a mechanism of how to integrate with MFC.
It apparently isn't really used anymore in VS 2003 (afx.h still uses it
to trigger linkage of __afxForceUSRDL); I suppose it is safe to drop for
Python
- I couldn't quite figure out what _WINDOWS is good for.
- _CRT_SECURE_NO_DEPRECATE as you say, although that's also defined in
pyconfig.h.

__
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-20 Thread Martin v. Löwis

Martin v. Löwis added the comment:

It's tedious to require users to invoke such a shell, and it would
produce an endless flood of support requests if we made that a
requirement. So requiring to build in such a shell is absolutely
unacceptable.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1476] missing debug configuration for make_versioninfo.vcproj

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

Changes by Martin v. Löwis:


--
assignee:  -> tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds

2007-11-20 Thread Sean B. Palmer

New submission from Sean B. Palmer:

The following error is uncatchable:

>>> try: ur'\U0010'
... except UnicodeDecodeError: pass
... 
UnicodeDecodeError: 'rawunicodeescape' codec can't decode byte 0x5c 
in position 0: \U out of range

This is in a narrow unicode build:

>>> sys.version_info, hex(sys.maxunicode)
((2, 5, 1, 'final', 0), '0x')

Of course the r in ur'...' is redundant in the test case above, but
there are cases in which it isn't...

>>> ur'\U0010\test'
u'\U0010\\test'
- from a wide unicode build

>>> ur'\U0010\test'
UnicodeDecodeError: 'rawunicodeescape' codec can't decode byte 0x5c 
in position 0: \U out of range
- from the narrow unicode build

The problem occurs with .decode('raw-unicode-escape') too.

>>> '\U0010\test'.decode('raw-unicode-escape')
Traceback (most recent call last):
[&c.]

Most surprisingly of all, however, this problem doesn't occur when you
don't use a raw string:

>>> u'\U0010\\test'
u'\U0010\\test'

So there is at least a workaround for all cases, which is why this bug
is marked as Severity: minor. It did take a while to work out that what
manifests with ur mightn't apply to u, however; it's usually one's first
thought to think the bug is with you, not with python.

--
components: Unicode
messages: 57710
nosy: sbp
severity: minor
status: open
title: UnicodeDecodeError that cannot be caught in narrow unicode builds
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



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

2007-11-20 Thread Bill Janssen

Bill Janssen added the comment:

Looks good to me, too.

--
nosy: +janssen

__
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-20 Thread Christian Heimes

Christian Heimes added the comment:

WIN32 is required. Without WIN32 defined I'm getting errors in the
locale module. _WINDOWS seems to be obsolete.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1476] missing debug configuration for make_versioninfo.vcproj

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

Thanks ;)

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



[issue1473] Drop _EXPORTS macros in PCbuild9

2007-11-20 Thread Christian Heimes

Changes by Christian Heimes:


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



[issue1328] feature request: force BOM option

2007-11-20 Thread Guido van Rossum

Changes by Guido van Rossum:


--
nosy:  -gvanrossum

__
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-20 Thread Guido van Rossum

Guido van Rossum added the comment:

IDLE stuff is never mine.

--
assignee: gvanrossum -> kbk

__
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-20 Thread Guido van Rossum

Guido van Rossum added the comment:

I have no way to test this.

--
assignee: gvanrossum -> 
priority: high -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1731717] race condition in subprocess module

2007-11-20 Thread Tom Culliton

Tom Culliton added the comment:

This or some variant also shows up with scons
(http://scons.tigris.org/issues/show_bug.cgi?id=1839) leading to some
nasty intermittent build failures.  Neal may remember how we addressed
this for a Process class in a past life.  Basically it's OK to collect
all the child exit codes if you record the results and return them when
requested. This would mean that waitpid and the like would have to check
a cached list of PIDs and exit statuses before actually waiting.  Don't
know if that's possible/any help in this case or not...

Traceback (most recent call last):
  File "/usr/lib/scons-0.97.0d20070918/SCons/Taskmaster.py", line 194,
in execute
self.targets[0].build()
  File "/usr/lib/scons-0.97.0d20070918/SCons/Node/__init__.py", line
365, in build
stat = apply(executor, (self,), kw)
  File "/usr/lib/scons-0.97.0d20070918/SCons/Executor.py", line 139, in
__call__
return self.do_execute(target, kw)
  File "/usr/lib/scons-0.97.0d20070918/SCons/Executor.py", line 129, in
do_execute
status = apply(act, (self.targets, self.sources, env), kw)
  File "/usr/lib/scons-0.97.0d20070918/SCons/Action.py", line 332, in
__call__
stat = self.execute(target, source, env)
  File "/usr/lib/scons-0.97.0d20070918/SCons/Action.py", line 479, in
execute
result = spawn(shell, escape, cmd_line[0], cmd_line, ENV)
  File "/usr/lib/scons-0.97.0d20070918/SCons/Platform/posix.py", line
104, in spawnvpe_spawn
return exec_spawnvpe([sh, '-c', string.join(args)], env)
  File "/usr/lib/scons-0.97.0d20070918/SCons/Platform/posix.py", line
68, in exec_spawnvpe
stat = os.spawnvpe(os.P_WAIT, l[0], l, env)
  File "/sw/pkgs/python-2.3.5_00/lib/python2.3/os.py", line 553, in spawnvpe
return _spawnvef(mode, file, args, env, execvpe)
  File "/sw/pkgs/python-2.3.5_00/lib/python2.3/os.py", line 504, in
_spawnvef
wpid, sts = waitpid(pid, 0)
OSError: [Errno 10] No child processes
scons: building terminated because of errors.

--
nosy: +tom_culliton

_
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-20 Thread Joseph Armbruster

Joseph Armbruster added the comment:

Applying quotations around args within the shell case appears to take
care of it, any thoughts?

Added file: http://bugs.python.org/file8788/subprocesspatch.patch

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1478] pythoncore.vcproj fails to generate buildinfo (when spaces in path)

2007-11-20 Thread Joseph Armbruster

New submission from Joseph Armbruster:

Executable path should be quoted, in case build environment is located
in a path containing spaces.  I also made the Debug / Release versions
similar in style.

--
components: Windows
files: pythoncore.patch
messages: 57718
nosy: JosephArmbruster
severity: normal
status: open
title: pythoncore.vcproj fails to generate buildinfo (when spaces in path)
type: compile error
versions: Python 3.0
Added file: http://bugs.python.org/file8789/pythoncore.patch

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1478] pythoncore.vcproj fails to generate buildinfo (when spaces in path)

2007-11-20 Thread Joseph Armbruster

Changes by Joseph Armbruster:


--
nosy: +tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue1478] pythoncore.vcproj fails to generate buildinfo (when spaces in path)

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

Fixed in r59079
Thanks again!

--
keywords: +patch, py3k
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



[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

Fixed in r59081 and r59080

py3k will follow at the next svnmerge

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



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

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

Fixed in r59083
The sentinel in the methods list of XMLparsetype was missing.

--
resolution: accepted -> 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



[issue1460] codecs utf7 decoding error

2007-11-20 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

The utf-7 incremental decoder was indeed losing its state between two
chunks of data.
Corrected as r59076.

--
nosy: +amaury.forgeotdarc
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-20 Thread Christian Heimes

Christian Heimes added the comment:

Fixed in py3k and soon to be fixed in trunk when my PCbuild9 directory
is ready.

--
resolution: accepted -> 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



[issue1403] py_compile and compileall need unit tests

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

Comitted in r59092

--
resolution: accepted -> 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



[issue1306] Embedded python reinitialization

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

Python 3.0 suffers from an problem with reinitialization but I can't
reproduce the bug with the release branch of 2.5. Python 2.6 also does
fine but leaks some references.

// reinit_test.c
#include "Python.h"
#define ROUNDS 5

int main(void) {
int i;
for (i=0; i < ROUNDS; i++) {
printf("round %d\n", i+1);
Py_Initialize();
Py_Finalize();
}

return 0;
}

gcc -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -IInclude -I. -pthread 
-Xlinker -lpthread -ldl  -lutil -lm -export-dynamic -o reinit_test
reinit_test.c libpython2.5.a 

Python 3.0
--

./reinit_test
round 1
[23832 refs]
round 2
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
  File "/usr/local/lib/python3.0/encodings/__init__.py", line 32, in

from . import aliases
ValueError: Cannot encode path item
Aborted

Python 2.6
--

$ ./reinit_test
round 1
[7349 refs]
round 2
[7393 refs]
round 3
[7428 refs]
round 4
[7463 refs]
round 5
[7498 refs]

Python 2.5
--
$ ./reinit_test
round 1
[7309 refs]
round 2
[7349 refs]
round 3
[7380 refs]
round 4
[7411 refs]
round 5
[7442 refs]

--
keywords: +py3k
nosy: +tiran
priority:  -> normal
severity: urgent -> normal
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



[issue1475] test_popen fails when the directory contains a space

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

I like to have Peter Astrand look over the patch first. He has written
most of the subprocess module.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1306] Embedded python reinitialization

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

The patch solves one issue. It resets the Py_DefaultFileSystemEncoding
to NULL when no default value was given. However the finalization fails
after the 3rd round at 

if (op == &refchain ||
op->_ob_prev->_ob_next != op || op->_ob_next->_ob_prev != op)
Py_FatalError("UNREF invalid object");

$ gdb ./reinit_test
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
Starting program: /home/heimes/dev/python/py3k/reinit_test
[Thread debugging using libthread_db enabled]
[New Thread -1210464064 (LWP 8060)]
round 1
[23832 refs]
round 2
[24558 refs]
round 3
Fatal Python error: UNREF invalid object

Program received signal SIGABRT, Aborted.
[Switching to Thread -1210464064 (LWP 8060)]
0xe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xe410 in __kernel_vsyscall ()
#1  0xb7dc7875 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7dc9201 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x0805d62d in Py_FatalError (msg=0x81790d8 "UNREF invalid object")
at Python/pythonrun.c:1761
#4  0x080aac57 in _Py_ForgetReference (op=0x821d728) at
Objects/object.c:1536
#5  0x080aaca6 in _Py_Dealloc (op=0x821d728) at Objects/object.c:1555
#6  0x080c0f52 in tupledealloc (op=0x82ebc3c) at Objects/tupleobject.c:169
#7  0x080aacb1 in _Py_Dealloc (op=0x82ebc3c) at Objects/object.c:1556
#8  0x080c0f52 in tupledealloc (op=0x83f9154) at Objects/tupleobject.c:169
#9  0x080aacb1 in _Py_Dealloc (op=0x83f9154) at Objects/object.c:1556
#10 0x08083605 in code_dealloc (co=0x83b1bc8) at Objects/codeobject.c:276
#11 0x080aacb1 in _Py_Dealloc (op=0x83b1bc8) at Objects/object.c:1556
#12 0x081691bf in func_dealloc (op=0x83f7924) at Objects/funcobject.c:555
#13 0x080aacb1 in _Py_Dealloc (op=0x83f7924) at Objects/object.c:1556
#14 0x080a272e in PyDict_Clear (op=0x83f6df4) at Objects/dictobject.c:798
#15 0x080a524f in dict_tp_clear (op=0x83f6df4) at Objects/dictobject.c:1793
#16 0x08068c13 in delete_garbage (collectable=0xbf9fa024, old=0x81978e8)
at Modules/gcmodule.c:688
#17 0x0806909f in collect (generation=2) at Modules/gcmodule.c:824
#18 0x080699ea in PyGC_Collect () at Modules/gcmodule.c:1238
#19 0x0805a022 in Py_Finalize () at Python/pythonrun.c:416
#20 0x08059791 in main () at reinit_test.c:9
(gdb)

--
assignee:  -> gvanrossum
nosy: +gvanrossum
Added file: http://bugs.python.org/file8790/py3k_reinit.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: Python/pythonrun.c
===
--- Python/pythonrun.c	(Revision 59091)
+++ Python/pythonrun.c	(Arbeitskopie)
@@ -502,6 +502,12 @@
 	/* Cleanup Unicode implementation */
 	_PyUnicode_Fini();
 
+	/* reset file system default encoding */
+	if (!Py_HasFileSystemDefaultEncoding) {
+		free(Py_FileSystemDefaultEncoding);
+	Py_FileSystemDefaultEncoding = NULL;
+	}
+
 	/* XXX Still allocated:
 	   - various static ad-hoc pointers to interned strings
 	   - int and float free list blocks
Index: Python/bltinmodule.c
===
--- Python/bltinmodule.c	(Revision 59091)
+++ Python/bltinmodule.c	(Arbeitskopie)
@@ -16,10 +16,13 @@
 */
 #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
 const char *Py_FileSystemDefaultEncoding = "mbcs";
+const int Py_HasFileSystemDefaultEncoding = 1;
 #elif defined(__APPLE__)
 const char *Py_FileSystemDefaultEncoding = "utf-8";
+const int Py_HasFileSystemDefaultEncoding = 1;
 #else
 const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
+const int Py_HasFileSystemDefaultEncoding = 0;
 #endif
 
 static PyObject *
Index: Include/fileobject.h
===
--- Include/fileobject.h	(Revision 59091)
+++ Include/fileobject.h	(Arbeitskopie)
@@ -20,6 +20,7 @@
If non-NULL, this is different than the default encoding for strings
 */
 PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
+PyAPI_DATA(const int) Py_HasFileSystemDefaultEncoding;
 
 /* Internal API
 
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1479] csv module is leaking references

2007-11-20 Thread Christian Heimes

New submission from Christian Heimes:

test_csv leaked [1, 1, 1, 1] references, sum=4

--
components: Extension Modules, Library (Lib)
keywords: py3k
messages: 57728
nosy: tiran
priority: normal
severity: normal
status: open
title: csv module is leaking references
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



[issue1480] sqlite module is leaking lots of references

2007-11-20 Thread Christian Heimes

New submission from Christian Heimes:

test_sqlite leaked [325, 325, 325, 325] references, sum=1300

--
components: Extension Modules
keywords: py3k
messages: 57729
nosy: tiran
priority: high
severity: normal
status: open
title: sqlite module is leaking lots of references
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



[issue1469] SSL tests leak memory

2007-11-20 Thread Christian Heimes

Christian Heimes added the comment:

I don't see leaks when I run the tests with

$ ./python Lib/test/regrtest.py -R:: test_ssl.py
test_ssl
beginning 9 repetitions
123456789
.
1 test OK.
[80034 refs]

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



[issue1475] test_popen fails when the directory contains a space

2007-11-20 Thread Peter Åstrand

Peter Åstrand added the comment:

I think there's some confusion in this bug. The report on
http://pastebin.com/fa947767 indicates a problem in test_popen. This is
a test for os.popen() and it does not have anything to do with the
subprocess module. I believe it is test_popen.py that should be fixed. 

In general, quoting in Windows is very difficult. The documentation
quoted in msg57701 might be correct for some modern version of Windows,
but not for, say, command.com on an older Windows version. I believe the
subprocess is fairly complete when it comes to quoting etc, so changes
should be avoided if possible. 

Since this bug is not about the subprocess module, I've re-assigned to
nobody, hope this is OK.

--
assignee: astrand -> 

__
Tracker <[EMAIL PROTECTED]>

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