[issue3027] if extended c module is calling Windows API waitForSingleObject, it will block other thread.

2008-06-03 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
resolution:  -> works for me
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



[issue2847] Remove cl usage from aifc

2008-06-03 Thread Quentin Gallet-Gilles

Quentin Gallet-Gilles <[EMAIL PROTECTED]> added the comment:

Updated the patch with the following corrections/improvements :

- corrected a missed str -> bytes
- replace % formatting occurrences with str.format()
- more PEP-8 conformance

Added file: http://bugs.python.org/file10506/aifc_3.0.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2847] Remove cl usage from aifc

2008-06-03 Thread Quentin Gallet-Gilles

Changes by Quentin Gallet-Gilles <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10499/aifc_3.0.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Georg Brandl

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

One more thing: with r63891 the encoding and errors arguments for the
creation of sys.stderr were made configurable; you'll have to adapt the
patch so that it defaults to backslashescape but can be overridden by
PYTHONIOENCODING.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Atsuo Ishimoto

Atsuo Ishimoto <[EMAIL PROTECTED]> added the comment:

This patch contains following changes.

- Added the new C API PyObject_ASCII() for consistency.
- Added the new string formatting operater for str.format() and
PyUnicode_FromFormat.

Added file: http://bugs.python.org/file10507/diff6.txt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2906] tkinter, assorted fixes

2008-06-03 Thread Georg Brandl

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

Applied in trunk, 25-maint and 3k.

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Georg Brandl

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

Review:

* Why is an empty string not printable? In any case, the empty string
should be among the test cases for isprintable().

* Why not use PyUnicode_DecodeASCII instead of
PyUnicode_FromEncodedObject? It should be a bit faster.

* If old-style string formatting gets "%a", .format() must get a "!a"
specifier.

* The ascii() and repr() tests should be expanded so that both test the
same set of objects, and the expected differences. Are there tests for
failing cases?

* This is just "return ascii" (in builtin_ascii):
+   if (ascii == NULL)
+   return NULL;
+
+   return ascii;

* For PyBool_FromLong(1) and PyBool_FromLong(0) there is Py_RETURN_TRUE
and Py_RETURN_FALSE. (You're not to blame, the rest of unicodeobject.c
seems to use them too, probably a legacy.)

* There appear to be some space indentations in tab-indented files like
bltinmodule.c and vice versa (unicodeobject.c).

* C docs/isprintable() docs: The spec
+   Characters defined in the Unicode character database as "Other"
+   or "Separator" other than ASCII space(0x20) are not considered
+   printable.
is unclear, better say "All character except those ... are considered
printable".

* ascii() docs: 
+   the non-ASCII
+   characters in the string returned by :func:`ascii`() are hex-escaped
+   to generate a same string as :func:`repr` in Python 2.

should be

"the non-ASCII characters in the string returned by :func:`repr` are
backslash-escaped (with ``\x``, ``\u`` or ``\U``) to generate ...".

* makeunicodedata: len(list(n for n in names if n is not None)) could
better be expressed as sum(1 for n in names if n is not None).

Otherwise, the patch is fine IMO. (I'm surprised that only so few tests
needed adaptation, that's a sign that we're not testing Unicode enough.)

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Atsuo Ishimoto

Atsuo Ishimoto <[EMAIL PROTECTED]> added the comment:

BTW, are new C APIs and functions should be ported to Python 2.6 for
compatibility, without modifing repr() itself? If so, I'll prepare a
patch for 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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Georg Brandl

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

ascii() should probably be in future_builtins.

Whether the C API stuff and .isprintable() should be backported to 2.6
is something for Guido to decide.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Atsuo Ishimoto

Atsuo Ishimoto <[EMAIL PROTECTED]> added the comment:

Thank you for your review! 
I filed a new patch just before I see your comments.

On Tue, Jun 3, 2008 at 7:13 PM, Georg Brandl <[EMAIL PROTECTED]> wrote:
>
> Georg Brandl <[EMAIL PROTECTED]> added the comment:
>
> Review:
>
> * Why is an empty string not printable? In any case, the empty string
> should be among the test cases for isprintable().

Well, my intuition came from str.islower() was wrong. An empty string is
printable, of cource.

> * Why not use PyUnicode_DecodeASCII instead of
> PyUnicode_FromEncodedObject? It should be a bit faster.
>

Okay, thank you.

> * If old-style string formatting gets "%a", .format() must get a "!a"
> specifier.
>
I added the format string in my latest patch.

> * The ascii() and repr() tests should be expanded so that both test the
> same set of objects, and the expected differences. Are there tests for
> failing cases?
>

