[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2018-03-22 Thread Nick Coghlan
Nick Coghlan added the comment: Heh, apparently I forgot how IMPORT_FROM currently works some time between 2015 and 2017 :) I agree this is out of date now, as the requested behaviour was already implemented for 3.7 -- resolution: -> out of date stage: ->

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2018-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is anything left to do with this issue after issue30024? -- ___ Python tracker ___

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2017-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nick's suggestion was implemented in issue30024. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-10 Thread Nick Coghlan
Nick Coghlan added the comment: I'm suggesting we change this part of the bytecode emitted for import x.y.z as bar: 6 IMPORT_NAME 0 (x.y.z) 9 LOAD_ATTR1 (y) 12 LOAD_ATTR2 (z) 15 STORE_NAME

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-10 Thread Brett Cannon
Brett Cannon added the comment: That seems reasonable. I guess first step is a patch and then seeing if it passes the test suite. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23203 ___

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23203 ___

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-09 Thread Brett Cannon
Brett Cannon added the comment: I think I would need to see exactly how you want the bytecode to change and then think over any backwards-compatibility issues since this is doesn't come up very often. -- ___ Python tracker rep...@bugs.python.org

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-09 Thread Nick Coghlan
Nick Coghlan added the comment: You can see the difference between the two cases in the bytecode: dis.dis(import x.y.z) 1 0 LOAD_CONST 0 (0) 3 LOAD_CONST 1 (None) 6 IMPORT_NAME 0 (x.y.z) 9 STORE_NAME

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +brett.cannon, eric.snow, ezio.melotti, ncoghlan type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23203 ___

[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

2015-01-08 Thread Franck Michea
New submission from Franck Michea: Hi, for those of you that prefer to read an example, you can read that commented demonstration of the bug[1]. Today I discovered what I think is a bug in the import system. Here is the basic setup: We have three nested packages: foo - bar - baz. The bar