Package: edx-toggles
Library and utilities for implementing and reporting on feature toggles.Documentation is onRead the Docs.  Code repository is onGitHub.See thescripts READMEfor more information on the scripts for reporting on the status of
feature toggles.LicenseThe code in this repository is licensed under the AGPL 3.0 unless
otherwise noted.Please seeLICENSE.txtfor details.How To ContributeContributions are very welcome.Please readHow To Contributefor details.PR description template should be automatically applied if you are sending PR from github interface; otherwise you
can find it it atPULL_REQUEST_TEMPLATE.mdIssue report template should be automatically applied if you are sending it from github UI as well; otherwise you
can find it atISSUE_TEMPLATE.mdReporting Security IssuesPlease do not report security issues in public. Please emailsecurity@openedx.org.Getting HelpHave a question about this repository, or about Open edX in general?  Please
refer to thislist of resourcesif you need any assistance.Change LogUnreleased[5.1.1] - 2024-01-31Fix toggle report to output all settings.[5.1.0] - 2023-08-02Added support for Django 4.2Rename toggle_warnings to toggle_warning for consistency with setting_warning.Switch fromedx-sphinx-themetosphinx-book-themesince the former is
deprecated[5.0.0] - 2022-04-22BREAKING CHANGE: Removed LegacyWaffle* classes. Although this is a breaking change, all known uses have already been fixed.Handle the case where certain toggle names come in asNonewhen generating summary reports.Add ADR for updating annotations for toggle life expectancy and use cases.[4.3.0] - 2022-01-31RemovedRemoved Django22, 30, 31AddedAdded Django40 support in CI[4.2.0] - 2021-07-07Added support for django3.0, 3.1 and 3.2[4.1.0] - 2021-02-10Expose toggle state report via a Python API.[4.0.0] - 2021-01-24BREAKING CHANGE: Remove now unnecessaryedx_toggles.toggles.__future__module.BREAKING CHANGE: Remove the following methods and properties:LegacyWaffleFlagNamespace.set_monitor_value,LegacyWaffleSwitch.switch_name,LegacyWaffleSwitch.namespaced_switch_name,LegacyWaffleFlag.flag_name,LegacyWaffleFlag.namespaced_flag_name,LegacyWaffleFlag.waffle_namespace.BREAKING CHANGE: RemoveLegacyWaffleFlagNamespace._set_monitor_valuemethodMonitoring:Add the following custom attribute: “deprecated_legacy_waffle_class”Remove the following custom attributes: “deprecated_module_not_supplied”, “warn_flag_no_request_return_value”, “deprecated_waffle_method”, “deprecated_waffle_legacy_method”, “deprecated_compatible_legacy_waffle_class”.Renametoggles.internal.legacy.Waffle*classes totoggles.internal.legacy.LegacyWaffle*.[3.1.0] - 2021-01-18Dropped support forPython3.5.Fixtoggle_typecolumn value from the toggle state report for theSettingToggleandSettingDictToggleclasses: the column is now set to “django_settings”.[2.1.0] - 2021-01-12Stop monitoring waffle flag values viaWaffleFlag.set_monitor_valuecalls. The deprecated method is preserved for backward compatibility.[2.0.0] - 2020-11-05BREAKING CHANGE: TheWaffleFlagNamespaceandWaffleSwitchNamespaceclasses have been removed. You can either rename toLegacyWaffleFlagNamespaceandLegacyWaffleSwitchNamespace, which are deprecated, or you can move to the newer waffle classes that no longer use these Namespace classes (see below).BREAKING CHANGE: TheWaffleFlagandWaffleSwitchclasses exposed intogglesno longer use the Namespace classes and are now the classes which were previously only available intoggles.__future__.If you were importing fromedx_toggles.toggles.__future__before, then you simply need to import fromedx_toggles.toggles. Importing from__future__will continue to work but will trigger a deprecation warning.If you were importing fromedx_toggles.toggles, then you either need to:Migrate your legacy namespaced classes to the new-style classes (see the new behaviour below), orImportLegacyWaffleFlaginstead ofWaffleFlagandLegacyWaffleSwitchinstead ofWaffleSwitch. Note that these classes will be removed soon, so it’s preferable to migrate to the new classes already.The new Waffle classes introduce the following changes:They no longer use Namespace classes likeWaffleSwitchNamespaceorWaffleFlagNamespace.TheWaffleSwitchNamespace._namespaced_nameandWaffleFlagNamespace._namespaced_namemethods are replaced by theWaffleSwitch.nameandWaffleFlag.nameattributes.TheWaffleSwitchNamespace.is_enabledmethod is replaced by theWaffleSwitch.is_enabledmethod.TheWaffleSwitchNamespace.set_request_cache_with_short_namemethod has no replacement because an alternative solution should be found.  You could (but really shouldn’t) use theWaffleSwitch._cached_switchesproperty.TheWaffleSwitch.switch_nameattribute is deprecated: switches should only ever be referred to using their fully namespaced names.TheWaffleSwitch.switch_nameattribute no longer exists. Switches should only ever be referred to using their fully namespaced names.  If you need the non-namespaced name, it must be parsed from the namespaced name.TheWaffleFlagNamespace.is_flag_activemethod is replaced byWaffleFlag.is_enabled.TheWaffleFlagNamespace._monitor_valuemethod is replaced byWaffleFlag.set_monitor_value.TheWaffleFlagNamespace._cached_flagsattribute is replaced by theWaffleFlag.cached_flagsmethod.TheWaffleFlagandWaffleSwitchmodule_nameconstructor argument is now mandatory.TheWaffleFlag.flag_nameattribute is deprecated.TheWaffleFlag.flag_nameattribute no longer exists. Flags should only ever be referred to using their fully namespaced names.  If you need the non-namespaced name, it must be parsed from the namespaced name.TheWaffleFlag.waffle_namespaceattribute no longer exists, since there is no longer a separate namespace object.[1.2.2] - 2020-12-22More improvements to monitoring of legacy waffle class imports.Adddeprecated_incompatible_legacy_waffle_classcustom attribute to any class (including subclasses), using the backward-incompatible imports that will be removed in 2.0.0.Adddeprecated_compatible_legacy_waffle_classcustom attribute to any class (including subclasses) using the legacy classes compatible with 2.0.0 imports, but which should be removed in 3.0.0 (or some future major version).Removedeprecated_edx_toggles_wafflecustom attribute. In two cases, it was replaced by the new*_legacy_waffle_classcustom attributes.  In one case, it was replaced with the already existing and more appropriatedeprecated_waffle_legacy_methodcustom attribute.[1.2.1] - 2020-12-17Improve monitoring of legacy Waffle class imports. We should watch for “edx_toggles.toggles.internal.waffle.legacy.WaffleSwitch” custom attributes.[1.2.0] - 2020-11-05Start the deprecation process of the waffle namespace classes:Introduce LegacyWaffleFlag, LegacyWaffleSwitch for use with namespaces.Begin deprecation/refactoring of namespacing code, including deprecation monitoring and warnings.Note: WaffleFlag and WaffleSwitch still use namespaces as well (for now).Introduce thetoggles.__future__module for applications that need to be forward-compatible right away.[1.1.1] - 2020-10-27Fix cache-checking in WaffleSwitchNamespace[1.1.0] - 2020-10-23Backportoverride_waffle_switchtest utility function from edx-platform[1.0.0] - 2020-10-13Fix missingmodule_nameargument inSettingDictToggleconstructor.Extract waffle classes from edx-platform and move them here following ADR#2,#3,#4. This does not introduce backward-incompatible changes,yet.Fix pinned requirements and incorrect root url that overrode edx-platform’s.[0.3.0] - 2020-09-23First release to PyPI (2020-10-02)ImplementSettingToggleandSettingDictToggle.[0.2.2] - 2020-09-11Document the writing of feature toggles annotations.[0.2.1] - 2020-08-03Add ADR for the purpose of this repository.Add ADR for implementing a Toggle State endpoint.Add toggles report with CSV output using new CsvRenderer.Add CourseWaffleFlag and course override data to toggle report.Add output for waffle flag course overrides to data gathererAdd additional options to scripts/feature_toggle_report_generatorfilter toggle types and envs, add github_url, and change name of ida in reportModified scripts/feature_toggle_report_generator to work based on envsRemoved confluence integrationMoved HtmlRenderer to its own fileAdd ADR for new SettingToggle. (see 0003-django-setting-toggles.rst)[0.2.0] - 2020-05-27Removed caniusepython3.[0.2.0] - 2020-05-05Added support for python 3.8 and dropped support Django versions older than 2.2[0.1.0] - 2019-04-08Initial version