Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge tag '7.4.beta2' into t/21295/sequences/recognizable
Browse files Browse the repository at this point in the history
SageMath version 7.4.beta2

* tag '7.4.beta2': (135 commits)
  Updated SageMath version to 7.4.beta2
  Small change in a doctest
  Small fixes. All doctests pass (hopefully)
  Rewrite coerce_binop. Fix a bug exposed by this in fields.py
  removed base_ring option from abelian_variety() in ell_rational_field.py
  trac 21310 get rid of itervalues in the combinat folder
  trac 21308 better doc
  trac 21308 add one reference + more doc
  trac 21308 better doc
  implement the magnitude function of a graph
  12364: adding doctest
  removal of another bunch of useless .keys()
  Add traceback line to doctest
  formatting changes to automorphims in rational_field
  added automorphisms to rational_field
  detail
  18709: improve docstrings; make case of multiple roots more efficient
  Correct exception raising to Py3 format
  added abelian_variety() to ell_rational_field
  a bunch of typos, including "because"
  ...
  • Loading branch information
dkrenn committed Aug 26, 2016
2 parents c7243a6 + 5cd62cb commit 352751e
Show file tree
Hide file tree
Showing 195 changed files with 2,797 additions and 992 deletions.
2 changes: 1 addition & 1 deletion COPYING.txt
Expand Up @@ -801,7 +801,7 @@ at the notice in config.guess or ltmain.sh.)

The atomic_ops library contains some code that is covered by the GNU General
Public License, but is not needed by, nor linked into the collector library.
It is included here only becuase the atomic_ops distribution is, for
It is included here only because the atomic_ops distribution is, for
simplicity, included in its entirety.

================================================================================
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
@@ -1 +1 @@
SageMath version 7.4.beta1, Release Date: 2016-08-17
SageMath version 7.4.beta2, Release Date: 2016-08-26
5 changes: 5 additions & 0 deletions build/pkgs/bliss/dependencies
@@ -0,0 +1,5 @@
# no dependencies

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
22 changes: 22 additions & 0 deletions build/pkgs/configparser/SPKG.txt
@@ -0,0 +1,22 @@
= configparser =

== Description ==

This library brings the updated configparser from Python 3.5 to Python 2.6-3.5.

The ancient ConfigParser module available in the standard library 2.x
has seen a major update in Python 3.2. This is a backport of those
changes so that they can be used directly in Python 2.6 - 3.5.

To use the configparser backport instead of the built-in version on both
Python 2 and Python 3, simply import it explicitly as a backport:

from backports import configparser

If you'd like to use the backport on Python 2 and the built-in version
on Python 3, use that invocation instead:

import configparser

For detailed documentation consult the vanilla version at
http://docs.python.org/3/library/configparser.html.
4 changes: 4 additions & 0 deletions build/pkgs/configparser/checksums.ini
@@ -0,0 +1,4 @@
tarball=configparser-VERSION.tar.gz
sha1=8ee6b29c6a11977c0e094da1d4f5f71e7e7ac78b
md5=cfdd915a5b7a6c09917a64a573140538
cksum=3139292895
5 changes: 5 additions & 0 deletions build/pkgs/configparser/dependencies
@@ -0,0 +1,5 @@
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/configparser/package-version.txt
@@ -0,0 +1 @@
3.5.0
3 changes: 3 additions & 0 deletions build/pkgs/configparser/spkg-install
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

cd src && pip install --verbose --no-index .
1 change: 1 addition & 0 deletions build/pkgs/configparser/type
@@ -0,0 +1 @@
standard
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=7bf585bca9e2ee124152b7ff7268e63bdee8d5ba
md5=71088e94c8b154037848cbf03ff823c4
cksum=2410748983
sha1=3d13a8f9dcaef6c048d0d21f91338b0b3d0fe125
md5=63fc727ca070844c580b5a722d177cb1
cksum=3010448970
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
@@ -1 +1 @@
178
179
2 changes: 1 addition & 1 deletion build/pkgs/ecm/package-version.txt
@@ -1 +1 @@
6.4.4
6.4.4.p0
26 changes: 26 additions & 0 deletions build/pkgs/ecm/patches/cygwin.patch
@@ -0,0 +1,26 @@
Make sure the assembly routines use the appropriate calling convention
for Windows in Cygwin as well. See https://trac.sagemath.org/ticket/21223
diff -ruN a/configure.in b/configure.in
--- a/configure.in 2016-08-11 13:51:46.869520300 +0200
+++ b/configure.in 2016-08-11 13:52:46.240830400 +0200
@@ -256,7 +256,7 @@
GMP_ASM_TYPE

