[Python-Dev] SSL tests are failing...

2007-11-27 Thread Facundo Batista
...in my machine with no Internet connection.

I saw what's happening: there's a test in BasicTests that tries to
access "svn.python.org".

It's strange, because this test is an exact copy of the one in
NetworkTest (but the latter is included only if the "network" resource
is enabled).

Seeing more in deep, I saw that Bill replaced in r58164, in this
BasicTest, a lot of previous code (I think that from r57464) that
actually tested it *locally*.

Do you know if there's a good reason to this?

I'm sure that making a network test if the resource is not available
is not a good thing, and as the test is just repeated, it can be
removed, but maybe this is part of a bigger mistake... that's why I'm
asking.

Thanks!!

-- 
.Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] .pyc location?

2007-11-27 Thread Isaac Morland
On Fri, 23 Nov 2007, Andreas Raab wrote:

> I'd like to be able to specify an explicit location for the .pyc files.

Me too, although for different reasons.  I don't like my working 
directories being filled with clutter by programs.  When I work in Java I 
always have javac aliased to use the -d option to put the .class files in 
a specific directory, and I set my CLASSPATH to refer to that directory. 
I end up with a java-src directory with a tree of .java files under it and 
a java-cls directory with .class files under it.  I also get java-doc 
containing the output of javadoc.

Something similar for Python would be very helpful for me.

Isaac Morland   CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] SSL tests are failing...

2007-11-27 Thread Bill Janssen
Which branch is this?

Bill

> Seeing more in deep, I saw that Bill replaced in r58164, in this
> BasicTest, a lot of previous code (I think that from r57464) that
> actually tested it *locally*.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] SSL tests are failing...

2007-11-27 Thread Facundo Batista
2007/11/27, Bill Janssen <[EMAIL PROTECTED]>:

> Which branch is this?

The trunk, sorry.

-- 
.Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] ssl module integration with asyncore

2007-11-27 Thread Giampaolo Rodola'
I tried to write a simple asyncore-based server code, then I used a
simple client to establish a connection with it.
Once the client is connected server raises the following exception:


--- snippet ---
C:\Documents and Settings\billiejoex\Desktop\test>test.py
[]127.0.0.1:3003 Connected.
Traceback (most recent call last):
  File "C:\Documents and Settings\billiejoex\Desktop\test\test.py",
line 40, in

asyncore.loop(timeout=1)
  File "C:\Python26\lib\asyncore.py", line 191, in loop
poll_fun(timeout, map)
  File "C:\Python26\lib\asyncore.py", line 132, in poll
read(obj)
  File "C:\Python26\lib\asyncore.py", line 72, in read
obj.handle_error()
  File "C:\Python26\lib\asyncore.py", line 68, in read
obj.handle_read_event()
  File "C:\Python26\lib\asyncore.py", line 384, in handle_read_event
self.handle_accept()
  File "C:\Documents and Settings\billiejoex\Desktop\test\test.py",
line 33, in
handle_accept
Handler(sock_obj)
  File "C:\Documents and Settings\billiejoex\Desktop\test\test.py",
line 9, in _
_init__
certfile='keycert.pem')
  File "C:\Python26\lib\ssl.py", line 466, in wrap_socket
ssl_version=ssl_version, ca_certs=ca_certs)
  File "C:\Python26\lib\ssl.py", line 103, in __init__
cert_reqs, ssl_version, ca_certs)
ssl.SSLError: [Errno 2] _ssl.c:429: The operation did not complete
(read)
--- /snippet ---




This is the server code I used.
Note that 'keycert.pem' is the certificate file I found in the test
directory.


--- snippet ---
import asyncore, asynchat, socket, ssl

class Handler(asyncore.dispatcher):

def __init__(self, conn):
asyncore.dispatcher.__init__(self, conn)
self.socket = ssl.wrap_socket(conn, server_side=True,
  certfile='keycert.pem')
self.send('hi there')

def readable(self):
if isinstance(self.socket, ssl.SSLSocket):
while self.socket.pending() > 0:
self.handle_read_event()
return True

def handle_error(self):
raise

class Server(asyncore.dispatcher):

def __init__(self):
asyncore.dispatcher.__init__(self)
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.bind(('', 54321))
self.listen(5)

def handle_accept(self):
sock_obj, addr = self.accept()
print "[]%s:%s Connected." %addr
Handler(sock_obj)

def handle_error(self):
raise

Server()
asyncore.loop(timeout=1)
--- snippet ---
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Fwd: Google Highly Open Participation Contest

2007-11-27 Thread Titus Brown
Dear Python-Dev-ers,

about half of the tasks for the GHOP contest (described below) are
currently on the stdlib, Python core, or Py3K:


http://code.google.com/p/google-highly-open-participation-psf/issues/list?q=label:stdlib


http://code.google.com/p/google-highly-open-participation-psf/issues/list?q=label:core


http://code.google.com/p/google-highly-open-participation-psf/issues/list?q=label:py3k

We have room for another twenty or so; if you can come up with testing
tasks, documentation updates/review needs, or anything else that you can
write down in a fairly detailed and specific way, we'd love to have
them.

Here are the new task guidelines:

http://code.google.com/p/google-highly-open-participation-psf/wiki/NewTaskGuidelines

and I'm happy to write up the tasks if people send me good ideas.

cheers,
--titus

- Forwarded message from Titus Brown <[EMAIL PROTECTED]> -

From: Titus Brown <[EMAIL PROTECTED]>
Subject: Google Highly Open Participation Contest

Dear Python community,

I'm happy to announce that the Python Software Foundation is part of a
new Google Open Source program, the Highly Open Participation Contest.
This contest is an effort by Google to engage pre-college students in
open source programming: Google is offering prizes and awards for
completing a variety of tasks for several organizations.

You can read the official announcement of the PSF's involvement over on
the Python Software Foundation blog, at

http://pyfound.blogspot.com/

or read about the overall Google Highly Open Participation Contest on
the GHOP page itself,

http://code.google.com/opensource/ghop/2007-8

Python's project page is:

http://code.google.com/p/google-highly-open-participation-psf/

There are several ways that the community can help; please check out the
MentorPage,

  http://code.google.com/p/google-highly-open-participation-psf/wiki/MentorPage

for more information.  We could use more mentors, and there's room for
~40 more tasks -- why not write one up on your own project?

Also be sure to thank the people who made this possible,

 http://code.google.com/p/google-highly-open-participation-psf/wiki/Contributors

and, of course, Google!

best,
--titus

- End forwarded message -
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com