[issue6148] Help well execute code it is called on

2009-05-30 Thread Georg Brandl

Georg Brandl  added the comment:

Ezio is correct.  The file is already created while importing bug, not
due to the call to help().

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



[issue6146] markup error in Doc/library/rlcompleter.rst

2009-05-30 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, applied in r73045.

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

___
Python tracker 

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



[issue672115] Assignment to __bases__ of direct object subclasses

2009-05-30 Thread Lars

Lars  added the comment:

ok, i see what you mean, for me at this time the most important question
is whta does 

class object(object)
pass

do, why can i change baseclasses after i redeclare object this way, and
will it get me into trouble when i use this to let users dynamically
define classes and inheritence relationships?

cheers

--

___
Python tracker 

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



[issue6022] test_distutils leaves a 'foo' file behind in the cwd

2009-05-30 Thread Roumen Petrov

Roumen Petrov  added the comment:

Hi All,
The test always fails even builddir == srddir , with and without
directory links in src-/build-path. 

$ LD_LIBRARY_PATH=`pwd` ./python
Python 2.7a0 (trunk:73046M, May 30 2009, 14:09:06)
[GCC 4.2.4] on linux2


$ cat /tmp/pynexttest
test_distutils

The command to run test is:
$ LC_ALL=C ./python -E -tt ./Lib/test/regrtest.py -l -v -s

--

___
Python tracker 

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



[issue6022] test_distutils leaves a 'foo' file behind in the cwd

2009-05-30 Thread Roumen Petrov

Roumen Petrov  added the comment:

P.S.: the test command start with LD_LIBRARY_PATH=`pwd`

--

___
Python tracker 

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



[issue5922] Multi-with patch

2009-05-30 Thread Éric Araujo

Éric Araujo  added the comment:

I’d like to know whether my suggestion was rejected or merely overlooked.

--

___
Python tracker 

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



[issue5922] Multi-with patch

2009-05-30 Thread R. David Murray

R. David Murray  added the comment:

Probably overlooked.  Perhaps Georg will comment definitively later.

--

___
Python tracker 

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



[issue5922] Multi-with patch

2009-05-30 Thread Georg Brandl

Georg Brandl  added the comment:

I overlooked it, yes. But it also seems to me that it's no major problem :)

--

___
Python tracker 

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



[issue5922] Multi-with patch

2009-05-30 Thread Éric Araujo

Éric Araujo  added the comment:

Indeed, I called it nitpicking in the first place. I think it would be a
micro-improvement, but still an improvement :)

Thanks for replying.

--

___
Python tracker 

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



[issue998998] pickle bug - recursively memoizing class?

2009-05-30 Thread mike bayer

mike bayer  added the comment:

im noticing my test case seems to work fine in py 3.0.1.   haven't
tested 2.6.2.

--

___
Python tracker 

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



[issue6149] WeakValueDictionary constructor ported to Python 3.0 incorrectly

2009-05-30 Thread mike bayer

New submission from mike bayer :

The constructor for WeakValueDictionary does not obey the contract
documented in its comments:

# We inherit the constructor without worrying about the input
# dictionary; since it uses our .update() method, we get the right
# checks 

yet it initializes with:

   self.data = d = {}
   d.update(*args, **kw)

i.e. the "update()" method of dict, so that a dict passed to the
constructor initializes non-weakrefed values in the dict which is
completely invalid state.

Contrast to that of 2.6, which properly uses the superclass:

UserDict.UserDict.__init__(self, *args, **kw)

A simple test which raises an exception on 3.0.1 is as follows:

import weakref

class Foo(object):
pass

mydict = dict((k, Foo()) for k in range(10))

w = weakref.WeakValueDictionary(mydict)

assert w[5]

--
messages: 88577
nosy: zzzeek
severity: normal
status: open
title: WeakValueDictionary constructor ported to Python 3.0 incorrectly
versions: Python 3.0

___
Python tracker 

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



[issue6149] WeakValueDictionary constructor ported to Python 3.0 incorrectly

