[sage-devel] doctest failure with pynormaliz

2016-12-22 Thread Vincent Delecroix

Hello,

On a recently compiled 7.5.rc0 the testsuite breaks at many places 
because of pynormaliz. See the attached log.


Best,
Vincent

--
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
sage -t --long src/sage/geometry/polyhedron/backend_normaliz.py
**
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 453, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_normaliz.integral_points
Failed example:
Polyhedron(vertices=[(-1,-1), (1,0), (1,1), (0,1)],  # optional - pynormaliz
   backend='normaliz').integral_points()
Exception raised:
Traceback (most recent call last):
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
self.compile_and_execute(example, compiler, test.globs)
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
exec(compiled, globs)
  File "", line 2, in 
backend='normaliz').integral_points()
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/geometry/polyhedron/backend_normaliz.py", line 568, in integral_points
return rectangular_box_points(box_min, box_max, self)
TypeError: Argument 'box_min' has incorrect type (expected list, got tuple)
**
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 459, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_normaliz.integral_points
Failed example:
simplex.integral_points()# optional - pynormaliz
Exception raised:
Traceback (most recent call last):
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
self.compile_and_execute(example, compiler, test.globs)
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
exec(compiled, globs)
  File "", line 1, in 
simplex.integral_points()# optional - pynormaliz
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/geometry/polyhedron/backend_normaliz.py", line 568, in integral_points
return rectangular_box_points(box_min, box_max, self)
TypeError: Argument 'box_min' has incorrect type (expected list, got tuple)
**
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 466, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_normaliz.integral_points
Failed example:
simplex.integral_points()# optional - pynormaliz
Exception raised:
Traceback (most recent call last):
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
self.compile_and_execute(example, compiler, test.globs)
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
exec(compiled, globs)
  File "", line 1, in 
simplex.integral_points()# optional - pynormaliz
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/geometry/polyhedron/backend_normaliz.py", line 568, in integral_points
return rectangular_box_points(box_min, box_max, self)
TypeError: Argument 'box_min' has incorrect type (expected list, got tuple)
**
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 485, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_normaliz.integral_points
Failed example:
len(simplex.integral_points())   # optional - pynormaliz
Exception raised:
Traceback (most recent call last):
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
self.compile_and_execute(example, compiler, test.globs)
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
exec(compiled, globs)
  File "", line 1, in 
len(simplex.integral_points())   # optional - pynormaliz
  File "/home/vdelecro/sage_patchbot/local/lib/python2.7/site-packages/sage/geometry/polyhedron/backend_normaliz.py", line 568, in 

Re: [sage-devel] cysignal, python signal module, and alarm functions

2016-12-22 Thread Jeroen Demeyer

On 2016-12-22 11:25, Jean-Pierre Flori wrote:

Dear all,

First question: Is there are fundamental differences btw using the
cysignal alarm function and the one from the signal module?


Depends what you mean with "fundamental". The internal implementation is 
different. The main user-visible difference is that Python's alarm 
requires an integer timeout, while cysignals accepts a floating-point 
timeout.



Second question: Is there any reason to make AlarmInterrupt derive from
KeyboardInterrupt?
SIGALARM and SIGINT are different signals.


I give you 3 reasons:

1. Historically, Sage has used KeyboardInterrupt for alarm(). So 
deriving AlarmInterrupt from KeyboardInterrupt is backwards-compatible 
with code catching KeyboardInterrupt for alarms.


2. Conceptually, KeyboardInterrupt and AlarmInterrupt are quite close. 
They both originate from signals and can interrupt code in the middle of 
a computation.


3. Since alarm() raises a sub-class of KeyboardInterrupt, alarm() 
provides an easy way to test interrupt-handling of code.



And its troublesome when using sage pexpect interfaces as they eat
KeyboardInterrupt (and so AlarmInterrupt).


What do you mean, they "eat" KeyboardInterrupt?

--
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Sage Windows Installer (take 2b)

2016-12-22 Thread David Joyner
Erik Bray:

Many thanks for this. Great job.

I tested latest version on a windows 7 machine in a computer lab at
work. The sage terminal worked fine. The sage notebook didn't work
well in IE (the default browser). In chrome, it worked but was a
little slow. For example, "2+3" took a second or so. Do you know why?
I noticed a message "timeout waiting for kernel_info" in the console.

Hope this helps.

- David Joyner


