[issue16261] Fix bare excepts in various places in std lib

2015-05-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Resolved conflicts, fixed some noted issues in the patch and committed 
unquestionable changes. Thank you for your patch Ramchandra.

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

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



[issue16261] Fix bare excepts in various places in std lib

2015-05-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b3a7215b9ce4 by Serhiy Storchaka in branch 'default':
Issue #16261: Converted some bare except statements to except statements
https://hg.python.org/cpython/rev/b3a7215b9ce4

--

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



[issue16261] Fix bare excepts in various places in std lib

2015-05-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
stage: needs patch - patch review
versions: +Python 3.5 -Python 3.4

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



[issue16261] Fix bare excepts in various places in std lib

2015-05-19 Thread Martin Panter

Martin Panter added the comment:

I reviewed the patch on Reitveld. All of the changes that do not have comments 
look okay to me, although some will definitely have merge conflicts with the 
current code. If someone updated the patch based on the comments, I think it 
may be okay to commit.

--
nosy: +vadmium
stage:  - needs patch

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



[issue16261] Fix bare excepts in various places in std lib

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

See more discussion on duplicate #21259.

--

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



[issue16261] Fix bare excepts in various places in std lib

2013-11-08 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue16261] Fix bare excepts in various places in std lib

2013-11-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The earlier #15313 is about removing bare excepts in Idle code. These should be 
handled separately for two reasons.
1. Changes can and in most cases should be backported.
2. As with any other Python-coded application, uncaught exceptions cause Idle 
to quit. Currently, if Idle is started directly, rather than from a console, 
such an exit looks like a silent crash. So either the added tuple of exceptions 
to be caught must be complete, or the calling code must be adjusted.

I copied the one idlelib fix (to PyShell.py) to that issue for separate 
examination. It should be removed from any patch applied here.

--
nosy: +terry.reedy

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



[issue16261] Fix bare excepts in various places in std lib

2013-11-07 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue16261] Fix bare excepts in various places in std lib

2013-01-09 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Here's a patch on revision 75fe7f5fda9a (I did it on a trip without an internet 
connection)
There might be some mistakes of this type:
I incorrectly changed instances like this
`
try:
something
except:
close file
raise
`
to
`
try:
something
finally:
close file
`
(the incorrect version closes the file always)

--

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



[issue16261] Fix bare excepts in various places in std lib

2013-01-09 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Sorry, I entered the wrong filename for the patch and so it didn't get 
attached. Now I have attached it.

--
keywords: +patch
Added file: http://bugs.python.org/file28647/patch.patch

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



[issue16261] Fix bare excepts in various places in std lib

2013-01-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Unhappy Rietveld hasn't recognize your patch. I have regenerated it.

--
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file28648/bare_except.patch

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



[issue16261] Fix bare excepts in various places in std lib

2013-01-09 Thread Richard Oudkerk

Richard Oudkerk added the comment:

  try:
  _MAXFD = os.sysconf(SC_OPEN_MAX)
 -except:
 +except ValueError:
  _MAXFD = 256

os.sysconf() might raise OSError.  I think ValueError is only  raised if 
_SC_OPEN_MAX was undefined when the module was compiled.

--
nosy: +sbt

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



[issue16261] Fix bare excepts in various places in std lib

2013-01-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See my comments on Rietveld.

--

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



[issue16261] Fix bare excepts in various places in std lib

2013-01-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Want to make a few warnings. Accepting your confirmation may take a long time. 
And it is very unlikely that your patch can be applied as a whole. The 
maintainers of the individual modules can apply it by parts.

--

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



[issue16261] Fix bare excepts in various places in std lib

2012-11-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2bd62d1644f by Andrew Svetlov in branch 'default':
Issue #16261: fix bare excepts in Doc/
http://hg.python.org/cpython/rev/b2bd62d1644f

--
nosy: +python-dev

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



[issue16261] Fix bare excepts in various places in std lib

2012-11-02 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I've fixed bare except: in docs.
Tomorrow we will have Python sprint in Kiev.
Maybe somebody will take a look on Lib.

--

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



[issue16261] Fix bare excepts in various places in std lib

2012-11-01 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I'm pretty sure Doc and Lib are already fixed, only Tools left.

--
nosy: +asvetlov

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



[issue16261] Fix bare excepts in various places in std lib

2012-11-01 Thread Ramchandra Apte

Ramchandra Apte added the comment:

On 1 November 2012 17:21, Andrew Svetlov rep...@bugs.python.org wrote:


 Andrew Svetlov added the comment:

 I'm pretty sure Doc and Lib are already fixed, only Tools left.

 --
 nosy: +asvetlov

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16261
 ___


No. 405 are there in Lib. Try running `grep except: -R Lib --include
*.py` to see yourself.

--

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



[issue16261] Fix bare excepts in various places in std lib

2012-11-01 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Sorry, looks like I don't understood you correctly.
Do you want to replace `except:` to `except Exception` or something else?

--

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



[issue16261] Fix bare excepts in various places in std lib

2012-11-01 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Yes.
most of the bare excepts can be replaced with a stricter clause

On 2 November 2012 01:06, Andrew Svetlov rep...@bugs.python.org wrote:


 Andrew Svetlov added the comment:

 Sorry, looks like I don't understood you correctly.
 Do you want to replace `except:` to `except Exception` or something else?

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16261
 ___


--

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



[issue16261] Fix bare excepts in various places in std lib

2012-10-30 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
type:  - behavior

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



[issue16261] Fix bare excepts in various places in std lib

2012-10-30 Thread Ramchandra Apte

Ramchandra Apte added the comment:

This seems quite difficult for one person;there are 589 lines having except:
I'll work on the Tools directory.
If anybody wants to help, please tell which folder you will do.

--

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



[issue16261] Fix bare excepts in various places in std lib

2012-10-19 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo
versions: +Python 3.4

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



[issue16261] Fix bare excepts in various places in std lib

2012-10-17 Thread Ramchandra Apte

New submission from Ramchandra Apte:

Will attach patch.

--
components: Library (Lib)
messages: 173140
nosy: ramchandra.apte
priority: normal
severity: normal
status: open
title: Fix bare excepts in various places in std lib

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



[issue16261] Fix bare excepts in various places in std lib

2012-10-17 Thread Brett Cannon

Brett Cannon added the comment:

One thing to be aware of, Ramchandra, is that there might be a slight 
backwards-compatibility problem from tightening up what exceptions propagate. 
Now with proper documentation and only applying things to 3.4 this probably 
won't be a problem.

--
nosy: +brett.cannon

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