Re: [Python-Dev] issue 6654

2009-08-10 Thread Kristján Valur Jónsson
I've had no response to this yet.  Is no one using xmlrpc?
To clarify the feature:  The xmlrpc server invokes a "dispatch" method on a 
dispatcher object (typcillay, just itself) to process xmlrpc requests.
The "path" from the xmlrpc request is not provided.  By providing this path, it 
becomes possible to provide different behaviour for different paths.
The patch provided also includes a new dispatcher, MultipPathXMLRPCDispatcher, 
which will forward method to different dispatchers based on the path.
This makes it possible to multiplex many xmlrpc "servers", each with their own 
request path, on a single connection.
You may, for example, have installed a server at
http://myserver/gamerpc
but find that you want your server also to handle an entirely different 
application domain, and can do so now by having those requests sent to
http://myserver/bookkeepingrpc

K

From: python-dev-bounces+kristjan=ccpgames@python.org 
[mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of 
Kristján Valur Jónsson
Sent: 6. ágúst 2009 20:56
To: python-dev@python.org
Subject: [Python-Dev] issue 6654

I added http://bugs.python.org/issue6654
I also put a not to python-ideas but have had no response yet.  Any comments?
Here's the summary:


I've created http://codereview.appspot.com/100046 on Rietveld:

by passing the "path" component of the xmlrpc request to the dispatch

method, itbecomes possible to dispatch differently according to this.  This 
patch

providesthat addition.

Additionally, it provides an MultiPathXMLRPCDispatcher mixin

class and a MultiPathXMLRPCServer that uses it, to have multiple dispatchers for

different paths.

This allows a single server port to serve different XMLRPC servers as

differentiated by the HTTP path.  A test is also preovided.


Kristján
___
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] issue 6654

2009-08-10 Thread Nick Coghlan
Kristján Valur Jónsson wrote:
> I‘ve had no response to this yet.  Is no one using xmlrpc?

It sounds like a reasonable feature to me, but I'm one of those that
doesn't actually use xmlrpc so my +0 or +1 probably isn't very
meaningful to you...

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---
___
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] codecs.oen [was: PEP 385: the eol-type issue]

2009-08-10 Thread Antoine Pitrou
Jim Jewett  gmail.com> writes:
> 
> In python 3, why does codecs.open even still exist?

I don't remember anyone proposing to deprecate it, so I suppose that's the
(social) reason.

> So at this point, are there any differences beyond:

(c) The built-in open is probably a little more featureful, especially when it
comes to seek() and tell().

> (b)  The codecs version is much slower, because it hasn't seen the
> optimization effort.

By the way, the built-in open would also benefit from an optimization of
codecs.py's IncrementalEncoder classes: they are just thin Python wrappers
around C function calls, and the overhead of calling a Python method is very
significant when doing a lot of small unicode writes with a non-optimized codec
(a couple of dominant codecs have been optimized by means of internal shortcuts
bypassing codecs.py: latin-1, utf-8, utf-16).

Regards

Antoine.


> (a)  The builtin open doesn't work on multi-byte line-endings other
> than the multi-character CRLF.  (In other words, it goes by the
> traditional Operating System conventions developed when a char was a
> byte, but the Unicode standard allows for a few more possibilities,
> which are currently rare in practice.)
> 


___
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] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-10 Thread Dj Gilcrease
I figure I would write up the PEP draft, I have never tried writing a
pep before, but i did read PEP 1 and tried to follow it's formating
guides. If there are no additions to the idea, then it seems there
just needs to be a consensus on the syntax before submitting it to the
peps list

I posted this to the python-ideas version of this thread already, but
since more people seem to be posting to the python-dev list I will
post it here as well

 PEP: 
 Title: try-except conditional expressions
 Version: 
 Last-Modified: 
 Author: Jeff McAninch , Dj Gilcrease

 Discussions-To: python-id...@python.org
 Status: Draft
 Type: Standards Track
 Content-Type: text/plain
 Created: 06-Aug-2009
 Python-Version: 2.7/3.2
 Post-History: 

Abstract:
   I very often want something like a try-except conditional
   expression similar to the if-else conditional instead of resorting
   to a multi-line try-except block.

Design Goals:
   The new syntax should
   * Be simple to read
   * Be intuitive so people who may use it infrequently dont need
   to go lookup the format every time
   * Make it obvious what is happening

Modivation:
   Often when doing calculations or string recasting (to int, float,
   etc) it is required to wrap the section in a simple try-except
   where the exception just assigns a default value. It would be more
   readable and consise if these type of try-excepts could be written
   on a single line.

Issues:
   Unknown

Specification:
   All 3 components would just be ordinary expressions. The exception
   definition would be allowed to resolve to a single exception or a
   tuple of exceptions, just as it is in a normal try/except
   statement.

Syntax Ideas:
   Option 1:
   x = float(string) except float('nan') if ValueError
   op(float(string) except float('nan') if ValueError)

   Option 2:
   x = float(string) except ValueError: float('nan')
   op(float(string) except ValueError: float('nan'))

   Option 3:
   x = float(string) except ValueError else float('nan')
   op(float(string) except ValueError else float('nan'))
___
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] 3.1.1 plan

2009-08-10 Thread Benjamin Peterson
Once Subversion is back up (today, tomorrow?), I will tag the 3.1
maintence branch as 3.1.1rc1. The tree will remain frozen until
Saturday. If at that time, no one has found something wrong with the
RC, I will retag it as the final bugfix release.

-- 
Regards,
Benjamin
___
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] 3.1.1 plan

2009-08-10 Thread Antoine Pitrou
Benjamin Peterson  python.org> writes:
> 
> Once Subversion is back up (today, tomorrow?), I will tag the 3.1
> maintence branch as 3.1.1rc1. The tree will remain frozen until
> Saturday. If at that time, no one has found something wrong with the
> RC, I will retag it as the final bugfix release.

Do you intend to wait for the pdb fix?
(http://bugs.python.org/issue6126)



___
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] 3.1.1 plan

2009-08-10 Thread Benjamin Peterson
2009/8/10 Antoine Pitrou :
> Benjamin Peterson  python.org> writes:
>>
>> Once Subversion is back up (today, tomorrow?), I will tag the 3.1
>> maintence branch as 3.1.1rc1. The tree will remain frozen until
>> Saturday. If at that time, no one has found something wrong with the
>> RC, I will retag it as the final bugfix release.
>
> Do you intend to wait for the pdb fix?
> (http://bugs.python.org/issue6126)

Georg says he'll commit it once svn is up, so yes.



-- 
Regards,
Benjamin
___
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] issue 6654

2009-08-10 Thread Brett Cannon
2009/8/10 Nick Coghlan 

> Kristján Valur Jónsson wrote:
> > I‘ve had no response to this yet.  Is no one using xmlrpc?
>
> It sounds like a reasonable feature to me, but I'm one of those that
> doesn't actually use xmlrpc so my +0 or +1 probably isn't very
> meaningful to you...


Ditto.
___
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] www/svn python.org status update

2009-08-10 Thread Thomas Wouters
On Sat, Aug 8, 2009 at 22:22, A.M. Kuchling  wrote:

> The following sites are up again on a new machine, but cannot be
> updated through SVN hooks or whatever mechanism:
>
> www.python.org
> docs.python.org
> www.jython.org
> planet.python.org
> planet.jython.org
>
> svn.python.org was deliberately not brought up again.  The backups
> were a few hours behind and missing the ~10 most recent commits.  Not
> disastrous, but it could probably mess up people's SVN trees, so after
> some IRC discussion, the decision was to wait until the original disks
> are available again.  That will probably not occur until Monday, maybe
> Tuesday.


I'm still waiting on a replacement controller, so it wasn't to be today.
Hopefully tomorrow, if the hardware supplier has one in stock. Still no
news on whether we have any chance at all on getting the old data back.

-- 
Thomas Wouters 

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
___
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] www/svn python.org status update

2009-08-10 Thread Glenn Linderman
On approximately 8/10/2009 12:12 PM, came the following characters from 
the keyboard of Thomas Wouters:

I'm still waiting on a replacement controller, so it wasn't to be today.
Hopefully tomorrow, if the hardware supplier has one in stock. Still no
news on whether we have any chance at all on getting the old data back.


Sadly, redundant hardware controlled by non-redundant hardware, 
configured to be redundant without a backup of that configuration, isn't 
all that reliable :(


It is hard to get redundancy correct and complete, so you can't just 
hear the word "RAID" and conclude that it is reliable, or fully 
redundant, without proper system management.


That's why I still recommend RAID 0 with appropriate backup procedures, 
or RAID 1... but only if the RAID 1 is operable by removing the RAID 
controller, and attaching the disks to regular controllers, and having 
them be readable... sadly, many RAID 1 configurations do not permit that.


--
Glenn -- http://nevcal.com/
===
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
___
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] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-10 Thread Steven D'Aprano
On Tue, 11 Aug 2009 12:29:32 am Dj Gilcrease wrote:
> I figure I would write up the PEP draft, I have never tried writing a
> pep before, but i did read PEP 1 and tried to follow it's formating
> guides. If there are no additions to the idea, then it seems there
> just needs to be a consensus on the syntax before submitting it to
> the peps list

