3 messages in org.python.python-bugs-list[ python-Bugs-903339 ] OpenVMS file s...
FromSent OnAttachments
SourceForge.netMar 29, 2004 3:53 pm 
SourceForge.netMar 29, 2004 5:04 pm 
SourceForge.netMar 29, 2004 6:04 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-903339 ] OpenVMS file system and UNIVERSAL_NEWLINES supportActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 29, 2004 3:53:00 pm
List:org.python.python-bugs-list

Bugs item #903339, was opened at 2004-02-24 11:20 Message generated for change (Comment added) made by pieronne You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=903339&group_id=5470

Category: None Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Pi?ronne Jean-Fran?ois (pieronne) Assigned to: Nobody/Anonymous (nobody) Summary: OpenVMS file system and UNIVERSAL_NEWLINES support

Initial Comment: I am one of the maintainer of Python on OpenVMS.

Building from time to time Python 2.4 from CVS snapshot, I have just noticed that all the conditional compilation against WITH_UNIVERSAL_NEWLINES has been removed.

This is a major problem on OpenVMS.

VMS has a complex file system which is mostly record oriented and not stream oriented (even if it support stream oriented files, this is not the default). For example it support the following record formats: fixed-length, variable-length, variable with fixed-length control, 3 stream format, etc... The default is variable-length.

So reading (opening) text file, for example during a import, in binary mode lead to incorrect results because there are no '\n' or any character (or combinaison of characters) at the end of the line. If the file is not open in binary mode the VMS CRTL automatically append a '\n' at the end of the record, so all work correctly. This not the case in binary mode, in this case the record is read as is, in fact you even get the control part of the record for some record format.

So, is it possible to maintain this test, even as undocumented or is it acceptable to transform it into a specific VMS test. But I suspect that other mainframe file systems will have the same problem.

Thanks for any help.

Regards,

Jean-Fran?ois

----------------------------------------------------------------------

Comment By: Pi?ronne Jean-Fran?ois (pieronne)

Date: 2004-03-29 22:53

Message: Logged In: YES user_id=414701

I have attach a patch for Include/fileobject.h Modules/bz2module.c Objects/fileobject.c

This patch use a new conditionnal compilation item: Py_USE_RECORD_IO

which need to be define only on systems which use RECORD oriented IO and not stream oriented IO

It also contain a small fix for OpenVMS.

Jean-Fran?ois

----------------------------------------------------------------------