[issue9810] bzip2 build sometimes fails (VS8.0)

2010-09-09 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto :

bzip2 project sometimes fails to build pyd file. This is because

(snip)
nmake /nologo /f makefile.msc lib
(snip)
nmake /nologo /f makefile.msc clean

is run by bzip2.vcproj, but "lib" command won't create
bzip2.exe nor bzip2recover.exe, wheres "clean" will try
to delete these files without checking their existence.

Technically it is easy to fix this. (Replace "del ..." with
if exists ... del .in bzip2-1.0.5/makefile.msc)
But is it allowed to modify external project files? Thank you.

--
components: Build
messages: 115930
nosy: ocean-city
priority: normal
severity: normal
status: open
title: bzip2 build sometimes fails (VS8.0)
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue9609] make cProfile multi-stack aware

2010-09-09 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue9622] Allow to set profile/trace function globally

2010-09-09 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-09-09 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Here is the patch. On VS8.0 or above,
* Avoid DebugBreak() call by IsDebuggerPresent().
* Tell abort() not to print message to console or window.

--
keywords: +patch
Added file: http://bugs.python.org/file18809/py3k_fix_test_capi_crash.patch

___
Python tracker 

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



[issue9733] Can't iterate over multiprocessing.managers.DictProxy

2010-09-09 Thread Ask Solem

Ask Solem  added the comment:

> I expected I could iterate over a DictProxy as I do over a
> regular dict.

DictProxy doesn't support iterkeys(), itervalues(), or iteritems() either.
So while

iter(d)

could do
 iter(d.keys())

behind the scenes, it would mask the fact that this would not return
an *iterator* over the keys, but send a potentially long list of keys back to 
the client.

--

___
Python tracker 

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



[issue9811] strftime strips '%' from unknown format codes on OS X

2010-09-09 Thread Sverre Johansen

New submission from Sverre Johansen :

There seems to be a platform difference in the way stftime handles 
unknown format codes.

In OSX Python removes the percentage sign from the returned string when the 
format code is unknown. In Linux it leaves it.

Look at the following example:

This is Python 3.1.2 in Ubuntu:

Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now().strftime("%q")
'%q'

And this is Python 3.1.2 on Max OSX:

Python 3.1.2 (r312:79147, Sep  9 2010, 11:11:24) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now().strftime("%q")
'q'

I've gotten the same result in 2.5, 2.6 and 3.1.

FYI, this broke some code that parsed the same string first with strftime, and 
then used string interpolation (The mac version
deleted all percentage signs before '('):

>>> datetime.datetime.now().strftime("%Y - %(foobar)s") % {"foobar": "egg"}

This does not work in OSX.

--
components: Library (Lib)
messages: 115933
nosy: sverrejoh
priority: normal
severity: normal
status: open
title: strftime strips '%' from unknown format codes on OS X
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue9796] Add summary tables for unittest API

2010-09-09 Thread Michael Foord

Michael Foord  added the comment:

This has been on my 'todo list' for a long time. Feel free to get to it before 
me. Please *don't* include the now deprecated assert* methods in the table. I'd 
like to move all the deprecated methods to a separate section of the 
documentation.

As Raymond says - just the assert* methods from TestCase will be the biggest 
value for the unittest docs, so +1 to his comment (and suggestion on grouping 
and including example).

--

___
Python tracker 

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



[issue9799] Compilation error for branch py3k on AIX 6

2010-09-09 Thread Sébastien Sablé

Sébastien Sablé  added the comment:

OK for me to close it as a compiler bug since there is a workaround.

It would be great if we could detect this compiler and deactivate this 
optimization automatically, but I am too lazy to search the xlc compiler 
documentation for a way to do that.

I suppose that the people who will be confronted to this problem (the 4 of us 
in the world who compile Python on AIX with xlc) will find this issue and the 
correct flag to make it work.

Also I am using xlc instead of gcc because it provides some better optimization 
for this architecture. If the computed gotos optimization only works with gcc, 
then it may be more interesting to use the gcc compiler instead (I will do some 
benchs).

