···48484949## Managing plugins with Vim packages
50505151-To store you plugins in Vim packages the following example can be used:
5151+To store you plugins in Vim packages (the native vim plugin manager, see `:help packages`) the following example can be used:
52525353```
5454vim_configurable.customize {
···5656 # loaded on launch
5757 start = [ youcompleteme fugitive ];
5858 # manually loadable by calling `:packadd $plugin-name`
5959+ # however, if a vim plugin has a dependency that is not explicitly listed in
6060+ # opt that dependency will always be added to start to avoid confusion.
5961 opt = [ phpCompletion elm-vim ];
6062 # To automatically load a plugin when opening a filetype, add vimrc lines like:
6163 # autocmd FileType php :packadd phpCompletion
···6365}
6466```
65676868+`myVimPackage` is an arbitrary name for the generated package. You can choose any name you like.
6669For Neovim the syntax is:
67706871```
···7477 packages.myVimPackage = with pkgs.vimPlugins; {
7578 # see examples below how to use custom packages
7679 start = [ ];
8080+ # If a vim plugin has a dependency that is not explicitly listed in
8181+ # opt that dependency will always be added to start to avoid confusion.
7782 opt = [ ];
7883 };
7984 };
-113
lib/composable-derivation.nix
···11-{lib, pkgs}:
22-let inherit (lib) nvs; in
33-{
44-55- # composableDerivation basically mixes these features:
66- # - fix function
77- # - mergeAttrBy
88- # - provides shortcuts for "options" such as "--enable-foo" and adding
99- # buildInputs, see php example
1010- #
1111- # It predates styles which are common today, such as
1212- # * the config attr
1313- # * mkDerivation.override feature
1414- # * overrideDerivation (lib/customization.nix)
1515- #
1616- # Some of the most more important usage examples (which could be rewritten if it was important):
1717- # * php
1818- # * postgis
1919- # * vim_configurable
2020- #
2121- # A minimal example illustrating most features would look like this:
2222- # let base = composableDerivation { (fixed: let inherit (fixed.fixed) name in {
2323- # src = fetchurl {
2424- # }
2525- # buildInputs = [A];
2626- # preConfigre = "echo ${name}";
2727- # # attention, "name" attr is missing, thus you cannot instantiate "base".
2828- # }
2929- # in {
3030- # # These all add name attribute, thus you can instantiate those:
3131- # v1 = base.merge ({ name = "foo-add-B"; buildInputs = [B]; }); // B gets merged into buildInputs
3232- # v2 = base.merge ({ name = "mix-in-pre-configure-lines" preConfigre = ""; });
3333- # v3 = base.replace ({ name = "foo-no-A-only-B;" buildInputs = [B]; });
3434- # }
3535- #
3636- # So yes, you can think about it being something like nixos modules, and
3737- # you'd be merging "features" in one at a time using .merge or .replace
3838- # Thanks Shea for telling me that I rethink the documentation ..
3939- #
4040- # issues:
4141- # * its complicated to understand
4242- # * some "features" such as exact merge behaviour are buried in mergeAttrBy
4343- # and defaultOverridableDelayableArgs assuming the default behaviour does
4444- # the right thing in the common case
4545- # * Eelco once said using such fix style functions are slow to evaluate
4646- # * Too quick & dirty. Hard to understand for others. The benefit was that
4747- # you were able to create a kernel builder like base derivation and replace
4848- # / add patches the way you want without having to declare function arguments
4949- #
5050- # nice features:
5151- # declaring "optional features" is modular. For instance:
5252- # flags.curl = {
5353- # configureFlags = ["--with-curl=${curl.dev}" "--with-curlwrappers"];
5454- # buildInputs = [curl openssl];
5555- # };
5656- # flags.other = { .. }
5757- # (Example taken from PHP)
5858- #
5959- # alternative styles / related features:
6060- # * Eg see function supporting building the kernel
6161- # * versionedDerivation (discussion about this is still going on - or ended)
6262- # * composedArgsAndFun
6363- # * mkDerivation.override
6464- # * overrideDerivation
6565- # * using { .., *Support ? false }: like configurable options.
6666- # To find those examples use grep
6767- #
6868- # To sum up: It exists for historical reasons - and for most commonly used
6969- # tasks the alternatives should be used
7070- #
7171- # If you have questions about this code ping Marc Weber.
7272- composableDerivation = {
7373- mkDerivation ? pkgs.stdenv.mkDerivation,
7474-7575- # list of functions to be applied before defaultOverridableDelayableArgs removes removeAttrs names
7676- # prepareDerivationArgs handles derivation configurations
7777- applyPreTidy ? [ lib.prepareDerivationArgs ],
7878-7979- # consider adding addtional elements by derivation.merge { removeAttrs = ["elem"]; };
8080- removeAttrs ? ["cfg" "flags"]
8181-8282- }: (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
8383- {
8484- inherit applyPreTidy removeAttrs;
8585- }).merge;
8686-8787- # some utility functions
8888- # use this function to generate flag attrs for prepareDerivationArgs
8989- # E nable D isable F eature
9090- edf = {name, feat ? name, enable ? {}, disable ? {} , value ? ""}:
9191- nvs name {
9292- set = {
9393- configureFlags = ["--enable-${feat}${if value == "" then "" else "="}${value}"];
9494- } // enable;
9595- unset = {
9696- configureFlags = ["--disable-${feat}"];
9797- } // disable;
9898- };
9999-100100- # same for --with and --without-
101101- # W ith or W ithout F eature
102102- wwf = {name, feat ? name, enable ? {}, disable ? {}, value ? ""}:
103103- nvs name {
104104- set = enable // {
105105- configureFlags = ["--with-${feat}${if value == "" then "" else "="}${value}"]
106106- ++ lib.maybeAttr "configureFlags" [] enable;
107107- };
108108- unset = disable // {
109109- configureFlags = ["--without-${feat}"]
110110- ++ lib.maybeAttr "configureFlags" [] disable;
111111- };
112112- };
113113-}
···3535 withStdOverrides;
363637373838- # predecessors: proposed replacement for applyAndFun (which has a bug cause it merges twice)
3939- # the naming "overridableDelayableArgs" tries to express that you can
4040- # - override attr values which have been supplied earlier
4141- # - use attr values before they have been supplied by accessing the fix point
4242- # name "fixed"
4343- # f: the (delayed overridden) arguments are applied to this
4444- #
4545- # initial: initial attrs arguments and settings. see defaultOverridableDelayableArgs
4646- #
4747- # returns: f applied to the arguments // special attributes attrs
4848- # a) merge: merge applied args with new args. Wether an argument is overridden depends on the merge settings
4949- # b) replace: this let's you replace and remove names no matter which merge function has been set
5050- #
5151- # examples: see test cases "res" below;
5252- overridableDelayableArgs =
5353- f: # the function applied to the arguments
5454- initial: # you pass attrs, the functions below are passing a function taking the fix argument
5555- let
5656- takeFixed = if lib.isFunction initial then initial else (fixed : initial); # transform initial to an expression always taking the fixed argument
5757- tidy = args:
5858- let # apply all functions given in "applyPreTidy" in sequence
5959- applyPreTidyFun = fold ( n: a: x: n ( a x ) ) lib.id (maybeAttr "applyPreTidy" [] args);
6060- in removeAttrs (applyPreTidyFun args) ( ["applyPreTidy"] ++ (maybeAttr "removeAttrs" [] args) ); # tidy up args before applying them
6161- fun = n: x:
6262- let newArgs = fixed:
6363- let args = takeFixed fixed;
6464- mergeFun = args.${n};
6565- in if isAttrs x then (mergeFun args x)
6666- else assert lib.isFunction x;
6767- mergeFun args (x ( args // { inherit fixed; }));
6868- in overridableDelayableArgs f newArgs;
6969- in
7070- (f (tidy (lib.fix takeFixed))) // {
7171- merge = fun "mergeFun";
7272- replace = fun "keepFun";
7373- };
7474- defaultOverridableDelayableArgs = f:
7575- let defaults = {
7676- mergeFun = mergeAttrByFunc; # default merge function. merge strategie (concatenate lists, strings) is given by mergeAttrBy
7777- keepFun = a: b: { inherit (a) removeAttrs mergeFun keepFun mergeAttrBy; } // b; # even when using replace preserve these values
7878- applyPreTidy = []; # list of functions applied to args before args are tidied up (usage case : prepareDerivationArgs)
7979- mergeAttrBy = mergeAttrBy // {
8080- applyPreTidy = a: b: a ++ b;
8181- removeAttrs = a: b: a ++ b;
8282- };
8383- removeAttrs = ["mergeFun" "keepFun" "mergeAttrBy" "removeAttrs" "fixed" ]; # before applying the arguments to the function make sure these names are gone
8484- };
8585- in (overridableDelayableArgs f defaults).merge;
8686-8787-8888-8989- # rec { # an example of how composedArgsAndFun can be used
9090- # a = composedArgsAndFun (x: x) { a = ["2"]; meta = { d = "bar";}; };
9191- # # meta.d will be lost ! It's your task to preserve it (eg using a merge function)
9292- # b = a.passthru.function { a = [ "3" ]; meta = { d2 = "bar2";}; };
9393- # # instead of passing/ overriding values you can use a merge function:
9494- # c = b.passthru.function ( x: { a = x.a ++ ["4"]; }); # consider using (maybeAttr "a" [] x)
9595- # }
9696- # result:
9797- # {
9898- # a = { a = ["2"]; meta = { d = "bar"; }; passthru = { function = .. }; };
9999- # b = { a = ["3"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; };
100100- # c = { a = ["3" "4"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; };
101101- # # c2 is equal to c
102102- # }
103103- composedArgsAndFun = f: foldArgs defaultMerge f {};
104104-105105-10638 # shortcut for attrByPath ["name"] default attrs
10739 maybeAttrNullable = maybeAttr;
10840···285217 # };
286218 # will result in
287219 # { mergeAttrsBy = [...]; buildInputs = [ a b c d ]; }
288288- # is used by prepareDerivationArgs, defaultOverridableDelayableArgs and can be used when composing using
220220+ # is used by defaultOverridableDelayableArgs and can be used when composing using
289221 # foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix
290222 mergeAttrByFunc = x: y:
291223 let
···317249 // listToAttrs (map (n: nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ])
318250 // listToAttrs (map (n: nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ])
319251 ;
320320-321321- # prepareDerivationArgs tries to make writing configurable derivations easier
322322- # example:
323323- # prepareDerivationArgs {
324324- # mergeAttrBy = {
325325- # myScript = x: y: x ++ "\n" ++ y;
326326- # };
327327- # cfg = {
328328- # readlineSupport = true;
329329- # };
330330- # flags = {
331331- # readline = {
332332- # set = {
333333- # configureFlags = [ "--with-compiler=${compiler}" ];
334334- # buildInputs = [ compiler ];
335335- # pass = { inherit compiler; READLINE=1; };
336336- # assertion = compiler.dllSupport;
337337- # myScript = "foo";
338338- # };
339339- # unset = { configureFlags = ["--without-compiler"]; };
340340- # };
341341- # };
342342- # src = ...
343343- # buildPhase = '' ... '';
344344- # name = ...
345345- # myScript = "bar";
346346- # };
347347- # if you don't have need for unset you can omit the surrounding set = { .. } attr
348348- # all attrs except flags cfg and mergeAttrBy will be merged with the
349349- # additional data from flags depending on config settings
350350- # It's used in composableDerivation in all-packages.nix. It's also used
351351- # heavily in the new python and libs implementation
352352- #
353353- # should we check for misspelled cfg options?
354354- # TODO use args.mergeFun here as well?
355355- prepareDerivationArgs = args:
356356- let args2 = { cfg = {}; flags = {}; } // args;
357357- flagName = name: "${name}Support";
358358- cfgWithDefaults = (listToAttrs (map (n: nameValuePair (flagName n) false) (attrNames args2.flags)))
359359- // args2.cfg;
360360- opts = attrValues (mapAttrs (a: v:
361361- let v2 = if v ? set || v ? unset then v else { set = v; };
362362- n = if cfgWithDefaults.${flagName a} then "set" else "unset";
363363- attr = maybeAttr n {} v2; in
364364- if (maybeAttr "assertion" true attr)
365365- then attr
366366- else throw "assertion of flag ${a} of derivation ${args.name} failed"
367367- ) args2.flags );
368368- in removeAttrs
369369- (mergeAttrsByFuncDefaults ([args] ++ opts ++ [{ passthru = cfgWithDefaults; }]))
370370- ["flags" "cfg" "mergeAttrBy" ];
371371-372252373253 nixType = x:
374254 if isAttrs x then
-38
lib/tests/misc.nix
···401401 expected = "«foo»";
402402 };
403403404404-405405-# MISC
406406-407407- testOverridableDelayableArgsTest = {
408408- expr =
409409- let res1 = defaultOverridableDelayableArgs id {};
410410- res2 = defaultOverridableDelayableArgs id { a = 7; };
411411- res3 = let x = defaultOverridableDelayableArgs id { a = 7; };
412412- in (x.merge) { b = 10; };
413413- res4 = let x = defaultOverridableDelayableArgs id { a = 7; };
414414- in (x.merge) ( x: { b = 10; });
415415- res5 = let x = defaultOverridableDelayableArgs id { a = 7; };
416416- in (x.merge) ( x: { a = builtins.add x.a 3; });
417417- res6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = builtins.add; }; };
418418- y = x.merge {};
419419- in (y.merge) { a = 10; };
420420-421421- resRem7 = res6.replace (a: removeAttrs a ["a"]);
422422-423423- # fixed tests (delayed args): (when using them add some comments, please)
424424- resFixed1 =
425425- let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });
426426- y = x.merge (x: { name = "name-${builtins.toString x.fixed.c}"; });
427427- in (y.merge) { b = 10; };
428428- strip = attrs: removeAttrs attrs ["merge" "replace"];
429429- in all id
430430- [ ((strip res1) == { })
431431- ((strip res2) == { a = 7; })
432432- ((strip res3) == { a = 7; b = 10; })
433433- ((strip res4) == { a = 7; b = 10; })
434434- ((strip res5) == { a = 10; })
435435- ((strip res6) == { a = 17; })
436436- ((strip resRem7) == {})
437437- ((strip resFixed1) == { a = 7; b = 10; c =10; name = "name-10"; })
438438- ];
439439- expected = true;
440440- };
441441-442404}
···343343 <literal><![CDATA[security.pam.services.<name?>.text]]></literal>.
344344 </para>
345345 </listitem>
346346+ <listitem>
347347+ <para>
348348+ <literal>fish</literal> has been upgraded to 3.0.
349349+ It comes with a number of improvements and backwards incompatible changes.
350350+ See the <literal>fish</literal> <link xlink:href="https://github.com/fish-shell/fish-shell/releases/tag/3.0.0">release notes</link> for more information.
351351+ </para>
352352+ </listitem>
346353 </itemizedlist>
347354 </section>
348355···359366 The <option>services.matomo</option> module gained the option
360367 <option>services.matomo.package</option> which determines the used
361368 Matomo version.
369369+ </para>
370370+ </listitem>
371371+ <listitem>
372372+ <para>
373373+ <literal>composableDerivation</literal> along with supporting library functions
374374+ has been removed.
362375 </para>
363376 </listitem>
364377 <listitem>
···2525 DESTDIR=$(out)
2626 '';
27272828- propagatedBuildInputs = with python3Packages; [ pyqt5 ];
2828+ propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ];
29293030 postInstall = ''
3131 # replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
···39394040 #doCheck = false;
41414242+ NIX_CFLAGS_COMPILE = [
4343+ "-Wno-deprecated-declarations"
4444+ ];
4545+4246 meta = with stdenv.lib; {
4347 description = "A 3D editor with support for procedural editing";
4448 homepage = http://www.k-3d.org/;
+2-2
pkgs/applications/misc/calibre/default.nix
···2323 ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
24242525 prePatch = ''
2626- sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':" \
2626+ sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5_with_qtwebkit}/share/sip/PyQt5':" \
2727 setup/build_environment.py
28282929 # Remove unneeded files and libs
···4242 fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
4343 ] ++ (with python2Packages; [
4444 apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
4545- python pyqt5 sip
4545+ python pyqt5_with_qtwebkit sip
4646 regex msgpack
4747 # the following are distributed with calibre, but we use upstream instead
4848 odfpy
+2-2
pkgs/applications/misc/cherrytree/default.nix
···44stdenv.mkDerivation rec {
5566 name = "cherrytree-${version}";
77- version = "0.38.6";
77+ version = "0.38.7";
8899 src = fetchurl {
1010 url = "https://www.giuspen.com/software/${name}.tar.xz";
1111- sha256 = "0b83ygv0y4lrclsyagmllkwiia62xkwij14i6z53avba191jvhma";
1111+ sha256 = "1ls7vz993hj5gd99imlrzahxznfg6fa4n77ikkj79va4csw9b892";
1212 };
13131414 buildInputs = with pythonPackages;
···77# Dropbox client to bootstrap installation.
88# The client is self-updating, so the actual version may be newer.
99let
1010- version = "55.4.171";
1010+ version = "63.4.107";
11111212 arch = {
1313 "x86_64-linux" = "x86_64";
···11-From 92f4dca367c3a6f0536a1e0f3fbb44bb6ed4da62 Mon Sep 17 00:00:00 2001
22-From: Manuel Nickschas <sputnick@quassel-irc.org>
33-Date: Thu, 3 May 2018 23:19:34 +0200
44-Subject: [PATCH] cmake: Fix build with Qt 5.11
55-66-Qt 5.11 removes the qt5_use_modules function, so add a copy. If
77-present, the Qt-provided function will be used instead.
88-99-Closes GH-355.
1010----
1111- cmake/QuasselMacros.cmake | 38 ++++++++++++++++++++++++++++++++++++++
1212- 1 file changed, 38 insertions(+)
1313-1414-diff --git a/cmake/QuasselMacros.cmake b/cmake/QuasselMacros.cmake
1515-index 652c0042..d77ba1cf 100644
1616---- a/cmake/QuasselMacros.cmake
1717-+++ b/cmake/QuasselMacros.cmake
1818-@@ -5,6 +5,9 @@
1919- # The qt4_use_modules function was taken from CMake's Qt4Macros.cmake:
2020- # (C) 2005-2009 Kitware, Inc.
2121- #
2222-+# The qt5_use_modules function was taken from Qt 5.10.1 (and modified):
2323-+# (C) 2005-2011 Kitware, Inc.
2424-+#
2525- # Redistribution and use is allowed according to the terms of the BSD license.
2626- # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
2727-2828-@@ -43,6 +46,41 @@ function(qt4_use_modules _target _link_type)
2929- endforeach()
3030- endfunction()
3131-3232-+# Qt 5.11 removed the qt5_use_modules function, so we need to provide it until we can switch to a modern CMake version.
3333-+# If present, the Qt-provided version will be used automatically instead.
3434-+function(qt5_use_modules _target _link_type)
3535-+ if (NOT TARGET ${_target})
3636-+ message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
3737-+ endif()
3838-+ if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
3939-+ set(_qt5_modules ${ARGN})
4040-+ set(_qt5_link_type ${_link_type})
4141-+ else()
4242-+ set(_qt5_modules ${_link_type} ${ARGN})
4343-+ endif()
4444-+
4545-+ if ("${_qt5_modules}" STREQUAL "")
4646-+ message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
4747-+ endif()
4848-+ foreach(_module ${_qt5_modules})
4949-+ if (NOT Qt5${_module}_FOUND)
5050-+ find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
5151-+ if (NOT Qt5${_module}_FOUND)
5252-+ message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
5353-+ endif()
5454-+ endif()
5555-+ target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
5656-+ set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
5757-+ set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
5858-+ if (Qt5_POSITION_INDEPENDENT_CODE
5959-+ AND (CMAKE_VERSION VERSION_LESS 2.8.12
6060-+ AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
6161-+ OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
6262-+ set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
6363-+ endif()
6464-+ endforeach()
6565-+endfunction()
6666-+
6767- # Some wrappers for simplifying dual-Qt support
6868-6969- function(qt_use_modules)
7070---
7171-2.16.2
7272-
···11-diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst
22-index 2347a1190d..f5b0fe71a4 100644
33---- a/src/doc/en/faq/faq-usage.rst
44-+++ b/src/doc/en/faq/faq-usage.rst
55-@@ -338,7 +338,7 @@ ints. For example::
66- sage: RealNumber = float; Integer = int
77- sage: from scipy import stats
88- sage: stats.ttest_ind(list([1,2,3,4,5]),list([2,3,4,5,.6]))
99-- Ttest_indResult(statistic=0.076752955645333687, pvalue=0.94070490247380478)
1010-+ Ttest_indResult(statistic=0.0767529..., pvalue=0.940704...)
1111- sage: stats.uniform(0,15).ppf([0.5,0.7])
1212- array([ 7.5, 10.5])
1313-1414-diff --git a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
1515-index 314811c42b..e5f54ec4c2 100644
1616---- a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
1717-+++ b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
1818-@@ -48,11 +48,13 @@ we could do the following.
1919- sage: B = numpy.array([1.0]*5)
2020- sage: B.shape=(5,1)
2121- sage: print(B)
2222-- [[ 1.]
2323-- [ 1.]
2424-- [ 1.]
2525-- [ 1.]
2626-- [ 1.]]
2727-+ [[1.]
2828-+ [1.]
2929-+ [1.]
3030-+ [1.]
3131-+ [1.]]
3232-+
3333-+
3434- sage: print(A)
3535- [ 2.00e+00 3.00e+00 0 0 0 ]
3636- [ 3.00e+00 0 4.00e+00 0 6.00e+00]
3737-diff --git a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
3838-index 5b89cd75ee..e50b2ea5d4 100644
3939---- a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
4040-+++ b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
4141-@@ -84,7 +84,7 @@ well as take slices
4242- sage: l[3]
4343- 3.0
4444- sage: l[3:6]
4545-- array([ 3., 4., 5.])
4646-+ array([3., 4., 5.])
4747-4848- You can do basic arithmetic operations
4949-5050-@@ -147,11 +147,11 @@ also do matrix vector multiplication, and matrix addition
5151- sage: n = numpy.matrix([[1,2],[3,4]],dtype=float)
5252- sage: v = numpy.array([[1],[2]],dtype=float)
5353- sage: n*v
5454-- matrix([[ 5.],
5555-- [ 11.]])
5656-+ matrix([[ 5.],
5757-+ [11.]])
5858- sage: n+n
5959-- matrix([[ 2., 4.],
6060-- [ 6., 8.]])
6161-+ matrix([[2., 4.],
6262-+ [6., 8.]])
6363-6464- If ``n`` was created with :meth:`numpy.array`, then to do matrix vector
6565- multiplication, you would use ``numpy.dot(n,v)``.
6666-@@ -170,11 +170,11 @@ to manipulate
6767- 22., 23., 24.])
6868- sage: n.shape=(5,5)
6969- sage: n
7070-- array([[ 0., 1., 2., 3., 4.],
7171-- [ 5., 6., 7., 8., 9.],
7272-- [ 10., 11., 12., 13., 14.],
7373-- [ 15., 16., 17., 18., 19.],
7474-- [ 20., 21., 22., 23., 24.]])
7575-+ array([[ 0., 1., 2., 3., 4.],
7676-+ [ 5., 6., 7., 8., 9.],
7777-+ [10., 11., 12., 13., 14.],
7878-+ [15., 16., 17., 18., 19.],
7979-+ [20., 21., 22., 23., 24.]])
8080-8181- This changes the one-dimensional array into a `5\times 5` array.
8282-8383-@@ -187,8 +187,8 @@ NumPy arrays can be sliced as well
8484- sage: n=numpy.array(range(25),dtype=float)
8585- sage: n.shape=(5,5)
8686- sage: n[2:4,1:3]
8787-- array([[ 11., 12.],
8888-- [ 16., 17.]])
8989-+ array([[11., 12.],
9090-+ [16., 17.]])
9191-9292- It is important to note that the sliced matrices are references to
9393- the original
9494-@@ -224,8 +224,8 @@ Some particularly useful commands are
9595-9696- sage: x=numpy.arange(0,2,.1,dtype=float)
9797- sage: x
9898-- array([ 0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ,
9999-- 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
100100-+ array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2,
101101-+ 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
102102-103103- You can see that :meth:`numpy.arange` creates an array of floats increasing by 0.1
104104- from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained by example
105105-@@ -240,10 +240,11 @@ from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained b
106106- sage: Integer=int
107107- sage: n=r_[0.0:5.0]
108108- sage: n
109109-- array([ 0., 1., 2., 3., 4.])
110110-+ array([0., 1., 2., 3., 4.])
111111- sage: n=r_[0.0:5.0, [0.0]*5]
112112- sage: n
113113-- array([ 0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
114114-+ array([0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
115115-+
116116-117117- :meth:`numpy.r_` provides a shorthand for constructing NumPy arrays efficiently.
118118- Note in the above ``0.0:5.0`` was shorthand for ``0.0, 1.0, 2.0, 3.0, 4.0``.
119119-@@ -255,7 +256,7 @@ intervals. We can do this as follows
120120- ::
121121-122122- sage: r_[0.0:5.0:11*j]
123123-- array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
124124-+ array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
125125-126126- The notation ``0.0:5.0:11*j`` expands to a list of 11 equally space
127127- points between 0 and 5 including both endpoints. Note that ``j`` is the
128128-@@ -287,23 +288,23 @@ an equally spaced grid with `\Delta x = \Delta y = .25` for
129129- sage: y=numpy.r_[0.0:1.0:5*j]
130130- sage: xx,yy= meshgrid(x,y)
131131- sage: xx
132132-- array([[ 0. , 0.25, 0.5 , 0.75, 1. ],
133133-- [ 0. , 0.25, 0.5 , 0.75, 1. ],
134134-- [ 0. , 0.25, 0.5 , 0.75, 1. ],
135135-- [ 0. , 0.25, 0.5 , 0.75, 1. ],
136136-- [ 0. , 0.25, 0.5 , 0.75, 1. ]])
137137-+ array([[0. , 0.25, 0.5 , 0.75, 1. ],
138138-+ [0. , 0.25, 0.5 , 0.75, 1. ],
139139-+ [0. , 0.25, 0.5 , 0.75, 1. ],
140140-+ [0. , 0.25, 0.5 , 0.75, 1. ],
141141-+ [0. , 0.25, 0.5 , 0.75, 1. ]])
142142- sage: yy
143143-- array([[ 0. , 0. , 0. , 0. , 0. ],
144144-- [ 0.25, 0.25, 0.25, 0.25, 0.25],
145145-- [ 0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
146146-- [ 0.75, 0.75, 0.75, 0.75, 0.75],
147147-- [ 1. , 1. , 1. , 1. , 1. ]])
148148-+ array([[0. , 0. , 0. , 0. , 0. ],
149149-+ [0.25, 0.25, 0.25, 0.25, 0.25],
150150-+ [0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
151151-+ [0.75, 0.75, 0.75, 0.75, 0.75],
152152-+ [1. , 1. , 1. , 1. , 1. ]])
153153- sage: f(xx,yy)
154154-- array([[ 0. , 0.0625, 0.25 , 0.5625, 1. ],
155155-- [ 0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
156156-- [ 0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
157157-- [ 0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
158158-- [ 1. , 1.0625, 1.25 , 1.5625, 2. ]])
159159-+ array([[0. , 0.0625, 0.25 , 0.5625, 1. ],
160160-+ [0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
161161-+ [0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
162162-+ [0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
163163-+ [1. , 1.0625, 1.25 , 1.5625, 2. ]])
164164-165165- You can see that :meth:`numpy.meshgrid` produces a pair of matrices, here denoted
166166- `xx` and `yy`, such that `(xx[i,j],yy[i,j])` has coordinates
167167-@@ -324,7 +325,7 @@ equation `Ax=b` do
168168- sage: b=numpy.array(range(1,6))
169169- sage: x=linalg.solve(A,b)
170170- sage: numpy.dot(A,x)
171171-- array([ 1., 2., 3., 4., 5.])
172172-+ array([1., 2., 3., 4., 5.])
173173-174174- This creates a random 5x5 matrix ``A``, and solves `Ax=b` where
175175- ``b=[0.0,1.0,2.0,3.0,4.0]``. There are many other routines in the :mod:`numpy.linalg`
176176-diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx
177177-index 60f37f7557..4ac3dedf1d 100644
178178---- a/src/sage/calculus/riemann.pyx
179179-+++ b/src/sage/calculus/riemann.pyx
180180-@@ -1191,30 +1191,30 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
181181- sage: zval = numpy.array([[0, 1, 1000],[.2+.3j,1,-.3j],[0,0,0]],dtype = numpy.complex128)
182182- sage: deriv = numpy.array([[.1]],dtype = numpy.float64)
183183- sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,False,0.001)
184184-- array([[[ 1., 1., 1.],
185185-- [ 1., 1., 1.],
186186-- [ 1., 1., 1.]],
187187-+ array([[[1., 1., 1.],
188188-+ [1., 1., 1.],
189189-+ [1., 1., 1.]],
190190- <BLANKLINE>
191191-- [[ 1., 1., 1.],
192192-- [ 0., 0., 0.],
193193-- [ 1., 1., 1.]],
194194-+ [[1., 1., 1.],
195195-+ [0., 0., 0.],
196196-+ [1., 1., 1.]],
197197- <BLANKLINE>
198198-- [[ 1., 1., 1.],
199199-- [ 1., 1., 1.],
200200-- [ 1., 1., 1.]]])
201201-+ [[1., 1., 1.],
202202-+ [1., 1., 1.],
203203-+ [1., 1., 1.]]])
204204-205205- sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,True,0.001)
206206-- array([[[ 1. , 1. , 1. ],
207207-- [ 1. , 0.05558355, 0.05558355],
208208-- [ 0.17301243, 0. , 0. ]],
209209-+ array([[[1. , 1. , 1. ],
210210-+ [1. , 0.05558355, 0.05558355],
211211-+ [0.17301243, 0. , 0. ]],
212212- <BLANKLINE>
213213-- [[ 1. , 0.96804683, 0.48044583],
214214-- [ 0. , 0. , 0. ],
215215-- [ 0.77351965, 0.5470393 , 1. ]],
216216-+ [[1. , 0.96804683, 0.48044583],
217217-+ [0. , 0. , 0. ],
218218-+ [0.77351965, 0.5470393 , 1. ]],
219219- <BLANKLINE>
220220-- [[ 1. , 1. , 1. ],
221221-- [ 1. , 1. , 1. ],
222222-- [ 1. , 1. , 1. ]]])
223223-+ [[1. , 1. , 1. ],
224224-+ [1. , 1. , 1. ],
225225-+ [1. , 1. , 1. ]]])
226226- """
227227- cdef Py_ssize_t i, j, imax, jmax
228228- cdef FLOAT_T x, y, mag, arg, width, target, precision, dmag, darg
229229-@@ -1279,14 +1279,14 @@ cpdef complex_to_rgb(np.ndarray[COMPLEX_T, ndim = 2] z_values):
230230- sage: from sage.calculus.riemann import complex_to_rgb
231231- sage: import numpy
232232- sage: complex_to_rgb(numpy.array([[0, 1, 1000]], dtype = numpy.complex128))
233233-- array([[[ 1. , 1. , 1. ],
234234-- [ 1. , 0.05558355, 0.05558355],
235235-- [ 0.17301243, 0. , 0. ]]])
236236-+ array([[[1. , 1. , 1. ],
237237-+ [1. , 0.05558355, 0.05558355],
238238-+ [0.17301243, 0. , 0. ]]])
239239-240240- sage: complex_to_rgb(numpy.array([[0, 1j, 1000j]], dtype = numpy.complex128))
241241-- array([[[ 1. , 1. , 1. ],
242242-- [ 0.52779177, 1. , 0.05558355],
243243-- [ 0.08650622, 0.17301243, 0. ]]])
244244-+ array([[[1. , 1. , 1. ],
245245-+ [0.52779177, 1. , 0.05558355],
246246-+ [0.08650622, 0.17301243, 0. ]]])
247247-248248-249249- TESTS::
250250-diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py
251251-index 0a9bd61267..d2193cc2d6 100644
252252---- a/src/sage/combinat/fully_packed_loop.py
253253-+++ b/src/sage/combinat/fully_packed_loop.py
254254-@@ -72,11 +72,11 @@ def _make_color_list(n, colors=None, color_map=None, randomize=False):
255255- sage: _make_color_list(5, ['blue', 'red'])
256256- ['blue', 'red', 'blue', 'red', 'blue']
257257- sage: _make_color_list(5, color_map='summer')
258258-- [(0.0, 0.5, 0.40000000000000002),
259259-- (0.25098039215686274, 0.62549019607843137, 0.40000000000000002),
260260-- (0.50196078431372548, 0.75098039215686274, 0.40000000000000002),
261261-- (0.75294117647058822, 0.87647058823529411, 0.40000000000000002),
262262-- (1.0, 1.0, 0.40000000000000002)]
263263-+ [(0.0, 0.5, 0.4),
264264-+ (0.25098039215686274, 0.6254901960784314, 0.4),
265265-+ (0.5019607843137255, 0.7509803921568627, 0.4),
266266-+ (0.7529411764705882, 0.8764705882352941, 0.4),
267267-+ (1.0, 1.0, 0.4)]
268268- sage: _make_color_list(8, ['blue', 'red'], randomize=True)
269269- ['blue', 'blue', 'red', 'blue', 'red', 'red', 'red', 'blue']
270270- """
271271-diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx
272272-index 28779365df..3ab0282861 100644
273273---- a/src/sage/finance/time_series.pyx
274274-+++ b/src/sage/finance/time_series.pyx
275275-@@ -111,8 +111,8 @@ cdef class TimeSeries:
276276-277277- sage: import numpy
278278- sage: v = numpy.array([[1,2], [3,4]], dtype=float); v
279279-- array([[ 1., 2.],
280280-- [ 3., 4.]])
281281-+ array([[1., 2.],
282282-+ [3., 4.]])
283283- sage: finance.TimeSeries(v)
284284- [1.0000, 2.0000, 3.0000, 4.0000]
285285- sage: finance.TimeSeries(v[:,0])
286286-@@ -2100,14 +2100,14 @@ cdef class TimeSeries:
287287-288288- sage: w[0] = 20
289289- sage: w
290290-- array([ 20. , -3. , 4.5, -2. ])
291291-+ array([20. , -3. , 4.5, -2. ])
292292- sage: v
293293- [20.0000, -3.0000, 4.5000, -2.0000]
294294-295295- If you want a separate copy do not give the ``copy=False`` option. ::
296296-297297- sage: z = v.numpy(); z
298298-- array([ 20. , -3. , 4.5, -2. ])
299299-+ array([20. , -3. , 4.5, -2. ])
300300- sage: z[0] = -10
301301- sage: v
302302- [20.0000, -3.0000, 4.5000, -2.0000]
303303-diff --git a/src/sage/functions/hyperbolic.py b/src/sage/functions/hyperbolic.py
304304-index aff552f450..7a6df931e7 100644
305305---- a/src/sage/functions/hyperbolic.py
306306-+++ b/src/sage/functions/hyperbolic.py
307307-@@ -214,7 +214,7 @@ class Function_coth(GinacFunction):
308308- sage: import numpy
309309- sage: a = numpy.arange(2, 5)
310310- sage: coth(a)
311311-- array([ 1.03731472, 1.00496982, 1.00067115])
312312-+ array([1.03731472, 1.00496982, 1.00067115])
313313- """
314314- return 1.0 / tanh(x)
315315-316316-@@ -267,7 +267,7 @@ class Function_sech(GinacFunction):
317317- sage: import numpy
318318- sage: a = numpy.arange(2, 5)
319319- sage: sech(a)
320320-- array([ 0.26580223, 0.09932793, 0.03661899])
321321-+ array([0.26580223, 0.09932793, 0.03661899])
322322- """
323323- return 1.0 / cosh(x)
324324-325325-@@ -318,7 +318,7 @@ class Function_csch(GinacFunction):
326326- sage: import numpy
327327- sage: a = numpy.arange(2, 5)
328328- sage: csch(a)
329329-- array([ 0.27572056, 0.09982157, 0.03664357])
330330-+ array([0.27572056, 0.09982157, 0.03664357])
331331- """
332332- return 1.0 / sinh(x)
333333-334334-@@ -586,7 +586,7 @@ class Function_arccoth(GinacFunction):
335335- sage: import numpy
336336- sage: a = numpy.arange(2,5)
337337- sage: acoth(a)
338338-- array([ 0.54930614, 0.34657359, 0.25541281])
339339-+ array([0.54930614, 0.34657359, 0.25541281])
340340- """
341341- return arctanh(1.0 / x)
342342-343343-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
344344-index ed6365bef4..99b8b04dad 100644
345345---- a/src/sage/functions/orthogonal_polys.py
346346-+++ b/src/sage/functions/orthogonal_polys.py
347347-@@ -810,12 +810,12 @@ class Func_chebyshev_T(ChebyshevFunction):
348348- sage: z2 = numpy.array([[1,2],[1,2]])
349349- sage: z3 = numpy.array([1,2,3.])
350350- sage: chebyshev_T(1,z)
351351-- array([ 1., 2.])
352352-+ array([1., 2.])
353353- sage: chebyshev_T(1,z2)
354354-- array([[ 1., 2.],
355355-- [ 1., 2.]])
356356-+ array([[1., 2.],
357357-+ [1., 2.]])
358358- sage: chebyshev_T(1,z3)
359359-- array([ 1., 2., 3.])
360360-+ array([1., 2., 3.])
361361- sage: chebyshev_T(z,0.1)
362362- array([ 0.1 , -0.98])
363363- """
364364-@@ -1095,12 +1095,12 @@ class Func_chebyshev_U(ChebyshevFunction):
365365- sage: z2 = numpy.array([[1,2],[1,2]])
366366- sage: z3 = numpy.array([1,2,3.])
367367- sage: chebyshev_U(1,z)
368368-- array([ 2., 4.])
369369-+ array([2., 4.])
370370- sage: chebyshev_U(1,z2)
371371-- array([[ 2., 4.],
372372-- [ 2., 4.]])
373373-+ array([[2., 4.],
374374-+ [2., 4.]])
375375- sage: chebyshev_U(1,z3)
376376-- array([ 2., 4., 6.])
377377-+ array([2., 4., 6.])
378378- sage: chebyshev_U(z,0.1)
379379- array([ 0.2 , -0.96])
380380- """
381381-diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
382382-index 1883daa3e6..9885222817 100644
383383---- a/src/sage/functions/other.py
384384-+++ b/src/sage/functions/other.py
385385-@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction):
386386- sage: import numpy
387387- sage: a = numpy.linspace(0,2,6)
388388- sage: ceil(a)
389389-- array([ 0., 1., 1., 2., 2., 2.])
390390-+ array([0., 1., 1., 2., 2., 2.])
391391-392392- Test pickling::
393393-394394-@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction):
395395- sage: import numpy
396396- sage: a = numpy.linspace(0,2,6)
397397- sage: floor(a)
398398-- array([ 0., 0., 0., 1., 1., 2.])
399399-+ array([0., 0., 0., 1., 1., 2.])
400400- sage: floor(x)._sympy_()
401401- floor(x)
402402-403403-@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds):
404404- sage: import numpy
405405- sage: a = numpy.arange(2,5)
406406- sage: sqrt(a)
407407-- array([ 1.41421356, 1.73205081, 2. ])
408408-+ array([1.41421356, 1.73205081, 2. ])
409409- """
410410- if isinstance(x, float):
411411- return math.sqrt(x)
412412-diff --git a/src/sage/functions/spike_function.py b/src/sage/functions/spike_function.py
413413-index 1e021de3fe..56635ca98f 100644
414414---- a/src/sage/functions/spike_function.py
415415-+++ b/src/sage/functions/spike_function.py
416416-@@ -157,7 +157,7 @@ class SpikeFunction:
417417- sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
418418- A spike function with spikes at [-3.0, -1.0, 2.0]
419419- sage: P = S.plot_fft_abs(8)
420420-- sage: p = P[0]; p.ydata
421421-+ sage: p = P[0]; p.ydata # abs tol 1e-8
422422- [5.0, 5.0, 3.367958691924177, 3.367958691924177, 4.123105625617661, 4.123105625617661, 4.759921664218055, 4.759921664218055]
423423- """
424424- w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
425425-@@ -176,8 +176,8 @@ class SpikeFunction:
426426- sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
427427- A spike function with spikes at [-3.0, -1.0, 2.0]
428428- sage: P = S.plot_fft_arg(8)
429429-- sage: p = P[0]; p.ydata
430430-- [0.0, 0.0, -0.211524990023434..., -0.211524990023434..., 0.244978663126864..., 0.244978663126864..., -0.149106180027477..., -0.149106180027477...]
431431-+ sage: p = P[0]; p.ydata # abs tol 1e-8
432432-+ [0.0, 0.0, -0.211524990023434, -0.211524990023434, 0.244978663126864, 0.244978663126864, -0.149106180027477, -0.149106180027477]
433433- """
434434- w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
435435- xmin, xmax = self._ranges(xmin, xmax)
436436-diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py
437437-index 501e7ff6b6..5f760912f0 100644
438438---- a/src/sage/functions/trig.py
439439-+++ b/src/sage/functions/trig.py
440440-@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction):
441441- sage: import numpy
442442- sage: a = numpy.arange(2, 5)
443443- sage: arccot(a)
444444-- array([ 0.46364761, 0.32175055, 0.24497866])
445445-+ array([0.46364761, 0.32175055, 0.24497866])
446446- """
447447- return math.pi/2 - arctan(x)
448448-449449-@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction):
450450- sage: import numpy
451451- sage: a = numpy.arange(2, 5)
452452- sage: arccsc(a)
453453-- array([ 0.52359878, 0.33983691, 0.25268026])
454454-+ array([0.52359878, 0.33983691, 0.25268026])
455455- """
456456- return arcsin(1.0/x)
457457-458458-@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction):
459459- sage: import numpy
460460- sage: a = numpy.arange(2, 5)
461461- sage: arcsec(a)
462462-- array([ 1.04719755, 1.23095942, 1.31811607])
463463-+ array([1.04719755, 1.23095942, 1.31811607])
464464- """
465465- return arccos(1.0/x)
466466-467467-@@ -913,13 +913,13 @@ class Function_arctan2(GinacFunction):
468468- sage: a = numpy.linspace(1, 3, 3)
469469- sage: b = numpy.linspace(3, 6, 3)
470470- sage: atan2(a, b)
471471-- array([ 0.32175055, 0.41822433, 0.46364761])
472472-+ array([0.32175055, 0.41822433, 0.46364761])
473473-474474- sage: atan2(1,a)
475475-- array([ 0.78539816, 0.46364761, 0.32175055])
476476-+ array([0.78539816, 0.46364761, 0.32175055])
477477-478478- sage: atan2(a, 1)
479479-- array([ 0.78539816, 1.10714872, 1.24904577])
480480-+ array([0.78539816, 1.10714872, 1.24904577])
481481-482482- TESTS::
483483-484484-diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx
485485-index 12136f1773..491bf22e62 100644
486486---- a/src/sage/matrix/constructor.pyx
487487-+++ b/src/sage/matrix/constructor.pyx
488488-@@ -503,8 +503,8 @@ def matrix(*args, **kwds):
489489- [7 8 9]
490490- Full MatrixSpace of 3 by 3 dense matrices over Integer Ring
491491- sage: n = matrix(QQ, 2, 2, [1, 1/2, 1/3, 1/4]).numpy(); n
492492-- array([[ 1. , 0.5 ],
493493-- [ 0.33333333, 0.25 ]])
494494-+ array([[1. , 0.5 ],
495495-+ [0.33333333, 0.25 ]])
496496- sage: matrix(QQ, n)
497497- [ 1 1/2]
498498- [1/3 1/4]
499499-diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx
500500-index 66e54a79a4..0498334f4b 100644
501501---- a/src/sage/matrix/matrix_double_dense.pyx
502502-+++ b/src/sage/matrix/matrix_double_dense.pyx
503503-@@ -606,6 +606,9 @@ cdef class Matrix_double_dense(Matrix_dense):
504504- [ 3.0 + 9.0*I 4.0 + 16.0*I 5.0 + 25.0*I]
505505- [6.0 + 36.0*I 7.0 + 49.0*I 8.0 + 64.0*I]
506506- sage: B.condition()
507507-+ doctest:warning
508508-+ ...
509509-+ ComplexWarning: Casting complex values to real discards the imaginary part
510510- 203.851798...
511511- sage: B.condition(p='frob')
512512- 203.851798...
513513-@@ -654,9 +657,7 @@ cdef class Matrix_double_dense(Matrix_dense):
514514- True
515515- sage: B = A.change_ring(CDF)
516516- sage: B.condition()
517517-- Traceback (most recent call last):
518518-- ...
519519-- LinAlgError: Singular matrix
520520-+ +Infinity
521521-522522- Improper values of ``p`` are caught. ::
523523-524524-@@ -2519,7 +2520,7 @@ cdef class Matrix_double_dense(Matrix_dense):
525525- sage: P.is_unitary(algorithm='orthonormal')
526526- Traceback (most recent call last):
527527- ...
528528-- ValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,)
529529-+ error: ((lwork==-1)||(lwork >= MAX(1,2*n))) failed for 3rd keyword lwork: zgees:lwork=0
530530-531531- TESTS::
532532-533533-@@ -3635,8 +3636,8 @@ cdef class Matrix_double_dense(Matrix_dense):
534534- [0.0 1.0 2.0]
535535- [3.0 4.0 5.0]
536536- sage: m.numpy()
537537-- array([[ 0., 1., 2.],
538538-- [ 3., 4., 5.]])
539539-+ array([[0., 1., 2.],
540540-+ [3., 4., 5.]])
541541-542542- Alternatively, numpy automatically calls this function (via
543543- the magic :meth:`__array__` method) to convert Sage matrices
544544-@@ -3647,16 +3648,16 @@ cdef class Matrix_double_dense(Matrix_dense):
545545- [0.0 1.0 2.0]
546546- [3.0 4.0 5.0]
547547- sage: numpy.array(m)
548548-- array([[ 0., 1., 2.],
549549-- [ 3., 4., 5.]])
550550-+ array([[0., 1., 2.],
551551-+ [3., 4., 5.]])
552552- sage: numpy.array(m).dtype
553553- dtype('float64')
554554- sage: m = matrix(CDF, 2, range(6)); m
555555- [0.0 1.0 2.0]
556556- [3.0 4.0 5.0]
557557- sage: numpy.array(m)
558558-- array([[ 0.+0.j, 1.+0.j, 2.+0.j],
559559-- [ 3.+0.j, 4.+0.j, 5.+0.j]])
560560-+ array([[0.+0.j, 1.+0.j, 2.+0.j],
561561-+ [3.+0.j, 4.+0.j, 5.+0.j]])
562562- sage: numpy.array(m).dtype
563563- dtype('complex128')
564564-565565-diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py
566566-index ccbd208810..c3f9a65093 100644
567567---- a/src/sage/matrix/special.py
568568-+++ b/src/sage/matrix/special.py
569569-@@ -706,7 +706,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
570570-571571- sage: import numpy
572572- sage: entries = numpy.array([1.2, 5.6]); entries
573573-- array([ 1.2, 5.6])
574574-+ array([1.2, 5.6])
575575- sage: A = diagonal_matrix(3, entries); A
576576- [1.2 0.0 0.0]
577577- [0.0 5.6 0.0]
578578-@@ -716,7 +716,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
579579-580580- sage: j = numpy.complex(0,1)
581581- sage: entries = numpy.array([2.0+j, 8.1, 3.4+2.6*j]); entries
582582-- array([ 2.0+1.j , 8.1+0.j , 3.4+2.6j])
583583-+ array([2. +1.j , 8.1+0.j , 3.4+2.6j])
584584- sage: A = diagonal_matrix(entries); A
585585- [2.0 + 1.0*I 0.0 0.0]
586586- [ 0.0 8.1 0.0]
587587-diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx
588588-index 37d92c1282..955d083b34 100644
589589---- a/src/sage/modules/free_module_element.pyx
590590-+++ b/src/sage/modules/free_module_element.pyx
591591-@@ -988,7 +988,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
592592- sage: v.numpy()
593593- array([1, 2, 5/6], dtype=object)
594594- sage: v.numpy(dtype=float)
595595-- array([ 1. , 2. , 0.83333333])
596596-+ array([1. , 2. , 0.83333333])
597597- sage: v.numpy(dtype=int)
598598- array([1, 2, 0])
599599- sage: import numpy
600600-@@ -999,7 +999,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
601601- be more efficient but may have unintended consequences::
602602-603603- sage: v.numpy(dtype=None)
604604-- array([ 1. , 2. , 0.83333333])
605605-+ array([1. , 2. , 0.83333333])
606606-607607- sage: w = vector(ZZ, [0, 1, 2^63 -1]); w
608608- (0, 1, 9223372036854775807)
609609-diff --git a/src/sage/modules/vector_double_dense.pyx b/src/sage/modules/vector_double_dense.pyx
610610-index 39fc2970de..2badf98284 100644
611611---- a/src/sage/modules/vector_double_dense.pyx
612612-+++ b/src/sage/modules/vector_double_dense.pyx
613613-@@ -807,13 +807,13 @@ cdef class Vector_double_dense(FreeModuleElement):
614614-615615- sage: v = vector(CDF,4,range(4))
616616- sage: v.numpy()
617617-- array([ 0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
618618-+ array([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
619619- sage: v = vector(CDF,0)
620620- sage: v.numpy()
621621- array([], dtype=complex128)
622622- sage: v = vector(RDF,4,range(4))
623623- sage: v.numpy()
624624-- array([ 0., 1., 2., 3.])
625625-+ array([0., 1., 2., 3.])
626626- sage: v = vector(RDF,0)
627627- sage: v.numpy()
628628- array([], dtype=float64)
629629-@@ -823,11 +823,11 @@ cdef class Vector_double_dense(FreeModuleElement):
630630- sage: import numpy
631631- sage: v = vector(CDF, 3, range(3))
632632- sage: v.numpy()
633633-- array([ 0.+0.j, 1.+0.j, 2.+0.j])
634634-+ array([0.+0.j, 1.+0.j, 2.+0.j])
635635- sage: v.numpy(dtype=numpy.float64)
636636-- array([ 0., 1., 2.])
637637-+ array([0., 1., 2.])
638638- sage: v.numpy(dtype=numpy.float32)
639639-- array([ 0., 1., 2.], dtype=float32)
640640-+ array([0., 1., 2.], dtype=float32)
641641- """
642642- if dtype is None or dtype is self._vector_numpy.dtype:
643643- from copy import copy
644644-diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx
645645-index ad9693da62..758fb709b7 100644
646646---- a/src/sage/plot/complex_plot.pyx
647647-+++ b/src/sage/plot/complex_plot.pyx
648648-@@ -61,9 +61,9 @@ cdef inline double mag_to_lightness(double r):
649649-650650- sage: from sage.plot.complex_plot import complex_to_rgb
651651- sage: complex_to_rgb([[0, 1, 10]])
652652-- array([[[ 0. , 0. , 0. ],
653653-- [ 0.77172568, 0. , 0. ],
654654-- [ 1. , 0.22134776, 0.22134776]]])
655655-+ array([[[0. , 0. , 0. ],
656656-+ [0.77172568, 0. , 0. ],
657657-+ [1. , 0.22134776, 0.22134776]]])
658658- """
659659- return atan(log(sqrt(r)+1)) * (4/PI) - 1
660660-661661-@@ -82,13 +82,13 @@ def complex_to_rgb(z_values):
662662-663663- sage: from sage.plot.complex_plot import complex_to_rgb
664664- sage: complex_to_rgb([[0, 1, 1000]])
665665-- array([[[ 0. , 0. , 0. ],
666666-- [ 0.77172568, 0. , 0. ],
667667-- [ 1. , 0.64421177, 0.64421177]]])
668668-+ array([[[0. , 0. , 0. ],
669669-+ [0.77172568, 0. , 0. ],
670670-+ [1. , 0.64421177, 0.64421177]]])
671671- sage: complex_to_rgb([[0, 1j, 1000j]])
672672-- array([[[ 0. , 0. , 0. ],
673673-- [ 0.38586284, 0.77172568, 0. ],
674674-- [ 0.82210588, 1. , 0.64421177]]])
675675-+ array([[[0. , 0. , 0. ],
676676-+ [0.38586284, 0.77172568, 0. ],
677677-+ [0.82210588, 1. , 0.64421177]]])
678678- """
679679- import numpy
680680- cdef unsigned int i, j, imax, jmax
681681-diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py
682682-index 5d28473731..fc4b2046c0 100644
683683---- a/src/sage/plot/histogram.py
684684-+++ b/src/sage/plot/histogram.py
685685-@@ -53,10 +53,17 @@ class Histogram(GraphicPrimitive):
686686- """
687687- import numpy as np
688688- self.datalist=np.asarray(datalist,dtype=float)
689689-+ if 'normed' in options:
690690-+ from sage.misc.superseded import deprecation
691691-+ deprecation(25260, "the 'normed' option is deprecated. Use 'density' instead.")
692692- if 'linestyle' in options:
693693- from sage.plot.misc import get_matplotlib_linestyle
694694- options['linestyle'] = get_matplotlib_linestyle(
695695- options['linestyle'], return_type='long')
696696-+ if options.get('range', None):
697697-+ # numpy.histogram performs type checks on "range" so this must be
698698-+ # actual floats
699699-+ options['range'] = [float(x) for x in options['range']]
700700- GraphicPrimitive.__init__(self, options)
701701-702702- def get_minmax_data(self):
703703-@@ -80,10 +87,14 @@ class Histogram(GraphicPrimitive):
704704- {'xmax': 4.0, 'xmin': 0, 'ymax': 2, 'ymin': 0}
705705-706706- TESTS::
707707--
708708- sage: h = histogram([10,3,5], normed=True)[0]
709709-- sage: h.get_minmax_data() # rel tol 1e-15
710710-- {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.4761904761904765, 'ymin': 0}
711711-+ doctest:warning...:
712712-+ DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead.
713713-+ See https://trac.sagemath.org/25260 for details.
714714-+ sage: h.get_minmax_data()
715715-+ doctest:warning ...:
716716-+ VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy.
717717-+ {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0}
718718- """
719719- import numpy
720720-721721-@@ -152,7 +163,7 @@ class Histogram(GraphicPrimitive):
722722- 'rwidth': 'The relative width of the bars as a fraction of the bin width',
723723- 'cumulative': '(True or False) If True, then a histogram is computed in which each bin gives the counts in that bin plus all bins for smaller values. Negative values give a reversed direction of accumulation.',
724724- 'range': 'A list [min, max] which define the range of the histogram. Values outside of this range are treated as outliers and omitted from counts.',
725725-- 'normed': 'Deprecated alias for density',
726726-+ 'normed': 'Deprecated. Use density instead.',
727727- 'density': '(True or False) If True, the counts are normalized to form a probability density. (n/(len(x)*dbin)',
728728- 'weights': 'A sequence of weights the same length as the data list. If supplied, then each value contributes its associated weight to the bin count.',
729729- 'stacked': '(True or False) If True, multiple data are stacked on top of each other.',
730730-@@ -199,7 +210,7 @@ class Histogram(GraphicPrimitive):
731731- subplot.hist(self.datalist.transpose(), **options)
732732-733733-734734--@options(aspect_ratio='automatic',align='mid', weights=None, range=None, bins=10, edgecolor='black')
735735-+@options(aspect_ratio='automatic', align='mid', weights=None, range=None, bins=10, edgecolor='black')
736736- def histogram(datalist, **options):
737737- """
738738- Computes and draws the histogram for list(s) of numerical data.
739739-@@ -231,8 +242,9 @@ def histogram(datalist, **options):
740740- - ``linewidth`` -- (float) width of the lines defining the bars
741741- - ``linestyle`` -- (default: 'solid') Style of the line. One of 'solid'
742742- or '-', 'dashed' or '--', 'dotted' or ':', 'dashdot' or '-.'
743743-- - ``density`` -- (boolean - default: False) If True, the counts are
744744-- normalized to form a probability density.
745745-+ - ``density`` -- (boolean - default: False) If True, the result is the
746746-+ value of the probability density function at the bin, normalized such
747747-+ that the integral over the range is 1.
748748- - ``range`` -- A list [min, max] which define the range of the
749749- histogram. Values outside of this range are treated as outliers and
750750- omitted from counts
751751-diff --git a/src/sage/plot/line.py b/src/sage/plot/line.py
752752-index 23f5e61446..3b1b51d7cf 100644
753753---- a/src/sage/plot/line.py
754754-+++ b/src/sage/plot/line.py
755755-@@ -502,14 +502,12 @@ def line2d(points, **options):
756756- from sage.plot.all import Graphics
757757- from sage.plot.plot import xydata_from_point_list
758758- from sage.rings.all import CC, CDF
759759-+ points = list(points) # make sure points is a python list
760760- if points in CC or points in CDF:
761761- pass
762762- else:
763763-- try:
764764-- if not points:
765765-- return Graphics()
766766-- except ValueError: # numpy raises a ValueError if not empty
767767-- pass
768768-+ if len(points) == 0:
769769-+ return Graphics()
770770- xdata, ydata = xydata_from_point_list(points)
771771- g = Graphics()
772772- g._set_extra_kwds(Graphics._extract_kwds_for_show(options))
773773-diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py
774774-index 0025098a8d..23c80902f3 100644
775775---- a/src/sage/plot/plot_field.py
776776-+++ b/src/sage/plot/plot_field.py
777777-@@ -49,9 +49,10 @@ class PlotField(GraphicPrimitive):
778778- sage: r.xpos_array
779779- [0.0, 0.0, 1.0, 1.0]
780780- sage: r.yvec_array
781781-- masked_array(data = [0.0 0.70710678118... 0.70710678118... 0.89442719...],
782782-- mask = [False False False False],
783783-- fill_value = 1e+20)
784784-+ masked_array(data=[0.0, 0.70710678118..., 0.70710678118...,
785785-+ 0.89442719...],
786786-+ mask=[False, False, False, False],
787787-+ fill_value=1e+20)
788788-789789- TESTS:
790790-791791-diff --git a/src/sage/plot/streamline_plot.py b/src/sage/plot/streamline_plot.py
792792-index f3da57c370..3806f4b32f 100644
793793---- a/src/sage/plot/streamline_plot.py
794794-+++ b/src/sage/plot/streamline_plot.py
795795-@@ -38,16 +38,14 @@ class StreamlinePlot(GraphicPrimitive):
796796- sage: r.options()['plot_points']
797797- 2
798798- sage: r.xpos_array
799799-- array([ 0., 1.])
800800-+ array([0., 1.])
801801- sage: r.yvec_array
802802-- masked_array(data =
803803-- [[1.0 1.0]
804804-- [0.5403023058681398 0.5403023058681398]],
805805-- mask =
806806-- [[False False]
807807-- [False False]],
808808-- fill_value = 1e+20)
809809-- <BLANKLINE>
810810-+ masked_array(
811811-+ data=[[1.0, 1.0],
812812-+ [0.5403023058681398, 0.5403023058681398]],
813813-+ mask=[[False, False],
814814-+ [False, False]],
815815-+ fill_value=1e+20)
816816-817817- TESTS:
818818-819819-diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
820820-index 1b119e323f..3290b00695 100644
821821---- a/src/sage/probability/probability_distribution.pyx
822822-+++ b/src/sage/probability/probability_distribution.pyx
823823-@@ -130,7 +130,17 @@ cdef class ProbabilityDistribution:
824824- 0.0,
825825- 1.4650000000000003]
826826- sage: b
827827-- [0.0, 0.20000000000000001, 0.40000000000000002, 0.60000000000000009, 0.80000000000000004, 1.0, 1.2000000000000002, 1.4000000000000001, 1.6000000000000001, 1.8, 2.0]
828828-+ [0.0,
829829-+ 0.2,
830830-+ 0.4,
831831-+ 0.6000000000000001,
832832-+ 0.8,
833833-+ 1.0,
834834-+ 1.2000000000000002,
835835-+ 1.4000000000000001,
836836-+ 1.6,
837837-+ 1.8,
838838-+ 2.0]
839839- """
840840- import pylab
841841- l = [float(self.get_random_element()) for _ in range(num_samples)]
842842-diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
843843-index 12ca1b222b..9bad7dae0c 100644
844844---- a/src/sage/rings/rational.pyx
845845-+++ b/src/sage/rings/rational.pyx
846846-@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement):
847847- dtype('O')
848848-849849- sage: numpy.array([1, 1/2, 3/4])
850850-- array([ 1. , 0.5 , 0.75])
851851-+ array([1. , 0.5 , 0.75])
852852- """
853853- if mpz_cmp_ui(mpq_denref(self.value), 1) == 0:
854854- if mpz_fits_slong_p(mpq_numref(self.value)):
855855-diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx
856856-index 9b90c8833e..1ce05b937d 100644
857857---- a/src/sage/rings/real_mpfr.pyx
858858-+++ b/src/sage/rings/real_mpfr.pyx
859859-@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
860860-861861- sage: import numpy
862862- sage: numpy.arange(10.0)
863863-- array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
864864-+ array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
865865- sage: numpy.array([1.0, 1.1, 1.2]).dtype
866866- dtype('float64')
867867- sage: numpy.array([1.000000000000000000000000000000000000]).dtype
868868-diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py
869869-index de31fe9883..7a33ea6f5b 100644
870870---- a/src/sage/schemes/elliptic_curves/height.py
871871-+++ b/src/sage/schemes/elliptic_curves/height.py
872872-@@ -1627,18 +1627,18 @@ class EllipticCurveCanonicalHeight:
873873- even::
874874-875875- sage: H.wp_on_grid(v,4)
876876-- array([[ 25.43920182, 5.28760943, 5.28760943, 25.43920182],
877877-- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
878878-- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
879879-- [ 25.43920182, 5.28760943, 5.28760943, 25.43920182]])
880880-+ array([[25.43920182, 5.28760943, 5.28760943, 25.43920182],
881881-+ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
882882-+ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
883883-+ [25.43920182, 5.28760943, 5.28760943, 25.43920182]])
884884-885885- The array of values on the half-grid::
886886-887887- sage: H.wp_on_grid(v,4,True)
888888-- array([[ 25.43920182, 5.28760943],
889889-- [ 6.05099485, 1.83757786],
890890-- [ 6.05099485, 1.83757786],
891891-- [ 25.43920182, 5.28760943]])
892892-+ array([[25.43920182, 5.28760943],
893893-+ [ 6.05099485, 1.83757786],
894894-+ [ 6.05099485, 1.83757786],
895895-+ [25.43920182, 5.28760943]])
896896- """
897897- tau = self.tau(v)
898898- fk, err = self.fk_intervals(v, 15, CDF)
899899-diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx
900900-index 9da38002e8..d61e74bf82 100644
901901---- a/src/sage/symbolic/ring.pyx
902902-+++ b/src/sage/symbolic/ring.pyx
903903-@@ -1136,7 +1136,7 @@ cdef class NumpyToSRMorphism(Morphism):
904904- sage: cos(numpy.int('2'))
905905- cos(2)
906906- sage: numpy.cos(numpy.int('2'))
907907-- -0.41614683654714241
908908-+ -0.4161468365471424
909909- """
910910- cdef _intermediate_ring
911911-
+1
pkgs/applications/science/math/sage/sage-env.nix
···7777 singular
7878 giac
7979 palp
8080+ # needs to be rWrapper since the default `R` doesn't include R's default libraries
8081 rWrapper
8182 gfan
8283 cddlib
+5-25
pkgs/applications/science/math/sage/sage-src.nix
···99# all get the same sources with the same patches applied.
10101111stdenv.mkDerivation rec {
1212- version = "8.4";
1212+ version = "8.5";
1313 name = "sage-src-${version}";
14141515 src = fetchFromGitHub {
1616 owner = "sagemath";
1717 repo = "sage";
1818 rev = version;
1919- sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d";
1919+ sha256 = "08mb9626phsls2phdzqxsnp2df5pn5qr72m0mm4nncby26pwn19c";
2020 };
21212222 # Patches needed because of particularities of nix or the way this is packaged.
···4646 # tests) are also run. That is necessary to test dochtml individually. See
4747 # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
4848 ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
4949+5050+ ./patches/dont-test-guess-gaproot.patch
4951 ];
50525153 # Patches needed because of package updates. We could just pin the versions of
···6870 );
6971 in [
7072 # New glpk version has new warnings, filter those out until upstream sage has found a solution
7373+ # Should be fixed with glpk > 4.65.
7174 # https://trac.sagemath.org/ticket/24824
7275 ./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
7376 (fetchpatch {
···7679 stripLen = 1;
7780 })
78817979- # https://trac.sagemath.org/ticket/25260
8080- ./patches/numpy-1.15.1.patch
8181-8282 # https://trac.sagemath.org/ticket/26315
8383 ./patches/giac-1.5.0.patch
8484-8585- # needed for ntl update
8686- # https://trac.sagemath.org/ticket/25532
8787- (fetchpatch {
8888- name = "lcalc-c++11.patch";
8989- url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
9090- sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb";
9191- })
9292-9393- (fetchpatch {
9494- name = "cython-0.29.patch";
9595- url = "https://git.sagemath.org/sage.git/patch/?h=f77de1d0e7f90ee12761140500cb8cbbb789ab20";
9696- sha256 = "14wrpy8jgbnpza1j8a2nx8y2r946y82pll1fv3cn6gpfmm6640l3";
9797- })
9898- # https://trac.sagemath.org/ticket/26360
9999- (fetchpatch {
100100- name = "arb-2.15.1.patch";
101101- url = "https://git.sagemath.org/sage.git/patch/?id=30cc778d46579bd0c7537ed33e8d7a4f40fd5c31";
102102- sha256 = "13vc2q799dh745sm59xjjabllfj0sfjzcacf8k59kwj04x755d30";
103103- })
1048410585 # https://trac.sagemath.org/ticket/26326
10686 # needs to be split because there is a merge commit in between
···33, sage-with-env
44, makeWrapper
55, files ? null # "null" means run all tests
66-, longTests ? true # run tests marked as "long time"
66+, longTests ? true # run tests marked as "long time" (roughly doubles runtime)
77+# Run as many tests as possible in approximately n seconds. This will give each
88+# file to test a "time budget" and stop tests if it is exceeded. 300 is the
99+# upstream default value.
1010+# https://trac.sagemath.org/ticket/25270 for details.
1111+, timeLimit ? null
712}:
813914# for a quick test of some source files:
···1419 runAllTests = files == null;
1520 testArgs = if runAllTests then "--all" else testFileList;
1621 patienceSpecifier = if longTests then "--long" else "";
2222+ timeSpecifier = if timeLimit == null then "" else "--short ${toString timeLimit}";
1723 relpathToArg = relpath: lib.escapeShellArg "${src}/${relpath}"; # paths need to be absolute
1824 testFileList = lib.concatStringsSep " " (map relpathToArg files);
1925in
···4551 export HOME="$TMPDIR/sage-home"
4652 mkdir -p "$HOME"
47534848- # "--long" tests are in the order of 1h, without "--long" its 1/2h
4949- "sage" -t --timeout=0 --nthreads "$NIX_BUILD_CORES" --optional=sage ${patienceSpecifier} ${testArgs}
5454+ echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}"
5555+ "sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs}
5056 '';
5157}
+1
pkgs/applications/science/math/sage/sage.nix
···54545555 passthru = {
5656 tests = sage-tests;
5757+ quicktest = sage-tests.override { longTests = false; timeLimit = 600; }; # as many tests as possible in ~10m
5758 doc = sagedoc;
5859 lib = sage-with-env.env.lib;
5960 kernelspec = jupyter-kernel-definition;
···176176 ];
177177 };
178178 };
179179+180180+ # 12. example of running something as root on top of a parent image
181181+ # Regression test related to PR #52109
182182+ runAsRootParentImage = buildImage {
183183+ name = "runAsRootParentImage";
184184+ tag = "latest";
185185+ runAsRoot = "touch /example-file";
186186+ fromImage = bash;
187187+ };
179188}
···22222323 meta = {
2424 homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
2525- description = "Battery plugin for Xfce panel";
2525+ description = "A simple XFCE panel plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period";
2626 platforms = platforms.linux;
2727 license = licenses.gpl2;
2828 maintainers = [ ];
···44}:
5566let
77- version = "0.7.1";
77+ version = "0.7.2";
88 # Build a sort of "union package" with all the native dependencies we
99 # have: Lua (or LuaJIT), readline, etc. Then, we can depend on this
1010 # and refer to ${urn-rt} instead of ${lua}, ${readline}, etc.
···2727 owner = "urn";
2828 repo = "urn";
2929 rev = "v${version}";
3030- sha256 = "1vw0sljrczbwl7fl5d3frbpklb0larzyp7s7mwwprkb07b027sd5";
3030+ sha256 = "0nclr3d8ap0y5cg36i7g4ggdqci6m5q27y9f26b57km8p266kcpy";
3131 };
32323333 buildInputs = [ makeWrapper ];
···1515 preConfigure = "sh bootstrap.sh";
16161717 meta = {
1818+ description = "Abandoned library. Alternative lightweight Matroska muxer written for HandBrake";
1919+ longDescription = ''
2020+ Library was meant to be an alternative to the official libmatroska library.
2121+ It is written in plain C, and intended to be very portable.
2222+ '';
1823 homepage = https://github.com/saintdev/libmkv;
1924 license = stdenv.lib.licenses.gpl2;
2025 maintainers = [ stdenv.lib.maintainers.wmertens ];
+6
pkgs/development/libraries/libogg/default.nix
···1111 outputs = [ "out" "dev" "doc" ];
12121313 meta = with stdenv.lib; {
1414+ description = "Media container library to manipulate Ogg files";
1515+ longDescription = ''
1616+ Library to work with Ogg multimedia container format.
1717+ Ogg is flexible file storage and streaming format that supports
1818+ plethora of codecs. Open format free for anyone to use.
1919+ '';
1420 homepage = https://xiph.org/ogg/;
1521 license = licenses.bsd3;
1622 maintainers = [ maintainers.ehmry ];
···2233stdenv.mkDerivation rec {
44 name = "matomo-${version}";
55- version = "3.6.1";
55+ version = "3.7.0";
6677 src = fetchurl {
88 # TODO: As soon as the tarballs are renamed as well on future releases, this should be enabled again
99 # url = "https://builds.matomo.org/${name}.tar.gz";
1010 url = "https://builds.matomo.org/piwik-${version}.tar.gz";
1111- sha256 = "0hddj1gyyriwgsh1mghihck2i7rj6gvb1i0b2ripcdfjnxcs47hz";
1111+ sha256 = "17ihsmwdfrx1c1v8cp5pc3swx3h0i0l9pjrc8jyww08kavfbfly6";
1212 };
13131414 nativeBuildInputs = [ makeWrapper ];
+12-12
pkgs/shells/fish/default.nix
···11{ stdenv, fetchurl, coreutils, utillinux,
22- nettools, bc, which, gnused, gnugrep,
22+ which, gnused, gnugrep,
33 groff, man-db, getent, libiconv, pcre2,
44- gettext, ncurses, python3
44+ gettext, ncurses, python3,
55+ cmake
5667 , writeText
78···88898990 fish = stdenv.mkDerivation rec {
9091 name = "fish-${version}";
9191- version = "2.7.1";
9292+ version = "3.0.0";
92939394 etcConfigAppendix = builtins.toFile "etc-config.appendix.fish" etcConfigAppendixText;
9495···9697 # There are differences between the release tarball and the tarball github packages from the tag
9798 # Hence we cannot use fetchFromGithub
9899 url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${name}.tar.gz";
9999- sha256 = "0nhc3yc5lnnan7zmxqqxm07rdpwjww5ijy45ll2njdc6fnfb2az4";
100100+ sha256 = "1kzjd0n0sfslkd36lzrvvvgy3qwkd9y466bkrqlnhd5h9dhx77ga";
100101 };
101102103103+ nativeBuildInputs = [ cmake ];
102104 buildInputs = [ ncurses libiconv pcre2 ];
103103- configureFlags = [ "--without-included-pcre2" ];
105105+ cmakeFlags = [ "-DINTERNAL_WCWIDTH=OFF" ];
106106+107107+ preConfigure = ''
108108+ patchShebangs ./build_tools/git_version_gen.sh
109109+ '';
104110105111 # Required binaries during execution
106112 # Python: Autocompletion generated from manpages and config editing
107113 propagatedBuildInputs = [
108108- coreutils gnugrep gnused bc
114114+ coreutils gnugrep gnused
109115 python3 groff gettext
110116 ] ++ optional (!stdenv.isDarwin) man-db;
111117112118 postInstall = ''
113119 sed -r "s|command grep|command ${gnugrep}/bin/grep|" \
114120 -i "$out/share/fish/functions/grep.fish"
115115- sed -e "s|bc|${bc}/bin/bc|" \
116116- -e "s|/usr/bin/seq|${coreutils}/bin/seq|" \
117117- -i "$out/share/fish/functions/seq.fish" \
118118- "$out/share/fish/functions/math.fish"
119121 sed -i "s|which |${which}/bin/which |" \
120122 "$out/share/fish/functions/type.fish"
121123 sed -e "s|\|cut|\|${coreutils}/bin/cut|" \
···147149 done
148150149151 '' + optionalString (!stdenv.isDarwin) ''
150150- sed -i "s|(hostname\||(${nettools}/bin/hostname\||" \
151151- "$out/share/fish/functions/fish_prompt.fish"
152152 sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \
153153 "$out/share/fish/tools/create_manpage_completions.py"
154154 sed -i "s|command manpath|command ${man-db}/bin/manpath|" \