-
Notifications
You must be signed in to change notification settings - Fork 127
Chore: Create plugin does not expect system settings #5553
Chore: Create plugin does not expect system settings #5553
Conversation
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.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
Unfortunately I did end up using Correction: These are not actually creator plug-ins - but they are publishing plug-ins. Does this PR affect those too? Looking at the changed files it doesn't but I'm assuming a PR for that might be incoming too? So it'd be good to maybe figure out how to solve the issue I describe below for both cases. Any good ideas on how I could still optimally retrieve our globally define deadline URL - since the project settings URL just picks one by name from the Module Settings? The only thing I can think of is that if in the Also, since this is a backwards incompatible change for external code bases (e.g. anyone having a custom new style creator using |
No.
Publish plugins already have changed code to allow expect only project settings, but it is "less radical" there, because system settings are still used, which won't change until full AYON release.
I would rather change it to be more backwards compatible than wait for next-minor, last next-minor took more than 6 months. EDITED: But I don't think it would break anything. System settings does not contain much relevant information for create plugins. |
For Create plug-ins I'm personally fine with removing it - I'd just need to sync up potential custom creators but if it's clear WHEN I should be doing that then I'm totally fine with it. It's a trivial change. Plus it moves the cleanup to now instead of pushing it into future for forever. |
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.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
Added backwards compatibility, System settings are still passed to Create plugin. A warning message is logged if |
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.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
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.
Nuke and TrayPublisher tested and worked normally
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.
Creators in Maya, Houdini, 3dsmax and Blender works
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.
Tested in PS, AE, works.
init_overriden = self.__class__.__init__ is not BaseCreator.__init__ | ||
if init_overriden or expect_system_settings: |
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.
Changelog Description
System settings are not passed to initialization of create plugin initialization (and
apply_settings
).Additional info
Reasons: The system settings are not used anywhere, and since AYON there won't be 2 types of settings.
We need validation of all Create plugins: They should not use
system_settings
inapply_settings
method and they should not override__init__
method.To make this PR safer the system settings can still be passed to creator initialization, but eventually it will be removed in future PR anyway, so it would be just temporary backwards compatibility.
This PR must be updated with latest develop and revalidated changes before merge.
Testing notes: