[issue4657] Doctest gets line numbers wrongs with in name

2008-12-14 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

When writing the unit tests for running doctests from inside a zipfile,
I initially had anon as the name being passed to the
doctest.DocTestFinder.find method.

With that name, the line numbers coming back for all of the examples
were being incremented by 1 beyond what test_doctest expected (and hence
my tests were failing).

Changing the name to anon eliminated the errors. (Both anon and
anon also failed in the same fashion as anon)

I suspect there may be a problem with __LINECACHE_FILENAME_RE when 
or  are embedded in the name used for the doctest execution.

--
messages: 7
nosy: ncoghlan
severity: normal
status: open
title: Doctest gets line numbers wrongs with  in name

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



[issue4645] configparser DEFAULT

2008-12-14 Thread Quentin Gallet-Gilles

Changes by Quentin Gallet-Gilles qgal...@gmail.com:


--
versions: +Python 2.5.3 -Python 2.4, Python 2.5

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



[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Adeodato Simó

Adeodato Simó d...@net.com.org.es added the comment:

 Does the same thing happen with 2.6?

No, I can't reproduce with 2.6.1.

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



[issue4512] Add get_filename method to zipimport

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Correction - added as _get_filename() in that revision.

Documenting it and making it public (i.e. removing the underscore) is
still to be done, and will only be done for 2.7/3.1

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



[issue4082] __main__.__file__ not set correctly when -m switch gets __main__ from a zipfile

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Fixed for 2.7 in r67750.

Will be ported to 2.6, 3.0 and 3.1.

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



[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


Removed file: http://bugs.python.org/file12336/bit_length7.patch

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



[issue4082] __main__.__file__ not set correctly when -m switch gets __main__ from a zipfile

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Final revisions for fix:
2.7 = r67751 (there was a new test file missing from the initial checkin)
2.6 = r67752
3.1 = r67753
3.0 = r67754

--
resolution:  - fixed
status: open - closed

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



[issue4223] inspect.getsource doesn't work on functions imported from a zipfile

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Final revisions for fix:
2.7 = r67751 (there was a new test file missing from the initial checkin)
2.6 = r67752
3.1 = r67753
3.0 = r67754

--
resolution:  - fixed
status: open - closed

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



[issue1040026] os.times() is bogus

2008-12-14 Thread Malte Helmert

Malte Helmert helm...@informatik.uni-freiburg.de added the comment:

 I see. I wish that people would a) always provide complete patches in
 a single file, and b) delete files themselves that have been
 superceded by others. In any case, I have re-attached the file;
 thanks for pointing this out.

Regarding b), I did that as far as I could (i.e., deleted my own files
that were superseded).

I left the unit test as a separate file because I wasn't too sure if it
would get incorporated -- it looks a bit flaky because it relies on
timing issues, and it's also one of the longer-running tests as it
spends (comparatively) a lot of time in a busy loop. I wouldn't be
surprised if it breaks on some machines sometimes, especially ones with
low clock granularity.

Thanks for the comment though, I'll keep it in mind in the future.

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



[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Antoine Pitrou

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


--
priority:  - critical
type:  - behavior

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



[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson

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

Updated patch;  cleanup of comments and slight refactoring of code.

Int-float conversions are even a speck faster than the current code, for 
small inputs.  (On my machine, on a Friday night, during a full moon.  
Your results may differ.  :))

Also, retarget this for 2.7 and 3.1.

--
versions: +Python 2.7, Python 3.1 -Python 2.6
Added file: http://bugs.python.org/file12352/long_as_double3.patch

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



[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Resul Cetin

Resul Cetin resul-ce...@gmx.net added the comment:

I have the same problem with that code:

(exchange USERNAME with your delicious username and PASSWORD with your 
delicious password):
 import urllib.request
 auth_handler = urllib.request.HTTPBasicAuthHandler()
 auth_handler.add_password('del.icio.us API', 'api.del.icio.us',
USERNAME, PASSWORD)
 opener = urllib.request.build_opener(auth_handler)
 print(str(opener.open('https://api.del.icio.us/v1/posts/all').read(20),
utf-8))

And I don't use a proxy or anything like that. This makes python 3
completely unusable for me. And python 2.6 gives me what I want (the
content of that virtual file) without any extra data in front or in the
middle of the content.

--
nosy: +ResulCetin

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



[issue1734234] Fast path for unicodedata.normalize()

2008-12-14 Thread Antoine Pitrou

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

Here is a new patch against trunk, including the modified data files.
All tests pass and I confirm a very healthy speed-up (~ 5x) when trying
to a normalize an already normalized string. The slowdown for
non-normalized strings is so small that it cannot be distinguished from
measurement noise.

Martin, do you think this can be committed?

--
nosy: +loewis
stage:  - patch review
type:  - performance
versions: +Python 2.7, Python 3.1 -Python 2.6
Added file: http://bugs.python.org/file12350/uninorm.patch

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



[issue4197] Doctest module does not work with zipped packages

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Fixed for 2.7 in r67750.

Will be ported to 2.6, 3.0 and 3.1.

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



[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Adeodato Simó

Adeodato Simó d...@net.com.org.es added the comment:

 FWIW, there are trailing spurious bytes too

And in the middle of the document as well. Each time there's a chunk, I
guess?

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



[issue4512] Add get_filename method to zipimport

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Fixed for 2.7 in r67750.

Will be ported to 2.6, 3.0 and 3.1.

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



[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


Removed file: http://bugs.python.org/file10694/long_as_double.patch

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



[issue4201] Pdb cannot access source code in zipped packages.

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Fixed for 2.7 in r67750.

Will be ported to 2.6, 3.0 and 3.1.

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



[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


Removed file: http://bugs.python.org/file12343/bit_length7_opt2.patch

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



[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson

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

Update both patches:

(1) change PyLong_FromLong(ndigits-1) to PyLong_FromSsize_t(ndigits-1) in 
both patches (it's possible to have a 32-bit long and 64-bit Py_ssize_t), and

(2) in the optimized patch, add the table lookup optimization for 
long_bit_length.

Added file: http://bugs.python.org/file12348/bit_length7.patch

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



[issue4197] Doctest module does not work with zipped packages

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Final revisions for fix:
2.7 = r67751 (there was a new test file missing from the initial checkin)
2.6 = r67752
3.1 = r67753
3.0 = r67754

--
resolution:  - fixed
status: open - closed

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



[issue4201] Pdb cannot access source code in zipped packages.

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Final revisions for fix:
2.7 = r67751 (there was a new test file missing from the initial checkin)
2.6 = r67752
3.1 = r67753
3.0 = r67754

--
resolution:  - fixed
status: open - closed

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



[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


Added file: http://bugs.python.org/file12349/bit_length7_opt2.patch

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



[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


Removed file: http://bugs.python.org/file12320/long_as_double2.patch

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



[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Clarifying the diagnosis, the offending spurious bytes are only present
when we use 3.0's GET above.

That's because urllib.request.HTTPHandler asks for a vanilla
http.client.HTTPConnection, which uses HTTP 1.1.

IIUC, either we change the request version back to 1.0 (attached patch)
or correct the way the response is processed (is it at all?).

I think HTTPSHandler will also suffer from this, perhaps
[Fancy]URLopener too.

[Antoine: cool, an edit conflict that agrees with what I was about to
post :D]

--
keywords: +patch
Added file: http://bugs.python.org/file12351/urllib_bytes.diff

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



[issue4223] inspect.getsource doesn't work on functions imported from a zipfile

2008-12-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Fixed for 2.7 in r67750.

Will be ported to 2.6, 3.0 and 3.1.

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



[issue4071] ntpath.abspath fails for long str paths

2008-12-14 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

GetFullPathNameW may return the required buffer size (non-zero value) 
when buffer is too short. Before r67154, this case was treated as 
success, so there was possibility of access to uninitialized buffer 
woutbuf. Fortunately, GetFullPathNameW sets '\0' to woutbuf (this is 
undocumented behavior), so abspath() returned empty string instead of 
segmentation fault. But this is still potentially dangerous, so I fixed 
this by allocating required size buffer and calling GetFullPathNameW 
again. abspath() returns correct result for any long unicode path now.

But original poster hopes abspath() should return correct result for 
any long both *str* and unicode path. For str, this issue is not solved 
yet.

--
I'm skeptical abspath() should support longer path than MAX_PATH if 
ANSI version of Windows API cannot handle such path. Anyway, I won't 
use such long path. ;-)

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



[issue4656] Python 3 tutorial has old information about dicts

2008-12-14 Thread Benjamin Peterson

Benjamin Peterson musiccomposit...@gmail.com added the comment:

Thanks! Fixed in r67755.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

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



[issue4658] missing closing bracket in Functional Programming HOWTO

2008-12-14 Thread Bram Geron

New submission from Bram Geron bge...@gmail.com:

In the Functional Programming HOWTO - Built-in functions - sorted, the
syntaxis code misses a closing square bracket just after `reverse=False`.

--
assignee: georg.brandl
components: Documentation
messages: 77801
nosy: bgeron, georg.brandl
severity: normal
status: open
title: missing closing bracket in Functional Programming HOWTO
versions: Python 3.0

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



[issue4074] Building a list of tuples has non-linear performance

2008-12-14 Thread Antoine Pitrou

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

Here is a simple patch implementing Martin's proposal with a few basic
tweaks.

Using Greg's script, we get:

- without patch:

100 2.64134001732
200 3.60712885857
300 5.40855813026
400 6.46308898926
500 8.65147781372
600 10.3949871063
700 12.1376650333
800 12.7046239376
900 15.4652290344

- with patch:

100 2.692289114
200 1.91455483437
300 2.02900099754
400 1.72369813919
500 1.87697696686
600 2.08952093124
700 1.08168196678
800 2.32068109512
900 1.1202070713

- with GC disabled:

100 1.6810901165
200 0.955595970154
300 0.959649085999
400 0.933673858643
500 0.954123973846
600 0.929254055023
700 0.901160001755
800 0.921751022339
900 0.894830942154

--
keywords: +patch
stage:  - patch review
Added file: http://bugs.python.org/file12353/gctrigger.patch

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



[issue1040026] os.times() is bogus

2008-12-14 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

[-gvanrossum]

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



[issue1040026] os.times() is bogus

2008-12-14 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
nosy:  -gvanrossum

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



[issue4659] compilation warning in Modules/zipimport.c

2008-12-14 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

Probably harmless:

./Modules/zipimport.c: In function ‘get_module_code’:
./Modules/zipimport.c:1132: warning: format ‘%c’ expects type ‘int’, but
argument 3 has type ‘long int’

--
components: Extension Modules
messages: 77804
nosy: pitrou
priority: low
severity: normal
status: open
title: compilation warning in Modules/zipimport.c
versions: Python 3.1

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



[issue4197] Doctest module does not work with zipped packages

2008-12-14 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Nick,

Your commit does not fix the line number reporting from doctest failures:

$ ./python.exe testmodule.zip
**
File testmodule.zip/__main__.py, line ?, in __main__.c
...

Note the '?' in the output.  Did you miss the doctest.py changes in
doctest-1.patch, or should I open a separate issue for the line number
bug?

There is also a problem of __main__.c which my patch does not address,
but it is less important than the line number.

On Sun, Dec 14, 2008 at 7:11 AM, Nick Coghlan rep...@bugs.python.org wrote:

 Nick Coghlan ncogh...@gmail.com added the comment:

 Final revisions for fix:
 2.7 = r67751 (there was a new test file missing from the initial checkin)
 2.6 = r67752
 3.1 = r67753
 3.0 = r67754

 --
 resolution:  - fixed
 status: open - closed

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue4197
 ___


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



[issue4660] multiprocessing.JoinableQueue task_done() issue

2008-12-14 Thread Brian

New submission from Brian br...@merrells.org:

Despite carefully matching my get() and task_done() statements I would 
often trigger raise ValueError('task_done() called too many times') in 
my multiprocessing.JoinableQueue (multiprocessing/queues.py)

Looking over the code (and a lot of debug logging), it appears that the 
issue arises from JoinableQueue.put() not being protected with a locking 
mechanism.  A preemption after the first line allows other processes to 
resume without releasing the _unfinished_tasks semaphore.

The simplest solution seems to be allowing task_done() to block while 
waiting to acquire the _unfinished_tasks semaphore.

Replacing:
if not self._unfinished_tasks.acquire(False):
  raise ValueError('task_done() called too many times')

With simply:
self._unfinished_tasks.acquire()

This would however remove the error checking provided (given the many 
far more subtler error that can be made, I might argue it is of limited 
value).  Alternately the JoinableQueue.put() method could be better 
protected.

--
components: Library (Lib)
messages: 77806
nosy: merrellb
severity: normal
status: open
title: multiprocessing.JoinableQueue task_done() issue
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

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



[issue4660] multiprocessing.JoinableQueue task_done() issue

2008-12-14 Thread Brian

Changes by Brian br...@merrells.org:


--
type:  - behavior

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



[issue4661] email.parser: impossible to read messages encoded in a different encoding

2008-12-14 Thread Adeodato Simó

New submission from Adeodato Simó d...@net.com.org.es:

Currently, email.parser/feedparser can only parse messages that come 
as a string, or from a file opened in text mode.

Email messages, however, can contain 8bit characters in any encoding 
other than the local one (yet still be valid e-mails, of course), so I 
think a method is needed to have the parser be able to receive bytes. 
At the moment, and as far as I can see, it's not possible to parse 
some perfectly valid messages with python 3.0.

I don't think it's appropriate to ask that files be opened with the 
proper encoding, and then for the parser to read them. First, it is 
not possible to know what encoding that would be without parsing the 
message. And second, a message could contain parts in different 
encoding, and many mailboxes with random messages most certainly do.

Also, message objects will need a way to return a bytes repreentation, 
for the reasons explained above, and particularly if one wants to 
write back the message without modifying it.

--
components: Library (Lib)
messages: 77807
nosy: dato
severity: normal
status: open
title: email.parser: impossible to read messages encoded in a different encoding
versions: Python 3.0

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-14 Thread Antoine Pitrou

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

Committed to py3k and release30-maint in r67760 and r67759. Needs
backporting to 2.x.

--
priority: release blocker - normal

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



[issue4660] multiprocessing.JoinableQueue task_done() issue

2008-12-14 Thread Benjamin Peterson

Changes by Benjamin Peterson musiccomposit...@gmail.com:


--
assignee:  - jnoller
nosy: +jnoller

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



[issue4661] email.parser: impossible to read messages encoded in a different encoding

2008-12-14 Thread Benjamin Peterson

Changes by Benjamin Peterson musiccomposit...@gmail.com:


--
assignee:  - barry
nosy: +barry

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



[issue4658] missing closing bracket in Functional Programming HOWTO

2008-12-14 Thread Benjamin Peterson

Benjamin Peterson musiccomposit...@gmail.com added the comment:

Thanks for the report! Fixed in r67761.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

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



[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Andrii V. Mishkovskyi

New submission from Andrii V. Mishkovskyi misho...@gmail.com:

posix module lacks DeprecationWarning for the functions listed below:
tempnam, tmpfile, fdopen, getcwdu, popen, tmpnam
All of these are absent in 3.0, so I think adding DeprecationWarning to
all of them would be useful.
Attaching a straight-forward patch against latest trunk checkout.

--
files: posixmodule.patch
keywords: patch
messages: 77810
nosy: mishok13
severity: normal
status: open
title: posix module lacks several DeprecationWarning's
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file12354/posixmodule.patch

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson

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

Here's a patch (force_to_memory2.patch) that I'm hoping fixes the cmath 
test failures on Solaris 10/x86.

Skip, could you give it a try?

The patch isn't final:  I need to look for more places where 
Py_FORCE_DOUBLE should be applied.  But I'll wait to find out whether this 
really does fix the problem, first;  I'm still just guessing about the 
cause.

By the way, it looks like the problem with the original patch, on OS X, 
was that nothing in pymath.c is used in the Python *core*, so the symbols 
from pymath.o aren't compiled into the python.exe executable, and they're 
not available when loading modules.  Rather than working out how to fix 
this, I just moved the definitions into Objects/floatobject.c instead.

Added file: http://bugs.python.org/file12355/force_to_memory2.patch

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



[issue4074] Building a list of tuples has non-linear performance

2008-12-14 Thread Adam Olsen

Adam Olsen rha...@gmail.com added the comment:

I didn't test it, but the patch looks okay to me.

--
nosy: +Rhamphoryncus

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-14 Thread Antoine Pitrou

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

Backported to trunk and 2.6.2 in r67762 and r67764.

--
resolution:  - fixed
status: open - closed

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



[issue4663] Increase TextIOWrapper._CHUNK_SIZE

2008-12-14 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

Simply bumping TextIOWrapper._CHUNK_SIZE from 128 to 1024 yields some
significant performance improvements.

./python -m timeit -s f=open('LICENSE') f.seek(0) for line in f: pass
 - with 128: 6.21 msec per loop
 - with 1024: 3.41 msec per loop

./python -m timeit -s f=open('LICENSE') f.seek(0) while
f.read(100): pass
 - with 128: 4.03 msec per loop
 - with 1024: 1.25 msec per loop

Is there any counter-indication to doing so?

--
messages: 77814
nosy: christian.heimes, pitrou
priority: high
severity: normal
status: open
title: Increase TextIOWrapper._CHUNK_SIZE
type: performance
versions: Python 3.0

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



[issue4664] import urlparse, cStringIO breaks

2008-12-14 Thread Lennart Regebro

New submission from Lennart Regebro rege...@gmail.com:

If you have urlparse before cStringIO in an import line, 2to3 will not
convert the cStringIO to io. However, reverse the order, and urlparse
will not get translated.

So this file:
import urlparse, cStringIO
import cStringIO, urlparse

will with 2to3 return the following diff:

--- test3.py (original)
+++ test3.py (refactored)
@@ -1,3 +1,3 @@
 
-import urlparse, cStringIO
-import cStringIO, urlparse
+import urllib.parse, cStringIO
+import io, urlparse

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 77815
nosy: lregebro
severity: normal
status: open
title: import urlparse, cStringIO breaks
type: behavior
versions: Python 3.0

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



[issue4664] fix_imports does not refactor import urlparse, cStringIO correctly

2008-12-14 Thread Alexandre Vassalotti

Alexandre Vassalotti alexan...@peadrop.com added the comment:

Sorry, I still cannot reproduce it. Could you attach your test file?
Maybe it is some weird encoding bug.

a...@helios:~$ 2to3 -f imports test.py
--- test.py (original)
+++ test.py (refactored)
@@ -1,2 +1,2 @@
-import urlparse, cStringIO
-import cStringIO, urlparse
+import urllib.parse, io
+import io, urllib.parse
RefactoringTool: Files that need to be modified:
RefactoringTool: test.py

--
nosy: +alexandre.vassalotti
title: import urlparse, cStringIO breaks - fix_imports does not refactor 
import urlparse, cStringIO correctly

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



[issue4645] configparser DEFAULT

2008-12-14 Thread Martin v. Löwis

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

The release candidate for 2.5.3 has been made; this patch cannot be
considered anymore.

Closing as fixed.

--
resolution:  - fixed
status: open - closed

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



[issue1040026] os.times() is bogus

2008-12-14 Thread Martin v. Löwis

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

 I wouldn't be
 surprised if it breaks on some machines sometimes, especially ones with
 low clock granularity.

Now that I look at the test, I see what you mean. I think I will reject
it.

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



[issue4664] fix_imports does not refactor import urlparse, cStringIO correctly

2008-12-14 Thread Benjamin Peterson

Benjamin Peterson musiccomposit...@gmail.com added the comment:

Here's one which doesn't work correctly:

$ 2to3 -
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
import cStringIO, HTMLParser
--- stdin (original)
+++ stdin (refactored)
@@ -1,1 +1,1 @@
-import cStringIO, HTMLParser
+import io, HTMLParser
RefactoringTool: Files that need to be modified:
RefactoringTool: stdin

This is because the fix_imports pattern catching one module per import
statement.

--
nosy: +benjamin.peterson

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



[issue1759845] subprocess.call fails with unicode strings in command line

2008-12-14 Thread xianyiteng

Changes by xianyiteng xytxyt...@gmail.com:


--
nosy: +xianyiteng

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



[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Martin v. Löwis

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

I don't think a DeprecationWarning is appropriate. Instead, there could
be a -3 warning.

--
nosy: +loewis

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



[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Benjamin Peterson

Benjamin Peterson musiccomposit...@gmail.com added the comment:

Well, it's trivial to use PyErr_WarnPy3k in place of PyErr_Warn.

--
nosy: +benjamin.peterson

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov

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

may be proposed patch break platforms that need specific export decoration

--
nosy: +rpetrov

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



[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Andrii V. Mishkovskyi

Changes by Andrii V. Mishkovskyi misho...@gmail.com:


Removed file: http://bugs.python.org/file12354/posixmodule.patch

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



[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Andrii V. Mishkovskyi

Andrii V. Mishkovskyi misho...@gmail.com added the comment:

I've missed one simple thing -- posix.getcwdu has been renamed to
posix.getcwd in 3.0, so adding Py3k deprecation warning to this function
is not really needed. Instead a fix for this should be added to the list
of 2to3 fixes.
I've also fixed the warnings according to Martin's proposal and updated
the patch.

Added file: http://bugs.python.org/file12356/posixmodule.patch

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



[issue4664] fix_imports does not refactor import urlparse, cStringIO correctly

2008-12-14 Thread Lennart Regebro

Lennart Regebro rege...@gmail.com added the comment:

Heres my test file.

Added file: http://bugs.python.org/file12357/test3.py

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



[issue4664] fix_imports does not refactor import urlparse, cStringIO correctly

2008-12-14 Thread Alexandre Vassalotti

Alexandre Vassalotti alexan...@peadrop.com added the comment:

Benjamin, your example fails for a different reason--i.e. the fixer for
HTMLParser is missing.

Sorry Lennart, I still cannot reproduce it.

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Skip Montanaro

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

Mark Skip, could you give it a try?

Works for me on Solaris 10/x86.  Based on Roumen's comment I am preparing to
try it on Mac OS X/x86 and Solaris 10/sparc.

Skip

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



[issue4664] fix_imports does not refactor import urlparse, cStringIO correctly

2008-12-14 Thread Lennart Regebro

Lennart Regebro rege...@gmail.com added the comment:

What version are you running? Can you post the output?

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



[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Skip Montanaro

New submission from Skip Montanaro s...@pobox.com:

I don't know if the Python source is supposed to be compilable with a C++
compiler or not, but I'm having trouble finding a C compiler on the
Solaris10/SPARC machines at work.  I decided to give a C++ compiler a whirl:

/opt/gnu/bin/c++ -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall 
-Wstrict-prototypes  -I. -IInclude -I../Include   -DPy_BUILD_CORE -o 
Parser/tokenizer.o ../Parser/tokenizer.c
../Parser/tokenizer.c: In function `char * 
PyTokenizer_RestoreEncoding(tok_state *, int, int *)':
../Parser/tokenizer.c:1614: ANSI C++ forbids implicit conversion from `void 
*' in assignment

Now this turns out to be a very old compiler:

% /opt/gnu/bin/c++ --version
2.95.3

Should Python be able to compile with this ancient GNU C++ compiler?

Thx,

Skip

--
messages: 77828
nosy: skip.montanaro
severity: normal
status: open
title: Failure to compile trunk on Solaris10/SPARC using C++ compiler

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



[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Christian Heimes

Christian Heimes li...@cheimes.de added the comment:

Python should be compile-able with a C++ compiler. I'll test it on my
system in a couple of minutes.

--
nosy: +christian.heimes

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov

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

I'm not sure that patch has to deal with force to memory.
FYI: when I port python trunk to mingw platform I encounter some
inconsistency for isinf.

My note about issue follow:
- configure.in:
...
dnl FIXME: For mingw isinf is a macro defined in math.h and can't be
dnl detected as function. Also PC/pyconfig.h define HAVE_ISINF but it is
dnl useless since header define Py_IS_INFINITY as (!_finite(X) 
!_isnan(X))
dnl Also in pymath.h is commented too how PC/pyconfig.h define _isinf.
dnl NOTE: For mingw to keep compatibility with native build we define
dnl Py_IS_INFINITY in pyport.h.
...

- pyport.h
#ifdef __MINGW32__
...
/*NOTE: mingw has isinf as macro defined in math.h.
  Since PC/pyconfig.h define Py_IS_INFINITY(X) that cover HAVE_ISINF
  here for Py_IS_INFINITY we define same as for native build.
  This makes HAVE_ISINF needless.
  Also see comments in configure.in and pymath.h. */
#define Py_IS_INFINITY(X) (!_finite(X)  !_isnan(X))



next lest see Py_IS_INFINITY in pymath.h

#ifndef Py_IS_INFINITY
#ifdef HAVE_ISINF
#define Py_IS_INFINITY(X) isinf(X)
#else
#define Py_IS_INFINITY(X) ((X)  (X)*0.5 == (X))
#endif
#endif


Is the macro Py_IS_INFINITY correct if isinf is not detected by
configure script ?

Also I think too that problem is that we has to classify result after
conversion to double.

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



[issue4664] Regression fix_imports does not refactor multiple imports correctly

2008-12-14 Thread Alexandre Vassalotti

Alexandre Vassalotti alexan...@peadrop.com added the comment:

I got it. It is a regression from a previous version of 2to3's
fix_imports. I was able to reproduce your problem using the sandbox's 2to3.

And to answer your question, I still running an older RC release of
Python 3.0. That explains why I couldn't reproduce the problem.

$ python3.0 -c import sys; print(sys.version)
3.0rc2+ (py3k:67237, Nov 16 2008, 15:10:03) 
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]

--
title: fix_imports does not refactor import urlparse, cStringIO correctly - 
Regression fix_imports does not refactor multiple imports correctly

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov

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

As Skip Montanaro report that work on ... may be macro from pymath.h has
to be changed to force conversion to double.

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



[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Christian Heimes

Christian Heimes li...@cheimes.de added the comment:

The trunk contains lots of implicit casts from void pointers that make
the code incompatible with C++.

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov

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

about export decoration it is find in then patch PyAPI_FUNC(double) .
found it after second review

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



[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Martin v. Löwis

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

I disagree. It's not a requirement that the Python source code is
compilable as C++. Only the header files should be thus compilable.

--
nosy: +loewis

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



[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Christian Heimes

Christian Heimes li...@cheimes.de added the comment:

Ah, I was under the impression that Python must be compatible both C++
and C89 compilers.

Do we have any means to test the C++ compatibility of the header files?
Full C++ compatibility is one way to make sure the header files are
compatible, too. *wink* I don't see harm in sprinkling explicit type
casts over the C code, too.

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov

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

The macro Py_IS_INFINITY don't work on linux. The test case(force-inf.c)
is attached. The result don't depend from optimisation flag.

isinf(x)=1
Py_IS_INFINITY(x)=0
Py_IS_INFINITY2(x)=1
isinf(x)=0
Py_IS_INFINITY(x)=0
Py_IS_INFINITY2(x)=0

Added file: http://bugs.python.org/file12358/force-inf.c

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



[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Martin v. Löwis

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

 Do we have any means to test the C++ compatibility of the header files?

No, we fix it when users report bugs (which typically happens very
quickly after we made some).

 Full C++ compatibility is one way to make sure the header files are
 compatible, too. *wink* I don't see harm in sprinkling explicit type
 casts over the C code, too.

That requires discussion, I'm opposed to such a change: it adds
unnecessary complication. In any case, such discussion would belong
to python-dev.

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



[issue4664] Regression fix_imports does not refactor multiple imports correctly

2008-12-14 Thread Benjamin Peterson

Benjamin Peterson musiccomposit...@gmail.com added the comment:

Fixed in r67774.

--
resolution:  - fixed
status: open - closed

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



[issue4666] test_bad_address in test_urllib2_localnet often fails

2008-12-14 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This error is often seen on the buildbots (both py3k and trunk):

==
FAIL: test_bad_address (test.test_urllib2_localnet.TestUrlopen)
--
Traceback (most recent call last):
  File
E:\cygwin\home\db3l\buildarea\3.0.bolen-windows\build\lib\test\test_urllib2_localnet.py,
line 452, in test_bad_address
http://www.python.invalid./;)
AssertionError: IOError not raised by urlopen

--
components: Tests
messages: 77840
nosy: pitrou
priority: high
severity: normal
status: open
title: test_bad_address in test_urllib2_localnet often fails
type: behavior
versions: Python 2.6, Python 3.0

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



[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Jeremy Hylton

Changes by Jeremy Hylton jer...@alum.mit.edu:


--
assignee:  - jhylton

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



[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson

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

 The macro Py_IS_INFINITY don't work on linux. The test case(force-inf.c)
 is attached. The result don't depend from optimisation flag.

Thanks, Roumen.  I rather suspected that Py_IS_INFINITY was dodgy this 
way.

On the other hand, this is only a problem when Py_IS_INFINITY is applied 
to a *computed* result;  most of the time Py_IS_INFINITY is being directly 
applied to the incoming argument to some function, so should be safe.

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



[issue4666] test_bad_address in test_urllib2_localnet often fails

2008-12-14 Thread Roumen Petrov

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

I confirm that following tests test_curses test_urllib2_localnet
test_urllibnet fail if regression test run all test.
All three tests succeed if I run them one by one.
Version - trunk, os - linux.

--
nosy: +rpetrov

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



[issue4667] Patch with a couple of 2.0isms in tutorial

2008-12-14 Thread Santiago Gala

New submission from Santiago Gala sg...@apache.org:

references to reload as builtin or dict.keys as returning a list, and
the use of the .sort method, all gone in 3.X

--
assignee: georg.brandl
components: Documentation
files: tutorial.patch
keywords: patch
messages: 77843
nosy: georg.brandl, sgala
severity: normal
status: open
title: Patch with a couple of 2.0isms in tutorial
versions: Python 3.0
Added file: http://bugs.python.org/file12359/tutorial.patch

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



[issue4668] examples in the functional howto are not consistent with 3.X behavior

2008-12-14 Thread Santiago Gala

New submission from Santiago Gala sg...@apache.org:

map and filter don't return lists anymore, so wrapping them in list() in
the examples will make the real output consistent with what is seen in
the doc.

--
assignee: georg.brandl
components: Documentation
files: 0001-Make-examples-consistent-with-3.0.patch
keywords: patch
messages: 77844
nosy: georg.brandl, sgala
severity: normal
status: open
title: examples in the functional howto are not consistent with 3.X behavior
versions: Python 3.0
Added file: 
http://bugs.python.org/file12360/0001-Make-examples-consistent-with-3.0.patch

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



[issue4657] Doctest gets line numbers wrongs with in name

2008-12-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy: +belopolsky

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



[issue3761] urllib.request and urllib.response cannot handle HTTP1.1 chunked encoding

2008-12-14 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

I'm sorry that I didn't notice this bug report in September!  The
chunked support does exist in the http package, but it doesn't work with
urllib.  Tracking in 4631.

--
nosy: +jhylton
resolution:  - duplicate
status: open - closed
superseder:  - urlopen returns extra, spurious bytes

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



[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

Brief update:  The Python 2.x code works because readline() is provided
by socket._fileobject.  The Python 3.x code fails because it grabs the
HTTPResponse.fp instance variable at the end of
AbstractHTTPHandler.do_open.  That method needs to pass the response to
addinfourl(), but needs to have support for readline / readlines before
it can do that.

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