Open pwschaedler opened 1 year ago
Any idea when this can go in?
Could please anyone from maintainers look at this PR? This is a blocking issue for many other projects. @ymwdalex @ParticularMiner
I found another workaround here:
echo "Cython==0.29.35" >> constraints.txt
export PIP_CONSTRAINT="$(pwd)/constraints.txt"
or you can add a link to constraints.txt
to your requirements.txt
:
--constraint constraints.txt
anyio==3.6.1
...
In both cases, the constraint is applied for dependent packages of packages used in requirements.txt
Can someone please look into this?
Since this breaks a few things, and there's a pending update that would fix this issue, would this be ripe for a PEP-541 request?
It's obvious that @ParticularMiner has long since abandoned sparse_dot_topn_for_blocks. Would be useful if someone able to maintain it could fork it and publish a new version incorporating @pwschaedler's fix.
The release of Cython 3.0 on July 27, 2023 broke the build for this package by introducing breaking changes. This PR addresses those changes and fixes a few imports that no longer work with Cython 3.0. These changes are also backwards compatible for people who decide to build this package using older versions of Cython. This is an alternative proposal to PR #4 which suggests bounding the Cython dependency.
This addresses issue #3 in this repository, as well as a few issues found in other repos that depend on this package. https://github.com/ing-bank/sparse_dot_topn/issues/84 https://github.com/Bergvca/string_grouper/issues/93
Short term workaround for people who need to build this package now:
EDIT Probably the easiest workaround until a maintainer comes back and merges a fix if you need this package or something that depends on it: just add the following to your requirements.txt.
This will pull the package with the same name from my fork. If one of your dependencies requires this package, adding that line will override the dependency and use my fork's version instead of the broken version.
Also just because I was curious, if you really didn't want to change the imports and wanted everything to go back to the way it was without pinning the version, you can configure Cython to go back to the old behavior. You have to add Cython to the build-system requires in
pyproject.toml
, addfrom Cython.Build import cythonize
tosetup.py
, and then change line 95 toext_modules=cythonize([array_wrappers_ext, original_ext, threaded_ext], language_level='2'),
.