-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
CLN: generate groupby method wrapper code #16959
Comments
not sure this is a big deal. this is just a way to code generate. |
For the In the case of |
yeah what we usually do is to generate code (for cython) using tempita. We actually could do that here, its cleaner and more pythonic. (see the pxi.in -> pxi files). |
@jbrockmendel : Could you explain why deprecations are requiring you to go through this refactoring? |
The non-invasive part of the deprecation does not. What I was referring to was the suggestion that removing these methods entirely might fix the problem of the circular import:
Removing these methods from |
Got it. That makes sense. 👍 |
Digging into this a bit further...
The |
The usage in
compat
is forraise_with_traceback
where the py2 version is a syntax error in py3. This is pretty straightforward to de-exec by putting the py2-specific code in a module that only gets imported in py2.The usage in
core.groupby
is tougher. The string being exec'ed defines a method in some cases and property in others. The property version I think I've got a working fix, but the method version has me stumped.These
_def_str
s are constructed incore.groupby._whitelist_method_generator
:The text was updated successfully, but these errors were encountered: