Opened 15 years ago
Closed 15 years ago
#8591 closed defect (fixed)
Can not disable components with EnvironmentStub
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | general | Version: | 0.11-stable |
Severity: | normal | Keywords: | testing |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The current implementation of EnvironmentStub uses its own implementation of is_component_enabled(). This simplified implementation does not allow disabling components.
Instead of creating another - broken - implementation, it is much easier (and reduces the overall code size) to fix the EnvironmentStub so that it can uses the real implementation in Environment.
Attachments (3)
Change History (8)
comment:1 by , 15 years ago
Milestone: | → 0.12 |
---|
by , 15 years ago
Attachment: | use_real_is_enabled_function added |
---|
by , 15 years ago
Attachment: | use_real_is_enabled_function_v2 added |
---|
improved version which deals with some test failures
comment:2 by , 15 years ago
Milestone: | 0.12 → 0.11.6 |
---|---|
Owner: | set to |
Severity: | major → normal |
Please also fix the tests which use the old way to enable components:
- source:tags/trac-0.11.5/trac/mimeview/tests/patch.py@#L35
- source:tags/trac-0.11.5/trac/mimeview/tests/pygments.py@#L41
They are currently failing with the patch applied.
The following two also fail, certainly for similar reasons:
test_all_permissions (trac.tests.perm.PermissionSystemTestCase)
test_expand_actions_iter_7467 (trac.tests.perm.PermissionSystemTestCase)
follow-up: 4 comment:3 by , 15 years ago
Sorry, missed the second patch: that one passes all the tests for me. Is there still some other issues on your side, or is it good to go?
Also, I think normalize_configuration_key
shouldn't be "public", maybe rename it to _normalize_configuration_key
, or better, simply _component_name
.
by , 15 years ago
Attachment: | use_real_is_enabled_function_v3 added |
---|
updated version which fixes problems for external plugins
follow-up: 5 comment:4 by , 15 years ago
Replying to cboos:
Sorry, missed the second patch: that one passes all the tests for me. Is there still some other issues on your side, or is it good to go?
Also, I think
normalize_configuration_key
shouldn't be "public", maybe rename it to_normalize_configuration_key
, or better, simply_component_name
.
Somehow I missed the email of your comment, strage.
After all I found some problems in my second patch (only turning up for external plugins). From my side, there is not a real need anymore to put this in 0.11 so I'm happy also with milestone 0.12.
I renamed the function as you proposed, all tests are passing for me now :-)
comment:5 by , 15 years ago
Keywords: | testing added |
---|---|
Milestone: | 0.11.6 → 0.12 |
Resolution: | → fixed |
Status: | new → closed |
Replying to Felix Schwarz <felix.schwarz@…>:
Somehow I missed the email of your comment, strage.
Well, I've also noticed that I didn't receive most of the notifications e-mails I should have received, since a week or so. It must be a problem with Postfix on lynx.edgewall.com. I'll inform Jonas about this.
After all I found some problems in my second patch (only turning up for external plugins). From my side, there is not a real need anymore to put this in 0.11 so I'm happy also with milestone 0.12.
Thanks for the patch, slightly edited (fit in 79 columns, remove prints) and committed as r8535.
Patch welcomed.