case $host in
- *-*-mingw32) GMP_DEFINE([WINDOWS64_ABI], 1)
+ *-*-mingw32|*cygwin*) GMP_DEFINE([WINDOWS64_ABI], 1)
AC_DEFINE([WINDOWS64_ABI], 1,[Define to 1 if x86_64 mulredc*() functions should be called with Windows ABI]);;
*) ;;
esac
diff -ruN a/configure b/configure
--- a/configure 2016-08-11 13:51:46.936572300 +0200
+++ b/configure 2016-08-11 13:53:31.281801500 +0200
@@ -12957,7 +12957,7 @@


case $host in
- *-*-mingw32)
+ *-*-mingw32|*cygwin*)
echo 'define(<WINDOWS64_ABI>, <1>)' >>$gmp_tmpconfigm4


17 changes: 17 additions & 0 deletions build/pkgs/entrypoints/SPKG.txt
@@ -0,0 +1,17 @@
= entrypoints =

== Description ==

Discover and load entry points from installed packages.

== Upstream Contact ==

https://github.com/takluyver/entrypoints

== Special Update/Build Instructions ==

Upstream does not provide a source tarball, so the tarball was taken
from github and renamed.

The source tarball does not contain setup.py, so we put the setup
commands in spkg-install.
4 changes: 4 additions & 0 deletions build/pkgs/entrypoints/checksums.ini
@@ -0,0 +1,4 @@
tarball=entrypoints-VERSION.tar.gz
sha1=75f43c6051e5d7b3bec7cf11fb7228d447efb06b
md5=7dae980f7c6affd777dc60a51c8d0b0b
cksum=2039305359
5 changes: 5 additions & 0 deletions build/pkgs/entrypoints/dependencies
@@ -0,0 +1,5 @@
$(PYTHON) | pip configparser

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/entrypoints/package-version.txt
@@ -0,0 +1 @@
0.2.2
9 changes: 9 additions & 0 deletions build/pkgs/entrypoints/setup.py
@@ -0,0 +1,9 @@
#!/usr/bin/env python
#
# Upstream does not have a setup.py file, so we use this instead
#

from entrypoints import __version__ as v

from setuptools import setup
setup(name="entrypoints", version=v, py_modules=["entrypoints"])
7 changes: 7 additions & 0 deletions build/pkgs/entrypoints/spkg-install
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
#
# Upstream does not have a setup.py file, so we supply one with Sage
#

mv setup.py src
cd src && pip install --verbose --no-index .
1 change: 1 addition & 0 deletions build/pkgs/entrypoints/type
@@ -0,0 +1 @@
standard
6 changes: 3 additions & 3 deletions build/pkgs/pari/checksums.ini
@@ -1,4 +1,4 @@
tarball=pari-VERSION.tar.gz
sha1=a936e0ed661c8e453578f3c129c3a454e2039e3e
md5=59f2e4c3c51f7652182400489cd76e6a
cksum=1366291737
sha1=efd1eb6b8d87066b2b9f3b2c38ecb30bbfdb48d2
md5=f3f3342913a3b3b306970b3462f4d47d
cksum=1553747906
2 changes: 1 addition & 1 deletion build/pkgs/pari/package-version.txt
@@ -1 +1 @@
2.8-2771-gb70b447.p0
2.8.0.alpha.p0
16 changes: 16 additions & 0 deletions build/pkgs/r/patches/rcmd_exec.patch
@@ -0,0 +1,16 @@
On Cygwin some of the scripts in $R_HOME/bin can fail to be recognized
as executable, because they do no contain a shebang line and, depending
on the ACL settings in the Cygwin mount, may not have an executable flag
either. This results in the scripts not being run properly. It's fine
to just check that they exist. See https://trac.sagemath.org/ticket/20655
--- a/src/scripts/Rcmd.in 2016-05-24 17:54:31.786568400 +0200
+++ b/src/scripts/Rcmd.in 2016-05-24 17:54:55.402067200 +0200
@@ -50,7 +50,7 @@
exit 1
;;
*)
- if test -x "${R_HOME}/bin/${1}"; then
+ if test -f "${R_HOME}/bin/${1}"; then
cmd="${R_HOME}/bin/${1}"
else
cmd="${1}"
10 changes: 10 additions & 0 deletions build/pkgs/terminado/SPKG.txt
@@ -0,0 +1,10 @@
= terminado =