--
status: pending -> open

___
Python tracker 

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



[issue9811] strftime strips '%' from unknown format codes on OS X

2010-09-09 Thread Sverre Johansen

Sverre Johansen  added the comment:

This is because of differences in GNU and BSD C stdlib; I get the same results 
using the BSD and GNU versions of `date`.

$ date +"%q"

What does Python typically do in cases like this?

--

___
Python tracker 

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



[issue9799] Compilation error for branch py3k on AIX 6

2010-09-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
status: open -> closed

___
Python tracker 

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



[issue9804] ascii() does not always join surrogate pairs

2010-09-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

New patch with tests.

--
Added file: http://bugs.python.org/file18810/backslashsurrogates2.patch

___
Python tracker 

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



[issue3125] test_multiprocessing causes test_ctypes to fail

2010-09-09 Thread Ask Solem

Ask Solem  added the comment:

As no one has been able to confirm that this is still an issue, I'm closing it 
as "out of date". The issue can be reopened if necessary.

--
resolution: accepted -> out of date
status: open -> closed

___
Python tracker 

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



[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error

2010-09-09 Thread Ask Solem

Ask Solem  added the comment:

As no one is able to confirm that this is still an issue, I'm closing it. It 
can be reopened if necessary.

--
resolution:  -> out of date

___
Python tracker 

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



[issue9757] Add context manager protocol to memoryviews

2010-09-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

Sounds good - I'd say just commit whenever you're happy with it then.

--

___
Python tracker 

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



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

2010-09-09 Thread STINNER Victor

STINNER Victor  added the comment:

#6543 changed the encoding of the filename argument of 
PyRun_SimpleFileExFlags() (and all functions based on PyRun_SimpleFileExFlags) 
and c_filename attribute of the compiler (private) structure in Python 3.1.3: 
use utf-8 in strict mode instead of filesystem encoding with surrogateescape.

--

___
Python tracker 

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



[issue9713] Py_CompileString fails on non decode-able paths.

2010-09-09 Thread STINNER Victor

STINNER Victor  added the comment:

#6543 changed the encoding of the filename argument of 
PyRun_SimpleFileExFlags() (and all functions based on PyRun_SimpleFileExFlags) 
and c_filename attribute of the compiler (private) structure in Python 3.1.3: 
use utf-8 in strict mode instead of filesystem encoding with surrogateescape.

--

___
Python tracker 

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



[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-09-09 Thread STINNER Victor

STINNER Victor  added the comment:

See also #9713 (Py_CompileString fails on non decode-able paths) and #9738 
(Document the encoding of functions bytes arguments of the C API).

--

___
Python tracker 

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



[issue9757] Add context manager protocol to memoryviews

2010-09-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r84649. Thanks for the comments!

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9609] make cProfile multi-stack aware

2010-09-09 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
nosy: +stutzbach

___
Python tracker 

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



[issue9808] Implement os.getlogin on Windows

2010-09-09 Thread Brian Curtin

Brian Curtin  added the comment:

After a quick glance the patch looks alright, just cleaned a few things up in 
issue9808.diff (moved the #include up with others, removed 'is not None' from 
tests).

The test skip decorator could also be moved to the LoginTests class level. Is 
there any reason the variables could legitimately be different from what 
getlogin reports?

--
assignee:  -> brian.curtin
stage:  -> patch review
Added file: http://bugs.python.org/file18811/issue9808.diff

___
Python tracker 

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



[issue2745] Add support for IsWow64Process

2010-09-09 Thread R. David Murray

R. David Murray  added the comment:

See also Issue7860.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9811] strftime strips '%' from unknown format codes on OS X

2010-09-09 Thread R. David Murray

R. David Murray  added the comment:

Python's strftime is a thin wrapper around the system strftime.  This means, 
for example, that a slightly different set of % codes is supported on windows 
vs linux.  So, from Python's point of view this is at *most* a doc bug.

That said, I think there have been some rumblings about writing our own 
strftime, but I don't know if anyone is serious about it.

