Skip to content

Conversation

@desertaxle
Copy link
Member

Summary

This PR removes all deprecated code from core Prefect that has reached or passed its scheduled removal date.

Changes

Removed Blocks

  • JSON, String, DateTime blocks (deprecated June 2024, removal date June 2025)
    • Removed from src/prefect/blocks/system.py
    • Updated server block registration

Removed Functions

  • ResultStore.store_parameters() and read_parameters() (deprecated May 2025, removal date November 2025)

    • Moved to prefect.task_worker module
  • build_server() and start_webserver() from runner.server (deprecated April 2025, removal date October 2025)

    • Replaced by background tasks and .serve() method
  • submit_to_runner() and wait_for_submitted_runs() from runner.submit (deprecated April 2025, removal date October 2025)

    • Replaced by background tasks and run_deployment()
  • DeploymentClient.set_deployment_paused_state() sync and async (deprecated June 2025, removal date December 2025)

    • Replaced by pause_deployment() and resume_deployment() methods

Removed CLI Commands

  • prefect cloud open (deprecated October 2024, removal date April 2025)
    • Replaced by prefect dashboard open

Other Updates

  • Updated server block registration to remove deprecated blocks
  • Removed tests for deprecated functionality
  • Cleaned up imports and exports
  • Removed 1,154 lines of deprecated code

Impact

  • Breaking Changes: Yes - removes deprecated APIs that have reached their removal dates
  • Pydantic Schema Fields: Kept for backwards compatibility (as requested)
  • Integration-Specific Deprecations: Not included (prefect-aws, prefect-gcp, prefect-snowflake remain unchanged)

🤖 Generated with Claude Code

This PR removes all deprecated code from core Prefect that has reached or passed its scheduled removal date:

**Removed Blocks:**
- JSON, String, DateTime blocks (deprecated June 2024, removal date June 2025)

**Removed Functions:**
- ResultStore.store_parameters() and read_parameters() (deprecated May 2025, removal date November 2025)
- build_server() and start_webserver() from runner.server (deprecated April 2025, removal date October 2025)
- submit_to_runner() and wait_for_submitted_runs() from runner.submit (deprecated April 2025, removal date October 2025)
- DeploymentClient.set_deployment_paused_state() sync and async (deprecated June 2025, removal date December 2025)

**Removed CLI Commands:**
- `prefect cloud open` (deprecated October 2024, removal date April 2025)

**Updates:**
- Updated server block registration to remove deprecated blocks
- Removed tests for deprecated functionality
- Cleaned up imports and exports

Pydantic schema fields and integration-specific deprecations were kept as requested.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 29, 2025

CodSpeed Performance Report

Merging #19307 will not alter performance

Comparing remove-deprecations-3.5.0 (ba5bf78) with main (ee25381)

Summary

✅ 2 untouched

desertaxle and others added 8 commits October 29, 2025 16:17
- Remove webserver parameter from Runner.__init__() and Runner.start()
- Remove unused _build_generic_endpoint_for_flows and related helper functions
- Update test_block_registration.py to remove json and date-time blocks
- Clean up unused imports

Fixes type check errors and server test failures.
@desertaxle desertaxle marked this pull request as ready for review October 30, 2025 20:46
@desertaxle desertaxle changed the title chore: Remove deprecated code from core Prefect Remove deprecated code Runner functionality and system Blocks Oct 30, 2025
Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

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

woohoo!!

pytest-timeout \
pytest-env
pytest --ignore=integration-tests/test_task_worker.py --ignore=integration-tests/test_concurrency_leases.py integration-tests/ -n auto -vv
pytest --ignore=integration-tests/test_task_worker.py --ignore=integration-tests/test_concurrency_leases.py --ignore=integration-tests/test_deploy.py integration-tests/ -n auto -vv
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we adding this ignore?

Copy link
Member Author

Choose a reason for hiding this comment

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

The test requires the flow-run execute CLI, which isn't available in prefect-client. I'm not quite sure how it was passing before, but pulling a flow from a different repo for the test caused issues.

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.

3 participants