>> old and had not been touched in ages. Hopefully you will be able to
>> easily port this over to the new tracker once it's up (that should
>> happen 2-4 weeks after 2.5.1 is released).
>
> You can be sure I'll port it...
When you do, make sure you take a look at roundup's search facilities.
Ro
On 3/20/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
> Brett Cannon wrote:
>
> > That's some interesting stuff. Took me a second to realize that the
> > temporal column's total length is the time range from the opening of
> > the oldest bug to the latest comment made on any bug and that the blue
Alan Kennedy wrote:
> def connect(address, **kwargs):
> [snip]
> if kwargs.has_key('timeout'):
> sock.settimeout(kwargs['timeout'])
> [snip]
A problem with interfaces like this is that it makes
it awkward to pass on a value that you received from
higher up.
An
You could use doctest, which is an accepted testing tool that lets you
compare snippets of output directly without having to check in a
"golden" file. Despite what is written somewhere, it is not deprecated
or discouraged. See Lib/doctest.py.
You could also use some advanced testing strategy where
Hi,
I have been working on converting some of the older test files to use
unittest. test_expat.py has a section like:
class Outputter:
def StartElementHandler(self, name, attrs):
print 'Start element:\n\t', repr(name), sortdict(attrs)
def EndElementHandler(self, name):
prin
I'm moving house today and tomorrow, and don't expect to have
internet access connected up at home til sometime next week. In the
meantime, if there's urgent 2.5.1 related issues, bear with me, as
I'll only be on email during the working day. cc Neal (hi Neal :)
is the best bet. Also, the cygwi
Alan Kennedy wrote:
> - Explicitly check that the address passed is a tuple of (string, integer)
It's more probable that a use pass a list of two values, that a host of
two letters as you suggested above...
> - To raise an exception explaining the parameter expectation when it is not
> met
Alan Kennedy wrote:
> So is that address = host, port = 80?
>
> Or is it address = (host, port), timeout=80?
The latter, as is in the rest of Python...
See your point, you say it's less error prone to make timeout mandatory.
I really don't care, so I'll take your advice...
--
. Facundo
.
Bl
Brett Cannon wrote:
> That's some interesting stuff. Took me a second to realize that the
> temporal column's total length is the time range from the opening of
> the oldest bug to the latest comment made on any bug and that the blue
> bar is where within that time frame the bug was opened and th
[Josiah]
> Error-wise, I agree that it would be better to pass timeout explicitly
> with a keyword, but generally users will notice their mistake if they
> try to do create_connection(host, port) by ValueError("tuple expected as
> first argument, got str instead") Is it better than
> TypeError("cre
Greg Ewing <[EMAIL PROTECTED]> wrote:
> Alan Kennedy wrote:
> > The standard mechanism in C for doing a non-blocking connect is to
> > issue the connect call, and check the return value for a non-zero
> > error code. If this error code is errno.EAGAIN (code 10035), then the
> > call succeeded, but
"Alan Kennedy" <[EMAIL PROTECTED]> wrote:
>
> [Facundo]
> > Letting "timeout" be positional or named, it's just less error prone.
> > So, if I can make it this way, it's what I prefer, :)
>
> So, if I want a timeout of, say, 80 seconds, I issue a call like this
>
> new_socket = socket.create_co
Alan Kennedy wrote:
> The standard mechanism in C for doing a non-blocking connect is to
> issue the connect call, and check the return value for a non-zero
> error code. If this error code is errno.EAGAIN (code 10035), then the
> call succeeded, but you should check back later for completion of t
A.M. Kuchling wrote:
> On Tue, Mar 20, 2007 at 06:08:24AM +0100, neal.norwitz wrote:
>> Author: neal.norwitz
>> Date: Tue Mar 20 06:08:23 2007
>> New Revision: 54457
>>
>> +% Should there be a new section here for 3k migration?
>> +% Or perhaps a more general section describing module changes/depre
[Facundo]
> Letting "timeout" be positional or named, it's just less error prone.
> So, if I can make it this way, it's what I prefer, :)
So, if I want a timeout of, say, 80 seconds, I issue a call like this
new_socket = socket.create_connection(address, 80)
So is that address = host, port = 80?
[Josiah]
> But now the result could be either an error code OR a socket. One of
> the reasons to provide a timeout for the create_connection call, if I
> understand correctly, is to handle cases for which you don't get a
> response back in sufficient time.
AFAICT, that's the only reason. It's not
On 3/20/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
> People:
>
> At the beginning of March, there was a thread in this list about patchs
> and bugs that teorically weren't checked out.
>
> >From that discussion, I asked myself: "How can I know the temporal
> location of a patch/bug?". Are there
"Alan Kennedy" <[EMAIL PROTECTED]> wrote:
[snip]
> def create_connection(address, timeout=sentinel):
> [snip]
> if timeout != sentinel:
>new_socket.settimeout(timeout)
> if new_socket.gettimeout() == 0:
>result = new_socket.connect_ex(address)
> else:
>new_
Gregory P. Smith wrote:
> I prefer the default of "clean up after itself" as is to avoid leaving
> temporary file turds on systems caused by us lazy programmers.
Maybe instead of an option there should be a separate
function with a different name, such as NewUniqueFile.
For the use cases I have i
[Facundo]
> So, I have two modifications to make to the patch:
>
> - change the name to "create_connection"
> - make timeout obligatory named
I was going to suggest a third change: for orthogonality with the API
for socket objects, add a blocking parameter as well, i.e.
def create_connection(addr
Josiah Carlson wrote:
> restrict what the user could pass as a value to timeout. It requires
> that you pass timeout explicitly, but that's a (relatively
> inconsequential) API decision.
This is exactly the point. It's an API decision, that you must
communicate to the user, he/she must read it a
Facundo Batista <[EMAIL PROTECTED]> wrote:
> Josiah Carlson wrote:
> > sentinel = object()
> >
> > def connect(HOST, PORT, timeout=sentinel):
> > ...
> > if timeout is not sentinel:
> > sock.settimeout(timeout)
> > ...
> >
> > A keyword argument via **kwargs is also fine. I ha
Josiah Carlson wrote:
> sentinel = object()
>
> def connect(HOST, PORT, timeout=sentinel):
> ...
> if timeout is not sentinel:
> sock.settimeout(timeout)
> ...
>
> A keyword argument via **kwargs is also fine. I have no preference.
I do. The way you showed here, I'm not restr
Steven Bethard wrote:
> is supposed to be a timeout. The modified version::
>
> newsock = socket.create_connection(HOST, PORT, timeout=None)
Warning. The correct function signature is
create_connection(address[, timeout=None])
where address is a tuple (HOST, PORT).
BTW, how can I indic
"Steven Bethard" <[EMAIL PROTECTED]> wrote:
> On 3/20/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
> > So, I have two modifications to make to the patch:
> >
> > - change the name to "create_connection"
> > - make timeout obligatory named
> >
> > Is everybody ok with this?
>
> FWLIW, +1. It wa
People:
At the beginning of March, there was a thread in this list about patchs
and bugs that teorically weren't checked out.
>From that discussion, I asked myself: "How can I know the temporal
location of a patch/bug?". Are there a lot of old patchs/bugs? Those
that are old, don't have any updat
On 3/20/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
> So, I have two modifications to make to the patch:
>
> - change the name to "create_connection"
> - make timeout obligatory named
>
> Is everybody ok with this?
FWLIW, +1. It was not immediately apparent to me that the third argument in::
On Tue, Mar 20, 2007 at 06:08:24AM +0100, neal.norwitz wrote:
> Author: neal.norwitz
> Date: Tue Mar 20 06:08:23 2007
> New Revision: 54457
>
> +% Should there be a new section here for 3k migration?
> +% Or perhaps a more general section describing module changes/deprecation?
> +% sets module depr
Alan Kennedy wrote:
> [Facundo]
>> But, I recognize that maybe it's [connect] not the best name. What about
>> "create_connection"?
>
> I have no strong feelings about it, other than to say it should not be
> "connect". How about
Ok. "create_connection", then.
> Ah, but it's too late by the tim
At 05:07 PM 3/20/2007 +0100, Martin v. Löwis wrote:
>Ronald Oussoren schrieb:
> > What I don't understand is why 'ignore_leading_dot==False' is considered
> > to be a valid usecase at all, except for the fact that os.path.splitext
> > did this until py2.5. I'm definitely in the camp that considers
On 20 Mar, 2007, at 19:24, Phillip J. Eby wrote:
What I don't understand is why 'ignore_leading_dot==False' is
considered to be a valid usecase at all, except for the fact that
os.path.splitext did this until py2.5. I'm definitely in the camp
that considers '.profile' not to have an extension
> i thought about this thing.
(...)
+1!
--
Gustavo Niemeyer
http://niemeyer.net
___
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
At 04:47 PM 3/20/2007 +0100, Ronald Oussoren wrote:
>On 20 Mar, 2007, at 15:54, Phillip J. Eby wrote:
>
>>At 09:24 AM 3/20/2007 +0100, Ronald Oussoren wrote:
>>>I don't agree. "all_ext=True" is won't do the right thing in a
>>>significant subset of filenames
>>
>>Yes, that's understood. The proble
[Facundo]
> But, I recognize that maybe it's [connect] not the best name. What about
> "create_connection"?
I have no strong feelings about it, other than to say it should not be
"connect". How about
* connect_to_server()
* open_connection()
* open_client_connection()
There's no need to inclu
Alan Kennedy wrote:
> Sorry, my mistake.
No problem.
> So, a question I would ask is: Is "connect" the right name for that function?
> ...
> Perhaps a better name might be "create_connected_client_socket", or
> something equally descriptive?
Guido proposed "connect_with_timeout". I don't like
> I have to cross compile Python to run on Arm processor based MontaVista
> Linux.
> If anyone has tried this already, please let me know the procedure.
Dear Kiran,
The python-dev mailing list is for the development *of* Python, not for
the development *with* Python; use python-list@python.org
Ronald Oussoren schrieb:
>> I don't understand. Example?
>
> You conveniently ignored my other arguments ;-).
>
> Given a splitext that ignores leading dot's the following function doesn't:
> # from os.path import *
> def splitext2(path):
> dn = dirname(path)
>
[Alan Kennedy]
>> I see that your updated socket.connect() method takes a timeout
>> parameter, which defaults to None if not present, e.g.
[Facundo Batista]
> I did NOT update a connect() method. I created a connect() function, in
> the module socket.py (there's also a connect() method in the soc
On 20 Mar, 2007, at 15:54, Phillip J. Eby wrote:
At 09:24 AM 3/20/2007 +0100, Ronald Oussoren wrote:
I don't agree. "all_ext=True" is won't do the right thing in a
significant subset of filenames
Yes, that's understood. The problem is that splitext() in general
"won't do the right thing",
Hi All,
I have to cross compile Python to run on Arm processor based MontaVista
Linux.
If anyone has tried this already, please let me know the procedure.
Thanks in advance,
Regards,
Kumar
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.
At 09:24 AM 3/20/2007 +0100, Ronald Oussoren wrote:
>I don't agree. "all_ext=True" is won't do the right thing in a
>significant subset of filenames
Yes, that's understood. The problem is that splitext() in general "won't
do the right thing", for many definitions of "the right thing", unless
yo
Alan Kennedy wrote:
> I see that your updated socket.connect() method takes a timeout
> parameter, which defaults to None if not present, e.g.
I did NOT update a connect() method. I created a connect() function, in
the module socket.py (there's also a connect() method in the socket
object, but I
On 3/20/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Notice that there are really two separate AST projects listed: one
> is to improve usage of the AST compiler, by, say, adding more passes
> to it, or allowing round-tripping from the Python representation.
> The other one is to generate ast
[Facundo Batista]
> Do you have any news about this?
Re: Patch 1676823
http://sourceforge.net/tracker/index.php?func=detail&aid=1676823&group_id=5470&atid=305470
Since I've just written a lot of socket stuff for jython, I thought
I'd have a look at the patch.
I like the idea of adding better soc
On March 15, Georg Brandl wrote:
> I'll review it tomorrow.
Do you have any news about this?
Regards,
--
. Facundo
.
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
___
Python-Dev mailing list
Python-Dev@python.org
http:/
Thanks Josiah and Neal, you were right.
I am running the code on Windows, Server 2003. I should have mentioned
that at the start.
When I change the hostname from "" to "localhost", the code works
exactly as expected.
It's odd that this behaviour exists, only on Windows.
The jython code that I'm
On 16 Mar, 2007, at 23:37, Stephen Hansen wrote:
>
> That may actually be a genuinely useful approach:
>
> splitext(name, ignore_leading_dot=False, all_ext=False)
>
> ... that's perfect. I updated my patch to do it that way! :)
I don't agree. "all_ext=True" is won't do the right thing in a
si
Jay Parlar schrieb:
> 1) Who would most likely mentor this project?
As Brett says, it all depends on the applications we receive and
those that get accepted. That said, it might be me.
> 2) I've never worked in the core before (but have been using Python as
> my primary language for about 6 years
48 matches
Mail list logo