[issue3692] improper scope in list comprehension, when used in class declaration

2008-08-27 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This won't change -- in 3.0, list comprehensions and generator
expressions are both implemented using a function, so it's like the
following:

class Foo:
attribute1 = 1
def f():
return attribute1
attribute2 = f()

--
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] mbstowcs

2008-08-27 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
title: Error parsing arguments on OpenBSD <= 4.4 -> mbstowcs

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
title: mbstowcs -> Error parsing arguments on OpenBSD <= 4.4

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

See also issue3626, which is exactly the same for cygwin.

Maybe a "./configure" paragraph could discover whether mbstowcs is broken.
I don't know how to do it though.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

See also issue3626

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

The problem is that, unlike PyInt_AsSsize_t, PyLong_AsSsize_t expects
its argument to already be a long object and else raises the SystemError.

It should probably behave like PyInt_AsSsize_t and raise the TypeError
since in 3.0 it's used in many places where PyInt_AsSsize_t was used.

--
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

The attached patches at least correct the XXX undetected error.

--
keywords: +patch
Added file: http://bugs.python.org/file11267/s26.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11268/s30.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Isn't PyNumber_AsSsize_t designed for this purpose?

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3697] "Fatal Python error: Cannot recover from stack overflow" on Windows buildbots

2008-08-27 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

This error appears more or less regularly on the Windows py3k buildbots.
Today it has appeared following my changes to isinstance() /
issubclass(), but it had already appeared before, e.g.
http://www.python.org/dev/buildbot/3.0.stable/x86%20XP-4%203.0/builds/1093/step-test/0

What puzzles me is that the said "Fatal Python error" is computed in a
deterministic way (from the overflowing of the recursion counter),
therefore it shouldn't occur randomly on only some selected platforms.

--
components: Interpreter Core, Windows
messages: 72017
nosy: pitrou
priority: critical
severity: normal
status: open
title: "Fatal Python error: Cannot recover from stack overflow" on Windows 
buildbots
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3697] "Fatal Python error: Cannot recover from stack overflow" on Windows buildbots

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

It is because of the USE_STACKCHECK macro, which is only defined in
debug mode with Microsoft compilers.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Here is another patch, which tries to replace all problematic usages of
mbstowcs, and a new "#define HAVE_BROKEN_MBSTOWCS" to activate it.

It needs a review, especially the "configure" stuff, it's my first time
to deal with this.

Tested on cygwin.

Added file: http://bugs.python.org/file11269/mbstowcs.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-08-27 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


___
Python tracker <[EMAIL PROTECTED]>

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



[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

See also issue3696, and the patch provided there.

Yaakov, you should remove the _locale.dll from your build directory: for
the compilation phase, better have no locale at all than a broken "U" as
default encoding ("U" is the initial of UTF8)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3697] "Fatal Python error: Cannot recover from stack overflow" on Windows buildbots

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Patch uploaded to http://codereview.appspot.com/3276, verified to fix
the problem on a Windows XP virtual machine. Please review.

--
keywords: +needs review, patch
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1840] Tools/i18n/msgfmt.py fixes for Python 3.0

2008-08-27 Thread Peter Harris

Peter Harris <[EMAIL PROTECTED]> added the comment:

As far as I can tell, it is OK now.  Thanks!

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3698] incompatible arguments in warning formatting for idle

2008-08-27 Thread Guillaume Coffin

New submission from Guillaume Coffin <[EMAIL PROTECTED]>:

In idle, the function idle_formatwarning_subproc overrides
warnings.formatwarning, however the latter in Python 2.6 is called from
warnings._show_warning with an additional "line" argument:

line 29, in _show_warning
file.write(formatwarning(message, category, filename, lineno, line))

whereas idle_formatwarning_subproc still only accepts 4 arguments. The
optional line argument should be added.

--
components: IDLE
messages: 72023
nosy: gcoffin
severity: normal
status: open
title: incompatible arguments in warning formatting for idle
type: crash
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-27 Thread Senthil

Senthil <[EMAIL PROTECTED]> added the comment:

