-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
[IMP] core, contributing: adapt to PEP420 native namespace #11914
Closed
+16
−12
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8a6f2c7
to
d8ee081
Compare
Feyensv
approved these changes
Jan 30, 2025
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.
LGTM
@robodoo delegate+
d8ee081
to
ae8a861
Compare
task-4035335
ae8a861
to
f4968ed
Compare
@robodoo r+ |
robodoo
pushed a commit
to odoo/odoo
that referenced
this pull request
Feb 7, 2025
Stop using deprecated `odoo.registry` method. Part-of: #195664 Related: odoo/documentation#11914 Signed-off-by: Raphael Collet <[email protected]>
robodoo
pushed a commit
to odoo/odoo
that referenced
this pull request
Feb 7, 2025
Check whether the timezone is patched when importing Odoo modules. Part-of: #195664 Related: odoo/documentation#11914 Signed-off-by: Raphael Collet <[email protected]>
robodoo
pushed a commit
to odoo/odoo
that referenced
this pull request
Feb 7, 2025
Scan `odoo` module as if it were a native namespace. Prepration for PEP420. Part-of: #195664 Related: odoo/documentation#11914 Signed-off-by: Raphael Collet <[email protected]>
robodoo
pushed a commit
to odoo/odoo
that referenced
this pull request
Feb 7, 2025
Native namespaces are modules that do not have an `__init__.py` file. Python will make a union of all folders in its PYTHONPATH (sys.path) and combine the modules found in these locations. Currenly, `odoo` uses legacy namespace packages and implements this in an imperative way. Using native namespaces allows for easier and more standard packaging without conflicting libraries. It also allows tools that do static analysis to find the files. We move the code in the `odoo/__init__.py` file to its own package `odoo.init` that is imported when the framework is starting. That package should be imported first inside the framework to make sure all monkeypatches are applied. task-4035335 https://peps.python.org/pep-0420/ closes #195664 Related: odoo/documentation#11914 Signed-off-by: Raphael Collet <[email protected]>
robodoo
pushed a commit
that referenced
this pull request
Feb 7, 2025
task-4035335 closes #11914 Related: odoo/odoo#195664 Signed-off-by: Krzysztof Magusiak (krma) <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
odoo/odoo#195664