[issue9884] The 4th parameter of method always None or 0 on x64 Windows.

2010-09-19 Thread Owen

Owen  added the comment:

Note:
This issue also occurs on other 64 bit windows OS(i.e. windows xp 64bit)

Load "testPy2.dll" needs vc++ runtime library 
(http://download.microsoft.com/download/2/d/6/2d61c766-107b-409d-8fba-c39e61ca08e8/vcredist_x64.exe)

Update "testPy2.dll", use this to reproduce the issue.
python code:
import sys
from ctypes import *

windll.LoadLibrary("testPy2.dll")
#

def 
test3(param1,param2,param3,param4,param5,param6,param7,param8,param9,param10):
  print("")
  print(param1)
  print(param2)
  print(param3)
  print(param4)
  print(param5)
  print(param6)
  print(param7)
  print(param8)
  print(param9)
  print(param10)
  print("")
  return 20
  
C_METHOD_TYPE4 = WINFUNCTYPE(c_int32, c_int32, c_int32, c_int32, c_int32, 
c_int32, c_int32, c_int32, c_int32, c_int32, c_int32)

windll.testPy2.fntestPy7(9,C_METHOD_TYPE4(test3))

#

def 
test4(param1,param2,param3,param4,param5,param6,param7,param8,param9,param10):
  print("")
  print(param1)
  print(param2)
  print(param3)
  print(param4)
  print(param5)
  print(param6)
  print(param7)
  print(param8)
  print(param9)
  print(param10)
  print("")
  return 20
  
C_METHOD_TYPE5 = WINFUNCTYPE(c_int32, c_int32, c_int32, c_int32, c_int32, 
c_int32, c_int32, c_int32, c_int32, c_int32, c_int32)

windll.testPy2.fntestPy8(10,C_METHOD_TYPE5(test4))

#

def 
test5(param1,param2,param3,param4,param5,param6,param7,param8,param9,param10):
  print("")
  print(param1)
  print(param2)
  print(param3)
  print(param4)
  print(param5)
  print(param6)
  print(param7)
  print(param8)
  print(param9)
  print(param10)
  print("")
  return 20
  
C_METHOD_TYPE6 = WINFUNCTYPE(c_int32, c_float, c_float, c_float, c_float, 
c_float, c_float, c_float, c_float, c_float, c_float)

windll.testPy2.fntestPy9(11,C_METHOD_TYPE6(test5))

--
Added file: http://bugs.python.org/file18929/testPy2.dll

___
Python tracker 

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-19 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Thanks. I've committed in r84902(py3k).

--
resolution:  -> fixed
status: open -> closed
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



[issue9896] Introspectable range objects

2010-09-19 Thread Daniel Urban

Daniel Urban  added the comment:

> What is the use case for this?

The basic idea was, that in Python almost everything is introspectable, so why 
range objects aren't.  It was pretty straightforward to implement it, so I've 
done it (actually when I was working on rangeobject.c, I was surprised to see 
that these members aren't available from python code).
But if this isn't needed, I'm absolutely ok with that.  I think this would be a 
nice to have feature, but of course not necessary.  Also, if it violates the 
moratorium (I don't know), then of course this sould be at least postponed.

--

___
Python tracker 

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



[issue9897] multiprocessing problems

2010-09-19 Thread hume

New submission from hume :

when use multiprocessing managers, while use socket to communicate between 
server process and client process, if I used the global socket timeout 
feature(no matter how large the value is) the client will always say

  File "c:\python27\lib\multiprocessing\connection.py", line 149, in Client
answer_challenge(c, authkey)
  File "c:\python27\lib\multiprocessing\connection.py", line 383, in 
answer_challenge
message = connection.recv_bytes(256) # reject large message
IOError: [Errno 10035] 

this is not reasonable, because this behaviour will make subprocess unable to 
use socket's timeout features globally.

Another question is line 138 in managers.py:
# do authentication later
self.listener = Listener(address=address, backlog=5)
self.address = self.listener.address

backlog=5 will accept only 5 cocurrent connections, this is not so user 
friendly, you'd better make this a argument that can be specified by user

--
components: Library (Lib)
messages: 116854
nosy: hume
priority: normal
severity: normal
status: open
title: multiprocessing problems
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



[issue2090] __import__ with fromlist=

2010-09-19 Thread Aaron Sterling

Aaron Sterling  added the comment:

FWIW, I also get this behavior on 2.6.5 and there are claims that it occurs on 
2.6.4 and 3.1.1. see 
http://stackoverflow.com/questions/3745221/import-calls-init-py-twice/3745273#3745273

--
nosy: +Aaron.Sterling
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



[issue8998] add crypto routines to stdlib

2010-09-19 Thread Georg Brandl

Georg Brandl  added the comment:

> The license clearly states: "All advertising materials mentioning
> features or use of this software". Do you somehow disagree that base64
> is a feature of the OpenSSL library?
>
> http://www.openssl.org/docs/crypto/BIO_f_base64.html

That's funny. Do you think that if OpenSSL provided its own implementation of 
strlen(), every text that mentions strlen() needs to acknowledge OpenSSL? Do 
you realize how ridiculous that is?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue2090] __import__ with fromlist=

2010-09-19 Thread Aaron Sterling

Changes by Aaron Sterling :


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



[issue1738] filecmp.dircmp does exact match only

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Patch worked fine with 2.7.  I reworked it for SVN trunk but got this failure.

FAILED (failures=1)
Traceback (most recent call last):
  File "test_filecmp.py", line 179, in 
test_main()
  File "test_filecmp.py", line 176, in test_main
support.run_unittest(FileCompareTestCase, DirCompareTestCase)
  File "c:\py3k\lib\test\support.py", line 1128, in run_unittest
_run_suite(suite)
  File "c:\py3k\lib\test\support.py", line , in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "test_filecmp.py", line 158, in test_dircmp_fnmatch
self.assertEqual(d.left_list, ['file'])
AssertionError: Lists differ: ['dir-ignore', 'file', 'file.t... != ['file']

First differing element 0:
dir-ignore
file

First list contains 2 additional elements.
First extra element 1:
file

- ['dir-ignore', 'file', 'file.tmp']
+ ['file']

I've attached a py3k patch as a different pair of eyes is more likely to spot a 
problem.

--
nosy: +BreamoreBoy
Added file: http://bugs.python.org/file18930/issue1738py3k.diff

___
Python tracker 

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



[issue1744] readline module - set/get quote delimiters

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can a committer review this please.  Can't test it myself as I don't have a 
*NIX box, sorry.

--
nosy: +BreamoreBoy
stage:  -> patch review

___
Python tracker 

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



[issue1763] Winpath module - easy access to Windows directories like My Documents

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

No reply to msg110596.

--
status: open -> closed

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-09-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Just another data point for the discussion:

The PSF is currently funding the effort to port pyOpenSSL to
Python 3.x and the port is nearly finished.

It may be worthwhile investigating adding the EVP interface
from evpy (with the ctypes bindings converted to real C wrappers)
to pyOpenSSL and then adding the pyOpenSSL package to the stdlib.

Note that going for other crypto libs than OpenSSL is currently
not an option, since those are not widely available on the OSes and
we cannot easily add crypto code itself to Python's stdlib due to the
issues with crypto import/export/use restrictions which would
limit the use of Python in various countries.

--

___
Python tracker 

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



[issue1778] SyntaxError.offset sometimes wrong

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

This will go nowhere until someone supplies a patch.  I'm assuming unit tests 
can be built using the attached test file.

--
nosy: +BreamoreBoy
stage: unit test needed -> needs patch
versions: +Python 2.7, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue1783] nonexistent data items declared as exports in sysmodule.h

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

The 1st declaration still exists, the 2nd has been removed.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1785] "inspect" gets broken by some descriptors

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

I can't apply the patch to any current SVN version.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1794] Hot keys must work in any keyboard layout

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

>From msg86386 "Nevertheless, after reading your comments I came to the 
>conclusion that doing what you want is very unlikely to happen." so closing.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1800] ctypes callback fails when called in Python with array argument

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Anybody?

--

___
Python tracker 

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



[issue1827] svnversion_init() doesn't support svn urls in sandbox/trunk

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Is this ever likely to happen given the switch to Mercurial, or is that a 
different scenario to this?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1838] Ctypes C-level infinite recursion

2010-09-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

I'm not convinced that this needs doing, so I'll close in a couple of weeks 
unless anyone objects.

--
nosy: +BreamoreBoy
status: open -> pending

___
Python tracker 

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



[issue9786] Native TLS support for pthreads

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch looks good to me.

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> It may be worthwhile investigating adding the EVP interface
> from evpy (with the ctypes bindings converted to real C wrappers)
> to pyOpenSSL and then adding the pyOpenSSL package to the stdlib.

pyOpenSSL being LGPL'ed, I'm not sure this is possible.
On the other hand, gradually adding some of pyOpenSSL's most useful 
functionalities to the ssl module would be worthwhile, and I know Jean-Paul 
would be interested in this.
This has already begun in 3.2, but I've been alone in doing it and it would be 
nice if other people contributed:
http://docs.python.org/dev/library/ssl.html#ssl-contexts

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-09-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Antoine Pitrou wrote:
> 
> Antoine Pitrou  added the comment:
> 
>> It may be worthwhile investigating adding the EVP interface
>> from evpy (with the ctypes bindings converted to real C wrappers)
>> to pyOpenSSL and then adding the pyOpenSSL package to the stdlib.
> 
> pyOpenSSL being LGPL'ed, I'm not sure this is possible.

Changing the license should be possible, since we know the
copyright owners and both are PSF members (AB Strakt and Jean-Paul).

