#27041 closed enhancement (fixed)

Remove deprecated stuff related to Cython

Reported by: jdemeyer Owned by:
Priority: minor Milestone: sage-8.7
Component: cython Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Erik Bray
Report Upstream: N/A Work issues:
Branch: 108a42e (Commits) Commit: 108a42e09fcb4b34f7c9b2111be861f5a942388b
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

Remove deprecations from #22698, #22805, #23855, #24105.

Deprecate the script src/bin/sage-cython.

Change History (16)

comment:1 Changed 13 months ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 13 months ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Remove deprecated code in sage.misc.cython to Remove deprecated stuff related to Cython

comment:3 Changed 13 months ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 13 months ago by jdemeyer

  • Description modified (diff)

comment:5 Changed 13 months ago by jdemeyer

  • Branch set to u/jdemeyer/remove_deprecated_code_in_sage_misc_cython

comment:6 Changed 13 months ago by jdemeyer

  • Commit set to 108a42e09fcb4b34f7c9b2111be861f5a942388b
  • Status changed from new to needs_review

New commits:

108a42eRemove deprecated stuff related to Cython

comment:7 follow-up: Changed 13 months ago by vdelecroix

  • 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 13 months ago by vdelecroix

  • Status changed from needs_info to needs_review

comment:9 in reply to: ↑ 7 ; follow-up: Changed 13 months ago by 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

comment:10 in reply to: ↑ 9 ; follow-up: Changed 13 months ago by vdelecroix

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 13 months ago by jdemeyer

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 13 months ago by embray

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 libsingular-Singular, to allow us to
     runtime-Depend on libsingular4 and not libsingular4-dev.
    Author: Tobias Hansen <thansen@debian.org>
    Author: Ximin Luo <infinity0@debian.org>
    Forwarded: not-needed
    ---
    This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
    a b  
    22642264    node_names.clear()
    22652265
    22662266    import os
    2267     singular_docdir = os.environ['SINGULARPATH']+"/../info/"
     2267    singular_docdir = "/usr/share/doc/singular/"
    22682268
    22692269    new_node = re.compile(r"File: singular\.hlp,  Node: ([^,]*),.*")
    22702270    new_lookup = re.compile(r"\* ([^:]*):*([^.]*)\..*")
  • sage/src/sage/misc/cython.py

    a b  
    323323    args = ['-w','-O2'] + args
    324324    libdirs = cblas_library_dirs
    325325
     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
    326331    # Add cysignals directory to includes
    327332    for path in sys.path:
    328333        cysignals_path = os.path.join(path, "cysignals")
  • sage/src/sage/env.py

    a b  
    187187    else:
    188188        extension = "so"
    189189    # library name changed from libsingular to libSingular btw 3.x and 4.x
    190     SINGULAR_SO = SAGE_LOCAL+"/lib/libSingular."+extension
     190    SINGULAR_SO = "/usr/lib/%s/libsingular-Singular-4.1.1.so" % sysconfig.get_config_var('MULTIARCH')
    191191
    192192_add_variable_or_fallback('SINGULAR_SO', SINGULAR_SO)
    193193
  • sage/src/sage/misc/compat.py

    a b  
    8787    EXAMPLES::
    8888
    8989        sage: from sage.misc.compat import find_library
    90         sage: find_library('Singular')
     90        sage: find_library('singular-Singular')
    9191        '...Singular...'
    9292
    9393    """

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 13 months ago by embray

  • Milestone changed from sage-8.6 to sage-8.7
  • Reviewers set to Erik Bray
  • Status changed from needs_review to positive_review

Hooray for getting rid of cruft.

comment:14 Changed 12 months ago by vbraun

  • 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/sage-runtests", line 163, in <module>
        err = DC.run()
      File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/control.py", line 1200, in run
        self.test_safe_directory()
      File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/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/sage-runtests", line 163, in <module>
        err = DC.run()
      File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/control.py", line 1200, in run
        self.test_safe_directory()
      File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/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 12 months ago by jdemeyer

  • Status changed from needs_work to positive_review

That error doesn't seem related to this ticket at all.

comment:16 Changed 12 months ago by vbraun

  • 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
Note: See TracTickets for help on using tickets.