On Thu, Dec 15, 2016 at 5:20 AM, Erik Bray  wrote:
> On Wed, Dec 14, 2016 at 9:10 PM, Peter Luschny  
> wrote:
>>> I replaced the existing binary with a new one at
>>
>> BRAVO!
>> All works fine.
>
> Great!
>
>> (only plot() gives no output)
>
> That's strange... I thought I fixed that, and it works for me.
>
> All it's doing to determine the image viewer is passing the file to
> cygstart (cygstart is a program that comes with Cygwin that just uses
> the Windows API to find the default program file the given file
> type--in this case PNG I assume?)
>
> Maybe if you start up the "SageMath Shell" and manually run `cygstart
> ` we can see what happens.
>
> Also, it was pointed out to me by someone else that the "SageMath
> Console" shortcut link in the latest build is broken (it just has a
> typo).
>
> --
> 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 post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Error in compiling Sage in Ubunt 16.04u from source

2016-12-22 Thread Fjordforsk A/S
rectory
[pip-8.1.2.p1] /home/sem/Downloads/sage-7.4/local/bin/python: No module 
named pip
[pip-8.1.2.p1] 
[pip-8.1.2.p1] real0m0.032s
[pip-8.1.2.p1] user0m0.016s
[pip-8.1.2.p1] sys0m0.012s
[pip-8.1.2.p1] 

[pip-8.1.2.p1] Error installing package pip-8.1.2.p1
[pip-8.1.2.p1] 

[pip-8.1.2.p1] Please email sage-devel 
(http://groups.google.com/group/sage-devel)
[pip-8.1.2.p1] explaining the problem and including the relevant part of 
the log file
[pip-8.1.2.p1]   /home/sem/Downloads/sage-7.4/logs/pkgs/pip-8.1.2.p1.log
[pip-8.1.2.p1] Describe your computer, operating system, etc.
[pip-8.1.2.p1] If you want to try to fix the problem yourself, *don't* just 
cd to
[pip-8.1.2.p1] 
/home/sem/Downloads/sage-7.4/local/var/tmp/sage/build/pip-8.1.2.p1 and type 
'make' or whatever is appropriate.
[pip-8.1.2.p1] Instead, the following commands setup all environment 
variables
[pip-8.1.2.p1] correctly and load a subshell for you to debug the error:
[pip-8.1.2.p1]   (cd 
'/home/sem/Downloads/sage-7.4/local/var/tmp/sage/build/pip-8.1.2.p1' && 
'/home/sem/Downloads/sage-7.4/sage' --sh)
[pip-8.1.2.p1] When you are done debugging, you can type "exit" to leave 
the subshell.
[pip-8.1.2.p1] 

Makefile:2429: recipe for target 
'/home/sem/Downloads/sage-7.4/local/var/lib/sage/installed/pip-8.1.2.p1' 
failed
make[2]: *** 
[/home/sem/Downloads/sage-7.4/local/var/lib/sage/installed/pip-8.1.2.p1] 
Error 1
make[2]: Leaving directory '/home/sem/Downloads/sage-7.4/build/make'
Makefile:877: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/sem/Downloads/sage-7.4/build/make'

real150m53.856s
user144m15.688s
sys12m44.992s
***
Error building Sage.

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

* package: pip-8.1.2.p1
  log file: /home/sem/Downloads/sage-7.4/logs/pkgs/pip-8.1.2.p1.log
  build directory: 
/home/sem/Downloads/sage-7.4/local/var/tmp/sage/build/pip-8.1.2.p1


-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Python's _ssl module wont't compile correctly against OpenSSL 1.1

2016-12-22 Thread Emmanuel Charpentier
Well, I upgraded my local Sage (which used to have a functional pip...) and 
... :

charpent@SAP5057241:/usr/local/sage-7$ sage -python
Python 2.7.12 (default, Dec 22 2016, 11:47:35) 
[GCC 6.2.1 20161124] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
charpent@SAP5057241:/usr/local/sage-7$ sage -pip search lalala
Exception:
Traceback (most recent call last):
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/basecommand.py", 
line 215, in main
status = self.run(options, args)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/commands/search.py", 
line 43, in run
pypi_hits = self.search(query, options)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/commands/search.py", 
line 60, in search
hits = pypi.search({'name': query, 'summary': query}, 'or')
  File "/usr/local/sage-7/local/lib/python/xmlrpclib.py", line 1243, in 
__call__
return self.__send(self.__name, args)
  File "/usr/local/sage-7/local/lib/python/xmlrpclib.py", line 1602, in 
__request
verbose=self.__verbose
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/download.py", line 
764, in request
headers=headers, stream=True)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py",
 
