Thanks for the feedback.  I have incorporated your suggestions into my 
design. There is nobody around here I can use for a design review, so, 
begging your forgiveness, I will have to do it here.  Here is how I am 
setting up the prototype...

1) re-implement the argument signature of adodbapi so that it agrees with 
the recommendation for positional and keyword arguments in PEP 249, except 
that the first positional argument is called "connection_string" rather 
than "dsn".  ((Also handle the case where "dsn" is defined but 
"connection_string" is not by using "dsn" as a default.)) The user may 
supply other keyword arguments not documented in PEP 249 -- for example 
"timeout".

2) permit the first positional argument to be a dictionary, which will be 
merged with **kwargs. This will make it easy to pass both the DATABASES 
dictionary and other keyword arguments in.

3) Look in the resulting merged dictionary for key "OPTIONS".  If present, 
merge that dictionary into the existing keywords.

4) Django specifies that database connection keywords are UPPER CASE.  Pep 
249 specifies the same tokens in lower case. Therefore, go through the 
dictionary,
creating lower case copies of any upper case keyword items (if they are not 
already defined.)

4) Create an adodbapi.remote module with the same signatures as adodbapi.

5) In the remote, use the dictionary keywords "'pyro_connection",  
"remote_proxy" and "remote_port" to connect to the server, supplying 
appropriate defaults.

6) Create adodbapi.server.py which will be a PyRO server daemon for 
adodbapi connections.

7) The remote client passes the entire connection keyword dictionary to the 
server.  The remote or the server may add keywords and supply defaults.

8) The server will attempt an adodbapi.connect(*args, **kwargs) using the 
merged keyword dictionary.

9) Internally, adodbapi.connect will execute the equivalent of:  
connection_string = kwargs['connection_string'] % kwargs
to allow the programmer to build her connection string by using Python 
"String Formatting Operations".  She will place "%(keyword)s" constructs in 
her connection 
string where appropriate. 

10) Dictionary keywords will be used for ADO option settings:   
ADO.Connection_timout = kwargs.get('timeout', 30)
---
How does that sound?
--
Vernon

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to