diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index a9f0fd7ef2..cf8016e9ab 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -15,10 +15,10 @@ jobs: linters: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} @@ -48,7 +48,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11'] os: [ubuntu-latest, macos-latest, windows-latest] platform: [x64] include: @@ -74,11 +74,6 @@ jobs: # https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg # with the exception that we enforce the minimum version to be 1.17.0. # - - os: ubuntu-latest - manylinux-version: 2010 - python-version: 3.7 - build-depends: numpy==1.17.0 - - os: ubuntu-latest manylinux-version: 2010 python-version: 3.8 @@ -93,12 +88,11 @@ jobs: manylinux-version: 2014 python-version: "3.10" build-depends: numpy==1.22.2 scipy==1.8.0 - - - os: macos-latest - travis-os-name: osx - manylinux-version: 1 - python-version: 3.7 - build-depends: numpy==1.17.0 + + - os: ubuntu-latest + manylinux-version: 2014 + python-version: "3.11" + build-depends: numpy==1.23.2 scipy==1.9.2 - os: macos-latest travis-os-name: osx @@ -117,11 +111,12 @@ jobs: manylinux-version: 1 python-version: "3.10" build-depends: numpy==1.22.2 scipy==1.8.0 - - - os: windows-latest - manylinux-version: 2010 - python-version: 3.7 - build-depends: numpy==1.17.0 + + - os: macos-latest + travis-os-name: osx + manylinux-version: 1 + python-version: "3.11" + build-depends: numpy==1.23.2 scipy==1.9.2 - os: windows-latest manylinux-version: 2010 @@ -137,6 +132,11 @@ jobs: manylinux-version: 2010 python-version: "3.10" build-depends: numpy==1.22.2 scipy==1.8.0 + + - os: windows-latest + manylinux-version: 2010 + python-version: "3.11" + build-depends: numpy==1.23.2 scipy==1.9.2 env: PKG_NAME: gensim @@ -155,7 +155,7 @@ jobs: BUILD_DEPENDS: ${{ matrix.build-depends }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 @@ -168,7 +168,7 @@ jobs: echo "TRAVIS_OS_NAME: ${TRAVIS_OS_NAME}" echo "SKIP_NETWORK_TESTS: ${SKIP_NETWORK_TESTS}" - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -202,19 +202,15 @@ jobs: echo ::group::Set up dependencies python --version python -c "import struct; print(struct.calcsize('P') * 8)" - python -m pip install -U pip setuptools wheel wheelhouse_uploader ${{ env.BUILD_DEPENDS }} echo ::endgroup:: - echo ::group::Build wheel python setup.py bdist_wheel echo ::endgroup - echo ::group::Install run ls dist python continuous_integration/install_wheel.py echo ::endgroup:: - # # For consistency with the multibuild step. # @@ -240,6 +236,7 @@ jobs: if: matrix.os != 'windows-latest' run: | . test_environment/bin/activate + python -m pip install --upgrade pip pip install pytest testfixtures mock pip install wheelhouse/*.whl cd test_environment @@ -258,6 +255,7 @@ jobs: if: matrix.os == 'windows-latest' run: | test_environment/Scripts/activate.bat + python -m pip install --upgrade pip pip install pytest testfixtures mock pip install wheelhouse/*.whl cd test_environment diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3cb54fe8be..9d52759538 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,10 +9,10 @@ jobs: linters: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} @@ -47,9 +47,9 @@ jobs: needs: [linters] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: # # We use Py3.8 here for historical reasons. @@ -65,7 +65,6 @@ jobs: sudo apt-get -yq remove texlive-binaries --purge sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install dvipng texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended latexmk sudo apt-get -yq install build-essential python3.8-dev - - name: Install gensim and its dependencies run: pip install -e .[docs] @@ -73,7 +72,6 @@ jobs: run: | python setup.py build_ext --inplace make -C docs/src clean html - # # FIXME: do we want to store the built documentation somewhere, or is # knowing that the docs built successfully enough? @@ -90,15 +88,15 @@ jobs: fail-fast: false matrix: include: - - {python: 3.7, os: ubuntu-20.04} - {python: 3.8, os: ubuntu-20.04} - {python: 3.9, os: ubuntu-20.04} - {python: '3.10', os: ubuntu-20.04} + - {python: '3.11', os: ubuntu-20.04} - - {python: 3.7, os: windows-2019} - {python: 3.8, os: windows-2019} - {python: 3.9, os: windows-2019} - {python: '3.10', os: windows-2019} + - {python: '3.11', os: windows-2019} # # Don't run this job unless the linters have succeeded. @@ -108,9 +106,9 @@ jobs: needs: [linters] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: Update pip @@ -129,14 +127,12 @@ jobs: curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add sudo apt-get update -y sudo apt-get install -y sbt - - name: Install GDB & enable core dumps if: matrix.os == 'ubuntu-20.04' run: | sudo apt-get update -y sudo apt-get install -y gdb ulimit -c unlimited -S # enable core dumps - - name: Install gensim and its dependencies if: matrix.os != 'windows' run: pip install -e .[test] @@ -150,7 +146,6 @@ jobs: python --version pip --version python setup.py build_ext --inplace - # # Some of our tests are hanging, and I strongly suspect it's because of the coverage plugin. # diff --git a/.gitmodules b/.gitmodules index 347fe93043..52a1b1716c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "multibuild"] path = multibuild - url = https://github.com/matthew-brett/multibuild.git + url = https://github.com/multi-build/multibuild diff --git a/.travis.yml b/.travis.yml index d27d176f58..8937c0c74c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,10 +33,6 @@ matrix: # See .github/workflows/build-wheels.yml for a discussion of why we # handle numpy versions explicitly. # - - os: linux - env: - - MB_PYTHON_VERSION=3.7 - - BUILD_DEPENDS="numpy==1.19.2 scipy==1.7.0" - os: linux env: - MB_PYTHON_VERSION=3.8 @@ -50,6 +46,14 @@ matrix: # this numpy release are available via PyPI. # - BUILD_DEPENDS="numpy==1.19.3 scipy==1.7.0" + - os: linux + env: + - MB_PYTHON_VERSION=3.10 + - BUILD_DEPENDS="numpy==1.19.3 scipy==1.7.0" + - os: linux + env: + - MB_PYTHON_VERSION=3.11 + - BUILD_DEPENDS="numpy==1.19.3 scipy==1.7.0" before_install: - source multibuild/common_utils.sh diff --git a/multibuild b/multibuild index 4e30a05764..d4b02ce8c7 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit 4e30a057646d9e70d5e6e7c354e85cfb740d2ca1 +Subproject commit d4b02ce8c707c8a2bcc721e29f2385149f994b1f diff --git a/setup.py b/setup.py index aeef499c8f..485cf08294 100644 --- a/setup.py +++ b/setup.py @@ -274,7 +274,7 @@ def run(self): 'testfixtures', ] -if not (sys.platform.lower().startswith("win") and sys.version_info[:2] >= (3, 9)): +if not sys.platform.lower().startswith("win") and sys.version_info[:2] < (3, 11): core_testenv.extend([ 'POT', 'nmslib', @@ -282,7 +282,6 @@ def run(self): # Add additional requirements for testing on Linux that are skipped on Windows. linux_testenv = core_testenv[:] + visdom_req - # Skip problematic/uninstallable packages (& thus related conditional tests) in Windows builds. # We still test them in Linux via Travis, see linux_testenv above. # See https://github.com/RaRe-Technologies/gensim/pull/2814 @@ -320,20 +319,20 @@ def run(self): 'pandas', ] -NUMPY_STR = 'numpy >= 1.17.0' +NUMPY_STR = 'numpy >= 1.18.5' # # We pin the Cython version for reproducibility. We expect our extensions # to build with any sane version of Cython, so we should update this pin # periodically. # -CYTHON_STR = 'Cython==0.29.28' +CYTHON_STR = 'Cython==0.29.32' # Allow overriding the Cython version requirement CYTHON_STR = os.environ.get('GENSIM_CYTHON_REQUIRES', CYTHON_STR) install_requires = [ NUMPY_STR, - 'scipy >= 0.18.1', + 'scipy >= 1.7.0', 'smart_open >= 1.8.1', ] @@ -378,9 +377,10 @@ def run(self): 'Environment :: Console', 'Intended Audience :: Science/Research', 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3 :: Only', 'Topic :: Scientific/Engineering :: Artificial Intelligence', 'Topic :: Scientific/Engineering :: Information Analysis', @@ -388,7 +388,7 @@ def run(self): ], test_suite="gensim.test", - python_requires='>=3.6', + python_requires='>=3.8', setup_requires=setup_requires, install_requires=install_requires, tests_require=linux_testenv,