diff options
author | da-woods <dw-git@d-woods.co.uk> | 2022-10-11 08:24:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 08:24:01 +0100 |
commit | 877167351d2b1da993ea14ec4001406850ba7371 (patch) | |
tree | e52230f98395e26b8b40f915e3203ecc3558fd9d | |
parent | bcafbfb19093da9068dc854c2df3897f72902770 (diff) | |
download | cython-877167351d2b1da993ea14ec4001406850ba7371.tar.gz |
[0.29] deprecation warning for "from x cimport class A" syntax (#4905)
Unused/rarely used syntax which we plan to remove in Cython 3.
See https://github.com/cython/cython/pull/4904
-rw-r--r-- | Cython/Compiler/Parsing.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 2aafcb99a..1f20b4c95 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -1795,6 +1795,8 @@ def p_imported_name(s, is_cimport): kind = None if is_cimport and s.systring in imported_name_kinds: kind = s.systring + warning(pos, 'the "from module cimport %s name" syntax is deprecated and ' + 'will be removed in Cython 3.0' % kind, 2) s.next() name = p_ident(s) as_name = p_as_name(s) |