You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "eschutho (via GitHub)" <gi...@apache.org> on 2026/06/16 16:17:48 UTC
[PR] fix(deps): replace deprecated np.NaN with np.nan [superset]
eschutho opened a new pull request, #41118:
URL: https://github.com/apache/superset/pull/41118
## Summary
`np.NaN` (capital N) was deprecated in NumPy 1.24 and **removed in NumPy 2.0**. The production environment uses NumPy 1.26.4, where accessing `np.NaN` emits a `DeprecationWarning`.
Two call sites remained unfixed in master:
- `superset/models/helpers.py`: placeholder DataFrame in `processing_time_offsets` when an offset query returns no rows
- `tests/unit_tests/pandas_postprocessing/test_resample.py`: test fixture data
### What changed
Replaced all four `np.NaN` occurrences with `np.nan` (the canonical lowercase alias). Functionally identical — both are `float('nan')` — but `np.nan` is the stable, non-deprecated form.
No behavior change. The placeholder rows still hold `NaN` values; only the attribute access path changed.
## Test plan
- [ ] Pre-commit hooks pass (mypy, ruff, pylint — all green on this branch)
- [ ] `pytest tests/unit_tests/pandas_postprocessing/test_resample.py` — existing test passes unchanged
- [ ] `pytest tests/integration_tests/query_context_tests.py -k time_offset` — validates `processing_time_offsets` empty-df path
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(deps): replace deprecated np.NaN with np.nan [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #41118:
URL: https://github.com/apache/superset/pull/41118#issuecomment-4720940287
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 6230880b6996a58f8fa459bafc21868bccc2eff8 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a31772c6f544b00081991b6 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-41118--superset-docs-preview.netlify.app](https://deploy-preview-41118--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#q1YqKMrPLShRslJS0lFKKkrMS84AstMyK_TzCnT9Ev10U1ILilKTE0tSU4AKgJyc_ErPFKASs0RjQ3Nzo2SzNFMTkyQDAwMLQ0tLwyQzpVoA) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-41118--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(deps): replace deprecated np.NaN with np.nan [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41118:
URL: https://github.com/apache/superset/pull/41118#issuecomment-4721035715
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41118?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 55.59%. Comparing base ([`6e2db42`](https://app.codecov.io/gh/apache/superset/commit/6e2db42d9800eeb4c961860538b7c916d82c5a10?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`6230880`](https://app.codecov.io/gh/apache/superset/commit/6230880b6996a58f8fa459bafc21868bccc2eff8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 13 commits behind head on master.
> :exclamation: There is a different number of reports uploaded between BASE (6e2db42) and HEAD (6230880). Click for more details.
>
> <details><summary>HEAD has 19 uploads less than BASE</summary>
>
>| Flag | BASE (6e2db42) | HEAD (6230880) |
>|------|------|------|
>|python|18|1|
>|presto|3|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #41118 +/- ##
==========================================
- Coverage 64.33% 55.59% -8.75%
==========================================
Files 2651 2652 +1
Lines 144652 144770 +118
Branches 33371 33395 +24
==========================================
- Hits 93061 80480 -12581
- Misses 49938 63563 +13625
+ Partials 1653 727 -926
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.90% <ø> (-0.02%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.90% <ø> (-18.69%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/41118/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41118?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(deps): replace deprecated np.NaN with np.nan [superset]
Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho merged PR #41118:
URL: https://github.com/apache/superset/pull/41118
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(deps): replace deprecated np.NaN with np.nan [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41118:
URL: https://github.com/apache/superset/pull/41118#issuecomment-4720919982
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org