2009-05-30 Thread mike bayer

Changes by mike bayer :


--
components: +Library (Lib)
type:  -> crash

___
Python tracker 

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



[issue6149] WeakValueDictionary constructor ported to Python 3.0 incorrectly

2009-05-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a patch for 3.1.

--
keywords: +patch
nosy: +pitrou
priority:  -> high
stage:  -> patch review
versions: +Python 3.1 -Python 3.0
Added file: http://bugs.python.org/file14121/issue6149.patch

___
Python tracker 

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



[issue6150] test_unicode fails in wide unicode build

2009-05-30 Thread Hagen Fürstenau

New submission from Hagen Fürstenau :

ERROR: test_codecs_utf8 (__main__.UnicodeTest)
--
Traceback (most recent call last):
  File "Lib/test/test_unicode.py", line 911, in test_codecs_utf8
self.assertEqual('\ud800\udc02'.encode('utf-8'), b'\xf0\x90\x80\x82')
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in
position 0: surrogates not allowed

--
components: Tests
messages: 88579
nosy: hagen
severity: normal
status: open
title: test_unicode fails in wide unicode build
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



[issue6150] test_unicode fails in wide unicode build

2009-05-30 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> loewis
nosy: +loewis
priority:  -> release blocker

___
Python tracker 

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



[issue6150] test_unicode fails in wide unicode build

2009-05-30 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
priority: release blocker -> 

___
Python tracker 

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



[issue6149] WeakValueDictionary constructor ported to Python 3.0 incorrectly

2009-05-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Fixed in r73063. Thanks!

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

___
Python tracker 

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



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-05-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Updated patch, with test.

--
nosy: +pitrou
Added file: http://bugs.python.org/file14122/issue5330.patch

___
Python tracker 

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



[issue4618] print_function and unicode_literals don't work together

2009-05-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
priority:  -> high
stage:  -> needs patch
type:  -> behavior
versions: +Python 2.7

___
Python tracker 

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



[issue6127] Unexpected universal newline behavior (newline duplication) in Windows

2009-05-30 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I checked out the latest code from /branches/release26-maint and
compiled it.  Indeed the problem still exists.

Python 2.6.2+ (release26-maint:73061M, May 30 2009, 16:57:28) [MSC
v.1500 32 bit (Intel)] on win32
>>> import io
>>> io.StringIO('foo\r\nbar\r\n', newline=None).read()
u'foo\n\nbar\n\n'

--

___
Python tracker 

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



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-05-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r73064, r73065, r73066, r73067. Thanks!

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

___
Python tracker 

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



[issue1943] improved allocation of PyUnicode objects

2009-05-30 Thread Jim Jewett

Jim Jewett  added the comment:

There were a number of patches to support sharing of data between 
unicode objects.  (By Larry Hastings?)  They were rejected because (a)  
they were complicated, and (b)  it was possible to provoke pathological 
memory retention.

--
nosy: +jimjjewett

___
Python tracker 

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



[issue1943] improved allocation of PyUnicode objects

2009-05-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> There were a number of patches to support sharing of data between 
> unicode objects.  (By Larry Hastings?)  They were rejected because (a)  
> they were complicated, and (b)  it was possible to provoke pathological 
> memory retention.

Yes, it's the "lazy strings" patches by Larry Hastings (it was for str,
not unicode, though). Issues are #1590352 and #1569040 (and perhaps
others).

In any case, as I said, it is easy to switch back to the old
representation, so I don't think it is an argument to block this patch.

--

___
Python tracker 

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



[issue6094] Python fails to build with Subversion 1.7

2009-05-30 Thread Jim Jewett

Jim Jewett  added the comment:

Would this patch mean that users of pre-1.7 subversion would get build 
failures?  Is it possible to support both forms of wording?

--
nosy: +jimjjewett

___
Python tracker 

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



[issue6094] Python fails to build with Subversion 1.7

2009-05-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2009/5/30 Jim Jewett :
>
> Jim Jewett  added the comment:
>
> Would this patch mean that users of pre-1.7 subversion would get build
> failures?  Is it possible to support both forms of wording?

Yes, and it does.

--

___
Python tracker 

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



[issue6151] Make PyDescr_COMMON conform to standard C

2009-05-30 Thread Alexandre Vassalotti

New submission from Alexandre Vassalotti :

PyDescrObject make use of the some undefined behavior noted in PEP 3123
for PyObject in Python 2.x. Although fixing this requires breaking
backward-compatibility, this shouldn't be much a problem since
PyDescrObject is only used directly by Python itself.

--
components: Interpreter Core
files: strict-aliasing-pydescr.diff
keywords: needs review, patch, patch
messages: 88588
nosy: alexandre.vassalotti, loewis
priority: normal
severity: normal
stage: patch review
status: open
title: Make PyDescr_COMMON conform to standard C
type: feature request
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14123/strict-aliasing-pydescr.diff

___
Python tracker 

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



[issue6137] Pickle migration: Should pickle map "copy_reg" to "copyreg"?

2009-05-30 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

If I understood correctly, #3675 is about making pickle data generated
by Python 3 readable by Python 2. However, this issue is about
compatibility in the other direction—i.e., making Python 2 pickles
readable by Python 3, which is easier.

I have a patch that make Unpickler translates the old names to the new
ones at runtime. The only thing missing in the patch is the unit tests
since I am not sure this should be tested. I am thinking using the
approach Collin Winter used for his compatibility tests in #5665.
However, his approach requires bidirectional pickle compatibility
between Python 2 and 3, which we don't have.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file14124/compat_pickle.diff

___
Python tracker 

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



[issue956303] Update pickle docs to describe format of persistent IDs

2009-05-30 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

The updated documentation for pickle for Python 3 describes the
requirement that persistent IDs should be alphanumeric strings when
protocol 0 is used.

http://docs.python.org/3.0/library/pickle.html#persistence-of-external-objects

Closing as fixed.

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

___
Python tracker 

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



[issue6152] Parellel regression testing

2009-05-30 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This experimental patch introduces a new option to run regression tests
in parallel. The option is named '-j' by analogy with the corresponding
`make` option.

For example, to run up to two tests in parallel:
./python -m test.regrtest -j2

--
components: Tests
files: regrtest.patch
keywords: patch
messages: 88591
nosy: pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Parellel regression testing
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file14125/regrtest.patch

___
Python tracker 

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



[issue6152] Parellel regression testing

2009-05-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file14125/regrtest.patch

___
Python tracker 

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



[issue6152] Parellel regression testing

2009-05-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file14126/regrtest.patch

___
Python tracker 

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



[issue6152] Parallel regression testing

2009-05-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
title: Parellel regression testing -> Parallel regression testing

___
Python tracker 

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



[issue6151] Make PyDescr_COMMON conform to standard C

2009-05-30 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

The patch looks fine in principle. I believe many of the macro
applications are unnecessary, because the type of the variables being
accessed is already PyDescrObject.

Not sure whether this can be applied to 3.1 still.

--

___
Python tracker 

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



[issue6153] email parsing - Rare Failure

2009-05-30 Thread Winston Ewert

New submission from Winston Ewert :

I was using email.message_from_string which eventually feeds block of
8192 bytes into the actual e-mail parsing code. However, in my case one
the blocks split the \r\n at the end of a submessage. This caused the
code to identify it as two newlines and thus the submessage headers were
interpreted as being content.

For my purposes I've changed:
NLCRE_crack = re.compile('(\r\n|\r|\n)')
to
NLCRE_crack = re.compile('(\r\n)')

Which prevents the problem.

I suspect that is not a good fix but I do not know the standard well
enough to know what would be a good fix.

--
components: Library (Lib)
messages: 88593
nosy: WinstonEwert
severity: normal
status: open
title: email parsing - Rare Failure
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue4618] print_function and unicode_literals don't work together

2009-05-30 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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