Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stale settings #14748

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions docs/3.0rc/api-ref/rest-api/server/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21688,11 +21688,6 @@
"title": "Prefect Home",
"default": "~/.prefect"
},
"PREFECT_EXTRA_ENTRYPOINTS": {
"type": "string",
"title": "Prefect Extra Entrypoints",
"default": ""
},
"PREFECT_DEBUG_MODE": {
"type": "boolean",
"title": "Prefect Debug Mode",
Expand Down Expand Up @@ -22381,11 +22376,6 @@
"title": "Prefect Task Scheduling Pending Task Timeout",
"default": "PT0S"
},
"PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT": {
"type": "boolean",
"title": "Prefect Experimental Disable Sync Compat",
"default": false
},
"PREFECT_EXPERIMENTAL_ENABLE_SCHEDULE_CONCURRENCY": {
"type": "boolean",
"title": "Prefect Experimental Enable Schedule Concurrency",
Expand Down
17 changes: 0 additions & 17 deletions src/prefect/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,18 +481,6 @@ def default_cloud_ui_url(settings, value):
directory may be created automatically when required.
"""

PREFECT_EXTRA_ENTRYPOINTS = Setting(
str,
default="",
)
"""
Modules for Prefect to import when Prefect is imported.

Values should be separated by commas, e.g. `my_module,my_other_module`.
Objects within modules may be specified by a ':' partition, e.g. `my_module:my_object`.
If a callable object is provided, it will be called with no arguments on import.
"""

PREFECT_DEBUG_MODE = Setting(
bool,
default=False,
Expand Down Expand Up @@ -1438,11 +1426,6 @@ def default_cloud_ui_url(settings, value):
PENDING for a while is a sign that the task worker may have crashed.
"""

PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT = Setting(bool, default=False)
"""
Whether or not to disable the sync_compatible decorator utility.
"""

PREFECT_EXPERIMENTAL_ENABLE_SCHEDULE_CONCURRENCY = Setting(bool, default=False)

# Defaults -----------------------------------------------------------------------------
Expand Down
5 changes: 1 addition & 4 deletions src/prefect/utilities/asyncutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,8 @@ def coroutine_wrapper(
*args: Any, _sync: Optional[bool] = None, **kwargs: Any
) -> Union[R, Coroutine[Any, Any, R]]:
from prefect.context import MissingContextError, get_run_context
from prefect.settings import (
PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT,
)

if PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT or _sync is False:
if _sync is False:
return async_fn(*args, **kwargs)

is_async = True
Expand Down
11 changes: 0 additions & 11 deletions tests/utilities/test_asyncutils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
import inspect
import threading
import uuid
from contextlib import asynccontextmanager, contextmanager
Expand All @@ -11,10 +10,6 @@

from prefect._internal.concurrency.threads import get_run_sync_loop
from prefect.context import ContextModel
from prefect.settings import (
PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT,
temporary_settings,
)
from prefect.utilities.asyncutils import (
GatherIncomplete,
LazySemaphore,
Expand Down Expand Up @@ -223,12 +218,6 @@ async def test_sync_compatible_call_from_async(fn):
assert await fn(1, y=2) == 6


@pytest.mark.parametrize("fn", SYNC_COMPAT_TEST_CASES)
def test_sync_compatible_is_disabled_by_flag(fn):
with temporary_settings({PREFECT_EXPERIMENTAL_DISABLE_SYNC_COMPAT: True}):
assert inspect.isawaitable(fn(1, y=2))


async def test_sync_compatible_call_from_sync_in_async_thread():
# Here we are in the async main thread

Expand Down