Skip to content

fix: emit DeprecationWarning on current_state setter#605

Merged
fgmacedo merged 1 commit intodevelopfrom
fix/current-state-setter-deprecation
Apr 1, 2026
Merged

fix: emit DeprecationWarning on current_state setter#605
fgmacedo merged 1 commit intodevelopfrom
fix/current-state-setter-deprecation

Conversation

@fgmacedo
Copy link
Copy Markdown
Owner

@fgmacedo fgmacedo commented Apr 1, 2026

Summary

  • The current_state getter already emitted DeprecationWarning, but the setter was silent. Now both consistently warn, pointing users to configuration / configuration_values.
  • Added .. deprecated:: 3.0.0 Sphinx directive to the docstring so the API docs on ReadTheDocs render the deprecation notice.
  • Added tests for the setter warning and state change behavior.

Closes #604

The getter already warned, but the setter was silent. Now both
consistently emit DeprecationWarning pointing to `configuration`.

Also adds a Sphinx `deprecated` directive to the docstring so the
API docs render the deprecation notice.
@fgmacedo fgmacedo force-pushed the fix/current-state-setter-deprecation branch from c0f626f to fa71983 Compare April 1, 2026 12:01
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ee3607a) to head (fa71983).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop      #605   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         5015      5019    +4     
  Branches       810       810           
=========================================
+ Hits          5015      5019    +4     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fgmacedo fgmacedo merged commit ec225e0 into develop Apr 1, 2026
14 checks passed
@fgmacedo fgmacedo deleted the fix/current-state-setter-deprecation branch April 1, 2026 12:07
@fgmacedo fgmacedo added this to the 3.1.0 milestone Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

current_state in Docs

1 participant