[issue30518] Import type aliases from another module
John Jackson added the comment: Thanks for your response! Yes, the problem was a circular definition. I still have much to learn about Python... -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue30518> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30518] Import type aliases from another module
John Jackson added the comment: I just found out that the problem is even worse. While PyCharm accepts the syntax below, I still can't compile 'Blocks'. -- ___ Python tracker <http://bugs.python.org/issue30518> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30518] Import type aliases from another module
New submission from John Jackson: I have a 'base' module where I define some type aliases, such as: from typing import List, Tuple Block = [int, Tuple[int]] Blocks = List[Block] Tags = List[str] I would like to import these aliases into other modules so that the 'base' module provides the definitive alias. Currently, if I attempt to import the type aliases using: from base_module import Tags, Blocks Pycharm shows no error, but when I attempt to execute the code I get the error: ImportError: cannot import name 'Tags' I see that there has been some discussion related to this in 2015, but I can't find any documentation saying that something like this has been implemented. -- components: Build messages: 294807 nosy: Paragape priority: normal severity: normal status: open title: Import type aliases from another module type: enhancement versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue30518> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2622] Import errors in email.message.py
John Jackson added the comment: Also occurs in 2.6... -- versions: +Python 2.6 ___ Python tracker <http://bugs.python.org/issue2622> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2622] Import errors in email.message.py
John Jackson <[EMAIL PROTECTED]> added the comment: Attached is a sample code that reproduces the problem under python 2.5 on Mac OS 10.4.11. See file for instructions on how to reproduce the issue. Added file: http://bugs.python.org/file10030/test_mailbox.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2622> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2622] Import errors in email.message.py
John Jackson <[EMAIL PROTECTED]> added the comment: I'll put one together. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2622> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2622] Import errors in email.message.py
John Jackson <[EMAIL PROTECTED]> added the comment: Yes. If the code is used to build a standalone application with py2app on the Mac, here's the end of the stack trace: File "controller.pyo", line 17, in File "readMail.pyo", line 15, in File "mailbox.pyo", line 1294, in File "email/__init__.pyo", line 79, in __getattr__ File "email/message.pyo", line 86, in File "email/message.pyo", line 784, in Message File "email/__init__.pyo", line 79, in __getattr__ ImportError: No module named iterators __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2622> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2622] Import errors in email.message.py
New submission from John Jackson <[EMAIL PROTECTED]>: In email.message.py there are two import errors: line 128 from email.Generator import Generator should be from email.generator import Generator line 784 from email.Iterators import walk should be from email.iterators import walk -- components: Library (Lib) messages: 65391 nosy: JohnJackson severity: normal status: open title: Import errors in email.message.py type: crash versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2622> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com