That was reason in making fix_broken in the urlparse in my patch, Facundo.
I had thought, it should be handled in urlparse module and if we make
changes in the urlparse.urlunparse/urlparse.urlparse, then we are
stepping into area which will break a lot of tests.

I am kind of +0 with the current fix in urllib2. Should we think/plan
for something in urlparse, akin to fix_broken?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3699] test_bigaddrspace broken

2008-08-27 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

./python3 Lib/test/regrtest.py -v -M 2.1Gb test_bigaddrspace
test_bigaddrspace
test_concat (test.test_bigaddrspace.StrTest) ... ERROR
test_optimized_concat (test.test_bigaddrspace.StrTest) ... ERROR

==
ERROR: test_concat (test.test_bigaddrspace.StrTest)
--
Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/support.py", line 697, in
wrapper
return f(self)
  File "/home/antoine/py3k/__svn__/Lib/test/test_bigaddrspace.py", line
13, in test_concat
s1 = 'x' * MAX_Py_ssize_t
OverflowError: repeated string is too long

==
ERROR: test_optimized_concat (test.test_bigaddrspace.StrTest)
--
Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/support.py", line 697, in
wrapper
return f(self)
  File "/home/antoine/py3k/__svn__/Lib/test/test_bigaddrspace.py", line
18, in test_optimized_concat
x = 'x' * MAX_Py_ssize_t
OverflowError: repeated string is too long

--
Ran 2 tests in 0.019s

--
components: Tests
messages: 72025
nosy: pitrou
priority: high
severity: normal
status: open
title: test_bigaddrspace broken
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2008-08-27 Thread Hagen Fürstenau

Hagen Fürstenau <[EMAIL PROTECTED]> added the comment:

Well, this is obviously caused by renaming "__builtin__" to "builtins"
and the fact that set (as well as frozenset) doesn't have its own opcode
and therefore gets looked up in "builtins". The problem therefore
extends to all builtin objects without opcode special casing (e.g.
object, slice, property, ...) I'm afraid that means we have to pickle
"builtins" as "__builtin__" for backwards compatibility in protocols <= 2.

But aside from that, wouldn't it be more consistent to have opcodes for
set/frozenset in protocol 3?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3700] test_bigmem broken

2008-08-27 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

./python3 Lib/test/regrtest.py -v -M 2.1Gb test_bigmem 
test_bigmem

[snip skipped tests]

==
ERROR: test_center_unicode (test.test_bigmem.StrTest)
--
Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/support.py", line 682, in
wrapper
return f(self, maxsize)
  File "/home/antoine/py3k/__svn__/Lib/test/test_bigmem.py", line 60, in
test_center_unicode
s = SUBSTR.center(size)
MemoryError

==
ERROR: test_encode_raw_unicode_escape (test.test_bigmem.StrTest)
--
Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/support.py", line 682, in
wrapper
return f(self, maxsize)
  File "/home/antoine/py3k/__svn__/Lib/test/test_bigmem.py", line 102,
in test_encode_raw_unicode_escape
return self.basic_encode_test(size, 'raw_unicode_escape')
  File "/home/antoine/py3k/__svn__/Lib/test/test_bigmem.py", line 92, in
basic_encode_test
s = c * size
TypeError: can't multiply sequence by non-int of type 'float'

--
Ran 88 tests in 0.225s

--
components: Tests
messages: 72027
nosy: pitrou
priority: critical
severity: normal
status: open
title: test_bigmem broken
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3700] test_bigmem broken

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

It would be nice if at least one of the buildbots could run the bigmem
tests.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

cygwin has also a nasty bug:
printf("%ls", wide_string)
fails for strings of length 1. %S has the same problem.

$ ./python.exe ab
./python: can't open file 'ab': [Errno 2] No such file or directory

$ ./python.exe a
./python

The output stops at "./python", probably because stderr has an error
flag set.

Since %ls is only used in Modules/main.c, the best is probably to
replace it with something else. And since cygwin has no function of the
family of wprintf or fputws, PyUnicode is probably the way to go.

--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3701] test_ntpath.test_relpath fails when launched from a different Windows drive

2008-08-27 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

