[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a9ac801f9b4 by larry in branch '3.5': Merged in brettcannon/cpython350/3.5 (pull request #2) https://hg.python.org/cpython/rev/5a9ac801f9b4 -- ___ Python tracker rep...@bugs.python.org

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-14 Thread Brett Cannon
Brett Cannon added the comment: I have merged my 3.5.0 patch into 3.5 and default, so that should fix the issue Armin and CFFI was having. -- assignee: larry - brett.cannon resolution: - fixed stage: commit review - resolved status: open - closed

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf3a62a8d786 by Brett Cannon in branch '3.5': Issue #24492: make sure that ``from ... import ...` raises an https://hg.python.org/cpython/rev/cf3a62a8d786 New changeset bbe6b215df5d by Brett Cannon in branch '3.5': Merge from 3.5.0 for issue #24492

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-13 Thread Brett Cannon
Brett Cannon added the comment: I noticed you accepted the PR on Bitbucket, Larry. Should I consider your part done and I can now pull the commit into the 3.5 and default branches on hg.python.org? -- ___ Python tracker rep...@bugs.python.org

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-13 Thread Larry Hastings
Larry Hastings added the comment: Yep. This time I have foisted nearly all the work, including the forward-merging, onto y'all. *sits back, sips iced coffee* -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-11 Thread Brett Cannon
Brett Cannon added the comment: Created https://bitbucket.org/larry/cpython350/pull-requests/2/issue-24492-make-sure-that-from-import/diff without the PyUnicode_FromFormat() change as I realized that was conflating two changes in one patch and it wasn't even being tested (verified all tests

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Brett Cannon
Brett Cannon added the comment: Larry, does this warrant going into 3.5.0? -- assignee: brett.cannon - larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Larry Hastings
Larry Hastings added the comment: I would like the fix in 3.5. However, I'm not qualified to review the code. Can you get a qualified reviewer in to look over the code? Once someone suitable has reviewed it, I'll accept a pull request (pasted in here naturally). --

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- assignee: larry - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___ ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Armin Rigo
Armin Rigo added the comment: Patch LGTM too. Optionally a test is needed for each of the other cases in it too, but please don't cause that comment to stop it from getting in. -- ___ Python tracker rep...@bugs.python.org

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the reviews, Eric and Armin. I will get the patch in 3.5.0, 3.5.1, and 3.6 sometime this week and then open another issue for adding more tests for the other branches in the code. -- priority: deferred blocker - release blocker

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Eric Snow
Eric Snow added the comment: patch LGTM. Presumably the divergence between importlib (in _handle_fromlist) and import.c was strictly accidental (i.e. lack of test coverage). -- stage: patch review - commit review ___ Python tracker

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Larry Hastings
Larry Hastings added the comment: Yes, Eric and Armin are both qualified reviewers in my book. You have my blessing to send a pull request. Thanks, everybody! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-10 Thread Larry Hastings
Larry Hastings added the comment: My Bitbucket repo is now public. https://bitbucket.org/larry/cpython350 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-09 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - brett.cannon versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-09 Thread Brett Cannon
Brett Cannon added the comment: Here is a patch that adds a test, fixes the issue, and for good measure stops assuming that __name__ will always be a string. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file40154/issue24492.diff

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-07-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___ ___ Python-bugs-list

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-07-02 Thread Larry Hastings
Larry Hastings added the comment: This is a) marked as release blocker, and b) is assigned to nobody. This is not tenable. While I want this fixed, I'm not going to hold up beta 3 for it. -- priority: release blocker - deferred blocker ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I view having a string __name__ attribute as part of quacking like a module (or class or function). Hence pseudonames like 'lambda' (lambda expression) or pyshell#n (the module name for interactive input, where n is the line number). Is there a good reason

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-26 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___ ___ Python-bugs-list

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-24 Thread Armin Rigo
Armin Rigo added the comment: Also, if we want to be paranoid, the _PyObject_GetAttrId() can return anything, not necessarily a string object. This would make the following PyUnicode_FromFormat() fail. So maybe you also want to overwrite failures in PyUnicode_FromFormat() with the final

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-24 Thread Armin Rigo
Armin Rigo added the comment: I'd guess so: if the PyObject_GetAttrId() fails, then ignore the rest of the code that was added in https://hg.python.org/cpython/rev/fded07a2d616 and jump straight to ``PyErr_Format(PyExc_ImportError, ...)``. -- ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +brett.cannon, eric.snow, ethan.furman, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Armin Rigo
Changes by Armin Rigo ar...@users.sourceforge.net: Added file: http://bugs.python.org/file39791/test_case.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Armin Rigo
New submission from Armin Rigo: A regression in 3.5: if we use custom objects as modules (like some projects do), then these custom objects may not have an attribute called __name__. There is new code in 3.5 added for issue #17636 which tries sometimes to read the __name__ of a module when

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Larry Hastings
Larry Hastings added the comment: What's a sensible approach to ameliorate the problem? Gracefully muddle through without a __name__ on the imported object? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___