Okay, thank you.

> * This is just "return ascii" (in builtin_ascii):
> +   if (ascii == NULL)
> +   return NULL;
> +
> +   return ascii;

Fixed in my latest patch.

>
> * For PyBool_FromLong(1) and PyBool_FromLong(0) there is Py_RETURN_TRUE
> and Py_RETURN_FALSE. (You're not to blame, the rest of unicodeobject.c
> seems to use them too, probably a legacy.)

Okay, thank you.

>
> * There appear to be some space indentations in tab-indented files like
> bltinmodule.c and vice versa (unicodeobject.c).
>

I think bltinmodule.c is fixed with latest patch, but I don't know what
is correct indentation for unicodeobject.c. I guess latest patch is
acceptable.

> * C docs/isprintable() docs: The spec
> +   Characters defined in the Unicode character database as "Other"
> +   or "Separator" other than ASCII space(0x20) are not considered
> +   printable.
> is unclear, better say "All character except those ... are considered
> printable".
>
> * ascii() docs:
> +   the non-ASCII
> +   characters in the string returned by :func:`ascii`() are hex-escaped
> +   to generate a same string as :func:`repr` in Python 2.
>
> should be
>
> "the non-ASCII characters in the string returned by :func:`repr` are
> backslash-escaped (with ``\x``, ``\u`` or ``\U``) to generate ...".
>

Okay, thank you.

> * makeunicodedata: len(list(n for n in names if n is not None)) could
> better be expressed as sum(1 for n in names if n is not None).

I don't want to change here, because this is reversion of rev 63378.

> One more thing: with r63891 the encoding and errors arguments for the
> creation of sys.stderr were made configurable; you'll have to adapt the
> patch so that it defaults to backslashescape but can be overridden by
> PYTHONIOENCODING.

I think sys.stderr should be default to 'backslashreplace' always. I'll
post a messege to Py3k-list later.

>
> Otherwise, the patch is fine IMO. (I'm surprised that only so few tests
> needed adaptation, that's a sign that we're not testing Unicode enough.)
>

Thank you very much! I'll file new patch soon.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3029] free list management - list, dict, set

2008-06-03 Thread Andrew I MacIntyre

Andrew I MacIntyre <[EMAIL PROTECTED]> added the comment:

Freelist clearing functions for int and float were added by Christian,
and made available to Python code via a function in the sys module.  I
don't know who added the freelist clearing functions for the class,
frame, method, tuple and unicode objects, but they are called by
gc.collect().

Because the freelist implementations are all static to the relevant type
source files, functions within each object source file seem a reasonable
way of implementing the required functionality.

I don't see the need for them to be part of the public API, but I framed
this patch to fit in with what's already in place.

It is likely that the functionality of this patch is of minor value, and
can thus be rejected.

Indeed, I experimented with ripping out all freelists and making sure
that all types used PyMalloc, and the resulting interpreter is about
6-8% slower on a pybench run (FreeBSD 7.0, gcc 4.2.1, 6% slower on
32bit, 8% slower on 64bit, 64bit is ~15% faster than 32bit in either
case) than the trunk (r63501).  Individual micro-benchmarks in pybench
show 15-30% variations between the freelist & no freelist, but this
doesn't seem to significantly affect the running of the whole benchmark.

Issue 2862 is more important IMO, as the current situation has 2
different approaches to accessing freelist management, where I believe
there should only be 1.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3031] distutils package_dir/package_data failure

2008-06-03 Thread fma

New submission from fma <[EMAIL PROTECTED]>:

For python2.4:
Python 2.4.4 (#2, Apr 15 2008, 23:43:20)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2

The distutils documentation says to use an empty string in the 
setup() 'package_dir' param. for current dir. It works fine for python 
modules, but it fails when using 'package_data' param. For example:

.
|-- __init__.py
|-- module1.py
|-- module2.py
|-- setup.py
`-- view
|-- __init__.py
|-- module3.glade
|-- module3.py
|-- module4.glade
`-- module4.py

setup.py:

from distutils.core import setup
setup(name='my_package',
  package_dir={'my_package': ''},
  packages=['my_package', 'my_package.view'],
  package_data={'my_package': ['view/*.glade']}
)

$ python setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/my_package
copying module1.py -> build/lib/my_package
copying module2.py -> build/lib/my_package
copying __init__.py -> build/lib/my_package
creating build/lib/my_package/view
copying view/module3.py -> build/lib/my_package/view
copying view/module4.py -> build/lib/my_package/view
copying view/__init__.py -> build/lib/my_package/view
creating build/lib/my_package/iew
error: can't copy 'iew/module3.glade': doesn't exist or not a regular 
file

To correct this, '.' should be used instead of the empty string:

from distutils.core import setup
setup(name='my_package',
  package_dir={'my_package': '.'},
  packages=['my_package', 'my_package.view'],
  package_data={'my_package': ['view/*.glade']}
)

Note that the empty string works fine on python2.5:
Python 2.5.2 (r252:60911, Apr 17 2008, 13:15:05)
[GCC 4.2.3 (Debian 4.2.3-3)] on linux2

--
components: Distutils
messages: 67659
nosy: fma
severity: normal
status: open
title: distutils package_dir/package_data failure
type: behavior
versions: Python 2.4

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3028] tokenize module: normal lines, not "logical"

2008-06-03 Thread Senthil

Senthil <[EMAIL PROTECTED]> added the comment:

> The documentation of the tokenize module says: "The line passed is the
> *logical* line; continuation lines are included."
> 
> I suggest that this will be changed to something like "The line passed
> is the index of the string returned by the readline function, plus 1.
> That is, the first string returned is called line 1, the second is
> called line 2, and so on."

The emphasis of *logical* may help us understand that it is a complete line.

I find the wording of solution bit awkward, tough I am able to get what it is
trying to say.

- Index of string returned by readline function ??  and plus 1. ??

How about, 

The line passed is the *logical* non-blank line; continuation lines are 
included.
The row counting starts from one.

--
nosy: +orsenthil

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3029] free list management - list, dict, set

2008-06-03 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

> I don't see the need for them to be part of the 
> public API, but I framed this patch to fit in 
> with what's already in place.

These should not be part of the public API; otherwise,
we lock-in the freelisting implementation detail and
cannot readily change it (since some C code may come
to rely on the new functions).

--
priority: high -> normal

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Atsuo Ishimoto

Changes by Atsuo Ishimoto <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10511/diff7.txt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1730136] tkFont.__eq__ gives type error

2008-06-03 Thread Guilherme Polo

Changes by Guilherme Polo <[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



[issue3033] tkFont added displayof where necessary

2008-06-03 Thread Guilherme Polo

New submission from Guilherme Polo <[EMAIL PROTECTED]>:

Added support for -displayof where necessary in tkFont

--
components: Tkinter
files: tkFont_displayof_added.diff
keywords: patch, patch
messages: 67662
nosy: gpolo
severity: normal
status: open
title: tkFont added displayof where necessary
versions: Python 2.6
Added file: http://bugs.python.org/file10509/tkFont_displayof_added.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3034] tkFont added displayof where necessary

2008-06-03 Thread Guilherme Polo

New submission from Guilherme Polo <[EMAIL PROTECTED]>:

Added support for -displayof where necessary in tkFont

--
components: Tkinter
files: tkFont_displayof_added.diff
keywords: patch, patch
messages: 67663
nosy: gpolo
severity: normal
status: open
title: tkFont added displayof where necessary
versions: Python 2.6
Added file: http://bugs.python.org/file10510/tkFont_displayof_added.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3034] tkFont added displayof where necessary

2008-06-03 Thread Guilherme Polo

Guilherme Polo <[EMAIL PROTECTED]> added the comment:

Duplicate of #3033, sorry

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Atsuo Ishimoto

Atsuo Ishimoto <[EMAIL PROTECTED]> added the comment:

I updated the patch as per Georg's advice.

Added file: http://bugs.python.org/file10511/diff7.txt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1730136] tkFont.__eq__ gives type error

2008-06-03 Thread Guilherme Polo

Guilherme Polo <[EMAIL PROTECTED]> added the comment:

Patch added

--
keywords: +patch
nosy: +gpolo
Added file: http://bugs.python.org/file10508/tkFont.Font.__eq__.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Atsuo Ishimoto

Atsuo Ishimoto <[EMAIL PROTECTED]> added the comment:

I'm sorry, I missed a file to be uploaded. diff7_1.txt is correct file.

Added file: http://bugs.python.org/file10512/diff7_1.txt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3032] tkFont added displayof where necessary

2008-06-03 Thread Guilherme Polo

Changes by Guilherme Polo <[EMAIL PROTECTED]>:


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



[issue3032] tkFont added displayof where necessary

2008-06-03 Thread Guilherme Polo

Changes by Guilherme Polo <[EMAIL PROTECTED]>:


--
components: Tkinter
keywords: patch
nosy: gpolo
severity: normal
status: open
title: tkFont added displayof where necessary
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



[issue1500773] wm_attributes doesn't take keyword arguments

2008-06-03 Thread Guilherme Polo

Guilherme Polo <[EMAIL PROTECTED]> added the comment:

I'm adding my own version, this was done against python-trunk

--
nosy: +gpolo
Added file: http://bugs.python.org/file10513/issue1500773.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3035] Removing apparently unwanted functions from Tkinter

2008-06-03 Thread Guilherme Polo

New submission from Guilherme Polo <[EMAIL PROTECTED]>:

Patch for removing some unwanted, and probably not used, functions at
tkinter/__init__.

--
components: Tkinter
files: removed_index_funcs.diff
keywords: patch, patch
messages: 67669
nosy: gpolo
severity: normal
status: open
title: Removing apparently unwanted functions from Tkinter
versions: Python 3.0
Added file: http://bugs.python.org/file10514/removed_index_funcs.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1706460] access to unicodedata (via codepoints or 2-char surrogates)

2008-06-03 Thread Walter Dörwald

Walter Dörwald <[EMAIL PROTECTED]> added the comment:

Fixed for 3.0 in r63918

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Eric Smith

Changes by Eric Smith <[EMAIL PROTECTED]>:


--
nosy: +eric.smith

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-03 Thread Guido van Rossum

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

> Whether the C API stuff and .isprintable() should be backported to 2.6
> is something for Guido to decide.

No way -- while all of this makes sense in Py3k, where all strings are
Unicode, it would cause no end of problems in 2.6, and it would break
backward compatibility badly.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1482122] Shift+Backspace exhibits odd behavior

2008-06-03 Thread Guilherme Polo

Guilherme Polo <[EMAIL PROTECTED]> added the comment:

I've tested this on Linux and on Tk 8.4 I got "\b", and the same
happened with Tkinter. On Linux, again, with Tk 8.5 I got a rectangle
char (something invalid), and this repeated at Tkinter.

This is not a Tkinter issue.

--
nosy: +gpolo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1702681] Prevent textwrap from breaking words at hyphens

2008-06-03 Thread Sylvain Fourmanoit

Sylvain Fourmanoit <[EMAIL PROTECTED]> added the comment:

> That being said, I'm +1 on adding a keyword argument treating hyphens
> as non-breaking

It's now in Python 2.6: http://bugs.python.org/issue2659

This issue should probably be closed.

--
nosy: +fourmanoit

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1702681] Prevent textwrap from breaking words at hyphens

2008-06-03 Thread Guilherme Polo

Guilherme Polo <[EMAIL PROTECTED]> added the comment:

"Duplicate" of issue2659

--
nosy: +gpolo
resolution:  -> duplicate
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



[issue3008] Let bin() show floats

2008-06-03 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

> AFAICT, there is no good use case for showing floats in in hex

It is my impression that hexadecimal is more common than binary, in the
numerical analysis community, for exact representation of floats.

For example:
http://hal.archives-ouvertes.fr/docs/00/28/14/29/PDF/floating-point-article.pdf

"Hexadecimal floating-point representations are especially important
when values must be represented exactly, for reproducible results — for
instance, for testing “borderline cases” in algorithms."

Or course, without hex float literals or an equivalent function for
input, hex float output is not much use.

--
nosy: +tjreedy

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2613] inconsistency with bare * in parameter list

2008-06-03 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

Rationale for banning f(*,**k): it could represent a bug (intended bare
name(s) omitted) that should be flagged, a lack of clear understanding
of the redundancy, or a somewhat unPythonic stylistic preference for
useless redundancy.  I consider the first the most likely in practice,
though I also did not see the redundancy at first.  Guido has used the
'likely a bug' rationale for other design decisions.

--
nosy: +tjreedy

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1758146] Crash in PyObject_Malloc

2008-06-03 Thread Adam Olsen

Adam Olsen <[EMAIL PROTECTED]> added the comment:

Does the PythonInterpreter option create multiple interpreters within a
single process, rather than spawning separate processes?

IMO, that API should be ripped out.  They aren't truly isolated
interpreters and nobody I've asked has yet provided a use case for it.

--
nosy: +Rhamphoryncus

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3001] RLock's are SLOW

2008-06-03 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1758146] Crash in PyObject_Malloc

2008-06-03 Thread Vaclav Slavik

Vaclav Slavik <[EMAIL PROTECTED]> added the comment:

> Does the PythonInterpreter option create multiple interpreters
> within a single process

Yes.

> They aren't truly isolated interpreters and nobody I've asked has yet 
> provided a use case for it.

If you ignore mod_python and mod_wsgi, then maybe, but mod_python is
*the* use case for this. Running separate process for every web app
and/or every virtual host on your server is expensive in terms of RAM
usage (and this matters if you use virtual server - 256MB or less is not
unusual). On the other hand, you need isolation for independent apps --
some modules may use globals, or you may want to be able to run both
production and testing versions of the same app (i.e. different versions
of the same Python module).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1758146] Crash in PyObject_Malloc

2008-06-03 Thread Adam Olsen

Adam Olsen <[EMAIL PROTECTED]> added the comment:

Right, so it's only the python modules loaded as part of the app that
need to be isolated.  You don't need the stdlib or any other part of the
interpreter to be isolated.

This could be done either by not using the normal import mechanism
(build your own on top of exec()) or by some magic to generate a
different root package for each "interpreter" (so you show up in
sys.modules as '_mypkg183.somemodule'.)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1758146] Crash in PyObject_Malloc

2008-06-03 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
type:  -> crash

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2302] Uses of SocketServer.BaseServer.shutdown have a race

2008-06-03 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1429] FD leak in SocketServer

2008-06-03 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1390197] tempfile misses usecase which requirs renaming

2008-06-03 Thread Giampaolo Rodola'

Giampaolo Rodola' <[EMAIL PROTECTED]> added the comment:

If you mean "renaming the temporary file while it is still opened" I see
2 reasons for not doing that:

- On Windows this is not possible since files remains locked as long as
you close() them.

- open().name and tempfile.NamedTemporaryFile().name attributes are not
reliable since they remains the same even after the file renaming.
>>> import os
>>> f = open('1', 'w')
>>> os.rename('1', '2')
>>> f.name
1

--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2848] Remove mimetools usage from the stdlib

2008-06-03 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

The only use of mimetools inside cgi is in parse_multipart, which is 
untested and has huge warnings like these ones:

"""
XXX This does not parse nested multipart parts -- use FieldStorage for
that.

XXX This should really be subsumed by FieldStorage altogether -- no
point in having two implementations of the same parsing algorithm.
Also, FieldStorage protects itself better against certain DoS attacks
by limiting the size of the data read in one chunk.  The API here
does not support that kind of protection.  This also affects parse()
since it can call parse_multipart().
"""

--
nosy: +hdiogenes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2848] Remove mimetools usage from the stdlib

2008-06-03 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

I'm sending a patch that removes mimetools from urllib and test_urllib. It 
now returns an email.message.Message instead of mimetools.Message.

I also moved some imports to the top of the file. If that's a problem, I 
can send another patch.

--
keywords: +patch
Added file: http://bugs.python.org/file10515/remove_mimetools_from_urllib.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2848] Remove mimetools usage from the stdlib

2008-06-03 Thread Humberto Diogenes

Changes by Humberto Diogenes <[EMAIL PROTECTED]>:


Added file: 
http://bugs.python.org/file10516/remove_mimetools_from_urllib.patch-2

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2848] Remove mimetools usage from the stdlib

2008-06-03 Thread Humberto Diogenes

Changes by Humberto Diogenes <[EMAIL PROTECTED]>:


Removed file: 
http://bugs.python.org/file10515/remove_mimetools_from_urllib.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1513695] new turtle module

2008-06-03 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Thanks for the patch, committed as r63929. Please move any further
discussion or other necessary changes into a new issue.

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



[issue2848] Remove mimetools usage from the stdlib

2008-06-03 Thread Humberto Diogenes

Humberto Diogenes <[EMAIL PROTECTED]> added the comment:

It's relatively easy to replace mimetools in most places: it's just a 
matter of changing mimetools.Message to email.message_from_file, but it 
gets a lot more complicated when there's inheritance involved.

The problem is that mimetools.Message is both a parser and a Message 
representation, and AFAIK there's no single class in ``email`` which does 
both -- the functionality is split between the Parser and Message classes.

Inheritance happens in two places: ``pydoc.Message`` and 
``http.client.HTTPMessage``, and I couldn't find a solution for those 
cases yet. Any help would be appreciated.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1758146] Crash in PyObject_Malloc

2008-06-03 Thread Vaclav Slavik

Vaclav Slavik <[EMAIL PROTECTED]> added the comment:

> This could be done either by not using the normal import mechanism

This is completely unrealistic suggestion, people use libraries and
frameworks in their code, you're in effect suggestion that no library
that could possibly be used in webapp should use (standard) import.

I may be wrong, but I strongly suggest that you do talk to
mod_python/wsgi people (who know much better than me) about what
real-life uses of isolated interpreters are, before entertaining the
idea of getting rid of the feature.

___
Python tracker <[EMAIL PROTECTED]>

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