New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT: stats: Work around Cython bug. #16719
Conversation
Because of a bug in Cython, the inner function weigh() (a closure in _weightedrankedtau()) cannot refer to the memoryview arguments of _weightedrankedtau(). The work-around here is to assign the arguments to local variables. Closes scipygh-16718
The failure of the Python 3.11 job appears to be the result of a dependency attempting to import the deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Warren, LGTM and yes failure is not related (not sure about it yet). Let's get this in now to go back to a usable CI.
@tylerjereddy this needs backporting to |
Because of a bug in Cython, the inner function weigh() (a closure in _weightedrankedtau()) cannot refer to the memoryview arguments of _weightedrankedtau(). The work-around here is to assign the arguments to local variables.
Because of a bug in Cython, the inner function weigh() (a closure in _weightedrankedtau()) cannot refer to the memoryview arguments of _weightedrankedtau(). The work-around here is to assign the arguments to local variables.
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec mv ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec mv ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.0-1.spec mv ../python*-scipy*1.8.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.0/ rm -rf ../python*-scipy*1.8.0*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec mv ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Given that 0.29.32 was released, would it not be better to require |
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec mv ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec mv ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
This change seems fine, and it's already backported and merged - so no need to change anything I'd say. We don't expect to undo this with Cython 3.0 right, current code is fine as is? |
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.0-1.spec mv ../python*-scipy*1.8.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.0/ rm -rf ../python*-scipy*1.8.0*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec mv ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
The comment in the code here says: "When we can require Cython 3.0, y_local and rank_local can be removed, and the closure weigh() can refer directly to y and rank.", which sounds very much like undoing the change this PR is making. Given that the old code is now also unbroken with Cython 0.29, I think the question of undoing the quickfix arises naturally (even though it was of course very important in the short term). |
@WarrenWeckesser any preference? |
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.0-1.spec mv ../python*-scipy*1.8.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.0/ rm -rf ../python*-scipy*1.8.0*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec mv ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
The release has been yanked. |
Thanks @scoder! |
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec mv ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec mv ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.0-1.spec mv ../python*-scipy*1.8.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.0/ rm -rf ../python*-scipy*1.8.0*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec mv ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec mv ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec mv ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec mv ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec cp ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec cp ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec cp ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec cp ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec cp ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec cp ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.8.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.8.1-2.spec cp ../python*-scipy*1.8.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.8.1/ rm -rf ../python*-scipy*1.8.1*.* See scipy#15466 See scipy#16528 See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync git submodule update --init tar zcvf ../python-scipy_1.7.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.7.3-1.spec cp ../python*-scipy*1.7.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.7.3/ rm -rf ../python*-scipy*1.7.3*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf tar zcvf ../python-scipy_1.5.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-scipy.spec ../python-scipy_1.5.4-1.spec cp ../python*-scipy*1.5.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/scipy-scipy-1.5.4/ rm -rf ../python*-scipy*1.5.4*.* See scipy#16719 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Because of a bug in Cython, the inner function weigh() (a closure
in _weightedrankedtau()) cannot refer to the memoryview arguments
of _weightedrankedtau(). The work-around here is to assign the
arguments to local variables.
Closes gh-16718