Sage 9.3.beta2 released

179 views
Skip to first unread message

Volker Braun

unread,
Nov 24, 2020, 6:26:08 PM11/24/20
to sage-release
As always, you can get the latest beta version from the "develop" git branch. Alternatively, the self-contained source tarball is at http://www.sagemath.org/download-latest.html 

020bd59ec2 (tag: 9.3.beta2, trac/develop) Updated SageMath version to 9.3.beta2
ee1d038453 Trac #25488: Improved Kash interface
8bf3f4c944 Trac #16804: points() has problems with some lists of complexes containing real (i.e. imag(x)==0) values.
253c17dd35 Trac #14509: Fix LaTeX of free algebras (and repr_lincomb)
7adc2a9160 Trac #30937: Improve error message for jmol
fad5b5b093 Trac #30932: some details in global options
aa85a69719 Trac #30927: Frobenius endomorphisms of p-adic fields pickle incorrectly
40c167483f Trac #30923: tox.ini: Add environments local-sudo-ubuntu-standard, etc.
a91d4b5f52 Trac #30920: refresh affine crystal
d23d3144cc Trac #30919: small change in one dict for preparser for python 3.9
77a020fda7 Trac #30918: one more stable doctest in mutable poset
ec33e38631 Trac #30909: doc tweaks in OEIS
d9e021e6eb Trac #30908: get rid of CombinatorialClass in combination.py
9876939b1f Trac #30907: get rid of CombinatorialClass in parking
ccccdd5070 Trac #30904: changes in shuffle_product
b1c3cc831b Trac #30902: let NCSF know that it is cocommutative
3a662d4d96 Trac #30899: igraph, python-igraph: Update to 0.8.3
5b01884dd2 Trac #30889: remove  CombinatorialAlgebra
7f20b28c6c Trac #30883: Update instructions for conda to use miniforge
9d3278d239 Trac #30881: remove the unused file group_homset
e70b894680 Trac #30880: flake8 for multi_polynomial_ideal.py
da925cb064 Trac #30878: some flake8 details in backend normaliz
60cbf36695 Trac #30873: Fix test failures in distro packages after #25825
b007a8e392 Trac #30871: symmetric functions are commutative
fe12787424 Trac #30869: Some computation hangs in Multizeta
17feb0a0db Trac #30866: remove broken --upgrade option from sage
1a32e62ab9 Trac #30864: Comparison of power series
457a5932ad Trac #30858: add giac to build/pkgs/sagelib/dependencies
5c6da01b89 Trac #30856: get rid of EMBEDDED_MODE from plot.plot
d03689bd25 Trac #30852: let sagelib and sage_sws2rst not depend on six
324b53b9a8 Trac #30851: single-valued multizeta
334dde64cb Trac #30849: Make gcd/lcm interact better with pari and gmpy2
84e9a4d044 Trac #30844: better maple conversion for symbolic matrices
87c261ae60 Trac #30843: AbelianGroup_gap quotient group
7e4ea978a0 Trac #30840: small improvement in Hasse diagram
bb31b65353 Trac #30830: Subintervals of OpenInterval and UniqueRepresentation
1101a45f53 Trac #30812: some details in the det method for general matrices
96df69332a Trac #30804: Add Spheres smoothly embedded in Euclidean Space to Manifold Catalog
2cd4f829da Trac #30784: sage.matrix: Resolve circular imports without using __init__.py
496b3f6d08 Trac #30780: sage_setup: Separate installing and cleaning
772b0cf365 Trac #30704: Upgrade to Normaliz 3.8.9 and PyNormaliz 2.13
5a984431b4 Trac #30611: Upgrade various Python packages for Sage 9.3
027ca17304 Trac #18036: I.parent() should not be the symbolic ring
92e54d90e2 Trac #30733: GH Actions: Remove use of deprecated set-env command
f3a5612806 Trac #30776: Implement an improved subgraph test for graph backends
ae66d47c44 Trac #30765: Adapt to deprecation of seeding based on hashing in Python 3.9
1ac30abb02 Trac #30724: src/bin/sage-env, src/bin/sage-env-config.in: Remove PYTHON_FOR_VENV
3b0553fc3f Trac #30709: Extract cython config to new module
1bf46183f2 Trac #30706: Make sage.env.cython_aliases more flexible regarding what pkgconfig files for BLAS are required
7863f17c27 Trac #30404: Add pyright and pycodestyle checks as Github actions
e4f2646103 Trac #29951: src/bin/sage-env: Make SAGE_ROOT and SAGE_LOCAL optional
3283d50818 Trac #30874: update planarity
f0d19808ec Trac #30719: Add build/pkgs/SPKG/install-requires.txt for all Python packages, remove some unneeded packages
54e53cd8f0 Trac #30744: Symplectic derivation Lie algebra
f0ac785482 Trac #30648: sage --package download is broken
ffa1106a54 Trac #30633: sympow gives "RuntimeError: failed to compute analytic rank" doctest failures
527ccbdded Trac #30627: Rename build/bin/sage-system-python to sage-bootstrap-python
a3fb5aa685 Trac #30524: Remove `maybe_newfaces` in combinatorial polyhedron
7e1fdf7489 Trac #30040: Improve face iterator for simple/simplicial polytopes
ff70229355 Trac #29630: spkg-configure.m4 for libhomfly
430c549394 Trac #29719: upgrade to flint 2.6.3
532e475dbf Trac #30867: Remove mac app
222059565b (tag: 9.3.beta1) Updated SageMath version to 9.3.beta1

Matthias Köppe

unread,
Nov 25, 2020, 12:49:18 AM11/25/20
to sage-release
On Tuesday, November 24, 2020 at 3:26:08 PM UTC-8 Volker Braun wrote:
As always, you can get the latest beta version from the "develop" git branch. Alternatively, the self-contained source tarball is at http://www.sagemath.org/download-latest.html 

020bd59ec2 (tag: 9.3.beta2, trac/develop) Updated SageMath version to 9.3.beta2

Thanks, Volker, for the new release.

Tests are running at https://github.com/sagemath/sage/actions, first results:

Debian/Ubuntu systems – mostly clean, with the following exceptions:

sage -t --random-seed=0 src/sage/graphs/connectivity.pyx  # 2 doctests failed
sage -t --random-seed=0 src/sage/doctest/test.py  # Timed out
sage -t --random-seed=0 src/sage/rings/polynomial/plural.pyx  # 2 doctests failed

The first one is new, I think. File "src/sage/graphs/connectivity.pyx", line 2686, in sage.graphs.connectivity._Component.__init__
Failed example:
    cython(os.linesep.join(cython_code))
[...]
    /sage/local/lib/python3.8/site-packages/sage/data_structures/bitset_intrinsics.h:54:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
         for(mp_bitcnt_t i = 0; i < limbs; i++){

The last one, plural.pyx, is likely the same as https://trac.sagemath.org/ticket/29528

Likewise on ubuntu-trusty-standard, debian-jessie-minimal, debian-jessie-standard

Homebrew: 

homebrew-macos-standard-xcode_default: (https://github.com/sagemath/sage/runs/1450538928)
sage -t --random-seed=0 src/sage/geometry/polyhedron/base.py
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 6499, in sage.geometry.polyhedron.base.Polyhedron_base.face_lattice
Failed example:
    n == get_memory_usage()
Expected:
    True
Got:
    False

https://trac.sagemath.org/ticket/30929 needs review so that Big Sur and more Xcode variations are tested in the next beta.







jonatha...@googlemail.com

unread,
Nov 25, 2020, 3:07:13 AM11/25/20
to sage-release
I opened https://trac.sagemath.org/ticket/30958 for the C99 thing that caused the following:

The first one is new, I think. File "src/sage/graphs/connectivity.pyx", line 2686, in sage.graphs.connectivity._Component.__init__
Failed example:
    cython(os.linesep.join(cython_code))
[...]
    /sage/local/lib/python3.8/site-packages/sage/data_structures/bitset_intrinsics.h:54:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
         for(mp_bitcnt_t i = 0; i < limbs; i++){

Thierry Dumont

unread,
Nov 25, 2020, 4:29:00 AM11/25/20
to sage-r...@googlegroups.com
On my Ubuntu 20-10, upgrading from 9.3 beta 1, make ptestlong:

---------------------------------------------------------------------
sage -t --long --warn-long 89.4 --random-seed=0
src/sage/interfaces/singular.py
# Killed due to segmentation fault
sage -t --long --warn-long 89.4 --random-seed=0
src/sage/modules/fg_pid/fgp_module.py # 3 doctests failed
sage -t --long --warn-long 89.4 --random-seed=0
src/sage/interfaces/sagespawn.pyx # 1 doctest failed
sage -t --long --warn-long 89.4 --random-seed=0
src/sage/modules/free_module_morphism.py # 3 doctests failed
sage -t --long --warn-long 89.4 --random-seed=0
src/doc/en/constructions/algebraic_geometry.rst # 1 doctest failed
sage -t --long --warn-long 89.4 --random-seed=0
src/doc/en/developer/coding_in_other.rst # 1 doctest failed
----------------------------------------------------------------------

Emmanuel Charpentier

unread,
Nov 25, 2020, 7:33:19 AM11/25/20
to sage-release

On Debian testing, I can’t configure an upgrade to a working 9.1.beta1 :

charpent@zen-book-flip:/usr/local/sage-9$ ./configure --enable-download-from-upstream-url
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make -j8 sets $(MAKE)... yes
checking whether make -j8 supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for root user... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for ar... yes
checking for m4... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.29... yes
checking for ranlib... yes
checking for strip... yes
checking for GNU or BSD tar... /bin/tar
checking for Python... ./configure: line 5424: build/bin/sage-system-python: No such file or directory
configure: error: You do not have a suitable version of Python installed

My last compile was a (misguided) attempt to test Trac#30476.

Hints ?

Sébastien Labbé

unread,
Nov 25, 2020, 7:35:31 AM11/25/20
to sage-release
On Ubuntu 18.04, running tests with various optional and external packages, I get:

Using --optional=4ti2,cbc,ccache,cryptominisat,database_jones_numfield,debian,dot2tex,e_antic,external,fricas,glucose,latte_int,libnauty,lidia,lrslib,memlimit,normaliz,notedown,pandoc_attributes,pip,pycosat,pynormaliz,rst2ipynb,sage,sage_numerical_backends_coin,sage_spkg
----------------------------------------------------------------------
sage -t --long --warn-long 56.3 --random-seed=0 src/sage/interfaces/singular.py  # Killed due to segmentation fault
----------------------------------------------------------------------
External software detected for doctesting: ffmpeg,graphviz,imagemagick,internet,latex,octave,pandoc

I can reproduce it when running the command:
sage -t --long --warn-long 73.3 --random-seed=0 src/sage/interfaces/singular.py

Dima Pasechnik

unread,
Nov 25, 2020, 7:49:52 AM11/25/20
to sage-release
Looks like your ./configure is stale.
build/bin/sage-system-python is gone now, and you need to run

./bootstrap

first
> --
> You received this message because you are subscribed to the Google Groups "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-release...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/e7984eaf-f860-47d7-9a31-f09419bfe557n%40googlegroups.com.

Eric Gourgoulhon

unread,
Nov 25, 2020, 7:59:40 AM11/25/20
to sage-release
I confirm the seg fault on Ubuntu 20.04 (Sage 9.3.beta2 built with the system Python = 3.8.5, but with Sage's singular = 4.1.1p2).
On the same computer (Intel Core i7-8665U + 32 GB RAM), the issue is already there with Sage 9.2, but not with Sage 9.1.

Eric.

Dima Pasechnik

unread,
Nov 25, 2020, 8:02:06 AM11/25/20
to sage-release
this one?
https://trac.sagemath.org/ticket/30945
> --
> You received this message because you are subscribed to the Google Groups "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-release...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/16154ebe-6c36-4527-812c-da25a299b0e8n%40googlegroups.com.

Kenji Iohara

unread,
Nov 25, 2020, 8:04:40 AM11/25/20
to sage-r...@googlegroups.com
On my Mac OS 10.15.7, I could compile it from the first built. But for the ptestlong,
it gives me 

sage -t --long --random-seed=0 src/sage/functions/other.py  # 1 doctest failed

sage -t --long --random-seed=0 src/sage/misc/sageinspect.py  # 1 doctest failed

sage -t --long --random-seed=0 src/sage/interfaces/r.py  # 1 doctest failed

sage -t --long --random-seed=0 src/sage/repl/ipython_tests.py  # 1 doctest failed

sage -t --long --random-seed=0 src/sage/interfaces/interface.py  # 1 doctest failed

sage -t --long --random-seed=0 src/sage/interfaces/singular.py  # Killed due to segmentation fault

sage -t --long --random-seed=0 src/doc/en/prep/Quickstarts/Statistics-and-Distributions.rst  # 1 doctest failed

sage -t --long --random-seed=0 src/sage/stats/r.py  # 1 doctest failed

----------------------------------------------------------------------


Here is its log.file:


2020年11月25日(水) 0:26 Volker Braun <vbrau...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-release...@googlegroups.com.
ptestlong.log

Matthias Köppe

unread,
Nov 25, 2020, 3:21:03 PM11/25/20
to sage-release
On Tuesday, November 24, 2020 at 9:49:18 PM UTC-8 Matthias Köppe wrote:
On Tuesday, November 24, 2020 at 3:26:08 PM UTC-8 Volker Braun wrote:
As always, you can get the latest beta version from the "develop" git branch. Alternatively, the self-contained source tarball is at http://www.sagemath.org/download-latest.html 

020bd59ec2 (tag: 9.3.beta2, trac/develop) Updated SageMath version to 9.3.beta2

Thanks, Volker, for the new release.


More results:

linuxmint-17-standard: Various doctest errors of this form:
File "src/sage/tests/cmdline.py", line 179, in sage.tests.cmdline.test_executable
Failed example:
    err
Expected:
    ''
Got:
    'bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\n'

linuxmint-{18,19,19,3} - clean or some failures as reported for Debian/Ubuntu

fedora-28-standard 
sage -t --random-seed=0 src/sage/interfaces/singular.py  # Killed due to segmentation fault
sage -t --random-seed=0 src/sage/rings/polynomial/groebner_fan.py  # 3 doctests failed

File "src/sage/rings/polynomial/groebner_fan.py", line 1752, in sage.rings.polynomial.groebner_fan.GroebnerFan.mixed_volume
Failed example:
    mv = gf.mixed_volume()
Exception raised:
      File "/sage/local/lib64/python3.6/site-packages/sage/rings/polynomial/groebner_fan.py", line 1765, in mixed_volume
        return Integer(self.gfan(cmd='mixedvolume'))
    TypeError: unable to convert '' to an integer

fedora-33-standard
sage -t --random-seed=0 src/sage/functions/other.py # 1 doctest failed

fedora-{26,27,29,30,31,32} - clean


 

Emmanuel Charpentier

unread,
Nov 25, 2020, 4:53:56 PM11/25/20
to sage-release
Thank you very much, Dima !  that did the trick.

Emmanuel Charpentier

unread,
Nov 25, 2020, 4:59:36 PM11/25/20
to sage-release

On Debian testing running on core 17 + 16 GB RAM, upgrading (including bootstrap and configure) and running ptestlong led to no transient and one permanent failure as follows :

charpent@zen-book-flip:/usr/local/sage-9$ sage -t --long --warn-long 168.6 --random-seed=0 src/sage/misc/trace.py
Running doctests with ID 2020-11-25-22-51-10-7a62d8a2.
Git branch: develop
Using --optional=build,cbc,debian,dochtml,dot2tex,fricas,gap_jupyter,memlimit,pari_jupyter,pip,pysingular,saclib,sage,sage_numerical_backends_coin,sage_spkg,singular_jupyter
Doctesting 1 file.
sage -t --long --warn-long 168.6 --random-seed=0 src/sage/misc/trace.py
**********************************************************************
File "src/sage/misc/trace.py", line 67, in sage.misc.trace.trace
Failed example:
    print(s.before[s.before.find(b'--'):].decode())
Expected:
    --...
    ipdb> c
    2 * 5
Got:
    --Call--
    > <CSI-0;32m>/usr/local/sage-9/local/lib/python3.8/site-packages/sage/arith/misc.py<CSI-0m>(2422)<CSI-0;36m>factor<CSI-0;34m>()<CSI-0m>
    <CSI-0;32m>   2420 <CSI-0;31m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m><CSI-0;32m>   2421 <CSI-0;31m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m><CSI-0;32m>-> 2422 <CSI-0;31m><CSI-0;32m>def<CSI-0m> <CSI-0m>factor<CSI-0m><CSI-0;34m>(<CSI-0m><CSI-0m>n<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>proof<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;32m>None<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>int_<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;32m>False<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>algorithm<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;34m>'pari'<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>verbose<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;36m>0<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0;34m>**<CSI-0m><CSI-0m>kwds<CSI-0m><CSI-0;34m>)<CSI-0m><CSI-0;34m>:<CSI-0m><CSI-0;34m><CSI-0m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m><CSI-0;32m>   2423 <CSI-0;31m>    """
    <CSI-0m><CSI-0;32m>   2424 <CSI-0;31m>    <CSI-0m>Return<CSI-0m> <CSI-0m>the<CSI-0m> <CSI-0m>factorization<CSI-0m> <CSI-0m>of<CSI-0m><CSI-0;31m> <CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0m>n<CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0;34m>.<CSI-0m>  <CSI-0m>The<CSI-0m> <CSI-0m>result<CSI-0m> <CSI-0m>depends<CSI-0m> <CSI-0m>on<CSI-0m> <CSI-0m>the<CSI-0m><CSI-0;34m><CSI-0m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m>
    <CSI-?2004h>ipdb> c
2 * 5CSI-?2004l>
    <BLANKLINE>
**********************************************************************
1 item had failures:
   1 of  11 in sage.misc.trace.trace
    [10 tests, 1 failure, 5.18 s]
----------------------------------------------------------------------
sage -t --long --warn-long 168.6 --random-seed=0 src/sage/misc/trace.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 5.2 seconds
    cpu time: 0.0 seconds
    cumulative wall time: 5.2 seconds

All other previously reported failures disappeared.

Of note : configurestill asked for the installation of packages already installed, and reinstaling them had no effect.

HTH,



Le mercredi 25 novembre 2020 à 00:26:08 UTC+1, Volker Braun a écrit :

Eric Gourgoulhon

unread,
Nov 26, 2020, 1:37:19 AM11/26/20
to sage-release
Le mercredi 25 novembre 2020 à 14:02:06 UTC+1, Dima Pasechnik a écrit :

Kenji Iohara

unread,
Nov 26, 2020, 4:53:13 AM11/26/20
to sage-r...@googlegroups.com
I have updated to Mac OS 11.0.1 and the compilation from the first built done without problem !
However, for make ptestlong, there are several errors:
ptestlong.log

Dima Pasechnik

unread,
Nov 26, 2020, 3:35:44 PM11/26/20
to sage-release
A number of tests in your case fail due to a Japanese locale problem, e.g.

Failed example:
sage.misc.sageinspect.sage_getargspec(r.lm)
Expected:
ArgSpec(args=['self'], varargs='args', keywords='kwds', defaults=None)
Got:
起動準備中です - 警告メッセージ:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
ArgSpec(args=['self'], varargs='args', keywords='kwds', defaults=None)

I am not sure what's going on there. It looks like these are coming from
a non-Sage python module, such as re.
What is the output of

sage: import locale
sage: locale.setlocale(locale.LC_ALL, '')

on your system?




On Thu, Nov 26, 2020 at 9:53 AM Kenji Iohara <simplye...@gmail.com> wrote:
>
> I have updated to Mac OS 11.0.1 and the compilation from the first built done without problem !
> However, for make ptestlong, there are several errors:
>
> --
> You received this message because you are subscribed to the Google Groups "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-release...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/25C8E4CC-C2F5-4E9A-B5D2-51971F40C185%40gmail.com.
>
>
> 25/11/2020 22:59、Emmanuel Charpentier <emanuel.c...@gmail.com>のメール:
> --
> You received this message because you are subscribed to the Google Groups "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-release...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/0ba6e9f0-ac21-4dee-ad20-bd51314b6067n%40googlegroups.com.
>
>
> --
> You received this message because you are subscribed to the Google Groups "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-release...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/25C8E4CC-C2F5-4E9A-B5D2-51971F40C185%40gmail.com.

Kenji Iohara

unread,
Nov 26, 2020, 3:39:24 PM11/26/20
to sage-r...@googlegroups.com
I am sorry for this Japanese…..


起動準備中です -  警告メッセージ:    this means    << in preparation for booting…  Warning message >>

It gives me


sage: import locale                                                             
sage: locale.setlocale(locale.LC_ALL,")                                         
  File "<ipython-input-2-95a48a668731>", line 1
    locale.setlocale(locale.LC_ALL,")
                                     ^
SyntaxError: EOL while scanning string literal

Does this tell you something ?


26/11/2020 21:35、Dima Pasechnik <dim...@gmail.com>のメール:

Dima Pasechnik

unread,
Nov 26, 2020, 4:09:40 PM11/26/20
to sage-release


On Thu, 26 Nov 2020, 20:39 Kenji Iohara, <simplye...@gmail.com> wrote:
I am sorry for this Japanese…..


起動準備中です -  警告メッセージ:    this means    << in preparation for booting…  Warning message >>

It gives me


sage: import locale                                                             
sage: locale.setlocale(locale.LC_ALL,")                                         
  File "<ipython-input-2-95a48a668731>", line 1
    locale.setlocale(locale.LC_ALL,")
                                     ^
SyntaxError: EOL while scanning string literal

Does this tell you something ?

oops, sorry, there is " there, but it should be two ' characters one after another.

Kenji Iohara

unread,
Nov 26, 2020, 6:11:19 PM11/26/20
to sage-r...@googlegroups.com
Dima, 

 It gives me 

sage: import locale                                                             
sage: locale.setlocale(locale.LC_ALL,")" 
....:  


or


sage: import locale                                                             
sage: locale.setlocale(locale.LC_ALL,'')''                                      
  File "<ipython-input-2-ca1fa175147f>", line 1
    locale.setlocale(locale.LC_ALL,'')''
                                      ^
SyntaxError: invalid syntax

or

sage: import locale                                                             
sage: locale.setlocale(locale.LC_ALL,")''                                       
  File "<ipython-input-4-3eee4d797d29>", line 1
    locale.setlocale(locale.LC_ALL,")''
                                       ^
SyntaxError: EOL while scanning string literal


…. Is this alright ??

26/11/2020 22:09、Dima Pasechnik <dim...@gmail.com>のメール:

John H Palmieri

unread,
Nov 26, 2020, 6:21:14 PM11/26/20
to sage-release
Dima is suggesting the command locale.setlocale(locale.LC_ALL,''), where just before the parenthesis should be two single quotes. No quotes after the parenthesis. Or if you prefer: locale.setlocale(locale.LC_ALL,"") with two double quotes just before the parenthesis.

dim...@gmail.com

unread,
Nov 26, 2020, 6:24:57 PM11/26/20
to sage-r...@googlegroups.com
On Fri, Nov 27, 2020 at 12:11:15AM +0100, Kenji Iohara wrote:
>
> It gives me
>
> sage: import locale
> sage: locale.setlocale(locale.LC_ALL,")"
> ....:
>
the 2nd line should be

locale.setlocale(locale.LC_ALL,'')

(I don't know why you ended up with " instead of '' in the first
place, probably your keyboard has a setting that automatically
converts '' into ")

HTML email is evil, too - I think it's clearly visible in
my original message that it was '', if viewed with a normal
terminal font :-)

HTH
Dima
signature.asc

Kenji Iohara

unread,
Nov 26, 2020, 6:28:24 PM11/26/20
to sage-r...@googlegroups.com
OK, thanks.  It gives me

sage: import locale                                                             
sage: locale.setlocale(locale.LC_ALL,'')                                        
'C/UTF-8/C/C/C/C’

Does this tell you something ?


27/11/2020 0:21、John H Palmieri <jhpalm...@gmail.com>のメール:

Dima Pasechnik

unread,
Nov 26, 2020, 6:45:22 PM11/26/20
to sage-release
On Thu, Nov 26, 2020 at 11:28 PM Kenji Iohara <simplye...@gmail.com> wrote:
>
> OK, thanks. It gives me
>
> sage: import locale
> sage: locale.setlocale(locale.LC_ALL,'')
> 'C/UTF-8/C/C/C/C’
>
> Does this tell you something ?

this does not look like a valid locale description.
E.g. for me the output is

'en_GB.utf8'

What is the output of locale command in the terminal you start Sage from?
E.g. for me it is

dima@hilbert ~ $ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=

(this is on Linux, on macOS it looks very similar)
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/11F337F2-2AD6-44F6-BD78-5B7B5B9595F0%40gmail.com.

Kenji Iohara

unread,
Nov 26, 2020, 7:17:50 PM11/26/20
to sage-r...@googlegroups.com
It gives me

iohara% locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

… 

27/11/2020 0:45、Dima Pasechnik <dim...@gmail.com>のメール:

Samuel Lelièvre

unread,
Nov 26, 2020, 7:25:56 PM11/26/20
to sage-release
2020-11-26 23:24 UTC, Dima Pasechnik:
>
> the 2nd line should be
>
> locale.setlocale(locale.LC_ALL,'')
>
> (I don't know why you ended up with " instead of '' in the first
> place, probably your keyboard has a setting that automatically
> converts '' into ")
>
> HTML email is evil, too - I think it's clearly visible in
> my original message that it was '', if viewed with a normal
> terminal font :-)

Too late for this time, but next time this information is needed,
one could ask to run this command (no trouble with quotes!):
```
sage: import locale
sage: locale.setlocale(locale.LC_ALL, str())
```

Dima Pasechnik

unread,
Nov 27, 2020, 7:46:21 AM11/27/20
to sage-release
I've managed to (sort of) reproduce this issue, by doing

export LANG=""
locale
export LANG="en_GB.utf8"

in the shell, then I see

% locale
LANG="en_GB.utf8"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
dima@oucl13243 sage % ./sage -tp src/sage/misc/sageinspect.py
Running doctests with ID 2020-11-27-01-44-31-91213820.
Git branch: HEAD
Using --optional=build,dochtml,homebrew,pip,sage,sage_spkg
Doctesting 1 file using 8 threads.
sage -t --warn-long 61.7 --random-seed=0 src/sage/misc/sageinspect.py
**********************************************************************
File "src/sage/misc/sageinspect.py", line 1498, in
sage.misc.sageinspect.sage_getargspec
Failed example:
sage.misc.sageinspect.sage_getargspec(r.lm)
Expected:
ArgSpec(args=['self'], varargs='args', keywords='kwds', defaults=None)
Got:
During startup - Warning messages:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
ArgSpec(args=['self'], varargs='args', keywords='kwds', defaults=None)
**********************************************************************
1 item had failures:
...

Also,

% ./sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.3.beta1, Release Date: 2020-11-07 │
│ Using Python 3.9.0. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: import locale
....: locale.setlocale(locale.LC_ALL, '')
---------------------------------------------------------------------------
Error Traceback (most recent call last)
<ipython-input-1-897c4488bc0b> in <module>
1 import locale
----> 2 locale.setlocale(locale.LC_ALL, '')
/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/locale.py
in setlocale(category, locale)
608 # convert to string
609 locale = normalize(_build_localename(locale))
--> 610 return _setlocale(category, locale)
611
612 def resetlocale(category=LC_ALL):
Error: unsupported locale setting


And same error in plain Python3, and in /usr/bin/python (Python 2 from macOS)

This is all on macOS 10.15.7 with Homebrew.

To wit: terminal locale is fragile and weird. If it's broken then
Python has issues with it.
If your terminal locale is broken, fixing it is a good idea, but we
don't really know how.
Internet searches suggest to fiddle with "Set locale environment
variables on startup"
settings in the Terminal app (in Terminal, open
Preferences->Profiles->Advanced, look at "International" there)

Surely in Japan Python users on macOS must have figured out what to do.






----------
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/46D97713-74E6-4A47-A58D-DA0D80CB22F2%40gmail.com.
Reply all
Reply to author
Forward
0 new messages