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

Remove deprecated sympy.printing.ccode, sympy.printing.fcode, and sympy.printing.cxxcode modules #20256

Open
asmeurer opened this issue Oct 13, 2020 · 0 comments
Labels
Deprecation Removal Tracks the removal of a deprecated feature. See github.com/sympy/sympy/wiki/Deprecating-policy printing

Comments

@asmeurer
Copy link
Member

The submodules sympy.printing.ccode, sympy.printing.fcode, and sympy.printing.cxxcode were renamed to sympy.printing.c, sympy.printing.fortran, and sympy.printing.cxx, respectively. These modules were renamed because they conflict with the corresponding function names. This causes issues because from sympy.printing import ccode can give the function or the module, depending on whether the ccode submodule has been imported yet or not. See #20234 (comment) for a technical discussion on why this happens.

The old module names were kept intact because some public names in them are only accessible from the submodule, such as the C99CodePrinter class. Code that uses these should rename any imports using sympy.printing.ccode to sympy.printing.c, and so on.

This deprecation was added in SymPy 1.7.

See #20250, #20234, and #19908.

@asmeurer asmeurer added the Deprecation Removal Tracks the removal of a deprecated feature. See github.com/sympy/sympy/wiki/Deprecating-policy label Oct 13, 2020
asmeurer added a commit to asmeurer/sympy that referenced this issue Oct 13, 2020
oscarbenjamin pushed a commit to oscarbenjamin/sympy that referenced this issue Oct 17, 2020
julesghub added a commit to underworldcode/underworld3 that referenced this issue Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation Removal Tracks the removal of a deprecated feature. See github.com/sympy/sympy/wiki/Deprecating-policy printing
Projects
None yet
Development

No branches or pull requests

2 participants