Skip to content

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Jun 6, 2025

Summary

  • Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable

Test plan

  • ✅ Rule is already tested in main test function, no migration needed
  • make check passes
  • make test passes

Rule Documentation

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+16 -1 violations, +0 -0 fixes in 4 projects; 51 projects unchanged)

apache/airflow (+2 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --no-preview --select ALL

+ airflow-core/src/airflow/api_fastapi/execution_api/app.py:187:55: LOG014 `exc_info=` outside exception handlers
+ task-sdk/src/airflow/sdk/execution_time/supervisor.py:1027:13: LOG014 `exc_info=` outside exception handlers

apache/superset (+13 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --no-preview --select ALL

+ superset/commands/report/base.py:106:75: LOG014 `exc_info=` outside exception handlers
+ superset/db_engine_specs/clickhouse.py:181:17: LOG014 `exc_info=` outside exception handlers
+ superset/db_engine_specs/hive.py:563:13: LOG014 `exc_info=` outside exception handlers
+ superset/sql_lab.py:138:69: LOG014 `exc_info=` outside exception handlers
+ superset/sql_lab.py:142:75: LOG014 `exc_info=` outside exception handlers
+ superset/tasks/cache.py:298:31: LOG014 `exc_info=` outside exception handlers
+ superset/utils/core.py:574:43: LOG014 `exc_info=` outside exception handlers
+ superset/views/error_handling.py:140:50: LOG014 `exc_info=` outside exception handlers
+ superset/views/error_handling.py:145:51: LOG014 `exc_info=` outside exception handlers
+ superset/views/error_handling.py:151:52: LOG014 `exc_info=` outside exception handlers
+ superset/views/error_handling.py:160:41: LOG014 `exc_info=` outside exception handlers
+ superset/views/error_handling.py:187:44: LOG014 `exc_info=` outside exception handlers
+ superset/views/error_handling.py:209:37: LOG014 `exc_info=` outside exception handlers

rotki/rotki (+0 -1 violations, +0 -0 fixes)

- rotkehlchen/api/server.py:439:29: RUF100 [*] Unused `noqa` directive (non-enabled: `LOG014`)

zulip/zulip (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --no-preview --select ALL

+ zerver/lib/push_notifications.py:1334:21: LOG014 `exc_info=` outside exception handlers

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
LOG014 16 16 0 0 0
RUF100 1 0 1 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre added the rule Implementing or modifying a lint rule label Jun 6, 2025
@ntBre
Copy link
Contributor Author

ntBre commented Jun 6, 2025

I'm kind of on the fence about the ecosystem results. Some of them seem like true positives, like the zulip case, but many of the others are in functions annotated with some kind of @app.exception_handler decorator. I'm not sure there's much we can do about this, though, as the type of app and the name of the decorator varies across packages. It might be rare enough that noqa is the answer, but I'm open to other thoughts here. In general it seems difficult to detect whether or not we're in an "exception handler," as the RUF100 case in rotki also demonstrates.

@ntBre ntBre force-pushed the brent/release-0.12.0 branch 3 times, most recently from 9252447 to 829acf4 Compare June 9, 2025 00:22
@ntBre ntBre force-pushed the brent/stabilize-log014 branch from 59c579a to 85e7b5f Compare June 9, 2025 13:58
@ntBre
Copy link
Contributor Author

ntBre commented Jun 9, 2025

I think stabilizing this is in line with other rules we've stabilized, and 16 ecosystem hits is not much overall. LOG004 and LOG014 are the only 2/7 LOG rules in preview still. I gave LOG004 a Stabilize* on Notion because of #18044, which I think we could help with a documentation fix and finish stabilizing the set.

@ntBre ntBre requested a review from dylwil3 June 9, 2025 22:15
Copy link
Collaborator

@dylwil3 dylwil3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's okay to stabilize this for the reasons you give. Codebases with lots of custom exception handlers may choose not to enable the rule at all if it's noisy - it seems relatively niche to me.

@ntBre ntBre changed the title Stabilize LOG014 (exc-info-outside-except-handler) [flake8-loggin] Stabilize exc-info-outside-except-handler (LOG014) Jun 10, 2025
@ntBre ntBre changed the title [flake8-loggin] Stabilize exc-info-outside-except-handler (LOG014) [flake8-logging] Stabilize exc-info-outside-except-handler (LOG014) Jun 10, 2025
@ntBre ntBre merged commit d586186 into brent/release-0.12.0 Jun 10, 2025
34 checks passed
@ntBre ntBre deleted the brent/stabilize-log014 branch June 10, 2025 01:56
@ntBre ntBre mentioned this pull request Jun 10, 2025
2 tasks
@ntBre ntBre added this to the v0.12 milestone Jun 10, 2025
ntBre added a commit that referenced this pull request Jun 10, 2025
…14`) (#18517)

## Summary
- Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing
it from Preview to Stable

## Test plan
- ✅ Rule is already tested in main test function, no migration needed
- ✅ `make check` passes
- ✅ `make test` passes

## Rule Documentation
- [Test
file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23)
- [Rule
documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
ntBre added a commit that referenced this pull request Jun 11, 2025
…14`) (#18517)

## Summary
- Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing
it from Preview to Stable

## Test plan
- ✅ Rule is already tested in main test function, no migration needed
- ✅ `make check` passes
- ✅ `make test` passes

## Rule Documentation
- [Test
file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23)
- [Rule
documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
ntBre added a commit that referenced this pull request Jun 11, 2025
…14`) (#18517)

## Summary
- Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing
it from Preview to Stable

## Test plan
- ✅ Rule is already tested in main test function, no migration needed
- ✅ `make check` passes
- ✅ `make test` passes

## Rule Documentation
- [Test
file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23)
- [Rule
documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
ntBre added a commit that referenced this pull request Jun 12, 2025
…14`) (#18517)

## Summary
- Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing
it from Preview to Stable

## Test plan
- ✅ Rule is already tested in main test function, no migration needed
- ✅ `make check` passes
- ✅ `make test` passes

## Rule Documentation
- [Test
file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23)
- [Rule
documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
ntBre added a commit that referenced this pull request Jun 16, 2025
…14`) (#18517)

## Summary
- Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing
it from Preview to Stable

## Test plan
- ✅ Rule is already tested in main test function, no migration needed
- ✅ `make check` passes
- ✅ `make test` passes

## Rule Documentation
- [Test
file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23)
- [Rule
documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
ntBre added a commit that referenced this pull request Jun 17, 2025
…14`) (#18517)

## Summary
- Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing
it from Preview to Stable

## Test plan
- ✅ Rule is already tested in main test function, no migration needed
- ✅ `make check` passes
- ✅ `make test` passes

## Rule Documentation
- [Test
file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23)
- [Rule
documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
ntBre added a commit that referenced this pull request Jun 17, 2025
…14`) (#18517)

## Summary
- Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing
it from Preview to Stable

## Test plan
- ✅ Rule is already tested in main test function, no migration needed
- ✅ `make check` passes
- ✅ `make test` passes

## Rule Documentation
- [Test
file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23)
- [Rule
documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
carljm added a commit to MatthewMckee4/ruff that referenced this pull request Jun 17, 2025
…ence

* main: (71 commits)
  Bump 0.12.0 (astral-sh#18724)
  Revert "[ty] Offer "Did you mean...?" suggestions for unresolved `from` imports and unresolved attributes (astral-sh#18705)" (astral-sh#18721)
  [`flake8-return`] Stabilize only add `return None` at the end when fixing `implicit-return` (`RET503`) (astral-sh#18516)
  [`pyupgrade`] Stabilize `non-pep695-generic-function` (`UP047`) (astral-sh#18524)
  [`pyupgrade`] Stabilize `non-pep695-generic-class` (`UP046`) (astral-sh#18519)
  [`pandas-vet`] Deprecate `pandas-df-variable-name` (`PD901`) (astral-sh#18618)
  [`flake8-bandit`] Remove `suspicious-xmle-tree-usage` (`S320`) (astral-sh#18617)
  Stabilize `dataclass-enum` (`RUF049`) (astral-sh#18570)
  Stabilize `unnecessary-dict-index-lookup` (`PLR1733`) (astral-sh#18571)
  Remove rust-toolchain.toml from sdist (astral-sh#17925)
  Stabilize `starmap-zip` (`RUF058`) (astral-sh#18525)
  [`flake8-logging`] Stabilize `exc-info-outside-except-handler` (`LOG014`) (astral-sh#18517)
  [`pyupgrade`] Stabilize `non-pep604-annotation-optional` (`UP045`) and preview behavior for `non-pep604-annotation-union` (`UP007`) (astral-sh#18505)
  Stabilize `pytest-warns-too-broad` (`PT030`) (astral-sh#18568)
  Stabilize `for-loop-writes` (`FURB122`) (astral-sh#18565)
  Stabilize `pytest-warns-with-multiple-statements` (`PT031`) (astral-sh#18569)
  Stabilize `pytest-parameter-with-default-argument` (`PT028`) (astral-sh#18566)
  Stabilize `nan-comparison` (`PLW0177`) (astral-sh#18559)
  Stabilize `check-and-remove-from-set` (`FURB132`) (astral-sh#18560)
  Stabilize `unnecessary-round` (`RUF057`) (astral-sh#18563)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants