[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-22 Thread STINNER Victor

STINNER Victor added the comment:

Brett: "Semantics are fine (I initially misread what you wanted to do; sorry)."

Ok, I pushed my change.

Brett: "And I wouldn't backport since it's an enhancement and not a bugfix."

Ok, fine.

--
resolution:  -> fixed
status: open -> closed
versions:  -Python 3.5

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c873a479a6a3 by Victor Stinner in branch 'default':
site: error on sitecustomize import error
https://hg.python.org/cpython/rev/c873a479a6a3

--
nosy: +python-dev

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-21 Thread STINNER Victor

STINNER Victor added the comment:

@Brett: Ping? I'm going to push the fix to Python 3.6.

Tell me if you are ok to backport the change to Python 2.7 and 3.5 too.

--

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-21 Thread Brett Cannon

Brett Cannon added the comment:

Semantics are fine (I initially misread what you wanted to do; sorry).

And I wouldn't backport since it's an enhancement and not a bugfix.

--

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-21 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> haypo

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor

New submission from STINNER Victor:

If the code of sitecustomize raises an ImportError because the requested module 
doesn't exist, sitecustomize exception is silently ignored because site.py uses 
"try: import sitecustomize except ImportError: pass".

It's possible to log a warning since ImportError now has a name attribute since 
Python 3.3.

There is a similar issue on usercustomize.

Attached patch fixes the issue.

--
files: site.patch
keywords: patch
messages: 258144
nosy: haypo
priority: normal
severity: normal
status: open
title: site ignores ImportError when running sitecustomize and usercustomize
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41603/site.patch

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread Brett Cannon

Brett Cannon added the comment:

This is a change in semantics. It might be better to log an ImportWarning when 
the import fails and keep the current semantics (and be careful about importing 
warnings).

--

___
Python tracker 

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