> On the other hand, gradually adding some of pyOpenSSL's most useful 
> functionalities to the ssl module would be worthwhile, and I know Jean-Paul 
> would be interested in this.
> This has already begun in 3.2, but I've been alone in doing it and it would 
> be nice if other people contributed:
> http://docs.python.org/dev/library/ssl.html#ssl-contexts

I don't think we should redo this effort in the context
of the ssl module.

pyOpenSSL is stable, in production use and
has a decent API. The ssl module is good enough for HTTPS client
use. pyOpenSSL provides a robust server side implementation with
all the required certificate and context handling needed for this.

We could tell people to use the ssl module for clients and
pyOpenSSL for the server side and perhaps integrate the OpenSSL
package into the ssl namespace.

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> pyOpenSSL is stable, in production use and
> has a decent API. The ssl module is good enough for HTTPS client
> use. pyOpenSSL provides a robust server side implementation with
> all the required certificate and context handling needed for this.
> 
> We could tell people to use the ssl module for clients and
> pyOpenSSL for the server side and perhaps integrate the OpenSSL
> package into the ssl namespace.

In this case, this should be decided early, so that I know if I should
continue caring about the ssl module or not. I'm not interested in
maintaining potentially obsolete code.

--

___
Python tracker 

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



[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-19 Thread Tom Browder

Tom Browder  added the comment:

I'm getting no interest from the gcc group at the moment.  I would like to help 
track down the bug and will nose around the Python source to zero in on where 
the problem is for detailed debugging.  Can anyone point me to the key files 
that concern the byte compiler?

--

___
Python tracker 

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



[issue9897] multiprocessing problems

2010-09-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> jnoller
nosy: +jnoller

___
Python tracker 

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



[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

You can look at Python/compile.c (the ast-to-bytecode compiler), 
Python/peephole.c (the bytecode optimizer), Python/marshal.c (the on-disk 
bytecode serializer/unserialize).

First step could be to actually disable the optimizer (see PyCode_Optimize in 
peephole.c).

--
nosy: +pitrou

___
Python tracker 

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



[issue1838] Ctypes C-level infinite recursion

2010-09-19 Thread Alex

Alex  added the comment:

I concur with Daniel, this strikes me as a legitimate bug.  Crashing is 
obviously possibly by calling into arbitrary C code, but in this case control 
never leaves the runtime.

--
nosy: +alex
status: pending -> open

___
Python tracker 

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



[issue1800] ctypes callback fails when called in Python with array argument

2010-09-19 Thread Lenard Lindstrom

Lenard Lindstrom  added the comment:

I will check it out.

--

___
Python tracker 

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



[issue9851] multiprocessing socket timeout will break client

2010-09-19 Thread Jesse Noller

Jesse Noller  added the comment:

Duplicate; 9897

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue9897] multiprocessing problems

2010-09-19 Thread Jesse Noller

Jesse Noller  added the comment:

hume; filing this again doesn't help. I closed issue 9851 as a duplicate of 
this for you.

--

___
Python tracker 

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



[issue9360] nntplib cleanup

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is the current state of the cleanup work. Coding is roughly finished; most 
methods are unit-tested. The documentation remains to be done. Review welcome.

--
stage:  -> patch review
Added file: http://bugs.python.org/file18931/nntplib_cleanup5.patch

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-09-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

>> Unless "base64" is an OpenSSL trademark, this is FUD.
> 
> The license clearly states: "All advertising materials mentioning
> features or use of this software". Do you somehow disagree that
> base64 is a feature of the OpenSSL library?

What specific "advertising material" mentions "base64" but fails to
mention "OpenSSL"? In any case, this is off-topic for this issue.

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-09-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue9898] cProfile.runctx doesn't allow sort argument

2010-09-19 Thread Ram Rachum

New submission from Ram Rachum :

The `cProfile.runctx` function currently doesn't allow using the `sort` 
argument. For some reason the `sort` argument is allowed in `run` but not in 
`runctx`. Attached is a patch that allows using `sort` in `runctx`.

--
components: Library (Lib)
files: cProfile.patch
keywords: patch
messages: 116880
nosy: cool-RR
priority: normal
severity: normal
status: open
title: cProfile.runctx doesn't allow sort argument
type: feature request
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file18932/cProfile.patch

___
Python tracker 

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



[issue9119] Python download page needs to mention crypto code in Windows installer

2010-09-19 Thread Éric Araujo

Éric Araujo  added the comment:

Yes, everything under docs.python.org is generated from files from the Doc 
directory of a CPython checkout.  s/.html/.rst/ and you have your filename.

--

___
Python tracker 

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



[issue2090] __import__ with fromlist=

2010-09-19 Thread Brett Cannon

Brett Cannon  added the comment:

I replied to the Stack Overflow question. I should also mention that importlib 
is on PyPI and compatible back to PYthon 2.3.

I still plan to get to this some day, but I don't view this as a critical fix, 
just a nice thing to do for folks.

--

___
Python tracker 

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



[issue9899] [REGRESSION] test_tk broken on MacOSX 10.6

2010-09-19 Thread Ismail Donmez

New submission from Ismail Donmez :

py3k branch, revision 84907

==
ERROR: test_font_eq (tkinter.test.test_tkinter.test_font.FontTest)
--
Traceback (most recent call last):
  File 
"/Users/cartman/Sources/py3k/Lib/tkinter/test/test_tkinter/test_font.py", line 
10, in test_font_eq
font1 = font.nametofont("system")
  File "/Users/cartman/Sources/py3k/Lib/tkinter/font.py", line 22, in nametofont
return Font(name=name, exists=True)
  File "/Users/cartman/Sources/py3k/Lib/tkinter/font.py", line 83, in __init__
"named font %s does not already exist" % (self.name,))
_tkinter.TclError: named font system does not already exist

--
components: Tests
messages: 116883
nosy: cartman
priority: normal
severity: normal
status: open
title: [REGRESSION] test_tk broken on MacOSX 10.6
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue9360] nntplib cleanup

2010-09-19 Thread Nick Coghlan

Nick Coghlan  added the comment:

To make the distinction easier to remember, would it help if the methods that 
are currently set to return bytes instead accepted the typical encoding+errors 
parameters, with parallel *b APIs to get at the raw bytes?

My concern with the current API is that there isn't a clear indicator during 
normal programming as to which APIs return strings and which return the raw 
bytes and hence require further decoding.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue4844] ZipFile doesn't range check in _EndRecData()

2010-09-19 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

Following EAFP principle, it would be better - cleaner and more efficient - to 
put the stuct.unpack inside a try/except clause than checking the lengths 
beforehand.

--
nosy: +neologix

___
Python tracker 

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



[issue9360] nntplib cleanup

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> To make the distinction easier to remember, would it help if the
> methods that are currently set to return bytes instead accepted the
> typical encoding+errors parameters, with parallel *b APIs to get at
> the raw bytes?

Not really, no. For raw messages, which encoding+errors must be used
depends on the returned contents, it's not something the client can know
up front; moreover, different parts of the returned bytes may need
decoding using different encodings (for example if there are several
MIME parts to the message). People should use the email package to parse
the raw messages, as I assume they already do in 2.x.

Apart from raw message bodies, NNTP data has well-defined encodings and
that's why I can take and return unicode (although as stated, I also use
surrogateescape to be fault-tolerant in the face of broken servers).

> My concern with the current API is that there isn't a clear indicator
> during normal programming as to which APIs return strings and which
> return the raw bytes and hence require further decoding.

That's a documentation issue. I haven't touched the docs yet :)

--

___
Python tracker 

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



[issue9252] PyImport_Import calls __import__ with dummy fromlist

2010-09-19 Thread Brett Cannon

Brett Cannon  added the comment:

Fixed in r84908.

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



[issue9119] Python download page needs to mention crypto code in Windows installer

2010-09-19 Thread Georg Brandl

Georg Brandl  added the comment:

Not quite everything (index.html and download.html are special, in that they're 
not generated from reST), but otherwise that is correct.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue4844] ZipFile doesn't range check in _EndRecData()

2010-09-19 Thread Alan McIntyre

Alan McIntyre  added the comment:

I had to look up the abbreviation (Easier to Ask Forgiveness than Permission), 
but that does sound like a good idea.  Thanks for mentioning it. :-)

--

___
Python tracker 

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



[issue1838] Ctypes C-level infinite recursion

2010-09-19 Thread Guido van Rossum

Guido van Rossum  added the comment:

So has anyone got an idea on how to fix this without solving the halting 
problem?

--

___
Python tracker 

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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Rob Watson

New submission from Rob Watson :

Is the below a bug or a misuse of the api ? This was compiled with visual 
studio 2008 and python26 64bit

void testfunction()
{
for (int x = 1;x <= 10;x++)
{

PyGILState_STATE gstate = PyGILState_Ensure();
PyRun_SimpleString("2 + 1");
PyGILState_Release(gstate);
}   
}


int main()
{

Py_Initialize();
PyEval_InitThreads();
PyEval_ReleaseLock();   

boost::thread(boost::bind(testfunction));

// if this Sleep(100) is commented out, I will get "Python Fatal Error 
: This thread state must be current when releasing"
Sleep(100);
testfunction();
Sleep(100);
}

--
components: None
messages: 116891
nosy: Rob.Watson
priority: normal
severity: normal
status: open
title: Threading Bug or misuse of the api ?
type: crash
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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Rob Watson

Changes by Rob Watson :


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

___
Python tracker 

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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Rob Watson

Changes by Rob Watson :


--
resolution: invalid -> 

___
Python tracker 

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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Rob Watson

Changes by Rob Watson :


--
status: closed -> open

___
Python tracker 

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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Rob Watson

Changes by Rob Watson :


--
status: open -> closed

___
Python tracker 

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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Please include a message when closing an issue to indicate why it's closed.

AFAICT, this is indeed incorrect usage of the API: you should have used 
PyEval_SaveThread instead of PyEval_ReleaseLock.

--
nosy: +loewis
resolution:  -> invalid

___
Python tracker 

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



[issue9901] GIL destruction can fail

2010-09-19 Thread Antoine Pitrou

New submission from Antoine Pitrou :

test_finalize_with_trace (in test_threading) sometimes fails because of failing 
to destroy the GIL (in _PyEval_FiniThreads()). This can be reproduced quite 
reliably by launching several copies in parallel:

$ ./python -m test.regrtest -j10 -F test_threading
[...]
test test_threading failed -- Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/test_threading.py", line 334, in 
test_finalize_with_trace
"Unexpected error: " + ascii(stderr))
AssertionError: Unexpected error: b'Fatal Python error: 
pthread_mutex_destroy(gil_mutex) failed\n'


