[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-18 Thread STINNER Victor

STINNER Victor  added the comment:

I tested "./python -m test -uall -M4G test_imp test_cgitb" on 3.6 and the 
master branch. Both tests now pass correctly. I close the issue.

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

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-17 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 178148025494c4058571831fb11fc8eeff8b7365 by Mariatta (Miss 
Islington (bot)) in branch '3.6':
bpo-31676: Fix test_imp.test_load_source() side effect (GH-3871) (GH-3988)
https://github.com/python/cpython/commit/178148025494c4058571831fb11fc8eeff8b7365


--
nosy: +Mariatta

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-13 Thread STINNER Victor

Change by STINNER Victor :


--
versions: +Python 3.6

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-13 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3964

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-13 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset a505ecdc5013cd8f930aacc1ec4fb2afa62d3853 by Victor Stinner in 
branch 'master':
bpo-31676: Fix test_imp.test_load_source() side effect (#3871)
https://github.com/python/cpython/commit/a505ecdc5013cd8f930aacc1ec4fb2afa62d3853


--

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-04 Thread Brett Cannon

Brett Cannon  added the comment:

The whole imp module is deprecated so I'm personally not bothered by 
imp.load_source() not being strengthened to be more sane.

--

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-03 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +3849
stage:  -> patch review

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Attached PR 3871 fixes the side effect in test_imp, but I'm not sure that it's 
the best fix. Maybe load_source() should use a "transaction" to restore 
attributes on failure?

load_source() seems to be used imp.reload() for example. Do you expect this 
function to restore the imported module to its original state on failure?

--

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-03 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +brett.cannon, eric.snow, ncoghlan
title: Strange failure in test_cgitb -> 
test.test_imp.ImportTests.test_load_source has side effects
versions: +Python 3.7

___
Python tracker 

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