--
assignee:  -> d...@python
components: +Documentation -Library (Lib)
nosy: +belopolsky, d...@python, r.david.murray
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-09 Thread Ken Basye

Ken Basye  added the comment:

I think Eric is correct; it's a dupe.  And I was wrong about not otherwise 
being able to format an empty dictionary - "%s" % (d,) will always work and is 
arguably the right thing to do anyway.

--
type: behavior -> 
versions:  -Python 3.1, Python 3.2

___
Python tracker 

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



[issue9812] cPickle segfault with nested dicts in threaded env

2010-09-09 Thread Kenneth Dombrowski

New submission from Kenneth Dombrowski :

FreeBSD 8.0-RELEASE-p2
Python 2.5.5
amd64

attached diff provides a test for cpickle which reproduces a segfault when 
pickling >15 nested dicts in a threaded environment 

cpickle.patch attached to http://bugs.python.org/issue3640 applys cleanly to 
the 2.5 source and fixes this issue

i understand 2.5 is no longer maintained except for security fixes, i leave it 
up to the maintainers to decide if this segfault warrants a security patch 

thank you

--
components: Extension Modules
files: test_cpickle.nested_dicts_in_threaded_env.diff
keywords: patch
messages: 115950
nosy: kdombrowski
priority: normal
severity: normal
status: open
title: cPickle segfault with nested dicts in threaded env
type: crash
versions: Python 2.5
Added file: 
http://bugs.python.org/file18812/test_cpickle.nested_dicts_in_threaded_env.diff

___
Python tracker 

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



[issue9809] Wrong Registery Entries on win64

2010-09-09 Thread Brian Curtin

Brian Curtin  added the comment:

Wow6432Node registry entries are for applications running WOW - aka 32-bit 
applications on a 64-bit platform. The 64-bit Python installer is placing its 
entries in the appropriate location.

See the winreg documentation for information that might help fixing this 
setuptools bug, in particular this section: 
http://docs.python.org/py3k/library/winreg#bit-specific

--
components: +Windows
nosy: +brian.curtin
resolution:  -> invalid
stage:  -> committed/rejected
type:  -> behavior
versions:  -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3

___
Python tracker 

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



[issue9805] Documentation on old-style formatting of dicts is overly restrictive

2010-09-09 Thread R. David Murray

Changes by R. David Murray :


--
resolution:  -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> %-formatting and dicts

___
Python tracker 

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



[issue9811] strftime strips '%' from unknown format codes on OS X

2010-09-09 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> I think there have been some rumblings about writing our own strftime

Yes, see issue #3173.

Another related issue is #9650 which discusses how to properly document 
strftime codes.

--

___
Python tracker 

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



[issue9808] Implement os.getlogin on Windows

2010-09-09 Thread Jon Anglin

Jon Anglin  added the comment:

I can't answer that for the 'LOGNAME' environment variable on non-Windows 
systems, I was just keying off of what the docs claimed. As for Windows, I just 
came across this article http://support.microsoft.com/kb/273633 that shows we 
can not rely on this in the test.  

I only put those environment variables in the test because I thought this test 
was a little weak (what else can we do?)

user_name = os.getlogin()
self.assertNotEqual(0, len(user_name))

Even though %USERNAME% == os.getlogin() MOST of the time. It should be removed 
from the test.

--

___
Python tracker 

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



[issue9609] make cProfile multi-stack aware

2010-09-09 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Here is a new patch.  When 'allthreads' is specified to 
cProfile.Profile.enable(), profling is enabled on all threads.
The testsuite tests to see that all threads do indeed register, it does not 
attempt to validate the timings.

It turns it on for all threads (in all interpreter states).  Maybe this is 
overdoing it.  Interpreter states is something new to me, a py3k feature?

Now, the problem with this approach is that it only works with threads already 
in existence when called.  The "global" appcoach that we used to solve a 
similar problem in Stackless Python, however, will invoke the tracing/profiling 
functionality for all tasklets, even if they were new.  The same would be 
useful for threads in regular python, especially in long running server 
applications.

However, this patch stands on its own.  This particular shortcoming could be 
fixed later.

--
Added file: http://bugs.python.org/file18813/cprofile2.patch

___
Python tracker 

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



[issue9609] make cProfile multi-stack aware

2010-09-09 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
nosy: +georg.brandl
stage:  -> patch review

___
Python tracker 

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



[issue9808] Implement os.getlogin on Windows

2010-09-09 Thread Jon Anglin

Jon Anglin  added the comment:

Here is an updated patch with the updated test.  This test does not use either 
the LOGNAME or USERNAME environment variables.

--
Added file: http://bugs.python.org/file18814/issue9808.diff

___
Python tracker 

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



[issue9812] cPickle segfault with nested dicts in threaded env

2010-09-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Python has several known crashers, they are not considered as security holes.
It seems that FreeBSD has a small stack size for threads (64k); did you try to 
increase it with thread.stack_size(10**6)?

--
nosy: +amaury.forgeotdarc, loewis

___
Python tracker 

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



[issue9410] Add Unladen Swallow's optimizations to Python 3's pickle.

2010-09-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch was finally committed in r84653. Thanks to everyone who participated 
in this.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

IMO there should not be any need to fetch information from config.h or the 
Makefile.
What about a sys.build_config dictionary containing all the necessary data?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue7300] Unicode arguments in str.format()

2010-09-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue8556] Confusing string formatting examples

2010-09-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue9804] ascii() does not always join surrogate pairs

2010-09-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

I agree with the feature and the patch, with two minor nits:
- Py_UCS4 should be used in place of "unsigned long"
- "*p >= 0xD800" is the most selective test and should be the first

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue8913] Document that datetime.__format__ is datetime.strftime

2010-09-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue9195] Link in docs from "String Formatting Operations" to "Template Strings"

2010-09-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-09-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue6081] str.format_from_mapping()

2010-09-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-09-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox

___
Python tracker 

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



[issue1467929] %-formatting and dicts

2010-09-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Too late for 2.x and 3.1.

--
nosy: +flox
versions:  -Python 2.7, Python 3.1

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Matthias Klose

Matthias Klose  added the comment:

+1

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Amaury, you mention a sys.build_config dictionary, but I think it should 
actually be baked into the sysconfig module, possibly as a _sysconfig extension 
module.  sysconfig is the new goodness for getting at this, and I don't think 
it ought to have to go through a sys dictionary to get the information.

I'd be willing to work on this, if we can get some consensus.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Dave Malcolm

Dave Malcolm  added the comment:

For reference, the patch that I'm currently applying to Fedora's build of 
Python-3.2a1 can be seen at:
  
http://pkgs.fedoraproject.org/gitweb/?p=python3.git;a=blob_plain;f=python-3.2a1-debug-build.patch;hb=HEAD

It appears to be very similar to Matthias' patch (it was originally based on an 
earlier version of Debian's python 2 patch, which I fixed up against Fedora's 
python 2, changed some aspects I wasn't happy with, then ported to python 3.1, 
then fixed up to 3.2a1 IIRC)

For further reference, Fedora's python3.spec has these comments that I wrote on 
the patch:
# Patch to support building both optimized vs debug stacks DSO ABIs, sharing
# the same .py and .pyc files, using "_d.so" to signify a debug build of an
# extension module.
#
# Based on Debian's patch for the same, 
#  
http://patch-tracker.debian.org/patch/series/view/python2.6/2.6.5-2/debug-build.dpatch
# 
# (which was itself based on the upstream Windows build), but with some
# changes:
#
#   * Debian's patch to dynload_shlib.c looks for module_d.so, then module.so,
# but this can potentially find a module built against the wrong DSO ABI.  We
# instead search for just module_d.so in a debug build
#
#   * We remove this change from configure.in's build of the Makefile:
#   SO=$DEBUG_EXT.so
# so that sysconfig.py:customize_compiler stays with shared_lib_extension='.so'
# on debug builds, so that UnixCCompiler.find_library_file can find system
# libraries (otherwise "make sharedlibs" fails to find system libraries,
# erroneously looking e.g. for "libffi_d.so" rather than "libffi.so")
#
#   * We change Lib/distutils/command/build_ext.py:build_ext.get_ext_filename
# to add the _d there, when building an extension.  This way, "make sharedlibs"
# can build ctypes, by finding the sysmtem libffi.so (rather than failing to
# find "libffi_d.so"), and builds the module as _ctypes_d.so
#   
#   * Similarly, update build_ext:get_libraries handling of Py_ENABLE_SHARED by
# appending "_d" to the python library's name for the debug configuration
#
#   * We modify Modules/makesetup to add the "_d" to the generated Makefile
# rules for the various Modules/*.so targets
#
# This may introduce issues when building an extension that links directly
# against another extension (e.g. users of NumPy?), but seems more robust when
# searching for external libraries
#
#   * We don't change Lib/distutils/command/build.py: build.build_purelib to
# embed plat_specifier, leaving it as is, as pure python builds should be
# unaffected by these differences (we'll be sharing the .py and .pyc files)
#
#   * We introduce DEBUG_SUFFIX as well as DEBUG_EXT:
# - DEBUG_EXT is used by ELF files (names and SONAMEs); it will be "_d" for
# a debug build
# - DEBUG_SUFFIX is used by filesystem paths; it will be "-debug" for a
# debug build
#
#   Both will be empty in an optimized build.  "_d" contains characters that
# are valid ELF metadata, but this leads to various ugly filesystem paths (such
# as the include path), and DEBUG_SUFFIX allows these paths to have more natural
# names.  Changing this requires changes elsewhere in the distutils code.
#
#   * We add DEBUG_SUFFIX to PYTHON in the Makefile, so that the two
# configurations build parallel-installable binaries with different names
# ("python-debug" vs "python").
#
#   * Similarly, we add DEBUG_SUFFIX within python-config and
#  python$(VERSION)-config, so that the two configuration get different paths
#  for these.
#
#  * Patch runtests.sh to support supplying a value for PYTHON, so that we can
# run the tests against each of the builds

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

You are right; but the data could not be appended to sysconfig.py, because this 
file is shared by the different builds.
A new built-in C module is probably necessary.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

@dmalcolm: I suspect you can reduce your diff for Python 3.2 now that PEP 3149 
has landed.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Matthias Klose

Matthias Klose  added the comment:

On 09.09.2010 21:51, Dave Malcolm wrote:
> #   * Debian's patch to dynload_shlib.c looks for module_d.so, then module.so,
> # but this can potentially find a module built against the wrong DSO ABI.  We
> # instead search for just module_d.so in a debug build

right, by design/complaint: people did complain that locally built debug 
extensions wouldn't be found in this case.  This is now obsolete for 3.2, 
because the debug extension has always added the "d" modifier.

--
title: deriving configuration information for different builds with the same 
prefix -> deriving configuration information for different builds  with the 
same prefix

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

@Amaury: yes, that makes perfect sense.  With PEP 3149, a debug (or any 
differently built) interpreter will pick up only the _sysconfig.blah.so that's 
appropriate for it, so baking it into there, with public API exposure through 
sysconfig seems like the right thing to do.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-09 Thread Dave Malcolm

Dave Malcolm  added the comment:

In reply to Barry A. Warsaw:
>@dmalcolm: I suspect you can reduce your diff for Python 3.2 now that PEP 3149 
>has landed.
Yeah, the patch I linked to is against the 3.2a1 tarball; I hoped to regenerate 
it for 3.2a2 but have been swamped this week :(

--

___
Python tracker 

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



[issue1757072] Zipfile robustness

2010-09-09 Thread Mark Hirota

Mark Hirota  added the comment:

Yes, I'd be interested in this functionality. Anything that makes it more 
flexible to use with a wide variety of zipfiles (even bad ones :D) allows for 
increased reusability.

Thanks!

--

___
Python tracker 

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



[issue9752] MSVC Compiler warning in Python\import.c

2010-09-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The patch is good, and fixes an incorrect call to the mkdir function.

--
nosy: +amaury.forgeotdarc
resolution:  -> accepted

___
Python tracker 

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



[issue9804] ascii() does not always join surrogate pairs

2010-09-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Modified patch committed in r84655 (3.x) and r84656 (3.1). Thanks!

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9752] MSVC Compiler warning in Python\import.c

2010-09-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

> BTW: should I be using the .patch extension or .diff extension?
Both extensions are fine and handled the same way

--

___
Python tracker 

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



[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2010-09-09 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Both os.path.samefile and os.path.sameopenfile are now in py3k.
And release27-maint is in feature freeze, so I think this issue
should be closed.

# Implemented on
os.path.samefile: #1578269
os.path.sameopenfile: #7566

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue9808] Implement os.getlogin on Windows

2010-09-09 Thread Tim Golden

Tim Golden  added the comment:

+1 on the idea in general; I'm away at the moment
and not in a position to review the patch. Hopefully
Brian can review/commit

--

___
Python tracker 

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



[issue9752] MSVC Compiler warning in Python\import.c

2010-09-09 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

Committed as r84659.  Thanks for the patch!

--
stage: patch review -> committed/rejected
status: open -> closed
type:  -> compile error

___
Python tracker 

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



[issue9813] Module Name Changed

2010-09-09 Thread Charles M Norton

New submission from Charles M Norton :

In Python 2.6, I could import 
from mx.DateTime.ISO import ParseDateTimeUTC
With 2.7 I cannot.

Here is the error:

  File "util_lib.py", line 46, in 
from mx.DateTime.ISO import ParseDateTimeUTC
ImportError: No module named mx.DateTime.ISO


What changes do I need to make, to import on pre-2.7 and 2.7?

--
components: Library (Lib)
messages: 115976
nosy: octopusgrabbus
priority: normal
severity: normal
status: open
title: Module Name Changed
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue9813] Module Name Changed

2010-09-09 Thread STINNER Victor

STINNER Victor  added the comment:

Do you think that it is a Python bug? You should first try to report a bug on 
eGenenix bug tracker: http://www.egenix.com/services/support/

--
nosy: +haypo

___
Python tracker 

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



[issue9813] Module Name Changed

2010-09-09 Thread Brett Cannon

Changes by Brett Cannon :


--
status: open -> pending

___
Python tracker 

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



[issue9813] Module Name Changed

2010-09-09 Thread Charles M Norton

Charles M Norton  added the comment:

The download page said to report problems here. I don't know whether this is a 
bug or not. The problem exists in 2.66, but not in 2.6.5. I'm looking for a 
workaround. If not, here, where should I post my request?

--
status: pending -> open

___
Python tracker 

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



[issue9814] subprocess isn't friendly to other Python implementations with different GCs

2010-09-09 Thread Dino Viehland

New submission from Dino Viehland :

subprocess isn't very friendly to implementations with different GCs then 
CPython and in general relies on behavior that's not going to be very stable.  
I noticed the following issues but was able to work around all of them.

First Popen is a finalizable object which holds onto another finalizable object 
(the process handle).  In __del__ Popen calls internal poll which attempts to 
wait on the handle.  But because both the handle and the POpen object can go 
out of scope at the same time the handle can be finalized first.  The end 
result is that you cannot get the return code and therefore the Popen class 
will resurrect it's self.  That will at the very least leak the Popen object 
and when running the subprocess tests will eventually start failing all of the 
tests.  For me this was happening because test_cwd doesn't call wait and 
therefore never explicitly gets the exit code.

Resurrecting finalizable objects seems like a pretty bad idea and seems to be 
there only for test purposes - after all who cares if you collect the exit code 
after no one refers to the object.  Unless _active is supposed to be publicly 
exposed?  

Another issue is relying on CPython's reference counting garbage collcetion.  
In particular _get_handles on Windows does "p2cread = 
self._make_inheritable(p2cread)" where stdin == PIPE.  On CPython this is going 
to remove the 1 reference to the previous p2cread and close it immediately.  
With other GCs this reference will linger around only to be closed at some 
point.  Usually that's not a problem but because this handle remains in the 
parent process the pipe does not get closed when it should resulting in hangs.  
This is effectively a duplicated handle of the handle _execute_child closes 
after the child is launched.

--
components: Library (Lib)
messages: 115979
nosy: dino.viehland
priority: low
severity: normal
status: open
title: subprocess isn't friendly to other Python implementations with different 
GCs
type: behavior

___
Python tracker 

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



[issue9813] Module Name Changed

2010-09-09 Thread Ned Deily

Ned Deily  added the comment:

Suggest you post your issue on the egenix-users mailing list (described here 
http://www.egenix.com/support/mailing-lists/) first and return here if there is 
agreement there that there might be a problem with a current version of Python 
itself.

--
nosy: +ned.deily
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-09-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

After more thought, I'm -1 on this.  "Consistency" is a weak argument in favor 
of this.  We need to be more use case drivenm and it there is no evidence that 
this is needed.  Also, there is a reasonable concern that using negative 
indices in a format string would be a bad design pattern that should not be 
encouraged by the language.  And, there is a maintenance burden (just getting 
it right in the first place; having other implementations try to get it right; 
and a burden to custom formatters to have to support negative indices).

I do think we have a documentation issue.  This thread shows a number of 
experienced Python programmers who get "surprised" or perceive "consistency 
issues" perhaps because there isn't a clear mental picture  of Python's layer 
structure (separation of concerns) and where the responsibility lies for the 
supporting negative indices.

For the record, here are a few notes on where negative index handling fits into 
the hierarchy:

Negative index support is not guaranteed by the collections.Sequence ABC nor by 
the grammar (see the "subscript" rule in Grammar/Grammar).  It does not appear 
in opcode handling (see BINARY_SUBSCR in Python/ceval.c) nor in the top 
abstract layer (see PyObject_GetItem() in abstract.c).  Instead, the support 
for slicing and negative index handling appears at the concrete layer (see 
listindex() in Objects/listobject.c for example).

We do guarantee negative index handling for builtin sequences and their 
subclasses (as long as they don't override __getitem__), and we provide a fast 
path for their execution (via an intermediate abstract layer function, 
PySequence_GetItem() in Objects/abstract.c), but other sequence-like objects 
are free to make their own decisions about slices and negative indices at the 
concrete layer.

Knowing this, a person should not be "surprised" when one sequence has support 
for negative indices or slicing and another does not.  The choice belongs to 
the implementer of the concrete class, not to the caller of "a[x]".  There is 
no "consistency" issue here.

IOW, we're not required to implement negative slice handling and are free to 
decide whether it is a good idea or not for the use-case of string formatting.  
There is some question about whether it is a bad practice for people to use 
negative indices for string formatting.  If so, that would be a reason not to 
do it.  And if available, it would only work for builtin sequences, but not 
sequence like items in general.  There is also a concern about placing a burden 
on other implementations of Python (to match what we do in CPython) and on 
placing a burden on people writing their own custom formatters (to closely as 
possible mimic builtin formatters).  If so, those would be reasons not to do it.

my-two-cents,

Raymond

--

___
Python tracker 

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



[issue9503] print statement hangs Windows service

2010-09-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Closing as a duplicate of issue706263.

Instead of changing all print statements, you could set sys.stdout to another 
file, for example:
sys.stdout=StringIO()
or another object that simply discards written data.

--
nosy: +amaury.forgeotdarc
resolution:  -> duplicate
status: open -> closed
superseder:  -> print raises exception when no console available

___
Python tracker 

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



[issue9318] Py3k compilation on old MSVC

2010-09-09 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Patch for import.c was checked in (#9752), so last piece is just patch
for Include/pythread.h. I'll commit this near future. I believe this is
not problematic.

--
assignee:  -> ocean-city

___
Python tracker 

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