C:\>z:PCbuild\python_d.exe z:Lib\test\regrtest.py -uall -v test_ntpath
test_ntpath
test_abspath (test.test_ntpath.TestNtpath) ... ok
test_commonprefix (test.test_ntpath.TestNtpath) ... ok
test_expandvars (test.test_ntpath.TestNtpath) ... ok
test_isabs (test.test_ntpath.TestNtpath) ... ok
test_join (test.test_ntpath.TestNtpath) ... ok
test_normpath (test.test_ntpath.TestNtpath) ... ok
test_relpath (test.test_ntpath.TestNtpath) ... ERROR
test_split (test.test_ntpath.TestNtpath) ... ok
test_splitdrive (test.test_ntpath.TestNtpath) ... ok
test_splitext (test.test_ntpath.TestNtpath) ... ok
test_splitunc (test.test_ntpath.TestNtpath) ... ok

==
ERROR: test_relpath (test.test_ntpath.TestNtpath)
--
Traceback (most recent call last):
  File "Z:\py3k\__svn__\lib\test\test_ntpath.py", line 171, in test_relpath
tester('ntpath.relpath("a")', 'a')
  File "Z:\py3k\__svn__\lib\test\test_ntpath.py", line 13, in tester
%(str(fn), str(wantResult), str(gotResult)))
test.support.TestFailed: ntpath.relpath("a") should return: a but
returned: ..\a

--
components: Library (Lib), Tests
messages: 72030
nosy: pitrou
priority: normal
severity: normal
status: open
title: test_ntpath.test_relpath fails when launched from a different Windows 
drive
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3702] test_urllib2.test_trivial fails when run from another Windows drive

2008-08-27 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

==
ERROR: test_trivial (test.test_urllib2.TrivialTests)
--
Traceback (most recent call last):
  File "Z:\py3k\__svn__\lib\urllib\request.py", line 1199, in
open_local_file
stats = os.stat(localfile)
WindowsError: [Error 3] Le chemin d'accès spécifié est introuvable:
'\\py3k\\__s
vn__\\lib\\urllib\\request.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Z:\py3k\__svn__\lib\test\test_urllib2.py", line 32, in test_trivial
f = urllib.request.urlopen(file_url)
  File "Z:\py3k\__svn__\lib\urllib\request.py", line 122, in urlopen
return _opener.open(url, data, timeout)
  File "Z:\py3k\__svn__\lib\urllib\request.py", line 359, in open
response = self._open(req, data)
  File "Z:\py3k\__svn__\lib\urllib\request.py", line 377, in _open
'_open', req)
  File "Z:\py3k\__svn__\lib\urllib\request.py", line 337, in _call_chain
result = func(*args)
  File "Z:\py3k\__svn__\lib\urllib\request.py", line 1178, in file_open
return self.open_local_file(req)
  File "Z:\py3k\__svn__\lib\urllib\request.py", line 1213, in
open_local_file
raise URLError(msg)
urllib.error.URLError: 

--

--
components: Library (Lib), Tests
messages: 72031
nosy: pitrou
priority: normal
severity: normal
status: open
title: test_urllib2.test_trivial fails when run from another Windows drive
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3702] test_urllib2.test_trivial fails when run from another Windows drive

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

What I forgot to say is that the test was launched from the C: drive:

C:\>z:PCbuild\python_d.exe z:Lib\test\regrtest.py -uall -v test_urllib2

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3703] open() on directory raises IOError with unhelpful message

2008-08-27 Thread Hagen Fürstenau

New submission from Hagen Fürstenau <[EMAIL PROTECTED]>:

When trying to open a directory (on Linux), Python 2.x complained with

>>> open("local")
Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 21] Is a directory

Python 3.0 however gives the rather unhelpful or even wrong

>>> open("local")
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/MC/hagenf/local/lib/python3.0/io.py", line 284, in __new__
return open(*args, **kwargs)
  File "/home/MC/hagenf/local/lib/python3.0/io.py", line 223, in open
closefd)
IOError: [Errno 0] Error: 'local'

