[sage-devel] is_galois() / automorphisms() can be made faster

2020-01-21 Thread Ricardo Buring
Dear sage-devel,

For a number field K, I believe the methods K.is_galois() and/or 
K.automorphisms() can be made faster. In short: the methods use PARI, and 
in PARI it is faster to call nfgaloisconj(f) instead of 
nfgaloisconj(nfinit(f)), because nfinit(f) computes the full factorization 
of the discriminant of the polynomial, which is not (always) needed. More 
details here: https://trac.sagemath.org/ticket/29064

Cheers,
Ricardo

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/70a3f51f-27b7-4737-8009-6034d86907ff%40googlegroups.com.


Re: [sage-devel] Failure to build 9.0 -- matplotlib error

2020-01-21 Thread Jeremy Martin
Thanks, I did not notice that.  I will try it and report back.

-Jeremy

On Tuesday, January 21, 2020 at 2:43:02 PM UTC-6, Dima Pasechnik wrote:
>
> the interesting part of the log is 
>
>* The following required packages can not be 
> built: 
> * png 
> * Try installing png with `brew install 
> libpng` and 
> * pkg-config with `brew install pkg-config` 
>
> It seems you are building under Homebrew, but something goes wrong with 
> libpng. 
> Do you have it installed? 
>
> Do you have Sage's libpng built? 
>
>
>
>
> On Tue, Jan 21, 2020 at 8:01 PM Jeremy Martin  > wrote: 
> > 
> > I'm trying to build Sage 9.0 from source under MacOS Mojave 10.14.6. I 
> ran into an error with matplotlib.  The end of the error message is below, 
> and I'm attaching the logfile. 
> > 
> > Error building Sage. 
> > 
> > The following package(s) may have failed to build (not necessarily 
> > during this run of 'make all-start'): 
> > 
> > * package: matplotlib-2.2.4.p0 
> >   log file: /Applications/sage-9.0/logs/pkgs/matplotlib-2.2.4.p0.log 
> >   build directory: 
> /Applications/sage-9.0/local/var/tmp/sage/build/matplotlib-2.2.4.p0 
> > 
> > Any advice you can give will be helpful.  Thanks! 
> > 
> > --Jeremy Martin 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/ecd0ca50-ef2d-4d8d-859e-0e746e093b25%40googlegroups.com.
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d48981ac-0f02-4127-9feb-9126f4c9d354%40googlegroups.com.


Re: [sage-devel] Failure to build 9.0 -- matplotlib error

2020-01-21 Thread Dima Pasechnik
the interesting part of the log is

   * The following required packages can not be built:
* png
* Try installing png with `brew install libpng` and
* pkg-config with `brew install pkg-config`

It seems you are building under Homebrew, but something goes wrong with libpng.
Do you have it installed?

Do you have Sage's libpng built?




On Tue, Jan 21, 2020 at 8:01 PM Jeremy Martin  wrote:
>
> I'm trying to build Sage 9.0 from source under MacOS Mojave 10.14.6. I ran 
> into an error with matplotlib.  The end of the error message is below, and 
> I'm attaching the logfile.
>
> Error building Sage.
>
> The following package(s) may have failed to build (not necessarily
> during this run of 'make all-start'):
>
> * package: matplotlib-2.2.4.p0
>   log file: /Applications/sage-9.0/logs/pkgs/matplotlib-2.2.4.p0.log
>   build directory: 
> /Applications/sage-9.0/local/var/tmp/sage/build/matplotlib-2.2.4.p0
>
> Any advice you can give will be helpful.  Thanks!
>
> --Jeremy Martin
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/ecd0ca50-ef2d-4d8d-859e-0e746e093b25%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq3s4V1byX0CtVODxmf0tu%3D9gOV%3DEuoZ9UMS3MaBdQtj-Q%40mail.gmail.com.


[sage-devel] Failure to build 9.0 -- matplotlib error

2020-01-21 Thread Jeremy Martin
I'm trying to build Sage 9.0 from source under MacOS Mojave 10.14.6. I ran 
into an error with matplotlib.  The end of the error message is below, and 
I'm attaching the logfile.

Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package: matplotlib-2.2.4.p0
  log file: /Applications/sage-9.0/logs/pkgs/matplotlib-2.2.4.p0.log
  build directory: 
/Applications/sage-9.0/local/var/tmp/sage/build/matplotlib-2.2.4.p0

Any advice you can give will be helpful.  Thanks!

--Jeremy Martin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/ecd0ca50-ef2d-4d8d-859e-0e746e093b25%40googlegroups.com.
Found local metadata for matplotlib-2.2.4.p0
Using cached file /Applications/sage-9.0/upstream/matplotlib-2.2.4.tar.bz2
matplotlib-2.2.4.p0

Setting up build directory for matplotlib-2.2.4.p0
Finished extraction
Applying patches from ../patches...
Applying ../patches/install-jquery-ui.patch
patching file setupext.py
Applying ../patches/python38.patch
patching file setup.py
Applying ../patches/setup.py.patch
patching file setup.py
Hunk #1 succeeded at 67 (offset -18 lines).

