diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d258102555..10f30fe576 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,7 +108,7 @@ jobs: echo "DT_SDIST=$(ls dist/*.tar.gz)" >> $GITHUB_ENV - name: Save sdist artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sdist path: ${{ env.DT_SDIST }} @@ -153,7 +153,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-ubuntu-3.8 path: ${{ env.DT_WHEEL }} @@ -204,7 +204,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-ubuntu-3.9 path: ${{ env.DT_WHEEL }} @@ -255,7 +255,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-ubuntu-3.10 path: ${{ env.DT_WHEEL }} @@ -306,7 +306,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-ubuntu-3.11 path: ${{ env.DT_WHEEL }} @@ -359,7 +359,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-ubuntu-3.12 path: ${{ env.DT_WHEEL }} @@ -373,6 +373,59 @@ jobs: - name: Uninstall wheel run: python -m pip uninstall -y $DT_WHEEL + linux-313: + name: Linux / Python 3.13 + runs-on: ubuntu-latest + needs: setup + if: ${{ needs.setup.outputs.DT_RELEASE == 'True' }} + + env: + DT_HARNESS: ${{ needs.setup.outputs.DT_HARNESS }} + DT_BUILD_ID: ${{ needs.setup.outputs.DT_BUILD_ID }} + DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }} + DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }} + DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }} + DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python 3.13 + uses: actions/setup-python@v3 + with: + python-version: "3.13" + + - name: Build datatable wheel + run: | + python -V + python -m pip install --upgrade pip + # Update to normal install when they publish the next version > 5.4.0 + # Current version fails on 3.13 because of distutils + python -m pip install git+https://github.com/pypa/auditwheel + python ci/ext.py wheel --audit + echo "DT_WHEEL=$(ls dist/*-cp313-*.whl)" >> $GITHUB_ENV + + - name: Print build information + run: | + echo "DT_WHEEL = $DT_WHEEL" + cat src/datatable/_build_info.py + + - name: Save wheel artifact + uses: actions/upload-artifact@v4 + with: + name: wheel-ubuntu-3.13 + path: ${{ env.DT_WHEEL }} + + - name: Install and test + run: | + python -m pip install $DT_WHEEL + python -m pip install pytest docutils pandas pyarrow + python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/ + + - name: Uninstall wheel + run: python -m pip uninstall -y $DT_WHEEL + #------------------------------------------------------------------------------------- # MacOS #------------------------------------------------------------------------------------- @@ -413,7 +466,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-macos-3.8 path: ${{ env.DT_WHEEL }} @@ -463,7 +516,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-macos-3.9 path: ${{ env.DT_WHEEL }} @@ -513,7 +566,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-macos-3.10 path: ${{ env.DT_WHEEL }} @@ -562,7 +615,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-macos-3.11 path: ${{ env.DT_WHEEL }} @@ -612,7 +665,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-macos-3.12 path: ${{ env.DT_WHEEL }} @@ -626,6 +679,56 @@ jobs: - name: Uninstall wheel run: python -m pip uninstall -y $DT_WHEEL + macos-313: + name: MacOS / Python 3.13 + runs-on: macos-latest + needs: setup + if: ${{ needs.setup.outputs.DT_RELEASE == 'True' }} + + env: + DT_HARNESS: ${{ needs.setup.outputs.DT_HARNESS }} + DT_BUILD_ID: ${{ needs.setup.outputs.DT_BUILD_ID }} + DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }} + DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }} + DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }} + DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python 3.13 + uses: actions/setup-python@v3 + with: + python-version: "3.13" + + - name: Build datatable wheel + run: | + python -V + python -m pip install --upgrade pip + python ci/ext.py wheel + echo "DT_WHEEL=$(ls dist/*-cp313-*.whl)" >> $GITHUB_ENV + + - name: Print build information + run: | + echo "DT_WHEEL = $DT_WHEEL" + cat src/datatable/_build_info.py + + - name: Save wheel artifact + uses: actions/upload-artifact@v4 + with: + name: wheel-macos-3.13 + path: ${{ env.DT_WHEEL }} + + - name: Install and test + run: | + python -m pip install $DT_WHEEL + python -m pip install pytest docutils pandas pyarrow + python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/ + + - name: Uninstall wheel + run: python -m pip uninstall -y $DT_WHEEL + #------------------------------------------------------------------------------------- # Windows #------------------------------------------------------------------------------------- @@ -665,7 +768,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-windows-3.8 path: ${{ env.DT_WHEEL }} @@ -715,7 +818,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-windows-3.9 path: ${{ env.DT_WHEEL }} @@ -765,7 +868,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-windows-3.10 path: ${{ env.DT_WHEEL }} @@ -815,7 +918,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-windows-3.11 path: ${{ env.DT_WHEEL }} @@ -865,7 +968,7 @@ jobs: cat src/datatable/_build_info.py - name: Save wheel artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheel-windows-3.12 path: ${{ env.DT_WHEEL }} @@ -878,3 +981,53 @@ jobs: - name: Uninstall wheel run: python -m pip uninstall -y $env:DT_WHEEL + + win-313: + name: Windows / Python 3.13 + runs-on: windows-latest + needs: setup + if: ${{ needs.setup.outputs.DT_RELEASE == '(disabled)' }} + + env: + DT_HARNESS: ${{ needs.setup.outputs.DT_HARNESS }} + DT_BUILD_ID: ${{ needs.setup.outputs.DT_BUILD_ID }} + DT_RELEASE: ${{ needs.setup.outputs.DT_RELEASE }} + DT_BUILD_SUFFIX: ${{ needs.setup.outputs.DT_BUILD_SUFFIX }} + DT_BUILD_NUMBER: ${{ needs.setup.outputs.DT_BUILD_NUMBER }} + DT_CHANGE_BRANCH: ${{ needs.setup.outputs.DT_CHANGE_BRANCH }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python 3.13 + uses: actions/setup-python@v3 + with: + python-version: "3.13" + + - name: Build datatable wheel + run: | + python -V + python -m pip install --upgrade pip + python ci/ext.py wheel + echo "DT_WHEEL=$(ls dist/*-cp313-*.whl)" >> $env:GITHUB_ENV + + - name: Print build information + run: | + echo "DT_WHEEL = $env:DT_WHEEL" + cat src/datatable/_build_info.py + + - name: Save wheel artifact + uses: actions/upload-artifact@v4 + with: + name: wheel-windows-3.13 + path: ${{ env.DT_WHEEL }} + + - name: Install and test + run: | + python -m pip install $env:DT_WHEEL + python -m pip install pytest docutils pandas pyarrow + python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/ + + - name: Uninstall wheel + run: python -m pip uninstall -y $env:DT_WHEEL diff --git a/requirements_docs.txt b/requirements_docs.txt index 778267ae9c..7408acdad2 100644 --- a/requirements_docs.txt +++ b/requirements_docs.txt @@ -3,4 +3,3 @@ pygments>=2.6 sphinx>=4.0, <5.0 sphinx_rtd_theme>=0.5 nbsphinx>=0.5 -datatable diff --git a/src/core/python/obj.cc b/src/core/python/obj.cc index 6e9a228954..24aaba96e1 100644 --- a/src/core/python/obj.cc +++ b/src/core/python/obj.cc @@ -1191,7 +1191,12 @@ std::string _obj::typestr() const { size_t _obj::get_sizeof() const { +#if PY_VERSION_HEX < 0x03090000 return _PySys_GetSizeOf(v); +#else + // Python 3.9+ + return PyObject_Size(v); +#endif } size_t _obj::get_refcount() const { diff --git a/tests/ijby/test-sort.py b/tests/ijby/test-sort.py old mode 100644 new mode 100755 index 6a21c5a4ae..de05e98a38 --- a/tests/ijby/test-sort.py +++ b/tests/ijby/test-sort.py @@ -1021,7 +1021,7 @@ def test_sort_with_reverse_list_false_true(numpy): { 'A': ['o1','o2','o3','o4','o5'], 'B': ['c1','c1','c2','c2','c3'], - 'C': [5, 1, 3, numpy.NaN, numpy.NaN] + 'C': [5, 1, 3, numpy.nan, numpy.nan] }) EXP = DT[:, :, dt.sort(f.B, -f.A)] RES1 = DT[:, :, dt.sort("B", "A", reverse=[False, True])] @@ -1037,7 +1037,7 @@ def test_sort_with_reverse_list_true_true(numpy): { 'A': ['o1', 'o2', 'o3', 'o4', 'o5'], 'B': ['c1', 'c1', 'c2', 'c2', 'c3'], - 'C': [5,1,3, numpy.NaN,numpy.NaN] + 'C': [5,1,3, numpy.nan,numpy.nan] }) EXP = DT[:, :, dt.sort(-f.A, -f.B)] RES1 = DT[:, :, dt.sort("B", "A", reverse=[True, True])] @@ -1055,7 +1055,7 @@ def test_reverse_list_error(numpy): { 'A': ['o1', 'o2', 'o3', 'o4', 'o5']*25, 'B': ['c1', 'c1', 'c2', 'c2', 'c3']*25, - 'C': [5, 1, 3, numpy.NaN, numpy.NaN]*25 + 'C': [5, 1, 3, numpy.nan, numpy.nan]*25 }) with pytest.raises(ValueError, match=msg): DT[:, :, dt.sort(0, 1, reverse=[True])]