Skip to content

Remove unnecessary python version checks. - #4039

Open
brandonschabell wants to merge 1 commit into
plotly:devfrom
brandonschabell:remove-old-python-version-checks
Open

brandonschabell wants to merge 1 commit into
plotly:devfrom
brandonschabell:remove-old-python-version-checks

Conversation

@brandonschabell

Copy link
Copy Markdown
Contributor

Remove unnecessary Python version checks (pre 3.9).

Also switched from typing_extensions to typing imports for types that were added to the typing library as of 3.9.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • task 1
    • task 2
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • this GitHub #PR number updates the dash docs
    • here is the show and tell thread in Plotly Dash community

Copilot AI balanced review requested due to automatic review settings October 3, 2026 00:31
@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The mechanical cleanup matches the declared Python 3.9 minimum and preserves required compatibility imports.

Review effort: Balanced
Findings: None

What changed in this PR

Removes obsolete checks for Python versions below the supported minimum of 3.9 and adopts standard-library typing APIs where compatible.

Changes:

  • Removed obsolete test skip markers and imports.
  • Replaced compatible typing_extensions imports with typing.
  • Simplified JSON loading and CI dependency conditions.
File Description
tests/​unit/​test_app_runners.py Removes a Python 2 skip condition.
tests/​background_callback/​test_basic_long_callback016.py Removes the pre-3.9 skip condition.
tests/​background_callback/​test_basic_long_callback015.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback014.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback013.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback012.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback011.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback010.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback009.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback008.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback007.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback006.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback005.py Removes the version skip while retaining the timeout skip.
tests/​background_callback/​test_basic_long_callback004.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback003.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback002.py Removes the legacy version skip.
tests/​background_callback/​test_basic_long_callback001.py Removes the legacy version skip.
tests/​async_tests/​test_async_background_callbacks.py Removes the legacy callback-test skip.
requirements/​ci.txt Installs Pyright without an obsolete version marker.
dash/​types.py Imports Annotated from typing.
dash/​resources.py Uses the standard-library TypedDict.
dash/​mcp/​primitives/​tools/​tool_get_dash_component.py Imports Annotated from typing.
dash/​development/​component_generator.py Removes the Python 2 JSON conversion path.
dash/​_jupyter.py Imports Literal from typing.
dash/​_hooks.py Uses standard-library typing primitives.
components/​dash-core-components/​tests/​integration/​store/​test_store_data.py Removes an obsolete pre-3.6 skip.
CHANGELOG.md Records removal of pre-3.9 checks.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants