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

Re: [PROPOSAL] Using binary mode in Python open() calls

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-04-17 20:46:20 CEST

On 4/14/06, Paul Burba <paulb@softlanding.com> wrote:
> Hi All,
>
> A long time back I hacked up the Python test scripts to test the
> Subversion OS400/EBCDIC port. At first all I did was tweak the scripts
> running on Windows to actually test a remote AS400 server. Later, once we
> ported the client to pre-V5R4 OS400, I ported the scripts themselves.*
>
> Unfortunately what I've done so far is, I admit, fairly ugly and isn't
> suitable for trunk. It's also a lot of work to keep up with as the tests
> change.
>
> So I'm taking a new look at this and applying lessons learned in the hope
> I can make some changes to the scripts that are relatively unobtrusive,
> won't affect other platforms, and will make our lives testing the OS400
> port easier.
>
> The first category of "fixes" I'd like to present for consideration are
> the truly "general" in nature, i.e. no OS400 dependent script code. And
> the first of these relates to the built-in Python function open(). For
> those of you who remember the CCSID mess with apr_file_open() the
> situation is not all that different: files on the OS400 are tagged with
> CCSIDs representing the file's encoding and reading/writing/creating test
> to these files presents a host of problems when the file is not opened in
> binary mode. All of these problems are easily avoided by using the 'b'
> mode with open().
>
> So my question is: If all open() calls in the test scripts were done in
> binary mode would this have any adverse effect on other platforms?
>
> I've already tried this on XP and the tests run normally. I've looked at
> the scripts and don't see any potential problems (yet). If any Python
> experts would like to weigh in on this I'd appreciate it.

I'm hardly a python expert, but it doesn't seem likely to be a problem
as far as I can tell... I'd recommend trying on windows and unix and
seeing what happens.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 17 20:46:54 2006

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.