What happens is that pthread_mutex_destroy() fails with EBUSY. According to the 
POSIX man page:

“[EBUSY]
The implementation has detected an attempt to destroy the object referenced 
by mutex while it is locked or referenced (for example, while being used in a 
pthread_cond_timedwait() or pthread_cond_wait()) by another thread.”


After a bit of tracing, it becomes clear that Py_Finalize() calls 
_PyEval_FiniThreads() while another thread is taking the GIL (take_gil()). 
Unfortunately, this is not a situation we can avoid, since we rely on process 
exit to kill lingering threads: arbitrary CPython code may still be running in 
parallel while we are finalizing interpreter structures.

Therefore, it is likely that _PyEval_FiniThreads() should avoid destroying the 
mutex at all. Indeed, if we destroy the mutex, it is possible that a lingering 
thread tries to retake the GIL after waking up from a system call 
(Py_END_ALLOW_THREADS), and fails because of another fatal error ("Fatal Python 
error: pthread_mutex_lock(gil_mutex) failed").

--
components: Interpreter Core
messages: 116893
nosy: amaury.forgeotdarc, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: GIL destruction can fail
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Rob Watson

Rob Watson  added the comment:

it seemed changing PyEval_ReleaseLock() to PyThreadState_DeleteCurrent() has 
fixed my problem. Thanks

--
resolution: invalid -> 

___
Python tracker 

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



[issue9900] Threading Bug or misuse of the api ?

2010-09-19 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
resolution:  -> invalid

___
Python tracker 

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



[issue9902] test_undecodable_env failure

2010-09-19 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Under the "x86 debian parallel 3.x" buildbot, there's the following failure:

==
FAIL: test_undecodable_env (test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File 
"/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py", 
line 898, in test_undecodable_env
self.assertEquals(stdout.decode('ascii'), ascii(value))
AssertionError: "'abc\\xff'" != "'abc\\udcff'"
- 'abc\xff'
?  ^
+ 'abc\udcff'
?  ^^^


==
FAIL: test_undecodable_env (test.test_subprocess.ProcessTestCasePOSIXPurePython)
--
Traceback (most recent call last):
  File 
"/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py", 
line 898, in test_undecodable_env
self.assertEquals(stdout.decode('ascii'), ascii(value))
AssertionError: "'abc\\xff'" != "'abc\\udcff'"
- 'abc\xff'
?  ^
+ 'abc\udcff'
?  ^^^

--
assignee: haypo
components: Tests
messages: 116895
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: test_undecodable_env failure
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue9902] test_undecodable_env failure

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It can be reproduced quite easily with the right locale:

$ LANG=fr_FR.iso8859-1 ./python -m test.regrtest -v test_subprocess

--

___
Python tracker 

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



[issue9902] test_undecodable_env failure

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Fix attempted in r84912.

--

___
Python tracker 

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



[issue1838] Ctypes C-level infinite recursion

2010-09-19 Thread Alex

Alex  added the comment:

No need to solve the halting problem, just to detect a cycle in data.  I've got 
a patch, however it requires objects to be hashable.  Another case for identity 
dict I suppose :)  Not sure if that's a reasonable requirement, in any event, 
proof of concept patch, against trunk.

--
keywords: +patch
Added file: http://bugs.python.org/file18933/python_recursive_as_parameter.diff

___
Python tracker 

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



[issue8432] buildbot: test_send_signal of test_subprocess failure

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The test fails mostly on very slow machines (not only BSD ones, but also the 
Debian sparc buildbot).
Therefore, I've attempted a fix in r84910 by relaxing timings, and simply 
skipping the test if it seems we couldn't send the signal in time.

--

___
Python tracker 

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



[issue9902] test_undecodable_env failure

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Fixed!

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



[issue8432] buildbot: test_send_signal of test_subprocess failure

2010-09-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The fix succeeded on the "sparc Debian 3.x" buildbot while test_subprocess had 
been failing consistently before.

--

___
Python tracker 

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



[issue9903] test_concurrent_futures writes on stderr

2010-09-19 Thread Antoine Pitrou