== Description ==

This is a Tornado websocket backend for the term.js Javascript terminal
emulator library.

It evolved out of pyxterm, which was part of GraphTerm (as lineterm.py),
v0.57.0 (2014-07-18), and ultimately derived from the public-domain
Ajaxterm code, v0.11 (2008-11-13) (also on Github as part of QWeb).
4 changes: 4 additions & 0 deletions build/pkgs/terminado/checksums.ini
@@ -0,0 +1,4 @@
tarball=terminado-VERSION.tar.gz
sha1=5b2e42a23d6195474d320d4923c673866ccab07e
md5=5b6c65da27fe1ed07a9f80f0588cdaba
cksum=2602823520
5 changes: 5 additions & 0 deletions build/pkgs/terminado/dependencies
@@ -0,0 +1,5 @@
$(PYTHON) | pip ptyprocess tornado

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/terminado/package-version.txt
@@ -0,0 +1 @@
0.6
3 changes: 3 additions & 0 deletions build/pkgs/terminado/spkg-install
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

cd src && pip install --verbose --no-index .
1 change: 1 addition & 0 deletions build/pkgs/terminado/type
@@ -0,0 +1 @@
standard
2 changes: 1 addition & 1 deletion src/bin/sage-banner
@@ -1,5 +1,5 @@
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.4.beta1, Release Date: 2016-08-17
│ SageMath version 7.4.beta2, Release Date: 2016-08-26
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
Expand Down
4 changes: 2 additions & 2 deletions src/bin/sage-version.sh
@@ -1,4 +1,4 @@
# Sage version information for shell scripts
# This file is auto-generated by the sage-update-version script, do not edit!
SAGE_VERSION='7.4.beta1'
SAGE_RELEASE_DATE='2016-08-17'
SAGE_VERSION='7.4.beta2'
SAGE_RELEASE_DATE='2016-08-26'
4 changes: 2 additions & 2 deletions src/doc/en/thematic_tutorials/lie/branching_rules.rst
Expand Up @@ -641,8 +641,8 @@ Symmetric powers
----------------

The `k`-th symmetric and exterior power homomorphisms map
`GL(n) \to GL \left({n+k-1 \choose k} \right)` and
`GL \left({n \choose k} \right)`. The corresponding branching rules
`GL(n) \to GL \left(\binom{n+k-1}{k} \right)` and
`GL \left(\binom{n}{k} \right)`. The corresponding branching rules
are not implemented but a special case is. The `k`-th symmetric power
homomorphism `SL(2) \to GL(k+1)` has its image inside of `SO(2r+1)` if
`k = 2r` and inside of `Sp(2r)` if `k = 2r-1`. Hence there are
Expand Down
4 changes: 2 additions & 2 deletions src/doc/en/thematic_tutorials/linear_programming.rst
Expand Up @@ -319,7 +319,7 @@ the matching, which is a linear constraint. We will be solving:

.. MATH::
\text{Max: } & \sum_{e \in E(G)} m_e\\
\text{Such that: } & \forall v, \sum_{e \in E(G) \atop v \sim e} m_e \leq 1
\text{Such that: } & \forall v, \sum_{\substack{e \in E(G) \\ v \sim e}} m_e \leq 1
Let us write the Sage code of this MILP::

Expand Down Expand Up @@ -385,7 +385,7 @@ following LP

.. MATH::
\text{Max: } & \sum_{sv \in G} f_{sv}\\
\text{Such that: } & \forall v \in G, {v \neq s \atop v \neq t}, \sum_{vu \in G} f_{vu} - \sum_{uv \in G} f_{uv} = 0\\
\text{Such that: } & \forall v \in G, {\substack{v \neq s \\ v \neq t}}, \sum_{vu \in G} f_{vu} - \sum_{uv \in G} f_{uv} = 0\\
& \forall uv \in G, f_{uv} \leq 1\\
We will solve the flow problem on an orientation of Chvatal's
Expand Down
15 changes: 10 additions & 5 deletions src/doc/en/thematic_tutorials/tutorial-comprehensions.rst
Expand Up @@ -227,15 +227,20 @@ Here is the analogue of list slicing::
sage: list(itertools.islice(Permutations(3), 1, 4))
[[1, 3, 2], [2, 1, 3], [2, 3, 1]]

The functions :func:`map` and :func:`filter` also have an analogue::

sage: list(itertools.imap(lambda z: z.cycle_type(), Permutations(3)))
The behaviour of the functions :func:`map` and :func:`filter` has
changed between Python 2 and Python 3. In Python 3, they return an
iterator. If you want to use this new behaviour in Python 2, and keep
your code compatible with Python3, you can use the compatibility
library ``six`` as follows::

sage: from six.moves import map
sage: list(map(lambda z: z.cycle_type(), Permutations(3)))
[[1, 1, 1], [2, 1], [2, 1], [3], [3], [2, 1]]

sage: list(itertools.ifilter(lambda z: z.has_pattern([1,2]), Permutations(3)))
sage: from six.moves import filter
sage: list(filter(lambda z: z.has_pattern([1,2]), Permutations(3)))
[[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2]]


.. TOPIC:: Exercises

#. Define an iterator for the `i`-th prime for `5<i<10`::
Expand Down
33 changes: 19 additions & 14 deletions src/fpickle_setup.py
@@ -1,44 +1,46 @@
"""
The purpose of this file is to allow instancemethods to be pickable.
This is needed in setup.py only and not installed anywhere, thus is not
a library file. It solves the issue from #11874.
a library file. It solves the issue from :trac:`11874`.
"""

import types
from six.moves import copyreg
import copy

from six.moves import copyreg
from six import get_method_function, get_method_self

# The following four methods are taken from twisted.persisted.styles
# into sage.misc.fpickle, and then here. It was needed due to
# chicken vs egg issue, as we cannot use sage.misc.fpickle in
# setup.py of sage-***.spkg


def pickleMethod(method):
'support function for copyreg to pickle method refs'
return unpickleMethod, (method.im_func.__name__,
method.im_self,
method.im_class)
return unpickleMethod, (get_method_function(method).__name__,
get_method_self(method),
get_method_self(method).__class__)


def unpickleMethod(im_name,
im_self,
im_class):
im_self,
im_class):
'support function for copyreg to unpickle method refs'
try:
unbound = getattr(im_class,im_name)
unbound = getattr(im_class, im_name)
if im_self is None:
return unbound
bound=types.MethodType(unbound.im_func,
bound = types.MethodType(get_method_function(unbound),
im_self)
return bound
except AttributeError:
# assert im_self is not None,"No recourse: no instance to guess from."
# Attempt a common fix before bailing -- if classes have
# changed around since we pickled this method, we may still be
# able to get it by looking on the instance's current class.
unbound = getattr(im_self.__class__,im_name)
unbound = getattr(im_self.__class__, im_name)
if im_self is None:
return unbound
bound=types.MethodType(unbound.im_func,
bound = types.MethodType(get_method_function(unbound),
im_self)
return bound

Expand All @@ -48,15 +50,18 @@ def unpickleMethod(im_name,

oldModules = {}


def pickleModule(module):
'support function for copyreg to pickle module refs'
return unpickleModule, (module.__name__,)


def unpickleModule(name):
'support function for copyreg to unpickle module refs'
if name in oldModules:
name = oldModules[name]
return __import__(name,{},{},'x')
return __import__(name, {}, {}, 'x')


copyreg.pickle(types.ModuleType,
pickleModule,
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/letterplace/free_algebra_letterplace.pyx
Expand Up @@ -833,7 +833,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
if not D:
return self.zero()
cdef int l
for e in D.iterkeys():
for e in D:
l = len(e)
break
cdef dict out = {}
Expand Down
11 changes: 6 additions & 5 deletions src/sage/categories/action.pyx
Expand Up @@ -57,13 +57,14 @@ AUTHOR:
#
# http://www.gnu.org/licenses/
#*****************************************************************************
from __future__ import absolute_import

from functor cimport Functor
from morphism cimport Morphism
from map cimport Map
from .functor cimport Functor
from .morphism cimport Morphism
from .map cimport Map
from sage.structure.parent cimport Parent

import homset
from . import homset
import sage.structure.element
from weakref import ref
from sage.misc.constant_function import ConstantFunction
Expand All @@ -79,7 +80,7 @@ cdef inline category(x):
cdef class Action(Functor):

def __init__(self, G, S, bint is_left = 1, op=None):
from groupoid import Groupoid
from .groupoid import Groupoid
Functor.__init__(self, Groupoid(G), category(S))
self.G = G
self.US = ref(S)
Expand Down

0 comments on commit 352751e

Please sign in to comment.