[issue6767] Python as zip package

2009-08-24 Thread Joe

Joe us3...@web.de added the comment:

Because, I don't need/want an installation. I only need the files whith
its directory structure.

--

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



[issue6771] documentation/implementation error

2009-08-24 Thread steve21

New submission from steve21 steve872929...@yahoo.com.au:

The documentation and implementation disagree.

Documentation:
Module curses.wrapper
Convenience function to ensure proper terminal setup and resetting
on application entry and exit.
...

15.10. curses.wrapper — Terminal handler for curses programs

This module supplies one function, wrapper() ...

curses.wrapper.wrapper(func, ...)
Wrapper function that initializes curses ..


Implementation:
$ python3.1
Python 3.1.1 (r311:74480, Aug 24 2009, 14:50:57)
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type help, copyright, credits or license for more information.
 import curses.wrapper as cw
 cw.wrapper
Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: 'function' object has no attribute 'wrapper'


The 'curses.wrapper.wrapper' function no longer exists.
The 'curses.wrapper' module no longer exists, the module is now a function.

The problem is the line
  from curses.wrapper import wrapper
in curses/__init__.py - curses has clobbered its own namespace and made
the curses.wrapper module inaccessible.

Instead of this tortuous sequence of module hiding and namespace
clobbering it would be simpler to just place the curses.wrapper.wrapper
function in curses/__init__.py and do away with the need for the
curses.wrapper single-function-module.
And update the docs so:
  references to the curses.wrapper module are removed
  the function curses.wrapper.wrapper(func, ...) becomes
   curses.wrapper.(func, ...)

--
components: Library (Lib)
messages: 91903
nosy: steve21
severity: normal
status: open
title: documentation/implementation error
versions: Python 3.1

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



[issue6772] Missing alias utf-8 in Standard Encodings list.

2009-08-24 Thread Mintaka

New submission from Mintaka mint...@post.cz:

On page 
http://docs.python.org/dev/3.0/library/codecs.html#standard-encodings
(and on the pages for older versions too)
in the table with review, is missing higly used alias utf-8

On that row is only:
Codec   Aliases Languages
utf_8   U8, UTF, utf8   all languages
And probably there should be:
utf_8   U8, UTF, utf8, utf-8all languages

--
assignee: georg.brandl
components: Documentation
messages: 91904
nosy: georg.brandl, mintaka
severity: normal
status: open
title: Missing alias  utf-8 in  Standard Encodings list.
versions: Python 3.0

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



[issue6772] Missing alias utf-8 in Standard Encodings list.

2009-08-24 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

From the quoted page:


Notice that spelling alternatives that only differ in case or use a
hyphen instead of an underscore are also valid aliases.


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

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



[issue6772] Missing alias utf-8 in Standard Encodings list.

2009-08-24 Thread Mintaka

Mintaka mint...@post.cz added the comment:

True, but this one is much more used then others. So frequently, that
look like other names are aliases. Maybe it is good reason to mention it
explicitly.

--

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



[issue6005] Bug in socket example

2009-08-24 Thread Nicolas Dumazet

Nicolas Dumazet nicd...@gmail.com added the comment:

I'm including a patch which replaces send by sendall in the examples in
both socket and socketserver.

--
keywords: +patch
nosy: +nicdumz
Added file: http://bugs.python.org/file14776/socket.patch

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



[issue6767] Python as zip package

2009-08-24 Thread Martin v . Löwis

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

Ah, for that, run msiexec /a pythonXY.msi TARGETDIR=K:\. This just
unpacks the MSI file, without installing anything. See

http://www.python.org/download/releases/2.4/msi/

--

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



[issue1117601] os.path.exists returns false negatives in MAC environments.

2009-08-24 Thread Colin Alston

Colin Alston colin.als...@gmail.com added the comment:

I also hit upon this issue and IMHO returning False in a permission
denied scenario is less than obvious behaviour. 

It also means I have no way to catch this edge case in my own code
immediately, I have to implement far larger logic to check now if False
means the file doesn't exist, or if the user doesn't have access to the
file. 

os.path.exists should absolutely raise a Permission exception.

--
nosy: +cda32

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



[issue6773] subprocess issue on Win 7 x64

2009-08-24 Thread Piotr Foltyn

New submission from Piotr Foltyn piotr.fol...@displaylink.com:

The sample code presented below produces error (screenshot available in 
attachment) on Windows 7 RC x64 with latest version of Python 2.6 
installed. Both 32bit and 64bit versions of Python 2.6 are affected by 
this issue. Python 3 executes this code flawlessly.
The problem seems to be related to stdout redirection. If the stdout = 
PIPE is omitted in the first statement of main() function, code 
executes properly but we don't have access to the processes output. If 
the line Popen([dir], stdout = PIPE, shell = True) is changed to 
sin, sout = os.popen2([dir]) and os module is imported everything 
works fine. It doesn't matter what command is executed (dir, bcedit, 
mspaint etc)


import sys
from subprocess import Popen, PIPE
from multiprocessing import Process

def myProcess():
Popen([dir], shell = True) # ERROR :(

def main():
Popen([dir], stdout = PIPE, shell = True)
Process(target = myProcess).start()
return 0

if __name__ == __main__:
sys.exit(main())

--
components: Library (Lib), Windows
files: Win7RCx64.jpg
messages: 91910
nosy: tesla
severity: normal
status: open
title: subprocess issue on Win 7 x64
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file14777/Win7RCx64.jpg

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



[issue6769] in xmlrpclib.py: NameError: global name 'HTTPSConnection' is not defined

2009-08-24 Thread Martin v . Löwis

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

Kristjan, can you take a look?

--
assignee:  - krisvale
nosy: +loewis

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



[issue6774] socket.shudown documentation: on some platforms, closing one half closes the other half

2009-08-24 Thread Nicolas Dumazet

New submission from Nicolas Dumazet nicd...@gmail.com:

I had a bad time understanding what happens in Mac OS X after a shutdown
call: after calling shutdown(SH_WR) on side A, a corresponding
shutdown(SH_RD) on side B would raise a socket.error: socket is not
connected.
It is quite surprising when you are used to sockets in Linux, which
expect you to shut one end, and then the other one.

It turns out that under Mac OS X, a shutdown call closes the connection
on the other half. And the only mention I could find of this behavior
was here, r68611 :
http://svn.python.org/view/python/trunk/Lib/test/test_socket.py?r1=64125r2=68611pathrev=68611

I think that the documentation should specify that (surprising)
behavior: I attached a patch explaining that detail.


Thanks!

--
assignee: georg.brandl
components: Documentation
files: socketshutdown.patch
keywords: patch
messages: 91912
nosy: georg.brandl, nicdumz
severity: normal
status: open
title: socket.shudown documentation: on some platforms, closing one half closes 
the other half
type: behavior
Added file: http://bugs.python.org/file14778/socketshutdown.patch

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



[issue6775] readme: correct python.org/community/lists url

2009-08-24 Thread Nicolas Dumazet

New submission from Nicolas Dumazet nicd...@gmail.com:

README shows http://www.python.org/community/lists.html as an URL for
mailing list details, but it should be
http://www.python.org/community/lists/

Attaching a patch.

--
assignee: georg.brandl
components: Documentation
files: readme-url-mls.patch
keywords: patch
messages: 91913
nosy: georg.brandl, nicdumz
severity: normal
status: open
title: readme: correct python.org/community/lists url
Added file: http://bugs.python.org/file14779/readme-url-mls.patch

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



[issue4879] Allow buffering for HTTPResponse

2009-08-24 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Gregory, please revert your change (74463).
There is no extra data after the response, since such data can only 
be generated as a result of a new request.

Your change has disabled the HTTP/1.1 keepalive capability, causing 
test failurres in xmlrpc.  Also showing perhaps that we need test cases 
for keepalive in regular httplib.py testsuite.

If you think there are problems, you a new defect should be created.

--

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



[issue6769] in xmlrpclib.py: NameError: global name 'HTTPSConnection' is not defined

2009-08-24 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Thanks, that's a silly bug.  fixed in revision 74543.
Perhaps we need a https regression test in the test suite.

--

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



[issue6499] Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer when zlib is not available

2009-08-24 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Any news on this?

--

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-24 Thread Vlastimil Brom

Vlastimil Brom vlastimil.b...@gmail.com added the comment:

I'd like to add some detail to the previous msg91473

The current behaviour of the character properties looks a bit 
surprising sometimes:

 
 regex.findall(ur\p{UppercaseLetter}, uQW\p{UppercaseLetter}as)
[u'Q', u'W', u'U', u'L']
 regex.findall(ur\p{Uppercase Letter}, uQW\p{Uppercase Letter}as)
[u'\\p{Uppercase Letter}']
 regex.findall(ur\p{UppercaseÄÄÄLetter}, uQW\p
{UppercaseÄÄÄLetter}as)
[u'\\p{Uppercase\xc4\xc4\xc4Letter}']
 regex.findall(ur\p{UppercaseQQQLetter}, uQW\p
{UppercaseQQQLetter}as)

Traceback (most recent call last):
  File pyshell#34, line 1, in module
regex.findall(ur\p{UppercaseQQQLetter}, uQW\p
{UppercaseQQQLetter}as)
...
  File C:\Python26\lib\regex.py, line 1178, in _parse_property
raise error(undefined property name '%s' % name)
error: undefined property name 'UppercaseQQQLetter'
 

i.e. potential property names consisting only from the ascii-letters  
(+ _, -) are looked up and either used or an error is raised,
other names (containing whitespace or non-ascii letters) aren't treated 
as a special expression, hence, they either match their literal value 
or simply don't match (without errors).

Is this the intended behaviour? 
I am not sure whether it is maybe defined somewhere, or there are some 
de-facto standards for this...
I guess, the space in the property names might be allowed (unless there 
are some implications for the parser...), otherwise the fallback 
handling of invalid property names as normal strings is probably the 
expected way.
vbr

--

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



[issue6765] math.log, log10 inconsistency

2009-08-24 Thread Mark Dickinson

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

 If Python functions are inconsistent then I think they should either 
be
 made consistent, or if that's not possible they should be clearly
 documented as being inconsistent.

I think 'inconsistent' is a bit strong for what happens here.  In my 
view, the expressions log10(x) and log(x, 10) behave consistently:  they 
both give (good) floating-point approximations to the base-10 logarithm 
of x.  However, since they use slightly different methods to get those 
approximations, the approximations are not identical.

Would you also say that atan2(y, x) is inconsistent with atan(y/x)  (for 
positive x, y, say), because they give minutely different results in 
some cases?

 The docs for log10(x) could be improved to say:
 this function gives the correct result for powers of 10,
 but breaks consistency with log(a,10) == log10(a)

I find this unnecessarily negative.  I propose instead to leave the log 
documentation as it is, and add something like the following to the 
log10 documentation, as an explanation of why log10 is still valuable in 
the presence of the two-argument log function:

Since this function directly wraps the platform log10 function, 
``log10(x)`` will usually (depending on the platform) be faster and more 
accurate than the mathematically equivalent ``log(x, 10)``.

Note that historically, the two-argument version of math.log appeared 
long after math.log10 did;  this might help explain the apparent 
redundancy.  (I'd actually argue that the two-argument log should not 
have been added in the first place:  it doesn't wrap a standard C math 
function, and it's really no different from log(x)/log(y), except that 
having it as a built-in library function gives the illusion that it 
might be more accurate than it actually is.  However, that's academic 
now.)

One possible 'fix' for this situation does occur to me:  instead of 
computing log(x, y) internally as log(x)/log(y), compute it as 
log10(x)/log10(y).  This at least doesn't involve extensive changes or 
additions to the code.  I don't think it really makes any practical 
difference, except perhaps in reducing the number of bug reports like 
this one.  And it won't help make log2(x) == log(x, 2) if/when the C99 
log2 function is added to the math library, either.  I'd be -0 on making 
this change.

--

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



[issue6765] math.log, log10 inconsistency

2009-08-24 Thread Tim Peters

Tim Peters tim.pet...@gmail.com added the comment:

I wasn't keen to add the 2-argument log() extension either.  However, I
bet it would help if the docs for that were changed to explain that
log(x, base) is just a convenient shorthand for computing
log(x)/log(base), and therefore may be a little less accurate than a
function that directly computed the logarithm wrt the given base.

--
nosy: +tim_one

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



[issue6761] Class calling

2009-08-24 Thread Stephen Fairchild

Stephen Fairchild signupaddr...@bethere.co.uk added the comment:

On further reading it seems my objections only apply to new style classes.

--

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



[issue6761] Class calling

2009-08-24 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

FYI, all special methods are (now) looked up on the type for new style
classes.  Your suggested rewrite makes things more confusing, IMO
(partly because to make it accurate it would need to be something like
type(x).__call__(x, *args, **kw), which doesn't really make the sentence
clearer).

So far I haven't thought of a rewording I like.  The best I've come up
with is x(arguments) invokes the __call__ method, passing it the
arguments.  This leaves it to other parts of the language spec to
explain how __call__ gets resolved.

Whatever we decide to do, section 3.4.4 will need a similar update.

--
nosy: +r.david.murray
priority:  - normal
stage:  - needs patch

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



[issue6761] Class calling

2009-08-24 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

For some reason the 3.2 docs don't contain the sentence you reference,
but they do have the same mistake in section 3.4.4.  Which is even more
of a mistake in 3.x, since there are only new style classes there.

--
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue6776] A few tests are failing when zlib is not supported

2009-08-24 Thread Nicolas Dumazet

New submission from Nicolas Dumazet nicd...@gmail.com:

test_distutils, test_zipfile, test_gzip and test_zimport are not
completely safe when zlib module is not available.

I've uploaded a patch on Rietveld which solves the issue here:
http://codereview.appspot.com/111041
Those are my first steps with Rietveld, please let me know if I can
improve something :)

Thanks,
Nicolas.

--
components: Tests
messages: 91923
nosy: nicdumz
severity: normal
status: open
title: A few tests are failing when zlib is not supported
type: behavior

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



[issue6776] A few tests are failing when zlib is not supported

2009-08-24 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

This is a duplicate of issue 6026, where patch activity has already
occurred.  Thanks for working on this, and please review that case and
see if all of the issues you found are addressed there.

--
nosy: +r.david.murray
priority:  - normal
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - test_(zipfile|zipimport|gzip|distutils|sqlite) fail if zlib is 
not available

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



[issue6775] readme: correct python.org/community/lists url

2009-08-24 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r74544.

--
resolution:  - fixed
status: open - closed

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



[issue6772] Missing alias utf-8 in Standard Encodings list.

2009-08-24 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I made a compromise in r74545: 'utf-8' is now used as an example to
demonstrate the statement Marc-Andre cited.

--

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



[issue6026] test_(zipfile|zipimport|gzip|distutils|sqlite) fail if zlib is not available

2009-08-24 Thread Nicolas Dumazet

Nicolas Dumazet nicd...@gmail.com added the comment:

Great, I don't know how I missed that bug.

It looks really similar to the patch I had written at
http://codereview.appspot.com/111041

So your patch looks correct to me, and does solve the issue locally.

--
nosy: +nicdumz

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



[issue6725] Inconsistency in Documentation: Name Spaces vs Namespaces

2009-08-24 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r74546.

--
resolution:  - fixed
status: open - closed

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



[issue6718] ValueError in 21.17.4.2. SocketServer.UDPServer Example

2009-08-24 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r74547.

--
resolution:  - fixed
status: open - closed

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



[issue6677] Place the term delete within the documentation for os.remove() and os.rmdir()

2009-08-24 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Fixed in r74548.

--
resolution:  - fixed
status: open - closed

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



[issue6677] Place the term delete within the documentation for os.remove() and os.rmdir()

2009-08-24 Thread Mike Cowperthwaite

Mike Cowperthwaite mi...@lathropengineering.com added the comment:

Thanks, but the bug requested a similar change for rmdir as well.

Is it not possible to backport the change to the 2.x branch?

--

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



[issue6776] A few tests are failing when zlib is not supported

2009-08-24 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue6677] Place the term delete within the documentation for os.remove() and os.rmdir()

2009-08-24 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

True. Fixed in r74550.

The changes will be ported to all maintained branches soon.

--

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



[issue6677] Place the term delete within the documentation for os.remove() and os.rmdir()

2009-08-24 Thread Mike Cowperthwaite

Mike Cowperthwaite mi...@lathropengineering.com added the comment:

Very good.  Thank you, Georg.

--

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



[issue6770] PDF download links of docs for 3.1.1 are broken

2009-08-24 Thread Radiant

Radiant newyorkdude...@yahoo.com added the comment:

The files in question are accessible at this time. I can only hope that
the issue doesn't recur.

--
status: open - closed

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



[issue6770] PDF download links of docs for 3.1.1 are broken

2009-08-24 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
resolution:  - out of date

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



[issue6721] Locks in python standard library should be sanitized on fork

2009-08-24 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

I've started a project to patch this and similar messes up for Python
2.4 and later here:

 http://code.google.com/p/python-atfork/

I'd like to take ideas or implementations from that when possible for
future use in the python standard library.

--

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



[issue6777] Python 2.6 tutorial still recommends using Exception.message attribute

2009-08-24 Thread Christoph Zwerschke

New submission from Christoph Zwerschke c...@online.de:

The Python 2.6.2 tutorial says at the end of secton 8.3
(http://docs.python.org/tutorial/errors.html#handling-exceptions):

But use of .args is discouraged. Instead, the preferred use is to pass 
a single argument to an exception (which can be a tuple if multiple 
arguments are needed) and have it bound to the message attribute.

It seems this is not true any more, the idea has been retracted so that 
it's now the other way around again: .args can still be used, 
but .message is deprecated (see http://www.python.org/dev/peps/pep-
0352/#retracted-ideas).

The examples classes in section 8.5 of the Tutorial, using the .message 
attribute should be also adapted because they raise a 
DeprecationWarning in Python 2.6.2.

--
assignee: georg.brandl
components: Documentation
messages: 91937
nosy: cito, georg.brandl
severity: normal
status: open
title: Python 2.6 tutorial still recommends using Exception.message attribute
versions: Python 2.6

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



[issue6749] Support for encrypted zipfiles when interpreting zipfile as script

2009-08-24 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

The people who do not know how to get over that wall would be equally
stumped if presented with tokenized .pyc or .pyo files.  No fake
encryption needed.

--

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



[issue4879] Allow buffering for HTTPResponse

2009-08-24 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Already reverted in

r74522 | gregory.p.smith | 2009-08-18 22:33:48 -0700 (Tue, 18 Aug 2009)

for that reason.

--

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



[issue6778] False positives given through bisect module (binary search)

2009-08-24 Thread kaashif

New submission from kaashif musharraf.az...@gmail.com:

I tried Python's bisect module on a large word list (words.txt contained
in http://www.greenteapress.com/thinkpython/swampy/swampy.1.1.zip)

If I search for something like 'musefully', 'museful' will come up as a
match. Maybe that's a feature... but seems to me like a bug.

Too much optimization going on here it seems, to such an extent that
false positives are given.

Here's the code I tried:

import bisect

fin = open('words.txt')
t = []

for line in fin:
t.append(line.strip())

print(bisect.bisect(t,'musefully'))

--
components: Extension Modules
files: words.txt
messages: 91940
nosy: kaashif
severity: normal
status: open
title: False positives given through bisect module (binary search)
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14780/words.txt

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



[issue6779] NotImplementedError on for statement

2009-08-24 Thread Samuel Quiring

New submission from Samuel Quiring sam.quir...@windriver.com:

I have the following for statement:

lenc = len(children)
for ic in range(lenc):
print ic: , ic
child = children[ic]
print   -, ic, child.__class__.__name__
print XXX
except:
try:
exctype, value = sys.exc_info()[:2]
print exception, exctype, value
traceback.print_exc()
print range(lenc)
except:
print exception X
print loop done

When I execute it, I get the following output:

  - count changed, old: -1 new: 4
ic:  0
  - 0 XGRect
XXX
ic:  1
  - 1 PanelEntry
XXX
ic:  2
  - 2 ScrollView
XXX
ic:  3
  - 3 CloseButton
XXX
exception type 'exceptions.NotImplementedError' method not implemented
Traceback (most recent call last):
  File /home/stpuser/prizm/lib/python2.6/libprizm/pui/atspi.py, line
187, in _get_n_children
for ic in range(lenc):
NotImplementedError: method not implemented
[0, 1, 2, 3]
loop done


Why am I getting the NotImplementedError exception?  This looks like a
bug to me (I am pretty new to Python).

--
components: None
messages: 91941
nosy: sbq
severity: normal
status: open
title: NotImplementedError on for statement
versions: Python 2.6

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



[issue6780] startswith error message is incomplete

2009-08-24 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar sridh...@activestate.com:

The `startswith` method accepts both string and tuple (not list). Yet 
the error message suggests that it expects (only) a character buffer 
object.

In Python-2.6:

 foo.startswith(['fo', 'df'])
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: expected a character buffer object

In Python-3.x, the error message is different:

 foo.startswith([fo])
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: Can't convert 'list' object to str implicitly

Aside: why not try to convert 'list' object to tuple?

--
components: Library (Lib)
messages: 91942
nosy: srid
severity: normal
status: open
title: startswith error message is incomplete
type: behavior
versions: Python 2.6, Python 3.1

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



[issue6730] dict.fromkeys() should not cross reference mutable value by default

2009-08-24 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I'll add a bit of explanation as well:

 I have to add this ugly loop :
 
 for key in keys:
d[key] = [] 
 
With a defaultdict, you don't -- you just use d[key], and if not already
present, the entry will be initialized with an empty list.

 I really think that :
 1) The doc should warn about it, since it is a very weird behaviour

It is not weird in Python.  Implicit copies are never made, partly
because it's very hard to implement it correctly for every object.

 2) There could at least be a third argument allowing the user to choose,
 with a default value that maintains the current behaviour (for
 compatibility, even though I think the default should be a deep copy)