Shouldn't there be consensus on whether or not this is a good idea 
first?

[...]


> Modivation

Motivation.

>Often when doing calculations or string recasting (to int, float,
>etc) it is required to wrap the section in a simple try-except
>where the exception just assigns a default value. It would be more
>readable and consise if these type of try-excepts could be written
>on a single line.

Concise (note spelling) certainly, but I question that it would be more 
readable. Newlines are not a bad thing, but trying to squeeze too much 
into a single line is.

When the `x if y else z` expression was first introduced, I was very 
excited because I thought it would be very useful. But I soon found 
that it actually wasn't that useful to me: it was rare that I wanted 
it, and when I did, it was usually more readable to use an `if` block 
instead. So I don't find this proposal the least bit compelling. It 
seems to me to be primarily useful for saving wear and tear on the 
Enter key.


> Syntax Ideas:
>Option 1:
>x = float(string) except float('nan') if ValueError
>op(float(string) except float('nan') if ValueError)

Looks too confusingly like an if test. I find my eye drawn to the final 
clause, `if ValueError`, and expecting that to evaluate to true.

-1


>Option 2:
>x = float(string) except ValueError: float('nan')
>op(float(string) except ValueError: float('nan'))

[bike-shedding]
At the risk of an extra keyword, I would prefer `unless` instead of 
`except`.
[/bike-shedding]

I find this the least worst of the alternatives. 

-0


>Option 3:
>x = float(string) except ValueError else float('nan')
>op(float(string) except ValueError else float('nan'))

Also looks confusingly like an if test, but not as strongly as Option 1.

-0.5


Should the PEP allow expressions like this?

func(obj) except str(e) if ValueError as e  # Option 1
func(obj) except ValueError as e: str(e)  # Option 2
func(obj) except ValueError as e else str(e)  # Option 3

Justify your choice please.



-- 
Steven D'Aprano
___
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] Python mail-to-news gateway status (was: www/svn python.org status update)

2009-08-10 Thread Ben Finney
"A.M. Kuchling"  writes:

> The following sites are up again on a new machine, but cannot be
> updated through SVN hooks or whatever mechanism:
> 
> www.python.org
> docs.python.org
> www.jython.org
> planet.python.org
> planet.jython.org

I don't see ‘lists.python.org’ there. Is it affected?

I ask because I haven't seen any messages reach the ‘comp.lang.python’
Usenet group since this report. Is that related?

-- 
 \  “The fact that a believer is happier than a skeptic is no more |
  `\   to the point than the fact that a drunken man is happier than a |
_o__) sober one.” —George Bernard Shaw |
Ben Finney

___
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] Python mail-to-news gateway status (was: www/svn python.org status update)

2009-08-10 Thread Barry Warsaw

On Aug 10, 2009, at 9:42 PM, Ben Finney wrote:


"A.M. Kuchling"  writes:


The following sites are up again on a new machine, but cannot be
updated through SVN hooks or whatever mechanism:

www.python.org
docs.python.org
www.jython.org
planet.python.org
planet.jython.org


I don't see ‘lists.python.org’ there. Is it affected?


It shouldn't be.  mail.python.org is a different machine.


I ask because I haven't seen any messages reach the ‘comp.lang.python’
Usenet group since this report. Is that related?


Hmm, if you're getting this message then mailing lists should be  
working.  I don't know what if anything might be wrong with the  
gateway.  Are both directions affected or only one way?


-Barry



PGP.sig
Description: This is a digitally signed message part
___
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] Python mail-to-news gateway status (was: www/svn python.org status update)

2009-08-10 Thread Guido van Rossum
Wasn't there a problem with the spam filter recently?

On Mon, Aug 10, 2009 at 8:09 PM, Barry Warsaw wrote:
> On Aug 10, 2009, at 9:42 PM, Ben Finney wrote:
>
>> "A.M. Kuchling"  writes:
>>
>>> The following sites are up again on a new machine, but cannot be
>>> updated through SVN hooks or whatever mechanism:
>>>
>>> www.python.org
>>> docs.python.org
>>> www.jython.org
>>> planet.python.org
>>> planet.jython.org
>>
>> I don't see ‘lists.python.org’ there. Is it affected?
>
> It shouldn't be.  mail.python.org is a different machine.
>
>> I ask because I haven't seen any messages reach the ‘comp.lang.python’
>> Usenet group since this report. Is that related?
>
> Hmm, if you're getting this message then mailing lists should be working.  I
> don't know what if anything might be wrong with the gateway.  Are both
> directions affected or only one way?
>
> -Barry
>
>
> ___
> 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/guido%40python.org
>
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
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