From afbb82ea3446b5462a6ae1f5b02d338ff0170e5a Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Thu, 18 Jul 2024 11:46:07 +0900 Subject: [PATCH 1/4] pin scipy, need deprecated sparsetools --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5abdf82efb..3d807b3574 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,10 @@ requires = [ # is 1.18.5, remove the line when they increase oldest supported Numpy for this platform "numpy==1.18.5; python_version=='3.8' and platform_machine not in 'arm64|aarch64'", "oldest-supported-numpy; python_version>'3.8' or platform_machine in 'arm64|aarch64'", - "scipy", + # + # SciPy 1.14.0 onwards removed the deprecated sparsetools submodule needed by gensim.models.lsimodel + # + "scipy<=1.13.1", "setuptools", "wheel", ] From 79f982b25be815310bc4410758ac6ee83a095e9e Mon Sep 17 00:00:00 2001 From: Filip <39336739+filip-komarzyniec@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:03:07 +0200 Subject: [PATCH 2/4] removed scipy from build-only dependencies (#3538) * removed scipy from build-only dependencies; updated README accordingly * fixed conditions regarding oldest numpy installation on arm64 Windows machines * README rephrased regarding NumPy installation * Revert "fixed conditions regarding oldest numpy installation on arm64 Windows machines" This reverts commit 68197fb9beb65cf3abdb03f71d7c7a4b8ae36473. * pin scipy, need old sparsetools for wheel testing * make scipy pin more strict * use macos-latest instead of deprecated macos-11 * pin scipy in setup.py * remove redundant scipy pin from build-wheels.yml * get rid of remaining macos-11 traces in CI workflow * use macos-12 instead of macos-latest --------- Co-authored-by: Michael Penkov --- .github/workflows/build-wheels.yml | 12 ++++++------ README.md | 20 +++++++++++--------- pyproject.toml | 4 ---- setup.py | 5 ++++- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 856efcbd00..c4c3444499 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-11] + os: [ubuntu-20.04, windows-2019, macos-12] steps: - name: Checkout @@ -61,11 +61,11 @@ jobs: fail-fast: false matrix: include: - - {python: '3.8', os: macos-11} - - {python: '3.9', os: macos-11} - - {python: '3.10', os: macos-11} - - {python: '3.11', os: macos-11} - - {python: '3.12', os: macos-11} + - {python: '3.8', os: macos-12} + - {python: '3.9', os: macos-12} + - {python: '3.10', os: macos-12} + - {python: '3.11', os: macos-12} + - {python: '3.12', os: macos-12} - {python: '3.8', os: ubuntu-20.04} - {python: '3.9', os: ubuntu-20.04} diff --git a/README.md b/README.md index a69c3a187b..b876aaf8b2 100644 --- a/README.md +++ b/README.md @@ -49,13 +49,12 @@ on Wikipedia. Installation ------------ -This software depends on [NumPy and Scipy], two Python packages for -scientific computing. You must have them installed prior to installing -gensim. - -It is also recommended you install a fast BLAS library before installing -NumPy. This is optional, but using an optimized BLAS such as MKL, [ATLAS] or -[OpenBLAS] is known to improve performance by as much as an order of +This software depends on [NumPy], a Python package for +scientific computing. Please bear in mind that building NumPy from source +(e.g. by installing gensim on a platform which lacks NumPy .whl distribution) +is a non-trivial task involving [linking NumPy to a BLAS library]. +It is recommended to provide a fast one (such as MKL, [ATLAS] or +[OpenBLAS]) which can improve performance by as much as an order of magnitude. On OSX, NumPy picks up its vecLib BLAS automatically, so you don’t need to do anything special. @@ -69,7 +68,9 @@ Or, if you have instead downloaded and unzipped the [source tar.gz] package: ```bash - python setup.py install + tar -xvzf gensim-X.X.X.tar.gz + cd gensim-X.X.X/ + pip install . ``` For alternative modes of installation, see the [documentation]. @@ -172,7 +173,8 @@ BibTeX entry: [documentation and Jupyter Notebook tutorials]: https://github.com/RaRe-Technologies/gensim/#documentation [Vector Space Model]: https://en.wikipedia.org/wiki/Vector_space_model [unsupervised document analysis]: https://en.wikipedia.org/wiki/Latent_semantic_indexing - [NumPy and Scipy]: https://scipy.org/install/ + [NumPy]: https://numpy.org/install/ + [linking NumPy to a BLAS library]: https://numpy.org/devdocs/building/blas_lapack.html [ATLAS]: https://math-atlas.sourceforge.net/ [OpenBLAS]: https://xianyi.github.io/OpenBLAS/ [source tar.gz]: https://pypi.org/project/gensim/ diff --git a/pyproject.toml b/pyproject.toml index 3d807b3574..dba0603d0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,6 @@ requires = [ # is 1.18.5, remove the line when they increase oldest supported Numpy for this platform "numpy==1.18.5; python_version=='3.8' and platform_machine not in 'arm64|aarch64'", "oldest-supported-numpy; python_version>'3.8' or platform_machine in 'arm64|aarch64'", - # - # SciPy 1.14.0 onwards removed the deprecated sparsetools submodule needed by gensim.models.lsimodel - # - "scipy<=1.13.1", "setuptools", "wheel", ] diff --git a/setup.py b/setup.py index be7f58330b..335426dcf3 100644 --- a/setup.py +++ b/setup.py @@ -331,7 +331,10 @@ def run(self): install_requires = [ NUMPY_STR, - 'scipy >= 1.7.0', + # + # scipy 1.14.0 and onwards removes deprecated sparsetools submodule + # + 'scipy >= 1.7.0, <1.14.0', 'smart_open >= 1.8.1', ] From 7321346a7043b51dfa3883e2a224cd78c07703ab Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Fri, 19 Jul 2024 22:28:30 +0900 Subject: [PATCH 3/4] bumped version to 4.3.3 --- docs/src/conf.py | 4 ++-- gensim/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/conf.py b/docs/src/conf.py index 0fbb479b65..41a63d67ef 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -61,9 +61,9 @@ # built documents. # # The short X.Y version. -version = '4.3' +version = '4.3.3' # The full version, including alpha/beta/rc tags. -release = '4.3.2.dev0' +release = '4.3.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/gensim/__init__.py b/gensim/__init__.py index f2a576eed1..442a4bef6b 100644 --- a/gensim/__init__.py +++ b/gensim/__init__.py @@ -4,7 +4,7 @@ """ -__version__ = '4.3.2.dev0' +__version__ = '4.3.3' import logging diff --git a/setup.py b/setup.py index 335426dcf3..01cda61aba 100644 --- a/setup.py +++ b/setup.py @@ -340,7 +340,7 @@ def run(self): setup( name='gensim', - version='4.3.2.dev0', + version='4.3.3', description='Python framework for fast Vector Space Modelling', long_description=LONG_DESCRIPTION, From ea7b162e3c2d93b02f2793cfc6ff5b558ef5dfee Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Fri, 19 Jul 2024 22:31:49 +0900 Subject: [PATCH 4/4] updated CHANGELOG.md for version 4.3.3 --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91984fded2..62636aef13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ Changes ======= + +## 4.3.3, 2024-07-19 + +### :star2: New Features + +### :red_circle: Bug fixes + +* Correct file argument name in KeyedVectors.save docstring (__[hammad7](https://github.com/hammad7)__, [#3532](https://github.com/piskvorky/gensim/pull/3532)) +* Import deprecated scipy.linalg.triu from numpy.triu instead (__[Luffy610](https://github.com/Luffy610)__, [#3524](https://github.com/piskvorky/gensim/pull/3524)) + +### :books: Tutorial and doc improvements + +* Updated the broken Documentation Link on the README.md (__[wittyicon29](https://github.com/wittyicon29)__, [#3505](https://github.com/piskvorky/gensim/pull/3505)) + +### :+1: Improvements + +* Add support for python3.12 wheels (__[YoungMind1](https://github.com/YoungMind1)__, [#3531](https://github.com/piskvorky/gensim/pull/3531)) +* Removed scipy from build-only dependencies (__[filip-komarzyniec](https://github.com/filip-komarzyniec)__, [#3538](https://github.com/piskvorky/gensim/pull/3538)) +* Use newer unittest.mock everwhere (__[a-detiste](https://github.com/a-detiste)__, [#3529](https://github.com/piskvorky/gensim/pull/3529)) +* Handle optional parameters without implicit bool cast (__[nk-fouque](https://github.com/nk-fouque)__, [#3502](https://github.com/piskvorky/gensim/pull/3502)) + ## 4.3.2, 2023-08-23 ### :red_circle: Bug fixes