Re: [sage-devel] unable to locate pari.cfg

2020-07-26 Thread Matthias Koeppe
I have opened https://trac.sagemath.org/ticket/30231 for it

On Sunday, July 26, 2020 at 4:14:36 PM UTC-7, Dima Pasechnik wrote:
>
> indeed, this is a bug introduced in b5d16d9927a 
> --- the search for pari.cfg is carried out even if Sage will install Pari. 
>
>
> On Sun, Jul 26, 2020 at 11:32 PM Zachary Scherr  > wrote: 
> > 
> > In an attempt to be helpful I tried to recreate the error with fewer 
> options to configure.  It appears that on Catalina the error is caused by: 
> > 
> > ./configure --with-system-gp2c=no 
> > 
> > On Sunday, July 26, 2020 at 6:00:45 PM UTC-4 Samuel Lelievre wrote: 
> >> 
> >> 2020-07-25 21:30:25 UTC Samuel Lelièvre: 
> >> 
> >> > 
> >> > 2020-05-25 20:25:58 UTC, Dima Pasechnik: 
> >> > > 
> >> > > try adding 
> >> > > 
> >> > > --with-system-pari=no 
> >> > > 
> >> > > although indeed this looks like a bug to me 
> >> > 
> >> > Thanks! In fact `--with-system-pari=no` is already there. 
> >> > (The flags are in the order found in `./configure --help`.) 
> >> 
> >> Should I open a ticket? If so what should I call it? 
> > 
> > -- 
> > 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/770c56bd-7faf-472d-90bf-47bc0215308en%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/09d127d0-8f28-4498-9902-062abb3d3129o%40googlegroups.com.


Re: [sage-devel] unable to locate pari.cfg

2020-07-26 Thread Dima Pasechnik
indeed, this is a bug introduced in b5d16d9927a
--- the search for pari.cfg is carried out even if Sage will install Pari.


On Sun, Jul 26, 2020 at 11:32 PM Zachary Scherr  wrote:
>
> In an attempt to be helpful I tried to recreate the error with fewer options 
> to configure.  It appears that on Catalina the error is caused by:
>
> ./configure --with-system-gp2c=no
>
> On Sunday, July 26, 2020 at 6:00:45 PM UTC-4 Samuel Lelievre wrote:
>>
>> 2020-07-25 21:30:25 UTC Samuel Lelièvre:
>>
>> >
>> > 2020-05-25 20:25:58 UTC, Dima Pasechnik:
>> > >
>> > > try adding
>> > >
>> > > --with-system-pari=no
>> > >
>> > > although indeed this looks like a bug to me
>> >
>> > Thanks! In fact `--with-system-pari=no` is already there.
>> > (The flags are in the order found in `./configure --help`.)
>>
>> Should I open a ticket? If so what should I call it?
>
> --
> 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/770c56bd-7faf-472d-90bf-47bc0215308en%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/CAAWYfq22WZDjMdhxGkHUybeus2iES6CX6PkJSZ2Rch0yJiSwgA%40mail.gmail.com.


[sage-devel] Using importhooks for "preparsing"

2020-07-26 Thread Nils Bruin
With the adoption of Python 3 in Sage, we have access to a lot of more 
recent development in python. One of which is the new "import" machinery, 
which makes hooking in particular processors a lot easier. For some 
examples:

https://github.com/aroberge/ideas

http://stupidpythonideas.blogspot.com/2015/06/hacking-python-without-hacking-python.html

https://macropy3.readthedocs.io

I'm not suggesting that we should adopt one of these to implement our 
preprocessor, but I think some of the ideas in there could help with a 
cleaner implementation. Obviously, sage's REPL doesn't put its code through 
import hooks, but appropriate modularisation of the process would probably 
make it relatively straightforward to implement an IPython REPL that uses 
similar steps (it still needs to tokenize, parse, transform ASTs, and 
compile)

I don't have concrete ideas for, or experience with, rewriting the 
preparser. I'm just flagging the opportunity in case there is someone with 
the right skill set who would find this a fun project. It would require 
some experimentation to get right, but if it works correctly (and more 
efficiently?) I think there will be appetite for adopting it.


-- 
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/f156e9f6-ac91-4859-914f-cbe96cc44230o%40googlegroups.com.


Re: [sage-devel] unable to locate pari.cfg

2020-07-26 Thread Zachary Scherr
In an attempt to be helpful I tried to recreate the error with fewer 
options to configure.  It appears that on Catalina the error is caused by:

./configure --with-system-gp2c=no

On Sunday, July 26, 2020 at 6:00:45 PM UTC-4 Samuel Lelievre wrote:

> 2020-07-25 21:30:25 UTC Samuel Lelièvre:
>
> >
> > 2020-05-25 20:25:58 UTC, Dima Pasechnik: 
> > > 
> > > try adding 
> > > 
> > > --with-system-pari=no 
> > > 
> > > although indeed this looks like a bug to me 
> >
> > Thanks! In fact `--with-system-pari=no` is already there. 
> > (The flags are in the order found in `./configure --help`.) 
>
> Should I open a ticket? If so what should I call it?
>

-- 
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/770c56bd-7faf-472d-90bf-47bc0215308en%40googlegroups.com.


Re: [sage-devel] unable to locate pari.cfg

2020-07-26 Thread Samuel Lelievre
2020-07-25 21:30:25 UTC Samuel Lelièvre:
>
> 2020-05-25 20:25:58 UTC, Dima Pasechnik: 
> > 
> > try adding 
> > 
> > --with-system-pari=no 
> > 
> > although indeed this looks like a bug to me 
>
> Thanks! In fact `--with-system-pari=no` is already there. 
> (The flags are in the order found in `./configure --help`.) 

Should I open a ticket? If so what should I call it?

-- 
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/f1d8351a-d60d-4d89-98dd-fcffb7ec06d9o%40googlegroups.com.


[sage-devel] Re: Running ./configure in quiet mode still lets out a few lines

2020-07-26 Thread Samuel Lelievre
2020-07-26 15:50:54 UTC, Matthias Koeppe:
>
> Yes, please open a ticket. 
> We already have a test for quietness of configure
> (tox -e check_configure). This is a regression.

This is now:

- Fix configure quiet mode as it lets a few things through
  https://trac.sagemath.org/ticket/30224

-- 
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/9c61c295-c9b8-456c-9bfa-ccdde0562b73o%40googlegroups.com.


[sage-devel] Re: Running ./configure in quiet mode still lets out a few lines

2020-07-26 Thread Matthias Koeppe
Yes, please open a ticket. 
We already have a test for quietness of configure (tox -e check_configure). 
This is a regression.

On Sunday, July 26, 2020 at 7:20:25 AM UTC-7, Samuel Lelievre wrote:
>
> Dear sage-devel,
>
> On macOS 10.14.6 Mojave, running configure in quiet mode still
> printed three lines of output and missed a final newline:
> ```
> $ ./configure -q
> 11.4.3
> 1.5.3
> (ignoring conda because no environment is active) $
> ```
>
> To figure out where these come from, I ran `./configure`
> in non-quiet mode, redirecting stdout to a file:
> ```
> $ ./configure > dot-slash-configure-output.txt
> (ignoring conda because no environment is active) $
> ```
> and again, redirecting both stdout and stderr to a file:
> ```
> $ ./configure > dot-slash-configure-output.txt
> $
> ```
>
> Inspecting that file, the corresponding lines when running
> without `-q` seem to be:
> ```
> ...
> Checking whether SageMath should install SPKG ntl...
> ...
> checking NTL version >= 10.3... 11.4.3
> ...
> Checking whether SageMath should install SPKG mpfi...
> ...
> checking MPFI version >= 1.5... 1.5.3
> ...
> checking for the package system in use... (ignoring conda
> because no environment is active) homebrew
> ...
> ```
> The "(ignoring conda ...)" part seems to go to stderr
> instead of stdout.
>
> Should I open a ticket?  --Samuel
>

-- 
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/b8b205e8-75ef-4277-81d4-ecb9477ffe90o%40googlegroups.com.


[sage-devel] Running ./configure in quiet mode still lets out a few lines

2020-07-26 Thread Samuel Lelievre
Dear sage-devel,

On macOS 10.14.6 Mojave, running configure in quiet mode still
printed three lines of output and missed a final newline:
```
$ ./configure -q
11.4.3
1.5.3
(ignoring conda because no environment is active) $
```

To figure out where these come from, I ran `./configure`
in non-quiet mode, redirecting stdout to a file:
```
$ ./configure > dot-slash-configure-output.txt
(ignoring conda because no environment is active) $
```
and again, redirecting both stdout and stderr to a file:
```
$ ./configure > dot-slash-configure-output.txt
$
```

Inspecting that file, the corresponding lines when running
without `-q` seem to be:
```
...
Checking whether SageMath should install SPKG ntl...
...
checking NTL version >= 10.3... 11.4.3
...
Checking whether SageMath should install SPKG mpfi...
...
checking MPFI version >= 1.5... 1.5.3
...
checking for the package system in use... (ignoring conda
because no environment is active) homebrew
...
```
The "(ignoring conda ...)" part seems to go to stderr
instead of stdout.

Should I open a ticket?  --Samuel

-- 
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/96481db2-120c-4cff-9ea3-e14064e9024bo%40googlegroups.com.


[sage-devel] Re: a problem with is_line_graph

2020-07-26 Thread 'Martin R' via sage-devel
Many thanks, this worked!

Am Samstag, 25. Juli 2020 07:19:49 UTC+2 schrieb Dave Morris:
>
> I think the bugfix in trac ticket #29740 
>  fixes this problem, so the error 
> should go away if you upgrade to the latest beta.  Please report again if 
> it doesn't!  (Your example works fine for me in 9.2.beta5.)
>
> On Friday, July 24, 2020 at 3:45:25 PM UTC-6, Martin R wrote:
>>
>> I think I stumbled over something slightly surprising.
>>
>> ┌┐
>> │ SageMath version 9.2.beta1, Release Date: 2020-06-13   │
>> │ Using Python 3.7.3. Type "help()" for help.│
>> └┘
>> ┏┓
>> ┃ Warning: this is a prerelease version, and it may be unstable. ┃
>> ┗┛
>> sage: h = Graph([(0, 3), (0, 4), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4)])
>> sage: h.is_line_graph()
>>
>> ---
>> Exception Traceback (most recent call 
>> last)
>>  in ()
>> > 1 h.is_line_graph()
>>
>> /home/martin/sage-develop/local/lib/python3.7/site-packages/sage/graphs/line_graph.pyx
>>  
>> in sage.graphs.line_graph.is_line_graph 
>> (build/cythonized/sage/graphs/line_graph.c:2291)()
>> 221 if g.is_connected():
>> 222 try:
>> --> 223 R, isom = root_graph(g)
>> 224 if certificate:
>> 225 return True, R, isom
>>
>> /home/martin/sage-develop/local/lib/python3.7/site-packages/sage/graphs/line_graph.pyx
>>  
>> in sage.graphs.line_graph.root_graph 
>> (build/cythonized/sage/graphs/line_graph.c:7152)()
>> 622 
>> 623 if not is_isom:
>> --> 624 raise Exception(error_message)
>> 625 
>> 626 return R, isom
>>
>> Exception: It looks like there is a problem somewhere. Youfound a bug 
>> here ! Please report it on sage-devel,our google group !
>> sage: 
>>
>

-- 
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/993d8627-dc00-4cce-ad20-0c88a2c5676ao%40googlegroups.com.