-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Resolve a few cyclic imports in categories/structure/misc #36580
Conversation
@mkoeppe the build on conda fails, but passes in the "Build & Test" workflow. In fact, there I don't see any recompilation of the cython files changed in this PR (e.g. category_singleton.pyx). Could you please have a look. Thanks |
@@ -0,0 +1 @@ | |||
import sage.structure.element # resolve a cyclic import (categories.map > structure.element > ... > categories.map) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot add an init file. sage.categories
is a PEP-420 namespace package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to hear your alternative solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be happy to walk you through #35095
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, maybe later, for now it would be enough if you tell me how you broke this particular cyclic import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the package seems to be shipped by only a single distribution
No, that's not true for sage.categories. How did you get this impression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which other distribution is shipping parts of categories?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are asking for info that you know how to obtain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find another one, that's why I am asking...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very strange that you should claim you didn't find another one.
It's public knowledge that you know at least 1 way how to look for them, namely by looking for files src/sage/categories/all_*.py
:
- In Restructure
sage.*.all
for modularization, replace relative by absolute imports #36676, one of the tickets that have been blocked for months by your abusive actions, you have declared that you don't like these files Restructuresage.*.all
for modularization, replace relative by absolute imports #36676 (review)
As explained - can't add |
I'm still waiting for an explanation from you on how to fix these cyclic imports without the init files (and why one cannot reintroduce init files). |
That's not the duty of the reviewer.
As both of us know, I explained it to you over in #36753 (comment): We need the namespace packages for the modularization -- which is why we removed the init files. |
Well you claimed to have a fix....
You didn't explain anything here or there.
Not true, all tests are passing perfectly fine here.
The records show that they were removed because "There is no technical need for any of the empty init.py files. You can remove them." (#35100 (comment)). Well, here is a technical need to reintroduce one of them. |
You are not reintroducing an empty |
Here not, but in #36753 I do. I also don't understand why it's important (for the modularization) whether the init file is empty or not. |
PEP-420 namespace packages do not have You may want to read the documentation. https://doc.sagemath.org/html/en/developer/packaging_sage_library.html |
I know that. But there is no universal law that tells us that we need to use namespace packages, right? You were emphasizing that empty init files are special. In which regard are they special? |
I didn't. |
Conflicts with the modularization work. |
Documentation preview for this PR (built with commit be73cc8; changes) is ready! 🎉 |
@kcrisman Responding to your suggestion in https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ/m/ciVrZ7x0AQAJ: I confirm my vote of -1 on this PR. This PR does not solve an important problem, and reintroducing
|
-1 from me |
I still cannot use a simple category import from the modularized distribution, but I guess there is no hope that this goes in soon.... |
Resolves the following cyclic imports:
📝 Checklist
⌛ Dependencies