[issue7242] Forking in a thread raises RuntimeError

2009-11-02 Thread Zsolt Cserna

Zsolt Cserna zsolt.cse...@morganstanley.com added the comment:

I've tested it only on solaris 8, 32-bit.

--

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



[issue7251] Mark expected failures of test_math, test_cmath and test_round as such.

2009-11-02 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

There are some buildbot failures due to platform-specific bugs that need
to be marked as expected failures, using the unittest.expectedFailure
decorator.  This may require reorganizing the tests slightly.

* tanh(-0.0) produces 0.0 instead of -0.0 on FreeBSD 6;  this causes
test_math and test_cmath to fail.  E.g.,

http://www.python.org/dev/buildbot/builders/x86%20FreeBSD%20trunk/builds/2741

* the libm round function on Debian alpha seems to be buggy;  this
causes test_round in test_builtin.py to fail.  E.g.,

http://www.python.org/dev/buildbot/builders/alpha%20Debian%20trunk/builds/30

--
assignee: mark.dickinson
components: Tests
keywords: buildbot
messages: 94821
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: Mark expected failures of test_math, test_cmath and test_round as such.
versions: Python 2.7, Python 3.2

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



[issue7242] Forking in a thread raises RuntimeError

2009-11-02 Thread Zsolt Cserna

Zsolt Cserna zsolt.cse...@morganstanley.com added the comment:

solaris 10 x86, 32-bit, sun-studio 11 is ok (in this case the parent's
thread has thread_id=2 and the child inherits this id)
solaris 8 sparc4, 32-bit, sun-studio 11 is not working

So it seems it's independent from sun-cc but depends from the
architecture and/or the OS.

--

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



[issue7251] Mark expected failures of test_math, test_cmath and test_round as such.

2009-11-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Oops.  I meant 'platform' bugs, not 'platform-specific' bugs.  These are
not bugs in Python, but in the underlying C library.

--

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



[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

2009-11-02 Thread Avihu Turzion

Avihu Turzion av...@turzion.com added the comment:

Great. Thanks :)

--

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



[issue7252] list().index() should provide better error reporting

2009-11-02 Thread djc

New submission from djc dirk...@ochtman.nl:

 a = 'b'
 [].index(a)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: list.index(x): x not in list

This is suboptimal. IMO it would be much more useful if the ValueError
reported the actual value that wasn't in the list, like this:

Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: list.index('b'): 'b' not in list

The error in general doesn't really seem to fit in, repeating the code
but with a fake variable name in it. In real contexts, it's mostly just
repeating what's there on a previous line:

 File /home/watt/src/dawkins/ttlib.py, line 86, in shift
   bits.append(SHIFTS.index(rest.split('_')[0]))
 ValueError: list.index(x): x not in list

So maybe just make it 'b' not in list? Or do we really need a
reference to the index() method in there?

--
components: Library (Lib)
messages: 94825
nosy: djc
severity: normal
status: open
title: list().index() should provide better error reporting
versions: Python 2.6

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



[issue7252] list().index() should provide better error reporting

2009-11-02 Thread djc

djc dirk...@ochtman.nl added the comment:

FWIW, quickly grepping through the raises of ValueErrors in the 2.6
stdlib doesn't bring up any other usage of repeat-with-fake-variable-x.

--

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



[issue6896] Intermittent failures in test_mailbox

2009-11-02 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Now merged into py3k and 3.1, where it has solved the buildbot issues.
2.6 doesn't apply, since the caching scheme isn't present there.
If there's any problem with the patch, please reopen.

--
resolution:  - fixed
status: open - closed

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



[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4

2009-11-02 Thread Skip Montanaro

Skip Montanaro s...@pobox.com added the comment:

On what platform did you encounter this failure?  I can't reproduce it
on Mac OSX (Leopard - 10.5.8) or Solaris 10 (update 5) running from
up-to-date release26-maint branches or on Ubuntu (8.10) running the 2.6.4
release code.

--
nosy: +skip.montanaro

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



[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4

2009-11-02 Thread Tony Vroon

Tony Vroon t...@vroon.org added the comment:

This is AMD64 Linux, to be specific a 2.6.32-rc5-00336-g8d5eb43 kernel 
running on a dual Opteron 2435 system. The distribution is Gentoo linux, 
with a glibc version of 2.10.1-r0, compiled with GCC 4.4.2

--

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



[issue7252] list().index() should provide better error reporting

2009-11-02 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

How's object is not in list?

--
nosy: +benjamin.peterson

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



[issue7252] list().index() should provide better error reporting

2009-11-02 Thread djc

djc dirk...@ochtman.nl added the comment:

I want the actual value in there, though! So I can spot the bug.

--

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



[issue7242] Forking in a thread raises RuntimeError

2009-11-02 Thread Zsolt Cserna

Zsolt Cserna zsolt.cse...@morganstanley.com added the comment:

I've attached a patch which seems to fix this issue. It sets
import_lock_thread to the current thread id after forking in the child
process, but still I'm not quite sure that it's the correct way of
solving this issue.

--
keywords: +patch
Added file: http://bugs.python.org/file15247/patch_1.diff

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



[issue7139] ElementTree: Incorrect serialization of end-of-line characters in attribute values

2009-11-02 Thread Moriyoshi Koizumi

Moriyoshi Koizumi mozo+pyt...@mozo.jp added the comment:

Looks like a duplicate of #6492

--

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



[issue7252] list().index() should provide better error reporting

2009-11-02 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

r76058 should do the trick.

--
resolution:  - accepted
status: open - closed

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



[issue7253] AssertionError Tree is insane with *args and reduce

2009-11-02 Thread Jason R. Coombs

New submission from Jason R. Coombs jar...@jaraco.com:

Create a file with a single line of code:

def x(arg): return reduce(sum, [])

On Python 3.1.1 (I used Windows 64-bit), run 2to3 on it returns the
following error:

PS C:\Users\jaraco\projects\jaraco.util\jaraco\util
C:\python\Tools\Scripts\2to3.py .\functools.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
Traceback (most recent call last):
  File C:\python\Tools\Scripts\2to3.py, line 6, in module
sys.exit(main(lib2to3.fixes))
  File C:\Python\lib\lib2to3\main.py, line 159, in main
options.processes)
  File C:\Python\lib\lib2to3\refactor.py, line 616, in refactor
items, write, doctests_only)
  File C:\Python\lib\lib2to3\refactor.py, line 276, in refactor
self.refactor_file(dir_or_file, write, doctests_only)
  File C:\Python\lib\lib2to3\refactor.py, line 656, in refactor_file
*args, **kwargs)
  File C:\Python\lib\lib2to3\refactor.py, line 328, in refactor_file
tree = self.refactor_string(input, filename)
  File C:\Python\lib\lib2to3\refactor.py, line 358, in refactor_string
self.refactor_tree(tree, name)
  File C:\Python\lib\lib2to3\refactor.py, line 392, in refactor_tree
self.traverse_by(self.post_order_heads, tree.post_order())
  File C:\Python\lib\lib2to3\refactor.py, line 416, in traverse_by
new = fixer.transform(node, results)
  File C:\Python\lib\lib2to3\fixes\fix_reduce.py, line 33, in transform
touch_import('functools', 'reduce', node)
  File C:\Python\lib\lib2to3\fixer_util.py, line 289, in touch_import
root = find_root(node)
  File C:\Python\lib\lib2to3\fixer_util.py, line 265, in find_root
assert node.parent, Tree is insane! root found before \
AssertionError: Tree is insane! root found before file_input node was found.

2to3 on Python 2.6.4 does not exhibit the same error.

Remove 'arg' or the call to reduce and the problem is not exhibited.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 94835
nosy: jaraco
severity: normal
status: open
title: AssertionError Tree is insane with *args and reduce
versions: Python 3.1

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



[issue7253] AssertionError Tree is insane with *args and reduce

2009-11-02 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee:  - benjamin.peterson
nosy: +benjamin.peterson
priority:  - normal

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



[issue4356] Add key argument to bisect module functions

2009-11-02 Thread Milko Krachounov

Milko Krachounov pyt...@milko.3mhz.net added the comment:

I've been bugged by the lack of key= argument for bisect for some time
now, and today I got to read this and the previous issues about the
matter. I still fail to understand the reasons for the rejections. It
might encourage bad design in which expensive key functions will get
called more than once for the same element. However:

1. Not all key= functions are computationally expensive, in fact a quick
search shows that most key= uses come are with itemgetter, attrgetter or
some cousin.
2. Even for a computationally expensive function precached key isn't
necessarily the right answer. And if the keys are huge, a key= function
can actually be useful in implementing intelligent caching.
3. The reason for rejection is merely a performance issue which *can* be
fixed without any significant changes to the design of the app should it
prove to be a real issue.


I was writing a module that keeps a sorted list of items in which items
can be added, removed, or changed (they might get reordered). I used
bisect to avoid useless slow linear searches, which would be one
obstacle for the app to scale well. However, the sort key can be changed
at any time, so implementing __lt__ wasn't an option. Keeping a second
list with the keys is both memory and computationally expensive as
inserting into a list is slow. It's not a shiny example of a bisect
use-case as the only thing I've used my module so far is to display the
files in a directory, which means the lists are small and the changes
are seldom, so any implementation is good enough.  But bisect with key=
would have been best if it was available. What's worse, I have a buggy
unreadable ad hoc implementation of bisect in my code right now. ;)

I see the following as reasons why key= would provide benefit:
1. If you have a sorted list, bisect is a net win. Having a key= would
enable you to utilize it without refactoring anything. The lack of key
may as well encourage you to continue using linear searches, or other
sub-optimal solutions.
2. Using key= is more readable and less error-prone than keeping two
lists in simple cases where defining a class with __le__ is an overkill.
Two examples I had where this was the case:
a) A class I implemented to pick numbers from a certain discrete random
distribution with bisect. Oh, but yeah, the implementation without key=
is twice faster.
b) I gave a hand to someone who was implementing a dictionary looked up
the words as you typed them with bisect.
3. Insort. Insort is already slow enough as it is, a key= wouldn't slow
it down much if at all. In fact, if you are keeping two lists, key=
would speed it up. Insort with key= is a net win.

I've implemented key= and quickly hacked a benchmark to show what
performance hit it might have, and to put things into perspective. The
results:

1. Cheap key function, integers and abs(), 100 items, 5000 bisects
or insorts:
a) Bisect with a key: 0.02205014s
b) Bisect with a second list: 0.01328707s
c) Insort with a key: 5.83688211s
d) Bisect with a second list, and two inserts: 16.17302299s

2. Cheap key function, ~4000 char bytestrings and len(), 10 items,
5000 bisects or insorts:
a) Bisect with a key: 0.01829195s
b) Bisect with a second list: 0.00945401s
c) Insort with a key: 0.25511408s
d) Bisect with a second list, and two inserts: 0.49303603s

3. Expensive key function, ~4000 char bytestrings and str.lower(),
10 (500 MB) items, 5000 bisects or insorts:
a) Bisect with a key: 1.26837015s
b) Bisect with a second list: 0.08390594s
c) Insort with a key: 1.50406289s
d) Bisect with a second list, and two inserts: 0.57737398s

4. Expensive key function, ~4000 char bytestrings and str.lower(),
50 (2.5 GB) items, 5000 bisects or insorts:
a) Bisect with a key: 1.46136308s
b) Bisect with a second list: 0.08768606s
c) Insort with a key: 3.05218720s
d) Bisect with a second list, and two inserts: 6.43227386s

5. Expensive key function, ~4000 char bytestrings and str.strip(),
10 (500 MB) items, 5000 bisects or insorts:
a) Bisect with a key: 0.03311396s
b) Bisect with a second list: 0.01374602s
c) Insort with a key: 0.27423000s
d) Bisect with a second list, and two inserts: 0.49585080s

6. Expensive key function, ~4000 char bytestrings and str.strip(),
50 (2.5 GB) items, 5000 bisects or insorts:
a) Bisect with a key: 0.04530501
b) Bisect with a second list: 0.01912594
c) Insort with a key: 1.62209797
d) Bisect with a second list, and two inserts: 5.91734695

Also, I tried to bench linear searches, but as they had to run in Python
code they aren't representative of anything. In the integer test they
went for about 250 seconds without recalculating the key, and for about
500 with. Also, replacing them with .index() gave about 60 seconds if I
ensured there's high probability that the number is in the list, and for
500 if I didn't.

In short, key= for bisect would be convenient and neat, really useful in
rare cases, leading to more 

[issue4356] Add key argument to bisect module functions

2009-11-02 Thread Milko Krachounov

Changes by Milko Krachounov pyt...@milko.3mhz.net:


Added file: http://bugs.python.org/file15249/bisect-py3k.patch

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



[issue4356] Add key argument to bisect module functions

2009-11-02 Thread Milko Krachounov

Changes by Milko Krachounov pyt...@milko.3mhz.net:


Added file: http://bugs.python.org/file15250/bench_bisect_key.py

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



[issue4356] Add key argument to bisect module functions

2009-11-02 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


--
assignee:  - rhettinger

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



[issue7253] AssertionError Tree is insane with *args and reduce

2009-11-02 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Fixed in r76061.

--
resolution:  - fixed
status: open - closed

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



[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6

2009-11-02 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee:  - pitrou
nosy: +pitrou

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



[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6

2009-11-02 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
components: +IO
priority:  - normal
stage:  - needs patch
versions: +Python 2.7

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



[issue7248] test_importlib uses a fixed name in /tmp

2009-11-02 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It sometimes seems to trigger another error:

==
ERROR: test_package (importlib.test.source.test_file_loader.SimpleTest)
--
Traceback (most recent call last):
  File
/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/importlib/test/source/util.py,
line 78, in create_modules
with open(file_path, 'w') as file:
IOError: [Errno 13] Permission denied: '/tmp/_pkg/__init__.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File
/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/importlib/test/source/test_file_loader.py,
line 33, in test_package
with source_util.create_modules('_pkg.__init__') as mapping:
  File
/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/contextlib.py,
line 17, in __enter__
return next(self.gen)
  File
/var/lib/buildbot/cpython/trunk.pitrou-ubuntu/build/Lib/importlib/test/source/util.py,
line 88, in create_modules
state_manager.__exit__(None, None, None)
UnboundLocalError: local variable 'state_manager' referenced before
assignment

--

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



[issue7076] Documentation add note about SystemRandom

2009-11-02 Thread Shawn Ligocki

Shawn Ligocki sligo...@gmail.com added the comment:

I rewrote the description, mostly using the claims form urandom, so that
we don't claim something new. What do you guys think?

--
Added file: http://bugs.python.org/file15251/random.patch

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



[issue7076] Documentation add note about SystemRandom

2009-11-02 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

The wording looks reasonable but it doesn't seem to add much that is not
already said:

'''
class SystemRandom( [seed]) 

Class that uses the os.urandom() function for generating random numbers
from sources provided by the operating system. Not available on all
systems. Does not rely on software state and sequences are not
reproducible. Accordingly, the seed() and jumpahead() methods have no
effect and are ignored. The getstate() and setstate() methods raise
NotImplementedError if called. 
'''

I hesitate to include anything about cryptographic strength because that
isn't really guaranteed on any system.  At best, there are a fixed
number of bytes of machine generated entropy.  At worst, it is
deterministic (computed from time, etc) or it is not available at all.

--

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



[issue7076] Documentation add note about SystemRandom

2009-11-02 Thread Shawn Ligocki

Shawn Ligocki sligo...@gmail.com added the comment:

So, all I really want to do is call attention to SystemRandom from the
top of the page, because it is easily not noticed at the bottom. Do you
guys have any suggestions for how to do that that doesn't repeat too
much and doesn't claim things that you aren't comfortable with claiming?

--

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



[issue7076] Documentation add note about SystemRandom

2009-11-02 Thread Shawn Ligocki

Shawn Ligocki sligo...@gmail.com added the comment:

How about this, sweet and simple.

--
Added file: http://bugs.python.org/file15252/random.patch

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



[issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1

2009-11-02 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

  Martin, can you please elaborate on this? I never heard of such
  standards in OSS.
 
 MAL already gave the link. From the link:
 
 Sometimes package developers are tempted to set user variables such as
 CFLAGS because it appears to make their job easier. However, the package
 itself should never set a user variable, particularly not to include
 switches that are required for proper compilation of the package. Since
 these variables are documented as being for the package builder, that
 person rightfully expects to be able to override any of these variables
 at build time.

So one day package builder by right will set CFLAGS to make their job
easier and python build system will not ignore it.

--

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



[issue7206] 64 bit python fails on Windows 7

2009-11-02 Thread Carey

Carey carey.metca...@gmail.com added the comment:

I am having the exact same problem with both the AMD64 and 32 bit
installs. The python shell just will not open. For now I am running it
in the virtual XP machine but it is extremely slow and a fix would be
very helpful. I have tried uninstalling and reinstalling with no effect.
I too am willing to set up a remote desktop connection if it would help.

Windows 7 Pro RTM, Intel Core 2 Duo

--
nosy: +Carey

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



[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6

2009-11-02 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I've committed to the 2.6 branch in r76073. 2.7 is actually ok.
Thanks for the report!

--
resolution:  - fixed
status: open - closed

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



[issue7076] Documentation add note about SystemRandom

2009-11-02 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

I'm disinclined to move this to the top of the page but will keep this
open and consider further at a later date.

The SystemRandom class is an alternative generator like WichmanHill
which is typically not the right choice for many applications.

--
priority:  - low

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



[issue7076] Documentation add note about SystemRandom

2009-11-02 Thread Shawn Ligocki

Shawn Ligocki sligo...@gmail.com added the comment:

There is a whole paragraph about WichmanHill at the top of this page
already and (if anything) I think that WichmanHill is less notable
(basically only used in legacy applications). However SystemRandom is
very useful. I don't want to make claims about urandom that I can't back
up, but urandom is very useful and I think that there ought to be some
note of it in the opening for people who want a stronger random
instance. All I'm suggesting is a sentence to point it out. That would
have been enough for me not to have reinvented the wheel.

--

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



[issue7206] 64 bit python fails on Windows 7

2009-11-02 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

By exactly the same problem, do you mean that your installation also
runs into a break instruction in ntdll!CsrSetPriorityClass+0x40? Can you
please also attach the debugger log (unless it's byte-for-byte identical
with the one from richo)?

--

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



[issue7206] 64 bit python fails on Windows 7

2009-11-02 Thread Carey

Carey carey.metca...@gmail.com added the comment:

i don't know how to do that. Is there an integrated debugger within
Windows 7? My program just doesn't open, it doesn't display any error
messages at all.

--

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



[issue7206] 64 bit python fails on Windows 7

2009-11-02 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 i don't know how to do that. Is there an integrated debugger within
 Windows 7? My program just doesn't open, it doesn't display any error
 messages at all.

Ok. So I'm skeptical that this is the same bug (having roughly the same
symptom is not convincing). If you want it studied, please report it
separately.

--

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



[issue7254] Class members not properly initialized if declared outside of function

2009-11-02 Thread Vlad

New submission from Vlad vla...@yahoo.com:

If a class member is declared outside of a function, it's creation is
_not_ repeated with every new instance of the class. Instead, the same
member is created during the first instance and then shared by all the
subsequent instances of that class. This is wrong, because a new member
should be created for every instance.

I have attached a sample code contrasting the incorrect behavior (on
top) with the correct behavior (on bottom). Python behaves correctly if
the member is declared in __init__ (that is, Python initializes a new
member for every instance).

The output of print b.greet and print d.greet should be the same and
should read ['Howdy'].

--
files: class_member_init_inconsistency.py
messages: 94851
nosy: vladc6
severity: normal
status: open
title: Class members not properly initialized if declared outside of function
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file15253/class_member_init_inconsistency.py

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



[issue6492] xml.etree does not escape CR, LF and TAB characters within attribute values

2009-11-02 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Closing as duplicate of #7139.

--
nosy: +ezio.melotti
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed

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



[issue7139] ElementTree: Incorrect serialization of end-of-line characters in attribute values

2009-11-02 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

If I understood correctly, the correct behavior while reading is:
  * literal newlines (\n or \r) and tabs (\t) should be collapsed and
converted to a space
  * newlines (#xA; or #xD;) and tabs (#x9;) as entities should be
converted to the literal equivalents (\n, \r and \t)

(See http://www.w3.org/TR/2000/WD-xml-c14n-2119.html#charescaping)

This should be ok in both xml.minidom and etree.


Instead, while writing, if literal newlines and tabs are written as they
are (\n, \r and \t), they can't be read during the parsing phase because
they are collapsed and converted to a space. They should therefore be
converted to entities (#xA;, #xD; and #x9;) automatically, but this
could be incompatible with the current behavior (i.e. \n, \r or \t that
now are written and collapsed as a space during the parsing will then
become significant).

Moriyoshi, can you confirm that what I said is correct and the problem
is similar to the one described in #5752?
I also closed #6492 as duplicate of this.

--
nosy: +devon, ezio.melotti
versions: +Python 2.7

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



[issue7254] Class members not properly initialized if declared outside of function

2009-11-02 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

This is the way python works.  For help on using python please post to
python-list or python-tutor.

--
nosy: +r.david.murray
priority:  - low
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue6377] distutils compiler switch ignored

2009-11-02 Thread Tarek Ziadé

Changes by Tarek Ziadé ziade.ta...@gmail.com:


--
nosy: +dalcinl

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



[issue7139] ElementTree: Incorrect serialization of end-of-line characters in attribute values

2009-11-02 Thread Fredrik Lundh

Fredrik Lundh fred...@effbot.org added the comment:

The real problem here is that XML attributes weren't really designed
to hold data that doesn't survive normalization.  One would have
thought that making it difficult to do that, and easy to store such
things as character data, would have made people think a bit before
designing XML formats that does things the other way around, but
apparently some people finds it hard having to use their brain when
designing things...

FWIW, the current ET 1.3 beta escapes newline but not tabs and
carriage returns; I don't really mind adding tabs, but I'm less sure
about carriage return -- XML pretty much treats CT as a junk character
also outside attributes, and escaping it in all contexts would just be
silly.

--

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



[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2009-11-02 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee:  - pje
nosy: +pje
priority:  - high
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5

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



[issue7255] Default word boundaries for Unicode data?

2009-11-02 Thread daniel mccloy

New submission from daniel mccloy bangalore.onl...@gmail.com:

Regarding UTS #18 (Unicode Standards for RegEx Engines), which can be
found at:
http://www.unicode.org/reports/tr18/

Is there a plan or commitment for Python to implement at least default
word boundaries (a Level 2 feature), rather than the current simple
word boundaries?  I don't believe that the algorithm for this is a
whole lot more complicated, but it certainly makes a huge difference for
processing non-Roman text.

For example, to match the whole word રત without matching the word રતા
(which has an additional vowel at the end, the vertical line), with
default word boundary recognition, you could use the pattern \bરત\b. 
With Python's current simple word boundary recognition, however, the
\b assertion is pretty much useless here, and I have yet to see a decent
zero-width pattern that can take its place.

BTW, the ICU regex libraries do provide this level of Unicode support:
http://userguide.icu-project.org/strings/regexp
It seems to work perfectly on Indic text, based on the tests I've done.

Being open-source, it may be a helpful reference for the algorithm needed.

Dan

--
components: Regular Expressions
messages: 94856
nosy: RegEx4All
severity: normal
status: open
title: Default word boundaries for Unicode data?
type: feature request
versions: Python 3.2

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



[issue7255] Default word boundaries for Unicode data?

2009-11-02 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Is there a plan or commitment for Python to implement at least default
 word boundaries (a Level 2 feature), rather than the current simple
 word boundaries?

No such plan exists at this time. Contributions are welcome.

--
nosy: +loewis

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



[issue7240] subprocess.Popen.stdout.flush fails os OS-X 10.6.1

2009-11-02 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I don't think so. stdio on OSX has a fdiscard function, but that's not 
exposed to Python.

I tend to explicitly synchronize on prompts when communicating with an 
interactive program over a pipe. That is, read until you found the prompt, 
then send a command, then read again until getting to the prompt, ...

--

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