Skip to content

Commit 8ec6cc5

Browse files
committed
remove dataclass
1 parent d973444 commit 8ec6cc5

27 files changed

+1610
-27
lines changed

.github/workflows/paimon-python-checks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ jobs:
9999
"polars==0.9.12" \
100100
"duckdb==0.8.1" \
101101
"py4j==0.10.9.9" \
102-
"requests<3" \
103-
"dataclasses==0.8"
102+
"requests<3"
104103
105104
- name: Run lint-python.sh
106105
run: |

paimon-python/dev/lint-python.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,31 @@ function flake8_check() {
160160
fi
161161
}
162162

163+
# Function to check if required dependencies are available
164+
function check_pytest_dependencies() {
165+
python -c "import pyarrow" 2>/dev/null
166+
if [ $? -ne 0 ]; then
167+
return 1
168+
fi
169+
return 0
170+
}
171+
163172
# Pytest check
164173
function pytest_check() {
165174

166175
print_function "STAGE" "pytest checks"
167176
if [ ! -f "$PYTEST_PATH" ]; then
168177
echo "For some unknown reasons, the pytest package is not complete."
178+
exit 1
179+
fi
180+
181+
# Check if required dependencies are available
182+
if ! check_pytest_dependencies; then
183+
echo "WARNING: Required dependencies (pyarrow, etc.) are not installed."
184+
echo "Skipping pytest checks. To install dependencies, run: pip install -e ."
185+
echo "Or run only flake8 checks with: ./dev/lint-python.sh -i flake8"
186+
print_function "STAGE" "pytest checks... [SKIPPED]"
187+
return 0
169188
fi
170189

171190
# the return value of a pipeline is the status of the last command to exit

paimon-python/pypaimon/api/api_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"""
1818

1919
from abc import ABC
20-
from dataclasses import dataclass
20+
from pypaimon.common.dataclasses import dataclass
2121
from typing import Dict, List, Optional
2222

2323
from pypaimon.common.identifier import Identifier

paimon-python/pypaimon/api/api_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"""
1818

1919
from abc import ABC, abstractmethod
20-
from dataclasses import dataclass
20+
from pypaimon.common.dataclasses import dataclass
2121
from typing import Dict, Generic, List, Optional
2222

2323
from pypaimon.common.json_util import T, json_field

paimon-python/pypaimon/api/token_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
from abc import ABC, abstractmethod
19-
from dataclasses import dataclass
19+
from pypaimon.common.dataclasses import dataclass
2020
from datetime import datetime, timezone
2121
from typing import Dict, Optional
2222
from urllib.parse import urljoin

paimon-python/pypaimon/api/typedef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
from dataclasses import dataclass
18+
from pypaimon.common.dataclasses import dataclass
1919
from typing import Dict, TypeVar
2020

2121
T = TypeVar("T")

0 commit comments

Comments
 (0)