Host system:
Darwin MATH-2QM1DHGG77 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec  1 18:59:03 
PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64

C compiler: gcc
C compiler version:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Package 'matplotlib' is currently not installed
No legacy uninstaller found for 'matplotlib'; nothing to do
NOTE: Set SAGE_MATPLOTLIB_GUI to anything but 'no' to try to build the 
Matplotlib GUI.
Not building any matplotlib graphical backends.
Installing matplotlib-2.2.4.p0
Installing package matplotlib using pip3
Ignoring indexes: https://pypi.org/simple
Created temporary directory: 
/private/var/folders/m2/yvg3zdpj3ys2rr6m_dds_564hbvdwg/T/pip-ephem-wheel-cache-i5gsxg8b
Created temporary directory: 
/private/var/folders/m2/yvg3zdpj3ys2rr6m_dds_564hbvdwg/T/pip-req-tracker-q382k663
Created requirements tracker 
'/private/var/folders/m2/yvg3zdpj3ys2rr6m_dds_564hbvdwg/T/pip-req-tracker-q382k663'
Created temporary directory: 
/private/var/folders/m2/yvg3zdpj3ys2rr6m_dds_564hbvdwg/T/pip-install-mtj4anwx
Processing 
/Applications/sage-9.0/local/var/tmp/sage/build/matplotlib-2.2.4.p0/src
  Created temporary directory: 
/private/var/folders/m2/yvg3zdpj3ys2rr6m_dds_564hbvdwg/T/pip-req-build-w5v3xey5
  Added 
file:///Applications/sage-9.0/local/var/tmp/sage/build/matplotlib-2.2.4.p0/src 
to build tracker 
'/private/var/folders/m2/yvg3zdpj3ys2rr6m_dds_564hbvdwg/T/pip-req-tracker-q382k663'
  Running setup.py 
(path:/private/var/folders/m2/yvg3zdpj3ys2rr6m_dds_564hbvdwg/T/pip-req-build-w5v3xey5/setup.py)
 egg_info for package from 
file:///Applications/sage-9.0/local/var/tmp/sage/build/matplotlib-2.2.4.p0/src
Running command python setup.py egg_info

Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
matplotlib: yes [2.2.4]
python: yes [3.7.3 (default, Jan 21 2020, 09:41:32)  [Clang
11.0.0 (clang-1100.0.33.8)]]
  platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
 numpy: yes [version 1.16.1]
  install_requires: yes [handled by setuptools]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
  freetype: yes [version 2.9.1]
   png: no  [The C/C++ header for libpng (png.h) could not
be found.  You may need to install the development
package.]
 qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]

OPTIONAL SUBPACKAGES
   sample_data: yes [installing]
  toolkits: yes [installing]

OPTIONAL BACKEND EXTENSIONS
macosx: no  [skipping due to configuration]
qt5agg: no  [PySide2 not found; PyQt5 not found]
qt4agg: no  

Re: [sage-devel] Re: drop python2 compatibility in 9.1 ?

2020-01-21 Thread William Stein
On Tue, Jan 21, 2020 at 9:49 AM Emmanuel Charpentier
 wrote:
>
> I second that. Unless someone presents us with a pressing case of a large 
> Python 2-based library unportable to Python 3 (and therefore already in a 
> dead-end), our limited workforce is better employed to maintain our Python 3 
> Sage.

I'm just going to endorse this decision yet again based on (for me)
new evidence:

1. I personally spent a lot of frustrating time last week working on
some Python code to make it worth well with both Python2 and Python3
versions of Sage.  The code involved a lot of string manipulation
(display of output, sending data over networks connections, etc.), and
it was a *very* painful experience with expressions that are valid in
both Python2 and Python3, but behave differently in each, etc.I
would not wish such work on anybody.

2. Also I read the blog linked to from
https://news.ycombinator.com/item?id=22036773 which talks about how
Mercurial's decision to support Python2 so long made their support of
Python3 more difficult, and continues to have a significant negative
impact moving forward.

So I endorse Sage developers using their limited resources to move
Sage forward to be Python 3 only, and let old versions of Sage provide
backward compatibility for people with lots of Python2 Sage code.

 -- William

-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CACLE5GAoDc-kxyHJGRKS_hA%2Br_KgLYi2ONZtKdpNRo-VA7UPLA%40mail.gmail.com.


[sage-devel] Re: FYI introductory Sage book in Portuguese

2020-01-21 Thread kcrisman
On a closely related note, Greg Bard relates the following:

It is with great joy that I inform the SageMath community that the Spanish 
translation of my book *Sage for Undergraduates* has been completed, 
including all proofreading stages. The translator, Diego Sejas Viscarra, 
worked very hard to make this possible. We are both very proud of *Sage 
para Estudiantes de Pregrado*. 

The website is up and running (https://www.sage-para-estudiantes.com/ 
)
 
and the book is ready for downloading... for free, of course!


(Note: you may have to make the link http://, not https://, in order to 
connect, depending on your browser.)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/3d3c8004-2a94-4b8d-8af8-ffbdb924a21c%40googlegroups.com.


Re: [sage-devel] Re: drop python2 compatibility in 9.1 ?

2020-01-21 Thread Emmanuel Charpentier
I second that. Unless someone presents us with a pressing case of a large 
Python 2-based library unportable to Python 3 (and therefore already in a 
dead-end), our limited workforce is better employed to maintain our Python 
3 Sage.

In other words, "if you need a Python 2-specific fix, speak *now* or 
forever hold your peace..."

Corollary : we should update the places where we published our plans for 
Python 2 compatibility and point to the present thread, which can be 
summarized by "The Sagemath developers have decided not to maintain Python 
2 compatibility beyond Sagemath 9.0." as an acceptable first-order 
approximation.

I agree that a Python 2-compatible maintenance branch *would* be a Good 
Thing (TM) to have. But I doubt that our present workforce is enough to 
maintain it. A french proverb says that "L'enfer est pavé de bonnes 
intentions" (Hell is paved with good intents) ; I think that we have such a 
case...

Now, for the cleanup of Python 2-specific idioms, I suspect that this will 
take a long time. And defining the set of Python 2 expressions that would 
be advantageously rewritten with (different) Pyhon 3 idioms is by no way an 
easy task. I would suggest to keep it as an informal goal, and to treat it 
incrementally.

HTH,

Le mardi 21 janvier 2020 17:19:33 UTC+1, Timo Kaufmann a écrit :
>
>
>
> Am Freitag, 17. Januar 2020 16:07:08 UTC+1 schrieb E. Madison Bray:
>>
>> On Wed, Jan 15, 2020 at 2:37 AM Matthias Koeppe 
>>  wrote: 
>> > 
>> > On Tuesday, January 14, 2020 at 12:01:42 PM UTC-5, Frédéric Chapoton 
>> wrote: 
>> >> 
>> >> So here is my proposal. 
>> >> 
>> >> * Starting from now, we allow ourselves to move on, using 9.1 betas 
>> and further releases for external python3 updates, including switch to 
>> ipython7, which seems to me the most urgent matter. But we also do not 
>> introduce python3-only code in our own code base if we can avoid it. 
>>
>> I'm not exactly sure what you mean by this, but it might be agreeable 
>> to me:  I'm completely okay with adding Python 3 only dependencies and 
>> even *code/features* so long as it's done without breaking 
>> backwards-compatibility.  When it comes to sage-the-distribution 
>> (which I sense is where most of this friction is coming from, and yet 
>> another reason to better separate sage from the 
>> sage-the-distribution), if there are dependencies you want to update 
>> that are Python 3-only I'd say go for it, but make it a separate SPKG 
>> so that previous versions of the dependency can still work on Python 2 
>> builds. 
>>
>
> As others have said already, supporting both python2 and python3 
> dependencies is much more work than only supporting python2 or only 
> supporting python3 versions.
>
> I think dropping pyhon2 support with the next release remains the best 
> option. Even better of course would be to keep the option for bugfix 
> releases for 8.9 / 9.0. That would be a nice thing to have in general, but 
> we could also just make an exception for this one release.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/459616b9-b12b-4588-b684-7833536e2db9%40googlegroups.com.


Re: [sage-devel] Re: drop python2 compatibility in 9.1 ?

2020-01-21 Thread Timo Kaufmann


Am Freitag, 17. Januar 2020 16:07:08 UTC+1 schrieb E. Madison Bray:
>
> On Wed, Jan 15, 2020 at 2:37 AM Matthias Koeppe 
> > wrote: 
> > 
> > On Tuesday, January 14, 2020 at 12:01:42 PM UTC-5, Frédéric Chapoton 
> wrote: 
> >> 
> >> So here is my proposal. 
> >> 
> >> * Starting from now, we allow ourselves to move on, using 9.1 betas and 
> further releases for external python3 updates, including switch to 
> ipython7, which seems to me the most urgent matter. But we also do not 
> introduce python3-only code in our own code base if we can avoid it. 
>
> I'm not exactly sure what you mean by this, but it might be agreeable 
> to me:  I'm completely okay with adding Python 3 only dependencies and 
> even *code/features* so long as it's done without breaking 
> backwards-compatibility.  When it comes to sage-the-distribution 
> (which I sense is where most of this friction is coming from, and yet 
> another reason to better separate sage from the 
> sage-the-distribution), if there are dependencies you want to update 
> that are Python 3-only I'd say go for it, but make it a separate SPKG 
> so that previous versions of the dependency can still work on Python 2 
> builds. 
>

As others have said already, supporting both python2 and python3 
dependencies is much more work than only supporting python2 or only 
supporting python3 versions.

I think dropping pyhon2 support with the next release remains the best 
option. Even better of course would be to keep the option for bugfix 
releases for 8.9 / 9.0. That would be a nice thing to have in general, but 
we could also just make an exception for this one release.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/81d27008-9330-4f47-ae11-b65fd442cbba%40googlegroups.com.