[Twisted-Python] Getting involved in Python 3.0 porting

2009-01-27 Thread Manuel Alejandro CerĂ³n Estrada
Hello.

This year I'm going to start my graduation project for software
engineering and I want to use Python and Twisted. I want to use Python
3.0 but unfortunately, Twisted doesn't support 3.0 yet and I've read
that this is not exactly a high priority right now. As this is an open
source project, I thought the best thing I can do is to contribute
with the porting. Then I have some questions:

Is someone leading the porting process?
Have you defined a porting strategy?
What is the best way in which I can contribute to this?

Thanks.

Manuel.

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Getting involved in Python 3.0 porting

2009-01-27 Thread glyph


On 05:12 pm, ceron...@gmail.com wrote:

This year I'm going to start my graduation project for software
engineering and I want to use Python and Twisted. I want to use Python
3.0 but unfortunately, Twisted doesn't support 3.0 yet and I've read
that this is not exactly a high priority right now. As this is an open
source project, I thought the best thing I can do is to contribute
with the porting. Then I have some questions:


Thanks!  We can always use help, and the 3.0 port is a major project 
which we currently have no manpower for, so we can especially use help 
for that.

Is someone leading the porting process?


You, now :).

Have you defined a porting strategy?


Yes.  It's outlined here:

http://stackoverflow.com/questions/172306/how-are-you-planning-on- 
handling-the-migration-to-python-3#214601

What is the best way in which I can contribute to this?


Twisted's test suite currently emits a _lot_ of warnings.  In order to 
do a python 3 port, we'll need to be getting zero warnings on python 2.6 
with the -3 switch.  If we are even going to be able to _see_ those 
warnings, we need to get down to zero warnings and adopt a zero- 
tolerance policy on new warnings being added.


So the first thing you should do is find, file, and fix as many tickets 
as you can related to warnings in tests; warnings from Twisted itself, 
warnings from the stdlib, warnings from dependencies.


When you're done with that we can talk about what comes next :).

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Sprint in February

2009-01-27 Thread glyph


On 01:48 am, ra...@twistedmatrix.com wrote:

I'd like to go to the sprint, but for what it's worth, I won't be able
to make it on that weekend. I'm leaving for business the afternoon of
the 7th.


Do you have a different recommendation?  How long will your trip take?

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Sprint in February

2009-01-27 Thread Christopher Armstrong
On Tue, Jan 27, 2009 at 2:22 PM,   wrote:
>
> On 01:48 am, ra...@twistedmatrix.com wrote:
>>
>> I'd like to go to the sprint, but for what it's worth, I won't be able
>> to make it on that weekend. I'm leaving for business the afternoon of
>> the 7th.
>
> Do you have a different recommendation?  How long will your trip take?

I could sprint this weekend. The trip is two weeks, so I could
feasibly also sprint on the Sunday the 22nd (with the chance of
jetlag). Any other weekend is probably good, I'm just unavailable 7th
through 21st.


-- 
Christopher Armstrong
http://radix.twistedmatrix.com/
http://planet-if.com/
http://canonical.com/

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Sprint in February

2009-01-27 Thread Itamar Shtull-Trauring
On Tue, 2009-01-27 at 14:30 -0500, Christopher Armstrong wrote:

> I could sprint this weekend. The trip is two weeks, so I could
> feasibly also sprint on the Sunday the 22nd (with the chance of
> jetlag). Any other weekend is probably good, I'm just unavailable 7th
> through 21st.

This Saturday works for me (in so far as I can do anything at all)...


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Sprint in February

2009-01-27 Thread glyph

On 07:30 pm, ra...@twistedmatrix.com wrote:

I could sprint this weekend. The trip is two weeks, so I could
feasibly also sprint on the Sunday the 22nd (with the chance of
jetlag). Any other weekend is probably good, I'm just unavailable 7th
through 21st.


OK then, the 1st could work for me too.

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Sprint in February

2009-01-27 Thread Jean-Paul Calderone

On Tue, 27 Jan 2009 22:27:25 -, gl...@divmod.com wrote:

On 07:30 pm, ra...@twistedmatrix.com wrote:

I could sprint this weekend. The trip is two weeks, so I could
feasibly also sprint on the Sunday the 22nd (with the chance of
jetlag). Any other weekend is probably good, I'm just unavailable 7th
through 21st.


OK then, the 1st could work for me too.



There is a 50% chance that the 1st won't work for me.

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] multiple log files

2009-01-27 Thread Ted Pederson
I am new to twisted. If I understand it correctly, the framework doesn't
support multiple log files. I can still use python's logging, but will there
be problems with blocking?
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] multiple log files

2009-01-27 Thread Jean-Paul Calderone

On Tue, 27 Jan 2009 15:05:46 -0800, Ted Pederson  wrote:

I am new to twisted. If I understand it correctly, the framework doesn't
support multiple log files.


You can implement any logging policy you want.  See the logging documentation
()
for details on how.

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Beginner's question about names and callbacks

2009-01-27 Thread Adan Broderick
Fantastic, that is exactly what I was looking for.  Thank you very much for
helping me.


On Mon, Jan 26, 2009 at 1:46 AM, Tim Allen  wrote:

> On Mon, Jan 26, 2009 at 01:06:37AM -0500, Adan Broderick wrote:
> > I'm trying to write a program that will call my own function whenever a
> > query to a nameserver times out. I have figured out how to run the DNS
> > server. And I also know how to use filterAnswers(). But how do I catch
> the
> > "Failure: twisted.names.error.DNSQueryTimeoutError:" messages by adding
> code
> > to the resolver I've constructed?
>
> I'm not familiar with twisted.names, but looking at the source to
> client.Resolver, it seems that something winds up calling _lookup() with
> a timeout, which passes it off to the queryUDP() and sets up the basic
> result handling. If queryUDP() returns a result, it goes to filterAnswers,
> which checks for truncation and re-sends with queryTCP().
>
> Since the actual deferreds that deal with the timeouts are returned from
> queryUDP() and queryTCP(), it looks like you should be overriding those
> methods and capturing the results instead. Something like this:
>
> class MyResolver(client.Resolver):
>
>def _handle_query_timeout(self, fail):
>fail.trap(DNSQueryTimeoutError)
>print "Got an error:", fail.getErrorMessage()
>
>def queryUDP(self, *args, **kwargs):
>d = client.Resolver.queryUDP(self, *args, **kwargs)
>d.addErrback(self._handle_query_timeout)
>return d
>
>def queryTCP(self, *args, **kwargs):
>d = client.Resolver.queryTCP(self, *args, **kwargs)
>d.addErrback(self._handle_query_timeout)
>return d
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Getting involved in Python 3.0 porting

2009-01-27 Thread Jean-Paul Calderone

On Tue, 27 Jan 2009 19:08:15 -, gl...@divmod.com wrote:


On 05:12 pm, ceron...@gmail.com wrote:

This year I'm going to start my graduation project for software
engineering and I want to use Python and Twisted. I want to use Python
3.0 but unfortunately, Twisted doesn't support 3.0 yet and I've read
that this is not exactly a high priority right now. As this is an open
source project, I thought the best thing I can do is to contribute
with the porting. Then I have some questions:


Thanks!  We can always use help, and the 3.0 port is a major project which 
we currently have no manpower for, so we can especially use help for that.

Is someone leading the porting process?


You, now :).

Have you defined a porting strategy?


Yes.  It's outlined here:

http://stackoverflow.com/questions/172306/how-are-you-planning-on- handling- 
the-migration-to-python-3#214601

What is the best way in which I can contribute to this?


Twisted's test suite currently emits a _lot_ of warnings.  In order to do a 
python 3 port, we'll need to be getting zero warnings on python 2.6 with the 
-3 switch.  If we are even going to be able to _see_ those warnings, we need 
to get down to zero warnings and adopt a zero- tolerance policy on new 
warnings being added.


So the first thing you should do is find, file, and fix as many tickets as 
you can related to warnings in tests; warnings from Twisted itself, warnings 
from the stdlib, warnings from dependencies.


To expand on this, you can find the warnings which are currently emitted from
the Twisted test suite by looking at one of the build result pages on our
buildbot.  Our buildbot's website is at .
Warnings have a special page, linked from each build result page.  For
example, 
.

There is also a builder which runs using the -3 warning option: 
.


And another which runs against Python 3.0: 
.

The general Twisted development process is described on the Divmod wiki:
.

You can find more information on 
.

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Getting involved in Python 3.0 porting

2009-01-27 Thread Michael Pyle
On Tue, Jan 27, 2009 at 5:40 PM, Jean-Paul Calderone wrote:

> On Tue, 27 Jan 2009 19:08:15 -, gl...@divmod.com wrote:
>
>>
>> On 05:12 pm, ceron...@gmail.com wrote:
>>
>>> This year I'm going to start my graduation project for software
>>> engineering and I want to use Python and Twisted. I want to use Python
>>> 3.0 but unfortunately, Twisted doesn't support 3.0 yet and I've read
>>> that this is not exactly a high priority right now. As this is an open
>>> source project, I thought the best thing I can do is to contribute
>>> with the porting. Then I have some questions:
>>>
>>
>> Thanks!  We can always use help, and the 3.0 port is a major project which
>> we currently have no manpower for, so we can especially use help for that.
>>
>>> Is someone leading the porting process?
>>>
>>
>> You, now :).
>>
>>> Have you defined a porting strategy?
>>>
>>
>> Yes.  It's outlined here:
>>
>> http://stackoverflow.com/questions/172306/how-are-you-planning-on-handling- 
>> the-migration-to-python-3#214601
>>
>>> What is the best way in which I can contribute to this?
>>>
>>
>> Twisted's test suite currently emits a _lot_ of warnings.  In order to do
>> a python 3 port, we'll need to be getting zero warnings on python 2.6 with
>> the -3 switch.  If we are even going to be able to _see_ those warnings, we
>> need to get down to zero warnings and adopt a zero- tolerance policy on new
>> warnings being added.
>>
>> So the first thing you should do is find, file, and fix as many tickets as
>> you can related to warnings in tests; warnings from Twisted itself, warnings
>> from the stdlib, warnings from dependencies.
>>
>
Is there a way you prefer to see the tickets entered? Looking at the
buildbot log for build 45 it seems like there's a few different ways to
slice and dice things depending on how granular you want the tickets. You
could do it by "fix deprecated calls" or narrow it down to "fix
DeprecationWarning for xxx" or break it up by module or even on a file by
file or call by call basis (granted the latter seems like overkill for a
porting effort).

--mike
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Getting involved in Python 3.0 porting

2009-01-27 Thread Jean-Paul Calderone

On Tue, 27 Jan 2009 18:37:39 -0800, Michael Pyle  
wrote:

On Tue, 27 Jan 2009 19:08:15 -, gl...@divmod.com wrote:

[snip]

So the first thing you should do is find, file, and fix as many tickets as
you can related to warnings in tests; warnings from Twisted itself, warnings
from the stdlib, warnings from dependencies.




Is there a way you prefer to see the tickets entered? Looking at the
buildbot log for build 45 it seems like there's a few different ways to
slice and dice things depending on how granular you want the tickets. You
could do it by "fix deprecated calls" or narrow it down to "fix
DeprecationWarning for xxx" or break it up by module or even on a file by
file or call by call basis (granted the latter seems like overkill for a
porting effort).



You'll find some tickets already exist in the tracker.  For example,

 http://twistedmatrix.com/trac/ticket/3493
 http://twistedmatrix.com/trac/ticket/3431
 http://twistedmatrix.com/trac/ticket/3424
 http://twistedmatrix.com/trac/ticket/3231
 http://twistedmatrix.com/trac/ticket/3153

For other issues, I would lean towards filing a ticket per test_*.py file.
However, this is just a general rule of thumb.  You may find it easy to fix
several test_*.py files at once with one set of changes, or you may find
that the fixes for one set of deprecations from a single test file are
totally unrelated to another set of fixes for other deprecations (cases in
which I would file just one ticket or multiple tickets, respectively).  So
feel free to exercise your own judgment.  We won't bite your head off if
we disagree with your decision, but we might ask you to split one patch
into two or more pieces.

One thing that's probably worth watching out for is that there are a couple
large, old Conch branches outstanding.  Changes to Conch's test suite may
conflict with these branches.  I wouldn't let this stop you from fixing
things in Conch, but it would probably be best to try to coordinate with
Paul Swartz before digging in too deeply.

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python