[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides

Nir Aides  added the comment:

Uploaded patch for Python 3.2.

--
Added file: http://bugs.python.org/file15620/gzip_7471_py32.diff

___
Python tracker 

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



[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides

Nir Aides  added the comment:

uploaded updated patch for Python 2.7.

--
Added file: http://bugs.python.org/file15619/gzip_7471_py27.diff

___
Python tracker 

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



[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides

Changes by Nir Aides :


Removed file: http://bugs.python.org/file15589/gzip_7471_py27.diff

___
Python tracker 

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



[issue7291] urllib2 cannot handle https with proxy requiring auth

2009-12-19 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed through reversions r76908, r76909, r76910, r76911

Thanks for the patch, Tatsuhiro Tsujikawa.

--
status: open -> closed

___
Python tracker 

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



[issue7291] urllib2 cannot handle https with proxy requiring auth

2009-12-19 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed and Committed revision 76908 in the trunk.

--
keywords:  -needs review
resolution: accepted -> fixed

___
Python tracker 

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



[issue7544] multiprocessing.Pool(): Fatal Python error: PyEval_AcquireThread: NULL new thread state

2009-12-19 Thread STINNER Victor

STINNER Victor  added the comment:

Use a core dump: good idea!

haypo> Using my fuzzer (Fusil) on Python trunk, I got sometimes 
haypo> errors on multiprocessing.Pool():
haypo> 
haypo>Fatal Python error: PyEval_AcquireThread: NULL new thread state

I read the source code of the thread module. This error means that 
PyThreadState_New() returns NULL which occurs if malloc() failed. I hit this 
error using my fuzzer because the fuzzer limits the total memory to something 
around 100 MB using setrlimit().

Said differently: in low memory condition, creating a new thread may exit the 
whole Python process if a memory allocation fail.

--

Sometimes, I get another error, similar to the "NULL new thread state" error:

   Fatal Python error: Couldn't create autoTLSkey mapping

I guess that the reason is the same: memory allocation failed. It should be 
the malloc() in find_key() (Python/thread.c).

--

___
Python tracker 

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



[issue7495] doc: patch for Doc/faq/programming.rst

2009-12-19 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: 
http://bugs.python.org/file15618/doc_faq_programming_py3k_updated.diff

___
Python tracker 

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



[issue7495] doc: patch for Doc/faq/programming.rst

2009-12-19 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15615/doc_faq_programming_fix_py3k.diff

___
Python tracker 

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



[issue7495] doc: patch for Doc/faq/programming.rst

2009-12-19 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch backported to trunk.
It fixes typos and recommend best practices 'somestring'.format(...),
and '0o777' and '22 // 3'...

--
Added file: http://bugs.python.org/file15617/doc_faq_programming.diff

___
Python tracker 

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-12-19 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

This attached patch addresses the issue Eric mentioned - I don't know
how I missed this before. I will attempt to run the tests on XP again
with this change, but have not yet done so.

--
Added file: http://bugs.python.org/file15616/windows symlink draft 17.patch

___
Python tracker 

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



[issue7549] 2.6.4 Win32 linked to debug DLLs?

2009-12-19 Thread John Wells

New submission from John Wells :

I installed 2.6.4 x86 on Win7 x64. My Python app runs fine, but I get
daily errors in the event app log:

SOURCE: SideBySide
EVENT ID: 33
MESSAGE: Activation context generation failed for
"C:\WinUtils\Python26\Lib\distutils\command\wininst-8_d.exe". Dependent
Assembly
Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50608.0"
could not be found. Please use sxstrace.exe for detailed diagnosis. 

I'm not a developer, but Google suggests to me that the reference to
"Microsoft.VC80.DebugCRT" indicates that some part of Python 2.6.4 was
linked to the debug version of the VC++ 2005 DLLs. Apparently this
shouldn't have been done, since the debug DLLs can't be redistributed.

Or is there some other fix for this?

--
components: Windows
messages: 96655
nosy: jw113
severity: normal
status: open
title: 2.6.4 Win32 linked to debug DLLs?
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue7388] Documentation: capitalizations of the word 'python' needed when used as a name

2009-12-19 Thread Ezio Melotti

Ezio Melotti  added the comment:

Done in r76904 (trunk), r76905 (release26-maint), r76906 (py3k), r76907
(release31-maint), thanks for the report (there were a few more, I fixed
those too).

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7528] Provide PyLong_AsLongAndOverflow compatibility to Python 2.x

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for the patches!

I'll look at the 2.7 PyLong_AsLongAndOverflow patch, and (assuming it 
looks good) apply it.

For the py3intcompat.c, it would be good to have some sort of consensus 
about this;  perhaps it should be discussed on python-dev.  One problem is 
deciding where to put the files---if there might eventually be many such 
files, there should be a reasonable plan.  Those files might also need to 
be divided into helper files for 3-to-2 translation and for 2-to-3 
translation.

--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE

2009-12-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +loewis
priority:  -> normal
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue7495] doc: patch for Doc/faq/programming.rst

2009-12-19 Thread Florent Xicluna

Changes by Florent Xicluna :


--
title: doc: patch for py3k/Doc/faq/programming.rst -> doc: patch for 
Doc/faq/programming.rst

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Yes, I think when you debug CPython the biggest hurdle is not to lookup
the signification of opcodes :-)
Thanks, closing.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I saw two small things:
> - dict.has_key is still used instead of `in`

Florent pointed to me that it's not true. I was watching a stale
version, sorry.

--

___
Python tracker 

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



[issue7471] GZipFile.readline too slow

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> isatty() and __iter__() of io.BufferedIOBase raise on closed file and 
> __enter__() raises ValueError with different (generic) message. 
> 
> Should we keep the original GzipFile methods or prefer the implementation 
> of io.BufferedIOBase?

It's fine to use the BufferedIOBase implementation. There's no reason to
call isatty() on or iterate over a closed file.

--

___
Python tracker 

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



[issue7495] doc: patch for py3k/Doc/faq/programming.rst

2009-12-19 Thread Florent Xicluna

Florent Xicluna  added the comment:

There's a syntax error in the string formatting example.

See additional patch.

I will consider backporting some parts of the patch to Py2.

--
status: closed -> open
versions: +Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15615/doc_faq_programming_fix_py3k.diff

___
Python tracker 

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I saw two small things:
- dict.has_key is still used instead of `in`
- Pyrex is mentioned, but not Cython (http://www.cython.org/); Cython is
probably much more active than Pyrex, though.

--
nosy: +pitrou

___
Python tracker 

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



[issue7545] IO buffering behaviour not properly documented

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you, fixed in a lot of revisions.

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

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Okay;  I had to rework Marcos' patch a bit to get all the tests to pass.  
Here's the result.

I propose making these changes only in 2.7 and 3.2, not in 2.6 or 3.1;  
it's just possible that there's code out there that relies on some of 
the current behaviour;  I don't want to risk breaking that code in a 
bugfix release.  Does this seem reasonable?

It's possible I should be putting the tests in test_pow rather than 
test_float.

--
versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.1
Added file: http://bugs.python.org/file15614/float_pow.patch

___
Python tracker 

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-19 Thread Florent Xicluna

Florent Xicluna  added the comment:

Commit r76886 on Python 2.7 is fine.

But the patch is not merged completly on branches/py3k.

I prepared a new patch against py3k to fix what is missing.

--
status: closed -> open
Added file: http://bugs.python.org/file15613/doc_faq_design_py3k_missing.diff

___
Python tracker 

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



[issue7545] IO buffering behaviour not properly documented

2009-12-19 Thread Pascal Chambon

Pascal Chambon  added the comment:

Yep, I knew "full buffering" didn't mean "fill my RAM until crash" :p 
The only visible problem was the interpretation of positive/negative
buffering value, which wasn't the same in doc and in code. But the patch
seems to fix up the plot prettily well B-)
Thanks

--

___
Python tracker 

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



[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides

Nir Aides  added the comment:

isatty() and __iter__() of io.BufferedIOBase raise on closed file and 
__enter__() raises ValueError with different (generic) message. 

Should we keep the original GzipFile methods or prefer the implementation 
of io.BufferedIOBase?

--

___
Python tracker 

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



[issue7548] If a generator raises TypeError when being unpacked, an unrelated error message is shown

2009-12-19 Thread Mark Florisson

New submission from Mark Florisson :

>>> list(*('boo' for x in [1]))
['b', 'o', 'o']
>>> list(*(range('error') for x in [1])) # notice the erroneous error 
message
Traceback (most recent call last):
  File "", line 1, in 
TypeError: type object argument after * must be a sequence, not 
generator
>>> list(*[range('error') for x in [1]])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: range() integer end argument expected, got str.
>>> list(*(int('error') for x in [1])) # does work correctly for 
ValueError
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
ValueError: invalid literal for int() with base 10: 'error'

--
components: Interpreter Core
messages: 96642
nosy: eggy
severity: normal
status: open
title: If a generator raises TypeError when being unpacked, an unrelated error 
message is shown
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 
3.1, Python 3.2

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-12-19 Thread Stefan Krah

Stefan Krah  added the comment:

With the latest Python3.1 svn version of msvc9compiler.py, I get a
"can't use a string pattern on a bytes-like object" error. The
attached diff fixes the error.

--
nosy: +skrah
versions: +Python 3.1 -Python 2.6, Python 2.7, Python 3.0
Added file: http://bugs.python.org/file15612/3.1-byte-string.diff

___
Python tracker 

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



[issue7545] IO buffering behaviour not properly documented

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a possible patch for the Doc. I suppose the docstrings need
updating too?

--
keywords: +patch
Added file: http://bugs.python.org/file15611/io-open-doc.patch

___
Python tracker 

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



[issue7525] Yield example doesn't work as is explained in the documentation

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

This only happens in Python 2.5, where GeneratorExit inherits from
Exception.  In 2.6, it inherits from BaseException and is therefore not
caught by the except clause.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue7485] Error in FAQ entry '4.25 Why doesn't Python have a "with" statement for attribute assignments?'

2009-12-19 Thread Eric Smith

Eric Smith  added the comment:

It's in the last sentence of this section:

http://www.python.org/doc/faq/general/#why-doesn-t-python-have-a-with-statement-for-attribute-assignments

--

___
Python tracker 

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



[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, applied in r76895.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue7508] Update 'file object' doc

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've removed it in r76893. Thanks!

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

___
Python tracker 

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



[issue7480] trite documentation issue.

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Agreed, removed in r76892.

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

___
Python tracker 

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



[issue7485] Error in FAQ entry '4.25 Why doesn't Python have a "with" statement for attribute assignments?'

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Where can I find this?

--

___
Python tracker 

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



[issue7479] os.lchmod is not present

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Added such a note in r76891.

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

___
Python tracker 

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



[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-19 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee: georg.brandl -> 

___
Python tracker 

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



[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

I also seem to recall that adding .transform()/.untransform() was
already accepted at some point.

--

___
Python tracker 

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



[issue7119] email: msg.items() returns different values before and after msg.as_string()

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Patch looks good. (I'm a bit unsure about the syntax "ie: blah" and "eg:
blah" though.)

--

___
Python tracker 

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



[issue7545] IO buffering behaviour not properly documented

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> But now the question remains what the default is -- "full buffering" is
> only meaningful with a specified buffer size.  The implementation seems
> to default to line buffering.

"full" buffering actually uses a default or custom buffer size when you
don't specify it. 4096 or 8192 usually (yes there's a heuristic :-)).

"full" buffering is the default for binary streams, as well as for text
streams which aren't a tty. text streams which are tty default to line
buffering.

(I admit full buffering is a confusing name; what could we use instead?
fixed-size buffering? chunk buffering?)

--

___
Python tracker 

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



[issue1644818] Allow importing built-in submodules

2009-12-19 Thread Skip Montanaro

Changes by Skip Montanaro :


--
nosy: +skip.montanaro

___
Python tracker 

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



[issue7508] Update 'file object' doc

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Note: one issue is that io.rst is currently some kind of technical
reference about base classes and stuff, it is unreadable for anyone
looking for simple information.

--

___
Python tracker 

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



[issue7500] doc: add warnings for FAQ which may not be accurate

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Applied (minus the warning) in r76890.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue7499] doc: patch for py3k/Doc/faq/library.rst

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Applied with a few edits in r76889.  Note that the notation for number
ranges with "mismatching" brackets is actually correct.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue7508] Update 'file object' doc

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Okay, I've found it. IMO this section should simply be removed, since
the `file` type doesn't exist anymore.

--

___
Python tracker 

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



[issue7495] doc: patch for py3k/Doc/faq/programming.rst

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Committed in r76888. Thanks!

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue7508] Update 'file object' doc

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

In which part/filename of the doc can I find this extract?

--

___
Python tracker 

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, committed in r76886, r76887.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-19 Thread Dave Malcolm

Dave Malcolm  added the comment:

> Are you doing anything specific which requires this change?
No.  I was looking for ways of making CPython easier to debug, and I 
experimented with 
this.  It didn't help with debuggability as much as I hoped.

Given that CPython's performance is known to be sensitive to changes in the 
opcode dispatch 
code, I'd be happy to drop this RFE; I haven't done actual performance 
measurements on it 
yet (if it shows no measurable impact, would it be acceptable?)

I wanted to at least capture the script and patch in the issue tracker for 
reference 
(perhaps of interest to unladen-swallow?)

Thanks; feel free to close it.

--

___
Python tracker 

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



[issue7529] StreamHandler does not live in logging.Handlers

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Hmm, I cannot reproduce the problem here (with a checkout before your
commit); as you say the module should be set by the module directive.  I
guess it's a Sphinx bug; I will investigate that.  Closing this issue,
since it's not in Python.

--
status: pending -> closed

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

There were two incorrect tests in float_pow_testcases.patch:

+self.assertEqualAndEqualSign(pow_op(-INF, -0.5), -0.0)
+self.assertEqualAndEqualSign(pow_op(-INF, -2.0), -0.0)

these should both have had 0.0 in place of -0.0.  Here are corrected and 
slightly expanded tests;  I've also fixed an incorrect doctest (0**nan 
should be nan, not 0) in Lib/test/ieee754.txt.

--
Added file: http://bugs.python.org/file15610/float_pow_testcases2.patch

___
Python tracker 

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



[issue7521] PyEval_GetRestricted should be removed from C API reference

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r76883, r76884, r76885.

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

___
Python tracker 

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



[issue7527] Standard Library documentation fails to mention that string.Formatter, etc. are new in Python 2.6

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

I changed the prose into a versionadded tag in r76882.

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

___
Python tracker 

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



[issue7508] Update 'file object' doc

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

Maybe Antoine wants (!) to look at it.

--
assignee: georg.brandl -> pitrou
nosy: +pitrou

___
Python tracker 

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



[issue7545] IO buffering behaviour not properly documented

2009-12-19 Thread Georg Brandl

Georg Brandl  added the comment:

The docs have a different wording, which I suggest copying to the docstring:

   *buffering* is an optional integer used to set the buffering policy.  By
   default full buffering is on.  Pass 0 to switch buffering off (only
allowed
   in binary mode), 1 to set line buffering, and an integer > 1 to
indicate the
   size of the buffer.

But now the question remains what the default is -- "full buffering" is
only meaningful with a specified buffer size.  The implementation seems
to default to line buffering.

--
assignee: georg.brandl -> pitrou

___
Python tracker 

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



[issue7546] msvc9compiler.py: add .asm extension

2009-12-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> tarek
components: +Distutils
nosy: +tarek
priority:  -> normal
stage:  -> patch review
versions: +Python 2.7 -Python 3.1

___
Python tracker 

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



[issue7547] test_timeout should skip, not fail, when the remote host is not available

2009-12-19 Thread Antoine Pitrou

New submission from Antoine Pitrou :

test_timeout uses www.python.org as a Guinea pig for its socket tests.
Unfortunately sometimes www.python.org is down, which gives the
following kind of failures (seen on a buildbot recently):

test test_timeout failed -- Traceback (most recent call last):
  File "C:\buildslave\3.x.moore-windows\build\lib\test\test_timeout.py",
line 133, in testRecvTimeout
self.sock.connect(self.addr_remote)
socket.error: [Errno 10060] A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond

test_timeout should catch the error and simply skip the test with an
appropriate message.

There's a similar problem with test_smtpnet which uses gmail as its
remote SMTP-SSL provider.

--
components: Tests
messages: 96615
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: test_timeout should skip, not fail, when the remote host is not available
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue7546] msvc9compiler.py: add .asm extension

2009-12-19 Thread Stefan Krah

New submission from Stefan Krah :

Hi,

would it be possible to add .asm to the extensions? I attach a diff that
I have tested with VS Express.

--
files: vcasm.diff
keywords: patch
messages: 96614
nosy: skrah
severity: normal
status: open
title: msvc9compiler.py: add .asm extension
type: feature request
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15609/vcasm.diff

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2009-12-19 Thread Stefan Krah

Stefan Krah  added the comment:

'ValueError' should be 'DistutilsPlatformError' in the diff.

--

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The assembler diff shows that at one point the compiler produced
slightly less good code after the change. I don't know what the impact
is in terms of performance but it shows we should be cautious with this
change.

Are you doing anything specific which requires this change?

--
nosy: +pitrou

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2009-12-19 Thread Stefan Krah

Stefan Krah  added the comment:

Ok, I created a new diff that considers all 64-bit values for 'arch'.
I think x64 cannot occur (See: PLAT_TO_VCVARS). Also, I use the
existence of bin\amd64\vcvarsamd64.bat as a test for VS Professional,
so in that case the new code is never executed.

Could someone confirm that VS Professional always has that file?

--
Added file: http://bugs.python.org/file15608/vcvars2.diff

___
Python tracker 

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



[issue7544] multiprocessing.Pool(): Fatal Python error: PyEval_AcquireThread: NULL new thread state

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Enable core dumps (`ulimit -c unlimited`) and re-run your tests. The
fatal Python error will leave a core file so that you can find out the
context.

You can also try a debug build of Python which may give you more
information, assuming it can reproduce the bug.

(as for how to reproduce the bug, it's your task to find it out :-))

--
nosy: +jnoller, pitrou
stage:  -> test needed

___
Python tracker 

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



[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2009-12-19 Thread R. David Murray

R. David Murray  added the comment:

I lean toward the second way, myself.

--

___
Python tracker 

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



[issue7545] IO buffering behaviour not properly documented

2009-12-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

"Full buffering" means exactly what you discovered it means - enable a
buffer of a given number of bytes (3, 4096 or anything else). I'm not
sure what you thought it meant? That the file was buffered in its
entirety, regardless of its size?

--
nosy: +pitrou

___
Python tracker 

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



[issue7545] IO buffering behaviour not properly documented

2009-12-19 Thread Pascal Chambon

New submission from Pascal Chambon :

Hello,
It seems there is an important difference between the doc of the IO
module, and its implementation so far (until todcay trunk revision 76805)

"buffering is an optional integer used to set the buffering policy. By
default full buffering is on. Pass 0 to switch buffering off (only
allowed in binary mode), 1 to set line buffering, and an integer > 1 for
full buffering."
--> actually full buffering only occurs if a negative buffering
parameter is given, else it seems th current value i kept as the buffer
size - eg. if we give "3", buffering will be 3 bytes...
This seems a fine behaviour to me, so this implementation could just be
documented as is.

---
Only case of full buffering in the C iomodule :
if (buffering < 0) {
buffering = DEFAULT_BUFFER_SIZE;
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
{
struct stat st;
long fileno;
PyObject *res = PyObject_CallMethod(raw, "fileno", NULL);
if (res == NULL)
goto error;

fileno = PyInt_AsLong(res);
Py_DECREF(res);
if (fileno == -1 && PyErr_Occurred())
goto error;

if (fstat(fileno, &st) >= 0)
buffering = st.st_blksize;
}
#endif
}

--
assignee: georg.brandl
components: Documentation, IO
messages: 96607
nosy: georg.brandl, pakal
severity: normal
status: open
title: IO buffering behaviour not properly documented
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a set of testcases (patch against trunk) for float pow, based on 
Annex F of the C99 specification.

--
keywords: +patch
Added file: http://bugs.python.org/file15607/float_pow_testcases.patch

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for this;  I'll take a look.

Looks like we need some tests for this, too.

--

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-19 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue7482] Improve ZeroDivisionError message for float and complex object

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

No, I don't think you should add tests for the error messages;  there 
should already be tests for the type of error, and that's enough.

--

___
Python tracker 

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



[issue7482] Improve ZeroDivisionError message for float and complex object

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

So if we're going to change the error messages, it would be nice if the 
new error messages were grammatical English.  'complex division by zero' 
is fine, but e.g.  'float modulo by zero' doesn't really make sense.

Actually I'd be fine with 'float division by zero' for this, since there's 
an implicit division involved in computing a remainder.  Or perhaps 
something more verbose, like 'right-hand argument to modulo operation is 
zero'.

--

___
Python tracker 

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



[issue7544] multiprocessing.Pool(): Fatal Python error: PyEval_AcquireThread: NULL new thread state

2009-12-19 Thread STINNER Victor

New submission from STINNER Victor :

Using my fuzzer (Fusil) on Python trunk, I got sometimes errors on
multiprocessing.Pool():

   Fatal Python error: PyEval_AcquireThread: NULL new thread state

I'm sorry but I don't have example script to reproduce the bug. I
suppose that the error depends on the system load. I have the error on
an Intel Core2 Quad Core Q9300 (CPU able to run 4 processes/threads at
the time same).

How can I get more information on the bug? How can I reproduce it?

--
components: Extension Modules
messages: 96602
nosy: haypo
severity: normal
status: open
title: multiprocessing.Pool(): Fatal Python error: PyEval_AcquireThread: NULL 
new thread state
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue7532] Extended slicing with classic class behaves strangely

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Interesting solution!  While the patch itself looks fine to me, I'm not 
sure I like this solution much.  It's fine to use this trick for list or 
tuple, but implementing it for all old-style classes at once seems a bit 
dangerous.

With this patch, it seems to me that the rule describing exactly what 
__getitem__ receives (for an old-style class implementing __getitem__ but 
not __getslice__) becomes rather complicated, and can no longer be deduced 
from the documentation.

I'd say leave the current behaviour as it is, and remind people that they 
should be using new-style classes wherever possible.

--

___
Python tracker 

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



[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Oops.  That's r76878 (trunk) and r76879 (py3k).

--

___
Python tracker 

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



[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-12-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Added erf and erfc in r76879 (trunk), r76880 (py3k).

--

___
Python tracker 

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



[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2009-12-19 Thread lekma

lekma  added the comment:

> It would be better to use test skipping: (eg: @unittest.SkipUnless
> before the test class).

I didn't know about this feature, thanks for the tip.

Now I wonder if it would be better to do it this way:
@unittest.SkipUnless(hasattr(socket, "SOCK_CLOEXEC") and fcntl,
"SOCK_CLOEXEC not defined OR module fcntl not available")

or this way:
@unittest.SkipUnless(hasattr(socket, "SOCK_CLOEXEC"), "SOCK_CLOEXEC not
defined")
@unittest.SkipUnless(fcntl, "module fcntl not available")

the second option seems better to me (obvious reason why the test was
skipped), what do you guys think? (it doesn't really matter, I know, but
while we're here...)

--

___
Python tracker 

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



[issue7504] Same name cookies

2009-12-19 Thread Andrey Chichak

Andrey Chichak  added the comment:

This is fix for rare problem. If I set 2 cookies:
sid=pub.GHoBitAWLt, path="/"
sid=cab.S97jUfeihM, path="/cab"
All browsers in Cookie header send for any URL '/cab*':
sid=cab.S97jUfeihM; sid=pub.GHoBitAWLt
Current implementation always returns Cookie['sid']=pub.GHoBitAWLt - wrong!
My patch resolve this problem and Cookie['sid'] returns first (nearest/deepest 
in path) cookie value, 
and also collects all same name cookies in dict Cookie._multi .

Name (_multi) may be wrong, and may be any other :o) .

Also I can update documentation, but my English is not so good ...

--

___
Python tracker 

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



[issue7504] Same name cookies

2009-12-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

For this kind of report you should provide more information. Is this an 
enhancement to the Cookie object? Why is it needed?
Do you really propose that users directly use the _multi attribute 
directly (the leading _ suggest an internal attribute)?
Also, some documentation update is necessary (in Doc/library/cookie.rst)

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue7504] Same name cookies

2009-12-19 Thread Andrey Chichak

Andrey Chichak  added the comment:

Remake for patch due the requirements of 
http://www.python.org/dev/patches/

--
Added file: http://bugs.python.org/file15606/Cookie_multi.diff

___
Python tracker 

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