--
components: Library (Lib)
messages: 72033
nosy: hagen
severity: normal
status: open
title: open() on directory raises IOError with unhelpful message
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3703] open() on directory raises IOError with unhelpful message

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

There is a call to dircheck(), but not in the correct place.
The attached patch makes sure that the "Is a directory" message is not
overwritten.

--
keywords: +needs review, patch
nosy: +amaury.forgeotdarc
priority:  -> critical
Added file: http://bugs.python.org/file11270/dircheck.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3704] cookielib doesn't handle URLs with / in parameters

2008-08-27 Thread Andy Kilpatrick

New submission from Andy Kilpatrick <[EMAIL PROTECTED]>:

cookielib doesn't handle URLs like "http://server/script?
err=/base/error.html&ok=/base/ok.html", as 
CookieJar::_cookie_from_cookie_tuple uses rfind("/") to strip off the 
end of the URL, returning "http://server/script?
err=/base/error.html&okc=/base" instead of "http://server/script";.

My suggested fix (attached, line 1465-1468) is to first strip off 
anything after "?" if present, then continue as with existing code.

--
components: None
files: cookielib.py
messages: 72035
nosy: andyk
severity: normal
status: open
title: cookielib doesn't handle URLs with / in parameters
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file11271/cookielib.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
keywords: +needs review

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3705] py3k aborts if "-c" or "-m" is given a non-ascii value

2008-08-27 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

The explanation is quite simple: in Py_Main, the arguments are converted
from wide to byte strings, but the required length of the byte string is
assumed equal to that of the wide string.

Which gives:

$ ./python -c "print('à')"
Fatal Python error: not enough memory to copy -c argument
Erreur de segmentation (core dumped)
$ ./python -m à
Fatal Python error: not enough memory to copy -m argument
Erreur de segmentation (core dumped)

--
messages: 72036
nosy: pitrou
severity: normal
status: open
title: py3k aborts if "-c" or "-m" is given a non-ascii value
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

The patch looks fine and harmless to me (but I'm a configure newbie
too). +1 for committing it and seeing if the OpenBSD buildbot feels better.

In the process of testing this patch, I've found another bug: #3705.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Mmh, in Modules/python.c and Python/frozenmain.c, the return value of
the second call to mbstowcs() should be checked as well (since the first
one is sometimes replaced by a call to strlen(), which never fails).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1204] readline configuration for shared libs w/o curses dependencies

2008-08-27 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

In the configure{.in} exist another bug:
--
AC_CHECK_LIB(readline, readline)
if test "$ac_cv_have_readline_readline" = no
then
  AC_CHECK_LIB(termcap, readline)
fi
--
but "grep _readline_readline configure" show that variable in use is
$ac_cv_lib_readline_readline, so the check for function termcap in
readline can be removed safely - it is never reached.

I would like to propose another patch that don't use possible unresolved
symbol to detect presence of library. The new patch will define
HAVE_LIBREADLINE. If necessary will check for dependent library
and link it in correct order. The script print messages like next:
--
checking how to link readline libs... -lreadline -lncursesw
checking for rl_callback_handler_install in -lreadline... yes
checking for rl_pre_input_hook in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
--

The patch is for branch release25-maint.
It is without changes in configure script, i.e autoconf has to run to
recreate it after applying.
The patch can be applied to trunk as well.

--
nosy: +rpetrov
Added file: http://bugs.python.org/file11272/python-release25-readline.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3705] py3k aborts if "-c" or "-m" is given a non-ascii value

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Here is a patch which works under Linux. Under Windows it doesn't choke
when converting arguments anymore, but it fails later in the process (in
the parser for '-c', in the importing logic for '-m').

Here is an example:

$ ./python -c "print(ord('ሀ'))"
4608
$ cat > ሀ.py
print(__file__)

$ ./python -m ሀ
/home/antoine/py3k/mbstowcs/ሀ.py
$ ./python ሀ.py 
ሀ.py

--
keywords: +patch
Added file: http://bugs.python.org/file11273/convert_args.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3705] py3k aborts if "-c" or "-m" is given a non-ascii value

2008-08-27 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Some progress:
The lines suppressed by the patch at http://bugs.python.org/msg71579
either do nothing (because e.g exc_type is already NULL or None),
or happen to be in a case similar to the script "lostcontext2.py"
(Most of the time, the flush() function in io.py).

So again, I think these lines should be suppressed.
The test suite still pass, and all the "-R::" I ran did return identical
result.
Can this patch go in?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-08-27 Thread Yaakov (Cygwin Ports)

Yaakov (Cygwin Ports) <[EMAIL PROTECTED]> added the comment:

Thanks for your persistence with this.

Corinna got _wcsrtombs_r fixed in newlib, so I imagine the next Cygwin
1.7 preview will have the fix.  Unfortunately that won't help the
still-stable Cygwin 1.5.  I'm not sure what you mean by PyUnicode being
a workaround; if you could propose a patch, I'll be happy to try it.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

> Can this patch go in?

I'm ok for it.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-08-27 Thread Yaakov (Cygwin Ports)

Yaakov (Cygwin Ports) <[EMAIL PROTECTED]> added the comment:

Another thing: _bsddb does not compile with db4.7:

Modules/_bsddb.c: In function `DBSequence_get_cachesize':
Modules/_bsddb.c:5022: warning: passing arg 2 of pointer to function
from incompatible pointer type
Modules/_bsddb.c: In function `DBEnv_db_home_get':
Modules/_bsddb.c:5331: error: structure has no member named `db_home'
Modules/_bsddb.c:5334: error: structure has no member named `db_home'
Modules/_bsddb.c: In function `PyInit__bsddb':
Modules/_bsddb.c:5948: error: `DB_LOG_AUTOREMOVE' undeclared (first use
in this function)
Modules/_bsddb.c:5948: error: (Each undeclared identifier is reported
only once
Modules/_bsddb.c:5948: error: for each function it appears in.)
Modules/_bsddb.c:5949: error: `DB_DIRECT_LOG' undeclared (first use in
this function)
Modules/_bsddb.c:5957: error: `DB_LOG_INMEMORY' undeclared (first use in
this function)

4.5 and 4.6 both give the first warning, but no errors.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-08-27 Thread Daniel Diniz

Changes by Daniel Diniz <[EMAIL PROTECTED]>:


--
nosy: +ajaksu2

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3660] reference leaks in 3.0

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

As of r66047, I get the following results (without "-uall", though):

test_unittest leaked [124, 124] references, sum=248
test_binascii leaked [1, 1] references, sum=2
test_distutils leaked [141, 142] references, sum=283
test_logging leaked [219, 147] references, sum=366
test_multiprocessing leaked [0, 1] references, sum=1
test_pickle leaked [1, 1] references, sum=2
test_pickletools leaked [1, 1] references, sum=2
test_popen leaked [37, 0] references, sum=37
test_site leaked [88, 88] references, sum=176
test_sqlite leaked [17, 17] references, sum=34
test_unicode leaked [2, 2] references, sum=4
test_urllib2_localnet leaked [3, 3] references, sum=6
test_xmlrpc leaked [-84, 85] references, sum=1

24 tests skipped:
test_bsddb3 test_cProfile test_codecmaps_cn test_codecmaps_hk
test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
test_dbm_gnu test_kqueue test_nis test_normalization
test_ossaudiodev test_pep277 test_socketserver test_startfile
test_tcl test_timeout test_urllib2net test_urllibnet test_winreg
test_winsound test_xmlrpc_net test_zipfile64

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3706] Fix error message for wrong exec() argument type

2008-08-27 Thread Georg Brandl

New submission from Georg Brandl <[EMAIL PROTECTED]>:

Fixes exec() message that claims it supports file objects.

Also makes error messages from compile(), exec() and eval() more
concrete, and in the case of compile() more correct.

--
files: bltin.diff
keywords: needs review, patch, patch
messages: 72046
nosy: georg.brandl
priority: normal
severity: normal
status: open
title: Fix error message for wrong exec() argument type
Added file: http://bugs.python.org/file11274/bltin.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3707] help('finally') behaves bizarrely

2008-08-27 Thread Mike Speciner

New submission from Mike Speciner <[EMAIL PROTECTED]>:

