[issue2091] file accepts 'rU+' as a mode

2019-04-27 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset f5972cc0c9a8e3315207e2d67534f330d619af4e by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-2091: Fix typo in exception message (GH-12987)
https://github.com/python/cpython/commit/f5972cc0c9a8e3315207e2d67534f330d619af4e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2019-04-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12911

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2019-04-27 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 21a9ba1992775b5a833da28bfa0a9f028d1b6761 by Berker Peksag in 
branch 'master':
bpo-2091: Fix typo in exception message (GH-12987)
https://github.com/python/cpython/commit/21a9ba1992775b5a833da28bfa0a9f028d1b6761


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2019-04-27 Thread Berker Peksag


Change by Berker Peksag :


--
pull_requests: +12910

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1a5bbb31f740 by Robert Collins in branch 'default':
- Issue #2091: error correctly on open() with mode 'U' and '+'
https://hg.python.org/cpython/rev/1a5bbb31f740

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Robert Collins

Changes by Robert Collins robe...@robertcollins.net:


--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Robert Collins

Robert Collins added the comment:

@larry thanks - that was my inclination too. Applied to 3.6

@Serhiy I've not done a warning in 3.4/3.5 because - the behaviour is already 
broken, this patch just catches it a lot earlier (on open rather than 
subsequent operations).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps the 'U' mode should just raise an exception in 3.6.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-25 Thread Larry Hastings

Larry Hastings added the comment:

Yeah, considering how long this bug has been sitting around, I think we can 
wait for one more release for the fix.  3.6 please.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-23 Thread Robert Collins

Robert Collins added the comment:

@Larry - should this go in 3.5, or would you rather it not?

--
nosy: +larry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I would add a warning in 3.4- (or 3.5-). The 'U' mode should not work
with '+', and it can't work with '+' correctly. This is a bug that we can 
decide not fix by raising an exception.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-23 Thread R. David Murray

R. David Murray added the comment:

I agree, a change that emits an error where none was emitted before should only 
go in the next release.  With a what's new entry.

It is possible there should be a deprecation or -3 warning in 2.7, but I'm not 
sure it is worth the effort.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2015-07-22 Thread Robert Collins

Robert Collins added the comment:

Updated patch. I'm not going to apply right now - giving it a little time to 
let folk chime on whether this should be applied all the way back to 3.4, or 
not.

My inclination is to only apply it to 3.6.

--
nosy: +rbcollins
Added file: http://bugs.python.org/file39980/issue2091-3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2014-07-23 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2014-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In Python 3.4+ 'U' already emits deprecation warning.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2014-07-17 Thread Francis MB

Francis MB added the comment:

 On the other hand, the documentation *does* mention that
 'U' is for backwards compatibility and shouldn't be used
 with new code.

Shouldn't be some deprecation warning somewhere?

--
nosy: +francismb

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2012-10-05 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
versions: +Python 3.3, Python 3.4 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2011-07-23 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
nosy:  -eli.bendersky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2011-05-31 Thread John O'Connor

John O'Connor tehj...@gmail.com added the comment:

It seems to me that adding the proper check is a good idea. It also may not be 
obvious to some that 'U' is now more or less an alias for 'r'. I have updated 
the patch so that it at least applies.

I also removed a redundant `reading = 1`

--
nosy: +jcon
Added file: http://bugs.python.org/file22217/issue2091-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2011-05-21 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
nosy: +eli.bendersky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2011-05-21 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

In Python 3, the documentation no longer mentions that 'U' should not work with 
'+' (or 'w' or 'a', for that matter), and the code throws ValueError if 'U' is 
used with 'w' or 'a', but not '+'.

On the other hand, the documentation *does* mention that 'U' is for backwards 
compatibility and shouldn't be used with new code.

In light of this, how do you suggest to proceed with this issue?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2011-05-21 Thread Tres Seaver

Changes by Tres Seaver tsea...@agendaless.com:


--
nosy:  -tseaver

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2010-09-20 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

The patch is now way out of date to the extent that I can't find the code in 
fileobject.c, perhaps I'm just blind  Can someone please provide a new patch, 
thanks.

--
nosy: +BreamoreBoy
versions: +Python 3.1, Python 3.2 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2010-09-20 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Of course, the implementation is now in the io module:
Modules/_io/_iomodule.c *and* Lib/_pyio.py

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2010-05-04 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2010-05-02 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
keywords: +needs review
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2010-04-29 Thread Tres Seaver

Tres Seaver tsea...@agendaless.com added the comment:

I can confirm that:

- the patch applies cleanly to the release26-maint branch, with the
  exception of the Misc/NEWS portion::

  $ hg branch
  release26-maint
  $ ./python -E -tt Lib/test/regrtest.py test_file
  test_file
  1 test OK.
  $ patch -p0  /tmp/issue2091.diff 
  patching file Objects/fileobject.c
  Hunk #1 succeeded at 209 (offset 54 lines).
  Hunk #2 succeeded at 2269 (offset 194 lines).
  patching file Misc/NEWS
  Hunk #1 FAILED at 12.
  1 out of 1 hunk FAILED -- saving rejects to file Misc/NEWS.rej
  patching file Lib/test/test_file.py
  Hunk #1 succeeded at 176 (offset 55 lines).

- the added test fails before rebuilding Objects/fileobject.c::

  $ ./python -E -tt Lib/test/regrtest.py test_file
  test_file
  test test_file failed -- Traceback (most recent call last):
File /home/tseaver/projects/hg-repo/py-2.6/Lib/test/test_file.py, line 
181, in testModeStrings
  f = open(TESTFN, mode)
  IOError: [Errno 2] No such file or directory: '@test'
  
  1 test failed:
  test_file

- the added test passes after rebuilding Objects/fielobject.c::

  $ make
  gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o 
Objects/fileobject.o Objects/fileobject.c
  ...
  $ ./python -E -tt Lib/test/regrtest.py test_file
  test_file
  1 test OK.

--
nosy: +tseaver

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2010-04-29 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
versions: +Python 2.7 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2009-04-27 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
components: +IO
stage:  - patch review
versions: +Python 3.1 -Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2009-04-27 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
nosy: +benjamin.peterson, pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2008-03-17 Thread Jeff Balogh

Jeff Balogh [EMAIL PROTECTED] added the comment:

Attaching a patch that checks for '+' in the mode string, updates the 
docs, and tests bad mode strings.

--
keywords: +patch
nosy: +jbalogh
Added file: http://bugs.python.org/file9697/issue2091.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2091
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2091] file accepts 'rU+' as a mode

2008-02-12 Thread Brett Cannon

New submission from Brett Cannon:

The docs on file's constructor says that the 'U' mode should not work
with '+', and yet 'rU+' does not throw an error.

--
components: Interpreter Core
messages: 62343
nosy: brett.cannon
severity: normal
status: open
title: file accepts 'rU+' as a mode
type: behavior
versions: Python 2.5, Python 2.6

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2091
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com