[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r36821 - trunk/tools/dist

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Sat, 28 Mar 2009 14:47:28 -0500

Agreed. *Please* back out this revision for tools/dist

(Odds are that I'll have to hack it again at some point, and I'd
rather not have the Python 3 stuff cluttering the file when I do.)

-Hyrum

On Mar 28, 2009, at 12:12 PM, Greg Stein wrote:

> I thought we were going to avoid worrying about Python 3.0
> compatibility for the tools/dist/ scripts? ie. those only ever used by
> the RM (who, in this case, isn't using Python 3.0)
>
> Cheers,
> -g
>
> On Sat, Mar 28, 2009 at 16:21, Arfrever Frehtes Taifersar Arahesis
> <Arfrever.FTA_at_gmail.com> wrote:
>> Author: arfrever
>> Date: Sat Mar 28 08:21:55 2009
>> New Revision: 36821
>>
>> Log:
>> Python 3 compatibility:
>> Try to use http.cookiejar.* instead of cookielib.*.
>>
>> * tools/dist/post-to-tigris.py: Try to use http.cookiejar.* instead
>> of
>> cookielib.*.
>>
>> Modified:
>> trunk/tools/dist/post-to-tigris.py
>>
>> Modified: trunk/tools/dist/post-to-tigris.py
>> URL: http://svn.collab.net/viewvc/svn/trunk/tools/dist/post-to-tigris.py?pathrev=36821&r1=36820&r2=36821
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- trunk/tools/dist/post-to-tigris.py Sat Mar 28 08:19:42
>> 2009 (r36820)
>> +++ trunk/tools/dist/post-to-tigris.py Sat Mar 28 08:21:55
>> 2009 (r36821)
>> @@ -22,7 +22,13 @@ post-to-tigris.py <username> <password>
>> release - the full name of the release, such as 1.5.0-beta1
>> '''
>>
>> -import sys, cookielib, urllib2, urllib, re, socket
>> +import sys, urllib2, urllib, re, socket
>> +try:
>> + # Python >=3.0
>> + from http.cookiejar import CookieJar as http_cookiejar_CookieJar
>> +except ImportError:
>> + # Python <3.0
>> + from cookielib import CookieJar as http_cookiejar_CookieJar
>>
>> # Set the socket timeout so that we don't wait all day for
>> tigris.org to
>> # respond
>> @@ -32,7 +38,7 @@ socket.setdefaulttimeout(5)
>> def login(username, password, folderId):
>> '''Login to tigris.org, using the provided username and password.
>> Return the OpenDirector object for future use.'''
>> - cj = cookielib.CookieJar()
>> + cj = http_cookiejar_CookieJar()
>> opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
>>
>> folderURL = 'http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=
>> %d' % folderId,
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1457313
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1458540

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1460349
Received on 2009-03-28 20:47:55 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.