[issue3185] Documentation of time.time() differs from source documentation

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

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

I cannot see the difference. The docstring doesn't say current local
time, it says current time. What do you mean by current local unix
seconds - that phrase makes no sense.

time.time() returns the seoncds since the Epoch, and they must be
interpreted in UTC, always. So both documentation texts are correct, and
they say the same thing.

--
nosy: +loewis

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3185
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3185] Documentation of time.time() differs from source documentation

2008-06-24 Thread Carsten Grohmann

Carsten Grohmann [EMAIL PROTECTED] added the comment:

current local unix seconds means seconds since the Epoch in local
timezone.

I've attached a small example to show that is no difference between the
time returned by time.localtime() and time.time(). So I assume that
time.time() also returns local time and not UTC.

 time.mktime(time.localtime())
1214290130.0
 time.time()
1214290130.697067

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3185
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3179] cPickle is seriously broken

2008-06-24 Thread Ralf Schmitt

Ralf Schmitt [EMAIL PROTECTED] added the comment:

the test works as expected (i.e. it fails). The problem I had was that 
some Bittorrent bencode also installed a test package for me.


==
ERROR: test_flat_list (__main__.cPickleFlatList)
--
Traceback (most recent call last):
  File Lib/test/test_cpickle.py, line 113, in test_flat_list
cPickle.dumps(lst)
RuntimeError: maximum recursion depth exceeded

--
Ran 159 tests in 0.457s

FAILED (errors=1)
Traceback (most recent call last):
  File Lib/test/test_cpickle.py, line 128, in module
test_main()
  File Lib/test/test_cpickle.py, line 124, in test_main
cPickleFlatList,
  File /home/ralf/pydev/trunk/Lib/test/test_support.py, line 714, in
run_unittest
_run_suite(suite)
  File /home/ralf/pydev/trunk/Lib/test/test_support.py, line 697, in
_run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File Lib/test/test_cpickle.py, line 113, in test_flat_list
cPickle.dumps(lst)
RuntimeError: maximum recursion depth exceeded

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3179
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3179] cPickle is seriously broken

2008-06-24 Thread Ralf Schmitt

Ralf Schmitt [EMAIL PROTECTED] added the comment:

btw. this should be a release blocker.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3179
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3185] Documentation of time.time() differs from source documentation

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

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

I think you are misinterpreting what you are seeing. time.mktime returns
seconds since the Epoch, in UTC, when passed broken-down local time. So
that the result is the same as time.time() doesn't mean that time.time()
returns local unix seconds (there is no such thing), but it means that
both time.time() and time.mktime() return seconds since the Epoch, in UTC.

Closing as invalid.

--
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3185
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3186] bin(long) doesn't have a trailing 'L'

2008-06-24 Thread Mark Dickinson

New submission from Mark Dickinson [EMAIL PROTECTED]:

In Python 2.6, for a long n, hex(n) and oct(n) have a trailing 'L', while 
bin(n) does not:

 hex(1L)
'0x1L'
 oct(1L)
'01L'
 bin(1L)
'0b1'

I'm guessing that this is intentional, and that the only reason hex(n) and 
oct(n) still have a trailing 'L' is backwards compatibility, but I thought 
I'd better check.

--
assignee: rhettinger
messages: 68672
nosy: marketdickinson, rhettinger
severity: normal
status: open
title: bin(long) doesn't have a trailing 'L'
versions: Python 2.6

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3181] ConfigParsers are classic classes

2008-06-24 Thread Ari Makela

Ari Makela [EMAIL PROTECTED] added the comment:

New-style classes make object orientated programming considerably more
convenient. For example one can use property() instead of __setitem__ et
al. There's super(). This is, of course, not a serious problem and one
can always implement a composite class which inherits from object and
has a configparser as an attribute.

This would be a nice improvement and as far as I know completely safe.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3181
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.walk - strange bug

2008-06-24 Thread Helmut Jarausch

New submission from Helmut Jarausch [EMAIL PROTECTED]:

The script below produces 1664 lines of output before it bails out with
Traceback (most recent call last):
  File WalkBug.py, line 5, in module
for Dir, SubDirs, Files in os.walk('/home/jarausch') :
  File /usr/local/lib/python3.0/os.py, line 278, in walk
for x in walk(path, topdown, onerror, followlinks):
  File /usr/local/lib/python3.0/os.py, line 268, in walk
if isdir(join(top, name)):
  File /usr/local/lib/python3.0/posixpath.py, line 64, in join
if b.startswith('/'):
TypeError: expected an object with the buffer interface

=
file  WalkBug.py:

#!/usr/local/bin/python3.0

import os

for Dir, SubDirs, Files in os.walk('/home/jarausch') :
  print(processing {0:d} files in {1}.format(len(Files),Dir))

--
components: Library (Lib)
messages: 68674
nosy: HWJ
severity: normal
status: open
title: os.walk - strange bug
type: crash
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3188] float('infinity') should be valid

2008-06-24 Thread Mark Dickinson

New submission from Mark Dickinson [EMAIL PROTECTED]:

2.6 adds float('inf') and float('nan') as cross-platform ways to 
generate infinities and NaNs.  The C99 standard (section 7.20.1.3, 
paragraph 3) specifies that 'infinity' (in any case, with optional 
preceding sign) should also be a valid input to strtod, and I propose 
that in Python float('infinity') should correspondingly be valid.

Note that the IEEE 754 standard also states that 'inf' and 'infinity' 
should be valid input string representations of infinity, and Python's 
decimal module also allows both 'inf' and 'infinity'.

A patch is attached.

Unless I'm mistaken, this change is simple and unlikely to be 
controversial.  I plan to check it in in a week or two if there's no 
feedback before then.

--
assignee: marketdickinson
files: infinity.patch
keywords: patch
messages: 68675
nosy: christian.heimes, marketdickinson
severity: normal
status: open
title: float('infinity') should be valid
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0
Added file: http://bugs.python.org/file10716/infinity.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3188
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3140] str.format({0:n}) poss. bug with setlocale()

2008-06-24 Thread Eric Smith

Eric Smith [EMAIL PROTECTED] added the comment:

Fixed in r64499 (trunk) and r64500 (py3k).

I now get:
 import locale
 locale.setlocale(locale.LC_ALL, en_US.UTF-8)
'en_US.UTF-8'
 for x in
(123,1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900):
...  print([{0:20n}].format(x))
... 
[ 123]
[   1,234]
[  12,345]
[ 123,456]
[   1,234,567]
[  12,345,678]
[ 123,456,789]
[   1,234,567,890]
[  12,345,678,900]

and:

 for x in
(123,1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900):
...  print([{0:10n}].format(x))
... 
[   123]
[ 1,234]
[12,345]
[   123,456]
[ 1,234,567]
[12,345,678]
[123,456,789]
[1,234,567,890]
[12,345,678,900]

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3140
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3189] Py3k DeprecationWarning in difflib

2008-06-24 Thread Virgil Dupras

New submission from Virgil Dupras [EMAIL PROTECTED]:

When running with the -3 flag, difflib creates DeprecationWarnings. I 
attach a patch fixing them.

There was a note in the code saying DOES NOT WORK for x in a. However, 
after my changes, tests still pass, so I removed these notices. If someone 
knows what this was all about, let me know.

--
components: Library (Lib)
files: difflib_py3k_deprecation.diff
keywords: patch
messages: 68677
nosy: vdupras
severity: normal
status: open
title: Py3k DeprecationWarning in difflib
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10717/difflib_py3k_deprecation.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3189] Py3k DeprecationWarning in difflib

2008-06-24 Thread Virgil Dupras

Virgil Dupras [EMAIL PROTECTED] added the comment:

It slipped out of my mind that performance was probably important for this 
module, so I ditched that nested get call and went if an if..else.

Added file: http://bugs.python.org/file10718/difflib_py3k_deprecation2.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.walk - strange bug

2008-06-24 Thread Amaury Forgeot d'Arc

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

Could you tell us what this 1665th line should be?
Maybe the 1665th directory has something special (a filename with spaces
or non-ascii chars...)

Can you try with an older version of python?

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3177] implement os.startfile on posix and MacOSX

2008-06-24 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' [EMAIL PROTECTED]:


--
nosy: +giampaolo.rodola

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3177
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3186] bin(long) doesn't have a trailing 'L'

2008-06-24 Thread Eric Smith

Eric Smith [EMAIL PROTECTED] added the comment:

See
http://mail.python.org/pipermail/python-dev/2008-February/077062.html,
where Guido endorses my approach to implementing bin() without the
trailing L for longs.

Note that he also agrees with not adding a __bin__ function, which was
implemented in r64424.  I disagree with adding __bin__ to 2.6.

--
components: +Interpreter Core
nosy: +eric.smith

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3186] bin(long) doesn't have a trailing 'L'

2008-06-24 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Ah.  I missed this.  Apologies.

Sorry for the noise.

--
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3190] Pydoc should ignore __package__ attributes

2008-06-24 Thread Nick Coghlan

New submission from Nick Coghlan [EMAIL PROTECTED]:

Pydoc doesn't display the standard special attributes for packages and
modules (__name__, __file__, __path__).

It shouldn't display PEP 361's new __package__ attribute either.

--
assignee: ncoghlan
components: Library (Lib)
messages: 68682
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Pydoc should ignore __package__ attributes
type: behavior
versions: Python 2.6, Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3190
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1284316] Win32: Security problem with default installation directory

2008-06-24 Thread Jason R. Coombs

Jason R. Coombs [EMAIL PROTECTED] added the comment:

+1 on using Program Files by default.

In addition to the points mentioned above, there are other considerations.

In 64-bit platforms (Windows XP x64 and Vista 64-bit), programs are
segmented by their binary compatibility (C:\Program Files and C:\Program
Files (x86)).  Installing Python to the proper program directory helps
keep it organized as to it's binary compatibility.

Additionally, I often run several version of Python side-by-side, and
having these clutter my root directory is simply unacceptable.

I've been running Python from C:\Program Files for years, and I have
encountered problems, even including the recent setuptools bug, but for
the most part, these issues have been worked out.  I add C:\Program
Files\Python and c:\Program Files\Python\Scripts to my path, and things
work well.  I would think that since only a few issues remain, if Python
is moved to the standard location, any remaining issues can be ironed out.

--
nosy: +jaraco

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1284316
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.walk - strange bug

2008-06-24 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

It seems the conversion to unicode strings (PyUnicode vs PyBytes) was
not complete in os.listdir. See the attached patch.

--
keywords: +patch
Added file: http://bugs.python.org/file10719/oslistdir_string.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2459] speedup for / while / if with better bytecode

2008-06-24 Thread Χρήστος Γεωργίου (Christos Georgiou)

Χρήστος Γεωργίου (Christos Georgiou) [EMAIL PROTECTED] added the comment:

A pointer to previous (minor) research:

http://groups.google.com/group/comp.lang.python/browse_frm/thread/72505e3cb6d9cb1a/e486759f06ec4ee5

esp. after Terry Reedy's post

--
nosy: +tzot

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2459
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.walk - strange bug

2008-06-24 Thread Amaury Forgeot d'Arc

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

The original problem seems to come from some Unix platform, but this
patch only handles two cases:
- on win32, when the argument is a bytestring.
- on OS/2.
And in both cases, the default (utf-8) conversion seems wrong. Something
like cp1252 (the ANSI code page for Western Windows) would be more sensible.

In the posix part of the function, there is the comment (2003-03-04):
/* fall back to the original byte string, as
   discussed in patch #683592 */
btw, I find the penultimate message of this other thread very pleasant,
in the py3k context... I suppose the conclusions would not be the same
today.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3143] development docs waste a lot of horizontal space on left nav bar

2008-06-24 Thread Roger Demetrescu

Changes by Roger Demetrescu [EMAIL PROTECTED]:


--
nosy: +rdemetrescu

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3143
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.walk - strange bug

2008-06-24 Thread Helmut Jarausch

Helmut Jarausch [EMAIL PROTECTED] added the comment:

 Could you tell us what this 1665th line should be?
 Maybe the 1665th directory has something special (a filename with  
 spaces or non-ascii chars...)

Yes, the next directory contains a filename with an iso-latin1 but non-
ascii character

 Can you try with an older version of python?
No problems - runs every night here

The patch (applied to SVN GMT 13:30) does NOT help.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3191] round docstring is inaccurate

2008-06-24 Thread Mark Dickinson

New submission from Mark Dickinson [EMAIL PROTECTED]:

In Python 3.0, help(round) gives the following:

round(...)
round(number[, ndigits]) - floating point number

Round a number to a given precision in decimal digits (default 0 
digits).
This returns an int when called with one argument, otherwise a 
float.
Precision may be negative.

But in Python 3.x, round(x, n) doesn't always return a float;  for 
example, if x is a Decimal or Fraction then round(x, 2) is again a 
Decimal or Fraction (respectively).

--
assignee: georg.brandl
components: Documentation
messages: 68690
nosy: georg.brandl, marketdickinson
severity: normal
status: open
title: round docstring is inaccurate
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2813] No float formatting in PyString_FromFormat

2008-06-24 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Here is another patch for PyString_FromFormat* adding support for 'l' and 
'z' type specifications for the '%x' format and an optional '#' to prepend 
'0x' to the hex result.  In addition, the '%p' format is handled as '%#x'.

Updates for the c-api tests and the documentation for exceptions and 
string are also included in the patch.

Like before, the patch is a forward delta to the files of Python 2.6b1.

Added file: http://bugs.python.org/file10720/stringobject_format_xLf.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2813
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3182] 2to3 Slight Patch

2008-06-24 Thread Collin Winter

Collin Winter [EMAIL PROTECTED] added the comment:

I'm not wild about making this change for such a minimal improvement
(which I would guess falls within the margin of error), since it will
limit extensibility and testability. I think I'd be fine with it if the
benefit were 10%, but 3% doesn't sound significant enough.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3182
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3189] Py3k DeprecationWarning in difflib

2008-06-24 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Applying a minimal version of this patch -- changing has_key() to 
__contains__().  See r64511.

--
nosy: +rhettinger
resolution:  - accepted
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3182] 2to3 Slight Patch

2008-06-24 Thread Nick Edds

Nick Edds [EMAIL PROTECTED] added the comment:

I don't think the improvement falls in margin of error, but maybe I'm
wrong. The problem was that even when just run on a single file,
isinstance was being called upwards of 100,000 times. I guess it doesn't
merit inclusion on its own though, but with other things I'm working on,
I think it makes sense.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3182
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue449227] rlcompleter add ( to callables feature

2008-06-24 Thread Roman Suzi

Roman Suzi [EMAIL PROTECTED] added the comment:

Thanks for the patch!

However, I do not understand if it ever gets included into Python or
remains always for those who find it? (I do not believe this small
change is somehow PEPable, but how it gets included then?)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue449227
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue449227] rlcompleter add ( to callables feature

2008-06-24 Thread Guilherme Polo

Guilherme Polo [EMAIL PROTECTED] added the comment:

This is nearly good. 
But I have some notes: you don't need to import operator here, just use
the built-in callable; stick to 80 columns; leave a space after a comma.

--
nosy: +gpolo

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue449227
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue449227] rlcompleter add ( to callables feature

2008-06-24 Thread Manuel Muradás

Manuel Muradás [EMAIL PROTECTED] added the comment:

Guilherme,
Thanks a lot for taking some time to review my patch.
Here is a new version.

Please take another look and tell me what do you think about it.
Thanks again

Added file: http://bugs.python.org/file10721/rlcompleter2.6.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue449227
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue449227] rlcompleter add ( to callables feature

2008-06-24 Thread Manuel Muradás

Changes by Manuel Muradás [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10714/rlcompleterAndDoc2.6.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue449227
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue449227] rlcompleter add ( to callables feature

2008-06-24 Thread Guilherme Polo

Guilherme Polo [EMAIL PROTECTED] added the comment:

On Tue, Jun 24, 2008 at 3:42 PM, Manuel Muradás [EMAIL PROTECTED] wrote:

 Manuel Muradás [EMAIL PROTECTED] added the comment:

 Guilherme,
 Thanks a lot for taking some time to review my patch.
 Here is a new version.

 Please take another look and tell me what do you think about it.
 Thanks again

That is good to be applied now.


 Added file: http://bugs.python.org/file10721/rlcompleter2.6.diff

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue449227
 ___


___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue449227
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-24 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

On Mon, Jun 23, 2008 at 5:25 PM, Jean Brouwers [EMAIL PROTECTED]
wrote:

 result is different for 32- and 64-bit

  cc -xtarget=native log_inf.c -lm ; a.out
 -Inf 33
 Inf 33


That 33 for the second log call may just be the propagated errno value
from the first call.  Could you try setting errno = 0 before each of the
printf
calls?  I'd expect that log(HUGE_VAL) doesn't set errno at all.

Mark

Added file: http://bugs.python.org/file10722/unnamed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___div class=gmail_quoteOn Mon, Jun 23, 2008 at 5:25 PM, Jean Brouwers lt;a 
href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt; wrote:brblockquote 
class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex;
div class=Ih2E3dresult is different for 32- and 64-bitbr/div
br
gt; cc -xtarget=native log_inf.c -lm ; a.outbr
-Inf 33br
Inf 33br/blockquotedivbr/divdivThat 33 for the second log call may 
just be the propagated errno value/divdivfrom the first call. nbsp;Could 
you try setting errno = 0 before each of the printf/divdivcalls? 
nbsp;I#39;d expect that log(HUGE_VAL) doesn#39;t set errno at all./div
divbr/divdivMark/div/div
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-24 Thread Mark Dickinson

Changes by Mark Dickinson [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10722/unnamed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-24 Thread Mike Speciner

New submission from Mike Speciner [EMAIL PROTECTED]:

In 2.5, exec(open(filename)), where filename refers to a file with
python code, executes the code.
In 2.5, open returns an open file, but in 3.0, open returns a stream,
and so exec (which wants a string, file, or code object, not
TextIOWrapper) returns an error. exec should probably be able to handle
a stream.

--
components: Interpreter Core
messages: 68700
nosy: ms
severity: normal
status: open
title: exec(open(filename)) doesn't work
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3192
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-24 Thread Leif Walsh

Leif Walsh [EMAIL PROTECTED] added the comment:

There's 'execfile' in Lib/idlelib/PyShell.py...I'm looking for others.

There is also a class of functions 'exec*' (and a related class, 
'spawn*') in Lib/os.py that claims to do just what you want, but 
replacing the current process (or, in spawn*'s case, in a new thread).

That said, I agree that exec should handle streams, and if you could 
give me a heads up as to where the code is for exec(), I could try my 
hand at a patch.

--
nosy: +leif.walsh

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3192
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-24 Thread Mike Speciner

Mike Speciner [EMAIL PROTECTED] added the comment:

I'm actually quite new to Python. My current interpreter of choice is
PostScript, followed by Matlab, but I've been discouraged from using
either one here at EMC. (PostScript because it's obscure, Matlab because
it's expensive!)

Meanwhile, I'm on a wintel machine, making perusing the Python source
tree difficult. So I'm not going to be much help in that regard. 

By the way, I was told that execfile is gone from python 3.

--ms

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3192
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-24 Thread Leif Walsh

Leif Walsh [EMAIL PROTECTED] added the comment:

On Tue, Jun 24, 2008 at 3:05 PM, Mike Speciner [EMAIL PROTECTED] wrote:
 By the way, I was told that execfile is gone from python 3.

It certainly isn't in the branch I just checked out.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3192
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-24 Thread Leif Walsh

Leif Walsh [EMAIL PROTECTED] added the comment:

(isn't gone, that is)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3192
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-24 Thread Mike Speciner

Mike Speciner [EMAIL PROTECTED] added the comment:

Well, I think I found exec in bltinmodule.c,
but execfile isn't in that file. [In the 3.0 tree.]

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3192
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-24 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Right on!  With errno = 0; in between both calls:

-Inf 33
Inf 0

/Jean

On Tue, Jun 24, 2008 at 1:17 PM, Mark Dickinson [EMAIL PROTECTED] wrote:

 Mark Dickinson [EMAIL PROTECTED] added the comment:

 On Mon, Jun 23, 2008 at 5:25 PM, Jean Brouwers [EMAIL PROTECTED]
 wrote:

 result is different for 32- and 64-bit

  cc -xtarget=native log_inf.c -lm ; a.out
 -Inf 33
 Inf 33


 That 33 for the second log call may just be the propagated errno value
 from the first call.  Could you try setting errno = 0 before each of the
 printf
 calls?  I'd expect that log(HUGE_VAL) doesn't set errno at all.

 Mark

 Added file: http://bugs.python.org/file10722/unnamed

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3167
 ___

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3167] math test fails on Solaris 10

2008-06-24 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Mark,

Take a look at the SUN forum, there is a (long) answer.

http://forum.java.sun.com/thread.jspa?threadID=5308106tstart=0

/Jean

On Tue, Jun 24, 2008 at 3:37 PM, Jean Brouwers [EMAIL PROTECTED] wrote:

 Jean Brouwers [EMAIL PROTECTED] added the comment:

 Right on!  With errno = 0; in between both calls:

 -Inf 33
 Inf 0

 /Jean

 On Tue, Jun 24, 2008 at 1:17 PM, Mark Dickinson [EMAIL PROTECTED] wrote:

 Mark Dickinson [EMAIL PROTECTED] added the comment:

 On Mon, Jun 23, 2008 at 5:25 PM, Jean Brouwers [EMAIL PROTECTED]
 wrote:

 result is different for 32- and 64-bit

  cc -xtarget=native log_inf.c -lm ; a.out
 -Inf 33
 Inf 33


 That 33 for the second log call may just be the propagated errno value
 from the first call.  Could you try setting errno = 0 before each of the
 printf
 calls?  I'd expect that log(HUGE_VAL) doesn't set errno at all.

 Mark

 Added file: http://bugs.python.org/file10722/unnamed

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3167
 ___

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3167
 ___


___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3167
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3192] exec(open(filename)) doesn't work

2008-06-24 Thread Leif Walsh

Leif Walsh [EMAIL PROTECTED] added the comment:

execfile is in Lib/idlelib/PyShell.py, and is an instance function, so
it's not really standard for regular code, and would also be hard to
use correctly.  Sorry.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3192
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1394] simple patch, improving unreachable bytecode removing

2008-06-24 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Recommend rejecting.  Too much work for zero performance payoff.

--
assignee: rhettinger - 

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1394
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1394] simple patch, improving unreachable bytecode removing

2008-06-24 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

Rejecting.  Too much risk as well, based on experience in the past with
supposedly harmless optimizations.

--
resolution:  - rejected
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1394
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3193] Python 2.5.2 - Python[2420:613] Error loading / flat namespace error

2008-06-24 Thread Peter Dilley

New submission from Peter Dilley [EMAIL PROTECTED]:

I have noticed a new crash when using pyglet module after installing 
the latest Apple security patch/framework for Quicktime, Quicktime 
Framework 7.5.0.

This error is repeatable.

This error occurs when the opened window is selected/made active with 
the mouse pointer.

This error occured when using OpenGL.

Session below:
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type help, copyright, credits or license for more information.
 from pyglet.gl import *
 window = pyglet.window.Window()
 @window.event
... def on_draw():
... glClear(GL_COLOR_BUFFER_BIT)
... glLoadIdentity()
... glBegin(GL_TRIANGLES)
... glVertex2f(0, 0)
... glVertex2f(window.width, 0)
... glVertex2f(window.width, window.height)
... glEnd()
... 
 pyglet.app.run()
2008-06-24 20:14:06.232 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.239 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.245 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.249 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.256 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.262 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.268 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.274 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.302 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.308 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder
  Expected in: flat namespace
2008-06-24 20:14:06.380 Python[2420:613] Error 
loading /Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 
6 Decoder:  dlopen(/Library/QuickTime/DivX 6 
Decoder.component/Contents/MacOS/DivX 6 Decoder, 262): Symbol not 
found: _GetDataHandler
  Referenced from: /Library/QuickTime/DivX 6 

[issue3193] Python 2.5.2 - Python[2420:613] Error loading / flat namespace error

2008-06-24 Thread Guilherme Polo

Guilherme Polo [EMAIL PROTECTED] added the comment:

Neither pyglet nor anything else you installed is part of Python's
source, you will have to re-report this at the appropriate place.

--
nosy: +gpolo
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3193
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3193] Python 2.5.2 - Python

2008-06-24 Thread Peter Dilley

Peter Dilley [EMAIL PROTECTED] added the comment:

Done at pyglet,

Thanks for the update, my first Python error like that, could not
determine where the issue was stemming from.

My worry was the latest security patching from Apple introduced this
bug with the Mac version of Python.org's implementation.

Cheers,
Peter

2008/6/25 Guilherme Polo [EMAIL PROTECTED]:

 Guilherme Polo [EMAIL PROTECTED] added the comment:

 Neither pyglet nor anything else you installed is part of Python's
 source, you will have to re-report this at the appropriate place.

 --
 nosy: +gpolo
 resolution:  - invalid
 status: open - closed

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3193
 ___


--
title: Python 2.5.2 - Python[2420:613] Error loading / flat namespace error - 
Python 2.5.2 - Python

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3193
___
___
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-24 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Re-opening for further discussion.

-1 on Nick's suggestion to normalize hex output so that nearby floats 
have nearby reprs.  This unnecessarily complicates a simple, straight-
forward presentation.  In the paper referenced by Terry Reedy, 
normalized presentations were not used and I've never seen that done 
anywhere else.

IMO, the patch is fine as-is.

--
status: closed - open
Added file: http://bugs.python.org/file10724/float6.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-06-24 Thread Raymond Hettinger

Changes by Raymond Hettinger [EMAIL PROTECTED]:


--
assignee: rhettinger - gvanrossum
nosy: +gvanrossum
title: Let bin() show floats - Let bin/oct/hex show floats

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.listdir can return byte strings

2008-06-24 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
title: os.walk - strange bug - os.listdir can return byte strings

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3194] Demo/loop.c passing char * instead of wchar_t *

2008-06-24 Thread Rafael Zanella

New submission from Rafael Zanella [EMAIL PROTECTED]:

The Demo/loop.c passes a char pointer (argv[0]) while 
Py_SetProgramName() now expects a wchar_t pointer.

I've attached a patch, the solution on the patch was borrowed,
ok stolen, from Python/frozenmain.c

--
files: loop_c.diff
keywords: patch
messages: 68715
nosy: zanella
severity: normal
status: open
title: Demo/loop.c passing char * instead of wchar_t *
type: crash
versions: Python 3.0
Added file: http://bugs.python.org/file10725/loop_c.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3194
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-06-24 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Updating patch so that the global symbol starts with _Py.

Added file: http://bugs.python.org/file10726/float7.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com