New submission from Antoine Pitrou :

test_concurrent_futures writes the following on stderr:

exception calling callback for 
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/concurrent/futures/_base.py",
 line 267, in _invoke_callbacks
callback(self)
  File 
"/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/test/test_concurrent_futures.py",
 line 626, in raising_fn
raise Exception('doh!')
Exception: doh!


test_concurrent_futures should capture stderr instead, and also probably check 
its value (to be sure that the exception does get logged out properly).

--
assignee: bquinlan
components: Tests
messages: 116902
nosy: bquinlan, pitrou
priority: normal
severity: normal
status: open
title: test_concurrent_futures writes on stderr
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue9360] nntplib cleanup

2010-09-19 Thread R. David Murray

R. David Murray  added the comment:

I tested this against my existing py3k nttp client code.

Why is it a good thing to make file a keyword only parameter? But given that it 
is, line 720 needs to use it as such, which omission means your missing at 
least one test :)

On line 193 you index fmt, and *then* you check the length.  When the number of 
tokens is too long, an IndexError is raised.  (Note that the offending overview 
line comes from the gmane group comp.lang.python.mime.devel, and the offense is 
an extra '' field on one of the records.  No idea why it got added to that one 
record.  Looks like it is message 701, artid <4111bba9.3040...@harvee.org>)

Could the 'date' field in the xover headers also be a DateTime rather than a 
string?  And :bytes and :lines be ints?  Or is that being to DWIMish?  If the 
date field isn't returned as a datetime, though, should there be a helper 
method for converting it, or should we just assume that email.utils mktime_tz 
and parsedate_tz?

Am I correct that the purpose of _NNTPBase is to make testing easier?

There seem to be only three lines of code in common between the file and the 
non-file case in _getlongresp.  I think it would be clearer to make them two 
different routines, or at least move the three common lines to the top and then 
do an if test on file is None (that is, put the simpler, non-file case first).

My little nttp client script doesn't really test very much of the nttplib 
interface, nor is it very complex.  The change to xover considerably simplified 
that part of my script, so I very much like that change.  I was also able to 
drop my implementation of decode_header.  So overall this patch is significant 
improvement, IMO.

I haven't given the code as thorough a review as might be optimal, but I 
certainly think you are headed in the right direction.

--

___
Python tracker 

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



[issue9360] nntplib cleanup

2010-09-19 Thread R. David Murray

R. David Murray  added the comment:

Gah.  I reviewed patch4, didn't noticed today's update :(

--

___
Python tracker 

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



[issue9786] Native TLS support for pthreads

2010-09-19 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Committed as revision 84914

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



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-19 Thread Ned Deily

Ned Deily  added the comment:

r84865 for Issue1730136 introduced a new tkinter test, test_font.  As it 
stands, the test fails on OS X 10.6 when Python is built with Aqua Tk, at least 
with either the Apple-supplied 8.5 or the ActiveState 8.5 (I haven't tried with 
any of the Aqua 8.4 version).  The main problem is that font "system" is not a 
font name returned by the interface used by tkinter/font.py:

$ /usr/bin/wish8.5
% font names
systemPushButtonFont systemMenuItemFont systemApplicationFont systemSystemFont 
systemMenuItemMarkFont TkMenuFont TkDefaultFont systemSmallEmphasizedSystemFont 
systemDetailEmphasizedSystemFont systemMiniSystemFont TkHeadingFont 
TkTooltipFont systemUtilityWindowTitleFont systemViewsFont 
systemSmallSystemFont systemMenuTitleFont systemEmphasizedSystemFont TkTextFont 
systemDetailSystemFont TkCaptionFont systemLabelFont systemAlertHeaderFont 
systemMenuItemCmdKeyFont TkSmallCaptionFont TkFixedFont systemWindowTitleFont 
systemToolbarFont TkIconFont
% font actual system
-family {Lucida Grande} -size 13 -weight normal -slant roman -underline 0 
-overstrike 0

Based on the man page here (http://www.tcl.tk/man/tcl8.5/TkCmd/font.htm#M31) it 
appears any of the "standard" font names would be a better choice, like 
TkDefaultFont.

Also, test_font should include the standard tkinter.test setUp and setDown 
functions so that the test can be run by itself.

The attached patch should fix both issues.

--
components: +Tkinter
keywords: +patch
nosy: +amaury.forgeotdarc, gpolo, ned.deily
stage:  -> patch review
title: [REGRESSION] test_tk broken on MacOSX 10.6 -> tkinter test_font fails on 
OS X with Aqua Tk
Added file: http://bugs.python.org/file18934/issue9899-py3k.patch

___
Python tracker 

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



[issue9897] multiprocessing problems

2010-09-19 Thread hume

hume  added the comment:

ok, I refill this to fix the un-plesant words problem.

--

___
Python tracker 

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-19 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I'll revert my commits because I noticed after perl source
like openssl-1.0.0a/crypto/x86cpuid.pl was modified,
unnecessary rebuild happened again.

Appropriate fix will be "only copies *.asm if there are not
in tmp32/" as comments in PCBuild/build_ssl.py saids.(Probably
this copying is not needed only when Perl is available,
I suppose)

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

___
Python tracker 

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-19 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

- only when
+ when

P.S.
I cannot figure out how to solve this error.
http://www.python.org/dev//buildbot/builders/x86%20Windows7%203.x/builds/1593/steps/compile/logs/stdio

--

___
Python tracker 

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-19 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

This is the patch I'm thinking of. I confirmed this works
on VS8.0. (After replaced "..\\.." with "..\\..\\..")

E:\PYTHON~1\py3k\PC\VS8.0>python_d.exe build_ssl.py Release Win32 -a
Found a working perl at 'C:\Perl\bin\perl.exe'
Found an SSL directory at '..\..\..\openssl-1.0.0a'
Executing ssl makefiles: nmake /nologo -f "ms\nt.mak"
Building OpenSSL
copy ".\crypto\buildinf.h" "tmp32\buildinf.h"
Copied one file.
copy ".\crypto\opensslconf.h" "inc32\openssl\opensslconf.h"
Copied one file.
[45178 refs]

By this change, two header files are still copied. I feel
it's strange header files are modified but none of sources
are not re-built.

--
Added file: http://bugs.python.org/file18935/py3k_openssl.patch

___
Python tracker 

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



[issue9904] Cosmetic issues that might be worthy a fix in symtable.h/c

2010-09-19 Thread Eli Bendersky

New submission from Eli Bendersky :

The following minor issues may affect the readability of the code implementing 
symbol tables in Include/symtable.h and Python/symtable.c

* The comment for st_global in symtable.h says: "borrowed ref to 
st_top->st_symbols. typo? (st_top->ste_symbols)
* ste_varnames: the name and the comment after it are misleading, since it 
actually collects only the function's parameters and not all variables.
* the st_nblocks and st_future fields of symtable aren't used anywhere - 
py3k compiles fine when they're removed.
* in analyze_block a comment says "Recursively call analyze_block()" - 
untrue, probably meant analyze_child_block. While technically 
analyze_child_block calls analyze_block, the comment as-is appears misleading.
* symtable_add_def is also called with the USE flag, not only definitions, 
hence its name doesn't reflect its purpose accurately
* There are some indentation artifacts that obscure readability. For 
example the case Raise_kind of symtable_visit_stmt, where two nested blocks 
start and end in the same column obscuring the fact they're nested. This could 
be a result of an automatic tab to space conversion in the past.

--
components: Interpreter Core
messages: 116911
nosy: eli.bendersky, ncoghlan
priority: normal
severity: normal
status: open
title: Cosmetic issues  that might be worthy a fix in symtable.h/c
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue9904] Cosmetic issues that may warrant a fix in symtable.h/c

2010-09-19 Thread Eli Bendersky

Changes by Eli Bendersky :


--
title: Cosmetic issues  that might be worthy a fix in symtable.h/c -> Cosmetic 
issues that may warrant a fix in symtable.h/c

___
Python tracker 

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



[issue9898] cProfile.runctx doesn't allow sort argument

2010-09-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This has already been done as part of issue9428 in r83524.

--
nosy: +amaury.forgeotdarc
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