[ python-Bugs-967182 ] file("foo", "wU") is silently accepted

SourceForge.net noreply at sourceforge.net
Mon Jun 7 22:10:41 EDT 2004


Bugs item #967182, was opened at 2004-06-05 12:15
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=967182&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Skip Montanaro (montanaro)
Summary: file("foo", "wU") is silently accepted

Initial Comment:
PEP 278 says at opening a file with "wU" is illegal, yet
file("foo", "wU") passes without complaint.  There may
be other flags which the PEP disallows with "U" that need
to be checked.


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

>Comment By: Skip Montanaro (montanaro)
Date: 2004-06-07 21:10

Message:
Logged In: YES 
user_id=44345

Turned out not to be obvious at all (and not related to my
changes).  Here's another patch which is cleaner I think.

Would someone take a look at this?  My intent is to not
let invalid modes pass silently (as "wU" currently does).
Have I accounted for all the valid mode strings? It has
some semantic changes, so this is not a backport
candidate.

I'm not sure about how 't' is handled.  It's only of use on
Windows as I understand it, but I don't see it sucked out
of the mode string on non-Windows platforms, so it must
be silently accepted on Unix and Mac.  (Can someone
confirm this?)


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

Comment By: Skip Montanaro (montanaro)
Date: 2004-06-05 14:51

Message:
Logged In: YES 
user_id=44345

Here's a first cut patch - test suite fails though - must be 
something obvious...

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

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



More information about the Python-bugs-list mailing list