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

Fix deprecated import of instancedoc #34324

Closed
mkoeppe opened this issue Aug 9, 2022 · 9 comments
Closed

Fix deprecated import of instancedoc #34324

mkoeppe opened this issue Aug 9, 2022 · 9 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 9, 2022

(from #30787 comment:109)

CC: @kwankyu @tscrim

Component: refactoring

Author: Kwankyu Lee

Branch/Commit: dc2e766

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/34324

@mkoeppe mkoeppe added this to the sage-9.7 milestone Aug 9, 2022
@kwankyu
Copy link
Collaborator

kwankyu commented Aug 10, 2022

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 10, 2022

Commit: dc2e766

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 10, 2022

Author: Kwankyu Lee

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 10, 2022

New commits:

dc2e766Replace lazy_import with normal import

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 10, 2022

comment:3

The problem was that in the namespace of sage.docs.instancedoc, there was no name instancedoc since it was to be created when first used (as it was lazy_import-ed) and not used yet.

My branch just provides an easy solution.

I changed the file to a python file too. When I did this, the old cython .so file was not removed automatically. So sage kept loading the module from the old cython file, and spitting errors. I manually deleted the old files ('.so' and '.c' files). Perhaps this is a pitfall of the editable install?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 10, 2022

comment:4

Replying to @kwankyu:

I changed the file to a python file too. When I did this, the old cython .so file was not removed automatically. So sage kept loading the module from the old cython file, and spitting errors. I manually deleted the old files ('.so' and '.c' files). Perhaps this is a pitfall of the editable install?

Yes, looks like an interesting failure mode. In the non-editable build, this is taken care of by the "install cleaner". To do so in the editable build is an item in #31406 already

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 10, 2022

Reviewer: Matthias Koeppe

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 11, 2022

comment:6

Replying to @mkoeppe:

Replying to @kwankyu:
In the non-editable build, this is taken care of by the "install cleaner". To do so in the editable build is an item in #31406 already

I see. I am getting used to the editable build. It is nice to see the C file beside a Cython file.

Thank you.

@vbraun
Copy link
Member

vbraun commented Aug 29, 2022

Changed branch from u/klee/fix_deprecated_import_of_instancedoc to dc2e766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants