[ python-Bugs-903339 ] OpenVMS file system and UNIVERSAL_NEWLINES support

SourceForge.net noreply at sourceforge.net
Mon Mar 29 15:53:18 EST 2004


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

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=903339&group_id=5470



More information about the Python-bugs-list mailing list