Skip to content

Commit

Permalink
stop exporting TokioRuntime to python
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Oct 3, 2024
1 parent ff1e758 commit 163b221
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions python/datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from .catalog import Catalog, Database, Table

# The following imports are okay to remain as opaque to the user.
from ._internal import Config, LogicalPlan, ExecutionPlan, runtime
from ._internal import Config, LogicalPlan, ExecutionPlan

from .record_batch import RecordBatchStream, RecordBatch

Expand Down Expand Up @@ -73,7 +73,6 @@
"literal",
"lit",
"DFSchema",
"runtime",
"Catalog",
"Database",
"Table",
Expand Down
6 changes: 0 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ pub mod utils;
static GLOBAL: MiMalloc = MiMalloc;

// Used to define Tokio Runtime as a Python module attribute
#[pyclass]
pub(crate) struct TokioRuntime(tokio::runtime::Runtime);

/// Low-level DataFusion internal package.
Expand All @@ -75,11 +74,6 @@ pub(crate) struct TokioRuntime(tokio::runtime::Runtime);
/// datafusion directory.
#[pymodule]
fn _internal(py: Python, m: Bound<'_, PyModule>) -> PyResult<()> {
// Register the Tokio Runtime as a module attribute so we can reuse it
m.add(
"runtime",
TokioRuntime(tokio::runtime::Runtime::new().unwrap()),
)?;
// Register the python classes
m.add_class::<catalog::PyCatalog>()?;
m.add_class::<catalog::PyDatabase>()?;
Expand Down

0 comments on commit 163b221

Please sign in to comment.