diff --git a/python/CONTRIBUTING.md b/python/CONTRIBUTING.md index 66d8ed623c..2bf638c51f 100644 --- a/python/CONTRIBUTING.md +++ b/python/CONTRIBUTING.md @@ -7,12 +7,12 @@ Most of the workflow is based on the `Makefile` and the `maturin` CLI tool. #### Setup your local environment with virtualenv ```bash -$ make setup-venv +make setup-venv ``` #### Activate it ```bash -$ source ./venv/bin/activate +source ./venv/bin/activate ``` #### Ready to develop with maturin @@ -21,13 +21,13 @@ $ source ./venv/bin/activate Install delta-rs in the current virtualenv ```bash -$ make develop +make develop ``` Then, list all the available tasks ```bash -$ make help +make help ``` Format: diff --git a/python/deltalake/table.py b/python/deltalake/table.py index e7b7613599..a2d6189fb6 100644 --- a/python/deltalake/table.py +++ b/python/deltalake/table.py @@ -24,6 +24,7 @@ import pyarrow import pyarrow.dataset as ds import pyarrow.fs as pa_fs +import pyarrow_hotfix # noqa: F401; addresses CVE-2023-47248; # type: ignore from pyarrow.dataset import ( Expression, FileSystemDataset, diff --git a/python/pyproject.toml b/python/pyproject.toml index 6ffe4ca14c..e9fc7389af 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -18,7 +18,8 @@ classifiers = [ "Programming Language :: Python :: 3.12" ] dependencies = [ - "pyarrow>=8" + "pyarrow>=8", + "pyarrow-hotfix", ] [project.optional-dependencies] @@ -42,7 +43,7 @@ devel = [ pyspark = [ "pyspark", "delta-spark", - "numpy==1.22.2" # pyspark is no compatible with latest numpy + "numpy==1.22.2" # pyspark is not compatible with latest numpy ] [project.urls] @@ -70,7 +71,6 @@ warn_return_any = false implicit_reexport = true strict_equality = true - [tool.black] include = '\.pyi?$' exclude = "venv" @@ -101,4 +101,4 @@ markers = [ "azure: marks tests as integration tests with Azure Blob Store", "pandas: marks tests that require pandas", "pyspark: marks tests that require pyspark", -] +] \ No newline at end of file diff --git a/python/stubs/pyarrow_hotfix/__init__.pyi b/python/stubs/pyarrow_hotfix/__init__.pyi new file mode 100644 index 0000000000..e69de29bb2