Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn.undeclared compiler directive is broken #2685

Closed
nicopauss opened this issue Oct 27, 2018 · 0 comments
Closed

warn.undeclared compiler directive is broken #2685

nicopauss opened this issue Oct 27, 2018 · 0 comments
Milestone

Comments

@nicopauss
Copy link
Contributor

Using warn.undeclared with a simple empty extension type generates some warnings:

#cython: language_level=3, warn.undeclared=True

cdef class Foo:
    pass
$ cython -Werror cython_test_undeclared.pyx

Error compiling Cython file:
------------------------------------------------------------
...
def __pyx_unpickle_Foo(__pyx_type, long __pyx_checksum, __pyx_state):
    if __pyx_checksum != 0xd41d8cd:
        from pickle import PickleError as __pyx_PickleError
                          ^
------------------------------------------------------------

(tree fragment):3:27: implicit declaration of '__pyx_PickleError'

Error compiling Cython file:
------------------------------------------------------------
...
def __pyx_unpickle_Foo(__pyx_type, long __pyx_checksum, __pyx_state):
    if __pyx_checksum != 0xd41d8cd:
        from pickle import PickleError as __pyx_PickleError
        raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
    __pyx_result = Foo.__new__(__pyx_type)
   ^
------------------------------------------------------------

(tree fragment):5:4: implicit declaration of '__pyx_result'

Error compiling Cython file:
------------------------------------------------------------
...
def __reduce_cython__(self):
    cdef bint use_setstate
    state = ()
   ^
------------------------------------------------------------

(tree fragment):3:4: implicit declaration of 'state'

Error compiling Cython file:
------------------------------------------------------------
...
def __reduce_cython__(self):
    cdef bint use_setstate
    state = ()
    _dict = getattr(self, '__dict__', None)
   ^
------------------------------------------------------------

(tree fragment):4:4: implicit declaration of '_dict'
scoder added a commit that referenced this issue Oct 30, 2018
@scoder scoder added this to the 0.29.1 milestone Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants