Opened 3 years ago
Closed 3 years ago
#27041 closed enhancement (fixed)
Remove deprecated stuff related to Cython
Reported by:  jdemeyer  Owned by:  

Priority:  minor  Milestone:  sage8.7 
Component:  cython  Keywords:  
Cc:  Merged in:  
Authors:  Jeroen Demeyer  Reviewers:  Erik Bray 
Report Upstream:  N/A  Work issues:  
Branch:  108a42e (Commits, GitHub, GitLab)  Commit:  108a42e09fcb4b34f7c9b2111be861f5a942388b 
Dependencies:  Stopgaps: 
Description (last modified by )
Change History (16)
comment:1 Changed 3 years ago by
 Description modified (diff)
comment:2 Changed 3 years ago by
 Description modified (diff)
 Summary changed from Remove deprecated code in sage.misc.cython to Remove deprecated stuff related to Cython
comment:3 Changed 3 years ago by
 Description modified (diff)
comment:4 Changed 3 years ago by
 Description modified (diff)
comment:5 Changed 3 years ago by
 Branch set to u/jdemeyer/remove_deprecated_code_in_sage_misc_cython
comment:6 Changed 3 years ago by
 Commit set to 108a42e09fcb4b34f7c9b2111be861f5a942388b
 Status changed from new to needs_review
comment:7 followup: ↓ 9 Changed 3 years ago by
 Status changed from needs_review to needs_info
(For the record: the 4 tickets have been closed for Sage 8.1 released in July 2017)
comment:8 Changed 3 years ago by
 Status changed from needs_info to needs_review
comment:9 in reply to: ↑ 7 ; followup: ↓ 10 Changed 3 years ago by
Replying to vdelecroix:
(For the record: the 4 tickets have been closed for Sage 8.1 released in July 2017)
Not quite. #24105 is from Sage 8.2
comment:10 in reply to: ↑ 9 ; followup: ↓ 11 Changed 3 years ago by
Replying to jdemeyer:
Replying to vdelecroix:
(For the record: the 4 tickets have been closed for Sage 8.1 released in July 2017)
Not quite. #24105 is from Sage 8.2
Which is bad as it was released 05/06/18... One year deprecation implies 5 more months.
comment:11 in reply to: ↑ 10 Changed 3 years ago by
Replying to vdelecroix:
Which is bad as it was released 05/06/18... One year deprecation implies 5 more months.
No, we are both wrong :)
#22805 is from Sage 8.0
#22698, #23855, #24105 are from Sage 8.1
So this should be fine.
comment:12 Changed 3 years ago by
Maybe not for this ticket, but there's a patch in Debian related to this that I think would be worth incorporating into Sage somehow:

sage/src/sage/interfaces/singular.py
Description: Additional changes to work with the Debian package of singular We search for a specific SOVERSION of libsingularSingular, to allow us to runtimeDepend on libsingular4 and not libsingular4dev. Author: Tobias Hansen <thansen@debian.org> Author: Ximin Luo <infinity0@debian.org> Forwarded: notneeded  This patch header follows DEP3: http://dep.debian.net/deps/dep3/
a b 2264 2264 node_names.clear() 2265 2265 2266 2266 import os 2267 singular_docdir = os.environ['SINGULARPATH']+"/../info/"2267 singular_docdir = "/usr/share/doc/singular/" 2268 2268 2269 2269 new_node = re.compile(r"File: singular\.hlp, Node: ([^,]*),.*") 2270 2270 new_lookup = re.compile(r"\* ([^:]*):*([^.]*)\..*") 
sage/src/sage/misc/cython.py
a b 323 323 args = ['w','O2'] + args 324 324 libdirs = cblas_library_dirs 325 325 326 # Add Singular directories to includes 327 if "singular" in s or "pynac" in s: 328 import pkgconfig 329 inc.extend(sorted(set(pkgconfig.parse("Singular")["include_dirs"]))) 330 326 331 # Add cysignals directory to includes 327 332 for path in sys.path: 328 333 cysignals_path = os.path.join(path, "cysignals") 
sage/src/sage/env.py
a b 187 187 else: 188 188 extension = "so" 189 189 # library name changed from libsingular to libSingular btw 3.x and 4.x 190 SINGULAR_SO = SAGE_LOCAL+"/lib/libSingular."+extension190 SINGULAR_SO = "/usr/lib/%s/libsingularSingular4.1.1.so" % sysconfig.get_config_var('MULTIARCH') 191 191 192 192 _add_variable_or_fallback('SINGULAR_SO', SINGULAR_SO) 193 193 
sage/src/sage/misc/compat.py
a b 87 87 EXAMPLES:: 88 88 89 89 sage: from sage.misc.compat import find_library 90 sage: find_library(' Singular')90 sage: find_library('singularSingular') 91 91 '...Singular...' 92 92 93 93 """
I think that this demonstrates that there needs to be a better way to customize where sage looks for bits of Singular (the library, as well as its docs and include files).
comment:13 Changed 3 years ago by
 Milestone changed from sage8.6 to sage8.7
 Reviewers set to Erik Bray
 Status changed from needs_review to positive_review
Hooray for getting rid of cruft.
comment:14 Changed 3 years ago by
 Status changed from positive_review to needs_work
sage t long src/sage/tests/cmdline.py ********************************************************************** File "src/sage/tests/cmdline.py", line 412, in sage.tests.cmdline.test_executable Failed example: print(err) Expected: Traceback (most recent call last): ... RuntimeError: refusing to run doctests... Got: sys:1: RuntimeWarning: not adding directory '' to sys.path since everybody can write to it. Untrusted users could put files in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory Traceback (most recent call last): File "/mnt/disk/home/release/Sage/src/bin/sageruntests", line 163, in <module> err = DC.run() File "/mnt/disk/home/release/Sage/local/lib/python2.7/sitepackages/sage/doctest/control.py", line 1200, in run self.test_safe_directory() File "/mnt/disk/home/release/Sage/local/lib/python2.7/sitepackages/sage/doctest/control.py", line 643, in test_safe_directory .format(os.getcwd())) RuntimeError: refusing to run doctests from the current directory '/mnt/disk/home/release/.sage/temp/volker/30915/dir_Gy_O0N/test' since untrusted users could put files in this directory, making it unsafe to run Sage code from <BLANKLINE> ********************************************************************** File "src/sage/tests/cmdline.py", line 417, in sage.tests.cmdline.test_executable Failed example: print(err) Expected: Traceback (most recent call last): ... RuntimeError: refusing to run doctests... Got: sys:1: RuntimeWarning: not adding directory '' to sys.path since everybody can write to it. Untrusted users could put files in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory Traceback (most recent call last): File "/mnt/disk/home/release/Sage/src/bin/sageruntests", line 163, in <module> err = DC.run() File "/mnt/disk/home/release/Sage/local/lib/python2.7/sitepackages/sage/doctest/control.py", line 1200, in run self.test_safe_directory() File "/mnt/disk/home/release/Sage/local/lib/python2.7/sitepackages/sage/doctest/control.py", line 643, in test_safe_directory .format(os.getcwd())) RuntimeError: refusing to run doctests from the current directory '/mnt/disk/home/release/.sage/temp/volker/30915/dir_Gy_O0N/test' since untrusted users could put files in this directory, making it unsafe to run Sage code from <BLANKLINE> ********************************************************************** 1 item had failures: 2 of 251 in sage.tests.cmdline.test_executable [250 tests, 2 failures, 41.71 s]  sage t long src/sage/tests/cmdline.py # 2 doctests failed  Total time for all tests: 41.8 seconds
comment:15 Changed 3 years ago by
 Status changed from needs_work to positive_review
That error doesn't seem related to this ticket at all.
comment:16 Changed 3 years ago by
 Branch changed from u/jdemeyer/remove_deprecated_code_in_sage_misc_cython to 108a42e09fcb4b34f7c9b2111be861f5a942388b
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Remove deprecated stuff related to Cython