The interface of a fundamental type like dict will not be changed
lightly. Usually, when a change is made, it is to add a feature that is
often requested by lots of users -- I've never seen someone request this
before.  And as we've seen, it can easily be written either using a
simple loop, or a defaultdict, depending on the exact use-case.

--
nosy: +georg.brandl

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



[issue6660] Desire python.org documentation link to user contribution wiki (per function)

2009-08-24 Thread kee nethery

kee nethery k...@kagi.com added the comment:

No problem. I can parse text in an automated manner very easily. So if  
you need someone to take the doc files and add in wiki URLs for each  
section, I can do that. Happy to volunteer. Worst case is you look at  
what I do and reject it. Best case ... I actually do what you need.
Thanks, Kee

On Aug 24, 2009, at 10:26 AM, Georg Brandl wrote:


 Georg Brandl ge...@python.org added the comment:

 At the moment, I still have to review and merge the SoC branch, so  
 don't
 expect visible changes to happen within a few weeks.

 --

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

-
I check email roughly 2 to 3 times per business day.
Kagi main office: +1 (510) 550-1336

--

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



[issue6778] False positives given through bisect module (binary search)

2009-08-24 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It's not a match, it's an insertion point.  The bisect module doesn't
have a method that can be used directly to determine if an item is not
in the list.  Take a careful look at the example, especially the second
part.

If you think it should have such a method, that would be an enhancement
request.

--
nosy: +r.david.murray, rhettinger
priority:  - normal
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue6779] NotImplementedError on for statement

2009-08-24 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

The bug tracker is not a place to get help debugging your code.  Your
code is not a complete example, and is doing odd things with try/except
and the printing of errors which may well be masking what is really
going on, so I can't begin to evaluate whether or not you've found a
real bug, but it seems unlikely.  Please post your question to
python-list (or perhaps even python-tutor), and if it turns out you do
have a real bug, reopen this ticket.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue5851] Add a stream parameter to gc.set_debug

2009-08-24 Thread Nicolas Dumazet

Nicolas Dumazet nicd...@gmail.com added the comment:

Sure, I'd be happy to contribute a patch.

I uploaded a patch on Rietveld, at http://codereview.appspot.com/110078

Let me know how it looks.

--

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



[issue6744] calling kevent repr raises a TypeError

2009-08-24 Thread Jessica McKellar

Jessica McKellar jessica.mckel...@gmail.com added the comment:

Added a tiny example to generate the error, repeated here. Just:

from select import kevent

if __name__ == '__main__':
ev = kevent(1)
print(repr(ev))

--
Added file: http://bugs.python.org/file14781/kevent-repr-test.py

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