line 518, in post
return self.request('POST', url, data=data, json=json, **kwargs)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/download.py", line 
378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py",
 
line 475, in request
resp = self.send(prep, **send_kwargs)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py",
 
line 585, in send
r = adapter.send(request, **kwargs)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py",
 
line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
  File 
"/usr/local/sage-7/local/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py",
 
line 477, in send
raise SSLError(e, request=request)
SSLError: Can't connect to HTTPS URL because the SSL module is not 
available.

The problem still stands (has worsened, actually...). However, the last 
changes in the patch included in Python were dated 2016-09-05, whereas 
Python 2.7.12 (implicitly -0) is dated  
2016-06-25. Our current version may be too hold to get the patch.

HTH,

--
Emmanuel Charpentier

Le jeudi 22 décembre 2016 12:36:34 UTC+1, Samuel Lelievre a écrit :
>
> Upgrade to Python 2.7.12 is done at #19735.
>
> Upgrade to Python 2.7.13 is in progress at #22037.
>
> #19735 https://trac.sagemath.org/ticket/19735
> #22037 https://trac.sagemath.org/ticket/22037
>

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Python's _ssl module wont't compile correctly against OpenSSL 1.1

2016-12-22 Thread Samuel Lelievre
Upgrade to Python 2.7.12 is done at #19735.

Upgrade to Python 2.7.13 is in progress at #22037.

#19735 https://trac.sagemath.org/ticket/19735
#22037 https://trac.sagemath.org/ticket/22037

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] cysignal, python signal module, and alarm functions

2016-12-22 Thread Jean-Pierre Flori
Dear all,

First question: Is there are fundamental differences btw using the cysignal 
alarm function and the one from the signal module?

Second question: Is there any reason to make AlarmInterrupt derive from 
KeyboardInterrupt?
SIGALARM and SIGINT are different signals.
And its troublesome when using sage pexpect interfaces as they eat 
KeyboardInterrupt (and so AlarmInterrupt).

Best,
JPF

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Python's _ssl module wont't compile correctly against OpenSSL 1.1

2016-12-22 Thread Emmanuel Charpentier
Notwithstanding the deafening silence of this list, and following Eric 
Bray's advice, this is now Trac#22089 
.

This ticket is marked "critical" (I feel personally that this should be a 
"blocker" ticket).

Advice requested about whether :

   - patch our current python (2.7.10), or 
   - upgrade our current python to, e. g. 2.7.11 (current in Debian testing)
   - or even to 2.7.12 (current in cygwin) or 2.7.13 (current python.org's 
   release, but only 5 days old).

HTH,

--
Emmanuel Charpentier

Le lundi 19 décembre 2016 11:28:28 UTC+1, Erik Bray a écrit :
>
> On Sat, Dec 17, 2016 at 9:18 AM, Emmanuel Charpentier 
>  wrote: 
> > Still pursuing our SSL curse (see this thread among others ; and, BTW, 
> > Trac#22058 needs review), I noted that I was unable to get a functional 
> pip 
> > on any "new" installation (e. g. a virtual machine with Debian testing). 
> > 
> > The build logs (see included file) showed that the _ssl extension 
> doesn't 
> > compile cleanly, with symptoms similar to those seen in git. 
> > 
> > If I understand it correctly, any attempt to install Sage on a machine 
> with 
> > OpenSSL>=1.1 (i. e. all major distributions, AFAICT, except the antique 
> > Debian "stable"), is doomed to have serious problems communicating over 
> > SSL/HTTPS. 
> > 
> > However, existing installations can use OpenSSL runtime library >=1.1, 
> which 
> > is still binary-compatible. What has changed is the way the macros 
> defined 
> > in the development libraries are used to declare SSL-related types. 
> > 
> > A bit of Googling led me to this Python bug, which seems relevant (and 
> offer 
> > a solution). Questions : 
> > 
> > Is this ticket-worthy ? (IMHO, it's a damn *blocker* bug...) 
> > Should we : 
> > 
> > just port the proposed patch, or 
> > upgrade python to , e. g., 2.7.11-2 (current in Deboan testing, ours is 
> > 2.7.10.3) ? 
> > 
> > 
> > Advice ? Votes ? 
>
> Looks to me like the OpenSSL 1.1 fix for Python was merged and 
> backported to the 2.7.x branch as well, being obviously 
> security-critical, though a new 2.7.x release hasn't come out yet. 
> I'd be surprised if that patch hasn't already been backported by the 
> major distros.  But in any case I agree we should pull that patch into 
> sage as well.  I agree there should be a ticket. 
>

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.