I'm running Python 3.0b2 (r30b2:65106, Jul 18 2008, 18:44:17) [MSC
v.1500 32 bit (Intel)] on win32.
Typing help('finally') loops, repeatedly typing the following two lines

File "C:\Python30\lib\pydoc.py", line 1777, in showtopic
  return self.showtopic(target)

--
messages: 72047
nosy: ms
severity: normal
status: open
title: help('finally') behaves bizarrely
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3707] help('finally') behaves bizarrely

2008-08-27 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Good catch! Patch attached.

--
keywords: +easy, needs review, patch
nosy: +georg.brandl
priority:  -> critical
Added file: http://bugs.python.org/file11275/pydoc.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3521] file.readline: bad exception recovery

2008-08-27 Thread Daniel Diniz

Daniel Diniz <[EMAIL PROTECTED]> added the comment:

Patch attached, suggested test below.

def test_readline():
for mode in ('r', 'rb', 'r+', 'r+b'):
f = open(__file__, mode)
try:
f.readline(0.1)
except TypeError:
tmp = f.readline()
f.close()
print('OK')

test_readline()

--
keywords: +patch
nosy: +ajaksu2
Added file: http://bugs.python.org/file11276/file.readline.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3708] os.urandom(1.1): infinite loop

2008-08-27 Thread Daniel Diniz

New submission from Daniel Diniz <[EMAIL PROTECTED]>:

Calling os.urandom(1 + float(x)) ends in a infinite loop due to a naive
condition check:

while len(bytes) < n:
bytes += read(_urandomfd, n - len(bytes))

Trivial patch attached.

--
components: Library (Lib)
files: urandom.diff
keywords: patch
messages: 72050
nosy: ajaksu2
severity: normal
status: open
title: os.urandom(1.1): infinite loop
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file11277/urandom.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3709] BaseHTTPRequestHandler innefficient when sending HTTP header

2008-08-27 Thread Yang Zhao

New submission from Yang Zhao <[EMAIL PROTECTED]>:

send_header() in BaseHTTPRequestHandler currently does a write to socket
every time send_header() is called. This results in excessive number of
TCP packets being regenerated. Ideally, as much of the HTTP packet is
buffered as possible, but, at minimum, the header should be sent with a
single write as there is a convenient end_header() functional available.

Behaviour is observed under python 2.5, but the related code looks
identical in SVN trunk.

Will contribute patch if request is deemed reasonable but no one is
available to work on it; I just need a few days.

--
components: Library (Lib)
messages: 72051
nosy: yangman
severity: normal
status: open
title: BaseHTTPRequestHandler innefficient when sending HTTP header
type: performance
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3710] Reference leak in thread._local

2008-08-27 Thread Ben Cottrell

New submission from Ben Cottrell <[EMAIL PROTECTED]>:

This is a copy of a message I sent to the python-dev mailing list; it
was suggested in a reply that I file a bug for this issue. I'm
filing it against Python 2.5 because that's where I noticed it,
but it doesn't look like this code has changed much in trunk.

I noticed that thread._local can leak references if objects are
being stored inside the thread._local object whose destructors
might release the GIL.

The way this happens is that in Modules/threadmodule.c, in the
_ldict() function, it does things like this:

Py_CLEAR(self->dict);
Py_INCREF(ldict);
self->dict = ldict;

If the Py_CLEAR ends up taking away the last reference to an object
contained in the dict, and a thread context switch occurs during that
object's deallocation, then self->dict might not be NULL on return
from Py_CLEAR; another thread might have run, accessed something in
the same thread._local object, and caused self->dict to be set to
something else (and Py_INCREF'ed). So when we blindly do the
assignment into self->dict, we may be overwriting a valid reference,
and not properly Py_DECREFing it.

The recent change (revision 64601 to threadmodule.c) did not address
context switches during the Py_CLEAR call; only context switches
during tp_init.

The attached patch (against trunk) is my first attempt at fixing this.
It detects if self->dict has been set to something else after the
Py_CLEAR, and retries the Py_CLEAR (because _ldict really only cares
about installing the proper value of self->dict for the currently
running thread).

However, I am still uncomfortable about the fact that local_getattro
and local_setattro discard the value returned from _ldict, and instead
hand off control to the PyObject_Generic layer and trust that by the
time self->dict is actually used, it still has the correct value for
the current thread. Would it be better to, say, inline a copy of the
PyObject_Generic* functions inside local_getattro/local_setattro,
and force the operations to be done on the actual dict returned by
_ldict()?

--
components: Extension Modules
files: threadmodule.c.diff
keywords: patch
messages: 72052
nosy: tamino
severity: normal
status: open
title: Reference leak in thread._local
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file11278/threadmodule.c.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3710] Reference leak in thread._local

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Hmm, rather than the while loop in your proposal, the proper idiom would be:

PyObject *olddict = self->dict;
Py_INCREF(ldict);
self->dict = ldict;
Py_XDECREF(olddict);

--
nosy: +pitrou
priority:  -> high
versions: +Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3705] py3k aborts if "-c" or "-m" is given a non-ascii value

2008-08-27 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
keywords: +needs review
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3710] Reference leak in thread._local

2008-08-27 Thread Ben Cottrell

Ben Cottrell <[EMAIL PROTECTED]> added the comment:

But then if there is a context switch during the last Py_XDECREF, then
it could be the case that self->dict is not set properly on return from
_ldict().

Functions like local_setattro() use _ldict() more for its side effect
(setting self->dict) than for its return value. It's possible that
this should be changed; see the last paragraph in my original report.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3710] Reference leak in thread._local

2008-08-27 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

> But then if there is a context switch during the last Py_XDECREF, then
> it could be the case that self->dict is not set properly on return from
> _ldict().

Well, C code is effectively locked in a single thread until the GIL is
released. It means that a piece of C code which doesn't release the GIL
behaves as a critical section. So the only thing to consider, IMO, is
whether the GIL can still be released between "if (ldict == NULL)" and
"self->dict = ldict".

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3710] Reference leak in thread._local

2008-08-27 Thread Ben Cottrell

Ben Cottrell <[EMAIL PROTECTED]> added the comment:

The specific thing that was happening for me is that an
_sqlite3.Connection object was in the dictionary. In
Modules/_sqlite/connection.c, in pysqlite_connection_dealloc(),
it uses Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS.

So it's the call to Py_DECREF that's interesting from my point
of view. I believe that if _ldict() sets self->dict to what it
should be for the current thread, and then calls Py_DECREF on
the old value, and then returns, then _ldict() is no longer
able to guarantee that self->dict will be set to the right
thing for the current thread after it returns (because if the
Py_DECREF ended up deallocating something like an sqlite3
connection, then it'd have released and reacquired the GIL).

Hence, in the patch I attached, the assignment into self->dict
is kept as the last thing that happens before _ldict() returns,
and I believe this means _ldict() can still make that guarantee.

Of course, I'd be all for changing local_getattro/local_setattro
to not need _ldict to make that guarantee! _ldict always *returns*
the correct pointer; it would be nice to make use of that somehow.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Henry Precheur

Henry Precheur <[EMAIL PROTECTED]> added the comment:

I removed my previous patch. It was not dealing with all broken mbstowcs
cases and yours is much better.

Some comments on the other patch:

I don't think the macro HAVE_BROKEN_MBSTOWCS alone is a perfect idea. It
won't fix the problem in the long run:

Most contributors won't be aware of this problem and might be using
mbstowcs without putting the #ifdef's. Then the problem will come back
and bite us again.

I would rather do something like this:

#ifdef HAVE_BROKEN_MBSTOWCS
size_t  __non_broken_mbstowcs(wchar_t* pwcs, const char* s, size_t n)
{
if (pwcs == NULL)
return strlen(s);
else
return mbstowcs(pwcs, s, n);
}
#define mbstowcs__non_broken_mbstowcs
#endif

It would fix the problem everywhere, and people won't have to worry
about putting #ifdef everywhere in the future.

I attached a test program, run it on cygwin to make sure this approach
works on your side.


Another small remark; #ifdef is better then #ifndef when doing
#ifdef ...
...
#else
...
#endif

Simply because it easier to get "Be positive" than "Don't be negative".

The negative form is generally harder to get whether your are
programming, writing or talking. Use the positive form and you will have
more impact and will make things clearer.

Added file: http://bugs.python.org/file11279/test.c

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3696] Error parsing arguments on OpenBSD <= 4.4

2008-08-27 Thread Henry Precheur

Changes by Henry Precheur <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file11266/fix_mbstowcs_openbsd.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3706] Fix error message for wrong exec() argument type

2008-08-27 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Looks okay, although my taste would be to let the calls to
source_as_string() be slightly more verbose and include the "string,
bytes" part. While that has a little more redundancy, it is easier to
read, and possibly easier to grep for.

--
nosy: +gvanrossum

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3678] Ignored LDFLAGS during linking libpython$(VERSION).so

2008-08-27 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith
priority:  -> normal

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3602] Move test.test_suport.catch_warning() to the 'warnings' module

2008-08-27 Thread Mark Hammond

Mark Hammond <[EMAIL PROTECTED]> added the comment:

I stumbled across this when mimetools import of test failed due to
finding a local test package, not the python test package, so I too will
be happy to see this fixed.

--
nosy: +mhammond

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3710] Reference leak in thread._local

2008-08-27 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
nosy: +gregory.p.smith

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1868] threading.local doesn't free attrs when assigning thread exits

2008-08-27 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
keywords: +patch
nosy: +gregory.p.smith

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3678] Ignored LDFLAGS during linking libpython$(VERSION).so

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

I think this ldflags-ldlast patch (added) is whats really needed.

--
keywords: +easy, needs review
Added file: http://bugs.python.org/file11280/ldflags-ldlast-gps01.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3710] Reference leak in thread._local

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

fyi - This bug and #1868 (http://bugs.python.org/issue1868) seem related.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1868] threading.local doesn't free attrs when assigning thread exits

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

see also #3710

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1868] threading.local doesn't free attrs when assigning thread exits

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

I like Amaury's patch, it gets rid of what seems like an existing gross
hack of having localobject->dict exist at all.

I believe it may also fix #3710 by getting rid of the unnecessary
localobject->dict member.

Could someone else please review this?

threading_local.patch is available for review here:
http://codereview.appspot.com/3641

--
keywords: +needs review
priority: high -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3708] os.urandom(1.1): infinite loop

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

i'll fix this and add a unit test.

--
assignee:  -> gregory.p.smith
keywords: +easy
nosy: +gregory.p.smith
priority:  -> low

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3708] os.urandom(1.1): infinite loop

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

better patch with tests attached, no explicit int conversion is done.

i also wrapped the use of the fd returned by open with a try: finally:
to avoid any chance of a leak and renamed the bytes variable to bs to
match whats in py3k and avoid overriding the builtin type.

--
keywords: +needs review
priority: low -> normal
Added file: http://bugs.python.org/file11281/urandom-float-and-close.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3704] cookielib doesn't handle URLs with / in parameters

2008-08-27 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file11282/cookielib.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3014] file_dealloc() assumes errno is set when EOF is returned

2008-08-27 Thread Laszlo (Laca) Peter

Changes by Laszlo (Laca) Peter <[EMAIL PROTECTED]>:


--
nosy: +laca

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3704] cookielib doesn't handle URLs with / in parameters

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

attached is a patch with the suggested fix along with a unit test.

--
assignee:  -> gregory.p.smith
keywords: +needs review
nosy: +gregory.p.smith
priority:  -> normal
Added file: http://bugs.python.org/file11283/cookielib-querystring-fix.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

given where we are in the release process at the moment I doubt this can
go into 2.6/3.0.  Bring it up on python-dev if you have compelling
reasons why it should.

Otherwise, looks good for trunk 2.7/3.1 immediately after the releases
are branched.

--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith
priority:  -> normal
type:  -> feature request

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3703] open() on directory raises IOError with unhelpful message

2008-08-27 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

looks good to me

--
nosy: +gregory.p.smith

___
Python tracker <[EMAIL PROTECTED]>

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